File: 0001-Use-homemade-autoloader.php.patch

package info (click to toggle)
php-sabre-vobject-3 3.5.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,492 kB
  • ctags: 3,416
  • sloc: php: 20,479; xml: 47; makefile: 43
file content (129 lines) | stat: -rw-r--r-- 4,066 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
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) {