Patches for aports can be sent to this list

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

Valery Kartel
Details
Message ID
<20170216105036.31446-1-valery.kartel@gmail.com>
Sender timestamp
1487242236
DKIM signature
missing
Download raw message
Patch: +9 -8
--
 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
@@ -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/"
@@ -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
@@ -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"
@@ -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
@@ -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"
@@ -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
@@ -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)"
@@ -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@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---