[packages/libgda5] - fix hardcoded paths to java libs

baggins baggins at pld-linux.org
Sun Dec 1 10:13:13 CET 2013


commit 03f15e65c7e798f54e802afcbd978781401ba402
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Dec 1 10:12:13 2013 +0100

    - fix hardcoded paths to java libs

 java-arch.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++
 libgda5.spec    |  8 ++++++++
 2 files changed, 53 insertions(+)
---
diff --git a/libgda5.spec b/libgda5.spec
index 0db0970..7d7be55 100644
--- a/libgda5.spec
+++ b/libgda5.spec
@@ -34,6 +34,7 @@ Patch2:		%{name}-missing.patch
 Patch3:		%{name}-vala.patch
 Patch4:		%{name}-format.patch
 Patch5:		%{name}-yelp.patch
+Patch6:		java-arch.patch
 URL:		http://www.gnome-db.org/
 %{?with_firebird:BuildRequires:	Firebird-devel}
 BuildRequires:	autoconf >= 2.68
@@ -368,12 +369,19 @@ Narzędzia graficzne dla GDA.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %build
 # included version is bash-specific, use system file
 cp -f %{_aclocaldir}/introspection.m4 m4/introspection.m4
 %if %{with jdbc}
 export JAVA_HOME="%{java_home}"
+%ifarch %{ix86}
+export _JAVA_SUFFIX="/lib/i386/server"
+%endif
+%ifarch %{x8664}
+export _JAVA_SUFFIX="/lib/amd64/server"
+%endif
 %endif
 %{__gtkdocize}
 %{__intltoolize}
diff --git a/java-arch.patch b/java-arch.patch
new file mode 100644
index 0000000..9f27d7f
--- /dev/null
+++ b/java-arch.patch
@@ -0,0 +1,45 @@
+--- libgda-5.2.1/getsp.java~	2013-10-19 14:35:27.000000000 +0200
++++ libgda-5.2.1/getsp.java	2013-12-01 10:06:13.393710066 +0100
+@@ -10,7 +10,8 @@
+ 			}
+ 			else if (args[0].compareTo("-libs")==0) {
+ 				String prefix="-L";
+-				if (args.length>1) prefix=args[1];
++				String suffix="/lib/amd64/server";
++				if (args.length>1) suffix=args[1];
+ 
+ 				// we're not using StringTokenizer in case the JVM is very crude
+ 				int i=0,j,k=0;
+@@ -25,7 +27,6 @@
+ 				while (i<=j) {
+ 					if (i==j || lp.charAt(i)==ps) {
+ 						String lib=lp.substring(k,i);
+-						String suffix="/lib/amd64/server";
+ 						k=i+1;
+ 						if (lib.compareTo(".")!=0)
+ 							r=(r==null)?(prefix+lib+suffix):(r+" "+prefix+lib+suffix);
+@@ -50,7 +51,9 @@
+ 
+ 				if (r!=null) System.out.println(r);
+ 			} else if (args[0].compareTo("-ldpath")==0) {
+-				String lp1=System.getProperty("java.home")+"/lib/amd64/server";
++				String suffix="/lib/amd64/server";
++				if (args.length>1) suffix=args[1];
++				String lp1=System.getProperty("java.home")+suffix;
+ 				String lp2=System.getProperty("java.library.path");
+ 				System.out.println(lp1+":"+lp2);
+ 			}
+--- libgda-5.2.1/m4/java.m4~	2013-10-19 14:35:27.000000000 +0200
++++ libgda-5.2.1/m4/java.m4	2013-12-01 10:07:36.001317264 +0100
+@@ -213,9 +213,9 @@
+ 	                    JAVA_LD_PATH=
+ 	                    ;;
+ 	                *)
+-	                    RUN_JAVA(JAVA_LIBS, [-classpath ${srcdir} getsp -libs])
++	                    RUN_JAVA(JAVA_LIBS, [-classpath ${srcdir} getsp -libs ${_JAVA_SUFFIX}])
+ 	                    JAVA_LIBS="${JAVA_LIBS} -ljvm"
+-			    RUN_JAVA(JAVA_LD_PATH, [-classpath ${srcdir} getsp -ldpath])
++			    RUN_JAVA(JAVA_LD_PATH, [-classpath ${srcdir} getsp -ldpath ${_JAVA_SUFFIX}])
+ 	           	    ;;
+ 	            esac
+ 	            # note that we actually don't test JAVA_LIBS - we hope that the detection
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libgda5.git/commitdiff/31763d4404927eb02fd661d78cb7f6b6b3ba53da



More information about the pld-cvs-commit mailing list