summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-horde-Horde-Autoloader-Sabre.patch14
-rw-r--r--php-horde-Horde-Autoloader.spec5
2 files changed, 11 insertions, 8 deletions
diff --git a/php-horde-Horde-Autoloader-Sabre.patch b/php-horde-Horde-Autoloader-Sabre.patch
index cd12651..a6c5cd1 100644
--- a/php-horde-Horde-Autoloader-Sabre.patch
+++ b/php-horde-Horde-Autoloader-Sabre.patch
@@ -13,14 +13,14 @@ diff -up Horde_Autoloader-2.1.0/lib/Horde/Autoloader/Default.php.fedora Horde_Au
new Horde_Autoloader_ClassPathMapper_Default($path)
);
}
-+ /* Ensure Sabre is taken from /usr/share/php, as /usr/share/pear may contains old version */
-+ if (is_dir($sabre = '/usr/share/php/Sabre')) {
-+ $this->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^Sabre\\\\/', $sabre));
-+ }
-+ /* Keep VObject from pear (v2.1), not ready for v3.1 */
-+ if (is_dir($vobject = '/usr/share/pear/Sabre/VObject')) {
-+ $this->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix('/^Sabre\\\\VObject\\\\/', $vobject));
++ /* Allow Class Path overload */
++ foreach(glob('/usr/share/pear/Horde/*/rpmclassmap.php') as $inc) {
++ $tab = include($inc);
++ foreach ($tab as $regex => $path) {
++ $this->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Prefix($regex, $path));
++ }
+ }
++ unset($tab, $inc);
}
}
diff --git a/php-horde-Horde-Autoloader.spec b/php-horde-Horde-Autoloader.spec
index bcb9ffc..ce7ed45 100644
--- a/php-horde-Horde-Autoloader.spec
+++ b/php-horde-Horde-Autoloader.spec
@@ -19,7 +19,7 @@
Name: php-horde-Horde-Autoloader
Version: 2.1.1
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: Horde Autoloader
Group: Development/Libraries
@@ -113,6 +113,9 @@ fi
%changelog
+* Tue Apr 28 2015 Remi Collet <remi@fedoraproject.org> - 2.1.1-3
+- simplify ClassPathMapper patch for Sabre
+
* Tue Apr 28 2015 Remi Collet <remi@fedoraproject.org> - 2.1.1-1
- Update to 2.1.1
- add provides php-composer(horde/horde-autoloader)