summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--296.patch22
-rw-r--r--php-pecl-imagick.spec16
2 files changed, 33 insertions, 5 deletions
diff --git a/296.patch b/296.patch
new file mode 100644
index 0000000..7eb5097
--- /dev/null
+++ b/296.patch
@@ -0,0 +1,22 @@
+From 421c3705107fab022631b93a2e70fc7c0ffc86ea Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 23 Jul 2019 18:02:31 +0200
+Subject: [PATCH] Fix #295 ensure IM don't use multiple threads
+
+---
+ imagick.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/imagick.c b/imagick.c
+index 8e58afe..e5a688a 100644
+--- a/imagick.c
++++ b/imagick.c
+@@ -3844,6 +3844,8 @@ PHP_RINIT_FUNCTION(imagick)
+ (void)module_number;
+
+ IMAGICK_G(progress_callback) = NULL;
++ MagickSetResourceLimit(ThreadResource, 1);
++
+ return SUCCESS;
+ }
+
diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec
index 6ed63da..f46c6d6 100644
--- a/php-pecl-imagick.spec
+++ b/php-pecl-imagick.spec
@@ -40,7 +40,7 @@ Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 0.7.%{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: 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;')}}
Source0: http://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
%endif
License: PHP
@@ -48,6 +48,7 @@ URL: http://pecl.php.net/package/imagick
Patch0: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/290.patch
Patch1: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/291.patch
+Patch2: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/296.patch
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 5.4
@@ -165,6 +166,9 @@ fi
cd NTS
%patch0 -p1
%patch1 -p1
+%if "%{php_version}" > "7.4"
+%patch2 -p1
+%endif
extver=$(sed -n '/#define PHP_IMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_imagick.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -261,11 +265,8 @@ fi
%check
-%if "%{php_version}" > "7.4"
-export REPORT_EXIT_STATUS=0
-%else
export REPORT_EXIT_STATUS=1
-%endif
+
# very long, and erratic results, sometime timeout
rm ?TS/tests/229_Tutorial_fxAnalyzeImage_case1.phpt
@@ -314,6 +315,11 @@ cd ../ZTS
%changelog
+* Tue Jul 23 2019 Remi Collet <remi@remirepo.net> - 3.4.4-5
+- add patch for PHP 7.4 from
+ https://github.com/Imagick/imagick/pull/296
+- re-enable test suite
+
* Tue Jul 23 2019 Remi Collet <remi@remirepo.net> - 3.4.4-4
- rebuild for 7.4.0beta1
- ignore test suite for now