From 0f5c2c3b86b28ebe38e43019aa76a0a479c982c6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 19 Jan 2015 16:17:02 +0100 Subject: php-bartlett-PHP-CompatInfo: 4.0.0 snapshot --- php-bartlett-PHP-CompatInfo-4.0.0-rpm.patch | 101 ++++++++++++++++++++++++++++ php-bartlett-PHP-CompatInfo-dev.spec | 34 +++++++--- 2 files changed, 124 insertions(+), 11 deletions(-) create mode 100644 php-bartlett-PHP-CompatInfo-4.0.0-rpm.patch diff --git a/php-bartlett-PHP-CompatInfo-4.0.0-rpm.patch b/php-bartlett-PHP-CompatInfo-4.0.0-rpm.patch new file mode 100644 index 0000000..572f5b1 --- /dev/null +++ b/php-bartlett-PHP-CompatInfo-4.0.0-rpm.patch @@ -0,0 +1,101 @@ +diff -up ./bin/phpcompatinfo.json.dist.rpm ./bin/phpcompatinfo.json.dist +diff -up ./bin/phpcompatinfo.rpm ./bin/phpcompatinfo +--- ./bin/phpcompatinfo.rpm 2015-01-19 14:09:01.286113786 +0100 ++++ ./bin/phpcompatinfo 2015-01-19 14:11:55.099839603 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env php ++#!/usr/bin/php + setUseIncludePath(true); ++ ++$vendorDir = '/usr/share/php'; ++require_once $vendorDir . '/PhpParser/Autoloader.php'; ++PhpParser\Autoloader::register(); ++ ++require_once $vendorDir . '/SebastianBergmann/Version/Version.php'; ++ ++require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php'; ++use Symfony\Component\ClassLoader\UniversalClassLoader; ++ ++$loader = new UniversalClassLoader(); ++$loader->registerNamespaces(array( ++ 'Symfony\\Component' => $vendorDir, ++ 'Doctrine\\Common' => $vendorDir, ++ 'phpDocumentor\\Reflection' => $vendorDir, ++ 'Seld\\JsonLint' => $vendorDir, ++ 'JsonSchema' => $vendorDir, ++ 'Bartlett' => $vendorDir, ++)); ++$loader->register(); + + if (PHP_SAPI !== 'cli') { + return; +diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php +--- ./tests/bootstrap.php.rpm 2015-01-16 17:51:57.000000000 +0100 ++++ ./tests/bootstrap.php 2015-01-19 14:13:45.494300591 +0100 +@@ -1,8 +1,30 @@ + registerNamespaces(array( ++ 'Doctrine\\Common' => $vendorDir, ++ 'phpDocumentor\\Reflection' => $vendorDir, ++ 'Symfony\\Component' => $vendorDir, ++ 'Seld\\JsonLint' => $vendorDir, ++ 'JsonSchema' => $vendorDir, ++ 'Bartlett\\Reflect' => $vendorDir, ++ 'Bartlett\\Tests\\CompatInfo' => $baseDir . '/tests', ++ 'Bartlett' => $baseDir . '/src', ++ )); ++ ++$loader->register(); ++ ++# Class not catched by autoloader ++require $vendorDir . '/Bartlett/Reflect.php'; + require __DIR__ . '/Reference/GenericTest.php'; +diff -up ./data/handleDB.php.rpm ./data/handleDB.php +--- ./data/handleDB.php.rpm 2015-01-19 14:17:57.871354474 +0100 ++++ ./data/handleDB.php 2015-01-19 14:20:42.213040384 +0100 +@@ -11,7 +11,21 @@ + * @since Release 4.0.0alpha3 + */ + +-require_once dirname(__DIR__) . '/vendor/autoload.php'; ++$baseDir = dirname(__DIR__); ++$vendorDir = '/usr/share/php'; ++require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php'; ++use Symfony\Component\ClassLoader\UniversalClassLoader; ++ ++$loader = new UniversalClassLoader(); ++$loader->registerNamespaces(array( ++ 'Doctrine\\Common' => $vendorDir, ++ 'Symfony\\Component' => $vendorDir, ++ 'Bartlett\\Reflect' => $vendorDir, ++ 'Bartlett' => $baseDir . '/src', ++ )); ++ ++$loader->register(); ++ + require_once __DIR__ . '/ReferenceCollection.php'; + + use Symfony\Component\Console\Helper\ProgressBar; diff --git a/php-bartlett-PHP-CompatInfo-dev.spec b/php-bartlett-PHP-CompatInfo-dev.spec index 320fa67..1c0a397 100644 --- a/php-bartlett-PHP-CompatInfo-dev.spec +++ b/php-bartlett-PHP-CompatInfo-dev.spec @@ -6,15 +6,16 @@ # # Please, preserve the changelog entries # -%global gh_commit bbf5bf1cbc1c7ea481f315a084e5d341c24e283a -#global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_commit d900ea4b174dd302b36ce0709f46b79d2da27e00 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_date 20150116 %global gh_owner llaville %global gh_project php-compat-info Name: php-bartlett-PHP-CompatInfo -Version: 3.7.2 +Version: 4.0.0 %global specrel 1 -Release: %{?gh_short:0.%{specrel}.git%{gh_short}}%{!?gh_short:%{specrel}}%{?dist} +Release: %{?gh_short:0.%{specrel}.%{?gh_date}git%{gh_short}}%{!?gh_short:%{specrel}}%{?dist} Summary: Find out version and the extensions required for a piece of code to run Group: Development/Libraries @@ -23,14 +24,15 @@ URL: http://php5.laurent-laville.org/compatinfo/ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}%{?gh_short:-%{gh_short}}.tar.gz # Autoloader for RPM - die composer ! -Patch0: %{name}-rpm.patch +Patch0: %{name}-4.0.0-rpm.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: php(language) >= 5.3.0 +BuildRequires: php-pdo_sqlite # to run test suite BuildRequires: %{_bindir}/phpunit -BuildRequires: php-composer(bartlett/php-reflect) >= 2.6.2 +BuildRequires: php-composer(bartlett/php-reflect) >= 3.0.0 # From composer.json, "require" # "php": ">=5.3.0", @@ -39,25 +41,29 @@ BuildRequires: php-composer(bartlett/php-reflect) >= 2.6.2 # "ext-spl": "*", # "ext-json": "*", # "symfony/console": "~2.5", -# "bartlett/php-reflect": "~2.6", +# "bartlett/php-reflect": "3.0.*@dev", Requires: php(language) >= 5.3.0 Requires: php-json Requires: php-libxml Requires: php-pcre +Requires: php-pdo_sqlite Requires: php-spl -Requires: php-composer(bartlett/php-reflect) >= 2.6.2 -Requires: php-composer(bartlett/php-reflect) < 3 +Requires: php-composer(bartlett/php-reflect) >= 3.0.0 +Requires: php-composer(bartlett/php-reflect) < 4 Requires: php-composer(symfony/console) >= 2.5 Requires: php-composer(symfony/console) < 3 # From composer.json, "suggest" # "doctrine/cache": "Allow caching results, since bartlett/php-reflect 2.2" Requires: php-composer(doctrine/cache) # Required by autoloader -Requires: php-composer(phpunit/php-timer) Requires: php-composer(nikic/php-parser) +BuildRequires: php-composer(doctrine/collections) Requires: php-composer(symfony/class-loader) Requires: php-composer(symfony/event-dispatcher) Requires: php-composer(symfony/finder) +BuildRequires: php-composer(symfony/stopwatch) +BuildRequires: php-composer(symfony/dependency-injection) +BuildRequires: php-composer(phpdocumentor/reflection-docblock) Requires: php-composer(seld/jsonlint) Requires: php-composer(sebastian/version) Requires: php-composer(justinrainbow/json-schema) @@ -84,9 +90,12 @@ Documentation: http://php5.laurent-laville.org/compatinfo/manual/current/en/ sed -e 's/@package_version@/%{version}/' \ -i $(find src -name \*.php) +#rm data/compatinfo.sqlite + %build -# Nothing +: Generate the references database +#{_bindir}/php data/handleDB.php db:init %install @@ -127,6 +136,9 @@ fi %changelog +* Mon Jan 19 2015 Remi Collet - 4.0.0-0.1.20150116gitd900ea4 +- 4.0.0 snapshot + * Mon Jan 5 2015 Remi Collet - 3.7.2-1 - Update to 3.7.2 - open https://github.com/llaville/php-compat-info/pull/157 -- cgit