[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#497653: dh_auto_configure, Perl XS modules and DEB_BUILD_OPTIONS=noopt



tag 497653 + patch
thanks

On Wed, 03 Sep 2008 14:53:47 +0300, Niko Tyni wrote:

> Neither
> Makefile.PL nor Build.PL build systems look at CFLAGS (set by at least
> dpkg-buildpackage), so they need special treatment.

It seems that was fixed for Buildsystem/perl_makemaker.pm with the
patch from #643702 in 8.9.8.

Could we have this for Buildsystem/perl_build.pm too, please?

Syntax from Niko's original mail:
 
>         $(PERL) Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$(CFLAGS)"
> 
>         $(PERL) Build.PL installdirs=vendor config=optimize="$(CFLAGS)"

I'm attaching a patch that's the same as for perl_makemaker.pm modulo
the syntax for passing CFLAGS, and that works for me in a quick test.

Cheers,
gregor
 
-- 
 .''`.   Homepage: http://info.comodo.priv.at/ - OpenPGP key ID: 0x8649AA06
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe
   `-    NP: Ludwig Hirsch: Der Rattenkönig
From 6cd2abe23c86134a193836be533f03430e75dcc7 Mon Sep 17 00:00:00 2001
From: gregor herrmann <gregoa@debian.org>
Date: Fri, 30 Sep 2011 13:40:27 +0200
Subject: [PATCH] Pass CFLAGS also to perl_build.

Closes: 497653
---
 Debian/Debhelper/Buildsystem/perl_build.pm |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

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 {
-- 
1.7.6.3

Attachment: signature.asc
Description: Digital signature


Reply to: