summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem/perl_makemaker.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@gnu.kitenet.net>2009-07-22 16:43:52 +0200
committerJoey Hess <joey@gnu.kitenet.net>2009-07-22 16:43:52 +0200
commitde488cff05be3ecd76653ff19a504dbf1b9ed198 (patch)
tree9ec80eeea60a3190691092af18d5de46b0bd5f37 /Debian/Debhelper/Buildsystem/perl_makemaker.pm
parent570d5940f52ccd6ef09748ac103f486cb300f744 (diff)
perl_makemaker: Re-add fix for #496157, lost in rewrite.
Diffstat (limited to 'Debian/Debhelper/Buildsystem/perl_makemaker.pm')
-rw-r--r--Debian/Debhelper/Buildsystem/perl_makemaker.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/Debian/Debhelper/Buildsystem/perl_makemaker.pm b/Debian/Debhelper/Buildsystem/perl_makemaker.pm
index 702458c..e109be5 100644
--- a/Debian/Debhelper/Buildsystem/perl_makemaker.pm
+++ b/Debian/Debhelper/Buildsystem/perl_makemaker.pm
@@ -58,7 +58,17 @@ sub configure {
sub install {
my $this=shift;
my $destdir=shift;
- $this->SUPER::install($destdir, "PREFIX=/usr", @_);
+
+ # Special case for Makefile.PL that uses
+ # Module::Build::Compat. PREFIX should not be passed
+ # for those; it already installs into /usr by default.
+ my $makefile=$this->get_sourcepath("Makefile");
+ if (system(qq{grep -q "generated automatically by MakeMaker" $makefile}) != 0) {
+ $this->SUPER::install($destdir, @_);
+ }
+ else {
+ $this->SUPER::install($destdir, "PREFIX=/usr", @_);
+ }
}
1