diff mbox series

[bug#68606,2/2] gnu: gdal: Build Java bindings.

Message ID c9fffde5552831398ceb0732d4fa80b49d904860.1705747715.git.roman@burningswell.com
State New
Headers show
Series Update GDAL and build Java bindings. | expand

Commit Message

Roman Scherer Jan. 20, 2024, 11:30 a.m. UTC
* gnu/packages/geo.scm (gdal): Build Java bindings.

Change-Id: I6c6a6d4b5f7c6692d443d8ebf288dfe6c4ccad87
---
 gnu/packages/geo.scm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 3c82f2f3af..d2d78197c3 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -1207,6 +1207,10 @@  (define-public gdal
                   (ice-9 popen))
       #:phases
       #~(modify-phases %standard-phases
+          (add-after 'unpack 'set-JAVA_HOME
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((jdk (assoc-ref inputs "jdk")))
+                (setenv "JAVA_HOME" jdk))))
           (add-after 'install 'fix-rpath
             (lambda* (#:key outputs #:allow-other-keys)
               (let ((libdir (string-append (assoc-ref outputs "out") "/lib")))
@@ -1246,9 +1250,11 @@  (define-public gdal
            zlib
            zstd))
     (native-inputs
-     (list patchelf
-           pkg-config
-           python))
+     `(("ant" ,ant)
+       ("jdk" ,openjdk11 "jdk")
+       ("patchelf" ,patchelf)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python)))
     (propagated-inputs
      (list python-numpy))
     (home-page "https://gdal.org/")