summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-05-13 15:18:18 +0200
committerRemi Collet <fedora@famillecollet.com>2014-05-13 15:18:18 +0200
commit5f2ac6f7c7c89ec2a85cf47dd9c5fee441861d4b (patch)
treee84b9c2d90441386f7986edb197dcba1e8c347ad
parentc82b6506abe35570c5998d050c003a8b2ad10aa9 (diff)
php-bartlett-PHP-CompatInfo: fix config
-rw-r--r--php-bartlett-PHP-CompatInfo-rpm.patch20
1 files changed, 15 insertions, 5 deletions
diff --git a/php-bartlett-PHP-CompatInfo-rpm.patch b/php-bartlett-PHP-CompatInfo-rpm.patch
index b90f496..6401929 100644
--- a/php-bartlett-PHP-CompatInfo-rpm.patch
+++ b/php-bartlett-PHP-CompatInfo-rpm.patch
@@ -1,6 +1,6 @@
diff -up php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/bin/compatinfo.json.rpm php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/bin/compatinfo.json
--- php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/bin/compatinfo.json.rpm 2014-05-02 11:02:24.000000000 +0200
-+++ php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/bin/compatinfo.json 2014-05-12 20:24:33.177134072 +0200
++++ php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/bin/compatinfo.json 2014-05-13 08:57:47.713593892 +0200
@@ -1,35 +1,8 @@
{
"source-providers": [
@@ -41,15 +41,25 @@ diff -up php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/bin/compatinfo
"plugins": [
diff -up php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/bin/compatinfo.rpm php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/bin/compatinfo
--- php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/bin/compatinfo.rpm 2014-05-02 11:02:24.000000000 +0200
-+++ php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/bin/compatinfo 2014-05-12 20:24:04.316031717 +0200
-@@ -1,32 +1,29 @@
++++ php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/bin/compatinfo 2014-05-13 08:59:10.469913479 +0200
+@@ -1,32 +1,39 @@
-#!/usr/bin/env php
+#!/usr/bin/php
<?php
// bin/console
-//putenv("COMPATINFO=/path/to/dir/compatinfo.json");
+if (!getenv("COMPATINFO")) {
-+ putenv("COMPATINFO=/etc/phpcompatinfo.json");
++ $files = array(
++ realpath('./compatinfo.json'),
++ getenv('HOME').'/.config/phpcompatinfo.json',
++ '/etc/phpcompatinfo.json',
++ );
++ foreach ($files as $file) {
++ if (file_exists($file)) {
++ putenv("COMPATINFO=$file");
++ break;
++ }
++ }
+}
ini_set('memory_limit', -1);
@@ -93,7 +103,7 @@ diff -up php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/bin/compatinfo
diff -up php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/tests/bootstrap.php.rpm php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/tests/bootstrap.php
--- php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/tests/bootstrap.php.rpm 2014-05-02 11:02:24.000000000 +0200
-+++ php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/tests/bootstrap.php 2014-05-12 20:24:04.316031717 +0200
++++ php-compat-info-b9b813a906d0f2e18608c1c6d153418d99582622/tests/bootstrap.php 2014-05-13 08:57:47.713593892 +0200
@@ -1,21 +1,24 @@
<?php