summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-08-16 19:06:34 +0200
committerRemi Collet <fedora@famillecollet.com>2014-08-16 19:06:34 +0200
commit2573208a84464f35fe4516138cc8a9d760555c7f (patch)
treeb4a575673f1870b878489196fcd1aafd13ae1671
parent117ea75278e11c55bd23aea5c771abbae3edb0f5 (diff)
php-horde-Horde-Kolab-Storage: fix test suite for php 5.6
-rw-r--r--Horde_Kolab_Storage-php54.patch24
-rw-r--r--php-horde-Horde-Kolab-Storage.spec10
2 files changed, 33 insertions, 1 deletions
diff --git a/Horde_Kolab_Storage-php54.patch b/Horde_Kolab_Storage-php54.patch
new file mode 100644
index 0000000..d07e250
--- /dev/null
+++ b/Horde_Kolab_Storage-php54.patch
@@ -0,0 +1,24 @@
+diff -up test/Horde/Kolab/Storage/TestCase.php.old test/Horde/Kolab/Storage/TestCase.php
+--- test/Horde/Kolab/Storage/TestCase.php.old 2014-08-16 18:22:51.556008063 +0200
++++ test/Horde/Kolab/Storage/TestCase.php 2014-08-16 18:25:17.171626554 +0200
+@@ -655,8 +655,13 @@ extends PHPUnit_Framework_TestCase
+
+ protected function getDefaultEventData($add = '')
+ {
++ if (version_compare(PHP_VERSION, '5.4.0', 'lt')) {
++ $file = __DIR__ . '/fixtures/event.struct';
++ } else {
++ $file = __DIR__ . '/fixtures/event.struct.php54';
++ }
+ return array(
+- 'structure' => __DIR__ . '/fixtures/event.struct',
++ 'structure' => $file,
+ 'parts' => array(
+ '2' => array(
+ 'file' => __DIR__ . '/fixtures/event' . $add . '.xml.qp',
+diff -up test/Horde/Kolab/Storage/fixtures/event.struct.php54.old test/Horde/Kolab/Storage/fixtures/event.struct.php54
+--- test/Horde/Kolab/Storage/fixtures/event.struct.php54.old 2014-08-16 18:23:02.600054958 +0200
++++ test/Horde/Kolab/Storage/fixtures/event.struct.php54 2014-08-16 18:20:31.829414814 +0200
+@@ -0,0 +1 @@
++QzoxNToiSG9yZGVfTWlt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ToxNDtpOjcwNDtpOjE1O047aToxNjtOO2k6MTc7YjowO2k6MTg7YjowO2k6MTk7Tjt9fX1pOjEwO3M6MToiMCI7aToxMTtzOjE6IgoiO2k6MTI7YTowOnt9aToxMztzOjI1OiI9X2NmZUdTcnZnamhsTlloWkhsVlFrbXlBIjtpOjE0O047aToxNTtOO2k6MTY7TjtpOjE3O2I6MDtpOjE4O2I6MDtpOjE5O047fX0=
+\ No newline at end of file
diff --git a/php-horde-Horde-Kolab-Storage.spec b/php-horde-Horde-Kolab-Storage.spec
index 47f0426..c11924d 100644
--- a/php-horde-Horde-Kolab-Storage.spec
+++ b/php-horde-Horde-Kolab-Storage.spec
@@ -12,7 +12,7 @@
Name: php-horde-Horde-Kolab-Storage
Version: 2.1.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A package for handling Kolab data stored on an IMAP server
Group: Development/Libraries
@@ -20,6 +20,8 @@ License: LGPLv2
URL: http://%{pear_channel}
Source0: http://%{pear_channel}/get/%{pear_name}-%{version}.tgz
+Patch0: %{pear_name}-php54.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: gettext
@@ -77,11 +79,14 @@ to deal with this type of data storage effectively.
%setup -q -c
cd %{pear_name}-%{version}
+%patch0 -p0 -b .php54
+
# Don't install .po and .pot files
# Remove checksum for .mo, as we regenerate them
sed -e '/%{pear_name}.po/d' \
-e '/Horde_Other.po/d' \
-e '/%{pear_name}.mo/s/md5sum=.*name=/name=/' \
+ -e '/TestCase.php/s/md5sum=.*name=/name=/' \
../package.xml >%{name}.xml
@@ -162,6 +167,9 @@ fi
%changelog
+* Sat Aug 16 2014 Remi Collet <remi@fedoraproject.org> - 2.1.0-2
+- fix test suite for PHP 5.6
+
* Fri Apr 04 2014 Remi Collet <remi@fedoraproject.org> - 2.1.0-1
- Update to 2.1.0