summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-09-09 16:21:05 +0200
committerRemi Collet <remi@php.net>2022-09-09 16:21:05 +0200
commit126a12b398814a76ee08e9c6e565547213ed864f (patch)
tree3277188459a5c5afe574641807699af7ab0a11b3
parentcf893604a546035b82b4abd2b808f45d7b21d5fa (diff)
add patch for PHP 8.2 from
https://github.com/php/pecl-numbers-bitset/pull/14
-rw-r--r--.gitignore2
-rw-r--r--bitset-php82.patch25
-rw-r--r--php-pecl-bitset.spec43
3 files changed, 41 insertions, 29 deletions
diff --git a/.gitignore b/.gitignore
index 1ab5c4f..01f0400 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
+clog
package-*.xml
*.tgz
+*.tar.bz2
*.tar.gz
*.tar.xz
*.tar.xz.asc
diff --git a/bitset-php82.patch b/bitset-php82.patch
new file mode 100644
index 0000000..4851cf0
--- /dev/null
+++ b/bitset-php82.patch
@@ -0,0 +1,25 @@
+From 39a70cb32da68b14a704f8a9c41a911029596e70 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 9 Sep 2022 16:16:18 +0200
+Subject: [PATCH] Fix __toString prototype with PHP 8.2
+
+---
+ bitset.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/bitset.c b/bitset.c
+index 82765e1..a744d69 100644
+--- a/bitset.c
++++ b/bitset.c
+@@ -118,7 +118,11 @@ ZEND_END_ARG_INFO()
+ ZEND_BEGIN_ARG_INFO(arginfo_bitset_xorop, 0)
+ ZEND_END_ARG_INFO()
+
++#if PHP_VERSION_ID >= 80200
++ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_bitset___tostring, 0, 0, IS_STRING, 0)
++#else
+ ZEND_BEGIN_ARG_INFO(arginfo_bitset___tostring, 0)
++#endif
+ ZEND_END_ARG_INFO()
+
+ ZEND_BEGIN_ARG_INFO(arginfo_bitset_getrawvalue, 0)
diff --git a/php-pecl-bitset.spec b/php-pecl-bitset.spec
index 27cac97..75c15e9 100644
--- a/php-pecl-bitset.spec
+++ b/php-pecl-bitset.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-bitset
#
-# Copyright (c) 2014-2020 Remi Collet
+# Copyright (c) 2014-2022 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -8,22 +8,25 @@
#
%{?scl: %scl_package php-pecl-bitset}
+%bcond_without tests
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name bitset
-%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
%global ini_name 40-%{pecl_name}.ini
Summary: BITSET library
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 3.0.1
-Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 6%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Languages
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Patch0: %{pecl_name}-php82.patch
+
+BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
-BuildRequires: %{?scl_prefix}php-devel > 7
+BuildRequires: %{?scl_prefix}php-devel >= 7.0
BuildRequires: %{?scl_prefix}php-pear
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -34,29 +37,6 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%endif
-
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
%description
@@ -75,6 +55,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .pr14
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_BITSET_VERSION/{s/.* "//;s/".*$//;p}' php_bitset.h)
@@ -164,7 +145,7 @@ cd NTS
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
-%if %{with_tests}
+%if %{with tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
@@ -180,7 +161,7 @@ cd ../ZTS
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
-%if %{with_tests}
+%if %{with tests}
: Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{_bindir}/zts-php \
TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
@@ -206,6 +187,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Fri Sep 9 2022 Remi Collet <remi@remirepo.net> - 3.0.1-6
+- add patch for PHP 8.2 from
+ https://github.com/php/pecl-numbers-bitset/pull/14
+
* Wed Sep 30 2020 Remi Collet <remi@remirepo.net> - 3.0.1-5
- rebuild for PHP 8.0.0RC1