PKGBUILDs/core/perl/PKGBUILD

248 lines
9.3 KiB
Bash
Raw Normal View History

2019-08-13 13:58:29 +00:00
# Maintainer: Florian Pritz <bluewind@xinu.at>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: kevin <kevin.archlinux.org>
# Contributor: judd <jvinet.zeroflux.org>
# Contributor: francois <francois.archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - configure ARMv5 with -Dd_u32align
# https://rt.perl.org/Public/Bug/Display.html?id=133803
pkgname=perl
2021-05-28 14:13:19 +00:00
pkgver=5.34.0
2019-08-13 13:58:29 +00:00
_baseversion="${pkgver%.*}"
2021-12-13 00:43:12 +00:00
pkgrel=3
2019-08-13 13:58:29 +00:00
pkgdesc="A highly capable, feature-rich programming language"
arch=(x86_64)
license=('GPL' 'PerlArtistic')
url="https://www.perl.org"
2020-09-24 22:48:40 +00:00
depends=('gdbm>=1.17' 'db' 'glibc' 'libxcrypt' 'libcrypt.so')
checkdepends=('procps-ng')
2019-08-13 13:58:29 +00:00
# NOTE: This array is automatically generated by `./patchprov`.
# If you want to add entries, do so in the next array.
2021-05-28 14:13:19 +00:00
provides=('perl-archive-tar=2.38'
2019-08-13 13:58:29 +00:00
'perl-attribute-handlers=1.01'
2021-05-28 14:13:19 +00:00
'perl-autodie=2.34'
2019-08-13 13:58:29 +00:00
'perl-autoloader=5.74'
'perl-autouse=1.11'
'perl-base=2.27'
'perl-bignum=0.51'
2021-05-28 14:13:19 +00:00
'perl-carp=1.52'
'perl-compress-raw-bzip2=2.101'
'perl-compress-raw-zlib=2.101'
'perl-config-perl-v=0.33'
2019-08-13 13:58:29 +00:00
'perl-constant=1.33'
'perl-cpan-meta-requirements=2.140'
'perl-cpan-meta-yaml=0.018'
'perl-cpan-meta=2.150010'
2021-05-28 14:13:19 +00:00
'perl-cpan=2.28'
'perl-data-dumper=2.179'
'perl-db_file=1.855'
'perl-devel-ppport=3.62'
2019-08-13 13:58:29 +00:00
'perl-devel-selfstubber=1.06'
2021-05-28 14:13:19 +00:00
'perl-digest-md5=2.58'
2019-08-13 13:58:29 +00:00
'perl-digest-sha=6.02'
2021-05-28 14:13:19 +00:00
'perl-digest=1.19'
2020-06-23 18:08:08 +00:00
'perl-dumpvalue=1.21'
2021-05-28 14:13:19 +00:00
'perl-encode=3.08'
2019-08-13 13:58:29 +00:00
'perl-encoding-warnings=0.13'
2021-05-28 14:13:19 +00:00
'perl-env=1.05'
'perl-experimental=0.024'
'perl-exporter=5.76'
'perl-extutils-cbuilder=0.280236'
2019-08-13 13:58:29 +00:00
'perl-extutils-constant=0.25'
2021-05-28 14:13:19 +00:00
'perl-extutils-install=2.20'
'perl-extutils-makemaker=7.62'
'perl-extutils-manifest=1.73'
'perl-extutils-parsexs=3.43'
'perl-extutils-pl2bat=0.004'
'perl-file-fetch=1.00'
'perl-file-path=2.18'
'perl-file-temp=0.2311'
2020-06-23 18:08:08 +00:00
'perl-filter-simple=0.96'
2021-05-28 14:13:19 +00:00
'perl-filter-util-call=1.60'
'perl-findbin=1.52'
'perl-getopt-long=2.52'
2019-08-13 13:58:29 +00:00
'perl-http-tiny=0.076'
'perl-i18n-collate=1.02'
2021-05-28 14:13:19 +00:00
'perl-i18n-langtags=0.45'
'perl-if=0.0609'
'perl-io-compress=2.102'
'perl-io-socket-ip=0.41'
'perl-io-zlib=1.11'
'perl-io=1.46'
2020-06-23 18:08:08 +00:00
'perl-ipc-cmd=1.04'
2021-05-28 14:13:19 +00:00
'perl-ipc-sysv=2.09'
'perl-json-pp=4.06'
2019-08-13 13:58:29 +00:00
'perl-lib=0.65'
2021-05-28 14:13:19 +00:00
'perl-libnet=3.13'
2019-08-13 13:58:29 +00:00
'perl-locale-maketext-simple=0.21_01'
'perl-locale-maketext=1.29'
2020-06-23 18:08:08 +00:00
'perl-math-bigint-fastcalc=0.5009'
'perl-math-bigint=1.999818'
2019-08-13 13:58:29 +00:00
'perl-math-bigrat=0.2614'
2021-05-28 14:13:19 +00:00
'perl-math-complex=1.5902'
2019-08-13 13:58:29 +00:00
'perl-memoize=1.03_01'
2021-05-28 14:13:19 +00:00
'perl-mime-base64=3.16'
'perl-module-corelist=5.20210520'
'perl-module-load-conditional=0.74'
'perl-module-load=0.36'
2019-08-13 13:58:29 +00:00
'perl-module-loaded=0.08'
2020-06-23 18:08:08 +00:00
'perl-module-metadata=1.000037'
2021-05-28 14:13:19 +00:00
'perl-net-ping=2.74'
2019-08-13 13:58:29 +00:00
'perl-params-check=0.38'
2020-06-23 18:08:08 +00:00
'perl-parent=0.238'
2021-05-28 14:13:19 +00:00
'perl-pathtools=3.80'
2019-08-13 13:58:29 +00:00
'perl-perl-ostype=1.010'
2021-05-28 14:13:19 +00:00
'perl-perlfaq=5.20210411'
'perl-perlio-via-quotedprint=0.09'
'perl-pod-checker=1.74'
2019-08-13 13:58:29 +00:00
'perl-pod-escapes=1.07'
'perl-pod-perldoc=3.2801'
2021-05-28 14:13:19 +00:00
'perl-pod-simple=3.42'
'perl-pod-usage=2.01'
2020-06-23 18:08:08 +00:00
'perl-podlators=5.008'
2021-05-28 14:13:19 +00:00
'perl-safe=2.43'
2020-06-23 18:08:08 +00:00
'perl-scalar-list-utils=1.55'
2019-08-13 13:58:29 +00:00
'perl-search-dict=1.07'
2020-06-23 18:08:08 +00:00
'perl-selfloader=1.26'
2021-05-28 14:13:19 +00:00
'perl-socket=2.031'
'perl-storable=3.23'
2020-06-23 18:08:08 +00:00
'perl-sys-syslog=0.36'
'perl-term-ansicolor=5.01'
2019-08-13 13:58:29 +00:00
'perl-term-cap=1.17'
'perl-term-complete=1.403'
'perl-term-readline=1.17'
2021-05-28 14:13:19 +00:00
'perl-test-harness=3.43'
'perl-test-simple=1.302183'
2019-08-13 13:58:29 +00:00
'perl-test=1.31'
'perl-text-abbrev=1.02'
2021-05-28 14:13:19 +00:00
'perl-text-balanced=2.04'
2019-08-13 13:58:29 +00:00
'perl-text-parsewords=3.30'
'perl-text-tabs=2013.0523'
2020-06-23 18:08:08 +00:00
'perl-thread-queue=3.14'
2019-08-13 13:58:29 +00:00
'perl-thread-semaphore=2.13'
2021-05-28 14:13:19 +00:00
'perl-threads-shared=1.62'
'perl-threads=2.26'
2020-06-23 18:08:08 +00:00
'perl-tie-file=1.06'
2021-05-28 14:13:19 +00:00
'perl-tie-refhash=1.40'
'perl-time-hires=1.9767'
'perl-time-local=1.30'
2020-06-23 18:08:08 +00:00
'perl-time-piece=1.3401'
2021-05-28 14:13:19 +00:00
'perl-unicode-collate=1.29'
'perl-unicode-normalize=1.28'
'perl-version=0.9928'
2019-08-13 13:58:29 +00:00
'perl-xsloader=0.30')
# Add your own provides here
2020-03-29 20:19:59 +00:00
provides=("${provides[@]}")
2019-08-13 13:58:29 +00:00
source=(https://www.cpan.org/src/5.0/perl-${pkgver}.tar.xz
2021-07-25 13:09:22 +00:00
perl-18924.patch::https://github.com/Perl/perl5/pull/18924.patch
config.over
2019-08-13 13:58:29 +00:00
perlbin.sh
perlbin.csh
perlbin.fish
detect-old-perl-modules.sh
detect-old-perl-modules.hook)
options=('makeflags' '!purge' 'emptydirs')
2021-05-28 14:13:19 +00:00
sha512sums=('691b4b31eacec357191fba777612b4e3eae59e946a22998a50766697c0d61db1d42a9b3bc1e41abf0d1ca1893e4a7c06d7bf3290480cf03d7f79befd7a8a3267'
2021-07-25 13:09:22 +00:00
'58f99cfdc762270a41d85afe37239e9a9837142254e8c83bcd67386fabd71f60ede4a02b2b06e4afade7d5452e54f696b4640b76f48f8ec5599e8637b4fbedeb'
'1c924b5bf7413d097f62638a574d7decf36d98598b84cdb5fb31ff633b6f953371e14b004a2558a1a0b74b6b60b90b481af0f68555a49208fe6b226381fed79f'
2020-09-24 22:48:40 +00:00
'6ed5bc6dbdc47bc7f4c0fedbe18deaf35ab02a2e6700988beb545954bb1d0fe20ff1a4de39d6d9fc882ef1741f7bf6d85ba165d0cd8dc0d9939b789c894f48a1'
2020-03-29 20:19:59 +00:00
'53eb0cddfd637014f3d3a101665db8dcafe5ac5bf3d319a259974334eb89c1c405097518ae96b6d18e520194633c7be57c9b2cd9ae6398443eb08f1a2008d112'
2019-08-13 13:58:29 +00:00
'881e2efe05ba818cd7300f126800b56bb0685cb5c9c5fb7e67ef6aaf5abd17d2391a979d5d16d109c5111f4b35504ba83d19b0e6eda4431e8421fcbea19d2f1a'
'bd48af7a6209f2ad51aa1747a7238ecb11607a53f61460d873202bf14b55c3b7dd6f66f4a9f2cac8a24240313789a9a44dbc81b73587de46a6b1866bdfca5e26'
2020-03-29 20:19:59 +00:00
'063624b6fc3728339e4f352597e6913c476c4eaa8e1004b2a46c480b5cce9c42f3083d1e6960081202099acf2b7d0b5d13dc6b7ee0aa303c272826febdcd311e')
2019-08-13 13:58:29 +00:00
# https://www.cpan.org/src/5.0/perl-$pkgver.tar.xz.sha256.txt
prepare() {
2020-03-29 20:19:59 +00:00
cd "${srcdir}/${pkgname}-${pkgver}"
2021-07-25 13:09:22 +00:00
patch -p1 -i "$srcdir/perl-18924.patch"
2021-12-13 00:43:12 +00:00
# reproducible patchlevel_date
[ -n "${SOURCE_DATE_EPOCH}" ] && touch -h -d @$SOURCE_DATE_EPOCH patchlevel.h
2019-08-13 13:58:29 +00:00
}
build() {
2020-03-29 20:19:59 +00:00
cd "${srcdir}/${pkgname}-${pkgver}"
2019-08-13 13:58:29 +00:00
if [ "${CARCH}" = "x86_64" ]; then
# for x86_64
arch_opts="-Dcccdlflags='-fPIC'"
else
# for i686
arch_opts=""
fi
2021-07-25 13:09:22 +00:00
# reproducible builds overrides are only fully effective when loaded from file
cp ../config.over .
export TZ=UTC
2019-08-13 13:58:29 +00:00
[[ $CARCH == "arm" ]] && CONFIG="-Dd_u32align"
./Configure -des -Dusethreads -Duseshrplib -Doptimize="${CFLAGS}" \
-Dprefix=/usr -Dvendorprefix=/usr \
-Dprivlib=/usr/share/perl5/core_perl \
-Darchlib=/usr/lib/perl5/$_baseversion/core_perl \
-Dsitelib=/usr/share/perl5/site_perl \
-Dsitearch=/usr/lib/perl5/$_baseversion/site_perl \
-Dvendorlib=/usr/share/perl5/vendor_perl \
-Dvendorarch=/usr/lib/perl5/$_baseversion/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} \
2021-07-25 13:09:22 +00:00
-Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}" $CONFIG
2019-08-13 13:58:29 +00:00
make
}
check() {
2020-03-29 20:19:59 +00:00
cd "${srcdir}/${pkgname}-${pkgver}"
# TEST_JOBS=$(echo "$MAKEFLAGS" | sed 's/.*-j\([0-9][0-9]*\).*/\1/') make test_harness
make test
2019-08-13 13:58:29 +00:00
}
package() {
2020-03-29 20:19:59 +00:00
cd "${srcdir}/${pkgname}-${pkgver}"
2019-08-13 13:58:29 +00:00
make DESTDIR="$pkgdir" install
### 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/'.*'/''/" \
2020-03-29 20:19:59 +00:00
-i "${pkgdir}/usr/lib/perl5/$_baseversion/core_perl/Config_heavy.pl"
2019-08-13 13:58:29 +00:00
### CPAN Settings ###
# Set CPAN default config to use the site directories.
sed -e '/(makepl_arg =>/ s/""/"INSTALLDIRS=site"/' \
-e '/(mbuildpl_arg =>/ s/""/"installdirs=site"/' \
2020-03-29 20:19:59 +00:00
-i "${pkgdir}/usr/share/perl5/core_perl/CPAN/FirstTime.pm"
2019-08-13 13:58:29 +00:00
# Profile script to set paths to perl scripts.
2020-03-29 20:19:59 +00:00
install -D -m644 "${srcdir}/perlbin.sh" \
"${pkgdir}/etc/profile.d/perlbin.sh"
2019-08-13 13:58:29 +00:00
# Profile script to set paths to perl scripts on csh. (FS#22441)
2020-03-29 20:19:59 +00:00
install -D -m644 "${srcdir}/perlbin.csh" \
"${pkgdir}/etc/profile.d/perlbin.csh"
2019-08-13 13:58:29 +00:00
# Profile script to set paths to perl scripts on fish. (FS#51191)
install -D -m 755 "$srcdir/perlbin.fish" \
"$pkgdir/usr/share/fish/vendor_conf.d/perlbin.fish"
# 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)
rm "$pkgdir/usr/bin/perl$pkgver"
install -D -m755 -t "$pkgdir/usr/share/libalpm/scripts" "$srcdir/detect-old-perl-modules.sh"
install -D -m644 -t "$pkgdir/usr/share/libalpm/hooks" "$srcdir/detect-old-perl-modules.hook"
2020-03-29 20:19:59 +00:00
find "$pkgdir" -name perllocal.pod -delete
find "$pkgdir" -name .packlist -delete
2019-08-13 13:58:29 +00:00
}