Date: Tuesday, June 2, 2015 @ 10:04:36 Author: bluewind Revision: 240178
archrelease: copy trunk to staging-i686, staging-x86_64 Added: perl/repos/staging-i686/ perl/repos/staging-i686/PKGBUILD (from rev 240177, perl/trunk/PKGBUILD) perl/repos/staging-i686/generate-rebuild-list.sh (from rev 240177, perl/trunk/generate-rebuild-list.sh) perl/repos/staging-i686/patchprov (from rev 240177, perl/trunk/patchprov) perl/repos/staging-i686/perl-binary-module-dependency-1.template (from rev 240177, perl/trunk/perl-binary-module-dependency-1.template) perl/repos/staging-i686/perlbin.csh (from rev 240177, perl/trunk/perlbin.csh) perl/repos/staging-i686/perlbin.sh (from rev 240177, perl/trunk/perlbin.sh) perl/repos/staging-i686/upgpkg (from rev 240177, perl/trunk/upgpkg) perl/repos/staging-x86_64/ perl/repos/staging-x86_64/PKGBUILD (from rev 240177, perl/trunk/PKGBUILD) perl/repos/staging-x86_64/generate-rebuild-list.sh (from rev 240177, perl/trunk/generate-rebuild-list.sh) perl/repos/staging-x86_64/patchprov (from rev 240177, perl/trunk/patchprov) perl/repos/staging-x86_64/perl-binary-module-dependency-1.template (from rev 240177, perl/trunk/perl-binary-module-dependency-1.template) perl/repos/staging-x86_64/perlbin.csh (from rev 240177, perl/trunk/perlbin.csh) perl/repos/staging-x86_64/perlbin.sh (from rev 240177, perl/trunk/perlbin.sh) perl/repos/staging-x86_64/upgpkg (from rev 240177, perl/trunk/upgpkg) ---------------------------------------------------------+ staging-i686/PKGBUILD | 230 ++++++++++++ staging-i686/generate-rebuild-list.sh | 4 staging-i686/patchprov | 259 ++++++++++++++ staging-i686/perl-binary-module-dependency-1.template | 5 staging-i686/perlbin.csh | 15 staging-i686/perlbin.sh | 18 staging-i686/upgpkg | 4 staging-x86_64/PKGBUILD | 230 ++++++++++++ staging-x86_64/generate-rebuild-list.sh | 4 staging-x86_64/patchprov | 259 ++++++++++++++ staging-x86_64/perl-binary-module-dependency-1.template | 5 staging-x86_64/perlbin.csh | 15 staging-x86_64/perlbin.sh | 18 staging-x86_64/upgpkg | 4 14 files changed, 1070 insertions(+) Copied: perl/repos/staging-i686/PKGBUILD (from rev 240177, perl/trunk/PKGBUILD) =================================================================== --- staging-i686/PKGBUILD (rev 0) +++ staging-i686/PKGBUILD 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,230 @@ +# $Id$ +# Maintainer: Florian Pritz <bluew...@xinu.at> +# Contributor: Angel Velasquez <an...@archlinux.org> +# Contributor: kevin <kevin.archlinux.org> +# Contributor: judd <jvinet.zeroflux.org> +# Contributor: francois <francois.archlinux.org> + +pkgname=perl +pkgver=5.22.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' 'glibc') +# NOTE: This array is automatically generated by `./patchprov`. +# If you want to add entries, do so in the next array. +provides=('perl-archive-tar=2.04' + 'perl-attribute-handlers=0.97' + 'perl-autodie=2.26' + 'perl-autoloader=5.74' + 'perl-autouse=1.08' + 'perl-b-debug=1.23' + 'perl-base=2.22' + 'perl-bignum=0.39' + 'perl-carp=1.36' + 'perl-compress-raw-bzip2=2.068' + 'perl-compress-raw-zlib=2.068' + 'perl-config-perl-v=0.24' + 'perl-constant=1.33' + 'perl-cpan-meta-requirements=2.132' + 'perl-cpan-meta-yaml=0.012' + 'perl-cpan-meta=2.150001' + 'perl-cpan=2.11' + 'perl-data-dumper=2.158' + 'perl-db_file=1.835' + 'perl-devel-ppport=3.31' + 'perl-devel-selfstubber=1.05' + 'perl-digest-md5=2.54' + 'perl-digest-sha=5.95' + 'perl-digest=1.17' + 'perl-dumpvalue=1.17' + 'perl-encode=2.72' + 'perl-encoding-warnings=0.11' + 'perl-env=1.04' + 'perl-experimental=0.013' + 'perl-exporter=5.72' + 'perl-extutils-cbuilder=0.280221' + 'perl-extutils-command=1.20' + 'perl-extutils-constant=0.23' + 'perl-extutils-install=2.04' + 'perl-extutils-makemaker=7.04_01' + 'perl-extutils-manifest=1.70' + 'perl-extutils-parsexs=3.28' + 'perl-file-fetch=0.48' + 'perl-file-path=2.09' + 'perl-file-temp=0.2304' + 'perl-filter-simple=0.92' + 'perl-filter-util-call=1.54' + 'perl-getopt-long=2.45' + 'perl-http-tiny=0.054' + 'perl-i18n-collate=1.02' + 'perl-i18n-langtags=0.40' + 'perl-if=0.0604' + 'perl-io-compress=2.068' + 'perl-io-socket-ip=0.37' + 'perl-io-zlib=1.10' + 'perl-io=1.35' + 'perl-ipc-cmd=0.92' + 'perl-ipc-sysv=2.04' + 'perl-json-pp=2.27300' + 'perl-lib=0.63' + 'perl-libnet=3.05' + 'perl-locale-codes=3.34' + 'perl-locale-maketext-simple=0.21' + 'perl-locale-maketext=1.26' + 'perl-math-bigint-fastcalc=0.31' + 'perl-math-bigint=1.9997' + 'perl-math-bigrat=0.2608' + 'perl-math-complex=1.59' + 'perl-memoize=1.03' + 'perl-mime-base64=3.15' + 'perl-module-corelist=5.20150520' + 'perl-module-load-conditional=0.64' + 'perl-module-load=0.32' + 'perl-module-loaded=0.08' + 'perl-module-metadata=1.000026' + 'perl-net-ping=2.43' + 'perl-params-check=0.38' + 'perl-parent=0.232' + 'perl-parse-cpan-meta=1.4414' + 'perl-pathtools=3.56' + 'perl-perl-ostype=1.008' + 'perl-perlfaq=5.021009' + 'perl-perlio-via-quotedprint=0.08' + 'perl-pod-checker=1.60' + 'perl-pod-escapes=1.07' + 'perl-pod-parser=1.63' + 'perl-pod-perldoc=3.25' + 'perl-pod-simple=3.29' + 'perl-pod-usage=1.64' + 'perl-podlators=2.5.3' + 'perl-safe=2.39' + 'perl-scalar-list-utils=1.41' + 'perl-search-dict=1.07' + 'perl-selfloader=1.22' + 'perl-socket=2.018' + 'perl-storable=2.53' + 'perl-sys-syslog=0.33' + 'perl-term-ansicolor=4.03' + 'perl-term-cap=1.15' + 'perl-term-complete=1.403' + 'perl-term-readline=1.15' + 'perl-test-harness=3.35' + 'perl-test-simple=1.001014' + 'perl-test=1.26' + 'perl-text-abbrev=1.02' + 'perl-text-balanced=2.03' + 'perl-text-parsewords=3.30' + 'perl-text-tabs=2013.0523' + 'perl-thread-queue=3.05' + 'perl-thread-semaphore=2.12' + 'perl-threads-shared=1.48' + 'perl-threads=2.01' + 'perl-tie-file=1.01' + 'perl-tie-refhash=1.39' + 'perl-time-hires=1.9726' + 'perl-time-local=1.2300' + 'perl-time-piece=1.29' + 'perl-unicode-collate=1.12' + 'perl-unicode-normalize=1.18' + 'perl-version=0.9909' + 'perl-xsloader=0.20') +# Add your own provides here +provides=(${provides[@]}) +source=(http://www.cpan.org/src/5.0/perl-${pkgver}.tar.bz2 + perlbin.sh + perlbin.csh + perl-binary-module-dependency-1.template) +options=('makeflags' '!purge' 'emptydirs') +md5sums=('f67b152160431b3180fb766bdc2d02e2' + '5ed2542fdb9a60682f215bd33701e61a' + '1f0cbbee783e8a6d32f01be5118e0d5e' + '2a366dfc783c460764cde0caf88a23af') + +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 -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} \ + -Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}" + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + TEST_JOBS=$(echo $MAKEFLAGS | sed 's/.*-j\([0-9][0-9]*\).*/\1/') make test_harness +# make test +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR="$pkgdir" install + + for template in "$srcdir/"*.template; do + install -Dm644 "$template" "$pkgdir/usr/share/makepkg-template/${template##*/}" + done + ln -s perl-binary-module-dependency-1.template "$pkgdir/usr/share/makepkg-template/"perl-binary-module-dependency.template + + ### Perl Settings ### + # Change man page extensions for site and vendor module builds. + # Set no mail address since bug reports should go to the bug tracker + # and not someone's email. + sed -e '/^man1ext=/ s/1perl/1p/' -e '/^man3ext=/ s/3perl/3pm/' \ + -e "/^cf_email=/ s/'.*'/''/" \ + -e "/^perladmin=/ s/'.*'/''/" \ + -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 + + # 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 + + # Add the dirs so new installs will already have them in PATH once they + # install their first perl programm + install -d -m755 "$pkgdir/usr/bin/vendor_perl" + install -d -m755 "$pkgdir/usr/bin/site_perl" + + (cd ${pkgdir}/usr/bin; mv perl${pkgver} perl) + (cd ${pkgdir}/usr/bin/core_perl; ln -sf c2ph pstruct; ln -sf s2p psed) + + # 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 +} Copied: perl/repos/staging-i686/generate-rebuild-list.sh (from rev 240177, perl/trunk/generate-rebuild-list.sh) =================================================================== --- staging-i686/generate-rebuild-list.sh (rev 0) +++ staging-i686/generate-rebuild-list.sh 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,4 @@ +#!/bin/sh + +pkgfile -r "^/usr/lib/perl5/vendor_perl/auto/.*\.so$" | sed 's#^.*/##' | sort -u +ssh celestia PATH=/usr/local/bin:\$PATH\; /home/bluewind/bin/sogrep-all libperl.so Copied: perl/repos/staging-i686/patchprov (from rev 240177, perl/trunk/patchprov) =================================================================== --- staging-i686/patchprov (rev 0) +++ staging-i686/patchprov 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,259 @@ +#!/usr/bin/perl +## +## Name: +## patchprov +## +## Description: +## Patch the provides list in the perl package PKGBUILD. Scan the appropriate +## directories under the perl source tree for directories containing dists +## similar to CPAN dists. Search the files in the distributions for VERSION +## strings, which are perl expressions. Filters these version strings through +## the perl interpreter, then transform the dist. names and versions into +## package names and versions. Finally, we cut out the "provides" array from the +## PKGBUILD and replace it with the newer version. +## +## Usage: +## patchprov [path to perl source tree] [path to PKGBUILD] +## +## Caveats: +## The path code is not platform independent and will only work in POSIX. +## +## Changelog: +## 06/10/14 JD Rewrite from scratch for perl 5.20.0 and ArchLinux. +## +## Authors: +## Justin "juster" Davis <jrc...@gmail.com> +## + +use warnings; +use strict; + +sub err +{ + print STDERR "patchprov: error: @_\n"; + exit 1; +} + +## Extract the dist. name from its containing directory. +sub path_dist +{ + my($path) = @_; + $path =~ s{^.*/}{}; + return $path; +} + +## Create a path like $path/lib/Foo/Bar.pm for Foo::Bar. +sub lib_modpath +{ + my($path, $modname) = @_; + $modname =~ s{::}{/}g; + return "$path/lib/$modname.pm"; +} + +## Create a path to a file in the containing directory, named after +## the last segment of the module name, with suffix attached. +sub dumb_modpath +{ + my($path, $modname, $suffix) = @_; + $modname =~ s{^.*::}{}; + return "$path/$modname$suffix"; +} + +## Find a source file contained in the directory that we can scrape the +## perl versions string from. +my %distmods = ( + 'PathTools' => 'Cwd', + 'Scalar-List-Utils' => 'List::Util', + 'IO-Compress' => 'IO::Compress::Gzip', +); +sub dist_srcpath +{ + my($path) = @_; + my $distname = path_dist($path); + my $modname; + if(exists $distmods{$distname}){ + $modname = $distmods{$distname}; + }else{ + $modname = $distname; + $modname =~ s/-/::/g; + } + my @srcpaths = ( + lib_modpath($path, $modname), + dumb_modpath($path, $modname, '.pm'), + dumb_modpath($path, $modname, '_pm.PL'), + "$path/VERSION", # for podlators + ); + for my $src (@srcpaths){ + return $src if(-f $src); + } + return undef; +} + +## Scrape the version string for the module file or Makefile.PL. +sub scrape_verln +{ + my($srcpath) = @_; + open my $fh, '<', $srcpath or die "open: $!"; + while(my $ln = <$fh>){ + if($ln =~ s/^.*VERSION *=>? *//){ + close $fh; + return $ln; + } + } + close $fh; + err("failed to find VERSION in $srcpath"); +} + +## Scrape the version string from the module source file. +sub scrape_modver +{ + my($srcpath) = @_; + return scrape_verln($srcpath); +} + +## Scrape the version string from the Makefile.PL. (for libnet) +sub scrape_mkplver +{ + my($srcpath) = @_; + my $verln = scrape_verln($srcpath); + $verln =~ s/,/;/; + return $verln; +} + +## Scrape the version string from a file inside the dist dir. +sub distpath_ver +{ + my($distpath) = @_; + my $srcpath = dist_srcpath($distpath); + my $mkplpath = "$distpath/Makefile.PL"; + if(defined $srcpath){ + return scrape_modver($srcpath); + }elsif(-f $mkplpath){ + return scrape_mkplver($mkplpath); + }else{ + err("failed to scrape version from $distpath"); + } +} + +## Search the base path for the dist dirs and extract their respective +## version strings. +sub find_distvers +{ + my($basepath) = @_; + opendir my $dh, $basepath or die "opendir: $!"; + my @dirs = grep { -d $_ } map { "$basepath/$_" } grep { !/^[.]/ } readdir $dh; + closedir $dh; + + my @distvers; + for my $dpath (@dirs){ + push @distvers, [ path_dist($dpath), distpath_ver($dpath) ]; + } + return @distvers; +} + +## Maps an aref of dist name/perl version strings (perl expressions) to +## a package name and version string suitable for a PKGBUILD. +sub pkgspec +{ + my($dist, $ver) = @$_; + $dist =~ tr/A-Z/a-z/; + $ver = eval $ver; + return "perl-$dist=$ver"; +} + +## Searches the perl source dir provided for a list of packages which +## correspond to the core distributions bundled within in. +sub perlcorepkgs +{ + my($perlpath) = @_; + my @dirs = ("$perlpath/cpan", "$perlpath/dist"); + my @provs; + for my $d (@dirs){ + if(!-d $d){ + err("$d is not a valid directory"); + } + push @provs, map pkgspec, find_distvers($d); + } + return @provs; +} + +## Formats the provided lines into a neatly formatted bash array. The first arg +## is the name of the bash variable to assign it to. +sub basharray +{ + my $vname = shift; + + ## Sort entries and surround with quotes. + my @lns = sort map { qq{'$_'} } @_; + $lns[0] = "$vname=($lns[0]"; + + ## Indent lines for OCD geeks. + if(@lns > 1){ + my $ind = length($vname) + 2; + splice @lns, 1, @lns-1, + map { (' ' x $ind) . $_ } @lns[1 .. $#lns]; + } + + $lns[$#lns] .= ')'; + return map { "$_\n" } @lns; +} + +## Patch the PKGBUILD at the given path with a new provides array, overwriting +## the old one. +sub patchpb +{ + my $pbpath = shift; + open my $fh, '<', $pbpath or die "open: $!"; + my @lines = <$fh>; + close $fh; + + my($i, $j); + for($i = 0; $i < @lines; $i++){ + last if($lines[$i] =~ /^provides=/); + } + if($i == @lines){ + err("failed to find provides array in PKGBUILD"); + } + for($j = $i; $j < @lines; $j++){ + last if($lines[$j] =~ /[)]/); + } + if($j == @lines){ + err("failed to find end of provides array"); + } + + splice @lines, $i, $j-$i+1, + basharray('provides', grep { !/win32|next/ } @_); + + ## Avoid corrupting the existing PKGBUILD in case of a crash, etc. + if(-f "$pbpath.$$"){ + err("pbpath.$$ temporary file already exists, please remove it."); + } + open $fh, '>', "$pbpath.$$" or die "open: $!"; + print $fh @lines; + close $fh or die "close: $!"; + rename "$pbpath.$$", "$pbpath" or die "rename: $!"; + + return; +} + +## Program entrypoint. +sub main +{ + if(@_ < 2){ + print STDERR "usage: $0 [perl source path] [PKGBUILD path]\n"; + exit 2; + } + my($perlpath, $pbpath) = @_; + if(!-f $pbpath){ + err("$pbpath is not a valid file."); + }elsif(!-d $perlpath){ + err("$perlpath is not a valid directory."); + }else{ + patchpb($pbpath, perlcorepkgs($perlpath)); + } + exit 0; +} + +main(@ARGV); + +# EOF Copied: perl/repos/staging-i686/perl-binary-module-dependency-1.template (from rev 240177, perl/trunk/perl-binary-module-dependency-1.template) =================================================================== --- staging-i686/perl-binary-module-dependency-1.template (rev 0) +++ staging-i686/perl-binary-module-dependency-1.template 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,5 @@ +if [[ $(find "$pkgdir/usr/lib/perl5/" -name "*.so") ]]; then + _perlver_min=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]);') + _perlver_max=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]+1);') + depends+=("perl>=$_perlver_min" "perl<$_perlver_max") +fi Copied: perl/repos/staging-i686/perlbin.csh (from rev 240177, perl/trunk/perlbin.csh) =================================================================== --- staging-i686/perlbin.csh (rev 0) +++ staging-i686/perlbin.csh 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,15 @@ +# 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 Copied: perl/repos/staging-i686/perlbin.sh (from rev 240177, perl/trunk/perlbin.sh) =================================================================== --- staging-i686/perlbin.sh (rev 0) +++ staging-i686/perlbin.sh 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,18 @@ +# 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 ] && 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/core_perl ] && PATH=$PATH:/usr/bin/core_perl + +export PATH + +# If you have modules in non-standard directories you can add them here. +#export PERLLIB=dir1:dir2 + Copied: perl/repos/staging-i686/upgpkg (from rev 240177, perl/trunk/upgpkg) =================================================================== --- staging-i686/upgpkg (rev 0) +++ staging-i686/upgpkg 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,4 @@ +upgpkg_build() { + makepkg -o + ./patchprov src/perl-$pkgver PKGBUILD +} Copied: perl/repos/staging-x86_64/PKGBUILD (from rev 240177, perl/trunk/PKGBUILD) =================================================================== --- staging-x86_64/PKGBUILD (rev 0) +++ staging-x86_64/PKGBUILD 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,230 @@ +# $Id$ +# Maintainer: Florian Pritz <bluew...@xinu.at> +# Contributor: Angel Velasquez <an...@archlinux.org> +# Contributor: kevin <kevin.archlinux.org> +# Contributor: judd <jvinet.zeroflux.org> +# Contributor: francois <francois.archlinux.org> + +pkgname=perl +pkgver=5.22.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' 'glibc') +# NOTE: This array is automatically generated by `./patchprov`. +# If you want to add entries, do so in the next array. +provides=('perl-archive-tar=2.04' + 'perl-attribute-handlers=0.97' + 'perl-autodie=2.26' + 'perl-autoloader=5.74' + 'perl-autouse=1.08' + 'perl-b-debug=1.23' + 'perl-base=2.22' + 'perl-bignum=0.39' + 'perl-carp=1.36' + 'perl-compress-raw-bzip2=2.068' + 'perl-compress-raw-zlib=2.068' + 'perl-config-perl-v=0.24' + 'perl-constant=1.33' + 'perl-cpan-meta-requirements=2.132' + 'perl-cpan-meta-yaml=0.012' + 'perl-cpan-meta=2.150001' + 'perl-cpan=2.11' + 'perl-data-dumper=2.158' + 'perl-db_file=1.835' + 'perl-devel-ppport=3.31' + 'perl-devel-selfstubber=1.05' + 'perl-digest-md5=2.54' + 'perl-digest-sha=5.95' + 'perl-digest=1.17' + 'perl-dumpvalue=1.17' + 'perl-encode=2.72' + 'perl-encoding-warnings=0.11' + 'perl-env=1.04' + 'perl-experimental=0.013' + 'perl-exporter=5.72' + 'perl-extutils-cbuilder=0.280221' + 'perl-extutils-command=1.20' + 'perl-extutils-constant=0.23' + 'perl-extutils-install=2.04' + 'perl-extutils-makemaker=7.04_01' + 'perl-extutils-manifest=1.70' + 'perl-extutils-parsexs=3.28' + 'perl-file-fetch=0.48' + 'perl-file-path=2.09' + 'perl-file-temp=0.2304' + 'perl-filter-simple=0.92' + 'perl-filter-util-call=1.54' + 'perl-getopt-long=2.45' + 'perl-http-tiny=0.054' + 'perl-i18n-collate=1.02' + 'perl-i18n-langtags=0.40' + 'perl-if=0.0604' + 'perl-io-compress=2.068' + 'perl-io-socket-ip=0.37' + 'perl-io-zlib=1.10' + 'perl-io=1.35' + 'perl-ipc-cmd=0.92' + 'perl-ipc-sysv=2.04' + 'perl-json-pp=2.27300' + 'perl-lib=0.63' + 'perl-libnet=3.05' + 'perl-locale-codes=3.34' + 'perl-locale-maketext-simple=0.21' + 'perl-locale-maketext=1.26' + 'perl-math-bigint-fastcalc=0.31' + 'perl-math-bigint=1.9997' + 'perl-math-bigrat=0.2608' + 'perl-math-complex=1.59' + 'perl-memoize=1.03' + 'perl-mime-base64=3.15' + 'perl-module-corelist=5.20150520' + 'perl-module-load-conditional=0.64' + 'perl-module-load=0.32' + 'perl-module-loaded=0.08' + 'perl-module-metadata=1.000026' + 'perl-net-ping=2.43' + 'perl-params-check=0.38' + 'perl-parent=0.232' + 'perl-parse-cpan-meta=1.4414' + 'perl-pathtools=3.56' + 'perl-perl-ostype=1.008' + 'perl-perlfaq=5.021009' + 'perl-perlio-via-quotedprint=0.08' + 'perl-pod-checker=1.60' + 'perl-pod-escapes=1.07' + 'perl-pod-parser=1.63' + 'perl-pod-perldoc=3.25' + 'perl-pod-simple=3.29' + 'perl-pod-usage=1.64' + 'perl-podlators=2.5.3' + 'perl-safe=2.39' + 'perl-scalar-list-utils=1.41' + 'perl-search-dict=1.07' + 'perl-selfloader=1.22' + 'perl-socket=2.018' + 'perl-storable=2.53' + 'perl-sys-syslog=0.33' + 'perl-term-ansicolor=4.03' + 'perl-term-cap=1.15' + 'perl-term-complete=1.403' + 'perl-term-readline=1.15' + 'perl-test-harness=3.35' + 'perl-test-simple=1.001014' + 'perl-test=1.26' + 'perl-text-abbrev=1.02' + 'perl-text-balanced=2.03' + 'perl-text-parsewords=3.30' + 'perl-text-tabs=2013.0523' + 'perl-thread-queue=3.05' + 'perl-thread-semaphore=2.12' + 'perl-threads-shared=1.48' + 'perl-threads=2.01' + 'perl-tie-file=1.01' + 'perl-tie-refhash=1.39' + 'perl-time-hires=1.9726' + 'perl-time-local=1.2300' + 'perl-time-piece=1.29' + 'perl-unicode-collate=1.12' + 'perl-unicode-normalize=1.18' + 'perl-version=0.9909' + 'perl-xsloader=0.20') +# Add your own provides here +provides=(${provides[@]}) +source=(http://www.cpan.org/src/5.0/perl-${pkgver}.tar.bz2 + perlbin.sh + perlbin.csh + perl-binary-module-dependency-1.template) +options=('makeflags' '!purge' 'emptydirs') +md5sums=('f67b152160431b3180fb766bdc2d02e2' + '5ed2542fdb9a60682f215bd33701e61a' + '1f0cbbee783e8a6d32f01be5118e0d5e' + '2a366dfc783c460764cde0caf88a23af') + +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 -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} \ + -Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}" + make +} + +check() { + cd ${srcdir}/${pkgname}-${pkgver} + TEST_JOBS=$(echo $MAKEFLAGS | sed 's/.*-j\([0-9][0-9]*\).*/\1/') make test_harness +# make test +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + make DESTDIR="$pkgdir" install + + for template in "$srcdir/"*.template; do + install -Dm644 "$template" "$pkgdir/usr/share/makepkg-template/${template##*/}" + done + ln -s perl-binary-module-dependency-1.template "$pkgdir/usr/share/makepkg-template/"perl-binary-module-dependency.template + + ### Perl Settings ### + # Change man page extensions for site and vendor module builds. + # Set no mail address since bug reports should go to the bug tracker + # and not someone's email. + sed -e '/^man1ext=/ s/1perl/1p/' -e '/^man3ext=/ s/3perl/3pm/' \ + -e "/^cf_email=/ s/'.*'/''/" \ + -e "/^perladmin=/ s/'.*'/''/" \ + -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 + + # 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 + + # Add the dirs so new installs will already have them in PATH once they + # install their first perl programm + install -d -m755 "$pkgdir/usr/bin/vendor_perl" + install -d -m755 "$pkgdir/usr/bin/site_perl" + + (cd ${pkgdir}/usr/bin; mv perl${pkgver} perl) + (cd ${pkgdir}/usr/bin/core_perl; ln -sf c2ph pstruct; ln -sf s2p psed) + + # 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 +} Copied: perl/repos/staging-x86_64/generate-rebuild-list.sh (from rev 240177, perl/trunk/generate-rebuild-list.sh) =================================================================== --- staging-x86_64/generate-rebuild-list.sh (rev 0) +++ staging-x86_64/generate-rebuild-list.sh 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,4 @@ +#!/bin/sh + +pkgfile -r "^/usr/lib/perl5/vendor_perl/auto/.*\.so$" | sed 's#^.*/##' | sort -u +ssh celestia PATH=/usr/local/bin:\$PATH\; /home/bluewind/bin/sogrep-all libperl.so Copied: perl/repos/staging-x86_64/patchprov (from rev 240177, perl/trunk/patchprov) =================================================================== --- staging-x86_64/patchprov (rev 0) +++ staging-x86_64/patchprov 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,259 @@ +#!/usr/bin/perl +## +## Name: +## patchprov +## +## Description: +## Patch the provides list in the perl package PKGBUILD. Scan the appropriate +## directories under the perl source tree for directories containing dists +## similar to CPAN dists. Search the files in the distributions for VERSION +## strings, which are perl expressions. Filters these version strings through +## the perl interpreter, then transform the dist. names and versions into +## package names and versions. Finally, we cut out the "provides" array from the +## PKGBUILD and replace it with the newer version. +## +## Usage: +## patchprov [path to perl source tree] [path to PKGBUILD] +## +## Caveats: +## The path code is not platform independent and will only work in POSIX. +## +## Changelog: +## 06/10/14 JD Rewrite from scratch for perl 5.20.0 and ArchLinux. +## +## Authors: +## Justin "juster" Davis <jrc...@gmail.com> +## + +use warnings; +use strict; + +sub err +{ + print STDERR "patchprov: error: @_\n"; + exit 1; +} + +## Extract the dist. name from its containing directory. +sub path_dist +{ + my($path) = @_; + $path =~ s{^.*/}{}; + return $path; +} + +## Create a path like $path/lib/Foo/Bar.pm for Foo::Bar. +sub lib_modpath +{ + my($path, $modname) = @_; + $modname =~ s{::}{/}g; + return "$path/lib/$modname.pm"; +} + +## Create a path to a file in the containing directory, named after +## the last segment of the module name, with suffix attached. +sub dumb_modpath +{ + my($path, $modname, $suffix) = @_; + $modname =~ s{^.*::}{}; + return "$path/$modname$suffix"; +} + +## Find a source file contained in the directory that we can scrape the +## perl versions string from. +my %distmods = ( + 'PathTools' => 'Cwd', + 'Scalar-List-Utils' => 'List::Util', + 'IO-Compress' => 'IO::Compress::Gzip', +); +sub dist_srcpath +{ + my($path) = @_; + my $distname = path_dist($path); + my $modname; + if(exists $distmods{$distname}){ + $modname = $distmods{$distname}; + }else{ + $modname = $distname; + $modname =~ s/-/::/g; + } + my @srcpaths = ( + lib_modpath($path, $modname), + dumb_modpath($path, $modname, '.pm'), + dumb_modpath($path, $modname, '_pm.PL'), + "$path/VERSION", # for podlators + ); + for my $src (@srcpaths){ + return $src if(-f $src); + } + return undef; +} + +## Scrape the version string for the module file or Makefile.PL. +sub scrape_verln +{ + my($srcpath) = @_; + open my $fh, '<', $srcpath or die "open: $!"; + while(my $ln = <$fh>){ + if($ln =~ s/^.*VERSION *=>? *//){ + close $fh; + return $ln; + } + } + close $fh; + err("failed to find VERSION in $srcpath"); +} + +## Scrape the version string from the module source file. +sub scrape_modver +{ + my($srcpath) = @_; + return scrape_verln($srcpath); +} + +## Scrape the version string from the Makefile.PL. (for libnet) +sub scrape_mkplver +{ + my($srcpath) = @_; + my $verln = scrape_verln($srcpath); + $verln =~ s/,/;/; + return $verln; +} + +## Scrape the version string from a file inside the dist dir. +sub distpath_ver +{ + my($distpath) = @_; + my $srcpath = dist_srcpath($distpath); + my $mkplpath = "$distpath/Makefile.PL"; + if(defined $srcpath){ + return scrape_modver($srcpath); + }elsif(-f $mkplpath){ + return scrape_mkplver($mkplpath); + }else{ + err("failed to scrape version from $distpath"); + } +} + +## Search the base path for the dist dirs and extract their respective +## version strings. +sub find_distvers +{ + my($basepath) = @_; + opendir my $dh, $basepath or die "opendir: $!"; + my @dirs = grep { -d $_ } map { "$basepath/$_" } grep { !/^[.]/ } readdir $dh; + closedir $dh; + + my @distvers; + for my $dpath (@dirs){ + push @distvers, [ path_dist($dpath), distpath_ver($dpath) ]; + } + return @distvers; +} + +## Maps an aref of dist name/perl version strings (perl expressions) to +## a package name and version string suitable for a PKGBUILD. +sub pkgspec +{ + my($dist, $ver) = @$_; + $dist =~ tr/A-Z/a-z/; + $ver = eval $ver; + return "perl-$dist=$ver"; +} + +## Searches the perl source dir provided for a list of packages which +## correspond to the core distributions bundled within in. +sub perlcorepkgs +{ + my($perlpath) = @_; + my @dirs = ("$perlpath/cpan", "$perlpath/dist"); + my @provs; + for my $d (@dirs){ + if(!-d $d){ + err("$d is not a valid directory"); + } + push @provs, map pkgspec, find_distvers($d); + } + return @provs; +} + +## Formats the provided lines into a neatly formatted bash array. The first arg +## is the name of the bash variable to assign it to. +sub basharray +{ + my $vname = shift; + + ## Sort entries and surround with quotes. + my @lns = sort map { qq{'$_'} } @_; + $lns[0] = "$vname=($lns[0]"; + + ## Indent lines for OCD geeks. + if(@lns > 1){ + my $ind = length($vname) + 2; + splice @lns, 1, @lns-1, + map { (' ' x $ind) . $_ } @lns[1 .. $#lns]; + } + + $lns[$#lns] .= ')'; + return map { "$_\n" } @lns; +} + +## Patch the PKGBUILD at the given path with a new provides array, overwriting +## the old one. +sub patchpb +{ + my $pbpath = shift; + open my $fh, '<', $pbpath or die "open: $!"; + my @lines = <$fh>; + close $fh; + + my($i, $j); + for($i = 0; $i < @lines; $i++){ + last if($lines[$i] =~ /^provides=/); + } + if($i == @lines){ + err("failed to find provides array in PKGBUILD"); + } + for($j = $i; $j < @lines; $j++){ + last if($lines[$j] =~ /[)]/); + } + if($j == @lines){ + err("failed to find end of provides array"); + } + + splice @lines, $i, $j-$i+1, + basharray('provides', grep { !/win32|next/ } @_); + + ## Avoid corrupting the existing PKGBUILD in case of a crash, etc. + if(-f "$pbpath.$$"){ + err("pbpath.$$ temporary file already exists, please remove it."); + } + open $fh, '>', "$pbpath.$$" or die "open: $!"; + print $fh @lines; + close $fh or die "close: $!"; + rename "$pbpath.$$", "$pbpath" or die "rename: $!"; + + return; +} + +## Program entrypoint. +sub main +{ + if(@_ < 2){ + print STDERR "usage: $0 [perl source path] [PKGBUILD path]\n"; + exit 2; + } + my($perlpath, $pbpath) = @_; + if(!-f $pbpath){ + err("$pbpath is not a valid file."); + }elsif(!-d $perlpath){ + err("$perlpath is not a valid directory."); + }else{ + patchpb($pbpath, perlcorepkgs($perlpath)); + } + exit 0; +} + +main(@ARGV); + +# EOF Copied: perl/repos/staging-x86_64/perl-binary-module-dependency-1.template (from rev 240177, perl/trunk/perl-binary-module-dependency-1.template) =================================================================== --- staging-x86_64/perl-binary-module-dependency-1.template (rev 0) +++ staging-x86_64/perl-binary-module-dependency-1.template 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,5 @@ +if [[ $(find "$pkgdir/usr/lib/perl5/" -name "*.so") ]]; then + _perlver_min=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]);') + _perlver_max=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]+1);') + depends+=("perl>=$_perlver_min" "perl<$_perlver_max") +fi Copied: perl/repos/staging-x86_64/perlbin.csh (from rev 240177, perl/trunk/perlbin.csh) =================================================================== --- staging-x86_64/perlbin.csh (rev 0) +++ staging-x86_64/perlbin.csh 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,15 @@ +# 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 Copied: perl/repos/staging-x86_64/perlbin.sh (from rev 240177, perl/trunk/perlbin.sh) =================================================================== --- staging-x86_64/perlbin.sh (rev 0) +++ staging-x86_64/perlbin.sh 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,18 @@ +# 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 ] && 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/core_perl ] && PATH=$PATH:/usr/bin/core_perl + +export PATH + +# If you have modules in non-standard directories you can add them here. +#export PERLLIB=dir1:dir2 + Copied: perl/repos/staging-x86_64/upgpkg (from rev 240177, perl/trunk/upgpkg) =================================================================== --- staging-x86_64/upgpkg (rev 0) +++ staging-x86_64/upgpkg 2015-06-02 08:04:36 UTC (rev 240178) @@ -0,0 +1,4 @@ +upgpkg_build() { + makepkg -o + ./patchprov src/perl-$pkgver PKGBUILD +}