summaryrefslogtreecommitdiffstats
path: root/php-scssphp-bin.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-10-31 14:35:08 +0100
committerRemi Collet <fedora@famillecollet.com>2014-10-31 14:35:08 +0100
commit62204b19727f41203c3cd3a500b7ffa279bda68f (patch)
treeb02ec39cf41a9495a5b769eff33daacaee962f4a /php-scssphp-bin.patch
parenta8707dec9dbecc9fc5f3a14c255eedf850cdc21c (diff)
php-scssphp: 0.1.1 (backport)
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;