summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-09-10 14:11:46 +0200
committerRemi Collet <remi@remirepo.net>2020-09-10 14:11:46 +0200
commit6022f79edaa053fece96c5014f30fb8ee85f06f7 (patch)
tree1a8947dd7590c1880f0417d1d0bf004349ba3f37
parent4461d7ef0034dfd85609c3616ac0abee08c5a730 (diff)
add upstream patch for PHP 8
-rw-r--r--PHPINFO7
-rw-r--r--REFLECTION27
-rw-r--r--php-pecl-xmldiff.spec53
-rw-r--r--xmldiff-php8.patch43
4 files changed, 80 insertions, 50 deletions
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 [ <persistent> extension #156 xmldiff version 1.1.2 ] {
+Extension [ <persistent> extension #117 xmldiff version 1.1.2 ] {
- Dependencies {
Dependency [ dom (Required) ]
@@ -150,7 +150,7 @@ Extension [ <persistent> extension #156 xmldiff version 1.1.2 ] {
}
}
- Class [ <internal:xmldiff> class XMLDiff\Exception extends Exception ] {
+ Class [ <internal:xmldiff> class XMLDiff\Exception extends Exception implements Throwable ] {
- Constants [0] {
}
@@ -168,8 +168,8 @@ Extension [ <persistent> extension #156 xmldiff version 1.1.2 ] {
Property [ <default> protected $line ]
}
- - Methods [9] {
- Method [ <internal:Core, inherits Exception, ctor> <visibility error> method __construct ] {
+ - Methods [10] {
+ Method [ <internal:Core, inherits Exception, ctor> public method __construct ] {
- Parameters [3] {
Parameter #0 [ <optional> $message ]
@@ -178,28 +178,31 @@ Extension [ <persistent> extension #156 xmldiff version 1.1.2 ] {
}
}
- Method [ <internal:Core, inherits Exception> final public method getMessage ] {
+ Method [ <internal:Core, inherits Exception> public method __wakeup ] {
}
- Method [ <internal:Core, inherits Exception> final public method getCode ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getMessage ] {
}
- Method [ <internal:Core, inherits Exception> final public method getFile ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getCode ] {
}
- Method [ <internal:Core, inherits Exception> final public method getLine ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getFile ] {
}
- Method [ <internal:Core, inherits Exception> final public method getTrace ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getLine ] {
}
- Method [ <internal:Core, inherits Exception> final public method getPrevious ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTrace ] {
}
- Method [ <internal:Core, inherits Exception> final public method getTraceAsString ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getPrevious ] {
}
- Method [ <internal:Core, inherits Exception> public method __toString ] {
+ Method [ <internal:Core, inherits Exception, prototype Throwable> final public method getTraceAsString ] {
+ }
+
+ Method [ <internal:Core, inherits Exception, prototype Throwable> 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 <remi@remirepo.net> - 1.1.2-15
+- add upstream patch for PHP 8
+
* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 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