-
Notifications
You must be signed in to change notification settings - Fork 18
/
042-perl
39 lines (34 loc) · 1.63 KB
/
042-perl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Final System: Perl
# This section is done in Chroot environment
export BUILD_ZLIB=False
export BUILD_BZIP2=0
export CF_OLD=$CFLAGS
export CFLAGS+=" -DNO_POSIX_2008_LOCALE"
export CFLAGS+=" -D_GNU_SOURCE"
# 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
# Apply patch from Alpine to fix locale.c errors
# in programs such as rxvt-unicode
patch -p1 < ../patches/perl-5.30-alpine/musl-locale.patch
patch -Np1 -i ../patches/perl-alpine/musl-locale.patch &&
patch -Np1 -i ../patches/perl-alpine/musl-stack-size.patch
CC=clang CXX=clang++ \
sh Configure -des -Dprefix=/usr \
-Dvendorprefix=/usr \
-Dprivlib=/usr/lib/perl5/5.34/core_perl \
-Darchlib=/usr/lib/perl5/5.34/core_perl \
-Dsitelib=/usr/lib/perl5/5.34/site_perl \
-Dsitearch=/usr/lib/perl5/5.34/site_perl \
-Dvendorlib=/usr/lib/perl5/5.34/vendor_perl \
-Dvendorarch=/usr/lib/perl5/5.34/vendor_perl \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
-Dpager="/usr/bin/less -isR" \
-Duseshrplib \
-Dusethreads \
-Dcccdlflags='-fPIC' -Dccdlflags='-rdynamic'
make && make install
export CFLAGS=$CF_OLD
unset BUILD_ZLIB BUILD_BZIP2 CF_OLD