aboutsummaryrefslogblamecommitdiffstats
path: root/main/perl/APKBUILD
blob: 6b5258243dfdc435fadbd613228097ce9414b5d2 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                   
                                                
            
             
        

                                                               
          
                        




                                                          
        
                                                
 



                                    




                                                                        



                                                                                   
         
                     



                                         








                                                            


                                        

                              
                                  










                                                      
            



                                     








                                                               


                                                             
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Leonardo Arena <rnalrd@gmail.com>
pkgname=perl
pkgver=5.12.4
pkgrel=0
pkgdesc="Larry Wall's Practical Extraction and Report Language"
url=http://www.perl.org
arch="all"
license="Artistic GPL-2"
source="http://www.perl.com/CPAN/src/perl-${pkgver}.tar.gz
	CVE-2011-2939.patch
	CVE-2011-3597.patch
	"

depends=
subpackages="$pkgname-dev $pkgname-doc miniperl"

_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
}

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="fd22aba88e4e27ab879f142eec6452a0  perl-5.12.4.tar.gz
c0674ead60e89c20e2c8d9bbc2d7683a  CVE-2011-2939.patch
0212067da7d533fe3939c0984cad4243  CVE-2011-3597.patch"