From b74826b326fdf9ad4a4ccdc85256f80c86dc405b Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 8 Oct 2020 12:45:55 +0200 Subject: add patches for PHP 8 from https://github.com/php-memcached-dev/php-memcached/pull/461 https://github.com/php-memcached-dev/php-memcached/pull/463 --- php-pecl-memcached.spec | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'php-pecl-memcached.spec') diff --git a/php-pecl-memcached.spec b/php-pecl-memcached.spec index f15807d..3061fcd 100644 --- a/php-pecl-memcached.spec +++ b/php-pecl-memcached.spec @@ -3,7 +3,7 @@ # # Fedora spec file for php-pecl-memcached # -# Copyright (c) 2009-2019 Remi Collet +# Copyright (c) 2009-2020 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -31,11 +31,14 @@ Summary: Extension to work with the Memcached caching daemon Name: %{?sub_prefix}php-pecl-memcached Version: 3.1.5 -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: PHP -URL: http://pecl.php.net/package/%{pecl_name} +URL: https://pecl.php.net/package/%{pecl_name} -Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz + +Patch0: https://patch-diff.githubusercontent.com/raw/php-memcached-dev/php-memcached/pull/461.patch +Patch1: https://patch-diff.githubusercontent.com/raw/php-memcached-dev/php-memcached/pull/463.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7 @@ -44,9 +47,7 @@ BuildRequires: %{?scl_prefix}php-json %if %{with_igbin} BuildRequires: %{?sub_prefix}php-pecl-igbinary-devel %endif -%ifnarch ppc64 BuildRequires: %{?sub_prefix}php-pecl-msgpack-devel -%endif BuildRequires: zlib-devel BuildRequires: cyrus-sasl-devel %if %{with_fastlz} @@ -74,9 +75,7 @@ Requires: %{?scl_prefix}php-json%{?_isa} %if %{with_igbin} Requires: %{?sub_prefix}php-pecl-igbinary%{?_isa} %endif -%ifnarch ppc64 Requires: %{?sub_prefix}php-pecl-msgpack%{?_isa} -%endif %{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Provides: %{?scl_prefix}php-%{pecl_name} = %{version} @@ -88,7 +87,7 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{releas 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 Obsoletes: php53-pecl-%{pecl_name} <= %{version} Obsoletes: php53u-pecl-%{pecl_name} <= %{version} @@ -114,7 +113,9 @@ 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 @@ -151,6 +152,11 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS +%if "%{php_version}" > "8.0" +%patch0 -p1 -b .pr461 +%patch1 -p1 -b .pr463 +%endif + %if %{with_fastlz} rm -r fastlz sed -e '/name=.fastlz/d' -i ../package.xml @@ -207,9 +213,7 @@ peclconf() { %endif --enable-memcached-json \ --enable-memcached-sasl \ -%ifnarch ppc64 --enable-memcached-msgpack \ -%endif %if 0 --disable-memcached-protocol \ %else @@ -304,7 +308,7 @@ rm ?TS/tests/expire.phpt ret=0 : Launch the Memcached service -port=$(%{__php} -r 'echo 10000 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10 + PHP_INT_SIZE;') +port=$(%{__php} -r 'echo 10000 + PHP_MAJOR_VERSION*100 + PHP_MINOR_VERSION*10 + PHP_INT_SIZE + 0%{?scl:1};') memcached -p $port -U $port -d -P $PWD/memcached.pid sed -e "s/11211/$port/" -i ?TS/tests/* @@ -354,6 +358,11 @@ exit $ret %changelog +* Thu Oct 8 2020 Remi Collet - 3.1.5-2 +- add patches for PHP 8 from + https://github.com/php-memcached-dev/php-memcached/pull/461 + https://github.com/php-memcached-dev/php-memcached/pull/463 + * Wed Dec 4 2019 Remi Collet - 3.1.5-1 - update to 3.1.5 -- cgit