diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-03-16 12:56:26 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-03-16 12:56:26 +0100 |
commit | be9c16ffae597f03473b6eb1c7b6771731f50c60 (patch) | |
tree | f87f080ece9bd39f18d5b961486d4ea94c02cbb3 /sabre-vobject-bin.patch | |
parent | 842aa910e681965ee24b173af82df7a60ecedc4f (diff) |
php-sabre-vobject: 3.4.6 (synced with Fedora)
Diffstat (limited to 'sabre-vobject-bin.patch')
-rw-r--r-- | sabre-vobject-bin.patch | 80 |
1 files changed, 49 insertions, 31 deletions
diff --git a/sabre-vobject-bin.patch b/sabre-vobject-bin.patch index 3514fcf..60b7f9a 100644 --- a/sabre-vobject-bin.patch +++ b/sabre-vobject-bin.patch @@ -1,38 +1,56 @@ -diff -up bin/vobject.psr0 bin/vobject ---- bin/vobject.psr0 2014-04-06 09:55:39.145932310 +0200 -+++ bin/vobject 2014-04-06 09:59:04.416686079 +0200 -@@ -1,24 +1,21 @@ --#!/usr/bin/env php -+#!/usr/bin/php - <?php - - namespace Sabre\VObject; +diff -up ./bin/generate_vcards.rpm ./bin/generate_vcards +--- ./bin/generate_vcards.rpm 2015-07-20 15:36:00.466610252 +0200 ++++ ./bin/generate_vcards 2015-07-20 15:36:24.434738474 +0200 +@@ -6,8 +6,7 @@ namespace Sabre\VObject; + // This sucks.. we have to try to find the composer autoloader. But chances + // are, we can't find it this way. So we'll do our bestest + $paths = array( +- __DIR__ . '/../vendor/autoload.php', // In case vobject is cloned directly +- __DIR__ . '/../../../autoload.php', // In case vobject is a composer dependency. ++ '/usr/share/php/Sabre/VObject/autoload.php', // RPM installation + ); --// This sucks.. we have to try to find the composer autoloader. But chances --// are, we can't find it this way. So we'll do our bestest --$paths = array( + foreach($paths as $path) { +diff -up ./bin/vobject.rpm ./bin/vobject +--- ./bin/vobject.rpm 2015-07-20 15:34:43.499198500 +0200 ++++ ./bin/vobject 2015-07-20 15:36:20.645718203 +0200 +@@ -6,8 +6,7 @@ namespace Sabre\VObject; + // This sucks.. we have to try to find the composer autoloader. But chances + // are, we can't find it this way. So we'll do our bestest + $paths = array( - __DIR__ . '/../vendor/autoload.php', // In case vobject is cloned directly - __DIR__ . '/../../../autoload.php', // In case vobject is a composer dependency. --); -+// Simple PSR-0 autoloader -+// dont rely on include path as pear directory -+// may contains old incompatible version ++ '/usr/share/php/Sabre/VObject/autoload.php', // RPM installation + ); --foreach($paths as $path) { -- if (file_exists($path)) { -- include $path; -- break; -+spl_autoload_register(function ($class) { -+ if (strpos($class, 'Sabre\\')===0) { -+ $file = '/usr/share/php/'.str_replace('\\', '/', $class).'.php'; -+ @include $file; - } --} -+}); + foreach($paths as $path) { +diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php +--- ./tests/bootstrap.php.rpm 2015-07-20 15:36:46.774857986 +0200 ++++ ./tests/bootstrap.php 2015-07-20 15:40:20.007998716 +0200 +@@ -3,8 +3,7 @@ + date_default_timezone_set('UTC'); - if (!class_exists('Sabre\\VObject\\Version')) { -- fwrite(STDERR, "Composer autoloader could not be loaded.\n"); -+ fwrite(STDERR, "Autoloader could not be properly loaded.\n"); - die(1); + $try = array( +- __DIR__ . '/../vendor/autoload.php', +- __DIR__ . '/../../../autoload.php', ++ '@BUILDROOT@/usr/share/php/Sabre/VObject/autoload.php', // RPM installation + ); + + foreach($try as $path) { +@@ -14,8 +13,6 @@ foreach($try as $path) { + } } +-$autoLoader->addPsr4('Sabre\\VObject\\',__DIR__ . '/VObject'); +- + if (!defined('SABRE_TEMPDIR')) { + define('SABRE_TEMPDIR', __DIR__ . '/temp/'); + } +@@ -23,3 +21,7 @@ if (!defined('SABRE_TEMPDIR')) { + if (!file_exists(SABRE_TEMPDIR)) { + mkdir(SABRE_TEMPDIR); + } ++ ++// Not catched by autoloader ++require_once __DIR__ . '/VObject/TestCase.php'; ++require_once __DIR__ . '/VObject/ITip/BrokerTester.php'; |