aboutsummaryrefslogtreecommitdiff
path: root/graphics/pecl-imagick
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2020-10-25 08:21:28 +0000
committerMartin Matuska <mm@FreeBSD.org>2020-10-25 08:21:28 +0000
commitd721fc5febd63ed50e79ce8fd0a8c227ce739027 (patch)
tree4e9c7966572f01ec58c548e0b884e931128d3ab6 /graphics/pecl-imagick
parent619469fbc3c8d5312089447beb38c6d29cf447dd (diff)
downloadports-d721fc5febd63ed50e79ce8fd0a8c227ce739027.tar.gz
ports-d721fc5febd63ed50e79ce8fd0a8c227ce739027.zip
graphics/pecl-imagick: unbreak build with PHP 8
Notes
Notes: svn path=/head/; revision=553245
Diffstat (limited to 'graphics/pecl-imagick')
-rw-r--r--graphics/pecl-imagick/Makefile1
-rw-r--r--graphics/pecl-imagick/files/patch-imagick__class.c12
-rw-r--r--graphics/pecl-imagick/files/patch-imagick__helpers.c12
-rw-r--r--graphics/pecl-imagick/files/patch-php__imagick.h23
-rw-r--r--graphics/pecl-imagick/files/patch-php__imagick__defs.h13
5 files changed, 61 insertions, 0 deletions
diff --git a/graphics/pecl-imagick/Makefile b/graphics/pecl-imagick/Makefile
index 9390362294fa..6b814a48444f 100644
--- a/graphics/pecl-imagick/Makefile
+++ b/graphics/pecl-imagick/Makefile
@@ -3,6 +3,7 @@
PORTNAME= imagick
PORTVERSION= 3.4.4
+PORTREVISION= 1
CATEGORIES= graphics
MAINTAINER= mm@FreeBSD.org
diff --git a/graphics/pecl-imagick/files/patch-imagick__class.c b/graphics/pecl-imagick/files/patch-imagick__class.c
new file mode 100644
index 000000000000..5127fbc9a81b
--- /dev/null
+++ b/graphics/pecl-imagick/files/patch-imagick__class.c
@@ -0,0 +1,12 @@
+--- imagick_class.c.orig 2020-10-25 08:02:54 UTC
++++ imagick_class.c
+@@ -12006,7 +12006,9 @@ PHP_METHOD(imagick, setprogressmonitor)
+
+ callback = (php_imagick_callback *) emalloc(sizeof(php_imagick_callback));
+
++#if PHP_VERSION_ID < 80000
+ TSRMLS_SET_CTX(callback->thread_ctx);
++#endif
+ //We can't free the previous callback as we can't guarantee that
+ //ImageMagick won't use it at some point. There is no 'unbind' function
+ //for previously set 'MagickSetImageProgressMonitor'
diff --git a/graphics/pecl-imagick/files/patch-imagick__helpers.c b/graphics/pecl-imagick/files/patch-imagick__helpers.c
new file mode 100644
index 000000000000..ea05fbc49e65
--- /dev/null
+++ b/graphics/pecl-imagick/files/patch-imagick__helpers.c
@@ -0,0 +1,12 @@
+--- imagick_helpers.c.orig 2020-10-25 08:02:44 UTC
++++ imagick_helpers.c
+@@ -113,7 +113,9 @@ MagickBooleanType php_imagick_progress_monitor_callabl
+ #endif
+ fci.param_count = 2;
+ fci.params = zargs;
++#if PHP_VERSION_ID < 80000
+ fci.no_separation = 0;
++#endif
+ #if PHP_VERSION_ID < 70100
+ fci.symbol_table = NULL;
+ #endif
diff --git a/graphics/pecl-imagick/files/patch-php__imagick.h b/graphics/pecl-imagick/files/patch-php__imagick.h
new file mode 100644
index 000000000000..8ca8e715fccf
--- /dev/null
+++ b/graphics/pecl-imagick/files/patch-php__imagick.h
@@ -0,0 +1,23 @@
+--- php_imagick.h.orig 2019-05-02 15:26:00 UTC
++++ php_imagick.h
+@@ -47,5 +47,20 @@
+ extern zend_module_entry imagick_module_entry;
+ #define phpext_imagick_ptr &imagick_module_entry
+
++#if PHP_VERSION_ID >= 80000
++#ifndef TSRMLS_C
++#define TSRMLS_C
++#endif
++#ifndef TSRMLS_CC
++#define TSRMLS_CC
++#endif
++#ifndef TSRMLS_D
++#define TSRMLS_D
++#endif
++#ifndef TSRMLS_DC
++#define TSRMLS_DC
++#endif
++#endif
++
+ #endif /* PHP_IMAGICK_H */
+
diff --git a/graphics/pecl-imagick/files/patch-php__imagick__defs.h b/graphics/pecl-imagick/files/patch-php__imagick__defs.h
new file mode 100644
index 000000000000..c7776e4f81ce
--- /dev/null
+++ b/graphics/pecl-imagick/files/patch-php__imagick__defs.h
@@ -0,0 +1,13 @@
+--- php_imagick_defs.h.orig 2020-10-25 08:13:09 UTC
++++ php_imagick_defs.h
+@@ -20,6 +20,10 @@
+ #ifndef PHP_IMAGICK_DEFS_H /* PHP_IMAGICK_DEFS_H */
+ # define PHP_IMAGICK_DEFS_H
+
++#ifndef HAVE_LOCALE_H
++#define HAVE_LOCALE_H
++#endif
++
+ /* Include magic wand header */
+ #if defined (IM_MAGICKWAND_HEADER_STYLE_SEVEN)
+ # include <MagickWand/MagickWand.h>