Subject: [alpine-aports] [PATCH] testing/php7.1: upgrade to 7.1.2

From: Valery Kartel <[email-masked]>
Date: Fri, 17 Feb 2017 22:05:42 +0200

--
some fixes with variables
fixes in provides, replaces
add loading xml extension in /usr/bin/pecl

---
 testing/php7.1/APKBUILD | 51 +++++++++++++++++--------------------------------
 1 file changed, 18 insertions(+), 33 deletions(-)

diff --git a/testing/php7.1/APKBUILD b/testing/php7.1/APKBUILD
index 5bde8169ac..52845bea02 100644
--- a/testing/php7.1/APKBUILD
+++ b/testing/php7.1/APKBUILD
@@ -1,20 +1,20 @@
 # Contributor: Valery Kartel <[email-masked]>
 # Maintainer: Valery Kartel <[email-masked]>
-_suffix=7.1
-_pkgreal=php
-provides=$_pkgreal
-replaces=$provides
-pkgname=$_pkgreal$_suffix
-pkgver=7.1.1
-pkgrel=1
-_apiver="20160303"
-pkgdesc="The PHP${pkgver%.*} language runtime engine"
+pkgname=php7.1
+pkgver=7.1.2
+pkgrel=0
+_apiver=20160303
+_suffix=${pkgname#php}
+_pkgreal=${pkgname%$_suffix}
+pkgdesc="The PHP$_suffix language runtime engine"
 url="http://www.php.net/"
 arch="all"
 license="PHP-3"
 options=""
 depends="$pkgname-config"
 depends_dev="$pkgname"
+replaces="$_pkgreal $_pkgreal-cli"
+provides="$replaces $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
 	libical-dev libressl-dev openldap-dev net-snmp-dev db-dev krb5-dev gdbm-dev sqlite-dev
@@ -214,7 +214,7 @@ dev() {
 }
 
 doc() {
-	provides=$_pkgreal-doc
+	provides=
 	replaces=
 	default_doc || return 1
 	install_if="docs $pkgname-config=$pkgver-r$pkgrel"
@@ -334,8 +334,9 @@ 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
+	# add loading xml extension
+	sed -e "s/\$INCARG/\$INCARG -d extension=xml.so/" \
+		 -i "$subpkgdir"/usr/bin/pecl
 }
 
 config() {
@@ -368,16 +369,15 @@ _phar() {
 }
 
 _extension() {
-	provides=
-	replaces=
-	depends=
-
 	local name=${subpkgname#$pkgname-}
 	local index=$(eval echo \$_index_$name)
+	replaces=
+	provides="$_pkgreal-$name"
+	depends="$pkgname-config phpapi=$_apiver"
 
 	pkgdesc=$(eval echo \$_pkgdesc_$name)
 	: ${pkgdesc:=$(head -n1 "$builddir"/ext/$name/CREDITS)}
-	pkgdesc="PHP${pkgver%.*} extension: ${pkgdesc:-$name}"
+	pkgdesc="PHP$_suffix extension: ${pkgdesc:-$name}"
 
 	local dep
 	for dep in $(grep -o "_DEP('$name'.*" "$builddir"/ext/$name/config.w32 | sed "s/[',);]//g"); do
@@ -385,7 +385,6 @@ _extension() {
 	done
 
 	: ${index:=$(echo $depends | wc -w)}
-	depends="phpapi=$_apiver $pkgname-config $depends"
 
 	mkdir -p "$subpkgdir"/usr/lib/$pkgname/modules \
 		"$subpkgdir"/etc/$pkgname/conf.d
@@ -397,21 +396,7 @@ _extension() {
 		"$subpkgdir"/etc/$pkgname/conf.d/$(printf %02d $index)_$name.ini
 }
 
-md5sums="cd5b7dfc4bcf99fe11cae7917e9453e1  php-7.1.1.tar.bz2
-95d27e9f8f62f91531fc2c76af9065d0  php-module.conf.in
-ad13602a44d28092abc5681778f82b31  php-fpm.logrotate.in
-f5e8b469983f851d7665e32a9d529bbf  php-fpm.initd.in
-d088f00c226840bf7234c465de4118bb  php-fpm.patch.in
-c32f5ba7412548e5b233319ab32b6e50  includedir.patch.in
-483bc0a85c50a9a9aedbe14a19ed4526  install-pear.patch"
-sha256sums="d791d39d7b54ec42441a05a5f06d68a495647d843210e3ae4f2c6adb99c675bc  php-7.1.1.tar.bz2
-c197232950e8d60f87bb8bbd231445737c2efc3ff1b907a70fe43db7a0a1c0f3  php-module.conf.in
-606741a9ec11ff2162d1dd4fe469fb0c1b66ee33ba302f0aac4cb6f0be2f8ae0  php-fpm.logrotate.in
-cdc24d2e2e0e74ef7b8823ec8e058128dedcf9298f1e57c0450f3590137e1148  php-fpm.initd.in
-110928a5d3f15f6826d8be0a97b393e7e6676acb57c2e1eac32b80dafb3b7a6f  php-fpm.patch.in
-dff44c133f5023b03f8771dd826ce7ad529fb996a84a933a82cf4c4f71e86b94  includedir.patch.in
-f739ca427a1dd53a388bad0823565299c5d4a5796b1171b892884e4d7d099bab  install-pear.patch"
-sha512sums="005471c0233e04fd95e159f8106ecfb059500076482cd49b26d2597ac390f4fa09ec14146058cdcd38e7d27665ac1d2afdc758f41b86e7fb88c8ba405b6e6415  php-7.1.1.tar.bz2
+sha512sums="b4a3492f4af92facd16e7dfb47ec16b43e4c5b25be193ff6e36418173893edb75ca4ca94767b643a6971d60578727fa1f67f20cc84b9a140cb1b9a367ec34a6f  php-7.1.2.tar.bz2
 e0f24eea250ed6a8c8286b2ed496a3feb1d9a2e399755f822387a4c26b34168bb346109c08d2b827d8230fe3103295d8b7f7b6bc09219e5b3ad4429271ece5d6  php-module.conf.in
 b25c0bcaae4ddc7e001a6484423dec48be8735168dc3ab7471f5a57ce631273f11514c924b368ff846fe9a04bd4e1c7f296f1c8527f6f239a79df84189841983  php-fpm.logrotate.in
 809e584304365412ecf80eb2ebb613439342e9a1faf36d0b04c76e60b1bf1345812799a16ffad76dbd3aa5f00c55329a051b308e451301d6e8d673813e37856b  php-fpm.initd.in
-- 
2.11.1

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