File 0001-Use-homemade-autoloader.php.patch of Package php-sabre-vobject
From: =?utf-8?q?David_Pr=C3=A9vot?= <taffit@debian.org>
Date: Tue, 24 Feb 2015 15:37:47 -0400
Subject: Use homemade autoloader.php
Work around the lack of proper autoload.php from Composer.
Forwarded: not-needed
---
bin/bench.php | 4 ++--
bin/fetch_windows_zones.php | 2 +-
bin/generate_vcards | 6 +++---
bin/generateicalendardata.php | 4 ++--
bin/rrulebench.php | 2 +-
bin/vobject | 6 +++---
tests/bootstrap.php | 4 ++--
7 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/bin/bench.php b/bin/bench.php
index b949c8e..970b7d9 100755
--- a/bin/bench.php
+++ b/bin/bench.php
@@ -1,7 +1,7 @@
-#!/usr/bin/env php
+#!/usr/bin/php
<?php
-include __DIR__ . '/../vendor/autoload.php';
+include __DIR__ . '/../lib/autoload.php';
$data = stream_get_contents(STDIN);
diff --git a/bin/fetch_windows_zones.php b/bin/fetch_windows_zones.php
index a577c52..f258597 100755
--- a/bin/fetch_windows_zones.php
+++ b/bin/fetch_windows_zones.php
@@ -1,4 +1,4 @@
-#!/usr/bin/env php
+#!/usr/bin/php
<?php
$windowsZonesUrl = 'http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml';
diff --git a/bin/generate_vcards b/bin/generate_vcards
index 638f63b..bca36db 100755
--- a/bin/generate_vcards
+++ b/bin/generate_vcards
@@ -1,4 +1,4 @@
-#!/usr/bin/env php
+#!/usr/bin/php
<?php
namespace Sabre\VObject;
@@ -6,8 +6,8 @@ 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.
+ __DIR__ . '/../lib/autoload.php', // In case vobject is used from the package tree
+ __DIR__ . '/../share/php/sabre21/Sabre/VObject/autoload.php', // In case vobject is used from the system path.
);
foreach($paths as $path) {
diff --git a/bin/generateicalendardata.php b/bin/generateicalendardata.php
index 92c8c10..070362e 100755
--- a/bin/generateicalendardata.php
+++ b/bin/generateicalendardata.php
@@ -1,4 +1,4 @@
-#!/usr/bin/env php
+#!/usr/bin/php
<?php
use Sabre\VObject;
@@ -25,7 +25,7 @@ $events = 100;
if (isset($argv[1])) $events = (int)$argv[1];
-include __DIR__ . '/../vendor/autoload.php';
+include __DIR__ . '/../lib/autoload.php';
fwrite(STDERR, "Generating " . $events . " events\n");
diff --git a/bin/rrulebench.php b/bin/rrulebench.php
index f151819..6f262e7 100644
--- a/bin/rrulebench.php
+++ b/bin/rrulebench.php
@@ -1,6 +1,6 @@
<?php
-include __DIR__ . '/../vendor/autoload.php';
+include __DIR__ . '/../lib/autoload.php';
if ($argc < 4) {
echo "sabre/vobject ", Sabre\VObject\Version::VERSION, " RRULE benchmark\n";
diff --git a/bin/vobject b/bin/vobject
index e52b4fb..43cd82f 100755
--- a/bin/vobject
+++ b/bin/vobject
@@ -1,4 +1,4 @@
-#!/usr/bin/env php
+#!/usr/bin/php
<?php
namespace Sabre\VObject;
@@ -6,8 +6,8 @@ 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.
+ __DIR__ . '/../lib/autoload.php', // In case vobject is used from the package tree
+ __DIR__ . '/../share/php/sabre21/Sabre/VObject/autoload.php', // In case vobject is used from the system path.
);
foreach($paths as $path) {
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index a01f8f9..0abcff3 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -3,8 +3,8 @@
date_default_timezone_set('UTC');
$try = array(
- __DIR__ . '/../vendor/autoload.php',
- __DIR__ . '/../../../autoload.php',
+ __DIR__ . '/../lib/autoload.php',
+ '/usr/share/php/sabre21/Sabre/VObject/autoload.php',
);
foreach($try as $path) {