From 53edb91d753ba4ffbf7d52c0da278ac5d1326c8c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 27 Aug 2019 16:30:19 +0200 Subject: add workaround to https://bugs.php.net/78465 --- gmagick-bug78465.patch | 15 +++++++++++++++ php-pecl-gmagick.spec | 26 +++++++++++++------------- 2 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 gmagick-bug78465.patch diff --git a/gmagick-bug78465.patch b/gmagick-bug78465.patch new file mode 100644 index 0000000..c61f9b9 --- /dev/null +++ b/gmagick-bug78465.patch @@ -0,0 +1,15 @@ +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 --git a/php-pecl-gmagick.spec b/php-pecl-gmagick.spec index eb9f586..35ab40a 100644 --- a/php-pecl-gmagick.spec +++ b/php-pecl-gmagick.spec @@ -1,6 +1,6 @@ # spec file for php-pecl-gmagick # -# Copyright (c) 2010-2018 Remi Collet +# Copyright (c) 2010-2019 Remi Collet # Copyright (c) 2009-2010 Pavel Alexeev # License: MIT # http://opensource.org/licenses/MIT @@ -23,11 +23,13 @@ Summary: Provides a wrapper to the GraphicsMagick library Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 5%{?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 +Patch0: %{pecl_name}-bug78465.patch + BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-devel >= 7.0.1 @@ -51,16 +53,6 @@ Conflicts: %{?scl_prefix}php-magickwand %if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} # Other third party repo stuff -Obsoletes: php53-pecl-%{pecl_name} <= %{version} -Obsoletes: php53u-pecl-%{pecl_name} <= %{version} -Obsoletes: php54-pecl-%{pecl_name} <= %{version} -Obsoletes: php54w-pecl-%{pecl_name} <= %{version} -Obsoletes: php55u-pecl-%{pecl_name} <= %{version} -Obsoletes: php55w-pecl-%{pecl_name} <= %{version} -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} %if "%{php_version}" > "7.1" Obsoletes: php71u-pecl-%{pecl_name} <= %{version} Obsoletes: php71w-pecl-%{pecl_name} <= %{version} @@ -70,9 +62,13 @@ Obsoletes: php72u-pecl-%{pecl_name} <= %{version} Obsoletes: php72w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.3" -Obsoletes: php73u-pecl-%{pecl_name} <= %{version} +Obsoletes: php73-pecl-%{pecl_name} <= %{version} Obsoletes: php73w-pecl-%{pecl_name} <= %{version} %endif +%if "%{php_version}" > "7.4" +Obsoletes: php74-pecl-%{pecl_name} <= %{version} +Obsoletes: php74w-pecl-%{pecl_name} <= %{version} +%endif %endif %if 0%{?fedora} < 20 && 0%{?rhel} < 7 @@ -99,6 +95,7 @@ sed -e 's/role="test"/role="src"/' \ mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS cd NTS +%patch0 -p1 -b .bug78465 extver=$(sed -n '/#define PHP_GMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_gmagick.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then @@ -230,6 +227,9 @@ export TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" %changelog +* Tue Aug 27 2019 Remi Collet - 2.0.5~RC1-5 +- add workaround to https://bugs.php.net/78465 + * Wed Dec 12 2018 Remi Collet - 2.0.5~RC1-4 - cleanup for EL-8 -- cgit