Mail archive
alpine-aports

[alpine-aports] [PATCH v2] testing/php7.1: fix 3rd-party extensions hook

From: Valery Kartel <valery.kartel_at_gmail.com>
Date: Thu, 16 Feb 2017 12:50:36 +0200

--
 now the hook is phpapi=$_apiver
 bump pkgrel to rebuild with new libpng
---
v1 -> v2:
 add phpapi=$_apiver to extensions dependencies
 fix php-pear dependencies
 fix /usr/bin/pecl to make it read php config
---
 testing/php7.1/APKBUILD | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/testing/php7.1/APKBUILD b/testing/php7.1/APKBUILD
index fbdff9392a..5bde8169ac 100644
--- a/testing/php7.1/APKBUILD
+++ b/testing/php7.1/APKBUILD
_at_@ -6,7 +6,7 @@ provides=$_pkgreal
 replaces=$provides
 pkgname=$_pkgreal$_suffix
 pkgver=7.1.1
-pkgrel=0
+pkgrel=1
 _apiver="20160303"
 pkgdesc="The PHP${pkgver%.*} language runtime engine"
 url="http://www.php.net/"
_at_@ -30,7 +30,6 @@ source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2
 	includedir.patch.in
 	install-pear.patch
 	"
-
 # unimplemented extensions: com_dotnet interbase oci8 pdo_firebird pdo_oci
 _extensions="bcmath bz2 calendar ctype curl dba dom enchant exif ftp gd gettext gmp iconv imap:1 intl json
 	ldap mbstring mcrypt mysqli mysqlnd odbc opcache openssl pcntl pdo pdo_dblib pdo_mysql
_at_@ -43,7 +42,6 @@ for _extension in $_extensions; do
 done
 _prefix_opcache="zend_"
 _pkgdesc_opcache="Zend OPcache"
-
 subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-apache2 $pkgname-phpdbg
 	$pkgname-litespeed $pkgname-cgi $pkgname-fpm $pkgname-pear::noarch
 	$pkgname-phar-phar:_phar:noarch $subpackages $pkgname-config::noarch"
_at_@ -200,7 +198,7 @@ package() {
 dev() {
 	provides=$_pkgreal-dev
 	replaces=$provides
-	default_dev
+	default_dev || return 1
 
 	mkdir -p "$subpkgdir"/usr/bin \
 		"$subpkgdir"/usr/lib/$pkgname
_at_@ -218,7 +216,7 @@ dev() {
 doc() {
 	provides=$_pkgreal-doc
 	replaces=
-	default_doc
+	default_doc || return 1
 	install_if="docs $pkgname-config=$pkgver-r$pkgrel"
 
 	cd "$builddir"
_at_@ -320,7 +318,7 @@ pear() {
 	provides=$_pkgreal-pear
 	replaces=$provides
 	pkgdesc="$pkgdesc (extension and application repository)"
-	depends="$pkgname $pkgname-xml"
+	depends="$pkgname-dev $pkgname-xml"
 
 	mkdir -p "$subpkgdir"/usr/bin \
 		"$subpkgdir"/etc/$pkgname
_at_@ -335,10 +333,13 @@ pear() {
 
 	mv "$pkgdir"/usr/share \
 		"$subpkgdir"/usr/ || return 1
+
+	# allow pecl to read php config
+	sed -ie "s/-C -n -q/-C -q/" "$subpkgdir"/usr/bin/pecl
 }
 
 config() {
-	provides="php-$_apiver"
+	provides="phpapi=$_apiver"
 	replaces=
 	depends=
 	pkgdesc="$pkgdesc (common config)"
_at_@ -384,7 +385,7 @@ _extension() {
 	done
 
 	: ${index:=$(echo $depends | wc -w)}
-	depends="$pkgname-config $depends"
+	depends="phpapi=$_apiver $pkgname-config $depends"
 
 	mkdir -p "$subpkgdir"/usr/lib/$pkgname/modules \
 		"$subpkgdir"/etc/$pkgname/conf.d
-- 
2.11.1
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Feb 16 2017 - 12:50:36 GMT