Package: libtemplate-perl
Version: 2.24-1.1
Severity: important
Tags: patch
User: [email protected]
Usertags: perl-5.20-transition

Starting with version 5.20.0 (currently in experimental), the Debian
perl package is changing the "vendorarch" library paths (currently
/usr/lib/perl5) to include the multiarch triplet and the perl version. See
#748380 for details.

For this to work, packages containing binary perl modules need to migrate
from using the hardcoded /usr/lib/perl5 directory to the value of the
$Config{vendorarch} variable, as defined in the 'Config' module.

The attached patch implements this for libtemplate-perl by making
debian/libtemplate-perl.install into an executable perl script. This
requires a debhelper compat level bump. (YMMV; there are certainly other
ways to do this.)

I've tested that this produces no debdiff visible changes on current sid
while fixing a build failure at the 'install' stage with perl_5.20.0-1.

Please consider including something like this sooner rather than later;
libtemplate-perl is a build dependency for other packages that need to
be rebuilt for the Perl 5.20 transition, and this issue is currently
hindering our rebuild tests.
-- 
Niko Tyni   [email protected]
>From d0e6a2df95aafa309b6c3cb0a2aec8ffe4e9dc0f Mon Sep 17 00:00:00 2001
From: Niko Tyni <[email protected]>
Date: Tue, 17 Jun 2014 23:11:42 +0300
Subject: [PATCH] Don't hardcode /usr/lib/perl5 in
 debian/libtemplate-perl.install

Starting with version 5.20.0, the Debian perl package is changing
the "vendorarch" library paths (currently /usr/lib/perl5) to include
the multiarch triplet and the perl version. See #748380 for details.

For this to work, packages containing binary perl modules need to migrate
from using the hardcoded /usr/lib/perl5 directory to the value of the
$Config{vendorarch} variable, as defined in the 'Config' module.

The implementation uses an executable debhelper install file, which
requires compat level 9.
---
 debian/compat                   | 2 +-
 debian/control                  | 2 +-
 debian/libtemplate-perl.install | 9 ++++++++-
 3 files changed, 10 insertions(+), 3 deletions(-)
 mode change 100644 => 100755 debian/libtemplate-perl.install

diff --git a/debian/compat b/debian/compat
index 7f8f011..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control b/debian/control
index b252e98..826bd74 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: libtemplate-perl
 Section: perl
 Priority: optional
 Maintainer: Benjamin Mako Hill <[email protected]>
-Build-Depends: debhelper (>= 7.0.50~), perl (>= 5.8), libappconfig-perl (>= 1.56)
+Build-Depends: debhelper (>= 9), perl (>= 5.8), libappconfig-perl (>= 1.56)
 Standards-Version: 3.9.3
 Homepage: http://search.cpan.org/~abw/Template-Toolkit/
 
diff --git a/debian/libtemplate-perl.install b/debian/libtemplate-perl.install
old mode 100644
new mode 100755
index f781247..dfa6150
--- a/debian/libtemplate-perl.install
+++ b/debian/libtemplate-perl.install
@@ -1,3 +1,10 @@
-usr/lib/perl5/
+#!/usr/bin/perl -w
+use Config;
+
+# expand the perl binary module directory at build time
+print substr($Config{vendorarch}, 1) . "\n";
+
+print <<EOF;
 usr/share/man/
 usr/bin/
+EOF
-- 
2.0.0

Reply via email to