summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--PHPINFO6
-rw-r--r--REFLECTION92
-rw-r--r--php-pecl-bitset.spec140
4 files changed, 146 insertions, 94 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/PHPINFO b/PHPINFO
new file mode 100644
index 0000000..05203f5
--- /dev/null
+++ b/PHPINFO
@@ -0,0 +1,6 @@
+
+bitset
+
+BitSet Support => enabled
+BitSet Version => 3.2.0
+64-bit Integer Support => yes
diff --git a/REFLECTION b/REFLECTION
index 51222ff..9d93119 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,7 +1,7 @@
-Extension [ <persistent> extension #76 bitset version 3.0.1 ] {
+Extension [ <persistent> extension #122 bitset version 3.2.0 ] {
- Classes [1] {
- Class [ <internal:bitset> class BitSet ] {
+ Class [ <internal:bitset> class BitSet implements Stringable ] {
- Constants [0] {
}
@@ -9,153 +9,203 @@ Extension [ <persistent> extension #76 bitset version 3.0.1 ] {
- Static properties [0] {
}
- - Static methods [3] {
+ - Static methods [4] {
Method [ <internal:bitset> static public method fromArray ] {
- Parameters [1] {
- Parameter #0 [ <required> $arr ]
+ Parameter #0 [ <required> array $arr ]
}
+ - Return [ BitSet ]
+ }
+
+ Method [ <internal:bitset> static public method fromInteger ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> int $value ]
+ }
+ - Return [ BitSet ]
}
Method [ <internal:bitset> static public method fromString ] {
- Parameters [1] {
- Parameter #0 [ <required> $str ]
+ Parameter #0 [ <required> string $str ]
}
+ - Return [ BitSet ]
}
Method [ <internal:bitset> static public method fromRawValue ] {
- Parameters [1] {
- Parameter #0 [ <required> $str ]
+ Parameter #0 [ <required> string $str ]
}
+ - Return [ BitSet ]
}
}
- Properties [0] {
}
- - Methods [20] {
+ - Methods [21] {
Method [ <internal:bitset, ctor> public method __construct ] {
- Parameters [1] {
- Parameter #0 [ <required> $value ]
+ Parameter #0 [ <optional> int $value = 0 ]
}
}
Method [ <internal:bitset> public method andOp ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> BitSet $set ]
}
+ - Return [ void ]
}
Method [ <internal:bitset> public method andNotOp ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> BitSet $set ]
}
+ - Return [ void ]
}
Method [ <internal:bitset> public method cardinality ] {
- Parameters [0] {
}
+ - Return [ int ]
}
Method [ <internal:bitset> public method clear ] {
- - Parameters [0] {
+ - Parameters [2] {
+ Parameter #0 [ <optional> int $from = -1 ]
+ Parameter #1 [ <optional> int $to = 0 ]
}
+ - Return [ void ]
}
Method [ <internal:bitset> public method get ] {
- Parameters [1] {
- Parameter #0 [ <required> $index ]
+ Parameter #0 [ <required> int $index ]
}
+ - Return [ bool ]
}
Method [ <internal:bitset> public method getRawValue ] {
- Parameters [0] {
}
+ - Return [ string ]
}
Method [ <internal:bitset> public method intersects ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> BitSet $set ]
}
+ - Return [ bool ]
}
Method [ <internal:bitset> public method isEmpty ] {
- Parameters [0] {
}
+ - Return [ bool ]
}
Method [ <internal:bitset> public method length ] {
- Parameters [0] {
}
+ - Return [ int ]
}
Method [ <internal:bitset> public method nextClearBit ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> int $start ]
}
+ - Return [ int|bool ]
}
Method [ <internal:bitset> public method nextSetBit ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> int $start ]
}
+ - Return [ int|bool ]
}
Method [ <internal:bitset> public method orOp ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> BitSet $set ]
}
+ - Return [ void ]
}
Method [ <internal:bitset> public method previousClearBit ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> int $start ]
}
+ - Return [ int|bool ]
}
Method [ <internal:bitset> public method previousSetBit ] {
- - Parameters [0] {
+ - Parameters [1] {
+ Parameter #0 [ <required> int $start ]
}
+ - Return [ int|bool ]
}
Method [ <internal:bitset> public method set ] {
- - Parameters [0] {
+ - Parameters [2] {
+ Parameter #0 [ <optional> int $from = -1 ]
+ Parameter #1 [ <optional> int $to = 0 ]
}
+ - Return [ void ]
}
Method [ <internal:bitset> public method size ] {
- Parameters [0] {
}
+ - Return [ int ]
}
Method [ <internal:bitset> public method toArray ] {
- Parameters [0] {
}
+ - Return [ array ]
}
- Method [ <internal:bitset> public method xorOp ] {
+ Method [ <internal:bitset> public method toInteger ] {
- Parameters [0] {
}
+ - Return [ int ]
+ }
+
+ Method [ <internal:bitset> public method xorOp ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> BitSet $set ]
+ }
+ - Return [ void ]
}
- Method [ <internal:bitset> public method __toString ] {
+ Method [ <internal:bitset, prototype Stringable> public method __toString ] {
- Parameters [0] {
}
+ - Return [ string ]
}
}
}
diff --git a/php-pecl-bitset.spec b/php-pecl-bitset.spec
index 5710d7c..b3ed613 100644
--- a/php-pecl-bitset.spec
+++ b/php-pecl-bitset.spec
@@ -1,29 +1,37 @@
# remirepo spec file for php-pecl-bitset
#
-# Copyright (c) 2014-2018 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2014-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%{?scl: %scl_package php-pecl-bitset}
+# Defined in Fedora >= 37 and RHEL >= 10, in PHP >= 7.4 for remirepo
+%{!?__phpize: %global __phpize %{_bindir}/phpize}
+%{!?__ztsphpize: %global __ztsphpize %{_bindir}/zts-phpize}
+%{!?__phpconfig: %global __phpconfig %{_bindir}/php-config}
+%{!?__ztsphpconfig:%global __ztsphpconfig %{_bindir}/zts-php-config}
+
+%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
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
-Summary: BITSET library
+Summary: BITSET extension
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 3.0.1
+Version: 3.2.0
Release: 3%{?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
+License: PHP-3.01
+URL: https://pecl.php.net/package/%{pecl_name}
+Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+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,61 +42,25 @@ 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
-Obsoletes: php53-pecl-%{pecl_name} <= %{version}
-Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.2"
-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: php73w-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
-Bitsets manipulation library.
+The BitSet extension assists by providing a mechanism to manage sets of bits.
+
+This provides a similar API (object-based) to java.util.BitSet with some
+PHP-specific flavoring.
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
%prep
%setup -q -c
-mv %{pecl_name}-%{version} NTS
-
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
-
+cd %{sources}
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_BITSET_VERSION/{s/.* "//;s/".*$//;p}' php_bitset.h)
if test "x${extver}" != "x%{version}"; then
@@ -97,9 +69,9 @@ if test "x${extver}" != "x%{version}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
-# Duplicate source tree for NTS / ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Create configuration file
@@ -112,17 +84,18 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
- --with-php-config=%{_bindir}/php-config
+ --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
- --with-php-config=%{_bindir}/zts-php-config
+ --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -146,7 +119,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
@@ -171,41 +144,38 @@ fi
%check
-cd NTS
+cd %{sources}
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --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" \
-NO_INTERACTION=1 \
+TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{__php} -n run-tests.php --show-diff
+%{__php} -n run-tests.php -q --show-diff
%endif
%if %{with_zts}
-cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
- --modules | grep %{pecl_name}
+ --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" \
-NO_INTERACTION=1 \
+TEST_PHP_EXECUTABLE=%{__ztsphp} \
+TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
-%{_bindir}/zts-php -n run-tests.php --show-diff
+%{__ztsphp} -n run-tests.php -q --show-diff
%endif
%endif
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -219,6 +189,30 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 3.2.0-3
+- rebuild for PHP 8.3.0RC1
+
+* Fri May 26 2023 Remi Collet <remi@remirepo.net> - 3.2.0-2
+- build out of sources tree
+- improve description
+
+* Fri May 26 2023 Remi Collet <remi@remirepo.net> - 3.2.0-1
+- update to 3.2.0
+
+* Thu May 25 2023 Remi Collet <remi@remirepo.net> - 3.1.0-1
+- update to 3.1.0
+- drop patch merged upstream
+
+* 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
+
+* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 3.0.1-4
+- rebuild for 7.4.0RC1
+
* Thu Aug 16 2018 Remi Collet <remi@remirepo.net> - 3.0.1-3
- rebuild for 7.3.0beta2 new ABI