From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:34007) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmDCO-00069w-8O for guix-patches@gnu.org; Sat, 13 Jul 2019 04:16:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmDCN-00078O-1g for guix-patches@gnu.org; Sat, 13 Jul 2019 04:16:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60828) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hmDCM-00077u-PD for guix-patches@gnu.org; Sat, 13 Jul 2019 04:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hmDCM-0005Jb-HO for guix-patches@gnu.org; Sat, 13 Jul 2019 04:16:02 -0400 Subject: [bug#36623] [PATCH] gnu: gdal: add python support Resent-Message-ID: Date: Sat, 13 Jul 2019 10:15:22 +0200 In-Reply-To: <20190712213247.23250-1-arne_bab@web.de> References: <20190712213247.23250-1-arne_bab@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Julien Lepiller Message-ID: <5E0BF317-99AC-43D9-9E30-1528A1A61DAA@lepiller.eu> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: arne_bab@web.deArne Babenhauserheide , 36623@debbugs.gnu.org Le 12 juillet 2019 23:32:47 GMT+02:00, Arne Babenhauserheide a =C3=A9crit : >* gnu/packages/geo=2Escm (gdal): add python support >--- > gnu/packages/geo=2Escm | 29 +++++++++++++++++++++++++++-- > 1 file changed, 27 insertions(+), 2 deletions(-) > >diff --git a/gnu/packages/geo=2Escm b/gnu/packages/geo=2Escm >index 4cccd97643=2E=2E3e2ec04b53 100644 >--- a/gnu/packages/geo=2Escm >+++ b/gnu/packages/geo=2Escm >@@ -537,6 +537,8 @@ development=2E") > (build-system gnu-build-system) > (arguments > `(#:tests? #f >+ ;; validating runpath does not work yet for Python, so skip >this phase=2E >+ #:validate-runpath? #f > #:configure-flags > (let-syntax ((with (syntax-rules () > ((_ option input) >@@ -544,6 +546,10 @@ development=2E") > (assoc-ref %build-inputs input)))))) > (list > ;; TODO: --with-pcidsk, --with-pcraster >+ ;; Add $libdir to the RUNPATH of all the executables=2E >+ (string-append "LDFLAGS=3D-Wl,-rpath=3D" %output "/apps/=2Eli= bs") >+ (string-append "LD_RUN_PATH=3D" %output "/apps/=2Elibs") >+ (string-append "LD_LIBRARY_PATH=3D" %output "/apps/=2Elibs") > (with "--with-freexl" "freexl") > (with "--with-libjson-c" "json-c") > (with "--with-png" "libpng") >@@ -553,13 +559,27 @@ development=2E") > (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=2Ecpp" >- (("\"=2E=2E/zlib/zlib=2Eh\"") ""))))))) >+ (("\"=2E=2E/zlib/zlib=2Eh\"") "")))) >+ (add-after >+ 'unpack 'patch-test-shebangs >+ (lambda _ >+ (substitute* '("apps/GNUmakefile") >+ (("/bin/sh") (which "sh"))) >+ #t)) >+ (add-after >+ 'unpack 'patch-test-shebangs >+ (lambda _ >+ (substitute* '("GDALmake=2Eopt=2Ein") >+ (("LDFLAGS =3D @LDFLAGS@") (string-append "LDFLAGS = =20 >=3D @LDFLAGS@ -Wl,-rpath=3D" %output "/apps -Wl,-rpath=3D" %output >"/apps/=2Elibs"))) >+ #t) >+ )))) Could you rename that phase to something like 'patch-rpath? Is it needed s= ince you already pass it to the configure? > (inputs > `(("freexl" ,freexl) > ("geos" ,geos) >@@ -572,6 +592,11 @@ development=2E") > ("libwebp" ,libwebp) > ("pcre" ,pcre) > ("zlib" ,zlib))) >+ (native-inputs >+ `(("pkg-config" ,pkg-config))) >+ (propagated-inputs >+ `(("python" ,python) >+ ("python-setuptools" ,python-setuptools))) Is setuptools really necessary at runtime? Can we patch gdal so to embed p= ython's store path? I'd prefer not to propagate it=2E > (home-page "http://www=2Egdal=2Eorg/") > (synopsis "Raster and vector geospatial data format library") >(description "GDAL is a translator library for raster and vector >geospatial >-- >2=2E22=2E0 Thank you!