COntrol: tag -1 + patch On Mon, 23 Jun 2014 23:46:17 +0300, Niko Tyni wrote:
> This package fails to build with perl_5.20.0-1 from experimental:
>
> # moves perl stuff the right dirs
> install -o root -g root -d
> /«BUILDDIR»/gdal-1.10.1+dfsg/debian/tmp/usr/lib/perl5/auto
> mv
> /«BUILDDIR»/gdal-1.10.1+dfsg/debian/tmp"/usr/lib/x86_64-linux-gnu/perl5/5.20/x86_64-linux-gnu-thread-multi"/auto/*
> /«BUILDDIR»/gdal-1.10.1+dfsg/debian/tmp/usr/lib/perl5/auto/.
> mv: cannot stat
> '/«BUILDDIR»/gdal-1.10.1+dfsg/debian/tmp/usr/lib/x86_64-linux-gnu/perl5/5.20/x86_64-linux-gnu-thread-multi/auto/*':
> No such file or directory
> make[1]: *** [override_dh_auto_install] Error 1
> debian/rules:141: recipe for target 'override_dh_auto_install' failed
> make[1]: Leaving directory '/«BUILDDIR»/gdal-1.10.1+dfsg'
> make: *** [binary-arch] Error 2
>
> It looks like swig/perl/Makefile is passing INSTALL_BASE=/usr
> to Makefile.PL, forcing installation under /usr/lib/perl5 (see
> ExtUtils::MakeMaker(3perl).) Possibly this should be changed to
> INSTALLDIRS=vendor.
>
> One solution for debian/libgdal-perl.install might be an executable
> debhelper install file (available with debhelper compat level 9)
> expanding $Config{vendorarch}. See #751924 for an example of this.
Implemented with a patch (for INSTALLDIRS=vendor) and an executable
.install file for $Config{vendorarch}.
See attached debdiff.
Cheers,
gregor
--
.''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
: :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/
`. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
`- NP: Dire Straits: Skateaway
diff -Nru gdal-1.10.1+dfsg/debian/changelog gdal-1.10.1+dfsg/debian/changelog
--- gdal-1.10.1+dfsg/debian/changelog 2014-04-02 08:34:16.000000000 +0200
+++ gdal-1.10.1+dfsg/debian/changelog 2014-07-08 20:01:49.000000000 +0200
@@ -1,3 +1,17 @@
+gdal (1.10.1+dfsg-5.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix "hardcodes /usr/lib/perl5":
+ - add patch perl-vendor which passes INSTALLDIRS=vendor to Makefile.PL
+ which nicely drops perl files into suitable directories
+ - remove all perl juggling around from debian/rules as a result of the
+ patch
+ - make debian/libgdal-perl.install executable and use $Config{vendorarch}
+ there to install the perl files from the expected location
+ (Closes: #752473)
+
+ -- gregor herrmann <[email protected]> Tue, 08 Jul 2014 18:54:15 +0200
+
gdal (1.10.1+dfsg-5) unstable; urgency=medium
* Don't run dh for custom targets.
diff -Nru gdal-1.10.1+dfsg/debian/libgdal-perl.install gdal-1.10.1+dfsg/debian/libgdal-perl.install
--- gdal-1.10.1+dfsg/debian/libgdal-perl.install 2014-04-02 08:34:16.000000000 +0200
+++ gdal-1.10.1+dfsg/debian/libgdal-perl.install 2014-07-08 19:53:58.000000000 +0200
@@ -1,5 +1,3 @@
-usr/lib/perl5/auto/Geo/OGR
-usr/lib/perl5/auto/Geo/OSR
-usr/lib/perl5/auto/Geo/GDAL
-usr/lib/perl5/Geo/*.pm
-usr/lib/perl5/Geo/GDAL/Const.pm
+#!/usr/bin/perl -w
+use Config;
+print substr($Config{vendorarch}, 1) . "\n";
diff -Nru gdal-1.10.1+dfsg/debian/patches/perl-vendor gdal-1.10.1+dfsg/debian/patches/perl-vendor
--- gdal-1.10.1+dfsg/debian/patches/perl-vendor 1970-01-01 01:00:00.000000000 +0100
+++ gdal-1.10.1+dfsg/debian/patches/perl-vendor 2014-07-08 19:39:30.000000000 +0200
@@ -0,0 +1,28 @@
+Description: pass INSTALLDIRS=vendor to Makefile.PL to get stuff into the right place
+Origin: vendor
+Forwarded: no
+Author: gregor herrmann <[email protected]>
+Last-Update: 2014-07-08
+
+--- a/swig/perl/Makefile
++++ b/swig/perl/Makefile
+@@ -7,7 +7,7 @@
+ $(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
+@@ -26,7 +26,7 @@
+ 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
diff -Nru gdal-1.10.1+dfsg/debian/patches/series gdal-1.10.1+dfsg/debian/patches/series
--- gdal-1.10.1+dfsg/debian/patches/series 2014-04-02 08:34:16.000000000 +0200
+++ gdal-1.10.1+dfsg/debian/patches/series 2014-07-08 19:28:11.000000000 +0200
@@ -29,3 +29,4 @@
doc-brief
hardening
hurd-i386-pathmax
+perl-vendor
diff -Nru gdal-1.10.1+dfsg/debian/rules gdal-1.10.1+dfsg/debian/rules
--- gdal-1.10.1+dfsg/debian/rules 2014-04-02 08:34:16.000000000 +0200
+++ gdal-1.10.1+dfsg/debian/rules 2014-07-08 19:48:00.000000000 +0200
@@ -11,9 +11,6 @@
PYVERS=$(shell pyversions -v -r debian/control) $(shell py3versions -v -r)
PYDEF=$(shell pyversions -dv)
PERLDEF=$(shell perl -V:version|cut -d\' -f2)
-PERL_VENDOR_ARCH=$(shell perl -V:vendorarch|cut -d\' -f2)
-PERL_ARCH_NAME=$(shell perl -V:archname|cut -d\' -f2)
-PERL_PATH="$(PERL_VENDOR_ARCH)/$(PERL_ARCH_NAME)"
SWIGVER=$(shell swig -version |grep Version|cut -d' ' -f3|sed -e 's/\.//g')
GDALVER=$(shell cat VERSION|sed -e 's/\./ /g')
@@ -167,23 +164,9 @@
# removing la file
rm -f $(CURDIR)/debian/tmp/usr/lib/libgdal.la
- # removing perllocal.pod
- rm -f $(CURDIR)/debian/tmp$(PERL_PATH)/perllocal.pod
-
- # removing empty packlist MakeMaker files
- -find $(CURDIR)/debian/tmp$(PERL_PATH) -type f -name .packlist -exec rm -f {} \;
-
- # removing embedded rpath in perl shlibs
- -find $(CURDIR)/debian/tmp$(PERL_PATH) -type f -name "*.so" -exec chrpath --delete {} \;
-
# removing embedded rpath in main lib
-find $(CURDIR)/debian/tmp/usr/lib -type f -name "*.so*" -exec chrpath --delete {} \;
- # moves perl stuff the right dirs
- install -o root -g root -d $(CURDIR)/debian/tmp/usr/lib/perl5/auto
- mv $(CURDIR)/debian/tmp$(PERL_PATH)/auto/* $(CURDIR)/debian/tmp/usr/lib/perl5/auto/.
- mv $(CURDIR)/debian/tmp$(PERL_PATH)/Geo $(CURDIR)/debian/tmp/usr/lib/perl5/.
-
# copy sample programs for python-gdal
install -o root -g root -d $(CURDIR)/debian/tmp/usr/share/doc/python-gdal/examples
install -o root -g root -m 755 $(CURDIR)/swig/python/samples/*.py $(CURDIR)/debian/tmp/usr/share/doc/python-gdal/examples/.
signature.asc
Description: Digital Signature

