summaryrefslogtreecommitdiffstats
path: root/psysh.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-12-02 10:40:39 +0100
committerRemi Collet <remi@remirepo.net>2019-12-02 10:40:39 +0100
commite7630ddfbf6436e505ecb8c06796e87aff8d4eb6 (patch)
tree225000ddf9d64cb0e7fd43c5e8a516cf98ca79bf /psysh.spec
parent40f893c45bdb965a1f30c252272321527831ebc7 (diff)
v0.9.11 from Fedora
Diffstat (limited to 'psysh.spec')
-rw-r--r--psysh.spec94
1 files changed, 45 insertions, 49 deletions
diff --git a/psysh.spec b/psysh.spec
index 46305a4..a01ca5b 100644
--- a/psysh.spec
+++ b/psysh.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for psysh
#
-# Copyright (c) 2016-2017 Shawn Iwinski <shawn@iwin.ski>
+# Copyright (c) 2016-2019 Shawn Iwinski <shawn@iwin.ski>
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,31 +12,30 @@
%global github_owner bobthecow
%global github_name psysh
-%global github_version 0.8.16
-%global github_commit d4c8eab0683dc056f2ca54ca67f5388527c068b1
+%global github_version 0.9.11
+%global github_commit 75d9ac1c16db676de27ab554a4152b594be4748e
%global composer_vendor psy
%global composer_project psysh
-# "php": ">=5.3.9"
-%global php_min_ver 5.3.9
+# "php": ">=5.4.0"
+%global php_min_ver 5.4.0
# "dnoegel/php-xdg-base-dir": "0.1"
%global php_xdg_base_dir_min_ver 0.1
%global php_xdg_base_dir_max_ver 0.2
-# "jakub-onderka/php-console-highlighter": "0.3.*"
+# "jakub-onderka/php-console-highlighter": "0.3.*|0.4.*"
%global php_console_highlighter_min_ver 0.3.0
-%global php_console_highlighter_max_ver 0.4.0
-# "nikic/php-parser": "~1.3|~2.0|~3.0"
+%global php_console_highlighter_max_ver 0.5.0
+# "nikic/php-parser": "~1.3|~2.0|~3.0|~4.0"
# NOTE: Min version not 1.2.1 to force 2.x so 1.x is not
# a dependency so it could possibly be retired
%global php_parser_min_ver 2.0
-%global php_parser_max_ver 4.0
-# "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0"
-# "symfony/finder": "~2.1|~3.0|~4.0"
-# "symfony/var-dumper": "~2.7|~3.0|~4.0"
+%global php_parser_max_ver 5.0
+# "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0|~5.0"
+# "symfony/var-dumper": "~2.7|~3.0|~4.0|~5.0"
# NOTE: Min version not 2.7.0 because autoloader required
%global symfony_min_ver 2.7.1
-%global symfony_max_ver 5.0
+%global symfony_max_ver 6.0
# Build using "--without tests" to disable tests
%global with_tests 0%{!?_without_tests:1}
@@ -48,7 +47,6 @@ Version: %{github_version}
Release: 1%{?github_release}%{?dist}
Summary: A runtime developer console, interactive debugger and REPL for PHP
-Group: Development/Libraries
License: MIT
URL: http://psysh.org
Source0: https://github.com/%{github_owner}/%{github_name}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
@@ -69,32 +67,29 @@ BuildRequires: php-composer(jakub-onderka/php-console-highlighter) < %{php_cons
BuildRequires: php-composer(jakub-onderka/php-console-highlighter) >= %{php_console_highlighter_min_ver}
BuildRequires: php-composer(nikic/php-parser) < %{php_parser_max_ver}
BuildRequires: php-composer(nikic/php-parser) >= %{php_parser_min_ver}
-%if 0%{?fedora} >= 26
+%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8
BuildRequires: php-composer(symfony/console) < %{symfony_max_ver}
BuildRequires: php-composer(symfony/console) >= %{symfony_min_ver}
-BuildRequires: php-composer(symfony/finder) < %{symfony_max_ver}
-BuildRequires: php-composer(symfony/finder) >= %{symfony_min_ver}
BuildRequires: php-composer(symfony/var-dumper) < %{symfony_max_ver}
BuildRequires: php-composer(symfony/var-dumper) >= %{symfony_min_ver}
%else
BuildRequires: php-symfony3-console
-BuildRequires: php-symfony3-finder
BuildRequires: php-symfony3-var-dumper
%endif
+BuildRequires: php-json
+BuildRequires: php-tokenizer
## composer.json: optional
BuildRequires: php-pcntl
BuildRequires: php-posix
BuildRequires: php-readline
-## phpcompatinfo (computed from version 0.8.16)
-BuildRequires: php-ctype
+BuildRequires: php-sqlite3
+## phpcompatinfo (computed from version 0.9.11)
BuildRequires: php-date
BuildRequires: php-dom
-BuildRequires: php-json
BuildRequires: php-pcre
BuildRequires: php-pdo
BuildRequires: php-reflection
BuildRequires: php-spl
-BuildRequires: php-tokenizer
## Autoloader
BuildRequires: php-composer(fedora/autoloader)
%endif
@@ -108,7 +103,7 @@ Requires: php-composer(jakub-onderka/php-console-highlighter) < %{php_cons
Requires: php-composer(jakub-onderka/php-console-highlighter) >= %{php_console_highlighter_min_ver}
Requires: php-composer(nikic/php-parser) < %{php_parser_max_ver}
Requires: php-composer(nikic/php-parser) >= %{php_parser_min_ver}
-%if 0%{?fedora} >= 26
+%if 0%{?fedora} >= 26 || 0%{?rhel} >= 8
Requires: php-composer(symfony/console) < %{symfony_max_ver}
Requires: php-composer(symfony/console) >= %{symfony_min_ver}
Requires: php-composer(symfony/var-dumper) < %{symfony_max_ver}
@@ -117,19 +112,19 @@ Requires: php-composer(symfony/var-dumper) >= %{symfony_min_ver}
Requires: php-symfony3-console
Requires: php-symfony3-var-dumper
%endif
+Requires: php-json
+Requires: php-tokenizer
# composer.json: optional
Requires: php-pcntl
Requires: php-posix
Requires: php-readline
-# phpcompatinfo (computed from version 0.8.16)
-Requires: php-ctype
+Requires: php-sqlite3
+# phpcompatinfo (computed from version 0.9.11)
Requires: php-date
-Requires: php-json
Requires: php-pcre
Requires: php-pdo
Requires: php-reflection
Requires: php-spl
-Requires: php-tokenizer
# Autoloader
Requires: php-composer(fedora/autoloader)
@@ -151,13 +146,10 @@ Autoloader: %{phpdir}/Psy/autoload.php
%patch0 -p1
sed 's#__PHPDIR__#%{phpdir}#' -i bin/psysh
-: Remove upstream autoloader class and test
-rm -f src/Psy/Autoloader.php test/Psy/Test/AutoloaderTest.php
-
%build
: Create autoloader
-cat <<'AUTOLOAD' | tee src/Psy/autoload.php
+cat <<'AUTOLOAD' | tee src/autoload.php
<?php
/**
* Autoloader for %{name} and its' dependencies
@@ -168,31 +160,34 @@ require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Psy\\', __DIR__);
require_once __DIR__.'/functions.php';
-\Fedora\Autoloader\Dependencies::required(array(
+\Fedora\Autoloader\Dependencies::required([
'%{phpdir}/JakubOnderka/PhpConsoleHighlighter/autoload.php',
- array(
+ '%{phpdir}/XdgBaseDir/autoload.php',
+ [
+ '%{phpdir}/Symfony5/Component/Console/autoload.php',
'%{phpdir}/Symfony4/Component/Console/autoload.php',
'%{phpdir}/Symfony3/Component/Console/autoload.php',
'%{phpdir}/Symfony/Component/Console/autoload.php',
- ),
- array(
+ ],
+ [
+ '%{phpdir}/Symfony5/Component/VarDumper/autoload.php',
'%{phpdir}/Symfony4/Component/VarDumper/autoload.php',
'%{phpdir}/Symfony3/Component/VarDumper/autoload.php',
'%{phpdir}/Symfony/Component/VarDumper/autoload.php',
- ),
- '%{phpdir}/XdgBaseDir/autoload.php',
- array(
+ ],
+ [
+ '%{phpdir}/PhpParser4/autoload.php',
'%{phpdir}/PhpParser3/autoload.php',
'%{phpdir}/PhpParser2/autoload.php',
- ),
-));
+ ],
+]);
AUTOLOAD
%install
: Library
mkdir -p %{buildroot}%{phpdir}
-cp -rp src/* %{buildroot}%{phpdir}/
+cp -rp src %{buildroot}%{phpdir}/Psy
: Bin
mkdir -p %{buildroot}%{_bindir}
@@ -205,28 +200,26 @@ install -pm 0755 bin/psysh %{buildroot}%{_bindir}/
cat <<'BOOTSTRAP' | tee bootstrap.php
<?php
require '%{buildroot}%{phpdir}/Psy/autoload.php';
-\Fedora\Autoloader\Autoload::addPsr4('Psy\\Test\\', __DIR__.'/test/Psy/Test');
+\Fedora\Autoloader\Autoload::addPsr4('Psy\\Test\\', __DIR__.'/test');
BOOTSTRAP
: Skip tests known to fail
-sed '/exit\(\).*die;/d' -i test/Psy/Test/CodeCleaner/ImplicitReturnPassTest.php
-sed '/foo.*return/d' -i test/Psy/Test/CodeCleanerTest.php
sed 's/function testFilesAndDirectories/function SKIP_testFilesAndDirectories/' \
- -i test/Psy/Test/ConfigurationTest.php
+ -i test/ConfigurationTest.php
: Skip tests known to fail in a mock env
sed 's/function testFormat/function SKIP_testFormat/' \
- -i test/Psy/Test/Formatter/CodeFormatterTest.php
+ -i test/Formatter/CodeFormatterTest.php
sed 's/function testWriteReturnValue/function SKIP_testWriteReturnValue/' \
- -i test/Psy/Test/ShellTest.php
+ -i test/ShellTest.php
: Drop unneeded test as readline is always there
-rm test/Psy/Test/Readline/HoaConsoleTest.php
+rm test/Readline/HoaConsoleTest.php
: Upstream tests
RETURN_CODE=0
PHPUNIT=$(which phpunit)
-for PHP_EXEC in "" %{?rhel:php54 php55} php56 php70 php71 php72; do
+for PHP_EXEC in "" %{?rhel:php54 php55 php56 php70 php71} php72 php73 php74; do
if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then
$PHP_EXEC $PHPUNIT --verbose --bootstrap bootstrap.php \
|| RETURN_CODE=1
@@ -248,6 +241,9 @@ exit $RETURN_CODE
%changelog
+* Sun Dec 01 2019 Shawn Iwinski <shawn@iwin.ski> - 0.9.11-1
+- Update to 0.9.11 (RHBZ #1529814)
+
* Wed Dec 13 2017 Shawn Iwinski <shawn@iwin.ski> - 0.8.16-1
- Update to 0.8.16 (RHBZ #1468827)