From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:50415) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hm3B5-0000VC-EQ for guix-patches@gnu.org; Fri, 12 Jul 2019 17:34:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hm3B4-0006Ky-8g for guix-patches@gnu.org; Fri, 12 Jul 2019 17:34:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60233) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hm3B4-0006Ku-5O for guix-patches@gnu.org; Fri, 12 Jul 2019 17:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hm3B4-000648-1F for guix-patches@gnu.org; Fri, 12 Jul 2019 17:34:02 -0400 Subject: [bug#36623] [PATCH] gnu: gdal: add python support Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:50248) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hm3AI-0000Md-Gn for guix-patches@gnu.org; Fri, 12 Jul 2019 17:33:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hm3AH-0005Rt-6E for guix-patches@gnu.org; Fri, 12 Jul 2019 17:33:14 -0400 Received: from mout.web.de ([212.227.15.14]:36571) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hm3AG-0005Q0-Si for guix-patches@gnu.org; Fri, 12 Jul 2019 17:33:13 -0400 From: Arne Babenhauserheide Date: Fri, 12 Jul 2019 23:32:47 +0200 Message-Id: <20190712213247.23250-1-arne_bab@web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: arne_bab@web.de Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 36623@debbugs.gnu.org Cc: Arne Babenhauserheide * gnu/packages/geo.scm (gdal): add python support =2D-- gnu/packages/geo.scm | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index 4cccd97643..3e2ec04b53 100644 =2D-- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -537,6 +537,8 @@ development.") (build-system gnu-build-system) (arguments `(#:tests? #f + ;; validating runpath does not work yet for Python, so skip this p= hase. + #:validate-runpath? #f #:configure-flags (let-syntax ((with (syntax-rules () ((_ option input) @@ -544,6 +546,10 @@ development.") (assoc-ref %build-inputs inpu= t)))))) (list ;; TODO: --with-pcidsk, --with-pcraster + ;; Add $libdir to the RUNPATH of all the executables. + (string-append "LDFLAGS=3D-Wl,-rpath=3D" %output "/apps/.libs"= ) + (string-append "LD_RUN_PATH=3D" %output "/apps/.libs") + (string-append "LD_LIBRARY_PATH=3D" %output "/apps/.libs") (with "--with-freexl" "freexl") (with "--with-libjson-c" "json-c") (with "--with-png" "libpng") @@ -553,13 +559,27 @@ development.") (with "--with-libtiff" "libtiff") (with "--with-geotiff" "libgeotiff") (with "--with-libz" "zlib") - "--with-pcre")) + "--with-pcre" + "--with-python")) #:phases (modify-phases %standard-phases (add-before 'build 'fix-path (lambda _ (substitute* "frmts/mrf/mrf_band.cpp" - (("\"../zlib/zlib.h\"") ""))))))) + (("\"../zlib/zlib.h\"") "")))) + (add-after + 'unpack 'patch-test-shebangs + (lambda _ + (substitute* '("apps/GNUmakefile") + (("/bin/sh") (which "sh"))) + #t)) + (add-after + 'unpack 'patch-test-shebangs + (lambda _ + (substitute* '("GDALmake.opt.in") + (("LDFLAGS =3D @LDFLAGS@") (string-append "LDFLAGS = =3D @LDFLAGS@ -Wl,-rpath=3D" %output "/apps -Wl,-rpath=3D" %output "/apps= /.libs"))) + #t) + )))) (inputs `(("freexl" ,freexl) ("geos" ,geos) @@ -572,6 +592,11 @@ development.") ("libwebp" ,libwebp) ("pcre" ,pcre) ("zlib" ,zlib))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (propagated-inputs + `(("python" ,python) + ("python-setuptools" ,python-setuptools))) (home-page "http://www.gdal.org/") (synopsis "Raster and vector geospatial data format library") (description "GDAL is a translator library for raster and vector geos= patial =2D- 2.22.0