From 951de94124539904d9aa498d89ae8f0daf8aa508 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 14 Nov 2023 12:36:15 +0100 Subject: gjl: obtain library directory via LIBDIR Newer versions of java-config-2.eclass will record LIBDIR in package.env, which we obtain in gjl and use to set java.library.path when invoking the Java VM. Bug: https://bugs.gentoo.org/917326 Signed-off-by: Florian Schmaus --- src/gjl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gjl b/src/gjl index 1639ef2..1baa899 100755 --- a/src/gjl +++ b/src/gjl @@ -47,7 +47,15 @@ def get_args(pkg): envlp = os.getenv('LD_LIBRARY_PATH') envjlp = os.getenv('JAVA_LIBRARY_PATH') - newlibrary = manager.eprefix + '/lib:'+ manager.eprefix + '/usr/lib' + libdir = pkg.query('LIBDIR') + if libdir: + newlibrary = manager.eprefix + '/' + libdir + else: + # Old, obsolete fallback path for packages that where + # installed before java-utils-2.eclass recorded LIBDIR. + # Bug #917326. + newlibrary = manager.eprefix + '/lib:'+ manager.eprefix + '/usr/lib' + if library: newlibrary = ':'.join((library, newlibrary)) if envjlp: -- cgit v1.2.3-65-gdbad