Subject: [alpine-aports] [PATCH] testing/php7: Add extension loading order filename prefix generation based on dependencies number

From: Valery Kartel <[email-masked]>
Date: Tue, 29 Mar 2016 10:03:31 +0300

---
 testing/php7/APKBUILD | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/testing/php7/APKBUILD b/testing/php7/APKBUILD
index 0e2115b..d8fca7d 100644
--- a/testing/php7/APKBUILD
+++ b/testing/php7/APKBUILD
@@ -3,7 +3,7 @@
 pkgname=php7
 _pkgreal=php
 pkgver=7.0.4
-pkgrel=2
+pkgrel=3
 pkgdesc="The PHP language runtime engine - 7th branch"
 url="http://www.php.net/"
 arch="x86_64 armhf"
@@ -323,23 +323,21 @@ common() {
 
 _mv_ext() {
 	local ext=$1
-	local ini=$ext.ini
-	local dir=/usr/lib/$pkgname/modules
+	local elo=00
 	local prefix=
 	pkgdesc="PHP7 extension: $ext"
 
-	# extension dependencies
-	[ -n "${2-}" ] && depends=$2
-
-	# work around dependency issue
-	# https://bugs.alpinelinux.org/issues/1848
-	[ "$ext" = "wddx" ] && ini=xml_$ext.ini
+	# extension dependencies and load order
+	if [ -n "${2-}" ]; then
+		depends=$2
+		elo=$(echo $2 | wc -w | awk '{printf "%02d", $1}')
+	fi
 
 	mkdir -p "$subpkgdir"/usr/lib/$pkgname/modules "$subpkgdir"/etc/$pkgname/conf.d
 	mv "$pkgdir"/usr/lib/$pkgname/modules/${ext}.so \
 		"$subpkgdir"/usr/lib/$pkgname/modules/ || return 1
 	[ "$1" = "opcache" ] && prefix="zend_"
-	echo "${prefix}extension=${ext}.so" > "$subpkgdir"/etc/$pkgname/conf.d/$ini
+	echo "${prefix}extension=${ext}.so" > "$subpkgdir"/etc/$pkgname/conf.d/${elo}_${ext}.ini
 }
 
 bcmath()	{ _mv_ext bcmath; }
-- 
2.7.4

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