packages: plplot/plplot.spec - updated java binding build

qboosh qboosh at pld-linux.org
Sat Dec 3 09:51:00 CET 2011


Author: qboosh                       Date: Sat Dec  3 08:51:00 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- updated java binding build

---- Files affected:
packages/plplot:
   plplot.spec (1.56 -> 1.57) 

---- Diffs:

================================================================
Index: packages/plplot/plplot.spec
diff -u packages/plplot/plplot.spec:1.56 packages/plplot/plplot.spec:1.57
--- packages/plplot/plplot.spec:1.56	Fri Dec  2 20:05:18 2011
+++ packages/plplot/plplot.spec	Sat Dec  3 09:50:55 2011
@@ -12,7 +12,7 @@
 # Conditional build:
 %bcond_without	gnome2		# GNOME 2 and pygtk bindings
 %bcond_with	perl_pdl	# enable perl examples in tests
-%bcond_with	java		# build Java binding
+%bcond_without	java		# Java binding
 %bcond_without	itcl		# [incr Tcl]/[incr Tk] support in Tcl/Tk binding
 #
 Summary:	PLplot - a library of functions that are useful for making scientific plots
@@ -45,6 +45,7 @@
 %{?with_itcl:BuildRequires:	itk-devel >= 3.4}
 BuildRequires:	jadetex
 %{?with_java:BuildRequires:	jdk}
+%{?with_java:BuildRequires:	jpackage-utils}
 BuildRequires:	lapack-devel
 BuildRequires:	libLASi-devel
 %{?with_gnome2:BuildRequires:	libgnomeprintui-devel >= 2.2}
@@ -511,9 +512,14 @@
 %build
 mkdir build
 cd build
+# NOTE: no %{_libdir}/jni in PLD, use plain %{_libdir}
 %cmake .. \
 %if %{with java}
-	-DJAVA_HOME=/usr/%{_lib}/java \
+	-DCMAKE_Java_RUNTIME=%{java} \
+	-DCMAKE_Java_COMPILER=%{javac} \
+	-DCMAKE_Java_ARCHIVE=%{jar} \
+	-DJAR_DIR=%{_javadir} \
+	-DJAVAWRAPPER_DIR=%{_libdir} \
 %else
 	-DENABLE_java=OFF \
 %endif
@@ -539,10 +545,6 @@
 	-DwxWidgets_USE_UNICODE=ON \
 	%{!?with_perl_pdl:-DENABLE_pdl=OFF}
 
-#        -DCMAKE_Java_RUNTIME=$(JAVA_HOME)/bin/java \
-#        -DCMAKE_Java_COMPILER=$(JAVA_HOME)/bin/javac \
-#        -DCMAKE_Java_ARCHIVE=$(JAVA_HOME)/bin/jar
-
 %{__make}
 
 %install
@@ -558,13 +560,6 @@
 rm -rf installed-docs
 mv $RPM_BUILD_ROOT%{_docdir}/plplot installed-docs
 
-%if %{with java}
-# java must stay in libdir - JNI wrapper included
-mv $RPM_BUILD_ROOT%{_libdir}/java/plplot/examples \
-	$RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/java
-mv $RPM_BUILD_ROOT%{_libdir}/java/plplot/core/README.javaAPI installed-docs
-%endif
-
 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
 %py_postclean
@@ -778,11 +773,8 @@
 %if %{with java}
 %files java
 %defattr(644,root,root,755)
-%dir %{_libdir}/java/plplot
-%dir %{_libdir}/java/plplot/core
-%attr(755,root,root) %{_libdir}/java/plplot/core/*.so
-%{_libdir}/java/plplot/core/*.class
-%{_libdir}/java/plplot/core/*.java
+%attr(755,root,root) %{_libdir}/plplotjavac_wrap.so
+%{_javadir}/plplot.jar
 
 %files java-devel
 %defattr(644,root,root,755)
@@ -874,6 +866,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.57  2011/12/03 08:50:55  qboosh
+- updated java binding build
+
 Revision 1.56  2011/12/02 19:05:18  qboosh
 - build tcl/tk bindings with itcl/itk support
 - package .pyc/.pyo files
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/plplot/plplot.spec?r1=1.56&r2=1.57&f=u



More information about the pld-cvs-commit mailing list