APKBUILD 1.2 KB
Newer Older
Natanael Copa's avatar
Natanael Copa committed
1
2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pcre
Natanael Copa's avatar
Natanael Copa committed
3
pkgver=8.11
4
pkgrel=1
Natanael Copa's avatar
Natanael Copa committed
5
6
pkgdesc="Perl-compatible regular expression library"
url="http://pcre.sourceforge.net"
Natanael Copa's avatar
Natanael Copa committed
7
arch="x86 x86_64"
Natanael Copa's avatar
Natanael Copa committed
8
license="BSD"
Natanael Copa's avatar
Natanael Copa committed
9
depends=
10
11
12
makedepends="autoconf automake libtool"
source="ftp://ftp.csx.cam.ac.uk/pub/software/programming/$pkgname/$pkgname-$pkgver.tar.bz2
	uclibc-strtoq.patch"
13
subpackages="$pkgname-dev $pkgname-doc libpcrecpp"
Natanael Copa's avatar
Natanael Copa committed
14

15
16
17
18
19
20
21
22
23
24
25
_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	aclocal && autoconf && automake && libtoolize
}

Natanael Copa's avatar
Natanael Copa committed
26
build() { 
27
	cd "$_builddir"
Natanael Copa's avatar
Natanael Copa committed
28
	./configure --prefix=/usr \
Natanael Copa's avatar
Natanael Copa committed
29
		--enable-utf8 \
30
		--enable-unicode-properties \
Natanael Copa's avatar
Natanael Copa committed
31
32
33
34
35
		--with-match-limit-recursion=8192 \
		--htmldir=/usr/share/doc/$pkgname-$pkgver/html \
		--docdir=/usr/share/doc/$pkgname-$pkgver

	make || return 1
Natanael Copa's avatar
Natanael Copa committed
36
37
38
}

package() {
39
	cd "$_builddir"
Natanael Copa's avatar
Natanael Copa committed
40
41
42
	make DESTDIR="$pkgdir" install || return 1
}

43
44
45
46
47
48
libpcrecpp() {
	pkgdesc="C++ bindings for PCRE"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libpcrecpp.so* "$subpkgdir"/usr/lib/
}

Natanael Copa's avatar
Natanael Copa committed
49
md5sums="ef907b8792ec7f90f0dcd773848f0b3b  pcre-8.11.tar.bz2
50
6276c5cdbecaa14256b50ce9a9333500  uclibc-strtoq.patch"