Hello community, here is the log from the commit of package libgda for openSUSE:Factory checked in at 2012-06-18 21:04:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libgda (Old) and /work/SRC/openSUSE:Factory/.libgda.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libgda", Maintainer is "gnome-maintain...@suse.de" Changes: -------- --- /work/SRC/openSUSE:Factory/libgda/libgda.changes 2012-01-26 14:06:04.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libgda.new/libgda.changes 2012-06-18 21:04:35.000000000 +0200 @@ -1,0 +2,11 @@ +Sun Jun 17 13:53:52 UTC 2012 - dims...@opensuse.org + +- Add libgda-better-javadetection.patch: Improve java detection. +- Add libgda-javadetection-biarch.patch: Add capability to also + correctly detectd on i586. The patch only adds a --ARCH-- field, + which is replaced using sed during %build. +- Rebuild getsp.class in %build section, as above patches touch the + source of it. Usually, the .class is shipped in the tarball and + not rebuilt). + +------------------------------------------------------------------- New: ---- libgda-better-javadetection.patch libgda-javadetection-biarch.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libgda.spec ++++++ --- /var/tmp/diff_new_pack.5HLj6v/_old 2012-06-18 21:04:36.000000000 +0200 +++ /var/tmp/diff_new_pack.5HLj6v/_new 2012-06-18 21:04:36.000000000 +0200 @@ -25,6 +25,10 @@ Group: Productivity/Databases/Clients Url: http://www.gnome-db.org/ Source: http://download.gnome.org/sources/libgda/5.0/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM libgda-better-javadetection.patch dims...@opensuse.org -- Improve java detections. Taken from upstream, commit e77368b. +Patch0: libgda-better-javadetection.patch +# PATCH-FIX-UPSTREAM libgda-javadetection-biarch.patch bgo#673560 -- Prepare getsp to be sed'ed for biarch +Patch1: libgda-javadetection-biarch.patch BuildRequires: db-devel BuildRequires: fdupes %ifnarch s390 s390x ppc64 @@ -346,8 +350,19 @@ %lang_package -n %{name}-5_0-4 %prep %setup -q +%patch0 -p1 +%patch1 -p1 %build +# Patch1 introdcues a --ARCH-- field ni getsp, which needs to be replace prior to compilation +%if "%_lib" == "lib64" +export getspARCH=amd64 +%else +export getspARCH=i386 +%endif +sed -i "s:--ARCH--:$getspARCH:g" getsp.java +# Due to patch0 and patch1, getsp.java needs to be rebuilt +javac getsp.java %configure --with-pic\ --disable-static \ --enable-binreloc \ ++++++ libgda-better-javadetection.patch ++++++ >From e77368ba68e6275e331c8a4f24b4b07cc81c2f6d Mon Sep 17 00:00:00 2001 From: Vivien Malerba <male...@gnome-db.org> Date: Sun, 03 Jun 2012 16:08:51 +0000 Subject: Java detection improvements use java.home as well as java.library.path --- diff --git a/getsp.class b/getsp.class index d4e9227..ec4e45a 100644 --- a/getsp.class +++ b/getsp.class Binary files differ diff --git a/getsp.java b/getsp.java index c2e295f..f926129 100644 --- a/getsp.java +++ b/getsp.java @@ -8,28 +8,53 @@ public class getsp { if (args[0].compareTo("-test")==0) { System.out.println("Test1234OK"); } - else if (args[0].compareTo("-libs")==0) { + else if (args[0].compareTo("-libs")==0) { String prefix="-L"; if (args.length>1) prefix=args[1]; - String lp=System.getProperty("java.library.path"); + // we're not using StringTokenizer in case the JVM is very crude int i=0,j,k=0; String r=null; String pss=System.getProperty("path.separator"); char ps=':'; if (pss!=null && pss.length()>0) ps=pss.charAt(0); + + // using java.library.path + String lp=System.getProperty("java.home"); j=lp.length(); 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); + } + i++; + } + + // using java.home + lp=System.getProperty("java.library.path"); + j=lp.length(); + i=0; + k=0; + while (i<=j) { + if (i==j || lp.charAt(i)==ps) { + String lib=lp.substring(k,i); k=i+1; if (lib.compareTo(".")!=0) r=(r==null)?(prefix+lib):(r+" "+prefix+lib); } i++; } + if (r!=null) System.out.println(r); - } else + } else if (args[0].compareTo("-ldpath")==0) { + String lp1=System.getProperty("java.home")+"/lib/amd64/server"; + String lp2=System.getProperty("java.library.path"); + System.out.println(lp1+":"+lp2); + } + else System.out.println(System.getProperty(args[0])); } } diff --git a/m4/java.m4 b/m4/java.m4 index 7f8e264..dc1e121 100644 --- a/m4/java.m4 +++ b/m4/java.m4 @@ -215,7 +215,7 @@ m4_define([_JAVA_CHECK_INTERNAL], *) RUN_JAVA(JAVA_LIBS, [-classpath ${srcdir} getsp -libs]) JAVA_LIBS="${JAVA_LIBS} -ljvm" - RUN_JAVA(JAVA_LD_PATH, [-classpath ${srcdir} getsp java.library.path]) + RUN_JAVA(JAVA_LD_PATH, [-classpath ${srcdir} getsp -ldpath]) ;; esac # note that we actually don't test JAVA_LIBS - we hope that the detection -- cgit v0.9.0.2 ++++++ libgda-javadetection-biarch.patch ++++++ Index: libgda-5.0.3/getsp.java =================================================================== --- libgda-5.0.3.orig/getsp.java +++ libgda-5.0.3/getsp.java @@ -25,7 +25,7 @@ public class getsp { while (i<=j) { if (i==j || lp.charAt(i)==ps) { String lib=lp.substring(k,i); - String suffix="/lib/amd64/server"; + String suffix="/lib/--ARCH--/server"; k=i+1; if (lib.compareTo(".")!=0) r=(r==null)?(prefix+lib+suffix):(r+" "+prefix+lib+suffix); @@ -50,7 +50,7 @@ public class getsp { if (r!=null) System.out.println(r); } else if (args[0].compareTo("-ldpath")==0) { - String lp1=System.getProperty("java.home")+"/lib/amd64/server"; + String lp1=System.getProperty("java.home")+"/lib/--ARCH--/server"; String lp2=System.getProperty("java.library.path"); System.out.println(lp1+":"+lp2); } -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org