blob: 88d72cf5a1c8913a25b8cb732d7dc1e2fbbdbbfc (
plain) (
tree)
|
|
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Sheila Aman <sheila@vulpine.house>
# Maintainer: Adélie Perl Team <adelie-perl@lists.adelielinux.org>
pkgname=perl
pkgver=5.34.0
pkgrel=0
pkgdesc="Larry Wall's Practical Extraction and Report Language"
url="https://www.perl.org/"
arch="all"
options="!fhs"
license="Artistic-1.0-Perl GPL-2.0"
depends=""
makedepends="bzip2-dev zlib-dev"
subpackages="$pkgname-doc $pkgname-dev"
source="https://www.cpan.org/src/5.0/perl-$pkgver.tar.gz
musl-locale.patch
CVE-2021-36770.patch
"
# secfixes:
# 5.26.3-r0:
# - CVE-2018-12015
# - CVE-2018-18311
# - CVE-2018-18312
# - CVE-2018-18313
# - CVE-2018-18314
# 5.26.1-r0:
# - CVE-2017-12837
# - CVE-2017-12883
builddir="$srcdir/$pkgname-$pkgver"
_privlib=/usr/share/perl5/core_perl
_archlib=/usr/lib/perl5/core_perl
prepare() {
chmod +w "$builddir"/*.c
default_prepare
sed -e 's/less -R/less/g' \
-e 's/libswanted="\(.*\) nsl\(.*\)"/libswanted="\1\2"/g' \
-i ./Configure
# Ensure that we never accidentally bundle zlib or bzip2
rm -rf cpan/Compress-Raw-Zlib/zlib-src
rm -rf cpan/Compress-Raw-Bzip2/bzip2-src
sed -i '/\(bzip2\|zlib\)-src/d' MANIFEST
}
build() {
BUILD_ZLIB=0
BUILD_BZIP2=0
BZIP2_LIB=/usr/lib
BZIP2_INCLUDE=/usr/inculde
export BUILD_ZLIB BUILD_BZIP2 BZIP2_LIB BZIP2_INCLUDE
./Configure -des \
-Dcccdlflags='-fPIC' \
-Dcccdlflags='-fPIC' \
-Dccdlflags='-rdynamic' \
-Dprefix=/usr \
-Dprivlib=$_privlib \
-Darchlib=$_archlib \
-Dvendorprefix=/usr \
-Dvendorlib=/usr/share/perl5/vendor_perl \
-Dvendorarch=/usr/lib/perl5/vendor_perl \
-Dsiteprefix=/usr/local \
-Dsitelib=/usr/local/share/perl5/site_perl \
-Dsitearch=/usr/local/lib/perl5/site_perl \
-Dlocincpth=' ' \
-Doptimize="$CFLAGS" \
-Duselargefiles \
-Dusethreads \
-Duseshrplib \
-Dd_semctl_semun \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
-Dinstallman1dir=/usr/share/man/man1 \
-Dinstallman3dir=/usr/share/man/man3 \
-Dman1ext='1' \
-Dman3ext='3pm' \
-Dcf_by='Adelie' \
-Ud_csh \
-Dusenm
make libperl.so && make
}
check() {
TEST_JOBS=$JOBS make test_harness
}
package() {
make DESTDIR="$pkgdir" install
if [ -n "$(find $pkgdir/usr/local -type f)" ]; then
error "files found under /usr/local"
fi
find "$pkgdir" -name '.*' -delete
rm "$pkgdir"/usr/bin/xsubpp
}
dev() {
mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/$_archlib "$subpkgdir"/$_privlib
mv "$pkgdir"/$_archlib/Devel "$subpkgdir"/$_archlib/
mv "$pkgdir"/$_privlib/Encode "$subpkgdir"/$_privlib/
mv "$pkgdir"/usr/bin/h2xs \
"$pkgdir"/usr/bin/perlivp \
"$pkgdir"/usr/bin/enc2xs \
"$subpkgdir"/usr/bin/
default_dev
}
sha512sums="3bd2ae3900df54801b42a1ab1c136b20438f3a162d88c1e030c5d91e96ad5cf76d5ccbcf9e75388fa29bcc26db0b1c5df3d1240d48136159462c912c9258d405 perl-5.34.0.tar.gz
a78b5fb1a2b6f60b401329cfd2d8349d4fdcc19628cde0e9b840b82e1a02e705f7d7413fe206aa13ed714ab93a65b62ac3d85dfd526ca8048621d5d89b22f0ef musl-locale.patch
2eb4986ac56f394e584ed5b16be40ccc0b689512fc23746588a3947db49c53be96dbbc25b8256513142c7a613481ea11b9154dfd4d0a67f05ef0662fedfd476a CVE-2021-36770.patch"
|