summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bytekit-cli-rpm.patch9
-rw-r--r--php-phpunit-bytekit-autoload.patch41
-rw-r--r--php-phpunit-bytekit.spec20
-rw-r--r--symfony_2.2.patch21
4 files changed, 54 insertions, 37 deletions
diff --git a/bytekit-cli-rpm.patch b/bytekit-cli-rpm.patch
deleted file mode 100644
index 159c5ae..0000000
--- a/bytekit-cli-rpm.patch
+++ /dev/null
@@ -1,9 +0,0 @@
-diff -up ./bytekit.php.rpm ./bytekit.php
---- ./bytekit.php.rpm 2014-05-04 16:59:19.000000000 +0200
-+++ ./bytekit.php 2014-05-04 16:59:32.000000000 +0200
-@@ -1,4 +1,4 @@
--#!/usr/bin/env php
-+#!/usr/bin/php
- <?php
- /**
- * bytekit-cli
diff --git a/php-phpunit-bytekit-autoload.patch b/php-phpunit-bytekit-autoload.patch
new file mode 100644
index 0000000..105bbd9
--- /dev/null
+++ b/php-phpunit-bytekit-autoload.patch
@@ -0,0 +1,41 @@
+diff -up Bytekit/Autoload.php.orig Bytekit/Autoload.php
+--- a/Bytekit/Autoload.php 2012-08-27 07:04:42.000000000 +0200
++++ b/Bytekit/Autoload.php 2015-06-03 18:18:33.706764805 +0200
+@@ -41,16 +41,16 @@
+ * @since File available since Release 1.0.0
+ */
+
+-require_once 'Symfony/Component/Finder/Finder.php';
+-require_once 'Symfony/Component/Finder/Glob.php';
+-require_once 'Symfony/Component/Finder/Iterator/FilterIterator.php';
+-require_once 'Symfony/Component/Finder/Iterator/FileTypeFilterIterator.php';
+-require_once 'Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php';
+-require_once 'Symfony/Component/Finder/Iterator/FilenameFilterIterator.php';
+-require_once 'Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php';
+-require_once 'Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php';
+-require_once 'Symfony/Component/Finder/SplFileInfo.php';
+-require_once 'ezc/Base/base.php';
++$vendorDir = '/usr/share/php';
++require_once $vendorDir . '/ezc/Base/base.php';
++require_once $vendorDir . '/Symfony/Component/ClassLoader/UniversalClassLoader.php';
++use Symfony\Component\ClassLoader\UniversalClassLoader;
++
++$loader = new UniversalClassLoader();
++$loader->registerNamespaces(array(
++ 'Symfony\\Component\\Finder' => $vendorDir,
++));
++$loader->register();
+
+ spl_autoload_register(
+ function($class) {
+--- a/bytekit.php 2015-06-03 18:26:38.915850268 +0200
++++ b/bytekit.php 2015-06-03 18:27:45.246135361 +0200
+@@ -46,7 +46,7 @@
+ set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path());
+ }
+
+-require_once 'Bytekit/Autoload.php';
++require_once '/usr/share/php/Bytekit/Autoload.php';
+
+ $command = new Bytekit_TextUI_Command;
+ $command->main();
diff --git a/php-phpunit-bytekit.spec b/php-phpunit-bytekit.spec
index 6164136..782ac16 100644
--- a/php-phpunit-bytekit.spec
+++ b/php-phpunit-bytekit.spec
@@ -10,7 +10,7 @@
Name: php-phpunit-bytekit
Version: 1.1.3
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: A command-line tool built on the PHP Bytekit extension
Group: Development/Libraries
@@ -18,8 +18,7 @@ License: BSD
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz
-Patch0: %{gh_project}-rpm.patch
-Patch1: symfony_2.2.patch
+Patch0: %{name}-autoload.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
@@ -27,9 +26,11 @@ BuildRequires: php(language) >= 5.3.3
# From package.xml
Requires: php(language) >= 5.3.3
-Requires: php-symfony-finder >= 2.1.0
-Requires: php-pear(components.ez.no/ConsoleTools) >= 1.6
+Requires: php-composer(symfony/finder)
+Requires: php-composer(symfony/class-loader)
+Requires: php-composer(zetacomponents/console-tools)
# From phpcomaptinfo report for version 1.1.3
+Requires: php-cli
Requires: php-dom
Requires: php-pcre
Requires: php-spl
@@ -50,10 +51,10 @@ analysis tasks.
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p1 -b .rpm
-%patch1 -p1 -b .orig
-
rm Bytekit/Autoload.php.*
+find . -name \*.php -exec sed -e 's/@package_version@/%{version}/' -i {} \;
+
%build
#phpab \
@@ -89,6 +90,11 @@ fi
%changelog
+* Wed Jun 3 2015 Remi Collet <remi@fedoraproject.org> - 1.1.3-4
+- swicth from eZ to Zeta Components
+- ensure compatibility with SCL
+- fix reported version
+
* Sun May 4 2014 Remi Collet <remi@fedoraproject.org> - 1.1.3-3
- sources from github
diff --git a/symfony_2.2.patch b/symfony_2.2.patch
deleted file mode 100644
index 1ec1eb0..0000000
--- a/symfony_2.2.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-https://github.com/sebastianbergmann/bytekit-cli/commit/c40f2a23a9e5acab889621c94aa1bb434ef379f4
-
---- a/Bytekit/Autoload.php.orig 2012-08-27 07:04:15.000000000 +0200
-+++ b/Bytekit/Autoload.php 2013-04-09 07:32:47.944781836 +0200
-@@ -41,15 +41,7 @@
- * @since File available since Release 1.0.0
- */
-
--require_once 'Symfony/Component/Finder/Finder.php';
--require_once 'Symfony/Component/Finder/Glob.php';
--require_once 'Symfony/Component/Finder/Iterator/FilterIterator.php';
--require_once 'Symfony/Component/Finder/Iterator/FileTypeFilterIterator.php';
--require_once 'Symfony/Component/Finder/Iterator/MultiplePcreFilterIterator.php';
--require_once 'Symfony/Component/Finder/Iterator/FilenameFilterIterator.php';
--require_once 'Symfony/Component/Finder/Iterator/RecursiveDirectoryIterator.php';
--require_once 'Symfony/Component/Finder/Iterator/ExcludeDirectoryFilterIterator.php';
--require_once 'Symfony/Component/Finder/SplFileInfo.php';
-+require_once 'Symfony/Component/Finder/autoloader.php';
- require_once 'ezc/Base/base.php';
-
- spl_autoload_register(