diff options
author | Remi Collet <remi@remirepo.net> | 2019-04-04 10:55:31 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-04-04 10:55:31 +0200 |
commit | 30f9308eea9cad19d8c9a29f57133bde56e531d2 (patch) | |
tree | 94a7a5e73f823a31eb89281acfda1b7b052acbc3 | |
parent | 491417d849631394289cf4e410f488728867411c (diff) |
add patch from https://github.com/theseer/tokenizer/pull/4
and use phpunit7 with 7.1
-rw-r--r-- | php-theseer-tokenizer.spec | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/php-theseer-tokenizer.spec b/php-theseer-tokenizer.spec index 5037b68..38c80c0 100644 --- a/php-theseer-tokenizer.spec +++ b/php-theseer-tokenizer.spec @@ -15,16 +15,18 @@ Name: php-%{gh_vendor}-%{gh_project} Version: 1.1.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library for converting tokenized PHP source code into XML License: BSD URL: https://github.com/%{gh_vendor}/%{gh_project} Source0: https://github.com/%{gh_vendor}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{?gh_short}.tar.gz +Patch0: https://patch-diff.githubusercontent.com/raw/theseer/tokenizer/pull/4.patch + BuildArch: noarch -# Because of phpunit8 -BuildRequires: php(language) >= 7.2 +# Because test suite use "void" introduce in 7.1 +BuildRequires: php(language) >= 7.1 BuildRequires: php-xmlwriter BuildRequires: php-dom BuildRequires: php-tokenizer @@ -33,7 +35,14 @@ BuildRequires: php-spl # Autoloader BuildRequires: php-fedora-autoloader-devel >= 1.0.0 # Tests -BuildRequires: phpunit8 +# remirepo:1 +%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8 +%global phpunit %{_bindir}/phpunit8 +# remirepo:3 +%else +%global phpunit %{_bindir}/phpunit7 +%endif +BuildRequires: %{phpunit} # From composer.json, "require": { # "php": "^7.0", @@ -61,6 +70,7 @@ Autoloader: %{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 -b .pr4 %build @@ -75,11 +85,12 @@ cp -pr src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project} %check ret=0 -for cmd in php php72 php73; do - if which $cmd; then - $cmd %{_bindir}/phpunit8 \ - --bootstrap %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php \ - --no-coverage --verbose || ret=1 +for cmdarg in "php %{phpunit}" "php71 %{_bindir}/phpunit7" php72 php73; do + if which $cmdarg; then + set $cmdarg + $1 -d auto_prepend_file=%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php \ + ${2:-%{_bindir}/phpunit8} \ + --no-coverage --verbose || ret=1 fi done exit $ret @@ -95,6 +106,10 @@ exit $ret %changelog +* Thu Apr 4 2019 Remi Collet <remi@remirepo.net> - 1.1.1-2 +- add patch from https://github.com/theseer/tokenizer/pull/4 + and use phpunit7 with 7.1 + * Thu Apr 4 2019 Remi Collet <remi@remirepo.net> - 1.1.1-1 - update to 1.1.1 - use phpunit8 |