summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorfhajny <fhajny@pkgsrc.org>2012-02-23 13:00:23 +0000
committerfhajny <fhajny@pkgsrc.org>2012-02-23 13:00:23 +0000
commitdac42551ceec54036869564101199fe80671186c (patch)
tree292dcb6254a21c9ee042b7d28e16ffbc7f056979 /lang
parent7c18973e87284e360286a4fe0fdb6f9d47709f8e (diff)
downloadpkgsrc-dac42551ceec54036869564101199fe80671186c.tar.gz
Backport a fix for a serious bug from upstream, where pkgsrc's CFLAGS
were being used to replace EU::CBuilder's ccflags, resulting in tests and modules failing in specific situations (e.g. on SunOS with ABI=32). https://rt.perl.org/rt3//Public/Bug/Display.html?id=89478 Bump PKGREVISION.
Diffstat (limited to 'lang')
-rw-r--r--lang/perl5/Makefile4
-rw-r--r--lang/perl5/distinfo4
-rw-r--r--lang/perl5/patches/patch-dist_ExtUtils_CBuilder_lib_ExtUtils_CBuilder_Base.pm22
-rw-r--r--lang/perl5/patches/patch-dist_ExtUtils_CBuilder_t_04-base.t45
4 files changed, 72 insertions, 3 deletions
diff --git a/lang/perl5/Makefile b/lang/perl5/Makefile
index ae9ea8c1ca2..7d654340e28 100644
--- a/lang/perl5/Makefile
+++ b/lang/perl5/Makefile
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.178 2011/12/08 22:43:49 hiramatsu Exp $
+# $NetBSD: Makefile,v 1.179 2012/02/23 13:00:23 fhajny Exp $
.include "license.mk"
.include "Makefile.common"
COMMENT= Practical Extraction and Report Language
-PKGREVISION= 3
+PKGREVISION= 4
PKG_DESTDIR_SUPPORT= user-destdir
diff --git a/lang/perl5/distinfo b/lang/perl5/distinfo
index 0c23a437776..b9459ed9d40 100644
--- a/lang/perl5/distinfo
+++ b/lang/perl5/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.83 2012/02/19 04:10:49 sbd Exp $
+$NetBSD: distinfo,v 1.84 2012/02/23 13:00:23 fhajny Exp $
SHA1 (perl-5.14.2.tar.gz) = df1549d65cdef2b20023af83ecaa2a024109a5ad
RMD160 (perl-5.14.2.tar.gz) = bed043edbebd69e1279e9a70424e2552389bea79
@@ -14,6 +14,8 @@ SHA1 (patch-ck) = 5c381db130cdf4c315678e2d65380eaaa3065fee
SHA1 (patch-cn) = a88fcb04b32c6e446d77b62cb6883a04f04e2e75
SHA1 (patch-cp) = 0b22d334df24d128142855464bf6dd61d4d82975
SHA1 (patch-cpan_Digest_Digest.pm) = bcd507631268608385a1a80d879c44cb2a057560
+SHA1 (patch-dist_ExtUtils_CBuilder_lib_ExtUtils_CBuilder_Base.pm) = 322af733b280a3f9c676dcbc890d8dc4f0e3880b
+SHA1 (patch-dist_ExtUtils_CBuilder_t_04-base.t) = 362e6f2884fa225f541b22d8f44af1aa58859daf
SHA1 (patch-hints_netbsd.sh) = acbe28ff4b99d45e29e66003bdd370ba5aaaa999
SHA1 (patch-ta) = 51a3e02148e78eaab882125f859e59add39a4fbe
SHA1 (patch-zd) = 15532739b4a582da322d3e51fc364905bacbcd7e
diff --git a/lang/perl5/patches/patch-dist_ExtUtils_CBuilder_lib_ExtUtils_CBuilder_Base.pm b/lang/perl5/patches/patch-dist_ExtUtils_CBuilder_lib_ExtUtils_CBuilder_Base.pm
new file mode 100644
index 00000000000..38205ba5aea
--- /dev/null
+++ b/lang/perl5/patches/patch-dist_ExtUtils_CBuilder_lib_ExtUtils_CBuilder_Base.pm
@@ -0,0 +1,22 @@
+$NetBSD: patch-dist_ExtUtils_CBuilder_lib_ExtUtils_CBuilder_Base.pm,v 1.1 2012/02/23 13:00:23 fhajny Exp $
+
+EU::CBuilder shouldn't override ccflags with CFLAGS (1/2)
+https://rt.perl.org/rt3//Public/Bug/Display.html?id=89478
+--- dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm.orig 2011-09-26 09:44:34.000000000 +0000
++++ dist/ExtUtils-CBuilder/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/lang/perl5/patches/patch-dist_ExtUtils_CBuilder_t_04-base.t b/lang/perl5/patches/patch-dist_ExtUtils_CBuilder_t_04-base.t
new file mode 100644
index 00000000000..9e96345de58
--- /dev/null
+++ b/lang/perl5/patches/patch-dist_ExtUtils_CBuilder_t_04-base.t
@@ -0,0 +1,45 @@
+$NetBSD: patch-dist_ExtUtils_CBuilder_t_04-base.t,v 1.1 2012/02/23 13:00:23 fhajny Exp $
+
+EU::CBuilder shouldn't override ccflags with CFLAGS (2/2)
+https://rt.perl.org/rt3//Public/Bug/Display.html?id=89478
+--- dist/ExtUtils-CBuilder/t/04-base.t.orig 2011-09-26 09:44:34.000000000 +0000
++++ 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 );
+@@ -328,6 +328,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) {