diff options
Diffstat (limited to 'zephir-rpm.patch')
-rw-r--r-- | zephir-rpm.patch | 71 |
1 files changed, 40 insertions, 31 deletions
diff --git a/zephir-rpm.patch b/zephir-rpm.patch index 9598e20..45e07cb 100644 --- a/zephir-rpm.patch +++ b/zephir-rpm.patch @@ -1,33 +1,42 @@ -diff -up ./bin/zephir.rpm ./bin/zephir ---- ./bin/zephir.rpm 2017-10-23 07:02:31.781050845 +0200 -+++ ./bin/zephir 2017-10-23 07:04:04.955553874 +0200 -@@ -1,26 +1,10 @@ - #!/bin/sh - if [ -z "$ZEPHIRDIR" ]; then -- ZEPHIRDIR="%ZEPHIRDIR%" -- if [ "$ZEPHIRDIR" = "%""ZEPHIRDIR""%" ]; then -- if [ -h $0 ]; then -- REALPATH="`dirname $0`/`readlink $0`" -- CURDIR=`dirname $REALPATH` -- else -- CURDIR=`dirname $0` -- fi -- PARENTDIR=`cd $CURDIR/..; pwd` +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') { + ); + } + +-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; +- } +- +- 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 +- ); +- +- exit(1); +-} - -- if [ -f $PARENTDIR/compiler.php ]; then -- export ZEPHIRDIR=$PARENTDIR -- else -- echo "Environment variable ZEPHIRDIR is not set" -- exit 1 -- fi -- fi -+ export ZEPHIRDIR="@DATADIR@/zephir" - fi +-$app = new Application(__DIR__); ++$app = new Application("@DATADIR@/zephir"); - if [ ! -z $1 ] && [ ! -z $2 ] && [ ! -z $3 ] && [ "$1" = "-c" ]; then -- php -d timecop.func_override=0 -c $2 $ZEPHIRDIR/compiler.php ${*:3} -+ @BINDIR@/php -d timecop.func_override=0 -d memory_limit=1G -d extension=zephir_parser.so -c $2 $ZEPHIRDIR/compiler.php ${*:3} - else -- php -d timecop.func_override=0 $ZEPHIRDIR/compiler.php $* -+ @BINDIR@/php -d timecop.func_override=0 -d memory_limit=1G -d extension=zephir_parser.so $ZEPHIRDIR/compiler.php $* - fi + $app->add(new Zephir\Command\InitCommand()); + $app->add(new Zephir\Command\GenerateCommand()); |