diff options
| -rw-r--r-- | php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch (renamed from php-bartlett-PHP-CompatInfo-4.3.0-rpm.patch) | 45 | ||||
| -rw-r--r-- | php-bartlett-PHP-CompatInfo-autoload.php | 3 | ||||
| -rw-r--r-- | php-bartlett-PHP-CompatInfo.spec | 16 | 
3 files changed, 41 insertions, 23 deletions
diff --git a/php-bartlett-PHP-CompatInfo-4.3.0-rpm.patch b/php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch index b1bbb9e..dd91593 100644 --- a/php-bartlett-PHP-CompatInfo-4.3.0-rpm.patch +++ b/php-bartlett-PHP-CompatInfo-4.4.0-rpm.patch @@ -1,6 +1,6 @@  diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist ---- ./bin/phpcompatinfo.json.dist.rpm	2015-06-16 10:56:41.000000000 +0200 -+++ ./bin/phpcompatinfo.json.dist	2015-06-26 11:15:13.028747350 +0200 +--- ./bin/phpcompatinfo.json.dist.rpm	2015-07-11 10:04:30.000000000 +0200 ++++ ./bin/phpcompatinfo.json.dist	2015-07-13 09:06:15.108698079 +0200  @@ -6,6 +6,19 @@           }       ], @@ -22,9 +22,9 @@ diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist       "analysers" : [       ],  diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo ---- ./bin/phpcompatinfo.rpm	2015-06-16 10:56:41.000000000 +0200 -+++ ./bin/phpcompatinfo	2015-06-26 11:15:13.033747371 +0200 -@@ -1,23 +1,13 @@ +--- ./bin/phpcompatinfo.rpm	2015-07-11 10:04:30.000000000 +0200 ++++ ./bin/phpcompatinfo	2015-07-13 09:06:15.114698099 +0200 +@@ -1,23 +1,12 @@   #!/usr/bin/env php   <?php   $appName = 'phpCompatInfo'; @@ -44,25 +44,37 @@ diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo  -        putenv("BARTLETTRC=" . strtolower($appName) . '.json');  -    }  +require_once $vendorDir . '/Bartlett/CompatInfo/autoload.php'; -+putenv('BARTLETT_COMPATINFO_DB=/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite');  +if (!getenv("BARTLETTRC")) {  +     putenv("BARTLETTRC=" . strtolower($appName) . '.json');   }  -$loader = require_once $vendorDir . '/autoload.php';  -$loader->setUseIncludePath(true); - if (PHP_SAPI !== 'cli') { + if (\Phar::running()) { +     if ($home) { +@@ -35,18 +24,10 @@ if (PHP_SAPI !== 'cli') {       return; -@@ -28,5 +18,5 @@ use Bartlett\CompatInfo\Console\Applicat + } +  +-if (\Phar::running()) { +-    try { +-        Bartlett\CompatInfo\Environment::checkRequirements(); +-    } catch (\RuntimeException $e) { +-        die ($e->getMessage()); +-    } +-} +- + use Bartlett\Reflect\Environment; + use Bartlett\CompatInfo\Console\Application;   Environment::setScanDir();  -$application = new Application($appName, '4.3'); -+$application = new Application($appName, '4.3.0'); ++$application = new Application($appName, '@package_version@');   $application->run();  diff -up ./data/handleDB.php.rpm ./data/handleDB.php ---- ./data/handleDB.php.rpm	2015-06-16 10:56:41.000000000 +0200 -+++ ./data/handleDB.php	2015-06-26 11:15:13.028747350 +0200 +--- ./data/handleDB.php.rpm	2015-07-11 10:04:30.000000000 +0200 ++++ ./data/handleDB.php	2015-07-13 09:06:15.108698079 +0200  @@ -11,7 +11,8 @@    * @since    Release 4.0.0alpha3    */ @@ -74,9 +86,9 @@ diff -up ./data/handleDB.php.rpm ./data/handleDB.php   use Bartlett\CompatInfo\Reference\ExtensionFactory;  diff -up ./src/Bartlett/CompatInfo/Environment.php.rpm ./src/Bartlett/CompatInfo/Environment.php ---- ./src/Bartlett/CompatInfo/Environment.php.rpm	2015-06-26 11:20:20.075019885 +0200 -+++ ./src/Bartlett/CompatInfo/Environment.php	2015-06-26 11:23:06.329708917 +0200 -@@ -34,6 +34,11 @@ class Environment +--- ./src/Bartlett/CompatInfo/Environment.php.rpm	2015-07-13 09:10:10.271476463 +0200 ++++ ./src/Bartlett/CompatInfo/Environment.php	2015-07-13 09:10:52.422615982 +0200 +@@ -36,6 +36,12 @@ class Environment        */       public static function initRefDb()       { @@ -85,12 +97,13 @@ diff -up ./src/Bartlett/CompatInfo/Environment.php.rpm ./src/Bartlett/CompatInfo  +        } else if (file_exists($database = '/usr/share/php-bartlett-PHP-CompatInfo/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-06-16 10:56:41.000000000 +0200 -+++ ./tests/bootstrap.php	2015-06-26 11:17:16.429258776 +0200 +--- ./tests/bootstrap.php.rpm	2015-07-11 10:04:30.000000000 +0200 ++++ ./tests/bootstrap.php	2015-07-13 09:06:15.108698079 +0200  @@ -1,8 +1,11 @@   <?php diff --git a/php-bartlett-PHP-CompatInfo-autoload.php b/php-bartlett-PHP-CompatInfo-autoload.php index d40d05c..62dd824 100644 --- a/php-bartlett-PHP-CompatInfo-autoload.php +++ b/php-bartlett-PHP-CompatInfo-autoload.php @@ -17,9 +17,6 @@ if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Compo  $fedoraClassLoader->addPrefixes(array(      'Bartlett\\CompatInfo'                  => dirname(dirname(__DIR__)),  )); -if (is_file('/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite')) { -    putenv('BARTLETT_COMPATINFO_DB=/usr/share/php-bartlett-PHP-CompatInfo/compatinfo.sqlite'); -}  // Dependencies  require_once $vendorDir . '/Bartlett/Reflect/autoload.php'; diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index abdb62b..6064244 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -6,7 +6,8 @@  #  # Please, preserve the changelog entries  # -%global gh_commit    c4bfef85fe799d2079f98f7b3e46d021bc739069 +%{!?php_version:  %global php_version  %(php -r 'echo PHP_VERSION;' 2>/dev/null)} +%global gh_commit    92ee6348c3059c614b58d9927a21a778b5d7b97e  %global gh_short     %(c=%{gh_commit}; echo ${c:0:7})  #global gh_date      20150303  %global gh_owner     llaville @@ -15,8 +16,8 @@  %global with_tests   %{?_without_tests:0}%{!?_without_tests:1}  Name:           php-bartlett-PHP-CompatInfo -Version:        4.3.0 -%global specrel 3 +Version:        4.4.0 +%global specrel 1  Release:        %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}  Summary:        Find out version and the extensions required for a piece of code to run @@ -32,7 +33,7 @@ Source1:        fedora-review-check  Source2:        %{name}-autoload.php  # Autoload and sqlite database path -Patch0:         %{name}-4.3.0-rpm.patch +Patch0:         %{name}-4.4.0-rpm.patch  BuildArch:      noarch  BuildRequires:  php(language) >= 5.3.2 @@ -141,6 +142,10 @@ rm tests/Reference/Extension/SphinxExtensionTest.php  rm tests/Reference/Extension/CurlExtensionTest.php  rm tests/Reference/Extension/LibxmlExtensionTest.php  %endif +%if "%{php_version}" < "5.5" +rm tests/Reference/Extension/IntlExtensionTest.php +%endif +  %{_bindir}/phpunit \      --include-path %{buildroot}%{_datadir}/php \      -d memory_limit=1G @@ -166,6 +171,9 @@ fi  %changelog +* Mon Jul 13 2015 Remi Collet <remi@fedoraproject.org> - 4.4.0-1 +- update to 4.4.0 +  * Fri Jun 26 2015 Remi Collet <remi@fedoraproject.org> - 4.3.0-3  - rewrite autoloader  | 
