dev-libs/libical: Fix tests
authorAndreas Sturmlechner <asturm@gentoo.org>
Sat, 6 Jan 2018 21:06:03 +0000 (22:06 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sat, 6 Jan 2018 21:31:42 +0000 (22:31 +0100)
Reported-by: eroen <gentoo@eroen.eu>
Bug: https://bugs.gentoo.org/532296
Package-Manager: Portage-2.3.19, Repoman-2.3.6

dev-libs/libical/files/libical-2.0.0-tests.patch [new file with mode: 0644]
dev-libs/libical/libical-2.0.0-r2.ebuild
dev-libs/libical/libical-2.0.0-r3.ebuild

diff --git a/dev-libs/libical/files/libical-2.0.0-tests.patch b/dev-libs/libical/files/libical-2.0.0-tests.patch
new file mode 100644 (file)
index 0000000..a274382
--- /dev/null
@@ -0,0 +1,38 @@
+From b1081cccb90fbe4cd859d3280a0470c30dce5cac Mon Sep 17 00:00:00 2001
+From: Allen Winter <allen.winter@kdab.com>
+Date: Thu, 24 Mar 2016 16:28:02 -0400
+Subject: [PATCH] recur.c, testvcal.c - use TEST_DATADIR to point to the test
+ data thereby fixing in-source building ISSUE#228
+ https://bugs.gentoo.org/show_bug.cgi?id=532296
+
+---
+ src/test/recur.c    | 2 +-
+ src/test/testvcal.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/test/recur.c b/src/test/recur.c
+index d427137a..873ec48a 100644
+--- a/src/test/recur.c
++++ b/src/test/recur.c
+@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
+ #endif
+ 
+     if (argc <= 1) {
+-        file = "../../test-data/recur.txt";
++        file = TEST_DATADIR "/recur.txt";
+     } else if (argc == 2) {
+         file = argv[1];
+     } else {
+diff --git a/src/test/testvcal.c b/src/test/testvcal.c
+index feee8147..024bbe99 100644
+--- a/src/test/testvcal.c
++++ b/src/test/testvcal.c
+@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
+     char *file;
+ 
+     if (argc != 2) {
+-        file = "../../test-data/user-cal.vcf";
++        file = TEST_DATADIR "/user-cal.vcf";
+     } else {
+         file = argv[1];
+     }
index 591441b014b0a0f45d43da4bf6c1e8401a41b6ad..c0e34d96a4ea7657304d7b33c359ac096e853b79 100644 (file)
@@ -27,7 +27,10 @@ DOCS=(
        doc/{AddingOrModifyingComponents,UsingLibical}.txt
 )
 
-PATCHES=( "${FILESDIR}/fix-libdir-location.patch" )
+PATCHES=(
+       "${FILESDIR}/fix-libdir-location.patch"
+       "${FILESDIR}/${P}-tests.patch" #bug 532296
+)
 
 src_configure() {
        # See above, introspection is disabled for v2.0.0 at least.
index 3b8c09f8c43e6d77331109ec650cfdd315c94a8a..18915f35433a839a3d4452484ed12355e66a6e39 100644 (file)
@@ -33,6 +33,7 @@ PATCHES=(
        "${FILESDIR}/${P}-libical.pc-icu-remove-full-paths.patch"
        "${FILESDIR}/${P}-libical.pc-icu-move-to-requires.patch"
        "${FILESDIR}/${P}-libical.pc-fix-libdir-location.patch"
+       "${FILESDIR}/${P}-tests.patch" #bug 532296
 )
 
 src_configure() {