[arch-commits] Commit in perl/trunk (PKGBUILD provides.pl)

Florian Pritz bluewind at archlinux.org
Thu May 24 11:33:49 UTC 2012


    Date: Thursday, May 24, 2012 @ 07:33:49
  Author: bluewind
Revision: 159436

upgpkg: perl 5.16.0-1

upstream update

Modified:
  perl/trunk/PKGBUILD
  perl/trunk/provides.pl

-------------+
 PKGBUILD    |   17 +++++------------
 provides.pl |   31 ++++++++++++++++++++++---------
 2 files changed, 27 insertions(+), 21 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-05-24 09:52:25 UTC (rev 159435)
+++ PKGBUILD	2012-05-24 11:33:49 UTC (rev 159436)
@@ -4,8 +4,8 @@
 # Contributor: judd <jvinet.zeroflux.org>
 # Contributor: francois <francois.archlinux.org> 
 pkgname=perl
-pkgver=5.14.2
-pkgrel=7
+pkgver=5.16.0
+pkgrel=1
 pkgdesc="A highly capable, feature-rich programming language"
 arch=(i686 x86_64)
 license=('GPL' 'PerlArtistic')
@@ -16,17 +16,13 @@
 source=(http://www.cpan.org/src/5.0/perl-${pkgver}.tar.bz2 
 perlbin.sh
 perlbin.csh
-provides.pl
-digest_eval_hole.diff
-0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch)
+provides.pl)
 install=perl.install
 options=('makeflags' '!purge')
-md5sums=('04a4c5d3c1f9f19d77daff8e8cd19a26'
+md5sums=('15a2f95fb27231e10998240f13acf961'
          '5ed2542fdb9a60682f215bd33701e61a'
          '1f0cbbee783e8a6d32f01be5118e0d5e'
-         '31fc0b5bb4935414394c5cfbec2cb8e5'
-         '490852b3d77c3b3866d0d75f5fbf5c5d'
-         'c25d86206d649046538c3daab7874564')
+         '999c3eea6464860704abbb055a0f0896')
 
 # workaround to let the integrity check find the correct provides array
 if [[ ${0##*/} = "parse_pkgbuilds.sh" ]]; then
@@ -44,8 +40,6 @@
     arch_opts=""
   fi
 
-  patch -Np1 -i $srcdir/digest_eval_hole.diff
-
   ./Configure -des -Dusethreads -Duseshrplib -Doptimize="${CFLAGS}" \
     -Dprefix=/usr -Dinstallprefix=${pkgdir}/usr -Dvendorprefix=/usr \
     -Dprivlib=/usr/share/perl5/core_perl \
@@ -60,7 +54,6 @@
     -Dinc_version_list=none \
     -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
 }
 

Modified: provides.pl
===================================================================
--- provides.pl	2012-05-24 09:52:25 UTC (rev 159435)
+++ provides.pl	2012-05-24 11:33:49 UTC (rev 159436)
@@ -1,9 +1,16 @@
 # provides.pl
 ##
 # Script for printing out a provides list of every CPAN distribution
-# that is bundled with perl.
+# 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.
 #
-# Justin Davis <jrcd83 at gmail.com>
+# 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;
@@ -13,21 +20,26 @@
 sub evalver
 {
     my ($path, $mod) = @_;
-    $mod ||= "";
 
     open my $fh, '<', $path or die "open $path: $!";
 
-    while (<$fh>) {
-        next unless /\s*(?:\$${mod}::|\$)VERSION\s*=\s*(.+)/;
-        my $ver = eval $1;
+    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 $@;
-        warn qq{$path:$. bad version string "$ver"\n};
+        die qq{$path:$. bad version string in "$ln"\n};
     }
 
     close $fh;
     return undef;
 }
 
+
 #-----------------------------------------------------------------------------
 
 package Dists;
@@ -143,7 +155,7 @@
 sub cpan_provider
 {
     my ($module) = @_;
-    my $url = "http://cpanmetadb.appspot.com/v1.0/package/$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'};
@@ -169,6 +181,7 @@
     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);
@@ -194,7 +207,7 @@
         $mod =~ s{\A$libdir}{};
         $mod =~ s{/}{::}g;
 
-        my $ver = Common::evalver($path) || q{};
+        my $ver = Common::evalver($path, $mod) || q{};
         push @mods, [ $mod, $ver ];
     }
 




More information about the arch-commits mailing list