diff options
Diffstat (limited to 'php-pecl-ds.spec')
-rw-r--r-- | php-pecl-ds.spec | 112 |
1 files changed, 53 insertions, 59 deletions
diff --git a/php-pecl-ds.spec b/php-pecl-ds.spec index a130037..b9156b5 100644 --- a/php-pecl-ds.spec +++ b/php-pecl-ds.spec @@ -1,18 +1,14 @@ # remirepo spec file for php-pecl-ds # -# Copyright (c) 2016-2020 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2016-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -# we don't want -z defs linker flag -%undefine _strict_symbol_defs_build - %if 0%{?scl:1} %scl_package php-pecl-ds -%global sub_prefix %{scl_prefix} # No phpunit in SCL %bcond_with tests %else @@ -23,34 +19,36 @@ %global pecl_name ds # After json %global ini_name 40-%{pecl_name}.ini +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure # For test suite, see https://github.com/php-ds/tests/commits/master -%global gh_commit 5323dffd6130d733b308e53cc8017eb41d278f3a +# version 1.5.1 +%global gh_commit 3d14aa6f8c25d38d79c90924150c51636544e4a8 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner php-ds %global gh_project tests Summary: Data Structures for PHP -Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.3.0 -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Name: %{?scl_prefix}php-pecl-%{pecl_name} +Version: 1.5.0 +Release: 1%{?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}-%{version}.tgz # Only use for tests during the build, no value to be packaged separately -# in composer.json: "require-dev": { "php-ds/tests": "dev-master" } +# in composer.json: "require-dev": { "php-ds/tests": "^1.5.0" } Source1: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{gh_short}.tar.gz -Patch0: 0001-fix-missing-return-after-exception.patch - +BuildRequires: make BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel >= 7 +BuildRequires: %{?scl_prefix}php-devel >= 7.4 BuildRequires: %{?scl_prefix}php-pear BuildRequires: %{?scl_prefix}php-gmp BuildRequires: %{?scl_prefix}php-json %if %{with tests} -BuildRequires: %{_bindir}/phpunit6 +BuildRequires: %{_bindir}/phpunit9 BuildRequires: %{_bindir}/phpab %endif #BuildRequires: php-debuginfo @@ -59,34 +57,11 @@ BuildRequires: %{_bindir}/phpab Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} Requires: %{?scl_prefix}php-json%{?_isa} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} 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} -%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 @@ -98,15 +73,12 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -c -a 1 -mv %{pecl_name}-%{version} NTS mv %{gh_project}-%{gh_commit} tests # Don't install/register tests, install examples as doc %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} -cd NTS -%patch0 -p1 - +cd %{sources} # Sanity check, really often broken extver=$(sed -n '/#define PHP_DS_VERSION/{s/.* "//;s/".*$//;p}' php_ds.h) if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then @@ -115,9 +87,9 @@ if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; 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 @@ -138,14 +110,15 @@ peclbuild() { make %{?_smp_mflags} } -cd NTS -%{_bindir}/phpize -peclbuild %{_bindir}/php-config +cd %{sources} +%{__phpize} + +cd ../NTS +peclbuild %{__phpconfig} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize -peclbuild %{_bindir}/zts-php-config +peclbuild %{__ztsphpconfig} %endif @@ -170,7 +143,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 @@ -195,24 +168,21 @@ fi %check -modules="-d extension=json.so" +[ -f %{php_extdir}/json.so ] && modules="-d extension=json.so" -cd NTS : Minimal load test for NTS extension %{__php} --no-php-ini \ $modules \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' %if %{with_zts} -cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ $modules \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ - --modules | grep %{pecl_name} + --modules | grep '^%{pecl_name}$' %endif -cd .. %if %{with tests} : Generate autoloader for tests @@ -223,14 +193,15 @@ cd .. : Run upstream test suite %{_bindir}/php \ -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ - %{_bindir}/phpunit6 \ + %{_bindir}/phpunit9 \ + --do-not-cache-result \ --bootstrap tests/autoload.php \ - tests + --verbose tests %endif %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %{!?_licensedir:%doc %{pecl_docdir}/%{pecl_name}} %{pecl_xmldir}/%{name}.xml @@ -244,6 +215,29 @@ cd .. %changelog +* Wed Dec 20 2023 Remi Collet <remi@remirepo.net> - 1.5.0-1 +- update to 1.5.0 + +* Wed Aug 30 2023 Remi Collet <remi@remirepo.net> - 1.4.0-3 +- rebuild for PHP 8.3.0RC1 + +* Wed Jul 12 2023 Remi Collet <remi@remirepo.net> - 1.4.0-2 +- build out of sources tree +- add upstream patch for PHP 8.3 + +* Tue Dec 14 2021 Remi Collet <remi@remirepo.net> - 1.4.0-1 +- update to 1.4.0 +- raise dependency on PHP 7.3 +- drop all patches merged upstream +- switch to phpunit8 + +* Wed Nov 3 2021 Remi Collet <remi@remirepo.net> - 1.3.0-6 +- add patches for PHP 8.1 from upstream and from + https://github.com/php-ds/ext-ds/pull/187 + +* Fri Mar 26 2021 Remi Collet <remi@remirepo.net> - 1.3.0-4 +- switch to phpunit7 + * Tue Nov 3 2020 Remi Collet <remi@remirepo.net> - 1.3.0-2 - fix segfault using patch from https://github.com/php-ds/ext-ds/pull/165 |