summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-07-23 12:40:36 +0200
committerRemi Collet <remi@remirepo.net>2019-07-23 12:40:36 +0200
commitd9377401ae8d968d99b5bf40a5405a376a21395f (patch)
tree34e6123213c34024e180349d69f868239f249e3f
parent5378c6a2635a9663a7f93846a369cb5580f2406c (diff)
rebuild for 7.4.0beta1
-rw-r--r--290.patch48
-rw-r--r--291.patch48
-rw-r--r--php-pecl-imagick.spec19
3 files changed, 113 insertions, 2 deletions
diff --git a/290.patch b/290.patch
new file mode 100644
index 0000000..437cd05
--- /dev/null
+++ b/290.patch
@@ -0,0 +1,48 @@
+From bf970c67269f02609d4581c5489606ddd1a10992 Mon Sep 17 00:00:00 2001
+From: Peter Kokot <peterkokot@gmail.com>
+Date: Mon, 24 Jun 2019 21:02:31 +0200
+Subject: [PATCH] Remove HAVE_LOCALE_H symbol
+
+The locale.h header is part of the C89 standard and is present on
+all today's systems already. The HAVE_LOCALE_H symbol is defined
+by PHP's build system and relying on it is neither a good practice
+neither needed anymore since the locale.h check would always define
+it.
+
+http://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
+---
+ php_imagick_defs.h | 14 +++++---------
+ 1 file changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/php_imagick_defs.h b/php_imagick_defs.h
+index 5eb57e5..92dc851 100644
+--- a/php_imagick_defs.h
++++ b/php_imagick_defs.h
+@@ -43,9 +43,7 @@
+ #include "Zend/zend.h"
+
+ /* Include locale header */
+-#ifdef HAVE_LOCALE_H
+-# include <locale.h>
+-#endif
++#include <locale.h>
+
+ #if MagickLibVersion >= 0x680
+ #define IMAGICK_WITH_KERNEL
+@@ -97,12 +95,10 @@ ZEND_END_MODULE_GLOBALS(imagick)
+
+ ZEND_EXTERN_MODULE_GLOBALS(imagick)
+
+-#ifdef HAVE_LOCALE_H
+-# if defined(PHP_WIN32)
+-# define IMAGICK_LC_NUMERIC_LOCALE "English"
+-# else
+-# define IMAGICK_LC_NUMERIC_LOCALE "C"
+-# endif
++#if defined(PHP_WIN32)
++# define IMAGICK_LC_NUMERIC_LOCALE "English"
++#else
++# define IMAGICK_LC_NUMERIC_LOCALE "C"
+ #endif
+
+ #if PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3
diff --git a/291.patch b/291.patch
new file mode 100644
index 0000000..8d79a65
--- /dev/null
+++ b/291.patch
@@ -0,0 +1,48 @@
+From 1c4c0fd5796249de19179afa77e87f315511973e Mon Sep 17 00:00:00 2001
+From: Peter Kokot <peterkokot@gmail.com>
+Date: Thu, 27 Jun 2019 00:20:10 +0200
+Subject: [PATCH] Remove HAVE_SPL
+
+The HAVE_SPL symbol is defined in PHP to indicate the presence of the
+spl extension. Since PHP 5.3 the SPL extension is always availabe and
+since PHP-7.4 the HAVE_SPL symbol has also been removed.
+---
+ imagick.c | 8 --------
+ 1 file changed, 8 deletions(-)
+
+diff --git a/imagick.c b/imagick.c
+index 8e58afe..1b97026 100644
+--- a/imagick.c
++++ b/imagick.c
+@@ -33,9 +33,7 @@
+
+
+ /* For the countable interface */
+-#if defined(HAVE_SPL)
+ #include "ext/spl/spl_iterators.h"
+-#endif
+
+ ZEND_DECLARE_MODULE_GLOBALS(imagick)
+
+@@ -3675,11 +3673,7 @@ PHP_MINIT_FUNCTION(imagick)
+ #endif
+
+ php_imagick_sc_entry = zend_register_internal_class(&ce TSRMLS_CC);
+-#if defined(HAVE_SPL)
+ zend_class_implements(php_imagick_sc_entry TSRMLS_CC, 2, zend_ce_iterator, spl_ce_Countable);
+-#else
+- zend_class_implements(php_imagick_sc_entry TSRMLS_CC, 1, zend_ce_iterator);
+-#endif
+
+ /*
+ Initialize the class (ImagickDraw)
+@@ -3874,9 +3868,7 @@ PHP_RSHUTDOWN_FUNCTION(imagick)
+ static const zend_module_dep imagick_deps[] = {
+ ZEND_MOD_CONFLICTS("gmagick")
+ ZEND_MOD_REQUIRED("standard")
+-#ifdef HAVE_SPL
+ ZEND_MOD_REQUIRED("spl")
+-#endif
+ ZEND_MOD_END
+ };
+ #endif
diff --git a/php-pecl-imagick.spec b/php-pecl-imagick.spec
index 574ccc9..6ed63da 100644
--- a/php-pecl-imagick.spec
+++ b/php-pecl-imagick.spec
@@ -37,15 +37,18 @@ Summary: Extension to create and modify images using ImageMagick
Name: %{?sub_prefix}php-pecl-imagick
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
%if 0%{?gh_date}
-Release: 0.6.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+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: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 4%{?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
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
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel > 5.4
BuildRequires: %{?scl_prefix}php-pear
@@ -160,6 +163,9 @@ then : "Font files detected!"
fi
cd NTS
+%patch0 -p1
+%patch1 -p1
+
extver=$(sed -n '/#define PHP_IMAGICK_VERSION/{s/.* "//;s/".*$//;p}' php_imagick.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
: Error: Upstream version is ${extver}, expecting %{upstream_version}%{?upstream_prever}.
@@ -255,7 +261,11 @@ 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
@@ -304,6 +314,11 @@ cd ../ZTS
%changelog
+* Tue Jul 23 2019 Remi Collet <remi@remirepo.net> - 3.4.4-4
+- rebuild for 7.4.0beta1
+- ignore test suite for now
+ https://github.com/Imagick/imagick/issues/295
+
* Wed May 29 2019 Remi Collet <remi@remirepo.net> - 3.4.4-3
- rebuild