[arch-commits] Commit in perl/trunk (5 files)

Angel Velásquez angvp at archlinux.org
Thu Jun 23 21:11:35 UTC 2011


    Date: Thursday, June 23, 2011 @ 17:11:34
  Author: angvp
Revision: 128400

upgpkg: perl 5.14.1-1
Version bump + bug fixess

Added:
  perl/trunk/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch
  perl/trunk/perlbin.csh
Modified:
  perl/trunk/ChangeLog
  perl/trunk/PKGBUILD
  perl/trunk/perlbin.sh

-----------------------------------------------------------------+
 0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch |   83 ++++++++++
 ChangeLog                                                       |    5 
 PKGBUILD                                                        |   25 ++-
 perlbin.csh                                                     |   17 ++
 perlbin.sh                                                      |   15 -
 5 files changed, 127 insertions(+), 18 deletions(-)

Added: 0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch
===================================================================
--- 0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch	                        (rev 0)
+++ 0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch	2011-06-23 21:11:34 UTC (rev 128400)
@@ -0,0 +1,83 @@
+From bb249b0b26c2e79a6f55355ef94889070f07fd21 Mon Sep 17 00:00:00 2001
+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/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
++++ b/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
+--- 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
+

Modified: ChangeLog
===================================================================
--- ChangeLog	2011-06-23 18:38:04 UTC (rev 128399)
+++ ChangeLog	2011-06-23 21:11:34 UTC (rev 128400)
@@ -1,3 +1,8 @@
+2011-06-22 Angel Velasquez <angvp at archlinux.org>
+    * Added a patch for ExtUtils doesnt overwrite CFLAGS and LDFLAGS
+    * Fixed #FS22197, FS#22441, FS#24767
+    * Rebuilt perl 5.14.1-2 against db 5.2.28
+
 2011-06-16 Angel Velasquez <angvp at archlinux.org>
     * Fixed #FS24660
     * Rebuilt against db 5.2.28

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-06-23 18:38:04 UTC (rev 128399)
+++ PKGBUILD	2011-06-23 21:11:34 UTC (rev 128400)
@@ -4,8 +4,8 @@
 # Contributor: judd <jvinet.zeroflux.org>
 # Contributor: francois <francois.archlinux.org> 
 pkgname=perl
-pkgver=5.14.0
-pkgrel=3
+pkgver=5.14.1
+pkgrel=1
 pkgdesc="A highly capable, feature-rich programming language"
 arch=(i686 x86_64)
 license=('GPL' 'PerlArtistic')
@@ -13,11 +13,16 @@
 groups=('base')
 depends=('gdbm' 'db' 'coreutils' 'glibc' 'sh')
 changelog=ChangeLog
-source=(http://www.cpan.org/src/5.0/perl-${pkgver}.tar.bz2 perlbin.sh)
+source=(http://www.cpan.org/src/5.0/perl-${pkgver}.tar.bz2 
+perlbin.sh
+perlbin.csh
+0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch)
 install=perl.install
 options=('!makeflags' '!purge')
-md5sums=('e7457deea78330c5f8eebb2fd2a45479'
-         'f86eb0dba1638ca6d1c8fff1b06c2a71')
+md5sums=('97cd306a2c22929cc141a09568f43bb0'
+         '5ed2542fdb9a60682f215bd33701e61a'
+         'd76445605c49886c77734446247e439d'
+         'c25d86206d649046538c3daab7874564')
 
 build() {
   cd ${srcdir}/${pkgname}-${pkgver}
@@ -41,7 +46,9 @@
     -Dsitescript=/usr/bin/site_perl \
     -Dvendorscript=/usr/bin/vendor_perl \
     -Dinc_version_list=none \
-    -Dman1ext=1perl -Dman3ext=3perl ${arch_opts}
+    -Dman1ext=1perl -Dman3ext=3perl ${arch_opts} \
+    -Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}"
+  patch -Np1 -i $srcdir/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch
   make
 }
 package() {
@@ -68,9 +75,12 @@
       -e "/{'buildflags'}/     s/'';/'installdirs=site';/" \
       -i ${pkgdir}/usr/share/perl5/core_perl/CPANPLUS/Config.pm
 
-  # Profile script so set paths to perl scripts.
+  # Profile script to set paths to perl scripts.
   install -D -m755 ${srcdir}/perlbin.sh \
                    ${pkgdir}/etc/profile.d/perlbin.sh
+  # Profile script to set paths to perl scripts on csh. (FS#22441) 
+  install -D -m755 ${srcdir}/perlbin.csh \
+                  ${pkgdir}/etc/profile.d/perlbin.csh
 
   (cd ${pkgdir}/usr/bin; mv perl${pkgver} perl)
   (cd ${pkgdir}/usr/bin/core_perl;  ln -sf c2ph pstruct; ln -sf s2p psed)
@@ -91,4 +101,3 @@
   install -dv ${pkgdir}/etc/ld.so.conf.d
   echo "/usr/lib/perl5/core_perl/CORE" > ${pkgdir}/etc/ld.so.conf.d/perl.conf
 }
