Subject: [alpine-aports] [PATCH v2] testing/php7: upgrade to 7.1.4

From: Valery Kartel <[email-masked]>
Date: Fri, 14 Apr 2017 17:27:10 +0300

fix provides/replaces
fix -doc, -dev, -pecl depends
remove 7.1 compatibility suffix

---
v1 -> v2: disable jit on s390x
---
 testing/php7/APKBUILD | 40 +++++++++++++++-------------------------
 1 file changed, 15 insertions(+), 25 deletions(-)

diff --git a/testing/php7/APKBUILD b/testing/php7/APKBUILD
index 0b69648b52..2b66cdcd5e 100644
--- a/testing/php7/APKBUILD
+++ b/testing/php7/APKBUILD
@@ -1,10 +1,9 @@
 # Contributor: Valery Kartel <[email-masked]>
 # Maintainer: Valery Kartel <[email-masked]>
 pkgname=php7
-pkgver=7.1.3
+pkgver=7.1.4
 pkgrel=0
 _apiver=20160303
-_compat=7.1
 _suffix=${pkgname#php}
 _pkgreal=${pkgname%$_suffix}
 pkgdesc="The PHP$_suffix language runtime engine"
@@ -13,9 +12,10 @@ arch="all"
 license="PHP-3"
 options="!check"
 depends="$pkgname-config"
-depends_dev="$pkgname"
-replaces="$_pkgreal $_pkgreal-cli $_pkgreal$_compat $_pkgreal$_compat-cli"
-provides="$replaces $pkgname-cli"
+depends_dev="$pkgname autoconf pcre-dev"
+depends_doc=
+replaces="php5"
+provides="$_pkgreal $pkgname-cli"
 makedepends="autoconf bison re2c apache2-dev libxml2-dev libxslt-dev libzip-dev bzip2-dev zlib-dev
 	aspell-dev enchant-dev expat-dev pcre-dev curl-dev gmp-dev icu-dev imap-dev gd-dev
 	libical-dev libressl-dev openldap-dev net-snmp-dev db-dev krb5-dev gdbm-dev sqlite-dev
@@ -77,6 +77,7 @@ prepare() {
 # --with-xmlrpc -- do not swith to system-wide xmlrpc - build errors.
 
 _build() {
+	[ "$CARCH" = "s390x" ] && local disable_pcre_jit="--without-pcre-jit"
 	./configure \
 		EXTENSION_DIR=$_extension_dir \
 		--build=$CBUILD \
@@ -143,6 +144,7 @@ _build() {
 		--enable-pcntl=shared \
 		--with-pcre-regex=/usr \
 			--with-pcre-dir \
+			$disable_pcre_jit \
 		--enable-pdo=shared \
 		--with-pdo-dblib=shared \
 		--with-pdo-mysql=shared,mysqlnd \
@@ -213,8 +215,7 @@ package() {
 }
 
 dev() {
-	provides="$_pkgreal-dev $_pkgreal$_compat-dev"
-	replaces=$provides
+	replaces=$replaces-${subpkgname#$pkgname-}
 	default_dev || return 1
 
 	mkdir -p "$subpkgdir"/usr/bin \
@@ -231,7 +232,6 @@ dev() {
 }
 
 doc() {
-	provides=
 	replaces=
 	default_doc || return 1
 	install_if="docs $pkgname-config=$pkgver-r$pkgrel"
@@ -244,7 +244,6 @@ doc() {
 }
 
 apache2() {
-	provides="$_pkgreal-apache2 $_pkgreal$_compat-apache2"
 	replaces=
 	pkgdesc="$pkgdesc (apache2 module)"
 	depends="$pkgname-config apache2"
@@ -258,8 +257,7 @@ apache2() {
 }
 
 phpdbg() {
-	provides="$_pkgreal-phpdbg $_pkgreal$_compat-phpdbg"
-	replaces=$provides
+	replaces=$replaces-${subpkgname#$pkgname-}
 	pkgdesc="$pkgdesc (interactive debugger)"
 	depends="$pkgname-config"
 
@@ -269,7 +267,6 @@ phpdbg() {
 }
 
 libs() {
-	provides="$_pkgreal-libs $_pkgreal$_compat-libs"
 	replaces=
 	pkgdesc="$pkgdesc (embedded library)"
 	depends="$pkgname-config"
@@ -280,8 +277,7 @@ libs() {
 }
 
 litespeed() {
-	provides="$_pkgreal-litespeed $_pkgreal$_compat-litespeed"
-	replaces=$provides
+	replaces=$replaces-${subpkgname#$pkgname-}
 	pkgdesc="$pkgdesc (litespeed)"
 	depends="$pkgname-config"
 
@@ -292,8 +288,7 @@ litespeed() {
 }
 
 cgi() {
-	provides="$_pkgreal-cgi $_pkgreal$_compat-cgi"
-	replaces=$provides
+	replaces=$replaces-${subpkgname#$pkgname-}
 	pkgdesc="$pkgdesc (common gateway interface)"
 	depends="$pkgname-config"
 
@@ -304,7 +299,6 @@ cgi() {
 }
 
 fpm() {
-	provides="$_pkgreal-fpm $_pkgreal$_compat-fpm"
 	replaces=
 	pkgdesc="$pkgdesc (fastcgi process manager)"
 	depends="$pkgname-config"
@@ -332,8 +326,7 @@ fpm() {
 }
 
 pear() {
-	provides="$_pkgreal-pear $_pkgreal$_compat-pear"
-	replaces=$provides
+	replaces=$replaces-${subpkgname#$pkgname-}
 	pkgdesc="$pkgdesc (php extension and application repository)"
 	depends="$pkgname $pkgname-xml"
 
@@ -361,10 +354,9 @@ pear() {
 }
 
 pecl() {
-	provides="$_pkgreal-pecl $_pkgreal$_compat-pecl"
 	replaces=
 	pkgdesc="$pkgdesc (php extension community library)"
-	depends="$pkgname-pear $pkgname-dev autoconf gcc make musl-dev"
+	depends="$pkgname-pear $pkgname-dev gcc make musl-dev"
 	mkdir -p "$subpkgdir"
 }
 
@@ -385,8 +377,7 @@ config() {
 }
 
 _phar() {
-	provides="$_pkgreal-phar-utils $_pkgreal$_compat-phar-utils"
-	replaces=$provides
+	replaces=$replaces-${subpkgname#$pkgname-}
 	pkgdesc="$pkgdesc (archive script)"
 	depends="$pkgname $pkgname-phar"
 
@@ -407,7 +398,6 @@ _extension() {
 	local dep deps
 	local name=${subpkgname#$pkgname-}
 	local index=$(eval echo \${_index_$name:-0})
-	provides="$_pkgreal-$name $_pkgreal$_compat-$name"
 	replaces=
 	depends=$(eval echo \$_depends_$name)
 
@@ -436,7 +426,7 @@ _extension() {
 		"$subpkgdir"/$_extension_conf/$(printf %02d $index)_$name.ini
 }
 
-sha512sums="90dd06348d5884a2bb4a22ab80bb4f50e603751a1787096f447762fe00e5b4f36deafda045ecf6345883d9f4b711755a854a2e7043f27702acfe78ade90b42d9  php-7.1.3.tar.bz2
+sha512sums="a1dd5ffd756176e6ba600dd850510033d0d6f07aff314de69fec0c42437e6a006449e3f4f98679146a2f2645caa65ea351e31a8e1da7c14cc5260856ad40eaff  php-7.1.4.tar.bz2
 fbf9a1572d37370ec0d126502e1d066e045a992484d8fc4f1e2ede330134c1a15f4029f29fa4daebd48eed78b045dc051ced69fbf1f11efc7ad81d884a639a99  php7-module.conf
 cacce7bf789467ff40647b7319e3760c6c587218720538516e8d400baa75651f72165c4e28056cd0c1dc89efecb4d00d0d7823bed80b29136262c825ce816691  php7-fpm.logrotate
 d91a915d00b8a25565b0ef87d5788ec40eb02b7890ab72df8cea49693311645c97ce2eed6f706a12704c7818102daee7ba2c42ee814c61bb29f90e464e3bb17f  php7-fpm.initd
-- 
2.12.2

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---