summaryrefslogtreecommitdiffstats
path: root/zephir-rpm.patch
blob: 9598e20269553a082e46c7d1e37f528281738f38 (plain)
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
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`
-
-    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
 
 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