Subject: [alpine-aports] [PATCH] community/php5-imagick: upgrade to 3.4.3

From: Valery Kartel <[email-masked]>
Date: Wed, 22 Feb 2017 13:58:38 +0200

---
 community/php5-imagick/APKBUILD | 57 +++++++++++++++++++++--------------------
 1 file changed, 29 insertions(+), 28 deletions(-)

diff --git a/community/php5-imagick/APKBUILD b/community/php5-imagick/APKBUILD
index c01dd12687..1347a9443f 100644
--- a/community/php5-imagick/APKBUILD
+++ b/community/php5-imagick/APKBUILD
@@ -1,41 +1,42 @@
 # Contributor: Valery Kartel <[email-masked]>
 # Maintainer: Valery Kartel <[email-masked]>
-_php=php5
-pkgname=${_php}-imagick
-_pkgreal=imagick
-pkgver=3.4.2
-pkgrel=1
-pkgdesc="PHP bindings to the ImageMagick library."
+pkgname=php5-imagick
+pkgver=3.4.3
+pkgrel=0
+_pkgreal=${pkgname#php*-}
+_pkgver=${pkgver/_rc/RC}
+_phpver=${pkgname%%-*}
+_suffix=${_phpver#php}
+pkgdesc="PHP$_suffix extension: Provides a wrapper to the ImageMagick library"
 url="http://pecl.php.net/package/imagick"
 arch="all"
 license="PHP"
 depends=
-pecldepends="${_php}-dev autoconf"
-makedepends="$pecldepends imagemagick-dev libtool"
-install=""
-subpackages=""
-source="http://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
-
-_builddir="$srcdir"/$_pkgreal-$pkgver
-prepare() {
-	cd "$_builddir"
-	phpize || return 1
-}
+makedepends="$_phpver-dev autoconf libtool imagemagick-dev"
+subpackages="$pkgname-dev"
+source="http://pecl.php.net/get/$_pkgreal-$_pkgver.tgz"
+builddir="$srcdir/$_pkgreal-$_pkgver"
 
 build() {
-	cd "$_builddir"
-	./configure --prefix=/usr || return 1
-	make || return 1
+	cd "$builddir"
+	phpize$_suffix || return 1
+	./configure --prefix=/usr \
+		--with-php-config=php-config$_suffix || return 1
+	make
 }
 
 package() {
-	cd "$_builddir"
-	make INSTALL_ROOT="$pkgdir/" install || return 1
-	install -d "$pkgdir"/etc/$_php/conf.d || return 1
-	echo "extension=$_pkgreal.so" > "$pkgdir"/etc/$_php/conf.d/$_pkgreal.ini
-	[ -d "$pkgdir"/usr/include ] && rm -fr "$pkgdir"/usr/include
+	local cfgdir=$(php-config$_suffix --configure-options|xargs -n1|awk -F= '/config-file-scan-dir/ {print $2}')
+
+# for new php5 build only
+#	local apiver=$(phpize$_suffix -v|awk -F: '/PHP Api/ {print $2}'|tr -d ' ')
+#	provides="php-$_pkgreal"
+#	depends="$_phpver-config phpapi=$apiver $depends"
+
+	make -C "$builddir" INSTALL_ROOT="$pkgdir" install || return 1
+
+	mkdir -p "$pkgdir"/$cfgdir || return 1
+	echo "extension=$_pkgreal.so" > "$pkgdir"/$cfgdir/$_pkgreal.ini
 }
 
-md5sums="3f80e35c2434636cdb5df01b221b3ffa  imagick-3.4.2.tgz"
-sha256sums="8e16b7bc6cf6567f4b4c4ac7294cbf650fe050a848c6a7ba6e2bee02097ab4a8  imagick-3.4.2.tgz"
-sha512sums="5e7cf495f4d6377a54b207b3fa14a5b2cff9d89dbe9c17b88c66102138ff9f485a34669138cf7903c5b54eb9d5d49f6fa2629216c487e56dc6b1e6c5c68ac1d2  imagick-3.4.2.tgz"
+sha512sums="2cb2b856cf83a78d3542cdf7c69554dcc063a0541e9092b24e5e1fbd8928066a4a3de154049d0202c35addbc5055ccfbb5910ae92f2f13da80ddfc025340ddcd  imagick-3.4.3.tgz"
-- 
2.11.1

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