summaryrefslogblamecommitdiff
path: root/system/pcre/APKBUILD
blob: 9bb2638c59a59b570ba4d771f71ae8e4d300db01 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                    
                                                 
            
           
        


                                                    
                      
          
              

                                                     


                                                                                          






                    
         

                                                



                                 
                               













                                                                



                                      







                                        

                                                         



                                                    

                                                        



                                                    

                                                        







                                              

                                                                                                                                                                   
# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=pcre
pkgver=8.43
pkgrel=2
pkgdesc="Perl-compatible regular expression library"
url="http://pcre.sourceforge.net"
arch="all"
license="BSD-3-Clause"
depends=""
makedepends=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools
	libpcrecpp libpcre16 libpcre32"
source="ftp://ftp.csx.cam.ac.uk/pub/software/programming/$pkgname/$pkgname-$pkgver.tar.bz2
	stack-frame-size-detection.patch
	"

# secfixes:
#   8.40-r2:
#   - CVE-2017-7186
#   7.8-r0:
#   - CVE-2017-11164

build() {
	local _enable_jit="--enable-jit"
	[ "$CARCH" = "s390x" ] && _enable_jit=""
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--libdir=/lib \
		$_enable_jit \
		--enable-utf8 \
		--enable-unicode-properties \
		--enable-pcre8 \
		--enable-pcre16 \
		--enable-pcre32 \
		--with-match-limit-recursion=8192 \
		--htmldir=/usr/share/doc/$pkgname-$pkgver/html \
		--docdir=/usr/share/doc/$pkgname-$pkgver

	make
}

package() {
	make DESTDIR="$pkgdir" install
}

check() {
	# skip locale specific tests
	sed -i -e 's/do3=yes//g' RunTest

	make check
}

libpcrecpp() {
	pkgdesc="C++ bindings for PCRE"
	mkdir -p "$subpkgdir"/lib
	mv "$pkgdir"/lib/libpcrecpp.so* "$subpkgdir"/lib/
}

libpcre16() {
	pkgdesc="PCRE with 16 bit character support"
	mkdir -p "$subpkgdir"/lib
	mv "$pkgdir"/lib/libpcre16.so* "$subpkgdir"/lib/
}

libpcre32() {
	pkgdesc="PCRE with 32 bit character support"
	mkdir -p "$subpkgdir"/lib
	mv "$pkgdir"/lib/libpcre32.so* "$subpkgdir"/lib/
}

tools() {
	pkgdesc="Auxiliary utilities for PCRE"
	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="3b4ac2c7ccd77c9575d07a33c3456f40b50731029e62d01fb8f2f5871d7118e12bc9e6bc7a8079769c765e38da5ecf98c4b261b10ff0a2f14f0881b434f67af7  pcre-8.43.tar.bz2
a088304318f7a04f90263efbab20b423e67fb6e3d829e7bc080fd44c29e98bc29cab992b73ed1b992af89cdf4606667af20572558a3a96549b7bd9479d0e6d88  stack-frame-size-detection.patch"