summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-11-03 08:19:51 +0100
committerRemi Collet <fedora@famillecollet.com>2015-11-03 08:19:51 +0100
commite4dfb813def69f05923ee23fed87f72e7fd9c934 (patch)
tree4a6424d749fc318d636561c6907b331b04a7d8d1
parent109b620114e170b33263e63a78bc7808f06f58ca (diff)
apigen: drop dependencies on herrera deprecated lib.
-rw-r--r--apigen-rpm.patch67
-rw-r--r--apigen.spec18
2 files changed, 57 insertions, 28 deletions
diff --git a/apigen-rpm.patch b/apigen-rpm.patch
index 41a082c..0a7e887 100644
--- a/apigen-rpm.patch
+++ b/apigen-rpm.patch
@@ -1,6 +1,6 @@
-diff -ruN ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/bin/apigen ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5/bin/apigen
---- ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/bin/apigen 2015-10-30 13:44:43.000000000 +0100
-+++ ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5/bin/apigen 2015-11-01 10:01:25.000000000 +0100
+diff -up ./bin/apigen.rpm ./bin/apigen
+--- ./bin/apigen.rpm 2015-10-30 13:44:43.000000000 +0100
++++ ./bin/apigen 2015-11-03 08:06:32.480579189 +0100
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
@@ -10,7 +10,7 @@ diff -ruN ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/bin/apigen ApiGen-
// Create temp dir
-@@ -26,8 +26,8 @@
+@@ -26,8 +26,8 @@ if (isset($_SERVER['argv']) && ($tmp = a
$configurator = new Nette\Configurator;
$configurator->setDebugMode( ! Tracy\Debugger::$productionMode);
$configurator->setTempDirectory($tempDir);
@@ -21,10 +21,10 @@ diff -ruN ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/bin/apigen ApiGen-
$container = $configurator->createContainer();
-diff -ruN ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/src/autoload.php ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5/src/autoload.php
---- ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/src/autoload.php 1970-01-01 01:00:00.000000000 +0100
-+++ ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5/src/autoload.php 2015-11-01 09:32:57.000000000 +0100
-@@ -0,0 +1,32 @@
+diff -up ./src/autoload.php.rpm ./src/autoload.php
+--- ./src/autoload.php.rpm 2015-11-03 08:06:32.481579194 +0100
++++ ./src/autoload.php 2015-11-03 08:10:03.608531505 +0100
+@@ -0,0 +1,31 @@
+<?php
+// Autoloader for apigen/apigen and its dependencies
+$vendor = '/usr/share/php';
@@ -56,11 +56,10 @@ diff -ruN ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/src/autoload.php A
+require_once $vendor . '/Tracy/autoload.php';
+require_once $vendor . '/FSHL/autoload.php';
+require_once $vendor . '/Kdyby/Events/autoload.php';
-+require_once $vendor . '/Herrera/Phar/Update/autoload.php';
-diff -ruN ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/src/Configuration/ConfigurationOptionsResolver.php ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5/src/Configuration/ConfigurationOptionsResolver.php
---- ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/src/Configuration/ConfigurationOptionsResolver.php 2015-10-30 13:44:43.000000000 +0100
-+++ ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5/src/Configuration/ConfigurationOptionsResolver.php 2015-11-01 09:45:20.000000000 +0100
-@@ -231,10 +231,10 @@
+diff -up ./src/Configuration/ConfigurationOptionsResolver.php.rpm ./src/Configuration/ConfigurationOptionsResolver.php
+--- ./src/Configuration/ConfigurationOptionsResolver.php.rpm 2015-10-30 13:44:43.000000000 +0100
++++ ./src/Configuration/ConfigurationOptionsResolver.php 2015-11-03 08:06:32.481579194 +0100
+@@ -231,10 +231,10 @@ class ConfigurationOptionsResolver
private function getTemplateConfigPathFromTheme($theme)
{
if ($theme === self::TEMPLATE_THEME_DEFAULT) {
@@ -73,10 +72,35 @@ diff -ruN ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/src/Configuration/
}
throw new ConfigurationException(CO::TEMPLATE_THEME . ' ' . $theme . ' is not supported.');
-diff -ruN ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/src/Theme/ThemeConfigPathResolver.php ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5/src/Theme/ThemeConfigPathResolver.php
---- ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/src/Theme/ThemeConfigPathResolver.php 2015-10-30 13:44:43.000000000 +0100
-+++ ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5/src/Theme/ThemeConfigPathResolver.php 2015-11-01 10:02:31.000000000 +0100
-@@ -38,7 +38,7 @@
+diff -up ./src/DI/ApiGenExtension.php.rpm ./src/DI/ApiGenExtension.php
+--- ./src/DI/ApiGenExtension.php.rpm 2015-11-03 08:08:42.874167346 +0100
++++ ./src/DI/ApiGenExtension.php 2015-11-03 08:09:24.816356528 +0100
+@@ -61,10 +61,6 @@ class ApiGenExtension extends CompilerEx
+ $application = $builder->getDefinition($builder->getByType('ApiGen\Console\Application'));
+
+ foreach (array_keys($builder->findByTag(self::TAG_CONSOLE_COMMAND)) as $serviceName) {
+- $className = $builder->getDefinition($serviceName)->getClass();
+- if ( ! $this->isPhar() && $className === 'ApiGen\Command\SelfUpdateCommand') {
+- continue;
+- }
+ $application->addSetup('add', ['@' . $serviceName]);
+ }
+ }
+diff -up ./src/DI/apigen.services.neon.rpm ./src/DI/apigen.services.neon
+--- ./src/DI/apigen.services.neon.rpm 2015-11-03 08:08:48.525192830 +0100
++++ ./src/DI/apigen.services.neon 2015-11-03 08:08:55.423223948 +0100
+@@ -1,7 +1,6 @@
+ services:
+ # commands
+ - {class: ApiGen\Command\GenerateCommand, tags: [console.command]}
+- - {class: ApiGen\Command\SelfUpdateCommand, tags: [console.command]}
+
+ # configuration
+ - ApiGen\Configuration\Configuration
+diff -up ./src/Theme/ThemeConfigPathResolver.php.rpm ./src/Theme/ThemeConfigPathResolver.php
+--- ./src/Theme/ThemeConfigPathResolver.php.rpm 2015-10-30 13:44:43.000000000 +0100
++++ ./src/Theme/ThemeConfigPathResolver.php 2015-11-03 08:06:32.481579194 +0100
+@@ -38,7 +38,7 @@ class ThemeConfigPathResolver
{
$allowedPaths = [
$this->rootDir,
@@ -85,10 +109,10 @@ diff -ruN ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/src/Theme/ThemeCon
];
foreach ($allowedPaths as $allowedPath) {
-diff -ruN ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/tests/bootstrap.php ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5/tests/bootstrap.php
---- ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/tests/bootstrap.php 2015-10-30 13:44:43.000000000 +0100
-+++ ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5/tests/bootstrap.php 2015-11-01 09:49:31.000000000 +0100
-@@ -1,7 +1,14 @@
+diff -up ./tests/bootstrap.php.rpm ./tests/bootstrap.php
+--- ./tests/bootstrap.php.rpm 2015-10-30 13:44:43.000000000 +0100
++++ ./tests/bootstrap.php 2015-11-03 08:10:14.113578889 +0100
+@@ -1,7 +1,13 @@
<?php
-include __DIR__ . '/../vendor/autoload.php';
@@ -100,7 +124,6 @@ diff -ruN ApiGen-e9aff53d56d2b74104dee2b88396eb614e9717d5-old/tests/bootstrap.ph
+$Loader->register();
+
+require_once $vendor . '/Mockery/autoload.php';
-+require_once $vendor . '/Herrera/Box/autoload.php';
$tempDir = __DIR__ . '/temp/' . getmypid();
define('TEMP_DIR', $tempDir);
diff --git a/apigen.spec b/apigen.spec
index f86ceac..dc81463 100644
--- a/apigen.spec
+++ b/apigen.spec
@@ -17,7 +17,7 @@
Name: %{c_project}
Version: 4.1.1
-%global specrel 1
+%global specrel 2
Release: %{?gh_date:0.%{specrel}.%{?prever}%{!?prever:%{gh_date}git%{gh_short}}}%{!?gh_date:%{specrel}}%{?dist}
Summary: PHP source code API generator
@@ -29,6 +29,7 @@ Source0: %{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
# Use RPM autoloader
+# and drop Herrera dependencies (only used for phar selfupdate command)
Patch0: %{name}-rpm.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -52,7 +53,6 @@ BuildRequires: php-composer(kdyby/events) >= 2.0
BuildRequires: php-composer(symfony/options-resolver) >= 2.6.1
BuildRequires: php-composer(symfony/console) >= 2.6
BuildRequires: php-composer(symfony/yaml) >= 2.3
-BuildRequires: php-composer(herrera-io/phar-update) >= 2.0
BuildRequires: php-composer(apigen/theme-default) >= 1.0.1
BuildRequires: php-composer(apigen/theme-bootstrap) >= 1.1.2
BuildRequires: php-iconv
@@ -68,7 +68,6 @@ BuildRequires: php-composer(symfony/class-loader)
# "herrera-io/box": "~1.6"
# mockery 0.9.3 for autoloader
BuildRequires: php-composer(mockery/mockery) >= 0.9.3
-BuildRequires: php-composer(herrera-io/box) >= 1.6
%endif
# from composer.json, "require": {
@@ -125,8 +124,6 @@ Requires: php-composer(symfony/console) >= 2.6
Requires: php-composer(symfony/console) < 3
Requires: php-composer(symfony/yaml) >= 2.3
Requires: php-composer(symfony/yaml) < 3
-Requires: php-composer(herrera-io/phar-update) >= 2.0
-Requires: php-composer(herrera-io/phar-update) < 3
Requires: php-composer(apigen/theme-default) >= 1.0.1
Requires: php-composer(apigen/theme-default) < 1.1
Requires: php-composer(apigen/theme-bootstrap) >= 1.1.2
@@ -152,7 +149,12 @@ Smart and Readable Documentation for your PHP project.
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p1
+%patch0 -p1 -b .rpm
+rm -r tests/Herrera
+rm -r src/Herrera
+rm src/Command/SelfUpdateCommand.php
+
+find src -name \*rpm -exec rm {} \;
%build
@@ -194,5 +196,9 @@ rm -rf %{buildroot}
%changelog
+* Tue Nov 3 2015 Remi Collet <remi@fedoraproject.org> - 4.1.1-2
+- drop herrera from dependencies (only used for phar
+ selfupdate command)
+
* Sun Nov 1 2015 Remi Collet <remi@fedoraproject.org> - 4.1.1-1
- initial package \ No newline at end of file