aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7-pecl-imagick
diff options
context:
space:
mode:
authorAndy Postnikov <apostnikov@gmail.com>2018-10-21 02:12:52 +0300
committerAndy Postnikov <apostnikov@gmail.com>2018-10-23 17:10:45 +0300
commit68f694f6b989b03a8bc20c450503342cddeedf72 (patch)
tree44ea655ce7279288699b26e1481609a3712880a4 /community/php7-pecl-imagick
parentba1f69ffaeece9b1e3bd1d0e112a433c1f2d33c3 (diff)
downloadaports-68f694f6b989b03a8bc20c450503342cddeedf72.tar.bz2
aports-68f694f6b989b03a8bc20c450503342cddeedf72.tar.xz
community/php7-pecl-imagick: renamed from php7-imagick, modernize, fix license
Diffstat (limited to 'community/php7-pecl-imagick')
-rw-r--r--community/php7-pecl-imagick/APKBUILD51
-rw-r--r--community/php7-pecl-imagick/fix-affineTransformImage-test.patch20
2 files changed, 71 insertions, 0 deletions
diff --git a/community/php7-pecl-imagick/APKBUILD b/community/php7-pecl-imagick/APKBUILD
new file mode 100644
index 0000000000..0197d72aeb
--- /dev/null
+++ b/community/php7-pecl-imagick/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Valery Kartel <valery.kartel@gmail.com>
+# Maintainer: Valery Kartel <valery.kartel@gmail.com>
+pkgname=php7-pecl-imagick
+_pkgreal=imagick
+pkgver=3.4.3
+pkgrel=9
+pkgdesc="PHP extension provides a wrapper to the ImageMagick library - PECL"
+url="https://pecl.php.net/package/imagick"
+arch="all"
+license="PHP-3.01"
+depends="php7-common imagemagick"
+checkdepends="ghostscript-fonts"
+makedepends="php7-dev autoconf libtool imagemagick-dev pcre-dev re2c"
+subpackages="$pkgname-dev"
+source="https://pecl.php.net/get/$_pkgreal-$pkgver.tgz
+ fix-affineTransformImage-test.patch
+ "
+builddir="$srcdir/$_pkgreal-$pkgver"
+provides="php7-imagick=$pkgver-r$pkgrel" # for backward compatibility
+replaces="php7-imagick" # for backward compatibility
+
+build() {
+ cd "$builddir"
+
+ phpize7
+ ./configure --prefix=/usr --with-php-config=php-config7
+ make
+}
+
+check() {
+ cd "$builddir"
+
+ rm tests/150_Imagick_setregistry.phpt # no exception thrown
+ rm tests/229_Tutorial_fxAnalyzeImage_case1.phpt # time out
+ rm tests/236_Imagick_identify_basic.phpt # coredump https://bugs.php.net/bug.php?id=59444
+
+ make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test
+}
+
+package() {
+ local confdir="$pkgdir/etc/php7/conf.d"
+ cd "$builddir"
+
+ make INSTALL_ROOT="$pkgdir" install
+
+ mkdir -p "$confdir"
+ echo "extension=$_pkgreal.so" > "$confdir"/$_pkgreal.ini
+}
+
+sha512sums="2cb2b856cf83a78d3542cdf7c69554dcc063a0541e9092b24e5e1fbd8928066a4a3de154049d0202c35addbc5055ccfbb5910ae92f2f13da80ddfc025340ddcd imagick-3.4.3.tgz
+f7c5507c349d1048b57d0316f5c7e83e539537e03d1573ee03d40590a2ae828b0c55ae136dcc5e2983ecaa75990e6d38fb2c01d95eef9d9c19da938acbd4f9b2 fix-affineTransformImage-test.patch"
diff --git a/community/php7-pecl-imagick/fix-affineTransformImage-test.patch b/community/php7-pecl-imagick/fix-affineTransformImage-test.patch
new file mode 100644
index 0000000000..00570a9e62
--- /dev/null
+++ b/community/php7-pecl-imagick/fix-affineTransformImage-test.patch
@@ -0,0 +1,20 @@
+diff --git a/tests/031_Imagick_affineTransformImage_basic.phpt b/tests/031_Imagick_affineTransformImage_basic.phpt
+index d64fa05..27841d8 100644
+--- a/tests/031_Imagick_affineTransformImage_basic.phpt
++++ b/tests/031_Imagick_affineTransformImage_basic.phpt
+@@ -14,7 +14,7 @@ function affineTransformImage() {
+ $imagick->newPseudoImage(640, 480, "magick:logo");
+ $draw = new \ImagickDraw();
+
+- $angle = 40 ;
++ $angle = deg2rad(40);
+
+ $affineRotate = array(
+ "sx" => cos($angle), "sy" => cos($angle),
+@@ -34,4 +34,4 @@ affineTransformImage() ;
+ echo "Ok";
+ ?>
+ --EXPECTF--
+-Ok
+\ No newline at end of file
++Ok