From a39dc4abe1b642c999dfff7029d991717d62a3c1 Mon Sep 17 00:00:00 2001 From: gregor herrmann Date: Fri, 30 Sep 2011 13:40:27 +0200 Subject: [PATCH 1/1] Pass CFLAGS also to perl_build. Closes: 497653 --- Debian/Debhelper/Buildsystem/perl_build.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Debian/Debhelper/Buildsystem/perl_build.pm b/Debian/Debhelper/Buildsystem/perl_build.pm index deb9a37..724e1e0 100644 --- a/Debian/Debhelper/Buildsystem/perl_build.pm +++ b/Debian/Debhelper/Buildsystem/perl_build.pm @@ -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 { -- 2.39.2