r73833 - in /trunk/libextutils-cbuilder-perl/debian: changelog control patches/ patches/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch patches/series

dom at users.alioth.debian.org dom at users.alioth.debian.org
Fri Apr 29 11:34:23 UTC 2011


Author: dom
Date: Fri Apr 29 11:34:03 2011
New Revision: 73833

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=73833
Log:
  * Add patch to append CFLAGS and LDFLAGS to their Config.pm
    counterparts rather than overriding them (Closes: #624460)

Added:
    trunk/libextutils-cbuilder-perl/debian/patches/
    trunk/libextutils-cbuilder-perl/debian/patches/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch
    trunk/libextutils-cbuilder-perl/debian/patches/series
Modified:
    trunk/libextutils-cbuilder-perl/debian/changelog
    trunk/libextutils-cbuilder-perl/debian/control

Modified: trunk/libextutils-cbuilder-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-cbuilder-perl/debian/changelog?rev=73833&op=diff
==============================================================================
--- trunk/libextutils-cbuilder-perl/debian/changelog (original)
+++ trunk/libextutils-cbuilder-perl/debian/changelog Fri Apr 29 11:34:03 2011
@@ -1,3 +1,10 @@
+libextutils-cbuilder-perl (0.280202-2) UNRELEASED; urgency=low
+
+  * Add patch to append CFLAGS and LDFLAGS to their Config.pm
+    counterparts rather than overriding them (Closes: #624460)
+
+ -- Dominic Hargreaves <dom at earth.li>  Fri, 29 Apr 2011 12:30:24 +0100
+
 libextutils-cbuilder-perl (0.280202-1) unstable; urgency=low
 
   * New upstream release

Modified: trunk/libextutils-cbuilder-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-cbuilder-perl/debian/control?rev=73833&op=diff
==============================================================================
--- trunk/libextutils-cbuilder-perl/debian/control (original)
+++ trunk/libextutils-cbuilder-perl/debian/control Fri Apr 29 11:34:03 2011
@@ -8,7 +8,8 @@
  gregor herrmann <gregoa at debian.org>,
  Nathan Handler <nhandler at ubuntu.com>,
  Jonathan Yu <jawnsy at cpan.org>,
- Angel Abad <angelabad at gmail.com>
+ Angel Abad <angelabad at gmail.com>,
+ Dominic Hargreaves <dom at earth.li>
 Standards-Version: 3.9.1
 Homepage: http://search.cpan.org/dist/ExtUtils-CBuilder/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libextutils-cbuilder-perl/

Added: trunk/libextutils-cbuilder-perl/debian/patches/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-cbuilder-perl/debian/patches/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch?rev=73833&op=file
==============================================================================
--- trunk/libextutils-cbuilder-perl/debian/patches/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch (added)
+++ trunk/libextutils-cbuilder-perl/debian/patches/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch Fri Apr 29 11:34:03 2011
@@ -1,0 +1,82 @@
+From: Niko Tyni <ntyni at debian.org>
+Date: Thu, 28 Apr 2011 09:18:54 +0300
+Subject: [PATCH] Append CFLAGS and LDFLAGS to their Config.pm counterparts in
+ EU::CBuilder
+
+Since ExtUtils::CBuilder 0.27_04 (bleadperl commit 06e8058f27e4),
+CFLAGS and LDFLAGS from the environment have overridden the Config.pm
+ccflags and ldflags settings. This can cause binary incompatibilities
+between the core Perl and extensions built with EU::CBuilder.
+
+Append to the Config.pm values rather than overriding them.
+---
+ .../lib/ExtUtils/CBuilder/Base.pm                  |    6 +++-
+ dist/ExtUtils-CBuilder/t/04-base.t                 |   25 +++++++++++++++++++-
+ 2 files changed, 28 insertions(+), 3 deletions(-)
+
+diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
+index b572312..2255c51 100644
+--- a/lib/ExtUtils/CBuilder/Base.pm
++++ b/lib/ExtUtils/CBuilder/Base.pm
+@@ -40,11 +40,13 @@ sub new {
+     $self->{config}{$k} = $v unless exists $self->{config}{$k};
+   }
+   $self->{config}{cc} = $ENV{CC} if defined $ENV{CC};
+-  $self->{config}{ccflags} = $ENV{CFLAGS} if defined $ENV{CFLAGS};
++  $self->{config}{ccflags} = join(" ", $self->{config}{ccflags}, $ENV{CFLAGS})
++     if defined $ENV{CFLAGS};
+   $self->{config}{cxx} = $ENV{CXX} if defined $ENV{CXX};
+   $self->{config}{cxxflags} = $ENV{CXXFLAGS} if defined $ENV{CXXFLAGS};
+   $self->{config}{ld} = $ENV{LD} if defined $ENV{LD};
+-  $self->{config}{ldflags} = $ENV{LDFLAGS} if defined $ENV{LDFLAGS};
++  $self->{config}{ldflags} = join(" ", $self->{config}{ldflags}, $ENV{LDFLAGS})
++     if defined $ENV{LDFLAGS};
+ 
+   unless ( exists $self->{config}{cxx} ) {
+     my ($ccpath, $ccbase, $ccsfx ) = fileparse($self->{config}{cc}, qr/\.[^.]*/);
+diff --git a/dist/ExtUtils-CBuilder/t/04-base.t b/dist/ExtUtils-CBuilder/t/04-base.t
+index c3bf6b5..1bb15aa 100644
+--- a/dist/ExtUtils-CBuilder/t/04-base.t
++++ b/dist/ExtUtils-CBuilder/t/04-base.t
+@@ -1,7 +1,7 @@
+ #! perl -w
+ 
+ use strict;
+-use Test::More tests => 50;
++use Test::More tests => 64;
+ use Config;
+ use Cwd;
+ use File::Path qw( mkpath );
+@@ -326,6 +326,29 @@ is_deeply( $mksymlists_args,
+     "_prepare_mksymlists_args(): got expected arguments for Mksymlists",
+ );
+ 
++my %testvars = (
++    CFLAGS  => 'ccflags',
++    LDFLAGS => 'ldflags',
++);
++
++while (my ($VAR, $var) = each %testvars) {
++    local $ENV{$VAR};
++    $base = ExtUtils::CBuilder::Base->new( quiet => 1 );
++    ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" );
++    isa_ok( $base, 'ExtUtils::CBuilder::Base' );
++    like($base->{config}{$var}, qr/\Q$Config{$var}/,
++        "honours $var from Config.pm");
++
++    $ENV{$VAR} = "-foo -bar";
++    $base = ExtUtils::CBuilder::Base->new( quiet => 1 );
++    ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" );
++    isa_ok( $base, 'ExtUtils::CBuilder::Base' );
++    like($base->{config}{$var}, qr/\Q$ENV{$VAR}/,
++        "honours $VAR from the environment");
++    like($base->{config}{$var}, qr/\Q$Config{$var}/,
++        "doesn't override $var from Config.pm with $VAR from the environment");
++}
++
+ #####
+ 
+ for ($source_file, $object_file, $lib_file) {
+-- 
+1.7.4.4
+

Added: trunk/libextutils-cbuilder-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libextutils-cbuilder-perl/debian/patches/series?rev=73833&op=file
==============================================================================
--- trunk/libextutils-cbuilder-perl/debian/patches/series (added)
+++ trunk/libextutils-cbuilder-perl/debian/patches/series Fri Apr 29 11:34:03 2011
@@ -1,0 +1,1 @@
+0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch




More information about the Pkg-perl-cvs-commits mailing list