summaryrefslogtreecommitdiffstats
path: root/php-pecl-cassandra.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-06-15 11:39:30 +0200
committerRemi Collet <remi@php.net>2022-06-15 11:39:30 +0200
commit9db3d9d8ecc38f2d547434f1edd213dd202abe30 (patch)
treef490657b2634114ae6bab814c2b2de139f694855 /php-pecl-cassandra.spec
parent68a7ed1e4fbc8d148295fc42a61624a69afc44bd (diff)
add patch for PHP 8 from extension fork
https://github.com/nano-interactive/cassandra-php-driver/ add patch for PHP 8.1 from https://github.com/nano-interactive/cassandra-php-driver/pull/29
Diffstat (limited to 'php-pecl-cassandra.spec')
-rw-r--r--php-pecl-cassandra.spec58
1 files changed, 21 insertions, 37 deletions
diff --git a/php-pecl-cassandra.spec b/php-pecl-cassandra.spec
index 84fdabe..533172b 100644
--- a/php-pecl-cassandra.spec
+++ b/php-pecl-cassandra.spec
@@ -1,16 +1,19 @@
# remirepo spec file for php-pecl-cassandra
#
-# Copyright (c) 2015-2020 Remi Collet
+# Copyright (c) 2015-2022 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please preserve changelog entries
#
+
%if 0%{?scl:1}
%global sub_prefix %{scl_prefix}
%scl_package php-pecl-cassandra
%endif
+%bcond_without tests
+
%global pecl_name cassandra
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
#global prever RC
@@ -19,7 +22,6 @@
#global gh_short %%(c=%%{gh_commit}; echo ${c:0:7})
%global gh_owner datastax
%global gh_project php-driver
-%global with_tests 0%{!?_without_zts:%{?__ztsphp:1}}
%if "%{php_version}" < "5.6"
%global ini_name %{pecl_name}.ini
%else
@@ -32,7 +34,7 @@
Summary: DataStax PHP Driver for Apache Cassandra
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 1.3.2
-Release: 9%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 10%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: ASL 2.0
URL: https://pecl.php.net/package/%{pecl_name}
@@ -47,7 +49,11 @@ Patch0: https://patch-diff.githubusercontent.com/raw/datastax/php-driver/p
Patch1: https://patch-diff.githubusercontent.com/raw/datastax/php-driver/pull/132.patch
Patch2: https://patch-diff.githubusercontent.com/raw/datastax/php-driver/pull/135.patch
Patch3: https://patch-diff.githubusercontent.com/raw/datastax/php-driver/pull/141.patch
+# Fix for PHP 8 from https://github.com/nano-interactive/cassandra-php-driver/commits/v1.3.x/ext
+Patch4: %{pecl_name}-php8.patch
+Patch5: https://patch-diff.githubusercontent.com/raw/nano-interactive/cassandra-php-driver/pull/29.patch
+BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 5.6
BuildRequires: %{?scl_prefix}php-pear
@@ -69,38 +75,6 @@ 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}
-# Other third party repo stuff
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
-%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 "%{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
-%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter private shared provides
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
-
%description
A modern, feature-rich and highly tunable PHP client library for Apache
@@ -129,6 +103,10 @@ cd NTS
%patch1 -p2 -b .pr132
%patch2 -p2 -b .pr135
%patch3 -p2 -b .pr141
+%if "%{php_version}" > "8.0"
+%patch4 -p2 -b .php8
+%patch5 -p2 -b .php81
+%endif
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_DRIVER_VERSION /{s/.* "//;s/".*$//;p}' version.h)
@@ -222,7 +200,7 @@ fi
-d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
-m | grep %{pecl_name}
-%if %{with_tests}
+%if %{with tests}
cd NTS
: Upstream test suite NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
@@ -238,7 +216,7 @@ REPORT_EXIT_STATUS=1 \
-d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
-m | grep %{pecl_name}
-%if %{with_tests}
+%if %{with tests}
cd ../ZTS
: Upstream test suite ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
@@ -265,6 +243,12 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Wed Jun 15 2022 Remi Collet <remi@remirepo.net> - 1.3.2-10
+- add patch for PHP 8 from extension fork
+ https://github.com/nano-interactive/cassandra-php-driver/
+- add patch for PHP 8.1 from
+ https://github.com/nano-interactive/cassandra-php-driver/pull/29
+
* Wed Jan 15 2020 Remi Collet <remi@remirepo.net> - 1.3.2-9
- fix for cassandra-cpp-driver 2.15.0 with new headers location
from https://github.com/datastax/php-driver/pull/141