blob: e21f7bfd43385619375f60c4e33f2df8d5d47791 (
plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl
pkgver=5.24.4
pkgrel=1
pkgdesc="Larry Wall's Practical Extraction and Report Language"
url=http://www.perl.org
arch="all"
license="Artistic GPL2"
source="http://www.cpan.org/src/5.0/perl-$pkgver.tar.gz
CVE-2018-12015.patch
"
options="!fhs"
depends=
depends_dev="perl"
makedepends="bzip2-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-doc miniperl"
# secfixes:
# 5.24.4-r1:
# - CVE-2018-12015
# 5.24.3-r0:
# - CVE-2017-12837
# - CVE-2017-12883
# 5.24.3-r1:
# - CVE-2016-9843
# - CVE-2016-9841
# - CVE-2016-9840
# - CVE-2016-9842
# 5.24.4-r0:
# - CVE-2018-6797
# - CVE-2018-6798
# - CVE-2018-6913
_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
cd $_builddir
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
sed -i -e 's/less -R/less/g' ./Configure
sed -i -e 's/libswanted="\(.*\) nsl\(.*\)"/libswanted="\1\2"/g' ./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
}
_privlib=/usr/share/perl5/core_perl
_archlib=/usr/lib/perl5/core_perl
_vendorlib=/usr/share/perl5/vendor_perl
_vendorarch=/usr/lib/perl5/vendor_perl
build() {
cd $_builddir
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=$_vendorlib \
-Dvendorarch=$_vendorarch \
-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' \
-Dinc_version_list="$inclist" \
-Dcf_by='Alpine' \
-Ud_csh \
-Dusenm \
|| return 1
make libperl.so && make || return 1
# make check || return 1
}
package() {
cd "$srcdir/$pkgname-$pkgver"
make install DESTDIR="$pkgdir"
if [ -n "$(find $pkgdir/usr/local -type f)" ]; then
error "files found under /usr/local"
return 1
fi
}
miniperl() {
pkgname=miniperl
mkdir -p "$subpkgdir"/usr/bin
cp "$srcdir/perl-$pkgver"/miniperl "$subpkgdir/usr/bin"
}
dev() {
mkdir -p "$subpkgdir"/$_privlib
mv "$pkgdir"/$_privlib/Encode "$subpkgdir"/$_privlib/ || return 1
default_dev
replaces="perl"
mkdir -p "$subpkgdir"/usr/bin
for i in enc2xs h2xs libnetcfg perlivp; do
mv "$pkgdir"/usr/bin/$i "$subpkgdir"/usr/bin/ || return 1
done
}
sha512sums="796d92f47860ac0e3a22d85eb129549c4251445b3cfa8687e305c95f6205ad32a670e0d680e20245e47f0c6567b313748bce1db04208b21ff10595196e37a40b perl-5.24.4.tar.gz
feda381bd3230443341b99135bac4d6010e9d28b619d9fb57f2dda2c29b8877f012f76d31631e5227ef79e73e0b2b162548fa24704752e61f10c05d015c68916 CVE-2018-12015.patch"
|