summaryrefslogtreecommitdiffstats
path: root/main/pcre
diff options
context:
space:
mode:
Diffstat (limited to 'main/pcre')
-rw-r--r--main/pcre/APKBUILD23
-rw-r--r--main/pcre/uclibc-strtoq.patch18
2 files changed, 36 insertions, 5 deletions
diff --git a/main/pcre/APKBUILD b/main/pcre/APKBUILD
index 160311093..cc7c74fcf 100644
--- a/main/pcre/APKBUILD
+++ b/main/pcre/APKBUILD
@@ -6,12 +6,24 @@ pkgdesc="Perl-compatible regular expression library"
url="http://pcre.sourceforge.net"
license="BSD"
depends=
-makedepends=
-source="ftp://ftp.csx.cam.ac.uk/pub/software/programming/$pkgname/$pkgname-$pkgver.tar.bz2"
+makedepends="autoconf automake libtool"
+source="ftp://ftp.csx.cam.ac.uk/pub/software/programming/$pkgname/$pkgname-$pkgver.tar.bz2
+ uclibc-strtoq.patch"
subpackages="$pkgname-dev $pkgname-doc libpcrecpp"
+_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
+}
+
build() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$_builddir"
./configure --prefix=/usr \
--enable-utf8 \
--with-match-limit-recursion=8192 \
@@ -22,7 +34,7 @@ build() {
}
package() {
- cd "$srcdir/$pkgname-$pkgver"
+ cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
}
@@ -32,4 +44,5 @@ libpcrecpp() {
mv "$pkgdir"/usr/lib/libpcrecpp.so* "$subpkgdir"/usr/lib/
}
-md5sums="780867a700e9d4e4b9cb47aa5453e4b2 pcre-8.10.tar.bz2"
+md5sums="780867a700e9d4e4b9cb47aa5453e4b2 pcre-8.10.tar.bz2
+6276c5cdbecaa14256b50ce9a9333500 uclibc-strtoq.patch"
diff --git a/main/pcre/uclibc-strtoq.patch b/main/pcre/uclibc-strtoq.patch
new file mode 100644
index 000000000..b1de742e3
--- /dev/null
+++ b/main/pcre/uclibc-strtoq.patch
@@ -0,0 +1,18 @@
+--- ./configure.ac.orig
++++ ./configure.ac
+@@ -361,13 +361,13 @@
+ else
+ include=stdlib.h
+ fi
+- AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include <$include>],
++ AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <$include>],
+ [char* e; return $fn("100", &e, 10)]),
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED(HAVE_`echo $fn | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`, 1,
+ [Define to 1 if you have `$fn'.])
+ have_strto_fn=1
+- break],
++ ],
+ [AC_MSG_RESULT(no)])
+ done
+