From d4d67e622bf7250be4dd252b7b832a83a04f0cf1 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 5 Jul 2011 17:17:36 +0200 Subject: [PATCH] perl: update to 5.14.1. --- ...d-LDFLAGS-to-their-Config.pm-counter.patch | 83 +++++++++++++++++++ srcpkgs/perl/template | 15 ++-- 2 files changed, 91 insertions(+), 7 deletions(-) create mode 100644 srcpkgs/perl/patches/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch diff --git a/srcpkgs/perl/patches/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch b/srcpkgs/perl/patches/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch new file mode 100644 index 00000000000..479a7e729a8 --- /dev/null +++ b/srcpkgs/perl/patches/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch @@ -0,0 +1,83 @@ +From bb249b0b26c2e79a6f55355ef94889070f07fd21 Mon Sep 17 00:00:00 2001 +From: Niko Tyni +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 +--- dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm ++++ 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/dist/ExtUtils-CBuilder/t/04-base.t b/dist/ExtUtils-CBuilder/t/04-base.t +index c3bf6b5..1bb15aa 100644 +--- dist/ExtUtils-CBuilder/t/04-base.t ++++ 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 + diff --git a/srcpkgs/perl/template b/srcpkgs/perl/template index 3e67e6fd31b..85d0825ca5b 100644 --- a/srcpkgs/perl/template +++ b/srcpkgs/perl/template @@ -1,11 +1,13 @@ # Template build file for 'perl'. pkgname=perl -version=5.14.0 +version=5.14.1 distfiles="http://www.cpan.org/src/5.0/$pkgname-$version.tar.bz2" build_style=custom-install short_desc="Practical Extraction and Report Language" maintainer="Juan RP " -checksum=ea027d0f5279b7465f69ee942ea4015296f90429f1ead7a99fe3b03a475ee821 +homepage="http://www.perl.org" +license="GPL-2" +checksum=29b4a7e7c22d4a980ab9eb1ea486c5c4ee9ec533192a1ce8f3fe9ae32fb1f862 long_desc=" Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including @@ -52,7 +54,7 @@ do_install() make DESTDIR=${DESTDIR} install # Make a link from perl${version} to perl. - cd ${DESTDIR}/usr/bin && ln -sf perl${version} perl + ln -sf /usr/bin/perl${version} ${DESTDIR}/usr/bin/perl ### CPAN Settings ### # Set CPAN default config to use the site directories. @@ -67,8 +69,7 @@ do_install() -i ${DESTDIR}/usr/share/perl5/core_perl/CPANPLUS/Config.pm # Profile script so set paths to perl scripts. - install -D -m644 ${FILESDIR}/perlbin.sh \ - ${DESTDIR}/etc/profile.d/perlbin.sh + vinstall ${FILESDIR}/perlbin.sh 644 etc/profile.d # Remove all pod files *except* those under # /usr/share/perl5/core_perl/pod/ (FS#16488) @@ -82,6 +83,6 @@ do_install() find ${DESTDIR} -name .packlist -delete # Make a symlink so that libperl.so is accesible. - cd ${DESTDIR}/usr/lib && \ - ln -sf ./perl5/core_perl/CORE/libperl.so libperl.so + ln -sf /usr/lib/perl5/core_perl/CORE/libperl.so \ + ${DESTDIR}/usr/lib/libperl.so }