summaryrefslogtreecommitdiffstats
path: root/php-scssphp-bin.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-scssphp-bin.patch')
-rw-r--r--php-scssphp-bin.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/php-scssphp-bin.patch b/php-scssphp-bin.patch
new file mode 100644
index 0000000..a941334
--- /dev/null
+++ b/php-scssphp-bin.patch
@@ -0,0 +1,21 @@
+diff --git a/bin/pscss b/bin/pscss
+index 451f0fb..38f0a8e 100755
+--- a/bin/pscss
++++ b/bin/pscss
+@@ -1,9 +1,14 @@
+-#!/usr/bin/env php
++#!/usr/bin/php
+ <?php
+
+ error_reporting(E_ALL);
+
+-include 'scss.inc.php';
++spl_autoload_register(function ($class) {
++ if (0 === strpos($class, 'Leafo\\ScssPhp\\')) {
++ $src = str_replace('\\', '/', $class) . '.php';
++ @include_once $src;
++ }
++});
+
+ use Leafo\ScssPhp\Compiler;
+ use Leafo\ScssPhp\Parser;