summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-10-08 17:07:13 +0200
committerRemi Collet <remi@remirepo.net>2017-10-08 17:07:13 +0200
commit0d6b709ec6026e6787d6d57a4048d169e26781e9 (patch)
treea59322101d3c0c90f2b15b8be74d5fb59dd03508
parentf0425a28750be7243f2aa0f4242b8bc110da4d95 (diff)
v2.0.4 (stable)
-rw-r--r--REFLECTION2
-rw-r--r--bitset-upstream.patch34
-rw-r--r--php-pecl-bitset.spec25
3 files changed, 48 insertions, 13 deletions
diff --git a/REFLECTION b/REFLECTION
index 7579eb0..8cfa81f 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #80 bitset version 2.0.3 ] {
+Extension [ <persistent> extension #63 bitset version 2.0.4 ] {
- Functions {
Function [ <internal:bitset> function bitset_empty ] {
diff --git a/bitset-upstream.patch b/bitset-upstream.patch
new file mode 100644
index 0000000..0d3680a
--- /dev/null
+++ b/bitset-upstream.patch
@@ -0,0 +1,34 @@
+From 112f0b16d587c444f244325a798eb7c90d79dfde Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Sun, 8 Oct 2017 16:57:44 +0200
+Subject: [PATCH] fix ZTS build
+
+---
+ bitset.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/bitset.c b/bitset.c
+index 3ca6200..9b7596d 100644
+--- a/bitset.c
++++ b/bitset.c
+@@ -652,7 +652,7 @@ PHP_METHOD(BitSet, previousClearBit)
+ bit_diff = intern->bitset_len * CHAR_BIT;
+
+ if (start_bit > bit_diff) {
+- zend_throw_exception_ex(spl_ce_OutOfRangeException, 0,
++ zend_throw_exception_ex(spl_ce_OutOfRangeException, 0 TSRMLS_CC,
+ "The specified index parameter exceeds the total number of bits available");
+ return;
+ }
+@@ -696,7 +696,7 @@ PHP_METHOD(BitSet, previousSetBit)
+ bit_diff = intern->bitset_len * CHAR_BIT;
+
+ if (start_bit > bit_diff) {
+- zend_throw_exception_ex(spl_ce_OutOfRangeException, 0,
++ zend_throw_exception_ex(spl_ce_OutOfRangeException, 0 TSRMLS_CC,
+ "The specified index parameter exceeds the total number of bits available");
+ }
+
+--
+2.1.4
+
diff --git a/php-pecl-bitset.spec b/php-pecl-bitset.spec
index 5607727..22172f0 100644
--- a/php-pecl-bitset.spec
+++ b/php-pecl-bitset.spec
@@ -11,9 +11,9 @@
%{!?__pecl: %global __pecl %{_bindir}/pecl}
%{!?__php: %global __php %{_bindir}/php}
-%global with_zts 0%{?__ztsphp:1}
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name bitset
-%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
+%global with_tests 0%{!?_without_tests:1}
%if "%{php_version}" < "5.6"
%global ini_name %{pecl_name}.ini
%else
@@ -22,15 +22,16 @@
Summary: BITSET library
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 2.0.3
+Version: 2.0.4
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: %{?scl_prefix}php-devel > 5.3
+Patch0: %{pecl_name}-upstream.patch
+
+BuildRequires: %{?scl_prefix}php-devel < 7
BuildRequires: %{?scl_prefix}php-pear
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
@@ -41,8 +42,10 @@ 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 "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
@@ -83,6 +86,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .zts
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_BITSET_VERSION/{s/.* "//;s/".*$//;p}' php_bitset.h)
@@ -121,8 +125,6 @@ make %{?_smp_mflags}
%install
-rm -rf %{buildroot}
-
make -C NTS install INSTALL_ROOT=%{buildroot}
# install config file
@@ -197,12 +199,7 @@ REPORT_EXIT_STATUS=1 \
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{?_licensedir:%license NTS/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -217,6 +214,10 @@ rm -rf %{buildroot}
%changelog
+* Sun Oct 8 2017 Remi Collet <remi@remirepo.net> - 2.0.4-1
+- Update to 2.0.4 (stable)
+- add upstream patch for ZTS build
+
* Mon Feb 29 2016 Remi Collet <remi@fedoraproject.org> - 2.0.3-1
- Update to 2.0.3