summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-07-05 15:22:15 +0200
committerRemi Collet <remi@remirepo.net>2019-07-05 15:22:15 +0200
commit3f993d89c94f8d825fcf85e1b2f6373eede51c71 (patch)
treefec081f54de9ee6d66bac94b768952fb82cdd28c
parent5a82bbc4075927adf653c0350efcb91996d6772a (diff)
fix autoloaderHEADmaster
-rw-r--r--php-sabre-event5.spec18
1 files changed, 12 insertions, 6 deletions
diff --git a/php-sabre-event5.spec b/php-sabre-event5.spec
index 299f11a..9ab9836 100644
--- a/php-sabre-event5.spec
+++ b/php-sabre-event5.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-sabre-event5
#
-# Copyright (c) 2013-2018 Remi Collet
+# Copyright (c) 2013-2019 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -24,7 +24,7 @@
Name: php-%{pk_vendor}-%{pk_project}%{major}
Summary: Lightweight library for event-based programming
Version: 5.0.3
-Release: 1%{?dist}
+Release: 3%{?dist}
URL: http://sabre.io/event
License: BSD
@@ -75,9 +75,12 @@ cat << 'EOF' | tee lib/autoload.php
/* Autoloader for %{name} and its dependencies */
require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('Sabre\\Event\\', __DIR__);
-require_once __DIR__ . '/coroutine.php';
-require_once __DIR__ . '/Loop/functions.php';
-require_once __DIR__ . '/Promise/functions.php';
+
+if (!function_exists('Sabre\\Event\\coroutine')) {
+ require_once __DIR__ . '/coroutine.php';
+ require_once __DIR__ . '/Loop/functions.php';
+ require_once __DIR__ . '/Promise/functions.php';
+}
EOF
@@ -94,7 +97,7 @@ cp -pr lib %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}
%if %{with_tests}
: Run upstream test suite against installed library
ret=0
-for cmd in php php71 php72 php73; do
+for cmd in php php71 php72 php73 php74; do
if which $cmd; then
$cmd %{_bindir}/phpunit6 \
--bootstrap=%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}%{major}/autoload.php \
@@ -117,6 +120,9 @@ exit $ret
%changelog
+* Fri Jul 5 2019 Remi Collet <remi@remirepo.net> - 5.0.3-3
+- fix autoloader
+
* Mon Mar 5 2018 Remi Collet <remi@remirepo.net> - 5.0.3-1
- Update to 5.0.3
- sources from git snapshot