summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-02-19 11:20:56 +0100
committerRemi Collet <remi@remirepo.net>2020-02-19 11:20:56 +0100
commit52def9e3f3ce94fb33f2561b6a978b58a1a456e7 (patch)
treea0c626da5b7de4e8c1f64dace1caa91e95823703
parent9a50b52d4f196a253a7d57d06395f34da1a48ba9 (diff)
better workaround to https://bugs.php.net/78465
-rw-r--r--gmagick-bug78465.patch38
-rw-r--r--php-pecl-gmagick.spec13
2 files changed, 34 insertions, 17 deletions
diff --git a/gmagick-bug78465.patch b/gmagick-bug78465.patch
index c61f9b9..41c27a2 100644
--- a/gmagick-bug78465.patch
+++ b/gmagick-bug78465.patch
@@ -1,15 +1,29 @@
Workaround to https://bugs.php.net/78465
-diff --git a/gmagick.c b/gmagick.c
-index 27ec8cc..2df8f5e 100644
---- a/gmagick.c
-+++ b/gmagick.c
-@@ -1722,6 +1722,8 @@ PHP_MINIT_FUNCTION(gmagick)
- PHP_MSHUTDOWN_FUNCTION(gmagick)
- {
- DestroyMagick();
-+ usleep(4242);
-+
- return SUCCESS;
+
+diff -up ./gmagick.c.old ./gmagick.c
+--- ./gmagick.c.old 2020-02-19 11:10:43.388127352 +0100
++++ ./gmagick.c 2020-02-19 11:10:48.691101111 +0100
+@@ -1742,6 +1742,13 @@ PHP_MINFO_FUNCTION(gmagick)
+ php_info_print_table_end();
}
- /* }}} */
+
++/* {{{ PHP_MINFO_FUNCTION(gmagick)
++*/
++PHP_RINIT_FUNCTION(gmagick)
++{
++ MagickSetResourceLimit(ThreadsResource, 1);
++}
++
+ /* {{{ zend_module_entry gmagick_module_entry
+ */
+ zend_module_entry gmagick_module_entry =
+@@ -1751,7 +1758,7 @@ zend_module_entry gmagick_module_entry =
+ php_gmagick_functions, /* Functions */
+ PHP_MINIT(gmagick), /* MINIT */
+ PHP_MSHUTDOWN(gmagick), /* MSHUTDOWN */
+- NULL, /* RINIT */
++ PHP_RINIT(gmagick), /* RINIT */
+ NULL, /* RSHUTDOWN */
+ PHP_MINFO(gmagick), /* MINFO */
+ PHP_GMAGICK_VERSION, /* Version */
diff --git a/php-pecl-gmagick.spec b/php-pecl-gmagick.spec
index aacbc95..3fb1f49 100644
--- a/php-pecl-gmagick.spec
+++ b/php-pecl-gmagick.spec
@@ -1,6 +1,6 @@
# spec file for php-pecl-gmagick
#
-# Copyright (c) 2010-2019 Remi Collet
+# Copyright (c) 2010-2020 Remi Collet
# Copyright (c) 2009-2010 Pavel Alexeev
# License: MIT
# http://opensource.org/licenses/MIT
@@ -23,10 +23,10 @@
Summary: Provides a wrapper to the GraphicsMagick library
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 7%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
-URL: http://pecl.php.net/package/%{pecl_name}
-Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+URL: https://pecl.php.net/package/%{pecl_name}
+Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
Patch0: %{pecl_name}-bug78465.patch
@@ -175,7 +175,7 @@ fi
%check
-%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 7
# see https://bugzilla.redhat.com/1530057
rm ?TS/tests/gmagick-006-annotateimage.phpt
rm ?TS/tests/gmagickdraw-003-annotate.phpt
@@ -227,6 +227,9 @@ export TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so"
%changelog
+* Wed Feb 19 2020 Remi Collet <remi@remirepo.net> - 2.0.5~RC1-7
+- better workaround to https://bugs.php.net/78465
+
* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 2.0.5~RC1-6
- rebuild for 7.4.0RC1