[libjna-java] 02/02: Refresh the patches

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Oct 15 14:02:11 BST 2014


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository libjna-java.

commit 9d7ec3449d83d7cc760635beeeb6d93e20622faa
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Wed Oct 15 15:01:30 2014 +0200

    Refresh the patches
---
 debian/changelog                                   |   6 +-
 debian/patches/02-builddir.patch                   |   2 +-
 debian/patches/03-dynlink-and-cflags.patch         |  10 +-
 debian/patches/04-load-native-code-from-fs.patch   |   2 +-
 debian/patches/05-support-gnu-kfreebsd.patch       |   4 +-
 .../06-remove-gjdoc-inexistent-options.patch       |   2 +-
 debian/patches/08-multiarch-support.patch          | 119 ---------------------
 debian/patches/09-javadoc.patch                    |   2 +-
 debian/patches/10-disable-full-jar.patch           |  34 ++++++
 debian/patches/series                              |   2 +-
 10 files changed, 50 insertions(+), 133 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index d7e0ace..0a43ebb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-libjna-java (3.4.2-1) UNRELEASED; urgency=low
+libjna-java (3.5.0-1) UNRELEASED; urgency=low
 
   [ Andrew Ross ]
   * New upstream release (Closes: #733488)
-  * Refresh patches.
+  * Refresh patches (up to version 3.4.1)
   * Link javadoc to default-jdk API
   * Remove Michael Koch <konqueror at gmx.de> from uploaders
     (Closes: #654084).
@@ -10,6 +10,8 @@ libjna-java (3.4.2-1) UNRELEASED; urgency=low
   * Update d/watch for new upstream location
 
   [ Emmanuel Bourg ]
+  * Refreshed the patches (up to version 3.5.0)
+  * Removed 08-multiarch-support.patch (merged upstream since jna 3.5.0)
   * Moved libjnidispatch.so into its own new arch any libjna-jni package
   * Install libjnidispatch.so in a multiarch path
   * Install the Maven artifacts for the platform jar (Closes: #743732)
diff --git a/debian/patches/02-builddir.patch b/debian/patches/02-builddir.patch
index f4cd481..8d71cd9 100644
--- a/debian/patches/02-builddir.patch
+++ b/debian/patches/02-builddir.patch
@@ -3,7 +3,7 @@ Description: no special build dir for d64
 
 --- a/build.xml
 +++ b/build.xml
-@@ -140,7 +140,7 @@
+@@ -158,7 +158,7 @@
          <equals arg1="${vm.arch}" arg2="-d64"/>
        </and>
      </condition>
diff --git a/debian/patches/03-dynlink-and-cflags.patch b/debian/patches/03-dynlink-and-cflags.patch
index 24cbd1f..206d285 100644
--- a/debian/patches/03-dynlink-and-cflags.patch
+++ b/debian/patches/03-dynlink-and-cflags.patch
@@ -3,7 +3,7 @@ Description: dynlink and cflags
 
 --- a/build.xml
 +++ b/build.xml
-@@ -489,6 +489,19 @@
+@@ -665,6 +665,19 @@
        <arg value="JNA_JNI_VERSION=${jni.version}"/>
        <arg value="CHECKSUM=${jni.md5}"/>
      </exec>
@@ -19,11 +19,11 @@ Description: dynlink and cflags
 +    </jar>
 +  </target>
 +
-+  <target name="native-mixedjar" unless="nomixedjar.native">    
-     <mkdir dir="${classes}/com/sun/jna/${os.prefix}"/>
-     <copy todir="${classes}/com/sun/jna/${os.prefix}">
++  <target name="native-mixedjar" unless="nomixedjar.native">
+     <mkdir dir="${classes}/${native.path}"/>
+     <copy todir="${classes}/${native.path}">
        <fileset dir="${build.native}"
-@@ -500,15 +513,6 @@
+@@ -676,15 +689,6 @@
        <fileset dir="${build.native}"
                 includes="jnidispatch.dll,libjnidispatch.*"/>
      </copy>
diff --git a/debian/patches/04-load-native-code-from-fs.patch b/debian/patches/04-load-native-code-from-fs.patch
index b34429c..7722330 100644
--- a/debian/patches/04-load-native-code-from-fs.patch
+++ b/debian/patches/04-load-native-code-from-fs.patch
@@ -3,7 +3,7 @@ Subject: try to load native library from /usr/lib/jni if system
 Author: Jan Dittberner <jandd at debian.org>
 --- a/src/com/sun/jna/Native.java
 +++ b/src/com/sun/jna/Native.java
-@@ -642,6 +642,9 @@
+@@ -649,6 +649,9 @@
  
          String libName = System.getProperty("jna.boot.library.name", "jnidispatch");
          String bootPath = System.getProperty("jna.boot.library.path");
diff --git a/debian/patches/05-support-gnu-kfreebsd.patch b/debian/patches/05-support-gnu-kfreebsd.patch
index aa47326..d217938 100644
--- a/debian/patches/05-support-gnu-kfreebsd.patch
+++ b/debian/patches/05-support-gnu-kfreebsd.patch
@@ -3,7 +3,7 @@ Subject: patch build.xml and native/Makefile to support Debian GNU/kFreeBSD
 
 --- a/native/Makefile
 +++ b/native/Makefile
-@@ -32,6 +32,7 @@
+@@ -39,6 +39,7 @@
  OS=$(shell uname | sed -e 's/CYGWIN.*/win32/g' \
  	                -e 's/MINGW32.*/win32/g' \
                          -e 's/SunOS.*/solaris/g' \
@@ -13,7 +13,7 @@ Subject: patch build.xml and native/Makefile to support Debian GNU/kFreeBSD
                          -e 's/OpenBSD/openbsd/g' \
 --- a/build.xml
 +++ b/build.xml
-@@ -173,6 +173,9 @@
+@@ -191,6 +191,9 @@
      <condition property="os.prefix" value="freebsd-${os.arch}">
        <os name="FreeBSD"/>
      </condition>
diff --git a/debian/patches/06-remove-gjdoc-inexistent-options.patch b/debian/patches/06-remove-gjdoc-inexistent-options.patch
index ce2beeb..b921ea0 100644
--- a/debian/patches/06-remove-gjdoc-inexistent-options.patch
+++ b/debian/patches/06-remove-gjdoc-inexistent-options.patch
@@ -3,7 +3,7 @@ Subject: disable javadoc options that are not supported by gjdoc
 
 --- a/build.xml
 +++ b/build.xml
-@@ -712,7 +712,7 @@
+@@ -900,7 +900,7 @@
        <group title="Platform Utilities" packages="com.sun.jna.platform,com.sun.jna.platform.dnd"/>
        <group title="Platform Specific" packages="com.sun.jna.platform.*"/>
  
diff --git a/debian/patches/08-multiarch-support.patch b/debian/patches/08-multiarch-support.patch
deleted file mode 100644
index 0628cce..0000000
--- a/debian/patches/08-multiarch-support.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-Support all Debian multi-arch directories in library lookups.
-
---- a/build.xml
-+++ b/build.xml
-@@ -214,6 +214,8 @@
-     <echo>java.home=${java.home}</echo>
-     <echo>java.library.path=${java.library.path}</echo>
-     <echo>os.prefix=${os.prefix}</echo>
-+    <echo>os.name=${os.name}</echo>
-+    <echo>os.arch=${os.arch}</echo>
- 
-   </target>
- 
---- a/src/com/sun/jna/Platform.java
-+++ b/src/com/sun/jna/Platform.java
-@@ -20,6 +20,8 @@
-     public static final int OPENBSD = 5;
-     public static final int WINDOWSCE = 6;
-     public static final int AIX = 7;
-+    public static final int GNU = 8;
-+    public static final int KFREEBSD = 9;
- 
-     /** Whether read-only (final) fields within Structures are supported. */
-     public static final boolean RO_FIELDS;
-@@ -60,6 +62,12 @@
-         else if (osName.startsWith("OpenBSD")) {
-             osType = OPENBSD;
-         }
-+        else if (osName.equalsIgnoreCase("gnu")) {
-+            osType = GNU;
-+        }
-+        else if (osName.equalsIgnoreCase("gnu/kfreebsd")) {
-+            osType = KFREEBSD;
-+        }
-         else {
-             osType = UNSPECIFIED;
-         }
-@@ -112,6 +120,11 @@
-     public static final boolean isOpenBSD() {
-         return osType == OPENBSD;
-     }
-+    public static final boolean isGNU() {
-+        return osType == GNU;
-+    }    public static final boolean iskFreeBSD() {
-+        return osType == KFREEBSD;
-+    }
-     public static final boolean isX11() {
-         // TODO: check filesystem for /usr/X11 or some other X11-specific test
-         return !Platform.isWindows() && !Platform.isMac();
-@@ -173,4 +186,19 @@
-             return false;
-         }
-     }
-+
-+    public static final String getBaseArch() {
-+        String arch =
-+            System.getProperty("os.arch").toLowerCase().trim();
-+        if("amd64".equals(arch))
-+            arch = "x86_64";
-+        if("i686-at386".equals(arch))
-+            arch = "i386";
-+        if("ppc".equals(arch))
-+            arch = "powerpc";
-+        if("ppc64".equals(arch))
-+            arch = "powerpc64";
-+        return arch;
-+    }
-+
- }
---- a/src/com/sun/jna/NativeLibrary.java
-+++ b/src/com/sun/jna/NativeLibrary.java
-@@ -645,7 +645,8 @@
-             // on 64bit machines, so we have to explicitly search the 64bit
-             // one when running a 64bit JVM.
-             //
--            if (Platform.isLinux() || Platform.isSolaris() || Platform.isFreeBSD()) {
-+            if (Platform.isLinux() || Platform.isSolaris() || Platform.isFreeBSD()
-+                || Platform.iskFreeBSD()) {
-                 // Linux & FreeBSD use /usr/lib32, solaris uses /usr/lib/32
-                 archPath = (Platform.isSolaris() ? "/" : "") + Pointer.SIZE * 8;
-             }
-@@ -660,23 +661,27 @@
-             // paths is scanned against real directory
-             // so for platforms which are not multi-arch
-             // this should continue to work.
--            if (Platform.isLinux()) {
-+            if (Platform.isLinux() || Platform.iskFreeBSD() || Platform.isGNU()) {
-                 // Defaults - overridden below
--                String cpu = "";
-+                String cpu = Platform.getBaseArch();
-                 String kernel = "linux";
-                 String libc = "gnu";
- 
--                if (Platform.isIntel()) {
--                    cpu = (Platform.is64Bit() ? "x86_64" : "i386");
--                } else if (Platform.isPPC()) {
--                    cpu = (Platform.is64Bit() ? "powerpc64" : "powerpc");
--                } else if (Platform.isARM()) {
--                    cpu = "arm";
-+                if (Platform.isARM()) {
-                     libc = "gnueabi";
-                 }
- 
--                String multiArchPath =
--                    cpu + "-" + kernel + "-" + libc;
-+                if (Platform.iskFreeBSD()) {
-+                    kernel = "kfreebsd";
-+                }
-+
-+                String multiArchPath;
-+
-+                if (Platform.isGNU()) {
-+                    multiArchPath = cpu + "-" + libc;
-+                } else {
-+                    multiArchPath = cpu + "-" + kernel + "-" + libc;
-+                }
- 
-                 // Assemble path with all possible options
-                 paths = new String[] {
diff --git a/debian/patches/09-javadoc.patch b/debian/patches/09-javadoc.patch
index 030186d..4a55247 100644
--- a/debian/patches/09-javadoc.patch
+++ b/debian/patches/09-javadoc.patch
@@ -2,7 +2,7 @@ Link javadoc to the default-jdk javadoc.
 
 --- a/build.xml
 +++ b/build.xml
-@@ -697,7 +697,7 @@
+@@ -883,7 +883,7 @@
        <doctitle>JNA API Documentation</doctitle>
        <header>${header}</header>
        <bottom>${footer}</bottom>
diff --git a/debian/patches/10-disable-full-jar.patch b/debian/patches/10-disable-full-jar.patch
new file mode 100644
index 0000000..7943c5e
--- /dev/null
+++ b/debian/patches/10-disable-full-jar.patch
@@ -0,0 +1,34 @@
+Description: Do not include the native libraries in the main jar
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/build.xml
++++ b/build.xml
+@@ -315,6 +315,7 @@
+         <!-- Note that no terminal "*" is included in this list,
+              which will force failure on unsupported platforms.
+           -->
++<!--
+         <attribute name="Bundle-NativeCode"
+                    value="
+ com/sun/jna/win32-x86/jnidispatch.dll;
+@@ -361,10 +362,12 @@
+ com/sun/jna/darwin/libjnidispatch.jnilib;
+ osname=macos
+ "/>
++-->
+       </manifest>
+       <fileset dir="${classes}" excludes="${jar.omitted}">
+         <patternset refid="jar-compiled"/>
+       </fileset>
++<!--
+       <zipfileset src="${lib.native}/win32-x86.jar"
+                   includes="*jnidispatch*"
+                   prefix="com/sun/jna/win32-x86"/>
+@@ -422,6 +425,7 @@
+       <zipfileset src="${lib.native}/w32ce-arm.jar"
+                   includes="*jnidispatch*"
+                   prefix="com/sun/jna/w32ce-arm"/>
++-->
+     </jar>
+     <zip zipfile="${build}/${minjar}">
+       <zipfileset src="${build}/${jar}" excludes="**/*jnidispatch*"/>
diff --git a/debian/patches/series b/debian/patches/series
index b7299b0..4d77cc5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,5 +4,5 @@
 04-load-native-code-from-fs.patch
 05-support-gnu-kfreebsd.patch
 06-remove-gjdoc-inexistent-options.patch
-08-multiarch-support.patch
 09-javadoc.patch
+10-disable-full-jar.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libjna-java.git



More information about the pkg-java-commits mailing list