summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-10-24 13:25:44 +0200
committerRemi Collet <remi@remirepo.net>2017-10-24 13:25:44 +0200
commit496a0e0b023c1e014b2773fc4c8c3623edf5796c (patch)
tree08f4cb523e466c2be557d56d135e2a2e6ca8bd46
parentfa933099320f9f3c5ce1c1b0906b3d8573c2dd0d (diff)
fix FTBFS from Koschei, add patch for PHP 7.2 from https://github.com/zendframework/zend-router/pull/39zend-loader
-rw-r--r--.gitignore8
-rw-r--r--39.patch22
-rw-r--r--php-zendframework-zend-router.spec36
3 files changed, 43 insertions, 23 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fc9aa8c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/39.patch b/39.patch
new file mode 100644
index 0000000..081d47e
--- /dev/null
+++ b/39.patch
@@ -0,0 +1,22 @@
+From 27a4b8310cd8fd968d25ab7ee61798a279f87601 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 24 Oct 2017 13:16:43 +0200
+Subject: [PATCH] fix prototype for PHP 7.2
+
+---
+ test/Http/TestAsset/DummyRouteWithParam.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/Http/TestAsset/DummyRouteWithParam.php b/test/Http/TestAsset/DummyRouteWithParam.php
+index e4e99f8..340cc58 100644
+--- a/test/Http/TestAsset/DummyRouteWithParam.php
++++ b/test/Http/TestAsset/DummyRouteWithParam.php
+@@ -22,7 +22,7 @@ class DummyRouteWithParam extends DummyRoute
+ * @param RequestInterface $request
+ * @return RouteMatch
+ */
+- public function match(RequestInterface $request)
++ public function match(RequestInterface $request, $pathOffset = null)
+ {
+ return new RouteMatch(['foo' => 'bar'], -4);
+ }
diff --git a/php-zendframework-zend-router.spec b/php-zendframework-zend-router.spec
index e073b41..0ebc104 100644
--- a/php-zendframework-zend-router.spec
+++ b/php-zendframework-zend-router.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 3.0.2
-Release: 1%{?dist}
+Release: 4%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -30,7 +30,8 @@ URL: https://zendframework.github.io/%{gh_project}/
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+Patch0: https://patch-diff.githubusercontent.com/raw/zendframework/zend-router/pull/39.patch
+
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -106,6 +107,7 @@ Documentation: https://zendframework.github.io/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1
mv LICENSE.md LICENSE
@@ -115,8 +117,6 @@ mv LICENSE.md LICENSE
%install
-rm -rf %{buildroot}
-
mkdir -p %{buildroot}%{php_home}/Zend/
cp -pr src %{buildroot}%{php_home}/Zend/%{library}
@@ -136,33 +136,19 @@ Zend\Loader\AutoloaderFactory::factory(array(
require_once '%{php_home}/Zend/autoload.php';
EOF
-# remirepo:11
-run=0
ret=0
-if which php56; then
- php56 %{_bindir}/phpunit --include-path=%{buildroot}%{php_home} || ret=1
- run=1
-fi
-if which php71; then
- php70 %{_bindir}/phpunit --include-path=%{buildroot}%{php_home} || ret=1
- run=1
-fi
-if [ $run -eq 0 ]; then
-%{_bindir}/phpunit --include-path=%{buildroot}%{php_home} --verbose
-# remirepo:2
-fi
+for cmd in php php56 php70 php71 php72; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit --verbose || ret=1
+ fi
+done
exit $ret
%else
: Test suite disabled
%endif
-%clean
-rm -rf %{buildroot}
-
-
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc *.md
@@ -171,6 +157,10 @@ rm -rf %{buildroot}
%changelog
+* Tue Oct 24 2017 Remi Collet <remi@fedoraproject.org> - 3.0.2-4
+- fix FTBFS from Koschei, add patch for PHP 7.2 from
+ https://github.com/zendframework/zend-router/pull/39
+
* Wed Jun 29 2016 Remi Collet <remi@fedoraproject.org> - 3.0.2-1
- update to 3.0.2