summaryrefslogtreecommitdiffstats
path: root/php-hoa-cli-rpm.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-hoa-cli-rpm.patch')
-rw-r--r--php-hoa-cli-rpm.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/php-hoa-cli-rpm.patch b/php-hoa-cli-rpm.patch
new file mode 100644
index 0000000..80d9e91
--- /dev/null
+++ b/php-hoa-cli-rpm.patch
@@ -0,0 +1,59 @@
+diff -up ./Bin/Hoa.php.rpm ./Bin/Hoa.php
+--- ./Bin/Hoa.php.rpm 2016-04-06 14:42:29.000000000 +0200
++++ ./Bin/Hoa.php 2016-04-06 14:47:17.000000000 +0200
+@@ -42,43 +42,8 @@ use Hoa\Router;
+ /**
+ * @copyright Copyright © 2007-2016 Hoa community
+ */
+-if (!defined('HOA')) {
+- $composer = [
+- dirname(__DIR__) . DIRECTORY_SEPARATOR .
+- 'vendor' . DIRECTORY_SEPARATOR .
+- 'autoload.php',
+- dirname(__DIR__) . DIRECTORY_SEPARATOR .
+- '..' . DIRECTORY_SEPARATOR .
+- '..' . DIRECTORY_SEPARATOR .
+- 'autoload.php',
+- dirname(__DIR__) . DIRECTORY_SEPARATOR .
+- '..' . DIRECTORY_SEPARATOR .
+- '..' . DIRECTORY_SEPARATOR .
+- '..' . DIRECTORY_SEPARATOR .
+- 'autoload.php'
+- ];
+-
+- foreach ($composer as $path) {
+- if (file_exists($path)) {
+- require_once $path;
+-
+- break;
+- }
+- }
+-
+- if (!defined('HOA')) {
+- require_once
+- dirname(__DIR__) . DIRECTORY_SEPARATOR .
+- '..' . DIRECTORY_SEPARATOR .
+- 'Consistency' . DIRECTORY_SEPARATOR .
+- 'Prelude.php';
+-
+- require_once
+- dirname(__DIR__) . DIRECTORY_SEPARATOR .
+- '..' . DIRECTORY_SEPARATOR .
+- 'Protocol' . DIRECTORY_SEPARATOR .
+- 'Wrapper.php';
+- }
++foreach (glob('/usr/share/php/Hoa/*/autoload.php') as $file) {
++ require_once ($file);
+ }
+
+ Exception\Error::enableErrorHandler();
+diff -up ./Bin/hoa.rpm ./Bin/hoa
+--- ./Bin/hoa.rpm 2016-04-06 14:42:36.000000000 +0200
++++ ./Bin/hoa 2016-04-06 14:43:06.000000000 +0200
+@@ -39,4 +39,5 @@
+ * @copyright Copyright © 2007-2016 Hoa community
+ * @license New BSD License
+ */
+-require_once __DIR__ . DIRECTORY_SEPARATOR . 'Hoa.php';
++require_once '/usr/share/php/Hoa/Cli/Bin/Hoa.php';
++