[arch-commits] Commit in gdal/trunk (PKGBUILD gdal-perl-vendor.patch)

Evangelos Foutras foutrelis at archlinux.org
Fri Sep 1 22:25:22 UTC 2017


    Date: Friday, September 1, 2017 @ 22:25:21
  Author: foutrelis
Revision: 255260

upgpkg: gdal 2.2.1-4

Fix Perl bindings installation path (FS#55306).

Added:
  gdal/trunk/gdal-perl-vendor.patch
Modified:
  gdal/trunk/PKGBUILD

------------------------+
 PKGBUILD               |   25 ++++++++++++++++---------
 gdal-perl-vendor.patch |   28 ++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-09-01 20:24:23 UTC (rev 255259)
+++ PKGBUILD	2017-09-01 22:25:21 UTC (rev 255260)
@@ -5,7 +5,7 @@
 
 pkgname=gdal
 pkgver=2.2.1
-pkgrel=3
+pkgrel=4
 pkgdesc="A translator library for raster geospatial data formats"
 arch=('i686' 'x86_64')
 url="http://www.gdal.org/"
@@ -18,8 +18,10 @@
             'perl:  perl binding support')
 options=('!emptydirs')
 changelog=$pkgname.changelog
-source=(http://download.osgeo.org/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.xz)
-sha256sums=('927098d54083ac919a497f787b835b099e9a194f2e5444dbff901f7426b86066')
+source=(http://download.osgeo.org/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.xz
+        gdal-perl-vendor.patch)
+sha256sums=('927098d54083ac919a497f787b835b099e9a194f2e5444dbff901f7426b86066'
+            '20989e5fa499206b42c92280ce084fdf7b2f661a4233fc349611cc57102fe114')
 
 prepare() {
   cd "${srcdir}"/$pkgname-$pkgver
@@ -32,6 +34,9 @@
 
 # Fix mandir
   sed -i "s|^mandir=.*|mandir='\${prefix}/share/man'|" configure
+
+# Fix Perl bindings installation path
+  patch -Np1 -i ../gdal-perl-vendor.patch
 }
 
 build() {
@@ -39,7 +44,7 @@
   export CFLAGS="$CFLAGS -fno-strict-aliasing"
 
 # bug #23654
-  export LDFLAGS="$LDFLAGS -Wl,--as-needed" 
+  export LDFLAGS="$LDFLAGS -Wl,--as-needed"
 
   ./configure --prefix=/usr --with-netcdf --with-libtiff --with-sqlite3 --with-geotiff \
               --with-mysql --with-python --with-curl --with-hdf5 --with-perl --with-geos \
@@ -55,6 +60,7 @@
 
 package () {
   cd "${srcdir}"/$pkgname-$pkgver
+
   make DESTDIR="${pkgdir}" install
   make DESTDIR="${pkgdir}" install-man
 
@@ -65,9 +71,10 @@
   rm -f "${pkgdir}"/usr/share/man/man1/_build_gdal_src_gdal-${pkgver}_apps_.1
 
 # Remove RPATH
-  chrpath --delete "${pkgdir}"/usr/lib/perl5/${CARCH}-linux-thread-multi/auto/Geo/OSR/OSR.so
-  chrpath --delete "${pkgdir}"/usr/lib/perl5/${CARCH}-linux-thread-multi/auto/Geo/OGR/OGR.so
-  chrpath --delete "${pkgdir}"/usr/lib/perl5/${CARCH}-linux-thread-multi/auto/Geo/GDAL/GDAL.so
-  chrpath --delete "${pkgdir}"/usr/lib/perl5/${CARCH}-linux-thread-multi/auto/Geo/GDAL/Const/Const.so
-  chrpath --delete "${pkgdir}"/usr/lib/perl5/${CARCH}-linux-thread-multi/auto/Geo/GNM/GNM.so
+  eval local $(perl -V:vendorarch)
+  chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/OSR/OSR.so
+  chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/OGR/OGR.so
+  chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/GDAL/GDAL.so
+  chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/GDAL/Const/Const.so
+  chrpath --delete "${pkgdir}"${vendorarch}/auto/Geo/GNM/GNM.so
 }

Added: gdal-perl-vendor.patch
===================================================================
--- gdal-perl-vendor.patch	                        (rev 0)
+++ gdal-perl-vendor.patch	2017-09-01 22:25:21 UTC (rev 255260)
@@ -0,0 +1,28 @@
+Description: pass INSTALLDIRS=vendor to Makefile.PL to get stuff into the right place
+Origin: vendor
+Forwarded: not-needed
+Author: gregor herrmann <gregoa at debian.org>
+Last-Update: 2014-07-08
+
+--- a/swig/perl/Makefile
++++ b/swig/perl/Makefile
+@@ -7,7 +7,7 @@ build: Makefile_Geo__GDAL
+ 	$(MAKE) -f Makefile_Geo__OSR
+ 
+ Makefile_Geo__GDAL:
+-	perl Makefile.PL INSTALL_BASE=$(INST_PREFIX)
++	perl Makefile.PL INSTALLDIRS=vendor
+ 
+ test: build
+ 	$(MAKE) -f Makefile_Geo__GDAL test
+--- a/swig/perl/GNUmakefile
++++ b/swig/perl/GNUmakefile
+@@ -30,7 +30,7 @@ build: gdal_wrap.cc Makefile_Geo__GDAL
+ gdal_wrap.cc: generate
+ 
+ Makefile_Geo__GDAL:
+-	perl Makefile.PL INSTALL_BASE=$(INST_PREFIX)
++	perl Makefile.PL INSTALLDIRS=vendor
+ 
+ test: build
+ 	$(MAKE) -f Makefile_Geo__GDAL test



More information about the arch-commits mailing list