summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glpi-0.90-autoload.patch18
-rw-r--r--glpi-dev.spec8
2 files changed, 25 insertions, 1 deletions
diff --git a/glpi-0.90-autoload.patch b/glpi-0.90-autoload.patch
new file mode 100644
index 0000000..6af92b7
--- /dev/null
+++ b/glpi-0.90-autoload.patch
@@ -0,0 +1,18 @@
+diff -up inc/autoload.function.php.old inc/autoload.function.php
+--- inc/autoload.function.php.old 2016-02-18 14:45:41.167015090 +0100
++++ inc/autoload.function.php 2016-02-18 14:47:19.277404208 +0100
+@@ -328,10 +328,14 @@ function glpi_autoload($classname) {
+ // Use spl autoload to allow stackable autoload.
+ spl_autoload_register('glpi_autoload');
+
++if (file_exists(GLPI_ZEND_PATH . '/autoload.php')) {
++ require_once (GLPI_ZEND_PATH . '/autoload.php');
++} else {
+ require_once (GLPI_ZEND_PATH . '/Loader/StandardAutoloader.php');
+ $option = array(Zend\Loader\StandardAutoloader::LOAD_NS => array('Zend' => GLPI_ZEND_PATH));
+ $loader = new Zend\Loader\StandardAutoloader($option);
+ $loader->register();
++}
+
+ // SimplePie autoloader
+ spl_autoload_register(array(new SimplePie_Autoloader(), 'autoload'));
diff --git a/glpi-dev.spec b/glpi-dev.spec
index de8c386..a941e95 100644
--- a/glpi-dev.spec
+++ b/glpi-dev.spec
@@ -28,7 +28,7 @@
Name: glpi
Version: 0.90.1
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: Free IT asset management software
Summary(fr): Gestion Libre de Parc Informatique
@@ -45,6 +45,8 @@ Source4: glpi-nginx.conf
# Switch all internal cron tasks to system
Patch0: glpi-0.90-cron.patch
+# Fix autoloader
+Patch1: glpi-0.90-autoload.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -124,6 +126,7 @@ techniciens grâce à une maintenance plus cohérente.
%setup -q -n glpi
%patch0 -p0
+%patch1 -p0
find . -name \*.orig -exec rm {} \; -print
@@ -317,6 +320,9 @@ fi
%changelog
+* Thu Feb 18 2016 Remi Collet <remi@fedoraproject.org> - 0.90.1-3
+- fix Zend autoloader (to allow ZF 2.5)
+
* Fri Nov 27 2015 Remi Collet <remi@fedoraproject.org> - 0.90.1-1
- update to 0.90.1