[libnative-platform-java] 03/08: Refresh patches

Kai-Chung Yan seamlik-guest at moszumanska.debian.org
Fri Jun 5 15:50:45 UTC 2015


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

seamlik-guest pushed a commit to branch master
in repository libnative-platform-java.

commit f22456b2d4d6671e42b3c76a15e0eb373335e0da
Author: Kai-Chung Yan <seamlikok at gmail.com>
Date:   Wed Jun 3 22:13:15 2015 +0800

    Refresh patches
---
 debian/changelog                                  |  6 ++
 debian/patches/libname.diff                       | 69 +++++++----------------
 debian/patches/native_locator_usr_lib_first.patch | 26 ++++-----
 3 files changed, 39 insertions(+), 62 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index dcd9a4c..fbd70f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libnative-platform-java (0.10-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Kai-Chung Yan <seamlikok at gmail.com>  Wed, 03 Jun 2015 22:12:06 +0800
+
 libnative-platform-java (0.3~rc2-3) unstable; urgency=medium
 
   * d/patches/native_locator_usr_lib_first.patch: Use java.library.path
diff --git a/debian/patches/libname.diff b/debian/patches/libname.diff
index 6cea2da..0c3e0dd 100644
--- a/debian/patches/libname.diff
+++ b/debian/patches/libname.diff
@@ -2,63 +2,34 @@ Description: Library name is always stable under Debian GNU/Linux
  when shared object is installed into /usr/lib/jni/
  So remove Linux32Bit / Linux64Bit handling.
 Author: Damien Raude-Morvan <drazzib at debian.org>
-Last-Update: 2014-01-19
+Last-Update: 2015-06-03
 Forwarded: not-needed
 --- a/src/main/java/net/rubygrapefruit/platform/internal/Platform.java
 +++ b/src/main/java/net/rubygrapefruit/platform/internal/Platform.java
-@@ -37,12 +37,7 @@
+@@ -37,12 +37,15 @@
                          platform = new Window64Bit();
                      }
                  } else if (osName.contains("linux")) {
--                    if (arch.equals("amd64")) {
--                        platform = new Linux64Bit();
--                    }
--                    else if (arch.equals("i386") || arch.equals("x86")) {
--                        platform = new Linux32Bit();
--                    }
-+                        platform = new Linux();
-                 } else if (osName.contains("os x")) {
-                     if (arch.equals("i386") || arch.equals("x86_64") || arch.equals("amd64")) {
-                         platform = new OsX();
-@@ -155,7 +150,7 @@
-     private abstract static class Unix extends Posix {
++                    /*
+                     if (arch.equals("amd64")) {
+                         platform = new Linux64Bit();
+                     }
+                     else if (arch.equals("i386") || arch.equals("x86")) {
+                         platform = new Linux32Bit();
+                     }
++                    */
++                    platform = new Linux();
+                 } else if (osName.contains("os x") || osName.contains("darwin")) {
+                     if (arch.equals("i386")) {
+                         platform = new OsX32Bit();
+@@ -187,6 +190,10 @@
+         }
      }
  
--    private abstract static class Linux extends Unix {
 +    private static class Linux extends Unix {
-         @Override
-         public <T extends NativeIntegration> T get(Class<T> type, NativeLibraryLoader nativeLibraryLoader) {
-             if (type.equals(FileSystems.class)) {
-@@ -163,29 +158,15 @@
-             }
-             return super.get(type, nativeLibraryLoader);
-         }
--    }
--
--    private static class Linux32Bit extends Linux {
--        @Override
--        public String getLibraryName() {
--            return "libnative-platform-linux-i386.so";
--        }
--
--        @Override
--        String getCursesLibraryName() {
--            return "libnative-platform-curses-linux-i386.so";
--        }
--    }
--
--    private static class Linux64Bit extends Linux {
 +        
++    }
++
+     private static class Linux32Bit extends Unix {
          @Override
-         public String getLibraryName() {
--            return "libnative-platform-linux-amd64.so";
-+            return "libnative-platform.so";
-         }
- 
-         @Override
-         String getCursesLibraryName() {
--            return "libnative-platform-curses-linux-amd64.so";
-+            return "libnative-platform-curses.so";
-         }
-     }
- 
+         public String getId() {
diff --git a/debian/patches/native_locator_usr_lib_first.patch b/debian/patches/native_locator_usr_lib_first.patch
index 8200ba6..5ce137a 100644
--- a/debian/patches/native_locator_usr_lib_first.patch
+++ b/debian/patches/native_locator_usr_lib_first.patch
@@ -9,18 +9,18 @@ Forwarded: no
 @@ -31,6 +31,17 @@
      }
  
-     public File find(String libraryFileName) throws IOException {
-+	// Try to load from [java.library.path]/libnative-platform.so first
-+	// before extractDir or classpath
-+	String[] libPaths = System.getProperty("java.library.path").split(java.io.File.pathSeparator);
-+	for (String libPath : libPaths) {
-+	  // For each JNI path, try to load lib
-+	  File libFile = new File(libPath, libraryFileName);
-+	  if (libFile.isFile()) {
-+	      return libFile;
-+	  }
-+	}
+     public File find(LibraryDef libraryDef) throws IOException {
++        // Try to load from [java.library.path]/libnative-platform.so first
++        // before extractDir or classpath
++        String[] libPaths = System.getProperty("java.library.path").split(java.io.File.pathSeparator);
++        	for (String libPath : libPaths) {
++        	  // For each JNI path, try to load lib
++        	  File libFile = new File(libPath, libraryFileName);
++        	  if (libFile.isFile()) {
++        	      return libFile;
++        	  }
++    	}
 +
+         String resourceName = String.format("net/rubygrapefruit/platform/%s/%s", libraryDef.platform, libraryDef.name);
          if (extractDir != null) {
-             File libFile = new File(extractDir, String.format("%s/%s", NativeLibraryFunctions.VERSION, libraryFileName));
-             File lockFile = new File(libFile.getParentFile(), libFile.getName() + ".lock");
+             File libFile = new File(extractDir, String.format("%s/%s/%s", NativeLibraryFunctions.VERSION, libraryDef.platform, libraryDef.name));

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



More information about the pkg-java-commits mailing list