From 6022f79edaa053fece96c5014f30fb8ee85f06f7 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 10 Sep 2020 14:11:46 +0200 Subject: add upstream patch for PHP 8 --- PHPINFO | 7 +++++++ REFLECTION | 27 ++++++++++++++------------ php-pecl-xmldiff.spec | 53 +++++++++++++++------------------------------------ xmldiff-php8.patch | 43 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 80 insertions(+), 50 deletions(-) create mode 100644 PHPINFO create mode 100644 xmldiff-php8.patch diff --git a/PHPINFO b/PHPINFO new file mode 100644 index 0000000..80a0cd4 --- /dev/null +++ b/PHPINFO @@ -0,0 +1,7 @@ + +xmldiff + +xmldiff support => enabled +xmldiff version => 1.1.2 +diffmark library => system +Revision => $Id: xmldiff.cpp 335872 2015-02-03 17:21:38Z ab $ diff --git a/REFLECTION b/REFLECTION index b76a883..db2e8ac 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #156 xmldiff version 1.1.2 ] { +Extension [ extension #117 xmldiff version 1.1.2 ] { - Dependencies { Dependency [ dom (Required) ] @@ -150,7 +150,7 @@ Extension [ extension #156 xmldiff version 1.1.2 ] { } } - Class [ class XMLDiff\Exception extends Exception ] { + Class [ class XMLDiff\Exception extends Exception implements Throwable ] { - Constants [0] { } @@ -168,8 +168,8 @@ Extension [ extension #156 xmldiff version 1.1.2 ] { Property [ protected $line ] } - - Methods [9] { - Method [ method __construct ] { + - Methods [10] { + Method [ public method __construct ] { - Parameters [3] { Parameter #0 [ $message ] @@ -178,28 +178,31 @@ Extension [ extension #156 xmldiff version 1.1.2 ] { } } - Method [ final public method getMessage ] { + Method [ public method __wakeup ] { } - Method [ final public method getCode ] { + Method [ final public method getMessage ] { } - Method [ final public method getFile ] { + Method [ final public method getCode ] { } - Method [ final public method getLine ] { + Method [ final public method getFile ] { } - Method [ final public method getTrace ] { + Method [ final public method getLine ] { } - Method [ final public method getPrevious ] { + Method [ final public method getTrace ] { } - Method [ final public method getTraceAsString ] { + Method [ final public method getPrevious ] { } - Method [ public method __toString ] { + Method [ final public method getTraceAsString ] { + } + + Method [ public method __toString ] { } } } diff --git a/php-pecl-xmldiff.spec b/php-pecl-xmldiff.spec index 77a6730..a4a4d0d 100644 --- a/php-pecl-xmldiff.spec +++ b/php-pecl-xmldiff.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-xmldiff # -# Copyright (c) 2013-2018 Remi Collet +# Copyright (c) 2013-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -24,10 +24,12 @@ Summary: XML diff and merge Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: 1.1.2 -Release: 14%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 15%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD -URL: http://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +URL: https://pecl.php.net/package/%{pecl_name} +Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz + +Patch0: %{pecl_name}-php8.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel > 5.3 @@ -39,14 +41,8 @@ BuildRequires: libxml2-devel Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%if "%{php_version}" < "5.4" -# php 5.3.3 in EL-6 don't use arched virtual provides -# so requires the real package instead -Requires: %{?scl_prefix}php-xml%{?_isa} -%else Requires: %{?scl_prefix}php-dom%{?_isa} Requires: %{?scl_prefix}php-libxml%{?_isa} -%endif %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-%{pecl_name} = %{version} @@ -58,39 +54,15 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{rele Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} %endif -%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} -%if "%{php_version}" > "5.5" -Obsoletes: php55u-pecl-%{pecl_name} <= %{version} -Obsoletes: php55w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "5.6" -Obsoletes: php56u-pecl-%{pecl_name} <= %{version} -Obsoletes: php56w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.0" -Obsoletes: php70u-pecl-%{pecl_name} <= %{version} -Obsoletes: php70w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.1" -Obsoletes: php71u-pecl-%{pecl_name} <= %{version} -Obsoletes: php71w-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.2" -Obsoletes: php72u-pecl-%{pecl_name} <= %{version} -Obsoletes: php72w-pecl-%{pecl_name} <= %{version} -%endif +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} %if "%{php_version}" > "7.3" 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 +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} %endif %endif @@ -131,6 +103,8 @@ sed -e '/name="diffmark/d' \ mv %{pecl_name}-%{version} NTS cd NTS +%patch -p0 -b .up + # drop bundled library to ensure it is not used rm -rf diffmark @@ -277,6 +251,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Thu Sep 10 2020 Remi Collet - 1.1.2-15 +- add upstream patch for PHP 8 + * Tue Sep 03 2019 Remi Collet - 1.1.2-14 - rebuild for 7.4.0RC1 diff --git a/xmldiff-php8.patch b/xmldiff-php8.patch new file mode 100644 index 0000000..0d9cabb --- /dev/null +++ b/xmldiff-php8.patch @@ -0,0 +1,43 @@ +Index: php_xmldiff.h +=================================================================== +--- php_xmldiff.h (révision 350541) ++++ php_xmldiff.h (copie de travail) +@@ -147,6 +147,14 @@ + examples in any other php module directory. + */ + ++#ifndef TSRMLS_DC ++#define TSRMLS_D void ++#define TSRMLS_DC ++#define TSRMLS_C ++#define TSRMLS_CC ++#define TSRMLS_FETCH() ++#endif ++ + #ifdef ZTS + #define XMLDIFF_G(v) TSRMG(xmldiff_globals_id, zend_xmldiff_globals *, v) + #else +Index: xmldiff.cpp +=================================================================== +--- xmldiff.cpp (révision 350541) ++++ xmldiff.cpp (copie de travail) +@@ -62,6 +62,10 @@ + /* }}} */ + + /* {{{ arginfo */ ++ZEND_BEGIN_ARG_INFO_EX(XMLDiff_construct, 0, 0, 0) ++ ZEND_ARG_INFO(0, nsurl) ++ZEND_END_ARG_INFO() ++ + ZEND_BEGIN_ARG_INFO_EX(XMLDiff_diff, 0, 0, 2) + ZEND_ARG_INFO(0, from) + ZEND_ARG_INFO(0, to) +@@ -75,7 +79,7 @@ + + /* {{{ xmldiff_methods[] */ + const zend_function_entry XMLDiffBase_methods[] = { +- PHP_ME(XMLDiffBase, __construct, NULL, ZEND_ACC_PUBLIC) ++ PHP_ME(XMLDiffBase, __construct, XMLDiff_construct, ZEND_ACC_PUBLIC) + PHP_ME(XMLDiffBase, diff, XMLDiff_diff, ZEND_ACC_PUBLIC | ZEND_ACC_ABSTRACT) + PHP_ME(XMLDiffBase, merge, XMLDiff_merge, ZEND_ACC_PUBLIC | ZEND_ACC_ABSTRACT) + PHP_FE_END -- cgit