]> git.donarmstrong.com Git - debhelper.git/commitdiff
Pass CFLAGS also to perl_build.
authorgregor herrmann <gregoa@debian.org>
Fri, 30 Sep 2011 11:40:27 +0000 (13:40 +0200)
committerJoey Hess <joey@kitenet.net>
Fri, 30 Sep 2011 17:02:12 +0000 (13:02 -0400)
Closes: 497653
Debian/Debhelper/Buildsystem/perl_build.pm

index deb9a37933d4c0a911a103711bd6ca6a2048ac3a..724e1e07fa63bfb0d2be16873aaf4eabdc771945 100644 (file)
@@ -7,6 +7,7 @@
 package Debian::Debhelper::Buildsystem::perl_build;
 
 use strict;
+use Debian::Debhelper::Dh_Lib qw(compat);
 use base 'Debian::Debhelper::Buildsystem';
 
 sub DESCRIPTION {
@@ -38,8 +39,12 @@ sub new {
 
 sub configure {
        my $this=shift;
+       my @flags;
        $ENV{PERL_MM_USE_DEFAULT}=1;
-       $this->do_perl("Build.PL", "installdirs=vendor", @_);
+       if ($ENV{CFLAGS} && ! compat(8)) {
+               push @flags, "config=optimize=$ENV{CFLAGS}";
+       }
+       $this->do_perl("Build.PL", "installdirs=vendor", @flags, @_);
 }
 
 sub build {