diff options
| -rw-r--r-- | php-bartlett-php-compatinfo-db-1.19.0-rpm.patch | 39 | ||||
| -rw-r--r-- | php-bartlett-php-compatinfo-db-1.2.0-autoload.php | 2 | ||||
| -rw-r--r-- | php-bartlett-php-compatinfo-db-1.2.0-rpm.patch | 41 | ||||
| -rw-r--r-- | php-bartlett-php-compatinfo-db.spec | 12 | 
4 files changed, 48 insertions, 46 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'; diff --git a/php-bartlett-php-compatinfo-db-1.2.0-autoload.php b/php-bartlett-php-compatinfo-db-1.2.0-autoload.php index bb3438f..3d3bef6 100644 --- a/php-bartlett-php-compatinfo-db-1.2.0-autoload.php +++ b/php-bartlett-php-compatinfo-db-1.2.0-autoload.php @@ -1,6 +1,6 @@  <?php  /** - * Autoloader php-bartlett/php-compatinfo-db/php-compatinfo and its dependencies + * Autoloader php-bartlett-php-compatinfo-db and its dependencies   */  require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; diff --git a/php-bartlett-php-compatinfo-db-1.2.0-rpm.patch b/php-bartlett-php-compatinfo-db-1.2.0-rpm.patch deleted file mode 100644 index 0774a1c..0000000 --- a/php-bartlett-php-compatinfo-db-1.2.0-rpm.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -up ./data/handleDB.php.rpm ./data/handleDB.php ---- ./data/handleDB.php.rpm	2015-12-04 21:15:12.000000000 +0100 -+++ ./data/handleDB.php	2015-12-05 16:55:03.461056102 +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	2015-12-04 21:15:12.000000000 +0100 -+++ ./src/Bartlett/CompatInfoDb/Environment.php	2015-12-05 16:55:03.461056102 +0100 -@@ -37,6 +37,12 @@ class Environment -      */ -     public static function initRefDb() -     { -+        if (($database = getenv('BARTLETT_COMPATINFO_DB')) && file_exists($database)) { -+            return new \PDO('sqlite:' . $database); -+        } else if (file_exists($database = '/usr/share/php-bartlett-php-compatinfo-db/compatinfo.sqlite')) { -+            return new \PDO('sqlite:' . $database); -+        } -+ -         $database = 'compatinfo.sqlite'; -         $tempDir  = sys_get_temp_dir() . '/bartlett'; -  -diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php ---- ./tests/bootstrap.php.rpm	2015-12-05 16:55:03.461056102 +0100 -+++ ./tests/bootstrap.php	2015-12-05 16:56:06.693323039 +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'; diff --git a/php-bartlett-php-compatinfo-db.spec b/php-bartlett-php-compatinfo-db.spec index 0ab952e..77a597a 100644 --- a/php-bartlett-php-compatinfo-db.spec +++ b/php-bartlett-php-compatinfo-db.spec @@ -7,7 +7,7 @@  # Please, preserve the changelog entries  #  # See https://github.com/llaville/php-compatinfo-db/releases -%global gh_commit    4e11b397994a314fc49c3176fee59bd269f07b53 +%global gh_commit    87fcfd99b5ad894affa07d307817d963eb62098e  %global gh_short     %(c=%{gh_commit}; echo ${c:0:7})  #global gh_date      20151031  %global gh_owner     llaville @@ -27,9 +27,9 @@  %endif  Name:           php-%{c_vendor}-%{c_project} -Version:        1.18.0 +Version:        1.19.0  %global specrel 1 -Release:        %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist} +Release:        %{?gh_date:1%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}  Summary:        Reference Database to be used with php-compatinfo library  Group:          Development/Libraries @@ -41,7 +41,7 @@ Source0:        https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit  Source1:        %{name}-1.2.0-autoload.php  # Autoload and sqlite database path -Patch0:         %{name}-1.2.0-rpm.patch +Patch0:         %{name}-1.19.0-rpm.patch  # CURL_SSLVERSION constants have been backported  Patch1:         %{name}-curltls.patch @@ -188,6 +188,10 @@ export BARTLETT_COMPATINFO_DB=%{buildroot}%{_datadir}/%{name}/compatinfo.sqlite  %changelog +* Fri Mar 17 2017 Remi Collet <remi@remirepo.net> - 1.19.0-1 +- Update to 1.19.0 +- adapt patch fixing DB location +  * Fri Feb 24 2017 Remi Collet <remi@fedoraproject.org> - 1.18.0-1  - update to 1.18.0  | 
