From 9b1730775bbf2ad31c4b1b21ffc7dcc90a089bdf Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 30 Aug 2023 07:58:13 +0200 Subject: rebuild for PHP 8.3.0RC1 --- php-pecl-apcu.spec | 84 +++++++++++++++++++++++++++--------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'php-pecl-apcu.spec') diff --git a/php-pecl-apcu.spec b/php-pecl-apcu.spec index 2564130..4a0b799 100644 --- a/php-pecl-apcu.spec +++ b/php-pecl-apcu.spec @@ -3,8 +3,8 @@ # # Fedora spec file for php-pecl-apcu # -# Copyright (c) 2013-2022 Remi Collet -# License: CC-BY-SA +# Copyright (c) 2013-2023 Remi Collet +# License: CC-BY-SA-4.0 # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries @@ -13,9 +13,7 @@ # we don't want -z defs linker flag %undefine _strict_symbol_defs_build -%if 0%{?scl:1} -%scl_package php-pecl-apcu -%endif +%{?scl:%scl_package php-pecl-apcu} %bcond_without tests @@ -23,27 +21,26 @@ %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner krakjoe %global gh_project apcu -#global gh_date 20161018 %global pecl_name apcu %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Name: %{?scl_prefix}php-pecl-apcu Summary: APC User Cache Version: 5.1.22 -License: PHP +License: PHP-3.01 URL: https://pecl.php.net/package/APCu -%if 0%{?gh_date:1} -Release: 0.9.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} -Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{version}-%{gh_short}.tar.gz -%else -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz -%endif Source1: %{pecl_name}-5.1.19.ini Source2: %{pecl_name}-panel.conf Source3: %{pecl_name}.conf.php +Patch0: %{pecl_name}-php83.patch +Patch1: %{pecl_name}-tests.patch + BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 @@ -51,7 +48,6 @@ BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} -%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} Obsoletes: %{?scl_prefix}php-apcu < 4.0.0-1 Provides: %{?scl_prefix}php-apcu = %{version} @@ -134,33 +130,29 @@ configuration, available on http://localhost/apcu-panel/ %prep %setup -qc -%if 0%{?gh_date:1} -mv %{gh_project}-%{gh_commit} NTS -mv NTS/package.xml . -%else -mv %{pecl_name}-%{version} NTS -%endif - %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} -cd NTS +cd %{sources} +%patch -P0 -p1 -b.php83 +%patch -P1 -p1 -b.pr490 + # Sanity check, really often broken extver=$(sed -n '/#define PHP_APCU_VERSION/{s/.* "//;s/".*$//;p}' php_apc.h) -if test "x${extver}" != "x%{version}%{?prever}%{?gh_date:-dev}"; then - : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever}%{?gh_date:-dev}. +if test "x${extver}" != "x%{version}%{?prever}"; then + : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever}. exit 1 fi cd .. +mkdir NTS %if %{with_zts} -# duplicate for ZTS build -cp -pr NTS ZTS +mkdir ZTS %endif %if 0%{!?scl:1} # Fix path to configuration file sed -e s:apc.conf.php:%{_sysconfdir}/apcu-panel/conf.php:g \ - -i NTS/apc.php + -i %{sources}/apc.php %else # Provide the control panel as doc sed -e '/"apc.php"/s/role="src"/role="doc"/' -i package.xml @@ -169,19 +161,20 @@ sed -e '/"apc.php"/s/role="src"/role="doc"/' -i package.xml %build %{?dtsenable} -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS %configure \ --enable-apcu \ - --with-php-config=%{_bindir}/php-config + --with-php-config=%{__phpconfig} make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ --enable-apcu \ - --with-php-config=%{_bindir}/zts-php-config + --with-php-config=%{__ztsphpconfig} make %{?_smp_mflags} %endif @@ -205,7 +198,7 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %if 0%{!?scl:1} # Install the Control Panel # Pages -install -D -m 644 -p NTS/apc.php \ +install -D -m 644 -p %{sources}/apc.php \ %{buildroot}%{_datadir}/apcu-panel/index.php # Apache config install -D -m 644 -p %{SOURCE2} \ @@ -217,7 +210,7 @@ install -D -m 644 -p %{SOURCE3} \ # Test & Documentation -cd NTS +cd %{sources} for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') do [ -f $i ] && install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i [ -f tests/$i ] && install -Dpm 644 tests/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/tests/$i @@ -228,22 +221,21 @@ done %check -cd NTS +cd %{sources} + %{_bindir}/php -n \ -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ -m | grep 'apcu' %if %{with tests} # Upstream test suite for NTS extension -TEST_PHP_EXECUTABLE=%{_bindir}/php \ +TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ -NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ -%{_bindir}/php -n run-tests.php --show-diff +%{__php} -n run-tests.php -q --show-diff %endif %if %{with_zts} -cd ../ZTS %{__ztsphp} -n \ -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ -m | grep 'apcu' @@ -252,9 +244,8 @@ cd ../ZTS # Upstream test suite for ZTS extension TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \ -NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ -%{__ztsphp} -n run-tests.php --show-diff +%{__ztsphp} -n run-tests.php -q --show-diff %endif %endif @@ -280,7 +271,7 @@ fi %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE} %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -313,6 +304,15 @@ fi %changelog +* Wed Aug 30 2023 Remi Collet - 5.1.22-3 +- rebuild for PHP 8.3.0RC1 + +* Tue Jun 6 2023 Remi Collet - 5.1.22-2 +- build out of sources tree +- add upstream patch for 8.3 +- add patch for tests when build out of sources tree from + https://github.com/krakjoe/apcu/pull/490 + * Mon Sep 19 2022 Remi Collet - 5.1.22-1 - update to 5.1.22 -- cgit