diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-02 09:01:46 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-02 09:42:30 +0000 |
commit | 4f5884fe4c2b8043a8c7667862a37085c1a39a20 (patch) | |
tree | 1446e9e9ee760ed7e3ccffbe1c5d7a58aeadac48 /main/php/APKBUILD | |
parent | ba42bc7d808ee85edc317ec4af1dc4566c9e2847 (diff) | |
download | aports-4f5884fe4c2b8043a8c7667862a37085c1a39a20.tar.bz2 aports-4f5884fe4c2b8043a8c7667862a37085c1a39a20.tar.xz |
main/php: added safty check for API version
Diffstat (limited to 'main/php/APKBUILD')
-rw-r--r-- | main/php/APKBUILD | 13 |
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() { |