[debhelper-devel] [debhelper] 04/11: perl_build, perl_makemaker: Support non-/usr build prefixes

Niels Thykier nthykier at moszumanska.debian.org
Sun Jan 7 21:38:03 UTC 2018


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to annotated tag Release_2.6.0
in repository debhelper.

commit efddd79807a74c383950bd0daac71db2234cb0ee
Author: Dan Nicholson <nicholson at endlessm.com>
Date:   Thu Jan 28 06:44:13 2016 -0800

    perl_build, perl_makemaker: Support non-/usr build prefixes
    
    For apps installing outside of /usr, pass along the appropriate prefix
    to the perl buildsystems like the others.
---
 Debian/Debhelper/Buildsystem/perl_build.pm     | 5 ++++-
 Debian/Debhelper/Buildsystem/perl_makemaker.pm | 6 +++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/Debian/Debhelper/Buildsystem/perl_build.pm b/Debian/Debhelper/Buildsystem/perl_build.pm
index 4cfbcb4..1382b67 100644
--- a/Debian/Debhelper/Buildsystem/perl_build.pm
+++ b/Debian/Debhelper/Buildsystem/perl_build.pm
@@ -7,7 +7,7 @@
 package Debian::Debhelper::Buildsystem::perl_build;
 
 use strict;
-use Debian::Debhelper::Dh_Lib qw(compat);
+use Debian::Debhelper::Dh_Lib qw(compat get_buildprefix);
 use base 'Debian::Debhelper::Buildsystem';
 use Config;
 
@@ -42,6 +42,9 @@ sub configure {
 	my $this=shift;
 	my @flags;
 	$ENV{PERL_MM_USE_DEFAULT}=1;
+	# Adjust prefix for non-/usr builds
+	my $prefix=get_buildprefix();
+	push @flags, "--prefix", $prefix if $prefix ne "/usr";
 	if ($ENV{CFLAGS} && ! compat(8)) {
 		push @flags, "--config", "optimize=$ENV{CFLAGS} $ENV{CPPFLAGS}";
 	}
diff --git a/Debian/Debhelper/Buildsystem/perl_makemaker.pm b/Debian/Debhelper/Buildsystem/perl_makemaker.pm
index 60cda3d..b178437 100644
--- a/Debian/Debhelper/Buildsystem/perl_makemaker.pm
+++ b/Debian/Debhelper/Buildsystem/perl_makemaker.pm
@@ -7,7 +7,7 @@
 package Debian::Debhelper::Buildsystem::perl_makemaker;
 
 use strict;
-use Debian::Debhelper::Dh_Lib qw(compat);
+use Debian::Debhelper::Dh_Lib qw(compat get_buildprefix);
 use base 'Debian::Debhelper::Buildsystem::makefile';
 use Config;
 
@@ -47,6 +47,10 @@ sub configure {
 	# This prevents  Module::Install from interactive behavior.
 	$ENV{PERL_AUTOINSTALL}="--skipdeps";
 
+	# Adjust prefix for non-/usr builds
+	my $prefix=get_buildprefix();
+	push @flags, "PREFIX=$prefix" if $prefix ne "/usr";
+
 	if ($ENV{CFLAGS} && ! compat(8)) {
 		push @flags, "OPTIMIZE=$ENV{CFLAGS} $ENV{CPPFLAGS}";
 	}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list