core/perl/PKGBUILD
Jan Mette 0ae13fefd0
2010-03-21 20:46:45 +00:00

202 lines
5.6 KiB
Bash

# $Id: PKGBUILD 54318 2009-10-08 13:21:54Z francois $
# Maintainer: kevin <kevin.archlinux.org>
# Contributor: judd <jvinet.zeroflux.org>
# Contributor: francois <francois.archlinux.org>
pkgname=perl
pkgver=5.10.1
pkgrel=6
pkgdesc="Practical Extraction and Report Language"
arch=(i686 x86_64)
license=('GPL' 'PerlArtistic')
url="http://www.perl.org"
groups=('base')
depends=('gdbm' 'db>=4.8' 'coreutils' 'glibc' 'sh')
source=(http://www.perl.com/CPAN/src/perl-${pkgver}.tar.bz2
perlbin.sh perl-5.10.1-archlinux-inc-order.patch)
install=perl.install
provides=(
perl-ansicolor=2.00
perl-archive-extract=0.34
perl-archive-tar=1.52
perl-autodie=2.06_01
perl-attribute-handlers=0.85
perl-autoloader=5.68
perl-b-debug=1.11
perl-b-lint=1.11
perl-base=2.14
perl-bignum=0.23
perl-cgi=3.43
perl-class-isa=0.33
perl-compress-raw-bzib2=2.020
perl-compress-raw-zlib=2.020
perl-constant=1.17
perl-cpan=1.9402
perl-cpanplus=0.88
perl-db_file=1.820
perl-dprof=20080331.00
perl-data-dumper=2.124
perl-devel-ppport=3.19
perl-devel-peek=1.04
perl-digest=1.16
perl-digest-md5=2.39
perl-digest-sha=5.47
perl-encode=2.35
perl-encoding-warnings=0.11
perl-exporter=5.63
perl-extutils-cbuilder=0.2602
perl-extutils-command=1.16
perl-extutils-constant=0.22
perl-extutils-embed=1.28
perl-extutils-install=1.54
perl-extutils-makemaker=6.55_02
perl-extutils-manifest=1.56
perl-extutils-parsexs=2.2002
perl-file-fetch=0.20
perl-file-path=2.07_03
perl-file-temp=0.22
perl-filter=1.37
perl-filter-simple=0.84
perl-getopt-long=2.38
perl-if=0.05
perl-io=1.25
perl-io-compress=2.020
perl-io-zlib=1.09
perl-ipc-cmd=0.46
perl-ipc-sysv=2.01
perl-libnet=1.22
perl-locale-codes=2.07
perl-locale-maketext=0.13
perl-locale-maketext-simple=0.18
perl-log-message=0.02
perl-log-message-simple=0.04
perl-mime-base64=3.08
perl-math-bigint=1.89
perl-math-bigint-fastcalc=0.19
perl-math-bigrat=0.22
perl-math-complex=1.56
perl-memoize=1.01_03
perl-module-build=0.340201
perl-module-corelist=2.18
perl-module-load=0.16
perl-module-load-conditional=0.30
perl-module-loaded=0.02
perl-module-pluggable=3.9
perl-next=0.64
perl-net-ping=2.36
perl-object-accessor=0.34
perl-package-constants=0.02
perl-params-check=0.26
perl-parent=0.221
perl-parse-cpan-meta=1.39
perl-pathtools=3.30
perl-pod-escapes=1.04
perl-pod-latex=0.58
perl-pod-parser=1.37
perl-pod-perldoc=3.14_04
perl-pod-simple=3.07
perl-podlators=2.2.2
perl-safe=2.18
perl-scalar-list-utils=1.21
perl-selfloader=1.17
perl-shell=0.72_01
perl-storable=2.20
perl-switch=2.14
perl-sys-syslog=0.27
perl-term-cap=1.12
perl-term-ui=0.20
perl-test=1.25_02
perl-test-harness=3.17
perl-test-simple=0.92
perl-text-balanced=2.0.0
perl-text-parsewords=3.27
perl-text-soundex=3.03
perl-text-tabs+wraps=2009.0305
perl-thread-queue=2.11
perl-thread-semaphore=2.09
perl-threads=1.72
perl-threads-shared=1.29
perl-tie-file=0.97_02
perl-tie-refhash=1.38
perl-time-hires=1.9719
perl-time-local=1.1901
perl-time-piece=1.15
perl-unicode-collate=0.52
perl-unicode-normalize=1.03
perl-version=0.77
perl-win32=0.39
perl-win32api-file=0.1101
perl-xsloader=0.10
perlio-via-quotedprint=0.06
)
options=('!makeflags' '!purge')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
patch -Np0 -i ../perl-5.10.1-archlinux-inc-order.patch || return 1
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/${pkgver} \
-Dsitearch=/usr/lib/perl5/site_perl/${pkgver} \
-Dvendorlib=/usr/share/perl5/vendor_perl \
-Dvendorarch=/usr/lib/perl5/vendor_perl \
-Dotherlibdirs=/usr/lib/perl5/current:/usr/lib/perl5/site_perl/current \
-Dscriptdir='/usr/bin/perlbin/core' \
-Dsitescript='/usr/bin/perlbin/site' \
-Dvendorscript='/usr/bin/perlbin/vendor' \
-Dman1ext=1perl -Dman3ext=3perl ${arch_opts}
make || return 1
make install
### Perl Settings ###
# Change man page extensions for site and vendor module builds.
sed -e '/^man1ext=/ s/1perl/1p/' -e '/^man3ext=/ s/3perl/3pm/' \
-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/perlbin/core; \
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
}
md5sums=('82400c6d34f7b7b43d0196c76cd2bbb1'
'9c4e3e56d71f123e92a68986df5ea924'
'0e4853bd75ee36b8f4c70b78c707b2fa')