1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
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@debian.org>
Last-Update: 2015-06-05
Forwarded: not-needed
--- a/src/main/java/net/rubygrapefruit/platform/internal/Platform.java
+++ b/src/main/java/net/rubygrapefruit/platform/internal/Platform.java
@@ -37,11 +37,7 @@
platform = new Window64Bit();
}
} else if (osName.contains("linux")) {
- if (arch.equals("amd64") || arch.equals("x86_64")) {
- 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();
@@ -225,7 +221,7 @@
}
}
- 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) {
return super.get(type, nativeLibraryLoader);
@@ -235,6 +231,11 @@
public boolean isLinux() {
return true;
}
+
+ @Override
+ public String getId() {
+ return "linux";
+ }
}
private static class Linux32Bit extends Linux {
|