summaryrefslogtreecommitdiffstats
path: root/php-pecl-xdiff.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-09-30 16:50:15 +0200
committerRemi Collet <remi@remirepo.net>2020-09-30 16:50:15 +0200
commite29c950421e60be79ecbcd11cc00afe0a48eb67f (patch)
tree5df8f7ed6ec58cfd4b05d0271a66570ceb53ad4a /php-pecl-xdiff.spec
parenteff398621bab15ecac72debdecd0e0c3750926cb (diff)
add patch for PHP 8 from
https://github.com/php/pecl-text-xdiff/pull/5
Diffstat (limited to 'php-pecl-xdiff.spec')
-rw-r--r--php-pecl-xdiff.spec39
1 files changed, 21 insertions, 18 deletions
diff --git a/php-pecl-xdiff.spec b/php-pecl-xdiff.spec
index 2d9742e..92e9d3d 100644
--- a/php-pecl-xdiff.spec
+++ b/php-pecl-xdiff.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-xdiff
#
-# Copyright (c) 2016-2019 Remi Collet
+# Copyright (c) 2016-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -22,16 +22,18 @@
%global libxdiff_version 0.23
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 2.0.1
-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;')}}
Summary: File differences/patches
# libxdiff is LGPLv2+, xdiff extension is PHP
License: PHP and LGPLv2+
-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
# bundles the lib, as libxdiff from spot is not compatible
Source1: http://www.xmailserver.org/libxdiff-%{libxdiff_version}.tar.gz
Source2: config.m4
+Patch0: https://patch-diff.githubusercontent.com/raw/php/pecl-text-xdiff/pull/5.patch
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7
BuildRequires: %{?scl_prefix}php-pear
@@ -50,23 +52,16 @@ 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}
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-%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 "%{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
@@ -100,12 +95,16 @@ sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
+cd NTS
+%patch0 -p1 -b .pr
+
# Sanity check, really often broken
-extver=$(sed -n '/#define PHP_XDIFF_VERSION/{s/.* "//;s/".*$//;p}' NTS/php_xdiff.h)
+extver=$(sed -n '/#define PHP_XDIFF_VERSION/{s/.* "//;s/".*$//;p}' php_xdiff.h)
if test "x${extver}" != "x%{version}"; then
: Error: Upstream extension version is ${extver}, expecting %{version}.
exit 1
fi
+cd ..
cat >%{ini_name} << 'EOF'
; Enable %{pecl_name} extension module
@@ -183,7 +182,7 @@ fi
: Minimal load test for NTS extension
%{__php} -n \
-d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
: Upstream test suite for NTS extension
cd NTS
@@ -197,7 +196,7 @@ REPORT_EXIT_STATUS=1 \
: Minimal load test for ZTS extension
%{__ztsphp} -n \
-d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --modules | grep '^%{pecl_name}$'
: Upstream test suite for ZTS extension
cd ../NTS
@@ -226,6 +225,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 2.0.1-8
+- add patch for PHP 8 from
+ https://github.com/php/pecl-text-xdiff/pull/5
+
* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 2.0.1-7
- rebuild for 7.4.0RC1