[packages/opencv] compile java with lower jre requirement

glen glen at pld-linux.org
Sat Jun 22 12:13:59 CEST 2013


commit a4737151b86835d28674424fde9a3f027b02447c
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Jun 22 13:12:45 2013 +0300

    compile java with lower jre requirement

 java-ant-sourcelevel.patch | 14 ++++++++++++++
 opencv.spec                |  9 +++++----
 2 files changed, 19 insertions(+), 4 deletions(-)
---
diff --git a/opencv.spec b/opencv.spec
index eadd440..80ef699 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -25,7 +25,7 @@
 %bcond_with	v4l		# Video4Linux in highgui (even V4L2 support currently relies on V4L1 API)
 %bcond_with	ximea		# m3API (XIMEA cameras) support in highgui (proprietary)
 %bcond_with	xine		# XINE support in highgui (GPL)
-#
+
 %ifarch pentium3 pentium4 %{x8664}
 %define		with_sse	1
 %endif
@@ -36,7 +36,7 @@ Summary:	A library of programming functions mainly aimed at real time computer v
 Summary(pl.UTF-8):	Biblioteka funkcji do grafiki komputerowej w czasie rzeczywistym
 Name:		opencv
 Version:	2.4.5
-Release:	2
+Release:	3
 Epoch:		1
 %if %{with unicap} || %{with xine}
 License:	GPL (enforced by used libraries), BSD (opencv itself)
@@ -53,6 +53,7 @@ Patch3:		%{name}-c.patch
 Patch4:		%{name}-gcc.patch
 Patch5:		%{name}-ximea.patch
 Patch6:		%{name}-ocl-fft.patch
+Patch7:		java-ant-sourcelevel.patch
 URL:		http://opencv.willowgarage.com/
 %{?with_pvapi:BuildRequires:	AVT_GigE_SDK-devel}
 %{?with_opencl:BuildRequires:	OpenCL-devel}
@@ -191,6 +192,7 @@ Wiązania Pythona do OpenCV.
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 %build
 install -d build
@@ -219,12 +221,11 @@ cd build
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
-install build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
+cp -p build/unix-install/opencv.pc $RPM_BUILD_ROOT%{_pkgconfigdir}
 
 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
diff --git a/java-ant-sourcelevel.patch b/java-ant-sourcelevel.patch
new file mode 100644
index 0000000..a8907c2
--- /dev/null
+++ b/java-ant-sourcelevel.patch
@@ -0,0 +1,14 @@
+--- opencv-2.4.5/modules/java/build.xml.in~	2013-04-05 12:00:20.000000000 +0300
++++ opencv-2.4.5/modules/java/build.xml.in	2013-06-21 20:08:55.908749180 +0300
+@@ -6,7 +6,10 @@
+     <!-- This is to make a jar with a source attachment, for e.g. easy -->
+     <!-- navigation in Eclipse. See this question: -->
+     <!-- http://stackoverflow.com/questions/3584968/ant-how-to-compile-jar-that-includes-source-attachment -->
+-    <javac sourcepath="" srcdir="src" destdir="src" debug="on" includeantruntime="false" >
++    <property name="javac.target" value="1.5"/>
++    <property name="javac.source" value="1.5"/>
++
++    <javac sourcepath="" srcdir="src" destdir="src" debug="on" includeantruntime="false" target="${javac.target}" source="${javac.source}">
+       <include name="**/*.java"/>
+       <compilerarg line="-encoding utf-8"/>
+     </javac>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/opencv.git/commitdiff/97310fd55f81b041992c17bfd8a6036294f07417



More information about the pld-cvs-commit mailing list