diff --git a/.gitignore b/.gitignore index 9aae347..8fba7d3 100644 --- a/.gitignore +++ b/.gitignore @@ -17,17 +17,3 @@ clog /php-nikic-php-parser4-4.12.0-6608f01.tgz /php-nikic-php-parser4-4.13.0-50953a2.tgz /php-nikic-php-parser4-4.13.1-63a79e8.tgz -/php-nikic-php-parser4-4.13.2-210577f.tgz -/php-nikic-php-parser4-4.14.0-34bea19.tgz -/php-nikic-php-parser4-4.15.1-0ef6c55.tgz -/php-nikic-php-parser4-4.15.2-f59bbe4.tgz -/php-nikic-php-parser4-4.15.3-570e980.tgz -/php-nikic-php-parser4-4.15.4-6bb5176.tgz -/php-nikic-php-parser4-4.15.5-11e2663.tgz -/php-nikic-php-parser4-4.16.0-19526a3.tgz -/php-nikic-php-parser4-4.17.1-a6303e5.tgz -/php-nikic-php-parser4-4.18.0-1bcbb21.tgz -/php-nikic-php-parser4-4.19.1-4e1b88d.tgz -/php-nikic-php-parser4-4.19.2-0ed4c89.tgz -/php-nikic-php-parser4-4.19.4-715f4d2.tgz -/php-nikic-php-parser4-4.19.5-51bd93c.tgz diff --git a/php-nikic-php-parser4.spec b/php-nikic-php-parser4.spec index 5658e8c..9af60e1 100644 --- a/php-nikic-php-parser4.spec +++ b/php-nikic-php-parser4.spec @@ -1,35 +1,31 @@ # remirepo/fedora spec file for php-nikic-php-parser4 # -# SPDX-FileCopyrightText: Copyright 2016-2025 Remi Collet -# SPDX-License-Identifier: CECILL-2.1 -# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +# Copyright (c) 2016-2021 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # +# For compatibility with SCL +%undefine __brp_mangle_shebangs -%if 0%{?fedora} -%bcond_without tests -%else -# disabled as phpunit not availble -%bcond_with tests -%endif - -%global gh_commit 51bd93cc741b7fc3d63d20b6bdcd99fdaa359837 +%global gh_commit 63a79e8daa781cac14e5195e63ed8ae231dd10fd %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner nikic %global gh_project PHP-Parser %global pk_project php-parser %global php_home %{_datadir}/php %global ns_project PhpParser +%global with_tests 0%{!?_without_tests:1} %global major 4 Name: php-%{gh_owner}-%{pk_project}%{major} -Version: 4.19.5 +Version: 4.13.1 Release: 1%{?dist} Summary: A PHP parser written in PHP - version %{major} -License: BSD-3-Clause +License: BSD URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh @@ -38,7 +34,7 @@ Source1: makesrc.sh Patch0: %{name}-rpm.patch BuildArch: noarch -%if %{with tests} +%if %{with_tests} # For tests # as we use phpunit9 BuildRequires: php(language) >= 7.3 @@ -49,18 +45,18 @@ BuildRequires: php-json BuildRequires: php-pcre BuildRequires: php-spl # From composer.json, "require-dev": { -# "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", +# "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0", # "ircmaxell/php-yacc": "0.0.7" %global phpunit %{_bindir}/phpunit9 BuildRequires: phpunit9 # Autoloader -%endif BuildRequires: php-fedora-autoloader-devel +%endif # From composer.json, "require": { -# "php": ">=7.1", +# "php": ">=7.0", # "ext-tokenizer": "*" -Requires: php(language) >= 7.1 +Requires: php(language) >= 7.0 Requires: php-tokenizer # From phpcompatinfo report for version 4.0.0 Requires: php-reflection @@ -76,7 +72,7 @@ Provides: php-composer(%{gh_owner}/%{pk_project}) = %{version} %description -This is a PHP parser written in PHP. +This is a PHP 5.2 to PHP 7.4 parser written in PHP. Its purpose is to simplify static code analysis and manipulation. This package provides the library version %{major} and the php-parse%{major} command. @@ -89,7 +85,7 @@ Autoloader: %{php_home}/%{ns_project}%{major}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch -P0 -p1 -b .rpm +%patch0 -p1 -b .rpm %build @@ -109,7 +105,7 @@ install -Dpm 0755 bin/php-parse %{buildroot}%{_bindir}/php-parse%{major} %check -%if %{with tests} +%if %{with_tests} : Test the command sed -e 's:%{php_home}:%{buildroot}%{php_home}:' \ bin/php-parse > bin/php-parse-test @@ -123,10 +119,16 @@ cat << 'AUTOLOAD' | tee vendor/autoload.php AUTOLOAD : Upstream test suite -FILTER="--filter '^((?!(testLexNewFeatures)).)*$'" +BITS=$(php -r 'echo PHP_INT_SIZE;') +if [ $BITS -lt 8 ]; then + # ignore test failing on 32-bit (in koji) + FILTER="--filter '^((?!(testParse|testLexNewFeatures)).)*$'" +else + FILTER="" +fi ret=0 -for cmdarg in "php %{phpunit}" php81 php82 php83 php84 php85; do +for cmdarg in "php %{phpunit}" php73 php74 php80 php81; do if which $cmdarg; then set $cmdarg $1 -d include_path=%{php_home} \ @@ -149,80 +151,6 @@ exit $ret %changelog -* Tue Dec 9 2025 Remi Collet - 4.19.5-1 -- update to 4.19.5 -- re-license spec file to CECILL-2.1 - -* Fri Jul 25 2025 Fedora Release Engineering - 4.19.4-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sat Jan 18 2025 Fedora Release Engineering - 4.19.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Mon Sep 30 2024 Remi Collet - 4.19.4-1 -- update to 4.19.4 - -* Wed Sep 18 2024 Remi Collet - 4.19.2-1 -- update to 4.19.2 - -* Fri Jul 19 2024 Fedora Release Engineering - 4.19.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Tue Mar 19 2024 Remi Collet - 4.19.1-1 -- update to 4.19.1 -- raise dependency on PHP 7.1 - -* Thu Jan 25 2024 Fedora Release Engineering - 4.18.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 4.18.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Mon Dec 11 2023 Remi Collet - 4.18.0-1 -- update to 4.18.0 - -* Fri Aug 18 2023 Remi Collet - 4.17.1-1 -- update to 4.17.1 - -* Fri Jul 21 2023 Fedora Release Engineering - 4.16.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Mon Jun 26 2023 Remi Collet - 4.16.0-1 -- update to 4.16.0 - -* Wed May 24 2023 Remi Collet - 4.15.5-1 -- update to 4.15.5 - -* Mon Mar 6 2023 Remi Collet - 4.15.4-1 -- update to 4.15.4 - -* Fri Jan 20 2023 Fedora Release Engineering - 4.15.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Tue Jan 17 2023 Remi Collet - 4.15.3-1 -- update to 4.15.3 - -* Mon Nov 14 2022 Remi Collet - 4.15.2-1 -- update to 4.15.2 - -* Thu Sep 8 2022 Remi Collet - 4.15.1-1 -- update to 4.15.1 - -* Fri Jul 22 2022 Fedora Release Engineering - 4.14.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Mon Jun 13 2022 Remi Collet - 4.14.0-2 -- only run test suite on Fedora, not on EL - -* Wed Jun 1 2022 Remi Collet - 4.14.0-1 -- update to 4.14.0 - -* Fri Jan 21 2022 Fedora Release Engineering - 4.13.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Wed Dec 1 2021 Remi Collet - 4.13.2-1 -- update to 4.13.2 - * Thu Nov 4 2021 Remi Collet - 4.13.1-1 - update to 4.13.1 @@ -239,9 +167,6 @@ exit $ret * Tue May 4 2021 Remi Collet - 4.10.5-1 - update to 4.10.5 -* Wed Jan 27 2021 Fedora Release Engineering - 4.10.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - * Mon Dec 21 2020 Remi Collet - 4.10.4-1 - update to 4.10.4 diff --git a/sources b/sources index 619d1c0..bb9cd5e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-nikic-php-parser4-4.19.5-51bd93c.tgz) = 739cb8134ca83bfaeb8189dc40ef7603e2c7c7813d28841b279306f6e2d3f77910eb5033aae0c2bad0f38d0dc6490953cc3518bf433c4f99cecf2007c10d17cc +SHA512 (php-nikic-php-parser4-4.13.1-63a79e8.tgz) = 05e20b26e2e0d9f149ef431e095d06e51d31370ef095f6fcdfb3b6855098e175d4963695774d6858a7d64765f1046718997ce29068c12a18173905d3712cc471