From e7b9c9697e6a50c3b9e78941fa95ba11c716d238 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 1 Jun 2011 22:46:45 +0000 Subject: Wed Jun 1 22:46:45 UTC 2011 --- testing/perl/ChangeLog | 57 +++++++++++++++++++ testing/perl/PKGBUILD | 91 +++++++++++++++++++++++++++++ testing/perl/fix-h2ph-and-tests.patch | 104 ++++++++++++++++++++++++++++++++++ testing/perl/perl.install | 18 ++++++ testing/perl/perlbin.sh | 23 ++++++++ 5 files changed, 293 insertions(+) create mode 100644 testing/perl/ChangeLog create mode 100644 testing/perl/PKGBUILD create mode 100644 testing/perl/fix-h2ph-and-tests.patch create mode 100644 testing/perl/perl.install create mode 100755 testing/perl/perlbin.sh (limited to 'testing/perl') diff --git a/testing/perl/ChangeLog b/testing/perl/ChangeLog new file mode 100644 index 000000000..f6c2500df --- /dev/null +++ b/testing/perl/ChangeLog @@ -0,0 +1,57 @@ +2011-05-16 Angel Velasquez + * perl 5.14.0 + * Removed patch for h2ph warning from 5.12.3 + * Removed provides array, you can use corelist -v 5.14.0 to know the + modules included with the perl core, through Module::CoreList (thx j3nnn1 + for the tip) + +2010-11-07 kevin + + * perl 5.12.2-1 + - Using /usr/bin/*_perl for script directories + +2010-11-06 kevin + + - Removed otherlibdirs directive from Configure + - Removed /usr/*/perl5/site_perl/5.10.1 from INC + - Finally removed legacy dirs /usr/lib/perl5/current and + /usr/lib/perl5/site_perl/current from @INC + +2010-05-23 kevin + + * perl 5.12.1-2 + - Francois updated the provides array. + +2010-05-23 kevin + + * perl 5.12.1-1 + +2010-05-16 kevin + + * perl 5.12.0-2 + +2010-05-12 kevin + + - FS#19411. Removed the for loop in perlbin.sh which didn't work on zsh. + This makes the loop variables unnecessary so the script no longer + pollutes the user's environment. + - FS#19427. Added /usr/*/perl5/site_perl/5.10.1 to otherlibdirs to support + user built modules. + +2010-05-09 kevin + + * perl 5.12.0-1 + - Modified perlbin.sh to only add existing dirs to PATH. Fixes FS#17402, + path points to non-existant directories + +2010-05-07 kevin + + - Added this changelog. + - Added -Dinc_version_list=none to fix FS#19136, double entry in @INC. + This removes the duplicates and versioned directory entries. + - Change scriptdirs to /usr/lib/perl5/{core,vendor,site}_perl/bin to fix + Fix FS#13808, binaries don't follow FHS. + - Stopped using versioned directories in sitelib and sitearch. + + +# vim: set ft=changelog ts=4 sw=4 et: diff --git a/testing/perl/PKGBUILD b/testing/perl/PKGBUILD new file mode 100644 index 000000000..aabf4dbc0 --- /dev/null +++ b/testing/perl/PKGBUILD @@ -0,0 +1,91 @@ +# $Id: PKGBUILD 124529 2011-05-22 19:14:50Z angvp $ +# Maintainer: Angel Velasquez +# Contributor: kevin +# Contributor: judd +# Contributor: francois +pkgname=perl +pkgver=5.14.0 +pkgrel=1 +pkgdesc="A highly capable, feature-rich programming language" +arch=(i686 x86_64) +license=('GPL' 'PerlArtistic') +url="http://www.perl.org" +groups=('base') +depends=('gdbm' 'db>=4.8' 'coreutils' 'glibc' 'sh') +changelog=ChangeLog +source=(http://www.cpan.org/src/5.0/perl-${pkgver}.tar.bz2 perlbin.sh) +install=perl.install +options=('!makeflags' '!purge') +md5sums=('e7457deea78330c5f8eebb2fd2a45479' + 'f86eb0dba1638ca6d1c8fff1b06c2a71') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + + if [ "${CARCH}" = "x86_64" ]; then + # for x86_64 + arch_opts="-Dcccdlflags='-fPIC'" + else + # for i686 + arch_opts="" + fi + ./Configure -des -Dusethreads -Duseshrplib -Doptimize="${CFLAGS}" \ + -Dprefix=/usr -Dinstallprefix=${pkgdir}/usr -Dvendorprefix=/usr \ + -Dprivlib=/usr/share/perl5/core_perl \ + -Darchlib=/usr/lib/perl5/core_perl \ + -Dsitelib=/usr/share/perl5/site_perl \ + -Dsitearch=/usr/lib/perl5/site_perl \ + -Dvendorlib=/usr/share/perl5/vendor_perl \ + -Dvendorarch=/usr/lib/perl5/vendor_perl \ + -Dscriptdir=/usr/bin/core_perl \ + -Dsitescript=/usr/bin/site_perl \ + -Dvendorscript=/usr/bin/vendor_perl \ + -Dinc_version_list=none \ + -Dman1ext=1perl -Dman3ext=3perl ${arch_opts} + make +} +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make install + + ### Perl Settings ### + # Change man page extensions for site and vendor module builds. + # Use archlinux email address instead of my own. + sed -e '/^man1ext=/ s/1perl/1p/' -e '/^man3ext=/ s/3perl/3pm/' \ + -e "/^cf_email=/ s/'.*'/'kevin@archlinux.org'/" \ + -e "/^perladmin=/ s/'.*'/'kevin@archlinux.org'/" \ + -i ${pkgdir}/usr/lib/perl5/core_perl/Config_heavy.pl + + ### CPAN Settings ### + # Set CPAN default config to use the site directories. + sed -e '/(makepl_arg =>/ s/""/"INSTALLDIRS=site"/' \ + -e '/(mbuildpl_arg =>/ s/""/"installdirs=site"/' \ + -i ${pkgdir}/usr/share/perl5/core_perl/CPAN/FirstTime.pm + + ### CPANPLUS Settings ### + # Set CPANPLUS default config to use the site directories. + sed -e "/{'makemakerflags'}/ s/'';/'INSTALLDIRS=site';/" \ + -e "/{'buildflags'}/ s/'';/'installdirs=site';/" \ + -i ${pkgdir}/usr/share/perl5/core_perl/CPANPLUS/Config.pm + + # Profile script so set paths to perl scripts. + install -D -m755 ${srcdir}/perlbin.sh \ + ${pkgdir}/etc/profile.d/perlbin.sh + + (cd ${pkgdir}/usr/bin; mv perl${pkgver} perl) + (cd ${pkgdir}/usr/bin/core_perl; ln -sf c2ph pstruct; ln -sf s2p psed) + grep -Rl "${pkgdir}" ${pkgdir}/usr | \ + xargs sed -i "s^${pkgdir}^^g" + + # Remove all pod files *except* those under /usr/share/perl5/core_perl/pod/ + # (FS#16488) + rm -f $pkgdir/usr/share/perl5/core_perl/*.pod + for d in $pkgdir/usr/share/perl5/core_perl/*; do + if [ -d $d -a $(basename $d) != "pod" ]; then + find $d -name *.pod -delete + fi + done + find $pkgdir/usr/lib -name *.pod -delete + find $pkgdir -name .packlist -delete +} + diff --git a/testing/perl/fix-h2ph-and-tests.patch b/testing/perl/fix-h2ph-and-tests.patch new file mode 100644 index 000000000..a2d176ec6 --- /dev/null +++ b/testing/perl/fix-h2ph-and-tests.patch @@ -0,0 +1,104 @@ +From 8d66b3f930dc6d88b524d103e304308ae73a46e7 Mon Sep 17 00:00:00 2001 +From: Robin Barker +Date: Thu, 22 Apr 2010 11:51:20 +0100 +Subject: [PATCH 1/1] Fix h2ph and test + +--- + lib/h2ph.t | 12 ++++++++++-- + utils/h2ph.PL | 28 +++++++++++++++++++++++----- + 2 files changed, 33 insertions(+), 7 deletions(-) + +diff --git a/lib/h2ph.t b/lib/h2ph.t +index 27dd7b9..8d62d46 100644 +--- a/lib/h2ph.t ++++ b/lib/h2ph.t +@@ -18,7 +18,7 @@ if (!(-e $extracted_program)) { + exit 0; + } + +-plan(4); ++plan(5); + + # quickly compare two text files + sub txt_compare { +@@ -41,8 +41,16 @@ $result = runperl( progfile => 'lib/h2ph.pht', + stderr => 1 ); + like( $result, qr/syntax OK$/, "output compiles"); + ++$result = runperl( progfile => '_h2ph_pre.ph', ++ switches => ['-c'], ++ stderr => 1 ); ++like( $result, qr/syntax OK$/, "preamble compiles"); ++ + $result = runperl( switches => ["-w"], +- prog => '$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht);'); ++ stderr => 1, ++ prog => <<'PROG' ); ++$SIG{__WARN__} = sub { die $_[0] }; require q(lib/h2ph.pht); ++PROG + is( $result, '', "output free of warnings" ); + + # cleanup +diff --git a/utils/h2ph.PL b/utils/h2ph.PL +index 8f56db4..1255807 100644 +--- a/utils/h2ph.PL ++++ b/utils/h2ph.PL +@@ -401,7 +401,10 @@ if ($opt_e && (scalar(keys %bad_file) > 0)) { + exit $Exit; + + sub expr { +- $new = '"(assembly code)"' and return if /\b__asm__\b/; # freak out. ++ if (/\b__asm__\b/) { # freak out ++ $new = '"(assembly code)"'; ++ return ++ } + my $joined_args; + if(keys(%curargs)) { + $joined_args = join('|', keys(%curargs)); +@@ -770,7 +773,7 @@ sub inc_dirs + sub build_preamble_if_necessary + { + # Increment $VERSION every time this function is modified: +- my $VERSION = 2; ++ my $VERSION = 3; + my $preamble = "$Dest_dir/_h2ph_pre.ph"; + + # Can we skip building the preamble file? +@@ -798,7 +801,16 @@ sub build_preamble_if_necessary + # parenthesized value: d=(v) + $define{$_} = $1; + } +- if ($define{$_} =~ /^([+-]?(\d+)?\.\d+([eE][+-]?\d+)?)[FL]?$/) { ++ if (/^(\w+)\((\w)\)$/) { ++ my($macro, $arg) = ($1, $2); ++ my $def = $define{$_}; ++ $def =~ s/$arg/\$\{$arg\}/g; ++ print PREAMBLE <