Use perl-cross-1.3, which supports perl<=5.30 and -jX. Signed-off-by: Juan RP <xtraeme@gmail.com>
222 lines
6.3 KiB
Bash
222 lines
6.3 KiB
Bash
# Template file for 'perl'
|
|
pkgname=perl
|
|
version=5.28.2
|
|
revision=1
|
|
_perl_cross_version=1.3
|
|
build_style=gnu-configure
|
|
hostmakedepends="less"
|
|
makedepends="zlib-devel bzip2-devel gdbm-devel db-devel"
|
|
depends="less"
|
|
short_desc="Practical Extraction and Report Language"
|
|
maintainer="Juan RP <xtraeme@voidlinux.org>"
|
|
license="Artistic-1.0-perl, GPL-1.0-or-later"
|
|
homepage="https://www.perl.org"
|
|
distfiles="https://www.cpan.org/src/5.0/perl-${version}.tar.gz
|
|
https://github.com/arsv/perl-cross/releases/download/${_perl_cross_version}/perl-cross-${_perl_cross_version}.tar.gz"
|
|
checksum="aa95456dddb3eb1cc5475fed4e08f91876bea71fb636fba6399054dfbabed6c7
|
|
49edea1ea2cd6c5c47386ca71beda8d150c748835781354dbe7f75b1df27e703"
|
|
|
|
# Before updating this package to a new major version, run ${FILESDIR}/provides.pl
|
|
# against ${wrksrc} to find the list of built in packages.
|
|
|
|
provides="perl-Archive-Tar-2.30_1
|
|
perl-Attribute-Handlers-1.01_1
|
|
perl-AutoLoader-5.74_1
|
|
perl-B-Debug-1.26_1
|
|
perl-CPAN-2.20_1
|
|
perl-CPAN-Meta-2.150010_1
|
|
perl-CPAN-Meta-Requirements-2.140_1
|
|
perl-CPAN-Meta-YAML-0.018_1
|
|
perl-Carp-1.50_1
|
|
perl-Compress-Raw-Bzip2-2.074_1
|
|
perl-Compress-Raw-Zlib-2.076_1
|
|
perl-Config-Perl-V-0.29_1
|
|
perl-DB_File-1.840_1
|
|
perl-Data-Dumper-2.170_1
|
|
perl-Devel-PPPort-3.40_1
|
|
perl-Devel-SelfStubber-1.06_1
|
|
perl-Digest-1.17_01_1
|
|
perl-Digest-MD5-2.55_1
|
|
perl-Digest-SHA-6.01_1
|
|
perl-Dumpvalue-1.18_1
|
|
perl-Encode-2.97_1
|
|
perl-Env-1.04_1
|
|
perl-Exporter-5.73_1
|
|
perl-ExtUtils-CBuilder-0.280230_1
|
|
perl-ExtUtils-Constant-0.25_1
|
|
perl-ExtUtils-Install-2.14_1
|
|
perl-ExtUtils-MakeMaker-7.34_1
|
|
perl-ExtUtils-Manifest-1.70_1
|
|
perl-ExtUtils-ParseXS-3.39_1
|
|
perl-File-Fetch-0.56_1
|
|
perl-File-Path-2.15_1
|
|
perl-File-Temp-0.2304_1
|
|
perl-Filter-Simple-0.95_1
|
|
perl-Filter-Util-Call-1.58_1
|
|
perl-Getopt-Long-2.5_1
|
|
perl-HTTP-Tiny-0.070_1
|
|
perl-I18N-Collate-1.02_1
|
|
perl-I18N-LangTags-0.43_1
|
|
perl-IO-1.39_1
|
|
perl-IO-Compress-2.074_1
|
|
perl-IO-Socket-IP-0.39_1
|
|
perl-IO-Zlib-1.10_1
|
|
perl-IPC-Cmd-1.00_1
|
|
perl-IPC-SysV-2.07_1
|
|
perl-JSON-PP-2.97001_1
|
|
perl-Locale-Codes-3.56_1
|
|
perl-Locale-Maketext-1.29_1
|
|
perl-Locale-Maketext-Simple-0.21_01_1
|
|
perl-MIME-Base64-3.15_1
|
|
perl-Math-BigInt-1.999811_1
|
|
perl-Math-BigInt-FastCalc-0.5006_1
|
|
perl-Math-BigRat-0.2613_1
|
|
perl-Math-Complex-1.5901_1
|
|
perl-Memoize-1.03_01_1
|
|
perl-Module-CoreList-5.20180622_1
|
|
perl-Module-Load-0.32_1
|
|
perl-Module-Load-Conditional-0.68_1
|
|
perl-Module-Loaded-0.08_1
|
|
perl-Module-Metadata-1.000033_1
|
|
perl-NEXT-0.67_01_1
|
|
perl-Net-Ping-2.62_1
|
|
perl-Params-Check-0.38_1
|
|
perl-PathTools-3.74_1
|
|
perl-Perl-OSType-1.010_1
|
|
perl-PerlIO-via-QuotedPrint-0.08_1
|
|
perl-Pod-Checker-1.73_1
|
|
perl-Pod-Escapes-1.07_1
|
|
perl-Pod-Parser-1.63_1
|
|
perl-Pod-Perldoc-3.2801_1
|
|
perl-Pod-Simple-3.35_1
|
|
perl-Pod-Usage-1.69_1
|
|
perl-Safe-2.40_1
|
|
perl-Scalar-List-Utils-1.50_1
|
|
perl-Search-Dict-1.07_1
|
|
perl-SelfLoader-1.25_1
|
|
perl-Socket-2.027_1
|
|
perl-Storable-3.08_1
|
|
perl-Sys-Syslog-0.35_1
|
|
perl-Term-ANSIColor-4.06_1
|
|
perl-Term-Cap-1.17_1
|
|
perl-Term-Complete-1.403_1
|
|
perl-Term-ReadLine-1.17_1
|
|
perl-Test-1.31_1
|
|
perl-Test-Harness-3.42_1
|
|
perl-Test-Simple-1.302133_1
|
|
perl-Text-Abbrev-1.02_1
|
|
perl-Text-Balanced-2.03_1
|
|
perl-Text-ParseWords-3.30_1
|
|
perl-Text-Tabs-2013.0523_1
|
|
perl-Thread-Queue-3.12_1
|
|
perl-Thread-Semaphore-2.13_1
|
|
perl-Tie-File-1.02_1
|
|
perl-Tie-RefHash-1.39_1
|
|
perl-Time-HiRes-1.9759_1
|
|
perl-Time-Local-1.25_1
|
|
perl-Time-Piece-1.3204_1
|
|
perl-Unicode-Collate-1.25_1
|
|
perl-Unicode-Normalize-1.26_1
|
|
perl-Win32-0.52_1
|
|
perl-Win32API-File-0.1203_1
|
|
perl-XSLoader-0.30_1
|
|
perl-autodie-2.29_1
|
|
perl-autouse-1.11_1
|
|
perl-base-2.27_1
|
|
perl-bignum-0.49_1
|
|
perl-constant-1.33_1
|
|
perl-encoding-warnings-0.13_1
|
|
perl-experimental-0.019_1
|
|
perl-if-0.0608_1
|
|
perl-lib-0.64_1
|
|
perl-libnet-3.11_1
|
|
perl-parent-0.236_1
|
|
perl-perlfaq-5.021011_1
|
|
perl-podlators-5.006_1
|
|
perl-threads-2.22_1
|
|
perl-threads-shared-1.58_1
|
|
perl-version-0.9923_1"
|
|
|
|
for f in ${provides}; do
|
|
replaces+=" $($XBPS_UHELPER_CMD getpkgname ${f})>=0"
|
|
done
|
|
|
|
post_extract() {
|
|
cp -a ../perl-cross-${_perl_cross_version}/* .
|
|
ln -s perl5-5.26.0 cnf/diffs/perl5-5.28.0
|
|
}
|
|
|
|
do_configure() {
|
|
local _args="-Dusethreads -Duseshrplib -Dusesoname -Dusevendorprefix
|
|
-Dprefix=/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 -Dvendorscript=/usr/bin
|
|
-Dinc_version_list=none -Dman1ext=1p -Dman3ext=3p
|
|
-Dman1dir=/usr/share/man/man1
|
|
-Dman3dir=/usr/share/man/man3
|
|
-Dd_sockaddr_in6=define"
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
_args+=" --target=$XBPS_CROSS_TRIPLET"
|
|
fi
|
|
|
|
LDFLAGS+=" -pthread"
|
|
# perl-cross autodetection fails. Need perl -V:lseeksize = 8.
|
|
# (default on musl.)
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686|armv5tel|armv6l|armv7l|aarch64|ppc64le|ppc64|ppc)
|
|
HOSTLDFLAGS+=" -pthread"
|
|
export HOSTLDFLAGS
|
|
CFLAGS+=" -D_FILE_OFFSET_BITS=64 -DLARGE_FILE_SUPPORT64 ";;
|
|
*-musl)
|
|
HOSTCFLAGS+=" -D_GNU_SOURCE"
|
|
export HOSTCFLAGS
|
|
HOSTLDFLAGS+=" -pthread"
|
|
export HOSTLDFLAGS
|
|
CFLAGS+=" -DNO_POSIX_2008_LOCALE"
|
|
CFLAGS+=" -D_GNU_SOURCE";;
|
|
esac
|
|
|
|
export LD="$CC"
|
|
./configure --prefix=/usr $_args \
|
|
-Dcccdlflags="-fPIC" \
|
|
-Doptimize=" -Wall ${CFLAGS} " -Dccflags=" ${CFLAGS} " \
|
|
-Dlddlflags="-shared ${LDFLAGS}" -Dldflags="${LDFLAGS}" \
|
|
-Dperl_static_inline='static __inline__' -Dd_static_inline ||
|
|
{
|
|
cat ./config.log
|
|
return 42
|
|
}
|
|
}
|
|
|
|
post_install() {
|
|
find ${DESTDIR}/usr/share -type f -exec chmod 644 {} \;
|
|
find ${DESTDIR}/usr/lib -type f -exec chmod 644 {} \;
|
|
|
|
# Make a symbolic link from perl to perl${version}.
|
|
ln -sf perl ${DESTDIR}/usr/bin/perl${version}
|
|
|
|
# Remove all pod files *except* those under
|
|
# /usr/share/perl5/core_perl/pod/ (FS#16488)
|
|
rm -f ${DESTDIR}/usr/share/perl5/core_perl/*.pod
|
|
for d in ${DESTDIR}/usr/share/perl5/core_perl/*; do
|
|
if [ -d $d -a $(basename $d) != "pod" ]; then
|
|
find $d -name *.pod -delete
|
|
fi
|
|
done
|
|
find ${DESTDIR}/usr/lib -name *.pod -delete
|
|
find ${DESTDIR} -name .packlist -delete
|
|
|
|
# Remove references to hardening -specs.
|
|
sed -e "s|-specs=.*hardened-ld||g" -e "s|-specs=.*hardened-cc1||g" \
|
|
-i ${DESTDIR}/usr/lib/perl5/core_perl/Config_heavy.pl
|
|
|
|
# HOTFIX
|
|
# ln -sfr ${DESTDIR}/usr/lib/perl5/core_perl/CORE/libperl.so.${version} ${DESTDIR}/usr/lib/
|
|
# ln -sfr ${DESTDIR}/usr/lib/perl5/core_perl/CORE/libperl.so.${version} ${DESTDIR}/usr/lib/libperl.so
|
|
}
|