summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/php/APKBUILD13
1 files changed, 11 insertions, 2 deletions
diff --git a/main/php/APKBUILD b/main/php/APKBUILD
index 8ad19f27d..b4146be14 100644
--- a/main/php/APKBUILD
+++ b/main/php/APKBUILD
@@ -74,16 +74,25 @@ source="http://www.php.net/distributions/${pkgname}-${pkgver}.tar.bz2
$install
"
-_extdir="/usr/lib/php/20090626"
+_apiver="20090626"
+_extdir="/usr/lib/php/$_apiver"
+_srcdir="$srcdir"/$pkgname-$pkgver
prepare() {
- cd "$srcdir"/$pkgname-$pkgver
+ cd "$_srcdir"
# beat the pear installer into using xml.so
patch -p1 -i "$srcdir"/php-install-pear-xml.patch || return 1
patch -p1 -i "$srcdir"/php-uclibc.patch || return 1
# apply suhosin patch
patch -p1 -i "${srcdir}"/suhosin-patch-${_suhosinver}.patch || return 1
+
+ # safty check for api changes
+ local vapi=$(sed -n '/#define PHP_API_VERSION/{s/.* //;p}' main/php.h)
+ if [ "$vapi" != "$_apiver" ]; then
+ error "Upstreram API version is now $vapi. Expecting $_vapi"
+ return 1
+ fi
}
build() {