summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--66.patch25
-rw-r--r--php-phpiredis.spec38
2 files changed, 41 insertions, 22 deletions
diff --git a/66.patch b/66.patch
new file mode 100644
index 0000000..7d7b117
--- /dev/null
+++ b/66.patch
@@ -0,0 +1,25 @@
+From 488ea66312bd392eb890cf276529940abb91ae06 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Mon, 24 Aug 2020 10:32:53 +0200
+Subject: [PATCH] fix for upcoming PHP 8
+
+---
+ phpiredis.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/phpiredis.c b/phpiredis.c
+index 952724a..2665fee 100644
+--- a/phpiredis.c
++++ b/phpiredis.c
+@@ -28,6 +28,11 @@ int le_redis_persistent_context;
+ typedef long zend_long;
+ #endif
+
++#ifndef TSRMLS_CC
++#define TSRMLS_CC
++#define TSRMLS_DC
++#endif
++
+ typedef struct callback {
+ #ifdef ZEND_ENGINE_3
+ zval function;
diff --git a/php-phpiredis.spec b/php-phpiredis.spec
index 6043a14..836b26e 100644
--- a/php-phpiredis.spec
+++ b/php-phpiredis.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-phpiredis
#
-# Copyright (c) 2016-2019 Remi Collet
+# Copyright (c) 2016-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -37,7 +37,7 @@ Version: 1.0.0
%if 0%{?gh_date}
Release: 0.7.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%else
-Release: 13%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 18%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%endif
Summary: Client extension for Redis
@@ -46,6 +46,8 @@ License: BSD
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz
+Patch0: https://patch-diff.githubusercontent.com/raw/nrk/phpiredis/pull/66.patch
+
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -66,26 +68,8 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version}-%{rele
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}-%{release}
%endif
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1}
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1}
# Other third party repo stuff
-%if "%{php_version}" > "5.6"
-Obsoletes: php56u-%{pecl_name} <= %{version}
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56w-%{pecl_name} <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.0"
-Obsoletes: php70u-%{pecl_name} <= %{version}
-Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70w-%{pecl_name} <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-%{pecl_name} <= %{version}
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71w-%{pecl_name} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
%if "%{php_version}" > "7.2"
Obsoletes: php72u-%{pecl_name} <= %{version}
Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
@@ -99,11 +83,15 @@ Obsoletes: php73w-%{pecl_name} <= %{version}
Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "7.4"
-Obsoletes: php74-%{pecl_name} <= %{version}
+Obsoletes: php74-%{pecl_name} <= %{version}
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
Obsoletes: php74w-%{pecl_name} <= %{version}
Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "8.0"
+Obsoletes: php80-%{pecl_name} <= %{version}
+Obsoletes: php80-pecl-%{pecl_name} <= %{version}
+%endif
%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
@@ -126,6 +114,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
mv %{gh_project}-%{gh_commit} NTS
cd NTS
+%patch0 -p1 -b .pr66
+
# Check extension version
ver=$(sed -n '/define PHP_PHPIREDIS_VERSION/{s/.* "//;s/".*$//;p}' php_phpiredis.h)
if test "$ver" != "%{version}%{?prever}%{?gh_date:-dev}"; then
@@ -247,6 +237,10 @@ exit $ret
%changelog
+* Mon Aug 24 2020 Remi Collet <remi@remirepo.net> - 1.0.0-18
+- add patch for PHP 8 from
+ https://github.com/nrk/phpiredis/pull/66
+
* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 1.0.0-13
- rebuild for 7.4.0RC1