aboutsummaryrefslogtreecommitdiffstats
path: root/main/php
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-03-02 09:01:46 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-03-02 09:42:30 +0000
commit4f5884fe4c2b8043a8c7667862a37085c1a39a20 (patch)
tree1446e9e9ee760ed7e3ccffbe1c5d7a58aeadac48 /main/php
parentba42bc7d808ee85edc317ec4af1dc4566c9e2847 (diff)
downloadaports-4f5884fe4c2b8043a8c7667862a37085c1a39a20.tar.bz2
aports-4f5884fe4c2b8043a8c7667862a37085c1a39a20.tar.xz
main/php: added safty check for API version
Diffstat (limited to 'main/php')
-rw-r--r--main/php/APKBUILD13
1 files changed, 11 insertions, 2 deletions
diff --git a/main/php/APKBUILD b/main/php/APKBUILD
index 8ad19f27dc..b4146be14d 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() {