blob: 63a70b811c6d2fe409d6d36a08fb7cbc79f0fc1c (
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
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
pkgname=perl
pkgver=5.24.1
pkgrel=2
pkgdesc="Larry Wall's Practical Extraction and Report Language"
url="http://www.perl.org/"
arch="all"
license="Artistic GPL2"
options="!fhs"
depends=""
depends_dev="perl-utils"
makedepends=""
subpackages="$pkgname-doc $pkgname-dev $pkgname-utils::noarch miniperl"
source="http://www.cpan.org/src/5.0/perl-$pkgver.tar.gz
0001-Upgrade-Time-HiRes-to-1.9739.patch
0002-Time-HiRes-bring-up-to-date-with-CPAN.patch
"
builddir="$srcdir/$pkgname-$pkgver"
_privlib=/usr/share/perl5/core_perl
_archlib=/usr/lib/perl5/core_perl
prepare() {
default_prepare || return 1
cd "$builddir"
sed -e 's/less -R/less/g' \
-e 's/libswanted="\(.*\) nsl\(.*\)"/libswanted="\1\2"/g' \
-i ./Configure || return 1
}
build() {
cd "$builddir"
./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='Alpine' \
-Ud_csh \
-Dusenm \
|| return 1
make libperl.so && make || return 1
}
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
if [ -n "$(find $pkgdir/usr/local -type f)" ]; then
error "files found under /usr/local"
return 1
fi
find "$pkgdir" -name '.*' -delete
}
miniperl() {
install -Dm755 "$builddir"/$subpkgname \
"$subpkgdir"/usr/bin/$subpkgname || return 1
}
doc() {
default_doc
local file; for file in $(find "$pkgdir" -name "*.pod"); do
file=${file#$pkgdir/}
mkdir -p "$subpkgdir"/${file%/*} || return 1
mv "$pkgdir"/$file "$subpkgdir"/$file || return 1
done
}
dev() {
mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/$_archlib "$subpkgdir"/$_privlib
mv "$pkgdir"/$_archlib/Devel "$subpkgdir"/$_archlib/ || return 1
mv "$pkgdir"/$_privlib/Encode "$subpkgdir"/$_privlib/ || return 1
rm "$pkgdir"/usr/bin/pstruct "$pkgdir"/usr/bin/perlbug
ln -sf /usr/bin/c2ph "$subpkgdir"/usr/bin/pstruct
ln -sf /usr/bin/perlthanks "$subpkgdir"/usr/bin/perlbug
default_dev
}
utils() {
pkgdesc="$pkgdesc (misc utilities)"
depends="$pkgname"
mkdir -p "$subpkgdir"/usr/bin
local file
for file in cpan encguess json_pp piconv ptar ptardiff ptargrep shasum \
splain zipdetails prove
do
mv "$pkgdir"/usr/bin/$file "$subpkgdir"/usr/bin/ || return 1
done
}
md5sums="765ef511b5b87a164e2531403ee16b3c perl-5.24.1.tar.gz
5179406909208c0c42e4f8559af1cd9a 0001-Upgrade-Time-HiRes-to-1.9739.patch
c378c25f05a21fbad0fe910c88698f18 0002-Time-HiRes-bring-up-to-date-with-CPAN.patch"
sha256sums="e6c185c9b09bdb3f1b13f678999050c639859a7ef39c8cad418448075f5918af perl-5.24.1.tar.gz
4117c5c2fdea06eb53a44a581bc840ecaca2041646ccf4e5e631efa21793a590 0001-Upgrade-Time-HiRes-to-1.9739.patch
9a0a0ff1a6d1477207d2ca1dfb3808ae1e94db2e1939da08e05da30d10acb7b1 0002-Time-HiRes-bring-up-to-date-with-CPAN.patch"
sha512sums="6694d7951f782ef45e75f7b607b7843b597581c7818133f506cceeddf0380799916ea101d9efb5557c04b9038db013cc32118a4f2d0fe707f6edfc1572dbb2c2 perl-5.24.1.tar.gz
2f6d4c5ff851737ec6e79ea1c78d7b4ee361b68ae250fae67d5137dbb093787935a6d482caa355df4e1e4c319c4cd25d31df795a9b3cfb6a81103e773df59c54 0001-Upgrade-Time-HiRes-to-1.9739.patch
64e18a0676aec18616fd85c940a4cb2adbeb039e38405a406637b556c64949ac4c83b75943e5afbe0a50452b1c9592058c4f14f3add767ec849257509025d1fb 0002-Time-HiRes-bring-up-to-date-with-CPAN.patch"
|