summaryrefslogtreecommitdiffstats
path: root/php-pecl-imagick.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-imagick.spec')
-rw-r--r--php-pecl-imagick.spec26
1 files changed, 23 insertions, 3 deletions
diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec
index 79297a9..f94c157 100644
--- a/php-pecl-imagick.spec
+++ b/php-pecl-imagick.spec
@@ -40,7 +40,7 @@ Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 0.8.%{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: 7%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 8%{?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
@@ -50,6 +50,7 @@ Patch0: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull
Patch1: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/291.patch
Patch2: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/296.patch
Patch3: https://patch-diff.githubusercontent.com/raw/Imagick/imagick/pull/302.patch
+Patch4: https://github.com/Imagick/imagick/commit/b29c54505a93365441fa140b152a651c3b9324c2.patch
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 5.4
@@ -168,9 +169,10 @@ cd NTS
%patch0 -p1
%patch1 -p1
%if "%{php_version}" > "7.4"
-%patch2 -p1
+#patch2 -p1
%endif
%patch3 -p1
+%patch4 -p1
extver=$(sed -n '/#define PHP_IMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_imagick.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -186,13 +188,24 @@ extension = %{pecl_name}.so
; Documentation: http://php.net/imagick
; Don't check builtime and runtime versions of ImageMagick
+; Default value:0
imagick.skip_version_check=1
; Fixes a drawing bug with locales that use ',' as float separators.
+; Default value:0
;imagick.locale_fix=0
; Used to enable the image progress monitor.
+; Default value:0
;imagick.progress_monitor=0
+
+; Allow or disallow ImageMagick to use multiple threads
+; Default value:0
+imagick.set_single_thread=1
+
+; Hack to ensure all threads have ended
+; Default value:10
+imagick.shutdown_sleep_count=0
EOF
%if %{with_zts}
@@ -271,6 +284,8 @@ export REPORT_EXIT_STATUS=1
# very long, and erratic results, sometime timeout
rm ?TS/tests/229_Tutorial_fxAnalyzeImage_case1.phpt
+# as we force set_single_thread
+rm ?TS/tests/281_ini_settings_default.phpt
: simple module load test for NTS extension
cd NTS
@@ -281,7 +296,7 @@ cd NTS
: upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
+TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so -d imagick.set_single_thread=1 -d imagick.shutdown_sleep_count=0" \
%{__php} -n run-tests.php -q --show-diff
%if %{with_zts}
@@ -317,6 +332,11 @@ cd ../ZTS
%changelog
+* Mon Nov 25 2019 Remi Collet <remi@remirepo.net> - 3.4.4-8
+- add upstream patch to workaround #295 instead of PR#296
+- set new option imagick.set_single_thread to 1
+- set new option imagick.shutdown_sleep_count to 0
+
* Tue Oct 29 2019 Remi Collet <remi@remirepo.net> - 3.4.4-7
- add patch for latest ImageMagick from
https://github.com/Imagick/imagick/pull/302