File: search-usr-lib-jni.diff

package info (click to toggle)
swt4-gtk 4.29.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 44,648 kB
  • sloc: java: 379,132; ansic: 60,879; cpp: 4,327; xml: 2,407; sh: 659; makefile: 61; python: 59
file content (19 lines) | stat: -rw-r--r-- 956 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
From 67941dbb88d763bfbd62825d893c4ed676800ec3 Mon Sep 17 00:00:00 2001
From: Jakub Adam <jakub.adam@ktknet.cz>
Date: Sun, 29 Apr 2012 16:46:01 +0200
Subject: [PATCH] Search for JNI libraries in Debian location /usr/lib/jni

This allows Sun/Oracle JRE to find the libraries.
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java	
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/common/org/eclipse/swt/internal/Library.java	
@@ -309,6 +309,10 @@
 		if ((i == 0 || mapName) && load (libNames[i], message)) return;
 	}
 
+	/* Try the Debian location /usr/lib/jni/ */
+	if (load ("/usr/lib/jni" + SEPARATOR + mappedNames[1], message)) return;
+	if (mapName && load ("/usr/lib/jni" + SEPARATOR + mappedNames[2], message)) return;
+
 	/* Try loading library from the tmp directory if swt library path is not specified.
 	 * Create the tmp folder if it doesn't exist. Tmp folder looks like this:
 	 * ~/.swt/lib/<platform>/<arch>/