diff options
-rw-r--r-- | Horde_Test-rpm.patch | 32 | ||||
-rw-r--r-- | php-horde-Horde-Test.spec | 32 |
2 files changed, 58 insertions, 6 deletions
diff --git a/Horde_Test-rpm.patch b/Horde_Test-rpm.patch new file mode 100644 index 0000000..543de27 --- /dev/null +++ b/Horde_Test-rpm.patch @@ -0,0 +1,32 @@ +diff -up Horde_Test-2.4.0/lib/Horde/Test/AllTests.php.rpm Horde_Test-2.4.0/lib/Horde/Test/AllTests.php +--- Horde_Test-2.4.0/lib/Horde/Test/AllTests.php.rpm 2014-05-06 07:24:13.000000000 +0200 ++++ Horde_Test-2.4.0/lib/Horde/Test/AllTests.php 2014-05-06 07:24:37.000000000 +0200 +@@ -12,15 +12,7 @@ + * @link http://www.horde.org/components/Horde_Test + */ + +-if (!@include_once 'PHPUnit/Autoload.php') { +- /* Try to load PHAR-based phpunit. */ +- set_include_path(get_include_path() . PATH_SEPARATOR . getenv('PATH')); +- $GLOBALS['_SERVER']['SCRIPT_NAME'] = '-'; +- ob_start(); +- @include_once 'phpunit'; +- ob_end_clean(); +- restore_include_path(); +-} ++require_once 'PHPUnit/Autoload.php'; + + /** + * Horde base test suite +diff -up Horde_Test-2.4.0/lib/Horde/Test/Autoload.php.rpm Horde_Test-2.4.0/lib/Horde/Test/Autoload.php +--- Horde_Test-2.4.0/lib/Horde/Test/Autoload.php.rpm 2014-05-06 07:23:59.000000000 +0200 ++++ Horde_Test-2.4.0/lib/Horde/Test/Autoload.php 2014-05-06 07:24:50.000000000 +0200 +@@ -41,7 +41,7 @@ class Horde_Test_Autoload + return; + } + +- require __DIR__ . '/../../../bundle/vendor/autoload.php'; ++ require_once 'PHPUnit/Autoload.php'; + + spl_autoload_register( + function($class) { diff --git a/php-horde-Horde-Test.spec b/php-horde-Horde-Test.spec index fab48cf..9791ff7 100644 --- a/php-horde-Horde-Test.spec +++ b/php-horde-Horde-Test.spec @@ -12,7 +12,7 @@ %global pear_channel pear.horde.org Name: php-horde-Horde-Test -Version: 2.3.1 +Version: 2.4.0 Release: 1%{?dist} Summary: Horde testing base classes @@ -21,6 +21,9 @@ License: LGPLv2 URL: http://%{pear_channel} Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz +# Use unbundled PHPUnit +Patch0: %{pear_name}-rpm.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch BuildRequires: php(language) >= 5.3.0 @@ -29,34 +32,47 @@ BuildRequires: php-channel(%{pear_channel}) Requires(post): %{__pear} Requires(postun): %{__pear} +# From package.xml, required Requires: php(language) >= 5.3.0 Requires: php-dom Requires: php-json -Requires: php-pcre -Requires: php-pdo -Requires: php-spl Requires: php-pear(PEAR) >= 1.7.0 Requires: php-channel(%{pear_channel}) Requires: php-pear(%{pear_channel}/Horde_Support) >= 2.0.0 Requires: php-pear(%{pear_channel}/Horde_Support) < 3.0.0 Requires: php-pear(%{pear_channel}/Horde_Util) >= 2.0.0 Requires: php-pear(%{pear_channel}/Horde_Util) < 3.0.0 +# From package.xml, optional Requires: php-pear(%{pear_channel}/Horde_Cli) >= 2.0.0 Requires: php-pear(%{pear_channel}/Horde_Cli) < 3.0.0 Requires: php-pear(%{pear_channel}/Horde_Log) >= 2.0.0 Requires: php-pear(%{pear_channel}/Horde_Log) < 3.0.0 -Requires: php-pear(pear.phpunit.de/PHPUnit) >= 3.5.0 +# From phpcompatinfo report for version 2.4.0 +Requires: php-pcre +Requires: php-pdo +Requires: php-spl +# Required as we drop bundled copy +Requires: php-phpunit-PHPUnit >= 3.5.0 Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version} + %description Horde-specific PHPUnit base classes. + %prep %setup -q -c cd %{pear_name}-%{version} -mv ../package.xml %{name}.xml +%patch0 -p1 -b .rpm + +# Don't install bundled PHPUnit +# Don't check md5sum for patched files +sed -e '/bundle\/vendor/d' \ + -e '/Autoload.php/s/md5sum="[^"]*"//' \ + -e '/AllTests.php/s/md5sum="[^"]*"//' \ + ../package.xml >%{name}.xml %build @@ -95,6 +111,10 @@ fi %changelog +* Tue May 06 2014 Remi Collet <remi@fedoraproject.org> - 2.4.0-1 +- Update to 2.4.0 +- drop bundled PHPUnit and use system one + * Sat May 03 2014 Remi Collet <remi@fedoraproject.org> - 2.3.1-1 - Update to 2.3.1 |