[arch-commits] Commit in perl/trunk (PKGBUILD patchprov provides.pl upgpkg)
Florian Pritz
bluewind at nymeria.archlinux.org
Wed Jun 11 08:48:12 UTC 2014
Date: Wednesday, June 11, 2014 @ 10:48:11
Author: bluewind
Revision: 214972
Move provides to PKGBUILD directly; remove hacks
upgpkg: perl 5.20.0-4
Added:
perl/trunk/patchprov
perl/trunk/upgpkg
Modified:
perl/trunk/PKGBUILD
Deleted:
perl/trunk/provides.pl
-------------+
PKGBUILD | 140 +++++++++++++++++++++++---
patchprov | 259 ++++++++++++++++++++++++++++++++++++++++++++++++
provides.pl | 310 ----------------------------------------------------------
upgpkg | 4
4 files changed, 389 insertions(+), 324 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-06-11 06:48:51 UTC (rev 214971)
+++ PKGBUILD 2014-06-11 08:48:11 UTC (rev 214972)
@@ -7,7 +7,7 @@
pkgname=perl
pkgver=5.20.0
-pkgrel=3
+pkgrel=4
pkgdesc="A highly capable, feature-rich programming language"
arch=(i686 x86_64)
license=('GPL' 'PerlArtistic')
@@ -14,21 +14,137 @@
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=1.96'
+ 'perl-attribute-handlers=0.96'
+ 'perl-autodie=2.23'
+ 'perl-autoloader=5.74'
+ 'perl-autouse=1.08'
+ 'perl-b-debug=1.19'
+ 'perl-base=2.22'
+ 'perl-bignum=0.37'
+ 'perl-carp=1.3301'
+ 'perl-cgi=3.65'
+ 'perl-compress-raw-bzip2=2.064'
+ 'perl-compress-raw-zlib=2.065'
+ 'perl-config-perl-v=0.20'
+ 'perl-constant=1.31'
+ 'perl-cpan-meta-requirements=2.125'
+ 'perl-cpan-meta-yaml=0.012'
+ 'perl-cpan-meta=2.140640'
+ 'perl-cpan=2.05'
+ 'perl-data-dumper=2.151'
+ 'perl-db_file=1.831'
+ 'perl-devel-ppport=3.21'
+ 'perl-devel-selfstubber=1.05'
+ 'perl-digest-md5=2.53'
+ 'perl-digest-sha=5.88'
+ 'perl-digest=1.17'
+ 'perl-dumpvalue=1.17'
+ 'perl-encode=2.60'
+ 'perl-encoding-warnings=0.11'
+ 'perl-env=1.04'
+ 'perl-experimental=0.007'
+ 'perl-exporter=5.70'
+ 'perl-extutils-cbuilder=0.280216'
+ 'perl-extutils-command=1.18'
+ 'perl-extutils-constant=0.23'
+ 'perl-extutils-install=1.67'
+ 'perl-extutils-makemaker=6.98'
+ 'perl-extutils-manifest=1.63'
+ 'perl-extutils-parsexs=3.24'
+ 'perl-file-fetch=0.48'
+ 'perl-file-path=2.09'
+ 'perl-file-temp=0.2304'
+ 'perl-filter-simple=0.91'
+ 'perl-filter-util-call=1.49'
+ 'perl-getopt-long=2.42'
+ 'perl-http-tiny=0.043'
+ 'perl-i18n-collate=1.02'
+ 'perl-i18n-langtags=0.40'
+ 'perl-if=0.0603'
+ 'perl-io-compress=2.064'
+ 'perl-io-socket-ip=0.29'
+ 'perl-io-zlib=1.10'
+ 'perl-io=1.31'
+ 'perl-ipc-cmd=0.92'
+ 'perl-ipc-sysv=2.04'
+ 'perl-json-pp=2.27203'
+ 'perl-lib=0.63'
+ 'perl-libnet=1.25'
+ 'perl-locale-codes=3.30'
+ 'perl-locale-maketext-simple=0.21'
+ 'perl-locale-maketext=1.25'
+ 'perl-math-bigint-fastcalc=0.31'
+ 'perl-math-bigint=1.9993'
+ 'perl-math-bigrat=0.2606'
+ 'perl-math-complex=1.59'
+ 'perl-memoize=1.03'
+ 'perl-mime-base64=3.14'
+ 'perl-module-build=0.4205'
+ 'perl-module-corelist=3.11'
+ 'perl-module-load-conditional=0.62'
+ 'perl-module-load=0.32'
+ 'perl-module-loaded=0.08'
+ 'perl-module-metadata=1.000019'
+ 'perl-net-ping=2.43'
+ 'perl-package-constants=0.04'
+ 'perl-params-check=0.38'
+ 'perl-parent=0.228'
+ 'perl-parse-cpan-meta=1.4414'
+ 'perl-pathtools=3.47'
+ 'perl-perl-ostype=1.007'
+ 'perl-perlfaq=5.0150044'
+ 'perl-perlio-via-quotedprint=0.07'
+ 'perl-pod-checker=1.60'
+ 'perl-pod-escapes=1.06'
+ 'perl-pod-parser=1.62'
+ 'perl-pod-perldoc=3.23'
+ 'perl-pod-simple=3.28'
+ 'perl-pod-usage=1.63'
+ 'perl-podlators=2.5.3'
+ 'perl-safe=2.37'
+ 'perl-scalar-list-utils=1.38'
+ 'perl-search-dict=1.07'
+ 'perl-selfloader=1.21'
+ 'perl-socket=2.013'
+ 'perl-storable=2.49'
+ 'perl-sys-syslog=0.33'
+ 'perl-term-ansicolor=4.02'
+ 'perl-term-cap=1.15'
+ 'perl-term-complete=1.402'
+ 'perl-term-readline=1.14'
+ 'perl-test-harness=3.30'
+ 'perl-test-simple=1.001002'
+ 'perl-test=1.26'
+ 'perl-text-abbrev=1.02'
+ 'perl-text-balanced=2.02'
+ 'perl-text-parsewords=3.29'
+ 'perl-text-tabs=2013.0523'
+ 'perl-thread-queue=3.05'
+ 'perl-thread-semaphore=2.12'
+ 'perl-threads-shared=1.46'
+ 'perl-threads=1.93'
+ 'perl-tie-file=1.00'
+ 'perl-tie-refhash=1.39'
+ 'perl-time-hires=1.9726'
+ 'perl-time-local=1.2300'
+ 'perl-time-piece=1.27'
+ 'perl-unicode-collate=1.04'
+ 'perl-unicode-normalize=1.17'
+ 'perl-version=0.9908'
+ 'perl-xsloader=0.17')
+# Add your own provides here
+provides=(${provides[@]})
source=(http://www.cpan.org/src/5.0/perl-${pkgver}.tar.bz2
perlbin.sh
- perlbin.csh
- provides.pl)
+ perlbin.csh)
options=('makeflags' '!purge')
md5sums=('20cbecd4e9e880ee7a50a136c8b1484e'
'5ed2542fdb9a60682f215bd33701e61a'
- '1f0cbbee783e8a6d32f01be5118e0d5e'
- '03bec2035cc9b9f91eed5b46126b6623')
+ '1f0cbbee783e8a6d32f01be5118e0d5e')
-# workaround to let the integrity check find the correct provides array
-if [[ ${0##*/} = "parse_pkgbuilds.sh" ]]; then
- true && provides=($(bsdtar -q -O -xf "/srv/ftp/pool/packages/$pkgname-$pkgver-$pkgrel-$CARCH.pkg.tar.xz" .PKGINFO | sed -rn 's#^provides = (.*)#\1#p'))
-fi
-
prepare() {
cd ${srcdir}/${pkgname}-${pkgver}
}
@@ -68,10 +184,6 @@
}
package() {
- # hack to work around makepkg running the subshell in check_sanity()
- new_provides=($(cd "$srcdir/perl-$pkgver"; LD_PRELOAD=./libperl.so ./perl -Ilib "$srcdir/provides.pl" .))
- provides=(${new_provides[@]})
-
cd ${srcdir}/${pkgname}-${pkgver}
make DESTDIR="$pkgdir" install
Added: patchprov
===================================================================
--- patchprov (rev 0)
+++ patchprov 2014-06-11 08:48:11 UTC (rev 214972)
@@ -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 <jrcd83 at 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
Property changes on: perl/trunk/patchprov
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Deleted: provides.pl
===================================================================
--- provides.pl 2014-06-11 06:48:51 UTC (rev 214971)
+++ provides.pl 2014-06-11 08:48:11 UTC (rev 214972)
@@ -1,310 +0,0 @@
-# provides.pl
-##
-# Script for printing out a provides list of every CPAN distribution
-# that is bundled with perl. You can run it before building perl
-# or you can run it after building perl. Required modules are in core
-# for perl 5.13 and above. It might be nice if this didn't require
-# HTTP::Tiny and maybe just used wget or curl.
-#
-# This script uses HTTP::Tiny to query Tatsuhiko Miyagawa's webapp at
-# cpanmetadb.plackperl.org to cross-reference module files to their
-# providing CPAN distribution. Thank you Miyagawa!
-#
-# - Justin "juster" Davis <jrcd83 at gmail.com>
-
-use warnings 'FATAL' => 'all';
-use strict;
-
-package Common;
-
-sub evalver
-{
- my ($path, $mod) = @_;
-
- open my $fh, '<', $path or die "open $path: $!";
-
- my $m = ($mod
- ? qr/(?:\$${mod}::VERSION|\$VERSION)/
- : qr/\$VERSION/);
-
- while (my $ln = <$fh>) {
- next unless $ln =~ /\s*$m\s*=\s*.+/;
- chomp $ln;
- my $ver = do { no strict; eval $ln };
- return $ver unless $@;
- die qq{$path:$. bad version string in "$ln"\n};
- }
-
- close $fh;
- return undef;
-}
-
-
-#-----------------------------------------------------------------------------
-
-package Dists;
-
-my %RENAME = (
- 'PathTools' => 'Cwd', # perl 5.20 moved dist/Cwd/ to dist/PathTools/
-);
-
-sub maindistfile
-{
- my ($dist, $dir) = @_;
-
- # Override unguessable main module names.
- $dist = $RENAME{$dist} if exists $RENAME{$dist};
-
- # libpath is the modern style, installing modules under lib/
- # with dirs matching the name components.
- my $libpath = join q{/}, 'lib', split /-/, "${dist}.pm";
-
- # dumbpath is an old style where there's no subdirs and just
- # a .pm file.
- my $dumbpath = $dist;
- $dumbpath =~ s/\A.+-//;
- $dumbpath .= ".pm";
-
- my @paths = ($libpath, $dumbpath);
- # Some modules (with simple names like XSLoader, lib, etc) are
- # generated by Makefile.PL. Search through their generating code.
- push @paths, "${dist}_pm.PL" if $dist =~ tr/-/-/ == 0;
-
- @paths = map { "$dir/$_" } @paths;
- for my $path (@paths) {
- return $path if -f $path;
- }
- return undef;
-}
-
-sub module_ver
-{
- my ($dist, $dir) = @_;
-
- my $path = maindistfile($dist, $dir) or return undef;
-
- my $mod = $dist;
- $mod =~ s/-/::/g;
- my $ver = Common::evalver($path, $mod);
- unless ($ver) {
- warn "failed to find version in module file for $dist\n";
- return undef;
- }
-
- return $ver;
-}
-
-sub changelog_ver
-{
- my ($dist, $dir) = @_;
-
- my $path;
- for my $tmp (glob "$dir/{Changes,ChangeLog}") {
- if (-f $tmp) { $path = $tmp; last; }
- }
- return undef unless $path;
-
- open my $fh, '<', $path or die "open: $!";
- while (<$fh>) {
- return $1 if /\A\s*(?:$dist[ \t]*)?([0-9._]+)/;
- return $1 if /\A\s*version\s+([0-9._]+)/i;
- }
- close $fh;
-
- return undef;
-}
-
-# for some reason podlators has a VERSION file with perl code in it
-sub verfile_ver
-{
- my ($dist, $dir) = @_;
-
- my $path = "$dir/VERSION";
- return undef unless -f $path; # no warning, only podlaters has it
-
- return Common::evalver($path);
-}
-
-# scans a directory full of nicely separated dist. directories.
-sub scan_distroot
-{
- my ($distroot) = @_;
- opendir my $cpand, "$distroot" or die "failed to open $distroot";
- my @dists = grep { !/^\./ && -d "$distroot/$_" } readdir $cpand;
- closedir $cpand;
-
- my @found;
- for my $dist (@dists) {
- my $distdir = "$distroot/$dist";
- my $ver = (module_ver($dist, $distdir)
- || changelog_ver($dist, $distdir)
- || verfile_ver($dist, $distdir));
-
- if ($ver) { push @found, [ $dist, $ver ]; }
- else { warn "failed to find version for $dist\n"; }
- }
- return @found;
-}
-
-sub find
-{
- my ($srcdir) = @_;
- return map { scan_distroot($_) } glob "$srcdir/{cpan,dist}";
-}
-
-#-----------------------------------------------------------------------------
-
-package Modules;
-
-use HTTP::Tiny qw();
-use File::Find qw();
-use File::stat;
-
-*findfile = *File::Find::find;
-
-sub cpan_provider
-{
- my ($module) = @_;
- my $url = "http://cpanmetadb.plackperl.org/v1.0/package/$module";
- my $http = HTTP::Tiny->new;
- my $resp = $http->get($url);
- return undef unless $resp->{'success'};
-
- my ($cpanpath) = $resp->{'content'} =~ /^distfile: (.*)$/m
- or return undef;
-
- my $dist = $cpanpath;
- $dist =~ s{\A.+/}{}; # remove author directory
- $dist =~ s{-[^-]+\z}{}; # remove version and extension
- return ($dist eq 'perl' ? undef : $dist);
-}
-
-sub find
-{
- my ($srcdir) = @_;
- my $libdir = "$srcdir/lib/";
- die "failed to find $libdir directory" unless -d $libdir;
-
- # Find only the module files that have not changed since perl
- # was extracted. We don't want the files perl just recently
- # installed into lib/. We processed those already.
- my @modfiles;
- my $finder = sub {
- return unless /[.]pm\z/;
- return if m{\Q$libdir\E[^/]+/t/}; # ignore testing modules
- push @modfiles, $_;
- };
- findfile({ 'no_chdir' => 1, 'wanted' => $finder }, $libdir);
-
- # First we have to find what the oldest ctime actually is.
- my $oldest = time;
- @modfiles = map {
- my $modfile = $_;
- my $ctime = (stat $modfile)->ctime;
- $oldest = $ctime if $ctime < $oldest;
- [ $modfile, $ctime ]; # save ctime for later
- } @modfiles;
-
- # Then we filter out any file that was created more than a
- # few seconds after that. Process the rest.
- my @mods;
- for my $modfile (@modfiles) {
- my ($mod, $ctime) = @$modfile;
- next if $ctime - $oldest > 5; # ignore newer files
-
- my $path = $mod;
- $mod =~ s{[.]pm\z}{};
- $mod =~ s{\A$libdir}{};
- $mod =~ s{/}{::}g;
-
- my $ver = Common::evalver($path, $mod) || q{};
- push @mods, [ $mod, $ver ];
- }
-
- # Convert modules names to the dist names who provide them.
- my %seen;
- my @dists;
- for my $modref (@mods) {
- my ($mod, $ver) = @$modref;
- my $dist = cpan_provider($mod) or next; # filter out core modules
- next if $seen{$dist}++; # avoid duplicate dists
- push @dists, [ $dist, $ver ];
- }
- return @dists;
-}
-
-#-----------------------------------------------------------------------------
-
-package Dist2Pkg;
-
-sub name
-{
- my ($name) = @_;
- my $orig = $name;
-
- # Package names should be lowercase and consist of alphanumeric
- # characters only (and hyphens!)...
- $name =~ tr/A-Z/a-z/;
- $name =~ tr/_+/-/; # _ and +'s converted to - (ie Tabbed-Text+Wrap)
- $name =~ tr/-a-z0-9+//cd; # Delete all other chars.
- $name =~ tr/-/-/s;
-
- # Delete leading or trailing hyphens...
- $name =~ s/\A-|-\z//g;
-
- die qq{Dist. name '$orig' completely violates packaging standards}
- unless $name;
-
- return "perl-$name";
-}
-
-sub version
-{
- my ($version) = @_;
-
- # Package versions should be numbers and decimal points only...
- $version =~ tr/-/./;
- $version =~ tr/_0-9.-//cd;
-
- # Remove developer versions because pacman has no special logic
- # to compare them to regular versions like perl does.
- $version =~ s/_[^_]+\z//;
-
- $version =~ tr/_//d; # delete other underscores
- $version =~ tr/././s; # only one period at a time
- $version =~ s/\A[.]|[.]\z//g; # shouldn't start or stop with a period
-
- return $version;
-}
-
-#-----------------------------------------------------------------------------
-
-package main;
-
-my %CPANNAME = (
- 'List-Util' => 'Scalar-List-Utils',
- 'Text-Tabs' => 'Text-Tabs+Wrap',
-);
-
-my $perldir = shift or die "Usage: $0 [path to perl source directory]\n";
-die "$perldir is not a valid directory." unless -d $perldir;
-
-my @dists = (Dists::find($perldir), Modules::find($perldir));
-for my $dist (@dists) {
- my $name = $dist->[0];
- $dist->[0] = $CPANNAME{$name} if exists $CPANNAME{$name};
-}
-
-my @pkgs = map {
- my ($name, $ver) = @$_;
- $name = Dist2Pkg::name($name);
- $ver = Dist2Pkg::version($ver);
- [ $name, $ver ];
-} @dists;
-
- at pkgs = sort { $a->[0] cmp $b->[0] } @pkgs;
-
-for my $pkg (@pkgs) {
- my ($name, $ver) = @$pkg;
- print "$name=$ver\n";
-}
Added: upgpkg
===================================================================
--- upgpkg (rev 0)
+++ upgpkg 2014-06-11 08:48:11 UTC (rev 214972)
@@ -0,0 +1,4 @@
+upgpkg_build() {
+ makepkg -o
+ ./patchprov src/perl-$pkgver PKGBUILD
+}
More information about the arch-commits
mailing list