summaryrefslogtreecommitdiff
path: root/testing/perl/PKGBUILD
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2012-01-13 14:21:34 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2012-01-13 14:21:34 -0300
commit4a47b2a0e019de14d474e353a601ca6bf47e90e5 (patch)
tree69e20048be17aa12e6342ebcafb0cf9cdbfee32d /testing/perl/PKGBUILD
parent149750d28420a7b59fab5501ab9aaca095f6fa46 (diff)
parentb5f690637837ff269bf5d248ee2dc37ea5236ca8 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community-testing/packagekit/PKGBUILD community/bird/PKGBUILD community/camlp5/PKGBUILD community/exim/PKGBUILD community/ibus-table-extraphrase/PKGBUILD community/mingw32-gcc-base/PKGBUILD community/mingw32-gcc/PKGBUILD community/torcs/PKGBUILD core/db/PKGBUILD core/iproute2/PKGBUILD core/libsasl/PKGBUILD core/openldap/PKGBUILD core/pam/PKGBUILD core/util-linux/PKGBUILD extra/cyrus-sasl/PKGBUILD extra/ffmpeg/PKGBUILD extra/kdelibs/PKGBUILD extra/libreoffice/PKGBUILD extra/php/PKGBUILD extra/postfix/PKGBUILD extra/python-lxml/PKGBUILD extra/rdesktop/PKGBUILD extra/redland/PKGBUILD extra/subversion/PKGBUILD extra/tidyhtml/PKGBUILD extra/transmission/PKGBUILD extra/windowmaker/PKGBUILD kde-unstable/calligra/PKGBUILD multilib/lib32-libdrm/PKGBUILD multilib/lib32-libdrm/no-pthread-stubs.patch multilib/lib32-openssl/PKGBUILD
Diffstat (limited to 'testing/perl/PKGBUILD')
-rw-r--r--testing/perl/PKGBUILD117
1 files changed, 117 insertions, 0 deletions
diff --git a/testing/perl/PKGBUILD b/testing/perl/PKGBUILD
new file mode 100644
index 000000000..e3bd0f0c4
--- /dev/null
+++ b/testing/perl/PKGBUILD
@@ -0,0 +1,117 @@
+# $Id: PKGBUILD 146353 2012-01-09 18:52:56Z stephane $
+# Maintainer: Angel Velasquez <angvp@archlinux.org>
+# Contributor: kevin <kevin.archlinux.org>
+# Contributor: judd <jvinet.zeroflux.org>
+# Contributor: francois <francois.archlinux.org>
+pkgname=perl
+pkgver=5.14.2
+pkgrel=6
+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' 'coreutils' 'glibc' 'sh')
+changelog=ChangeLog
+source=(http://www.cpan.org/src/5.0/perl-${pkgver}.tar.bz2
+perlbin.sh
+perlbin.csh
+provides.pl
+0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch)
+install=perl.install
+options=('makeflags' '!purge')
+md5sums=('04a4c5d3c1f9f19d77daff8e8cd19a26'
+ '5ed2542fdb9a60682f215bd33701e61a'
+ '1f0cbbee783e8a6d32f01be5118e0d5e'
+ '31fc0b5bb4935414394c5cfbec2cb8e5'
+ 'c25d86206d649046538c3daab7874564')
+
+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} \
+ -Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}"
+ patch -Np1 -i $srcdir/0001-Append-CFLAGS-and-LDFLAGS-to-their-Config.pm-counter.patch
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ TEST_JOBS=$(echo $MAKEFLAGS | sed 's/.*-j\([0-9][0-9]*\).*/\1/') make test_harness
+# make test
+}
+
+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 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 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)
+ 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
+ # Add /usr/lib/perl5/core_perl/CORE/ to standard library path (FS#24660)
+ install -dv ${pkgdir}/etc/ld.so.conf.d
+ echo "/usr/lib/perl5/core_perl/CORE" > ${pkgdir}/etc/ld.so.conf.d/perl.conf
+}