GNU bug report logs - #68606
[PATCH 0/2] Update GDAL and build Java bindings.

Previous Next

Package: guix-patches;

Reported by: Roman Scherer <roman <at> burningswell.com>

Date: Sat, 20 Jan 2024 11:30:02 UTC

Severity: normal

Tags: patch

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Roman Scherer <roman <at> burningswell.com>
To: 68606 <at> debbugs.gnu.org
Cc: Roman Scherer <roman <at> burningswell.com>
Subject: [bug#68606] [PATCH v2 1/3] gnu: gdal: Update to 3.8.3.
Date: Sun, 21 Jan 2024 14:54:17 +0100
* gnu/packages/geo.scm (gdal): Update to 3.8.3.

Change-Id: Ib36177e1cb37e3852475cc0c1da3eb8747aac6d5
---
 gnu/packages/geo.scm | 36 ++++++++++++++++++++++++++++--------
 1 file changed, 28 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 14e2d9f16b..3c82f2f3af 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -1172,7 +1172,7 @@ (define-public spatialite-gui
 (define-public gdal
   (package
     (name "gdal")
-    (version "3.6.1")
+    (version "3.8.3")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -1180,7 +1180,7 @@ (define-public gdal
                      version ".tar.gz"))
               (sha256
                (base32
-                "1qckwnygszxkkq40bf87s3m1sab6jj9jyakdvskh0qf7dq8zjarf"))
+                "1sj9l1hjfs5d0mnv71iy8zk2xprn46h8gxq0cai9v7i3m23h78zp"))
               (modules '((guix build utils)))
               (snippet
                 `(begin
@@ -1193,14 +1193,33 @@ (define-public gdal
                        "frmts/jpeg/libjpeg12"
                        "frmts/gtiff/libtiff"
                        "frmts/gtiff/libgeotiff"
-                       "frmts/zlib"
                        "ogr/ogrsf_frmts/geojson/libjson"))))))
     (build-system cmake-build-system)
     (arguments
-     `(#:tests? #f
-       #:configure-flags
-       (list "-DGDAL_USE_INTERNAL_LIBS=WHEN_NO_EXTERNAL"
-             "-DGDAL_USE_JPEG12_INTERNAL=OFF")))
+     (list
+      #:tests? #f
+      #:configure-flags
+      #~(list "-DGDAL_USE_INTERNAL_LIBS=WHEN_NO_EXTERNAL"
+              "-DGDAL_USE_JPEG12_INTERNAL=OFF")
+      #:modules '((guix build cmake-build-system)
+                  (guix build utils)
+                  (ice-9 rdelim)
+                  (ice-9 popen))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'install 'fix-rpath
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let ((libdir (string-append (assoc-ref outputs "out") "/lib")))
+                (for-each
+                 (lambda (file)
+                   (let* ((pipe (open-pipe* OPEN_READ "patchelf"
+                                            "--print-rpath" file))
+                          (line (read-line pipe)))
+                     (and (zero? (close-pipe pipe))
+                          (invoke "patchelf" "--set-rpath"
+                                  (string-append libdir ":" line)
+                                  file))))
+                 (find-files libdir ".*\\.so$"))))))))
     (inputs
      (list curl
            expat
@@ -1227,7 +1246,8 @@ (define-public gdal
            zlib
            zstd))
     (native-inputs
-     (list pkg-config
+     (list patchelf
+           pkg-config
            python))
     (propagated-inputs
      (list python-numpy))
-- 
2.41.0





This bug report was last modified 114 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.