From 331318eec97f7d3465e57ecb5cc1960fbf195e3f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Nov 13 2023 07:40:51 +0000 Subject: update to 1.1.1 build out of sources tree --- diff --git a/.gitignore b/.gitignore index e55034e..2ae8936 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ clog /ast-1.0.14.tgz /ast-1.0.16.tgz /ast-1.1.0.tgz +/ast-1.1.1.tgz diff --git a/php-ast.spec b/php-ast.spec index 1f8608c..3fcb8dc 100644 --- a/php-ast.spec +++ b/php-ast.spec @@ -17,14 +17,16 @@ %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} # After 20-tokenizer.ini %global ini_name 40-%{pecl_name}.ini +%global sources %{pecl_name}-%{version} +%global _configure ../%{sources}/configure Summary: Abstract Syntax Tree Name: php-ast -Version: 1.1.0 -Release: 6%{?dist} +Version: 1.1.1 +Release: 1%{?dist} License: BSD-3-Clause URL: https://pecl.php.net/package/ast -Source0: httpd://pecl.php.net/get/%{pecl_name}-%{version}.tgz +Source0: httpd://pecl.php.net/get/%{sources}.tgz BuildRequires: make BuildRequires: gcc @@ -49,15 +51,13 @@ This extension exposes the abstract syntax tree generated by PHP 7. %prep %setup -qc -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_AST_VERSION/{s/.* "//;s/".*$//;p}' php_ast.h) if test "x${extver}" != "x%{version}"; then @@ -66,10 +66,7 @@ if test "x${extver}" != "x%{version}"; then fi cd .. -%if %{with_zts} -# duplicate for ZTS build -cp -pr NTS ZTS -%endif +mkdir NTS ZTS # Drop in the bit of configuration cat << 'EOF' | tee %{ini_name} @@ -79,18 +76,19 @@ EOF %build -cd NTS -%{_bindir}/phpize +cd %{sources} +%{__phpize} + +cd ../NTS %configure \ - --with-php-config=%{_bindir}/php-config \ + --with-php-config=%{__phpconfig} \ --enable-ast make %{?_smp_mflags} %if %{with_zts} cd ../ZTS -%{_bindir}/zts-phpize %configure \ - --with-php-config=%{_bindir}/zts-php-config \ + --with-php-config=%{__ztsphpconfig} \ --enable-ast make %{?_smp_mflags} %endif @@ -112,20 +110,12 @@ 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 %check -VER=$(%{__php} -r 'echo PHP_VERSION_ID;') -if [ $VER -ge 80000 ]; then - rm ?TS/tests/attributes_02.phpt - rm ?TS/tests/class_consts_80.phpt - rm ?TS/tests/php81_enums.phpt - rm ?TS/tests/php81_final_class_const.phpt -fi - -cd NTS +cd %{sources} : Minimal load test for NTS extension %{__php} --no-php-ini \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ @@ -136,7 +126,6 @@ TEST_PHP_ARGS="-n -d extension=tokenizer.so -d extension=%{buildroot}%{php_extdi %{__php} -n run-tests.php -q --show-diff %{?_smp_mflags} %if %{with_zts} -cd ../ZTS : Minimal load test for ZTS extension %{__ztsphp} --no-php-ini \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ @@ -149,7 +138,7 @@ TEST_PHP_ARGS="-n -d extension=tokenizer.so -d extension=%{buildroot}%{php_ztsex %files -%license NTS/LICENSE +%license %{sources}/LICENSE %doc %{pecl_docdir}/%{pecl_name} %{pecl_xmldir}/%{name}.xml @@ -163,6 +152,10 @@ TEST_PHP_ARGS="-n -d extension=tokenizer.so -d extension=%{buildroot}%{php_ztsex %changelog +* Mon Nov 13 2023 Remi Collet - 1.1.1-1 +- update to 1.1.1 +- build out of sources tree + * Tue Oct 03 2023 Remi Collet - 1.1.0-6 - rebuild for https://fedoraproject.org/wiki/Changes/php83 - ignore 4 test failing with 8.3 diff --git a/sources b/sources index 46cc55a..2ca2845 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ast-1.1.0.tgz) = 9049a6f1f3312c9efc68dd4f4e324bd9c2fbc2c97d1e9aecf1f808f91002bf5cfc20247560b288cc6581f2651d9419470e349713680da64d26a8eba77c8eac64 +SHA512 (ast-1.1.1.tgz) = a5ae79b4ad4976f2447b94ebc5d3e2d6044ade36c73695ab7f3324963c175a3288d75361e930133232191e8141009d6c0ca8cabfafa143c5dd2282102834eeab