aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl/APKBUILD
blob: 8d9b7b93a15f7026dd359be7dae313bc1eacc251 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Leonardo Arena <rnalrd@gmail.com>
pkgname=perl
pkgver=5.14.0
pkgrel=0
pkgdesc="Larry Wall's Practical Extraction and Report Language"
url=http://www.perl.org
arch="all"
license="Artistic GPL-2"
source="http://search.cpan.org/CPAN/authors/id/J/JE/JESSE/perl-$pkgver.tar.gz"
depends=
subpackages="$pkgname-dev $pkgname-doc miniperl"

_builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	cd $_builddir
	sed -i -e 's/less -R/less/g' ./Configure
	sed -i -e 's/libswanted="\(.*\) nsl\(.*\)"/libswanted="\1\2"/g' ./Configure
}

build() {
	cd $_builddir
	./Configure -des \
		-Dcccdlflags='-fPIC' \
		-Dcccdlflags='-fPIC' \
		-Dccdlflags='-rdynamic' \
		-Dprefix=/usr \
		-Dprivlib=/usr/share/perl5/core_perl \
		-Darchlib=/usr/lib/perl5/core_perl \
		-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' \
		-Dinc_version_list="$inclist" \
		-Dcf_by='Alpine' \
		-Ud_csh \
		-Dusenm \
		|| return 1
	make
}

package() {
	cd "$srcdir/$pkgname-$pkgver"
	make install DESTDIR="$pkgdir"
}

miniperl() {
	pkgname=miniperl
	mkdir -p "$subpkgdir"/usr/bin
	cp "$srcdir/perl-$pkgver"/miniperl "$subpkgdir/usr/bin"
}

md5sums="e688b0ddad50bca9a6223693a85c439d  perl-5.14.0.tar.gz"