summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION22
-rw-r--r--imagick-arginfo.patch385
-rw-r--r--php-pecl-imagick.spec59
4 files changed, 60 insertions, 408 deletions
diff --git a/PHPINFO b/PHPINFO
index 2e95165..13bd026 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,7 +2,7 @@
imagick
imagick module => enabled
-imagick module version => 3.5.0RC1
+imagick module version => 3.5.0RC2
imagick classes => Imagick, ImagickDraw, ImagickPixel, ImagickPixelIterator, ImagickKernel
Imagick compiled with ImageMagick version => ImageMagick 6.9.12-15 Q16 x86_64 2021-06-13 https://imagemagick.org
Imagick using ImageMagick library version => ImageMagick 6.9.12-15 Q16 x86_64 2021-06-13 https://imagemagick.org
diff --git a/REFLECTION b/REFLECTION
index 2b3be21..bffeb25 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #75 imagick version 3.5.0RC1 ] {
+Extension [ <persistent> extension #75 imagick version 3.5.0RC2 ] {
- Dependencies {
Dependency [ gmagick (Conflicts) ]
@@ -327,7 +327,7 @@ Extension [ <persistent> extension #75 imagick version 3.5.0RC1 ] {
Constant [ public int COLOR_ALPHA ] { 19 }
Constant [ public int COLOR_FUZZ ] { 20 }
Constant [ public int IMAGICK_EXTNUM ] { 30500 }
- Constant [ public string IMAGICK_EXTVER ] { 3.5.0RC1 }
+ Constant [ public string IMAGICK_EXTVER ] { 3.5.0RC2 }
Constant [ public int QUANTUM_RANGE ] { 65535 }
Constant [ public int USE_ZEND_MM ] { 0 }
Constant [ public int COMPOSITE_DEFAULT ] { 40 }
@@ -3557,7 +3557,7 @@ Extension [ <persistent> extension #75 imagick version 3.5.0RC1 ] {
Method [ <internal:imagick> public method colorMatrixImage ] {
- Parameters [1] {
- Parameter #0 [ <optional> $color_matrix ]
+ Parameter #0 [ <required> $color_matrix ]
}
}
@@ -3595,8 +3595,8 @@ Extension [ <persistent> extension #75 imagick version 3.5.0RC1 ] {
Parameter #0 [ <required> Imagick $image ]
Parameter #1 [ <optional> &$offset ]
Parameter #2 [ <optional> &$similarity ]
- Parameter #3 [ <optional> &$threshold ]
- Parameter #4 [ <optional> &$metric ]
+ Parameter #3 [ <optional> $threshold ]
+ Parameter #4 [ <optional> $metric ]
}
}
@@ -3606,8 +3606,8 @@ Extension [ <persistent> extension #75 imagick version 3.5.0RC1 ] {
Parameter #0 [ <required> Imagick $image ]
Parameter #1 [ <optional> &$offset ]
Parameter #2 [ <optional> &$similarity ]
- Parameter #3 [ <optional> &$threshold ]
- Parameter #4 [ <optional> &$metric ]
+ Parameter #3 [ <optional> $threshold ]
+ Parameter #4 [ <optional> $metric ]
}
}
@@ -4858,7 +4858,7 @@ Extension [ <persistent> extension #75 imagick version 3.5.0RC1 ] {
Method [ <internal:imagick, ctor> public method __construct ] {
- Parameters [1] {
- Parameter #0 [ <required> $color ]
+ Parameter #0 [ <optional> $color ]
}
}
@@ -4902,14 +4902,14 @@ Extension [ <persistent> extension #75 imagick version 3.5.0RC1 ] {
Method [ <internal:imagick> public method getColorValue ] {
- Parameters [1] {
- Parameter #0 [ <optional> $color ]
+ Parameter #0 [ <required> $color ]
}
}
Method [ <internal:imagick> public method getColorValueQuantum ] {
- Parameters [1] {
- Parameter #0 [ <optional> $color ]
+ Parameter #0 [ <required> $color ]
}
}
@@ -5058,7 +5058,7 @@ Extension [ <persistent> extension #75 imagick version 3.5.0RC1 ] {
- Parameters [2] {
Parameter #0 [ <required> $scale ]
- Parameter #1 [ <required> $normalize_kernel ]
+ Parameter #1 [ <optional> $normalize_kernel ]
}
}
diff --git a/imagick-arginfo.patch b/imagick-arginfo.patch
deleted file mode 100644
index d3e5ecf..0000000
--- a/imagick-arginfo.patch
+++ /dev/null
@@ -1,385 +0,0 @@
-From cc48deb6e778f9da67acb94bbc8dde51c87700e1 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 15 Jun 2021 07:37:21 +0200
-Subject: [PATCH 01/10] fix getConfigureOptions, pattern is optional
-
----
- Imagick_arginfo.h | 8 ++++----
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/Imagick_arginfo.h b/Imagick_arginfo.h
-index 45136da..ffe846d 100644
---- a/Imagick_arginfo.h
-+++ b/Imagick_arginfo.h
-@@ -4511,14 +4511,14 @@ ZEND_END_ARG_INFO()
-
-
- #if PHP_VERSION_ID >= 80000
--ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getConfigureOptions, 0, 1, IS_STRING, 0)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_getConfigureOptions, 0, 0, IS_STRING, 0)
- #else
--ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getConfigureOptions, 0, 0, 1)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_getConfigureOptions, 0, 0, 0)
- #endif
-
-
- #if PHP_VERSION_ID >= 80000
-- ZEND_ARG_TYPE_INFO(0, pattern, IS_STRING, 1)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, pattern, IS_STRING, 0, "*")
- #else
- ZEND_ARG_INFO(0, pattern)
- #endif
-@@ -6493,4 +6493,4 @@ static const zend_function_entry class_Imagick_methods[] = {
- ZEND_ME(Imagick, setImageMask, arginfo_class_Imagick_setImageMask, ZEND_ACC_PUBLIC)
- #endif
- ZEND_FE_END
--};
-\ No newline at end of file
-+};
-
-From c15e55145fb115da8a1af74bc38828c22a123de7 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 15 Jun 2021 07:49:43 +0200
-Subject: [PATCH 02/10] fix pingImageFile, filename is optional
-
----
- Imagick_arginfo.h | 6 +++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/Imagick_arginfo.h b/Imagick_arginfo.h
-index ffe846d..9a33086 100644
---- a/Imagick_arginfo.h
-+++ b/Imagick_arginfo.h
-@@ -50,9 +50,9 @@ ZEND_END_ARG_INFO()
- #if MagickLibVersion > 0x628
-
- #if PHP_VERSION_ID >= 80000
--ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_pingImageFile, 0, 2, _IS_BOOL, 0)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_pingImageFile, 0, 1, _IS_BOOL, 0)
- #else
--ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_pingImageFile, 0, 0, 2)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_pingImageFile, 0, 0, 1)
- #endif
-
-
-@@ -64,7 +64,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_pingImageFile, 0, 0, 2)
-
-
- #if PHP_VERSION_ID >= 80000
-- ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 1)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filename, IS_STRING, 1, "null")
- #else
- ZEND_ARG_INFO(0, filename)
- #endif
-
-From 0de8b99b36c3a6b5a26579dd9af688b63877b24c Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 15 Jun 2021 07:52:47 +0200
-Subject: [PATCH 03/10] fix writeImageFile, format is optional
-
----
- Imagick_arginfo.h | 6 +++---
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/Imagick_arginfo.h b/Imagick_arginfo.h
-index 9a33086..38662af 100644
---- a/Imagick_arginfo.h
-+++ b/Imagick_arginfo.h
-@@ -815,9 +815,9 @@ ZEND_END_ARG_INFO()
- #if MagickLibVersion > 0x635
-
- #if PHP_VERSION_ID >= 80000
--ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_writeImageFile, 0, 2, _IS_BOOL, 0)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_writeImageFile, 0, 1, _IS_BOOL, 0)
- #else
--ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_writeImageFile, 0, 0, 2)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_writeImageFile, 0, 0, 1)
- #endif
-
-
-@@ -829,7 +829,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_writeImageFile, 0, 0, 2)
-
-
- #if PHP_VERSION_ID >= 80000
-- ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 1)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_STRING, 1, "null")
- #else
- ZEND_ARG_INFO(0, format)
- #endif
-
-From 09af952ac4bcac96fb64c3fb1a90877e88fc6c6e Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 15 Jun 2021 07:59:45 +0200
-Subject: [PATCH 04/10] fix __construct, files is optional
-
----
- Imagick_arginfo.h | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Imagick_arginfo.h b/Imagick_arginfo.h
-index 38662af..bdfc658 100644
---- a/Imagick_arginfo.h
-+++ b/Imagick_arginfo.h
-@@ -1678,10 +1678,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_smushImages, 0, 0, 2)
- ZEND_END_ARG_INFO()
- #endif
-
--ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick___construct, 0, 0, 1)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick___construct, 0, 0, 0)
-
- #if PHP_VERSION_ID >= 80000
-- ZEND_ARG_TYPE_MASK(0, files, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_NULL, NULL)
-+ ZEND_ARG_TYPE_MASK(0, files, MAY_BE_STRING|MAY_BE_ARRAY|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_NULL, "null")
- #else
- ZEND_ARG_INFO(0, files)
- #endif
-
-From 62c0629d0cddda94138ca9ac37f0f010f712ecd4 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 15 Jun 2021 08:02:07 +0200
-Subject: [PATCH 05/10] fix readImageBlob, filename is optional
-
----
- Imagick_arginfo.h | 6 +++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/Imagick_arginfo.h b/Imagick_arginfo.h
-index bdfc658..ee51298 100644
---- a/Imagick_arginfo.h
-+++ b/Imagick_arginfo.h
-@@ -1794,9 +1794,9 @@ ZEND_END_ARG_INFO()
-
-
- #if PHP_VERSION_ID >= 80000
--ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_readImageBlob, 0, 2, _IS_BOOL, 0)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_readImageBlob, 0, 1, _IS_BOOL, 0)
- #else
--ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_readImageBlob, 0, 0, 2)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_readImageBlob, 0, 0, 1)
- #endif
-
-
-@@ -1807,7 +1807,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_readImageBlob, 0, 0, 2)
- #endif
-
- #if PHP_VERSION_ID >= 80000
-- ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 1)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filename, IS_STRING, 1, "null")
- #else
- ZEND_ARG_INFO(0, filename)
- #endif
-
-From f0189212999e41b7e5dda85268d6e7b2a4213bd6 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 15 Jun 2021 08:08:50 +0200
-Subject: [PATCH 06/10] fix writeImage, filename is optional
-
----
- Imagick_arginfo.h | 6 +++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/Imagick_arginfo.h b/Imagick_arginfo.h
-index ee51298..85308f8 100644
---- a/Imagick_arginfo.h
-+++ b/Imagick_arginfo.h
-@@ -1853,14 +1853,14 @@ ZEND_END_ARG_INFO()
-
-
- #if PHP_VERSION_ID >= 80000
--ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_writeImage, 0, 1, _IS_BOOL, 0)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_writeImage, 0, 0, _IS_BOOL, 0)
- #else
--ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_writeImage, 0, 0, 1)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_writeImage, 0, 0, 0)
- #endif
-
-
- #if PHP_VERSION_ID >= 80000
-- ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 1)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filename, IS_STRING, 1, "null")
- #else
- ZEND_ARG_INFO(0, filename)
- #endif
-
-From 721b6dc487200aaf2b3e1c8313d5b34e478a05db Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 15 Jun 2021 08:09:45 +0200
-Subject: [PATCH 07/10] fix blurImage, channel is optional
-
----
- Imagick_arginfo.h | 6 +++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/Imagick_arginfo.h b/Imagick_arginfo.h
-index 85308f8..ab07ae8 100644
---- a/Imagick_arginfo.h
-+++ b/Imagick_arginfo.h
-@@ -1889,9 +1889,9 @@ ZEND_END_ARG_INFO()
-
-
- #if PHP_VERSION_ID >= 80000
--ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_blurImage, 0, 3, _IS_BOOL, 0)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_blurImage, 0, 2, _IS_BOOL, 0)
- #else
--ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_blurImage, 0, 0, 3)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_blurImage, 0, 0, 2)
- #endif
-
-
-@@ -1908,7 +1908,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_blurImage, 0, 0, 3)
- #endif
-
- #if PHP_VERSION_ID >= 80000
-- ZEND_ARG_TYPE_INFO(0, channel, IS_LONG, 1)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, channel, IS_LONG, 0, "Imagick::CHANNEL_DEFAULT")
- #else
- ZEND_ARG_INFO(0, channel)
- #endif
-
-From eeec0cd9985f5b65f96dd211d81b73f54d999998 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 15 Jun 2021 08:22:47 +0200
-Subject: [PATCH 08/10] Fix queryFontMetrics, multiline is optional
-
----
- Imagick_arginfo.h | 6 +++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/Imagick_arginfo.h b/Imagick_arginfo.h
-index ab07ae8..1bbed68 100644
---- a/Imagick_arginfo.h
-+++ b/Imagick_arginfo.h
-@@ -3030,9 +3030,9 @@ ZEND_END_ARG_INFO()
-
-
- #if PHP_VERSION_ID >= 80000
--ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_queryFontMetrics, 0, 3, IS_ARRAY, 0)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_queryFontMetrics, 0, 2, IS_ARRAY, 0)
- #else
--ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_queryFontMetrics, 0, 0, 3)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_queryFontMetrics, 0, 0, 2)
- #endif
-
- ZEND_ARG_OBJ_INFO(0, settings, ImagickDraw, 0)
-@@ -3044,7 +3044,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_queryFontMetrics, 0, 0, 3)
- #endif
-
- #if PHP_VERSION_ID >= 80000
-- ZEND_ARG_TYPE_INFO(0, multiline, _IS_BOOL, 1)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, multiline, _IS_BOOL, 1, "null")
- #else
- ZEND_ARG_INFO(0, multiline)
- #endif
-
-From 7b81520d701512a817f6e4daeca958d41502a2c2 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 15 Jun 2021 08:43:03 +0200
-Subject: [PATCH 09/10] fix newImage, format is optional
-
----
- Imagick_arginfo.h | 6 +++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/Imagick_arginfo.h b/Imagick_arginfo.h
-index 1bbed68..f66a858 100644
---- a/Imagick_arginfo.h
-+++ b/Imagick_arginfo.h
-@@ -4450,9 +4450,9 @@ ZEND_END_ARG_INFO()
-
-
- #if PHP_VERSION_ID >= 80000
--ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_newImage, 0, 4, _IS_BOOL, 0)
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Imagick_newImage, 0, 3, _IS_BOOL, 0)
- #else
--ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_newImage, 0, 0, 4)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_newImage, 0, 0, 3)
- #endif
-
-
-@@ -4470,7 +4470,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_newImage, 0, 0, 4)
- ZEND_ARG_OBJ_TYPE_MASK(0, background_color, ImagickPixel, MAY_BE_STRING, NULL)
-
- #if PHP_VERSION_ID >= 80000
-- ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 1)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, format, IS_STRING, 0, "null")
- #else
- ZEND_ARG_INFO(0, format)
- #endif
-
-From b24cc587f40126307faa5761f6384628675f1e7c Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Tue, 15 Jun 2021 09:00:43 +0200
-Subject: [PATCH 10/10] fix subimageMatch / similarityimage
-
----
- Imagick_arginfo.h | 32 ++++++++++++--------------------
- 2 files changed, 14 insertions(+), 22 deletions(-)
-
-diff --git a/Imagick_arginfo.h b/Imagick_arginfo.h
-index f66a858..a5768b8 100644
---- a/Imagick_arginfo.h
-+++ b/Imagick_arginfo.h
-@@ -4829,51 +4829,43 @@ ZEND_END_ARG_INFO()
- #if MagickLibVersion > 0x628 && MagickLibVersion >= 0x652
-
- #if PHP_VERSION_ID >= 80000
--ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_subimageMatch, 0, 3, Imagick, 0)
-+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_subimageMatch, 0, 1, Imagick, 0)
- #else
--ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_subimageMatch, 0, 0, 3)
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_subimageMatch, 0, 0, 1)
- #endif
-
- ZEND_ARG_OBJ_INFO(0, image, Imagick, 0)
-
- #if PHP_VERSION_ID >= 80000
-- ZEND_ARG_TYPE_INFO(1, offset, IS_ARRAY, 1)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(1, offset, IS_ARRAY, 1, "null")
- #else
- ZEND_ARG_INFO(1, offset)
- #endif
-
- #if PHP_VERSION_ID >= 80000
-- ZEND_ARG_TYPE_INFO(1, similarity, IS_DOUBLE, 1)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(1, similarity, IS_DOUBLE, 1, "0.0")
- #else
- ZEND_ARG_INFO(1, similarity)
- #endif
--ZEND_END_ARG_INFO()
--#endif
--
--#if MagickLibVersion > 0x628 && MagickLibVersion >= 0x652
-
- #if PHP_VERSION_ID >= 80000
--ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_Imagick_similarityimage, 0, 3, Imagick, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, threshold, IS_DOUBLE, 0, "0.0")
- #else
--ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Imagick_similarityimage, 0, 0, 3)
-+ ZEND_ARG_INFO(1, threshold)
- #endif
-
-- ZEND_ARG_OBJ_INFO(0, image, imagick, 0)
--
--#if PHP_VERSION_ID >= 80000
-- ZEND_ARG_TYPE_INFO(1, offset, IS_ARRAY, 1)
--#else
-- ZEND_ARG_INFO(1, offset)
--#endif
--
- #if PHP_VERSION_ID >= 80000
-- ZEND_ARG_TYPE_INFO(1, similarity, IS_DOUBLE, 1)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, metric, IS_LONG, 0, "0")
- #else
-- ZEND_ARG_INFO(1, similarity)
-+ ZEND_ARG_INFO(1, metric)
- #endif
- ZEND_END_ARG_INFO()
- #endif
-
-+#if MagickLibVersion > 0x628 && MagickLibVersion >= 0x652
-+#define arginfo_class_Imagick_similarityimage arginfo_class_Imagick_subimageMatch
-+#endif
-+
- #if MagickLibVersion > 0x628
-
- #if PHP_VERSION_ID >= 80000
diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec
index f4eed8a..fe3a8a6 100644
--- a/php-pecl-imagick.spec
+++ b/php-pecl-imagick.spec
@@ -7,7 +7,8 @@
# Please, preserve the changelog entries
#
-%bcond_with im7
+%bcond_with im7
+%bcond_without tests
# we don't want -z defs linker flag
%undefine _strict_symbol_defs_build
@@ -30,24 +31,26 @@
%global ini_name 40-%{pecl_name}.ini
%endif
%global upstream_version 3.5.0
-%global upstream_prever RC1
+%global upstream_prever RC2
-Summary: Extension to create and modify images using ImageMagick
-Name: %{?sub_prefix}php-pecl-imagick
+%if %{with im7}
+Summary: Extension to create and modify images using ImageMagick 7
+Name: %{?sub_prefix}php-pecl-imagick-im7
+%else
+Summary: Extension to create and modify images using ImageMagick 6
+Name: %{?sub_prefix}php-pecl-imagick-im6
+%endif
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
%if 0%{?gh_date}
Release: 0.9.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
%else
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 0%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
%endif
License: PHP
URL: https://pecl.php.net/package/imagick
-# From https://github.com/Imagick/imagick/pull/421
-Patch0: %{pecl_name}-arginfo.patch
-
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
@@ -78,6 +81,14 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{relea
%endif
Conflicts: %{?scl_prefix}php-pecl-gmagick
+%if %{with im7}
+Conflicts: %{?scl_prefix}php-pecl-imagick-im6
+%else
+Conflicts: %{?scl_prefix}php-pecl-imagick-im7
+Obsoletes: %{?scl_prefix}php-pecl-imagick < %{version}
+%endif
+Provides: %{?scl_prefix}php-pecl-imagick = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-imagick%{?_isa} = %{version}-%{release}
%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
@@ -125,6 +136,13 @@ Obsoletes: php81-pecl-%{pecl_name} <= %{version}
Imagick is a native php extension to create and modify images
using the ImageMagick API.
+Documentation: https://www.php.net/imagick
+
+%if %{with im7}
+Package built using ImageMagick version 7
+%else
+Package built using ImageMagick version 6
+%endif
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
@@ -134,6 +152,15 @@ Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{?scl_prefix}php-devel%{?_isa}
+%if %{with im7}
+Conflicts: %{?scl_prefix}php-pecl-imagick-im6-devel
+%else
+Conflicts: %{?scl_prefix}php-pecl-imagick-im7-devel
+Obsoletes: %{?scl_prefix}php-pecl-imagick-devel < %{version}
+%endif
+Provides: %{?scl_prefix}php-pecl-imagick-devel = %{version}-%{release}
+Provides: %{?scl_prefix}php-pecl-imagick%{?_isa}-devel = %{version}-%{release}
+
%description devel
These are the files needed to compile programs using %{pecl_name} extension.
@@ -151,8 +178,6 @@ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS
# don't install any font (and test using it)
# don't install empty file (d41d8cd98f00b204e9800998ecf8427e)
-# fix tests role
-# https://github.com/mkoppanen/imagick/commit/64ef2a7991c2cdc22b9b2275e732439dc21cede8
sed -e '/anonymous_pro_minus.ttf/d' \
-e '/015-imagickdrawsetresolution.phpt/d' \
-e '/OFL.txt/d' \
@@ -165,7 +190,8 @@ then : "Font files detected!"
fi
cd NTS
-%patch0 -p1 -b .pr421
+: Fix permission for archive generated on Windows
+find . -type f -exec chmod -x {} \;
extver=$(sed -n '/#define PHP_IMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_imagick.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -281,6 +307,7 @@ cd NTS
--define extension=%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
+%if %{with tests}
: upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
@@ -289,6 +316,7 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%else
%{__php} -n run-tests.php -q --show-diff
%endif
+%endif
%if %{with_zts}
: simple module load test for ZTS extension
@@ -323,6 +351,15 @@ cd ../ZTS
%changelog
+* Wed Jun 16 2021 Remi Collet <remi@remirepo.net> - 3.5.0~RC2-0
+- test build for upcoming RC2
+- update to 3.5.0RC2
+- rename to php-pecl-imagick-im6 or php-pecl-imagick-im7
+- drop all patches, all merged upstream including
+ https://github.com/Imagick/imagick/pull/428 add stubs in package
+ https://github.com/Imagick/imagick/pull/426 typo in type name
+ https://github.com/Imagick/imagick/pull/425 fix pass by ref usage
+
* Tue Jun 15 2021 Remi Collet <remi@remirepo.net> - 3.5.0~RC1-1
- update to 3.5.0RC1
- drop all patches, all merged upstream