summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-nette-http-dev.spec26
-rw-r--r--php-nette-http-upstream.patch20
2 files changed, 39 insertions, 7 deletions
diff --git a/php-nette-http-dev.spec b/php-nette-http-dev.spec
index 8d37148..2f5e7cc 100644
--- a/php-nette-http-dev.spec
+++ b/php-nette-http-dev.spec
@@ -22,6 +22,8 @@ Version: 2.4.0
Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
Summary: Nette HTTP Component
+Patch0: %{name}-upstream.patch
+
Group: Development/Libraries
License: BSD or GPLv2 or GPLv3
URL: https://github.com/%{gh_owner}/%{gh_project}
@@ -83,6 +85,8 @@ To use this library, you just have to add, in your project:
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1
+
%build
: Generate a classmap autoloader
@@ -107,8 +111,6 @@ cp -pr src/* %{buildroot}%{php_home}/%{ns_vendor}/
rm tests/Http/Session.start.error.phpt
%endif
-: Generate configuration
-cat /etc/php.ini /etc/php.d/*ini >php.ini
export LANG=fr_FR.utf8
: Generate autoloader
@@ -121,12 +123,22 @@ require_once '%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php';
EOF
: Run test suite in sources tree
-%{_bindir}/nette-tester --colors 0 -p php -c ./php.ini tests -s
-
-if which php70; then
- cat /etc/opt/remi/php70/php.ini /etc/opt/remi/php70/php.d/*ini >php.ini
- php70 %{_bindir}/nette-tester --colors 0 -p php70 -c ./php.ini tests -s
+# remirepo:11
+run=0
+ret=0
+if which php56; then
+ php56 %{_bindir}/nette-tester --colors 0 -p php56 -C tests -s
+ run=1
+fi
+if which php71; then
+ php71 %{_bindir}/nette-tester --colors 0 -p php71 -C tests -s
+ run=1
+fi
+if [ $run -eq 0 ]; then
+%{_bindir}/nette-tester --colors 0 -p php -C tests -s
+# remirepo:2
fi
+exit $ret
%else
: Test suite disabled
%endif
diff --git a/php-nette-http-upstream.patch b/php-nette-http-upstream.patch
new file mode 100644
index 0000000..8ecdfac
--- /dev/null
+++ b/php-nette-http-upstream.patch
@@ -0,0 +1,20 @@
+From 3fb64f5ae5d1e161cb8ab12de1fb9958cea8a50b Mon Sep 17 00:00:00 2001
+From: David Grudl <david@grudl.com>
+Date: Thu, 14 Jul 2016 16:56:39 +0200
+Subject: [PATCH] travis: added PHP 7.1
+
+---
+ .travis.yml | 4 ++++
+ tests/Http/Session.start.error.phpt | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/tests/Http/Session.start.error.phpt b/tests/Http/Session.start.error.phpt
+index 9bf7e87..ebd213f 100644
+--- a/tests/Http/Session.start.error.phpt
++++ b/tests/Http/Session.start.error.phpt
+@@ -20,4 +20,4 @@ $session = new Session(new Nette\Http\Request(new Nette\Http\UrlScript), new Net
+
+ Assert::exception(function () use ($session) {
+ $session->start();
+-}, Nette\InvalidStateException::class, '%a?%open(%A%) failed: %a%');
++}, Nette\InvalidStateException::class);