From 4f5884fe4c2b8043a8c7667862a37085c1a39a20 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 2 Mar 2011 09:01:46 +0000 Subject: main/php: added safty check for API version --- main/php/APKBUILD | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'main/php/APKBUILD') 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() { -- cgit v1.2.3