[visualvm] 09/09: Patched to use the native libraries relocated in /usr/lib/jni

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Fri May 2 09:04:26 UTC 2014


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

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

commit aa4ab010b17f2e8c2fa5d3c8c047b08b819856f9
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Fri May 2 11:03:01 2014 +0200

    Patched to use the native libraries relocated in /usr/lib/jni
---
 debian/patches/02-relocate-native-libraries.patch | 65 +++++++++++++++++++++++
 debian/patches/series                             |  2 +-
 debian/patches/series.netbeans-profiler           |  1 +
 3 files changed, 67 insertions(+), 1 deletion(-)

diff --git a/debian/patches/02-relocate-native-libraries.patch b/debian/patches/02-relocate-native-libraries.patch
new file mode 100644
index 0000000..e9d707d
--- /dev/null
+++ b/debian/patches/02-relocate-native-libraries.patch
@@ -0,0 +1,65 @@
+--- a/netbeans/lib.profiler.common/src/org/netbeans/lib/profiler/common/integration/IntegrationUtils.java
++++ b/netbeans/lib.profiler.common/src/org/netbeans/lib/profiler/common/integration/IntegrationUtils.java
+@@ -310,7 +310,7 @@
+             return HTML_REMOTE_STRING + getDirectorySeparator(targetPlatform) + "lib"; //NOI18N
+         }
+ 
+-        return Profiler.getDefault().getLibsDir();
++        return "/usr/lib/jni"; //NOI18N
+     }
+ 
+     public static String getLineBreak(String targetPlatform) {
+@@ -385,9 +385,7 @@
+ 
+     // Returns getLibsDir()/deployed/jdk<15>/<OS> appropriate for current / selected OS
+     public static String getNativeLibrariesPath(String targetPlatform, String targetJVM, boolean isRemote) {
+-        return getLibsDir(targetPlatform, isRemote) + getDirectorySeparator(targetPlatform) + "deployed" //NOI18N
+-               + getDirectorySeparator(targetPlatform) + getJavaPlatformNativeLibrariesDirectoryName(targetJVM)
+-               + getDirectorySeparator(targetPlatform) + getOSPlatformNativeLibrariesDirectoryName(targetPlatform, isRemote);
++        return getLibsDir(targetPlatform, isRemote);
+     }
+ 
+     // Returns name of the environment variable for system path to Profiler native libraries appropriate for current / selected OS
+@@ -456,7 +454,7 @@
+         }
+ 
+         return "-agentpath:" + "\"" + getNativeLibrariesPath(targetPlatform, targetJVM, isRemote)
+-               + getDirectorySeparator(targetPlatform) + getProfilerAgentLibraryFile(targetPlatform) + "=" //NOI18N
++               + getDirectorySeparator(targetPlatform) + getProfilerAgentLibraryFile(targetPlatform, targetJVM) + "=" //NOI18N
+                + getLibsDir(targetPlatform, isRemote) + "\"" + "," + portNumber; //NOI18N
+     }
+ 
+@@ -491,7 +489,7 @@
+             args.append(" -XX:+UseLinuxPosixThreadCPUClocks "); // NOI18N
+         }
+         args.append("-agentpath:").append(getNativeLibrariesPath(targetPlatform, targetJVM, isRemote)). // NOI18N
+-               append(getDirectorySeparator(targetPlatform)).append(getProfilerAgentLibraryFile(targetPlatform)).append("="). //NOI18N
++               append(getDirectorySeparator(targetPlatform)).append(getProfilerAgentLibraryFile(targetPlatform, targetJVM)).append("="). //NOI18N
+                append(getLibsDir(targetPlatform, isRemote)).append(",").append(portNumber); //NOI18N
+         return args.toString();
+     }
+@@ -506,7 +504,7 @@
+         }
+         String natLibs = getNativeLibrariesPath(targetPlatform, targetJVM, isRemote).replace(" ", pathSpaceChar != null ? pathSpaceChar : " ");
+         String libsDir = getLibsDir(targetPlatform, isRemote).replace(" ", pathSpaceChar != null ? pathSpaceChar : " ");
+-        String agentFile = getProfilerAgentLibraryFile(targetPlatform).replace(" ", pathSpaceChar != null ? pathSpaceChar : " ");
++        String agentFile = getProfilerAgentLibraryFile(targetPlatform, targetJVM).replace(" ", pathSpaceChar != null ? pathSpaceChar : " ");
+         args.append("-agentpath:").append(natLibs). // NOI18N
+                append(getDirectorySeparator(targetPlatform)).append(agentFile).append("="). //NOI18N
+                append(libsDir).append(",").append(portNumber); //NOI18N
+@@ -514,13 +512,13 @@
+     }
+ 
+     // Returns filename of profiler agent library
+-    public static String getProfilerAgentLibraryFile(String targetPlatform) {
++    public static String getProfilerAgentLibraryFile(String targetPlatform, String javaPlatform) {
+         if (isWindowsPlatform(targetPlatform)) {
+             return "profilerinterface.dll"; //NOI18N
+         } else if (targetPlatform.equals(PLATFORM_MAC_OS)) {
+             return "libprofilerinterface.jnilib"; //NOI18N
+         } else {
+-            return "libprofilerinterface.so"; //NOI18N
++            return "libprofilerinterface-" + getJavaPlatformNativeLibrariesDirectoryName(javaPlatform) + ".so"; //NOI18N
+         }
+     }
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 8deda51..7ebfdb7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1 @@
-#01-inject-patches.patch
+01-inject-patches.patch
diff --git a/debian/patches/series.netbeans-profiler b/debian/patches/series.netbeans-profiler
index 7ebfdb7..cf41e96 100644
--- a/debian/patches/series.netbeans-profiler
+++ b/debian/patches/series.netbeans-profiler
@@ -1 +1,2 @@
 01-inject-patches.patch
+02-relocate-native-libraries.patch

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



More information about the pkg-java-commits mailing list