aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl
diff options
context:
space:
mode:
authorValery Kartel <valery.kartel@gmail.com>2017-01-23 17:28:14 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2017-01-23 16:59:09 +0000
commitd7bc7e1589be482ad883af78832d6845cc889d06 (patch)
tree94061fb0e01d73f267830799f6803509552b6777 /main/perl
parent81209ba8c58521abf142da22ce3f0cf4fcb605b0 (diff)
downloadaports-d7bc7e1589be482ad883af78832d6845cc889d06.tar.bz2
aports-d7bc7e1589be482ad883af78832d6845cc889d06.tar.xz
main/perl: fixes and cleanups in apkbuild
- remove one-time used variables - move *.pod files to -doc subpackage - move development scripts and modules to -dev subpackage - move all other scripts to -utils subpackage
Diffstat (limited to 'main/perl')
-rw-r--r--main/perl/APKBUILD87
1 files changed, 55 insertions, 32 deletions
diff --git a/main/perl/APKBUILD b/main/perl/APKBUILD
index ba40e608fe..70551df366 100644
--- a/main/perl/APKBUILD
+++ b/main/perl/APKBUILD
@@ -1,39 +1,37 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Contributor: Valery Kartel <valery.kartel@gmail.com>
pkgname=perl
pkgver=5.24.0
-pkgrel=1
+pkgrel=2
pkgdesc="Larry Wall's Practical Extraction and Report Language"
-url=http://www.perl.org
+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
"
-options="!fhs"
+builddir="$srcdir/$pkgname-$pkgver"
-depends=
-depends_dev="perl"
-makedepends=
-subpackages="$pkgname-dev $pkgname-doc miniperl"
-
-_builddir="$srcdir/$pkgname-$pkgver"
+_privlib=/usr/share/perl5/core_perl
+_archlib=/usr/lib/perl5/core_perl
prepare() {
- cd $_builddir
default_prepare || return 1
- sed -i -e 's/less -R/less/g' ./Configure
- sed -i -e 's/libswanted="\(.*\) nsl\(.*\)"/libswanted="\1\2"/g' ./Configure
+ cd "$builddir"
+ sed -e 's/less -R/less/g' \
+ -e 's/libswanted="\(.*\) nsl\(.*\)"/libswanted="\1\2"/g' \
+ -i ./Configure || return 1
}
-_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
+ cd "$builddir"
./Configure -des \
-Dcccdlflags='-fPIC' \
-Dcccdlflags='-fPIC' \
@@ -42,13 +40,13 @@ build() {
-Dprivlib=$_privlib \
-Darchlib=$_archlib \
-Dvendorprefix=/usr \
- -Dvendorlib=$_vendorlib \
- -Dvendorarch=$_vendorarch \
+ -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}" \
+ -Doptimize="$CFLAGS" \
-Duselargefiles \
-Dusethreads \
-Duseshrplib \
@@ -59,38 +57,63 @@ build() {
-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"
+ 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() {
- pkgname=miniperl
- mkdir -p "$subpkgdir"/usr/bin
- cp "$srcdir/perl-$pkgver"/miniperl "$subpkgdir/usr/bin"
+ 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"/$_privlib
+ 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
+ local file
+ for file in c2ph corelist enc2xs instmodsh h2ph h2xs libnetcfg perldoc \
+ perlivp perlthanks pl2pm pod2html pod2man pod2text pod2usage \
+ podchecker podselect prove xsubpp $pkgname$pkgver
+ do
+ mv "$pkgdir"/usr/bin/$file "$subpkgdir"/usr/bin/ || return 1
+ done
+ 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
- replaces="perl"
+}
+
+utils() {
+ pkgdesc="$pkgdesc (misc utilities)"
+ depends="$pkgname"
mkdir -p "$subpkgdir"/usr/bin
- for i in enc2xs h2xs libnetcfg perlivp; do
- mv "$pkgdir"/usr/bin/$i "$subpkgdir"/usr/bin/ || return 1
+ local file
+ for file in cpan encguess json_pp piconv ptar ptardiff ptargrep shasum \
+ splain zipdetails
+ do
+ mv "$pkgdir"/usr/bin/$file "$subpkgdir"/usr/bin/ || return 1
done
}