summaryrefslogtreecommitdiffstats
path: root/php-pecl-rdkafka4.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-rdkafka4.spec')
-rw-r--r--php-pecl-rdkafka4.spec14
1 files changed, 12 insertions, 2 deletions
diff --git a/php-pecl-rdkafka4.spec b/php-pecl-rdkafka4.spec
index 5f7b6de..2845f50 100644
--- a/php-pecl-rdkafka4.spec
+++ b/php-pecl-rdkafka4.spec
@@ -21,14 +21,17 @@
Summary: Kafka client based on librdkafka
Name: %{?sub_prefix}php-pecl-%{pecl_name}4
Version: 4.1.0
-Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: MIT
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Patch0: %{pecl_name}-php8.patch
+
BuildRequires: %{?dtsprefix}gcc
+BuildRequires: make
BuildRequires: librdkafka1php-devel
-BuildRequires: %{?scl_prefix}php-devel > 5.6
+BuildRequires: %{?scl_prefix}php-devel >= 5.6
BuildRequires: %{?scl_prefix}php-pear
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -84,6 +87,10 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%if "%{php_version}" > "8.0"
+%patch0 -p1 -b .up
+%endif
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_RDKAFKA_VERSION/{s/.* "//;s/".*$//;p}' php_rdkafka.h)
if test "x${extver}" != "x%{version}"; then
@@ -198,6 +205,9 @@ cd ../ZTS
%changelog
+* Mon Dec 7 2020 Remi Collet <remi@remirepo.net> - 4.1.0-2
+- add upstream patches for PHP 8
+
* Mon Dec 7 2020 Remi Collet <remi@remirepo.net> - 4.1.0-1
- update to 4.1.0