diff options
Diffstat (limited to 'zephir-rpm.patch')
-rw-r--r-- | zephir-rpm.patch | 59 |
1 files changed, 25 insertions, 34 deletions
diff --git a/zephir-rpm.patch b/zephir-rpm.patch index 45e07cb..3239650 100644 --- a/zephir-rpm.patch +++ b/zephir-rpm.patch @@ -1,42 +1,33 @@ -diff -up ./zephir.rpm ./zephir ---- ./zephir.rpm 2018-11-18 10:28:31.000000000 +0100 -+++ ./zephir 2018-11-19 15:44:52.976871411 +0100 -@@ -1,4 +1,3 @@ --#!/usr/bin/env php - <?php - - /** -@@ -22,32 +21,7 @@ if (PHP_SAPI !== 'cli') { - ); +diff -up ./Library/autoload.php.rpm ./Library/autoload.php +--- ./Library/autoload.php.rpm 2018-11-28 15:59:50.923865048 +0100 ++++ ./Library/autoload.php 2018-11-28 16:16:41.880180099 +0100 +@@ -39,20 +39,5 @@ if (PHP_SAPI !== 'cli' && PHP_SAPI !== ' + exit(1); } --if (class_exists('Composer\Autoload\ClassLoader', false) == false) { -- if (\substr(__FILE__, 0, 5) === 'phar:') { -- $solution = 'Try to reinstall Zephir to solve this problem.' . PHP_EOL; -- } else { -- $solution = -- 'You need to set up the project dependencies using Composer:' . PHP_EOL . PHP_EOL . -- ' composer install' . PHP_EOL . PHP_EOL . -- 'You can learn all about Composer:' . PHP_EOL . -- ' - https://getcomposer.org' . PHP_EOL; +-$autoloaders = [ +- __DIR__.'/../vendor/autoload.php', // Is installed locally +- __DIR__.'/../../../autoload.php', // Is installed via Composer +-]; ++require_once dirname(__DIR__) . '/autoload.php'; + +-foreach ($autoloaders as $file) { +- if (\file_exists($file)) { +- include_once $file; +- break; - } +-} - -- fprintf( -- STDERR, -- 'Unable to locate system dependencies.' . PHP_EOL . -- '%s' . PHP_EOL . -- 'If the problem remains, ask for help on the forum:' . PHP_EOL . -- ' - https://forum.zephir-lang.com ' . PHP_EOL . PHP_EOL . -- 'Or file an issue at GitHub:' . PHP_EOL . -- ' - https://github.com/phalcon/zephir' . PHP_EOL . PHP_EOL, -- $solution -- ); +-if (false == \class_exists('Composer\Autoload\ClassLoader', false)) { +- \fwrite(STDERR, 'Unable to find the Composer autoloader.'.PHP_EOL); - - exit(1); -} -- --$app = new Application(__DIR__); -+$app = new Application("@DATADIR@/zephir"); +diff -up ./zephir.rpm ./zephir +--- ./zephir.rpm 2018-11-27 22:28:25.000000000 +0100 ++++ ./zephir 2018-11-28 15:57:43.690197659 +0100 +@@ -1,4 +1,3 @@ +-#!/usr/bin/env php + <?php - $app->add(new Zephir\Command\InitCommand()); - $app->add(new Zephir\Command\GenerateCommand()); + /** |