summaryrefslogtreecommitdiffstats
path: root/php-pecl-rdkafka6.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-10-25 15:12:20 +0200
committerRemi Collet <remi@php.net>2024-10-25 15:12:20 +0200
commit66791bf9525e1e032736f15e927b814256370997 (patch)
treee9c783c883144f0506f4a7c5c79d062c0c7bdc7f /php-pecl-rdkafka6.spec
parent3b94465143a0dd2f2e769b8883534fe3460698d3 (diff)
add upstream patch for old PHP versionsHEADmaster
Diffstat (limited to 'php-pecl-rdkafka6.spec')
-rw-r--r--php-pecl-rdkafka6.spec13
1 files changed, 10 insertions, 3 deletions
diff --git a/php-pecl-rdkafka6.spec b/php-pecl-rdkafka6.spec
index 834acf0..59440d1 100644
--- a/php-pecl-rdkafka6.spec
+++ b/php-pecl-rdkafka6.spec
@@ -39,11 +39,14 @@
Summary: Kafka client based on librdkafka
Name: %{?scl_prefix}php-pecl-%{pecl_name}6
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-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: MIT
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+# See https://github.com/arnaud-lb/php-rdkafka/issues/562
+Patch0: upstream.patch
+
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
%if %{with move_to_opt}
@@ -52,8 +55,7 @@ Requires: %{?vendeur:%{vendeur}-}librdkafka%{?_isa} >= %{buildver}
%else
BuildRequires: librdkafka-devel >= 1.4
%endif
-# See https://github.com/arnaud-lb/php-rdkafka/issues/562
-BuildRequires: %{?scl_prefix}php-devel >= 7.3
+BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -99,6 +101,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd %{sources}
+%patch -P0 -p1 -b .up
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_RDKAFKA_VERSION/{s/.* "//;s/".*$//;p}' php_rdkafka.h)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
@@ -220,6 +224,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Fri Oct 25 2024 Remi Collet <remi@remirepo.net> - 6.0.4-2
+- add upstream patch for old PHP versions
+
* Fri Oct 25 2024 Remi Collet <remi@remirepo.net> - 6.0.4-1
- update to 6.0.4
- open https://github.com/arnaud-lb/php-rdkafka/issues/562