summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2023-12-28 01:49:39 +0100
committerConrad Kostecki <conikost@gentoo.org>2023-12-28 02:28:23 +0100
commitbca8b278a373a9dd1e63c3b1f5f9b66cea443945 (patch)
tree68ad2ddc6a8b502dcb6a704844b963dabd8534b2
parentdev-php/igbinary: add 3.2.15 (diff)
downloadgentoo-bca8b278a373a9dd1e63c3b1f5f9b66cea443945.tar.gz
gentoo-bca8b278a373a9dd1e63c3b1f5f9b66cea443945.tar.bz2
gentoo-bca8b278a373a9dd1e63c3b1f5f9b66cea443945.zip
dev-php/pecl-imagick: add php8.3 support
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
-rw-r--r--dev-php/pecl-imagick/files/pecl-imagick-3.7.0-php8.3.patch20
-rw-r--r--dev-php/pecl-imagick/pecl-imagick-3.7.0-r3.ebuild38
2 files changed, 58 insertions, 0 deletions
diff --git a/dev-php/pecl-imagick/files/pecl-imagick-3.7.0-php8.3.patch b/dev-php/pecl-imagick/files/pecl-imagick-3.7.0-php8.3.patch
new file mode 100644
index 000000000000..d75d23dbf11b
--- /dev/null
+++ b/dev-php/pecl-imagick/files/pecl-imagick-3.7.0-php8.3.patch
@@ -0,0 +1,20 @@
+From 7088edc353f53c4bc644573a79cdcd67a726ae16 Mon Sep 17 00:00:00 2001
+From: FedericoHeichou <federicoheichou@gmail.com>
+Date: Fri, 24 Nov 2023 11:24:00 +0100
+Subject: [PATCH] Fix compilation error "Unterminated preprocessor conditions"
+ in php 8.3
+
+---
+ Imagick.stub.php | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Imagick.stub.php b/Imagick.stub.php
+index 804c0152..49da9386 100644
+--- a/Imagick.stub.php
++++ b/Imagick.stub.php
+@@ -1669,4 +1669,5 @@ public function setInterpolateMethod(int $method): bool{}
+ public function setOrientation(int $orientation): bool {}
+ #endif
+
++#endif
+ }
diff --git a/dev-php/pecl-imagick/pecl-imagick-3.7.0-r3.ebuild b/dev-php/pecl-imagick/pecl-imagick-3.7.0-r3.ebuild
new file mode 100644
index 000000000000..2e99e271ad8e
--- /dev/null
+++ b/dev-php/pecl-imagick/pecl-imagick-3.7.0-r3.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PHP_EXT_NAME="imagick"
+USE_PHP="php8-0 php8-1 php8-2 php8-3"
+
+# https://github.com/Imagick/imagick/issues/626
+PHP_EXT_NEEDED_USE="-debug"
+
+inherit php-ext-pecl-r3
+
+KEYWORDS="amd64 ~arm ~arm64 x86"
+
+DESCRIPTION="PHP wrapper for the ImageMagick library"
+HOMEPAGE="https://pecl.php.net/package/imagick https://github.com/Imagick/imagick"
+LICENSE="PHP-3.01"
+SLOT="0"
+IUSE="examples test"
+RESTRICT="!test? ( test )"
+
+# imagemagick[-openmp] is needed wrt bug 547922 and upstream
+# https://github.com/Imagick/imagick#openmp
+RDEPEND="media-gfx/imagemagick:=[-openmp]"
+DEPEND="
+ ${RDEPEND}
+ test? ( media-gfx/imagemagick:=[hdri,jpeg,png,svg,truetype,xml] )
+"
+
+PATCHES="${FILESDIR}/${PN}-3.7.0-php8.3.patch"
+
+PHP_EXT_ECONF_ARGS="--with-imagick=${EPREFIX}/usr"
+
+src_install() {
+ php-ext-pecl-r3_src_install
+ php-ext-source-r3_addtoinifiles "imagick.skip_version_check" "1"
+}