diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-02-11 18:20:59 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-02-11 18:20:59 +0100 |
commit | 11afd621354361f648204bbe585aa1a3bdacf18e (patch) | |
tree | 1ce6eff5115acedccc0a3b38efb28cb15e7c4a48 | |
parent | 641c17d9e9d12142c4d234c61407703c3de7453a (diff) |
horde: small cleanups
-rw-r--r-- | Horde_Translation-except.patch | 28 | ||||
-rw-r--r-- | php-horde-Horde-Translation.spec | 10 |
2 files changed, 3 insertions, 35 deletions
diff --git a/Horde_Translation-except.patch b/Horde_Translation-except.patch deleted file mode 100644 index 176033b..0000000 --- a/Horde_Translation-except.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 64f3fd80a8f084d2d305274bed8d60a9fd2bb5fd Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Tue, 15 Jan 2013 13:45:43 +0100 -Subject: [PATCH] dont raise exception when running unit tests - ---- - framework/Translation/lib/Horde/Translation/Handler/Gettext.php | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/framework/Translation/lib/Horde/Translation/Handler/Gettext.php b/framework/Translation/lib/Horde/Translation/Handler/Gettext.php -index f0d460f..0b44861 100644 ---- a/framework/Translation/lib/Horde/Translation/Handler/Gettext.php -+++ b/framework/Translation/lib/Horde/Translation/Handler/Gettext.php -@@ -40,7 +40,10 @@ class Horde_Translation_Handler_Gettext implements Horde_Translation_Handler - public function __construct($domain, $path) - { - if (!is_dir($path)) { -- throw new InvalidArgumentException("$path is not a directory"); -+ // dont raise exception when running unit tests (for not installed package) -+ if (!isset($_SERVER['argv'][0]) || !strpos($_SERVER['argv'][0], 'phpunit')) { -+ throw new InvalidArgumentException("$path is not a directory"); -+ } - } - $this->_gettext = function_exists('_'); - if (!$this->_gettext) { --- -1.7.10 - diff --git a/php-horde-Horde-Translation.spec b/php-horde-Horde-Translation.spec index cbe280a..89cce8d 100644 --- a/php-horde-Horde-Translation.spec +++ b/php-horde-Horde-Translation.spec @@ -24,12 +24,10 @@ License: LGPLv2+ URL: http://pear.horde.org Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz -# See https://github.com/horde/horde/pull/27 -Patch0: %{pear_name}-except.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildArch: noarch BuildRequires: gettext +BuildRequires: php(language) >= 5.3.0 BuildRequires: php-pear(PEAR) >= 1.7.0 BuildRequires: php-channel(%{pear_channel}) %if %{with_tests} @@ -39,7 +37,7 @@ BuildRequires: php-pear(%{pear_channel}/Horde_Test) >= 2.1.0 Requires(post): %{__pear} Requires(postun): %{__pear} -BuildRequires: php-pear(PEAR) >= 1.7.0 +Requires: php-pear(PEAR) >= 1.7.0 Requires: php-channel(%{pear_channel}) Requires: php(language) >= 5.3.0 Requires: php-gettext @@ -52,14 +50,12 @@ Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version} Translation wrappers. %prep -%setup -q -c -T -tar xif %{SOURCE0} +%setup -q -c cd %{pear_name}-%{version} # Don't install .po and .pot files # Remove checksum for .mo, as we regenerate them -# Remove checksum for patched files sed -e '/%{pear_name}.po/d' \ -e '/Horde_Other.po/d' \ -e '/%{pear_name}.mo/s/md5sum=.*name=/name=/' \ |