-

Added: perlbin.csh
===================================================================
--- perlbin.csh	                        (rev 0)
+++ perlbin.csh	2011-06-23 21:11:34 UTC (rev 128400)
@@ -0,0 +1,17 @@
+# Set path to perl scriptdirs if they exist
+# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_Scripts
+# Added /usr/bin/*_perl dirs for scripts
+# Remove /usr/lib/perl5/*_perl/bin in next release
+
+[ -d /usr/bin/site_perl ] && setenv PATH ${PATH}:/usr/bin/site_perl
+[ -d /usr/lib/perl5/site_perl/bin ] && setenv PATH
+${PATH}:/usr/lib/perl5/site_perl/bin
+
+[ -d /usr/bin/vendor_perl ] && setenv PATH ${PATH}:/usr/bin/vendor_perl
+[ -d /usr/lib/perl5/vendor_perl/bin ] && setenv PATH
+${PATH}:/usr/lib/perl5/vendor_perl/bin
+
+[ -d /usr/bin/core_perl ] && setenv PATH ${PATH}:/usr/bin/core_perl
+
+# If you have modules in non-standard directories you can add them here.
+#export PERLLIB=dir1:dir2

Modified: perlbin.sh
===================================================================
--- perlbin.sh	2011-06-23 18:38:04 UTC (rev 128399)
+++ perlbin.sh	2011-06-23 21:11:34 UTC (rev 128400)
@@ -3,18 +3,13 @@
 # Added /usr/bin/*_perl dirs for scripts
 # Remove /usr/lib/perl5/*_perl/bin in next release
 
-[ -d /usr/bin/site_perl ] &&
-		PATH=$PATH:/usr/bin/site_perl
-[ -d /usr/lib/perl5/site_perl/bin ] &&
-		PATH=$PATH:/usr/lib/perl5/site_perl/bin
+[ -d /usr/bin/site_perl ] && PATH=$PATH:/usr/bin/site_perl
+[ -d /usr/lib/perl5/site_perl/bin ] && PATH=$PATH:/usr/lib/perl5/site_perl/bin
 
-[ -d /usr/bin/vendor_perl ] &&
-		PATH=$PATH:/usr/bin/vendor_perl
-[ -d /usr/lib/perl5/vendor_perl/bin ] &&
-		PATH=$PATH:/usr/lib/perl5/vendor_perl/bin
+[ -d /usr/bin/vendor_perl ] && PATH=$PATH:/usr/bin/vendor_perl
+[ -d /usr/lib/perl5/vendor_perl/bin ] && PATH=$PATH:/usr/lib/perl5/vendor_perl/bin
 
-[ -d /usr/bin/core_perl ] &&
-		PATH=$PATH:/usr/bin/core_perl
+[ -d /usr/bin/core_perl ] && PATH=$PATH:/usr/bin/core_perl
 
 export PATH
 




More information about the arch-commits mailing list