commit:     cc667f8994edb317eb357300f1ceb325cc4b1e9b
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Tue Aug  4 20:43:16 2020 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Tue Aug  4 20:43:48 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc667f89

media-tv/kodi: Fix test failures with USE=-webserver

Closes: https://bugs.gentoo.org/734922
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 ...19.0_alpha1-conditional-TestHTTPDirectory.patch | 31 ++++++++++++++++++++++
 media-tv/kodi/kodi-19.0_alpha1.ebuild              |  4 +++
 2 files changed, 35 insertions(+)

diff --git 
a/media-tv/kodi/files/kodi-19.0_alpha1-conditional-TestHTTPDirectory.patch 
b/media-tv/kodi/files/kodi-19.0_alpha1-conditional-TestHTTPDirectory.patch
new file mode 100644
index 00000000000..096a4032628
--- /dev/null
+++ b/media-tv/kodi/files/kodi-19.0_alpha1-conditional-TestHTTPDirectory.patch
@@ -0,0 +1,31 @@
+From 3be79a564343886ade7e88f447944fd4b5452959 Mon Sep 17 00:00:00 2001
+From: Craig Andrews <[email protected]>
+Date: Fri, 31 Jul 2020 14:56:21 -0400
+Subject: [PATCH] [test] [webserver] Conditional TestHTTPDirectory
+
+TestHTTPDirectory.cpp requires microhttpd so only include it if microhttpd is 
found.
+
+TestHTTPDirectory.cpp includes network/WebServer.h which includes 
network/httprequesthandler/IHTTPRequestHandler.h which includes microhttpd.h
+---
+ xbmc/filesystem/test/CMakeLists.txt | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/xbmc/filesystem/test/CMakeLists.txt 
b/xbmc/filesystem/test/CMakeLists.txt
+index 235acc8549cf..9572459cf198 100644
+--- a/xbmc/filesystem/test/CMakeLists.txt
++++ b/xbmc/filesystem/test/CMakeLists.txt
+@@ -1,10 +1,13 @@
+ set(SOURCES TestDirectory.cpp
+             TestFile.cpp
+             TestFileFactory.cpp
+-            TestHTTPDirectory.cpp
+             TestZipFile.cpp
+             TestZipManager.cpp)
+ 
++if(MICROHTTPD_FOUND)
++  list(APPEND SOURCES TestHTTPDirectory.cpp)
++endif()
++
+ if(NFS_FOUND)
+   list(APPEND SOURCES TestNfsFile.cpp)
+ endif()

diff --git a/media-tv/kodi/kodi-19.0_alpha1.ebuild 
b/media-tv/kodi/kodi-19.0_alpha1.ebuild
index d253bed8325..9bf450173d8 100644
--- a/media-tv/kodi/kodi-19.0_alpha1.ebuild
+++ b/media-tv/kodi/kodi-19.0_alpha1.ebuild
@@ -29,6 +29,10 @@ else
        S=${WORKDIR}/xbmc-${MY_PV}-${CODENAME}
 fi
 
+PATCHES=(
+       "${FILESDIR}/${P}-conditional-TestHTTPDirectory.patch"
+)
+
 inherit autotools cmake desktop linux-info pax-utils python-single-r1 xdg
 
 DESCRIPTION="A free and open source media-player and entertainment hub"

Reply via email to