From 886ed061d7c57eb9d707b2af2c87402b86becf70 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 6 Apr 2024 00:40:59 +0200 Subject: [PATCH] gnu: java-flatlaf: Link library with libjawt.so. * gnu/packages/java-graphics.scm (java-flatlaf)[arguments]: Add link options. Change-Id: I2306e7ea4c2ca9f0f20eeca107b09fa41304a8df --- gnu/packages/java-graphics.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gnu/packages/java-graphics.scm b/gnu/packages/java-graphics.scm index 1e551ae897..d62d082b1d 100644 --- a/gnu/packages/java-graphics.scm +++ b/gnu/packages/java-graphics.scm @@ -187,6 +187,24 @@ (define-public java-flatlaf ("aarch64-linux" "aarch64") ("x86_64-linux" "x86_64") (_ "generic"))) + (lib #$(match (%current-system) + ("i686-linux" + "/lib/i386") + ("x86_64-linux" + "/lib/amd64") + ("armhf-linux" + "/lib/arm") + ("aarch64-linux" + "/lib/aarch64") + ("powerpc-linux" + "/lib/ppc") + ;; We need a catch-all, dropping + ;; '-linux' works in most cases. + (_ + (string-append + "/lib/" + (string-drop-right + (%current-system) 6))))) (filename (string-append "libflatlaf-linux-" suffix ".so")) (target-dir @@ -197,6 +215,8 @@ (define-public java-flatlaf "src/main/cpp/ApiVersion.cpp" "src/main/cpp/X11WmUtils.cpp" "-Isrc/main/headers" + "-ljawt" + (string-append "-L" jdk lib) (string-append "-I" jdk "/include") (string-append "-I" jdk "/include/linux") "-o" filename)