From a18f81914f9614fc8ecb9b709c15b90b9b6f6714 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 23 May 2019 15:37:00 +0200 Subject: add patch for PHP 7.4 from https://github.com/datastax/php-driver/pull/132 --- 132.patch | 28 ++++++++++++++++++++++++++++ php-pecl-cassandra.spec | 16 +++++++++++++--- 2 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 132.patch diff --git a/132.patch b/132.patch new file mode 100644 index 0000000..ebdd961 --- /dev/null +++ b/132.patch @@ -0,0 +1,28 @@ +From 735c5794a003124f5924753472b190a2cb332824 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Thu, 23 May 2019 15:29:45 +0200 +Subject: [PATCH] SPL is always there + +--- + ext/php_driver.h | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/ext/php_driver.h b/ext/php_driver.h +index 10680d22..bc42b6fc 100644 +--- a/ext/php_driver.h ++++ b/ext/php_driver.h +@@ -46,12 +46,8 @@ typedef int pid_t; + # error PHP 5.6.0 or later is required in order to build the driver + #endif + +-#if HAVE_SPL +-# include +-# include +-#else +-# error SPL must be enabled in order to build the driver +-#endif ++#include ++#include + + #include "version.h" + diff --git a/php-pecl-cassandra.spec b/php-pecl-cassandra.spec index ac60eda..10df6fc 100644 --- a/php-pecl-cassandra.spec +++ b/php-pecl-cassandra.spec @@ -1,6 +1,6 @@ # remirepo spec file for php-pecl-cassandra # -# Copyright (c) 2015-2018 Remi Collet +# Copyright (c) 2015-2019 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # @@ -32,7 +32,7 @@ Summary: DataStax PHP Driver for Apache Cassandra Name: %{?sub_prefix}php-pecl-%{pecl_name} Version: 1.3.2 -Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: ASL 2.0 URL: http://pecl.php.net/package/%{pecl_name} @@ -44,6 +44,7 @@ Source: http://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz %endif Patch0: https://patch-diff.githubusercontent.com/raw/datastax/php-driver/pull/126.patch +Patch1: https://patch-diff.githubusercontent.com/raw/datastax/php-driver/pull/132.patch BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 5.6 @@ -83,9 +84,13 @@ Obsoletes: php72u-pecl-%{pecl_name} <= %{version} Obsoletes: php72w-pecl-%{pecl_name} <= %{version} %endif %if "%{php_version}" > "7.3" -Obsoletes: php73u-pecl-%{pecl_name} <= %{version} +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 @@ -119,6 +124,7 @@ sed -e 's/role="test"/role="src"/' \ cd NTS %patch0 -p2 -b .pr126 +%patch1 -p2 -b .pr132 # Sanity check, really often broken extver=$(sed -n '/#define PHP_DRIVER_VERSION /{s/.* "//;s/".*$//;p}' version.h) @@ -253,6 +259,10 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Thu May 23 2019 Remi Collet - 1.3.2-5 +- add patch for PHP 7.4 from + https://github.com/datastax/php-driver/pull/132 + * Thu Aug 16 2018 Remi Collet - 1.3.2-4 - rebuild for 7.3.0beta2 new ABI -- cgit