summaryrefslogtreecommitdiffstats
path: root/zephir-rpm.patch
blob: 45e07cb172e3e4af170a7cac1e64c7401638b129 (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
34
35
36
37
38
39
40
41
42
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);
-}
-
-$app = new Application(__DIR__);
+$app = new Application("@DATADIR@/zephir");
 
 $app->add(new Zephir\Command\InitCommand());
 $app->add(new Zephir\Command\GenerateCommand());