commit:     bca8b278a373a9dd1e63c3b1f5f9b66cea443945
Author:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 00:49:39 2023 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 01:28:23 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bca8b278

dev-php/pecl-imagick: add php8.3 support

Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 .../files/pecl-imagick-3.7.0-php8.3.patch          | 20 ++++++++++++
 dev-php/pecl-imagick/pecl-imagick-3.7.0-r3.ebuild  | 38 ++++++++++++++++++++++
 2 files changed, 58 insertions(+)

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 <[email protected]>
+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"
+}

Reply via email to