summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-02-19 18:18:35 +0100
committerRemi Collet <remi@remirepo.net>2020-02-19 18:18:35 +0100
commit4fde2238d1f56e998dc90aadcc28d15a90cf7483 (patch)
tree3363d4e8fdb8a7008742752e96137c8b960a9cdf
parent4bfb356aba523deb31a3c209bf54bad3fe473053 (diff)
add workaround to https://bugs.php.net/78465
-rw-r--r--gmagick-bug78465.patch29
-rw-r--r--php-pecl-gmagick.spec16
2 files changed, 40 insertions, 5 deletions
diff --git a/gmagick-bug78465.patch b/gmagick-bug78465.patch
new file mode 100644
index 0000000..853c79e
--- /dev/null
+++ b/gmagick-bug78465.patch
@@ -0,0 +1,29 @@
+Workaround to https://bugs.php.net/78465
+
+
+diff -up ./gmagick.c.78465 ./gmagick.c
+--- ./gmagick.c.78465 2015-04-24 12:33:06.000000000 +0200
++++ ./gmagick.c 2020-02-19 18:14:58.513454328 +0100
+@@ -1278,6 +1278,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 =
+@@ -1287,7 +1294,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 222952c..5146e61 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
@@ -11,20 +11,22 @@
%global pecl_name gmagick
%global prever RC3
-%global with_zts 0%{?__ztsphp:1}
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
Summary: Provides a wrapper to the GraphicsMagick library
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 1.1.7
-Release: 0.9.%{prever}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 0.10.%{prever}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Libraries
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Patch0: %{pecl_name}-bug78465.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
BuildRequires: %{?scl_prefix}php-pear
-BuildRequires: %{?scl_prefix}php-devel
+BuildRequires: %{?scl_prefix}php-devel < 7
BuildRequires: GraphicsMagick-devel >= 1.2.6
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -85,6 +87,7 @@ sed -e 's/role="test"/role="src"/' \
mv %{pecl_name}-%{version}%{?prever} NTS
cd NTS
+%patch0 -p1 -b .78465
extver=$(sed -n '/#define PHP_GMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_gmagick.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -166,7 +169,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
@@ -215,6 +218,9 @@ export TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so"
%changelog
+* Wed Feb 19 2020 Remi Collet <remi@fedoraproject.org> - 1.1.7-0.10.RC3
+- add workaround to https://bugs.php.net/78465
+
* Mon Jan 21 2019 Remi Collet <remi@fedoraproject.org> - 1.1.7-0.9.RC3
- cleanup for EL-8