lfs-buildscripts/CH8Build/CH08.41-perl.sh

67 lines
1.8 KiB
Bash
Raw Normal View History

2024-10-05 17:08:41 +08:00
#!/bin/bash
source versions.sh
GLSOURCES="/sources"
2024-10-09 09:50:04 +08:00
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
2024-10-05 17:08:41 +08:00
[ -d perl-${perl_version} ] && rm -rf perl-${perl_version}
tar -Jxf ${perl_tarball}
cd perl-${perl_version}
export BUILD_ZLIB=False
export BUILD_BZIP2=0
# may be defined via the RPM
export MY_PERL_VERSION="${perl_major_version}.${perl_minor_version}"
sh Configure -des \
-D prefix=/usr \
-D vendorprefix=/usr \
-D privlib=/usr/lib/perl5/${MY_PERL_VERSION}/core_perl \
-D archlib=/usr/lib/perl5/${MY_PERL_VERSION}/core_perl \
-D sitelib=/usr/lib/perl5/${MY_PERL_VERSION}/site_perl \
-D sitearch=/usr/lib/perl5/${MY_PERL_VERSION}/site_perl \
-D vendorlib=/usr/lib/perl5/${MY_PERL_VERSION}/vendor_perl \
-D vendorarch=/usr/lib/perl5/${MY_PERL_VERSION}/vendor_perl \
-D man1dir=/usr/share/man/man1 \
-D man3dir=/usr/share/man/man3 \
-D pager="/usr/bin/less -isR" \
-D useshrplib \
-D usethreads
./configure --prefix=/usr \
--disable-static \
--docdir=/usr/share/doc/xz-${xz_version}
make
if [ $? -ne 0 ]; then
myfail "Failed building perl"
fi
2024-10-09 09:50:04 +08:00
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
echo "running perl make test"
TEST_JOBS=$(nproc) make test_harness > ${GLSOURCES}/perl.check.log 2>&1
fi
2024-10-05 17:08:41 +08:00
make install
if [ $? -ne 0 ]; then
myfail "Failed installing perl"
fi
unset BUILD_ZLIB BUILD_BZIP2 MY_PERL_VERSION
2024-10-08 14:25:15 +08:00
popd
# cleanup
pushd $GLSOURCES
rm -rf perl-${perl_version}
popd