summaryrefslogtreecommitdiffstats
path: root/php-bartlett-php-compatinfo-db-1.19.0-rpm.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2017-03-17 07:13:17 +0100
committerRemi Collet <fedora@famillecollet.com>2017-03-17 07:13:17 +0100
commit34f5527fb9b84a4e182bd8396fdb9101654182f0 (patch)
tree05bb0ef2b949e088473df40de8e8d49a2327a009 /php-bartlett-php-compatinfo-db-1.19.0-rpm.patch
parent248d1e2c9b7dd9a03158e7bd25befa231db1b805 (diff)
php-bartlett-php-compatinfo-db: 1.19.0
Diffstat (limited to 'php-bartlett-php-compatinfo-db-1.19.0-rpm.patch')
-rw-r--r--php-bartlett-php-compatinfo-db-1.19.0-rpm.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/php-bartlett-php-compatinfo-db-1.19.0-rpm.patch b/php-bartlett-php-compatinfo-db-1.19.0-rpm.patch
new file mode 100644
index 0000000..15175ac
--- /dev/null
+++ b/php-bartlett-php-compatinfo-db-1.19.0-rpm.patch
@@ -0,0 +1,39 @@
+diff -up ./data/handleDB.php.rpm ./data/handleDB.php
+--- ./data/handleDB.php.rpm 2017-03-16 21:26:06.000000000 +0100
++++ ./data/handleDB.php 2017-03-17 06:32:29.487099296 +0100
+@@ -12,7 +12,8 @@
+ * @since Release 1.0.0alpha1 of PHP_CompatInfo_Db
+ */
+
+-require_once dirname(__DIR__) . '/vendor/autoload.php';
++require_once '/usr/share/php/Symfony/Component/autoload.php';
++require_once dirname(__DIR__) . '/src/Bartlett/CompatInfoDb/autoload.php';
+ require_once __DIR__ . '/ReferenceCollection.php';
+
+ use Bartlett\CompatInfoDb\ExtensionFactory;
+diff -up ./src/Bartlett/CompatInfoDb/Environment.php.rpm ./src/Bartlett/CompatInfoDb/Environment.php
+--- ./src/Bartlett/CompatInfoDb/Environment.php.rpm 2017-03-17 06:32:29.487099296 +0100
++++ ./src/Bartlett/CompatInfoDb/Environment.php 2017-03-17 06:41:35.210029823 +0100
+@@ -55,6 +55,10 @@ class Environment
+ // install DB only if necessary (missing or modified)
+ copy($source, $dest);
+ }
++ } else if (($db = getenv('BARTLETT_COMPATINFO_DB')) && file_exists($db)) {
++ $tempDir = dirname($db);
++ } else if (file_exists($db = '/usr/share/php-bartlett-php-compatinfo-db/' . $database)) {
++ $tempDir = dirname($db);
+ } else {
+ $tempDir = dirname(dirname(dirname(__DIR__))) . '/data';
+ }
+diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
+--- ./tests/bootstrap.php.rpm 2017-03-16 21:26:06.000000000 +0100
++++ ./tests/bootstrap.php 2017-03-17 06:32:29.488099301 +0100
+@@ -1,6 +1,7 @@
+ <?php
+
+ $baseDir = dirname(__DIR__);
+-$vendorDir = $baseDir . '/vendor';
++$vendorDir = 'Bartlett/CompatInfoDb'; // tests use include_path
+
+ require_once $vendorDir . '/autoload.php';
++require_once __DIR__ . '/Reference/GenericTest.php';