diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-11-01 09:14:19 -0700 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-02-06 16:48:12 +0100 |
commit | ab4369c5841e7f87bdc52aa8a67363c4e6524211 (patch) | |
tree | d807b43dc2ae43d8ef2a5d9a465252138a773d90 /meta-multimedia/recipes-mediacenter | |
parent | 5ecbf9bab404af0de7d0f058d1620f40dae0d2d8 (diff) | |
download | meta-openembedded-ab4369c5841e7f87bdc52aa8a67363c4e6524211.tar.gz |
kodi: Add krypton/17.0 recipe
remove obsoleted xbmc recipes
rename to recipes-mediacenter
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-multimedia/recipes-mediacenter')
14 files changed, 1126 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb b/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb new file mode 100644 index 000000000..094ccff98 --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | SUMMARY = "Kodi Media Center" | ||
2 | |||
3 | LICENSE = "GPLv2+" | ||
4 | LIC_FILES_CHKSUM = "file://JsonSchemaBuilder.cpp;beginline=2;endline=18;md5=1f67721215c03f66545390f6e45b99c7" | ||
5 | |||
6 | SRCREV = "b587e98911fcedc4b800cd923a882c7aeeaa2146" | ||
7 | |||
8 | PV = "16.0+gitr${SRCPV}" | ||
9 | SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Jarvis" | ||
10 | |||
11 | inherit autotools-brokensep gettext native | ||
12 | |||
13 | S = "${WORKDIR}/git/tools/depends/native/JsonSchemaBuilder/src" | ||
14 | |||
15 | do_compile_prepend() { | ||
16 | for i in $(find . -name "Makefile") ; do | ||
17 | sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i | ||
18 | done | ||
19 | |||
20 | for i in $(find . -name "*.mak*" -o -name "Makefile") ; do | ||
21 | sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i | ||
22 | done | ||
23 | } | ||
24 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch new file mode 100644 index 000000000..b3780db89 --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | From 53c7b1667a41b25775d1dc009d8ced61f383da0b Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sat, 6 Feb 2016 15:43:01 +0100 | ||
4 | Subject: [PATCH 1/3] configure: don't try to run stuff to find tinyxml | ||
5 | |||
6 | --- | ||
7 | configure.ac | 2 +- | ||
8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
9 | |||
10 | diff --git a/configure.ac b/configure.ac | ||
11 | index 5a41fb4..243c7e5 100644 | ||
12 | --- a/configure.ac | ||
13 | +++ b/configure.ac | ||
14 | @@ -1043,7 +1043,7 @@ fi | ||
15 | AC_LANG_PUSH([C++]) | ||
16 | PKG_CHECK_MODULES([TINYXML], [tinyxml >= 2.6.2], | ||
17 | [INCLUDES="$INCLUDES $TINYXML_CFLAGS"; LIBS="$LIBS $TINYXML_LIBS"], | ||
18 | - [AC_RUN_IFELSE( | ||
19 | + [AC_COMPILE_IFELSE( | ||
20 | [AC_LANG_SOURCE([[ | ||
21 | #include <stdlib.h> | ||
22 | #include <tinyxml.h> | ||
23 | -- | ||
24 | 2.10.1 | ||
25 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0002-handle-SIGTERM.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0002-handle-SIGTERM.patch new file mode 100644 index 000000000..b2af5deb2 --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0002-handle-SIGTERM.patch | |||
@@ -0,0 +1,163 @@ | |||
1 | From 1c1484303a055bfde655ffae3829554aaefc2e07 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stefan Saraev <stefan@saraev.ca> | ||
3 | Date: Wed, 2 Nov 2016 11:28:34 -0700 | ||
4 | Subject: [PATCH 2/3] handle SIGTERM | ||
5 | |||
6 | 0. CApplication::Stop cant be trusted. (deadlocks crashes and boo) | ||
7 | |||
8 | so, when shutdown/reboot is requested: | ||
9 | |||
10 | 1. save an exit code (for CEC...) | ||
11 | 2. call CPowerManager::{Reboot,PowerDown} | ||
12 | 3. ... then systemd sends TERM and waits xx seconds before sending KILL | ||
13 | 4. CApplication::Stop has xx seconds to save guisettings.xml and boo | ||
14 | 5. CEC thread has xx seconds to switch off after it received OnQuit | ||
15 | 6. addons / pvrmanager / cec / everything else.. are free to deadlock / crash now, we dont care | ||
16 | 7. KILL | ||
17 | |||
18 | Signed-off-by: Stefan Saraev <stefan@saraev.ca> | ||
19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
20 | --- | ||
21 | xbmc/Application.cpp | 17 ++++++++++++----- | ||
22 | xbmc/Application.h | 1 + | ||
23 | xbmc/XBApplicationEx.cpp | 1 + | ||
24 | xbmc/XBApplicationEx.h | 1 + | ||
25 | xbmc/platform/posix/main.cpp | 15 +++++++++++++++ | ||
26 | 5 files changed, 30 insertions(+), 5 deletions(-) | ||
27 | |||
28 | diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp | ||
29 | index 4c118e0..58b151a 100644 | ||
30 | --- a/xbmc/Application.cpp | ||
31 | +++ b/xbmc/Application.cpp | ||
32 | @@ -2428,12 +2428,12 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg) | ||
33 | switch (pMsg->dwMessage) | ||
34 | { | ||
35 | case TMSG_POWERDOWN: | ||
36 | - Stop(EXITCODE_POWERDOWN); | ||
37 | + SetExitCode(EXITCODE_POWERDOWN); | ||
38 | g_powerManager.Powerdown(); | ||
39 | break; | ||
40 | |||
41 | case TMSG_QUIT: | ||
42 | - Stop(EXITCODE_QUIT); | ||
43 | + SetExitCode(EXITCODE_QUIT); | ||
44 | break; | ||
45 | |||
46 | case TMSG_SHUTDOWN: | ||
47 | @@ -2454,12 +2454,13 @@ void CApplication::OnApplicationMessage(ThreadMessage* pMsg) | ||
48 | |||
49 | case TMSG_RESTART: | ||
50 | case TMSG_RESET: | ||
51 | - Stop(EXITCODE_REBOOT); | ||
52 | + SetExitCode(EXITCODE_REBOOT); | ||
53 | g_powerManager.Reboot(); | ||
54 | break; | ||
55 | |||
56 | case TMSG_RESTARTAPP: | ||
57 | #if defined(TARGET_WINDOWS) || defined(TARGET_LINUX) | ||
58 | + SetExitCode(EXITCODE_RESTARTAPP); | ||
59 | Stop(EXITCODE_RESTARTAPP); | ||
60 | #endif | ||
61 | break; | ||
62 | @@ -2883,6 +2884,13 @@ bool CApplication::Cleanup() | ||
63 | } | ||
64 | } | ||
65 | |||
66 | +void CApplication::SetExitCode(int exitCode) | ||
67 | +{ | ||
68 | + // save it for CEC | ||
69 | + m_ExitCode = exitCode; | ||
70 | + m_ExitCodeSet = true; | ||
71 | +} | ||
72 | + | ||
73 | void CApplication::Stop(int exitCode) | ||
74 | { | ||
75 | try | ||
76 | @@ -2890,7 +2898,7 @@ void CApplication::Stop(int exitCode) | ||
77 | m_frameMoveGuard.unlock(); | ||
78 | |||
79 | CVariant vExitCode(CVariant::VariantTypeObject); | ||
80 | - vExitCode["exitcode"] = exitCode; | ||
81 | + vExitCode["exitcode"] = m_ExitCode; | ||
82 | CAnnouncementManager::GetInstance().Announce(System, "xbmc", "OnQuit", vExitCode); | ||
83 | |||
84 | // Abort any active screensaver | ||
85 | @@ -2924,7 +2932,6 @@ void CApplication::Stop(int exitCode) | ||
86 | |||
87 | m_bStop = true; | ||
88 | m_AppFocused = false; | ||
89 | - m_ExitCode = exitCode; | ||
90 | CLog::Log(LOGNOTICE, "stop all"); | ||
91 | |||
92 | // cancel any jobs from the jobmanager | ||
93 | diff --git a/xbmc/Application.h b/xbmc/Application.h | ||
94 | index 22aca81..9992677 100644 | ||
95 | --- a/xbmc/Application.h | ||
96 | +++ b/xbmc/Application.h | ||
97 | @@ -160,6 +160,7 @@ public: | ||
98 | void StopPVRManager(); | ||
99 | void ReinitPVRManager(); | ||
100 | bool IsCurrentThread() const; | ||
101 | + void SetExitCode(int exitCode); | ||
102 | void Stop(int exitCode); | ||
103 | void RestartApp(); | ||
104 | void UnloadSkin(bool forReload = false); | ||
105 | diff --git a/xbmc/XBApplicationEx.cpp b/xbmc/XBApplicationEx.cpp | ||
106 | index 035aed2..34102f5 100644 | ||
107 | --- a/xbmc/XBApplicationEx.cpp | ||
108 | +++ b/xbmc/XBApplicationEx.cpp | ||
109 | @@ -46,6 +46,7 @@ CXBApplicationEx::CXBApplicationEx() | ||
110 | m_bStop = false; | ||
111 | m_AppFocused = true; | ||
112 | m_ExitCode = EXITCODE_QUIT; | ||
113 | + m_ExitCodeSet = false; | ||
114 | m_renderGUI = false; | ||
115 | } | ||
116 | |||
117 | diff --git a/xbmc/XBApplicationEx.h b/xbmc/XBApplicationEx.h | ||
118 | index 9bc14fa..f696b89 100644 | ||
119 | --- a/xbmc/XBApplicationEx.h | ||
120 | +++ b/xbmc/XBApplicationEx.h | ||
121 | @@ -42,6 +42,7 @@ public: | ||
122 | // Variables for timing | ||
123 | bool m_bStop; | ||
124 | int m_ExitCode; | ||
125 | + bool m_ExitCodeSet; | ||
126 | bool m_AppFocused; | ||
127 | bool m_renderGUI; | ||
128 | |||
129 | diff --git a/xbmc/platform/posix/main.cpp b/xbmc/platform/posix/main.cpp | ||
130 | index a8b64e5..3d80032 100644 | ||
131 | --- a/xbmc/platform/posix/main.cpp | ||
132 | +++ b/xbmc/platform/posix/main.cpp | ||
133 | @@ -41,12 +41,27 @@ | ||
134 | #include "input/linux/LIRC.h" | ||
135 | #endif | ||
136 | #include "platform/XbmcContext.h" | ||
137 | +#include "Application.h" | ||
138 | + | ||
139 | +void xbmc_term_handler(int signum) | ||
140 | +{ | ||
141 | + CLog::Log(LOGINFO, "Received SIGTERM..."); | ||
142 | + if (!g_application.m_ExitCodeSet) | ||
143 | + g_application.SetExitCode(EXITCODE_RESTARTAPP); | ||
144 | + g_application.Stop(EXITCODE_RESTARTAPP); | ||
145 | +} | ||
146 | |||
147 | #ifdef __cplusplus | ||
148 | extern "C" | ||
149 | #endif | ||
150 | int main(int argc, char* argv[]) | ||
151 | { | ||
152 | + // SIGTERM handler | ||
153 | + struct sigaction action; | ||
154 | + memset(&action, 0, sizeof(struct sigaction)); | ||
155 | + action.sa_handler = xbmc_term_handler; | ||
156 | + sigaction(SIGTERM, &action, NULL); | ||
157 | + | ||
158 | // set up some xbmc specific relationships | ||
159 | XBMC::Context context; | ||
160 | |||
161 | -- | ||
162 | 2.10.1 | ||
163 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0003-add-support-to-read-frequency-output-if-using-intel-.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0003-add-support-to-read-frequency-output-if-using-intel-.patch new file mode 100644 index 000000000..d638550e9 --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0003-add-support-to-read-frequency-output-if-using-intel-.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From 4ef1e9dab9193f1a5305d25c8eda97f8f06ea154 Mon Sep 17 00:00:00 2001 | ||
2 | From: Stephan Raue <stephan@openelec.tv> | ||
3 | Date: Mon, 1 Sep 2014 03:16:37 +0200 | ||
4 | Subject: [PATCH 3/3] add support to read frequency output if using intel's | ||
5 | pstate driver | ||
6 | |||
7 | --- | ||
8 | xbmc/utils/CPUInfo.cpp | 2 ++ | ||
9 | 1 file changed, 2 insertions(+) | ||
10 | |||
11 | diff --git a/xbmc/utils/CPUInfo.cpp b/xbmc/utils/CPUInfo.cpp | ||
12 | index 5e2ebbd..fd04d5a 100644 | ||
13 | --- a/xbmc/utils/CPUInfo.cpp | ||
14 | +++ b/xbmc/utils/CPUInfo.cpp | ||
15 | @@ -274,6 +274,8 @@ CCPUInfo::CCPUInfo(void) | ||
16 | m_fProcTemperature = fopen("/sys/class/thermal/thermal_zone0/temp", "r"); // On Raspberry PIs | ||
17 | |||
18 | m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq", "r"); | ||
19 | + if (m_fCPUFreq == NULL) | ||
20 | + m_fCPUFreq = fopen ("/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq", "r"); | ||
21 | if (!m_fCPUFreq) | ||
22 | { | ||
23 | m_cpuInfoForFreq = true; | ||
24 | -- | ||
25 | 2.10.1 | ||
26 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0004-Disable-DVD-support.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0004-Disable-DVD-support.patch new file mode 100644 index 000000000..6f5f9a232 --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0004-Disable-DVD-support.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 191cf3f084b4d34846711034a7fe3078f8243c82 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 2 Nov 2016 12:39:20 -0700 | ||
4 | Subject: [PATCH 4/4] Disable DVD support | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | Makefile.in | 4 +--- | ||
9 | 1 file changed, 1 insertion(+), 3 deletions(-) | ||
10 | |||
11 | diff --git a/Makefile.in b/Makefile.in | ||
12 | index 58b3a17..b7c3fce 100644 | ||
13 | --- a/Makefile.in | ||
14 | +++ b/Makefile.in | ||
15 | @@ -10,8 +10,7 @@ EC_DIRS= \ | ||
16 | tools/EventClients | ||
17 | |||
18 | DVDPCODECS_DIRS= \ | ||
19 | - lib \ | ||
20 | - lib/libdvd | ||
21 | + lib | ||
22 | |||
23 | VideoPlayer_ARCHIVES=xbmc/cores/VideoPlayer/VideoPlayer.a \ | ||
24 | xbmc/cores/VideoPlayer/DVDCodecs/DVDCodecs.a \ | ||
25 | @@ -343,7 +342,6 @@ libaddon: exports | ||
26 | $(MAKE) -C lib/addons/library.xbmc.pvr | ||
27 | $(MAKE) -C lib/addons/library.kodi.inputstream | ||
28 | dvdpcodecs: dllloader | ||
29 | - $(MAKE) -C lib/libdvd | ||
30 | |||
31 | dvdpextcodecs: | ||
32 | |||
33 | -- | ||
34 | 2.10.1 | ||
35 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch new file mode 100644 index 000000000..c4a6ae731 --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts/0001-Update-to-p8-platform.patch | |||
@@ -0,0 +1,427 @@ | |||
1 | From 06a8224c99282ac1a606edd9e8ea3f591112942d Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Thu, 18 Feb 2016 14:04:31 +0100 | ||
4 | Subject: [PATCH] Update to p8-platform | ||
5 | |||
6 | --- | ||
7 | CMakeLists.txt | 6 +++--- | ||
8 | pvr.hts/changelog.txt | 4 ++-- | ||
9 | src/AutoRecordings.cpp | 2 +- | ||
10 | src/HTSPConnection.cpp | 8 +++---- | ||
11 | src/HTSPDemuxer.cpp | 2 +- | ||
12 | src/HTSPVFS.cpp | 6 +++--- | ||
13 | src/TimeRecordings.cpp | 2 +- | ||
14 | src/Tvheadend.cpp | 4 ++-- | ||
15 | src/Tvheadend.h | 38 +++++++++++++++++----------------- | ||
16 | src/client.cpp | 4 ++-- | ||
17 | src/client.h | 4 ++-- | ||
18 | src/tvheadend/Subscription.cpp | 2 +- | ||
19 | src/tvheadend/Subscription.h | 4 ++-- | ||
20 | src/tvheadend/utilities/AsyncState.cpp | 4 ++-- | ||
21 | src/tvheadend/utilities/AsyncState.h | 6 +++--- | ||
22 | 15 files changed, 48 insertions(+), 48 deletions(-) | ||
23 | |||
24 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
25 | index 0842682..cb04942 100644 | ||
26 | --- a/CMakeLists.txt | ||
27 | +++ b/CMakeLists.txt | ||
28 | @@ -6,10 +6,10 @@ enable_language(CXX) | ||
29 | |||
30 | find_package(kodi REQUIRED) | ||
31 | find_package(kodiplatform REQUIRED) | ||
32 | -find_package(platform REQUIRED) | ||
33 | +find_package(p8-platform REQUIRED) | ||
34 | |||
35 | include_directories(${kodiplatform_INCLUDE_DIRS} | ||
36 | - ${platform_INCLUDE_DIRS} | ||
37 | + ${p8-platform_INCLUDE_DIRS} | ||
38 | ${KODI_INCLUDE_DIR} | ||
39 | ${PROJECT_SOURCE_DIR}/lib) | ||
40 | |||
41 | @@ -95,7 +95,7 @@ list(APPEND HTS_SOURCES | ||
42 | |||
43 | add_subdirectory(lib/libhts) | ||
44 | |||
45 | -set(DEPLIBS ${platform_LIBRARIES} hts) | ||
46 | +set(DEPLIBS ${p8-platform_LIBRARIES} hts) | ||
47 | if(WIN32) | ||
48 | list(APPEND DEPLIBS ws2_32) | ||
49 | endif() | ||
50 | diff --git a/pvr.hts/changelog.txt b/pvr.hts/changelog.txt | ||
51 | index 9ffa33c..1e7fe30 100644 | ||
52 | --- a/pvr.hts/changelog.txt | ||
53 | +++ b/pvr.hts/changelog.txt | ||
54 | @@ -49,7 +49,7 @@ | ||
55 | - fixed: Autorec: Start and stop time handling. | ||
56 | - fixed: LocaltimeToUTC conversion (timer settings clock display incorrect). | ||
57 | - fixed: Several issues with predictive tuning. | ||
58 | -- added: build: Automatically fill in platform and library name. | ||
59 | +- added: build: Automatically fill in p8-platform and library name. | ||
60 | - fixed: Use epg data only for creation of epg-based timers. | ||
61 | - improved: Do not try to reconnect to tvh while suspending or not fully awake again. | ||
62 | |||
63 | @@ -97,7 +97,7 @@ | ||
64 | - added: support for creating repeating timers, aka time schedules | ||
65 | - fixed: conditions for addon restart after settings changes | ||
66 | - internal: fixed build system regressions introduced with move to cmake | ||
67 | -- internal: updated to use libplatform | ||
68 | +- internal: updated to use libp8-platform | ||
69 | |||
70 | 2.1.7 | ||
71 | - added: support for radio channel groups | ||
72 | diff --git a/src/AutoRecordings.cpp b/src/AutoRecordings.cpp | ||
73 | index 5fa60a0..d9e5e1d 100644 | ||
74 | --- a/src/AutoRecordings.cpp | ||
75 | +++ b/src/AutoRecordings.cpp | ||
76 | @@ -26,7 +26,7 @@ | ||
77 | #include "tvheadend/utilities/Utilities.h" | ||
78 | #include "tvheadend/utilities/Logger.h" | ||
79 | |||
80 | -using namespace PLATFORM; | ||
81 | +using namespace P8PLATFORM; | ||
82 | using namespace tvheadend; | ||
83 | using namespace tvheadend::entity; | ||
84 | using namespace tvheadend::utilities; | ||
85 | diff --git a/src/HTSPConnection.cpp b/src/HTSPConnection.cpp | ||
86 | index aec1296..86f5004 100644 | ||
87 | --- a/src/HTSPConnection.cpp | ||
88 | +++ b/src/HTSPConnection.cpp | ||
89 | @@ -19,9 +19,9 @@ | ||
90 | * | ||
91 | */ | ||
92 | |||
93 | -#include "platform/threads/mutex.h" | ||
94 | -#include "platform/util/StringUtils.h" | ||
95 | -#include "platform/sockets/tcp.h" | ||
96 | +#include "p8-platform/threads/mutex.h" | ||
97 | +#include "p8-platform/util/StringUtils.h" | ||
98 | +#include "p8-platform/sockets/tcp.h" | ||
99 | |||
100 | extern "C" { | ||
101 | #include "libhts/htsmsg_binary.h" | ||
102 | @@ -33,7 +33,7 @@ extern "C" { | ||
103 | |||
104 | using namespace std; | ||
105 | using namespace ADDON; | ||
106 | -using namespace PLATFORM; | ||
107 | +using namespace P8PLATFORM; | ||
108 | using namespace tvheadend; | ||
109 | using namespace tvheadend::utilities; | ||
110 | |||
111 | diff --git a/src/HTSPDemuxer.cpp b/src/HTSPDemuxer.cpp | ||
112 | index a6e1f12..7f45345 100644 | ||
113 | --- a/src/HTSPDemuxer.cpp | ||
114 | +++ b/src/HTSPDemuxer.cpp | ||
115 | @@ -27,7 +27,7 @@ | ||
116 | |||
117 | using namespace std; | ||
118 | using namespace ADDON; | ||
119 | -using namespace PLATFORM; | ||
120 | +using namespace P8PLATFORM; | ||
121 | using namespace tvheadend; | ||
122 | using namespace tvheadend::utilities; | ||
123 | |||
124 | diff --git a/src/HTSPVFS.cpp b/src/HTSPVFS.cpp | ||
125 | index 0463f56..0404bab 100644 | ||
126 | --- a/src/HTSPVFS.cpp | ||
127 | +++ b/src/HTSPVFS.cpp | ||
128 | @@ -19,8 +19,8 @@ | ||
129 | * | ||
130 | */ | ||
131 | |||
132 | -#include "platform/threads/mutex.h" | ||
133 | -#include "platform/util/StringUtils.h" | ||
134 | +#include "p8-platform/threads/mutex.h" | ||
135 | +#include "p8-platform/util/StringUtils.h" | ||
136 | #include "tvheadend/utilities/Logger.h" | ||
137 | |||
138 | extern "C" { | ||
139 | @@ -30,7 +30,7 @@ extern "C" { | ||
140 | #include "Tvheadend.h" | ||
141 | |||
142 | using namespace std; | ||
143 | -using namespace PLATFORM; | ||
144 | +using namespace P8PLATFORM; | ||
145 | using namespace tvheadend::utilities; | ||
146 | |||
147 | /* | ||
148 | diff --git a/src/TimeRecordings.cpp b/src/TimeRecordings.cpp | ||
149 | index 5d34938..97aae09 100644 | ||
150 | --- a/src/TimeRecordings.cpp | ||
151 | +++ b/src/TimeRecordings.cpp | ||
152 | @@ -25,7 +25,7 @@ | ||
153 | #include "tvheadend/utilities/Utilities.h" | ||
154 | #include "tvheadend/utilities/Logger.h" | ||
155 | |||
156 | -using namespace PLATFORM; | ||
157 | +using namespace P8PLATFORM; | ||
158 | using namespace tvheadend; | ||
159 | using namespace tvheadend::entity; | ||
160 | using namespace tvheadend::utilities; | ||
161 | diff --git a/src/Tvheadend.cpp b/src/Tvheadend.cpp | ||
162 | index 2057241..14c3bd4 100644 | ||
163 | --- a/src/Tvheadend.cpp | ||
164 | +++ b/src/Tvheadend.cpp | ||
165 | @@ -23,7 +23,7 @@ | ||
166 | #include <ctime> | ||
167 | #include <memory> | ||
168 | |||
169 | -#include "platform/util/StringUtils.h" | ||
170 | +#include "p8-platform/util/StringUtils.h" | ||
171 | |||
172 | #include "Tvheadend.h" | ||
173 | #include "tvheadend/utilities/Utilities.h" | ||
174 | @@ -31,7 +31,7 @@ | ||
175 | |||
176 | using namespace std; | ||
177 | using namespace ADDON; | ||
178 | -using namespace PLATFORM; | ||
179 | +using namespace P8PLATFORM; | ||
180 | using namespace tvheadend; | ||
181 | using namespace tvheadend::entity; | ||
182 | using namespace tvheadend::utilities; | ||
183 | diff --git a/src/Tvheadend.h b/src/Tvheadend.h | ||
184 | index 2ce4552..e794716 100644 | ||
185 | --- a/src/Tvheadend.h | ||
186 | +++ b/src/Tvheadend.h | ||
187 | @@ -22,10 +22,10 @@ | ||
188 | */ | ||
189 | |||
190 | #include "client.h" | ||
191 | -#include "platform/sockets/tcp.h" | ||
192 | -#include "platform/threads/threads.h" | ||
193 | -#include "platform/threads/mutex.h" | ||
194 | -#include "platform/util/buffer.h" | ||
195 | +#include "p8-platform/sockets/tcp.h" | ||
196 | +#include "p8-platform/threads/threads.h" | ||
197 | +#include "p8-platform/threads/mutex.h" | ||
198 | +#include "p8-platform/util/buffer.h" | ||
199 | #include "kodi/xbmc_codec_types.h" | ||
200 | #include "kodi/xbmc_stream_utils.hpp" | ||
201 | #include "kodi/libXBMC_addon.h" | ||
202 | @@ -88,7 +88,7 @@ class CHTSPMessage; | ||
203 | |||
204 | /* Typedefs */ | ||
205 | typedef std::map<uint32_t,CHTSPResponse*> CHTSPResponseList; | ||
206 | -typedef PLATFORM::SyncedBuffer<CHTSPMessage> CHTSPMessageQueue; | ||
207 | +typedef P8PLATFORM::SyncedBuffer<CHTSPMessage> CHTSPMessageQueue; | ||
208 | |||
209 | /* | ||
210 | * HTSP Response handler | ||
211 | @@ -98,10 +98,10 @@ class CHTSPResponse | ||
212 | public: | ||
213 | CHTSPResponse(); | ||
214 | ~CHTSPResponse(); | ||
215 | - htsmsg_t *Get ( PLATFORM::CMutex &mutex, uint32_t timeout ); | ||
216 | + htsmsg_t *Get ( P8PLATFORM::CMutex &mutex, uint32_t timeout ); | ||
217 | void Set ( htsmsg_t *m ); | ||
218 | private: | ||
219 | - PLATFORM::CCondition<volatile bool> m_cond; | ||
220 | + P8PLATFORM::CCondition<volatile bool> m_cond; | ||
221 | bool m_flag; | ||
222 | htsmsg_t *m_msg; | ||
223 | }; | ||
224 | @@ -146,7 +146,7 @@ public: | ||
225 | * HTSP Connection registration thread | ||
226 | */ | ||
227 | class CHTSPRegister | ||
228 | - : public PLATFORM::CThread | ||
229 | + : public P8PLATFORM::CThread | ||
230 | { | ||
231 | friend class CHTSPConnection; | ||
232 | |||
233 | @@ -163,7 +163,7 @@ private: | ||
234 | * HTSP Connection | ||
235 | */ | ||
236 | class CHTSPConnection | ||
237 | - : public PLATFORM::CThread | ||
238 | + : public P8PLATFORM::CThread | ||
239 | { | ||
240 | friend class CHTSPRegister; | ||
241 | |||
242 | @@ -190,7 +190,7 @@ public: | ||
243 | inline bool IsConnected ( void ) const { return m_ready; } | ||
244 | bool WaitForConnection ( void ); | ||
245 | |||
246 | - inline PLATFORM::CMutex& Mutex ( void ) { return m_mutex; } | ||
247 | + inline P8PLATFORM::CMutex& Mutex ( void ) { return m_mutex; } | ||
248 | |||
249 | void OnSleep ( void ); | ||
250 | void OnWake ( void ); | ||
251 | @@ -202,10 +202,10 @@ private: | ||
252 | bool SendHello ( void ); | ||
253 | bool SendAuth ( const std::string &u, const std::string &p ); | ||
254 | |||
255 | - PLATFORM::CTcpSocket *m_socket; | ||
256 | - PLATFORM::CMutex m_mutex; | ||
257 | + P8PLATFORM::CTcpSocket *m_socket; | ||
258 | + P8PLATFORM::CMutex m_mutex; | ||
259 | CHTSPRegister m_regThread; | ||
260 | - PLATFORM::CCondition<volatile bool> m_regCond; | ||
261 | + P8PLATFORM::CCondition<volatile bool> m_regCond; | ||
262 | bool m_ready; | ||
263 | uint32_t m_seq; | ||
264 | std::string m_serverName; | ||
265 | @@ -273,13 +273,13 @@ public: | ||
266 | void SetStreamingProfile(const std::string &profile); | ||
267 | |||
268 | private: | ||
269 | - PLATFORM::CMutex m_mutex; | ||
270 | + P8PLATFORM::CMutex m_mutex; | ||
271 | CHTSPConnection &m_conn; | ||
272 | - PLATFORM::SyncedBuffer<DemuxPacket*> m_pktBuffer; | ||
273 | + P8PLATFORM::SyncedBuffer<DemuxPacket*> m_pktBuffer; | ||
274 | ADDON::XbmcStreamProperties m_streams; | ||
275 | std::map<int,int> m_streamStat; | ||
276 | int64_t m_seekTime; | ||
277 | - PLATFORM::CCondition<volatile int64_t> m_seekCond; | ||
278 | + P8PLATFORM::CCondition<volatile int64_t> m_seekCond; | ||
279 | bool m_seeking; | ||
280 | bool m_speedChange; | ||
281 | tvheadend::status::SourceInfo m_sourceInfo; | ||
282 | @@ -350,7 +350,7 @@ private: | ||
283 | * Root object for Tvheadend connection | ||
284 | */ | ||
285 | class CTvheadend | ||
286 | - : public PLATFORM::CThread | ||
287 | + : public P8PLATFORM::CThread | ||
288 | { | ||
289 | public: | ||
290 | CTvheadend(); | ||
291 | @@ -422,7 +422,7 @@ private: | ||
292 | */ | ||
293 | tvheadend::Profiles m_profiles; | ||
294 | |||
295 | - PLATFORM::CMutex m_mutex; | ||
296 | + P8PLATFORM::CMutex m_mutex; | ||
297 | |||
298 | CHTSPConnection m_conn; | ||
299 | |||
300 | @@ -519,7 +519,7 @@ public: | ||
301 | */ | ||
302 | bool WaitForConnection ( void ) | ||
303 | { | ||
304 | - PLATFORM::CLockObject lock(m_conn.Mutex()); | ||
305 | + P8PLATFORM::CLockObject lock(m_conn.Mutex()); | ||
306 | return m_conn.WaitForConnection(); | ||
307 | } | ||
308 | std::string GetServerName ( void ) | ||
309 | diff --git a/src/client.cpp b/src/client.cpp | ||
310 | index 94d2db9..3295914 100644 | ||
311 | --- a/src/client.cpp | ||
312 | +++ b/src/client.cpp | ||
313 | @@ -22,14 +22,14 @@ | ||
314 | #include "client.h" | ||
315 | #include "kodi/xbmc_pvr_dll.h" | ||
316 | #include "kodi/libKODI_guilib.h" | ||
317 | -#include "platform/util/util.h" | ||
318 | +#include "p8-platform/util/util.h" | ||
319 | #include "Tvheadend.h" | ||
320 | #include "tvheadend/Settings.h" | ||
321 | #include "tvheadend/utilities/Logger.h" | ||
322 | |||
323 | using namespace std; | ||
324 | using namespace ADDON; | ||
325 | -using namespace PLATFORM; | ||
326 | +using namespace P8PLATFORM; | ||
327 | using namespace tvheadend; | ||
328 | using namespace tvheadend::utilities; | ||
329 | |||
330 | diff --git a/src/client.h b/src/client.h | ||
331 | index 3a5f950..a10659b 100644 | ||
332 | --- a/src/client.h | ||
333 | +++ b/src/client.h | ||
334 | @@ -20,8 +20,8 @@ | ||
335 | * | ||
336 | */ | ||
337 | |||
338 | -#include "platform/os.h" | ||
339 | -#include "platform/threads/mutex.h" | ||
340 | +#include "p8-platform/os.h" | ||
341 | +#include "p8-platform/threads/mutex.h" | ||
342 | #include "kodi/libXBMC_addon.h" | ||
343 | #include "kodi/libXBMC_pvr.h" | ||
344 | #include "kodi/libXBMC_codec.h" | ||
345 | diff --git a/src/tvheadend/Subscription.cpp b/src/tvheadend/Subscription.cpp | ||
346 | index 182ca7f..e18af1e 100644 | ||
347 | --- a/src/tvheadend/Subscription.cpp | ||
348 | +++ b/src/tvheadend/Subscription.cpp | ||
349 | @@ -23,7 +23,7 @@ | ||
350 | #include "utilities/Logger.h" | ||
351 | #include "../Tvheadend.h" | ||
352 | |||
353 | -using namespace PLATFORM; | ||
354 | +using namespace P8PLATFORM; | ||
355 | using namespace tvheadend; | ||
356 | using namespace tvheadend::utilities; | ||
357 | |||
358 | diff --git a/src/tvheadend/Subscription.h b/src/tvheadend/Subscription.h | ||
359 | index b03bcce..363e5ef 100644 | ||
360 | --- a/src/tvheadend/Subscription.h | ||
361 | +++ b/src/tvheadend/Subscription.h | ||
362 | @@ -22,7 +22,7 @@ | ||
363 | */ | ||
364 | |||
365 | #include <string> | ||
366 | -#include "platform/threads/mutex.h" | ||
367 | +#include "p8-platform/threads/mutex.h" | ||
368 | |||
369 | extern "C" | ||
370 | { | ||
371 | @@ -146,6 +146,6 @@ namespace tvheadend | ||
372 | std::string m_profile; | ||
373 | CHTSPConnection &m_conn; | ||
374 | |||
375 | - mutable PLATFORM::CMutex m_mutex; | ||
376 | + mutable P8PLATFORM::CMutex m_mutex; | ||
377 | }; | ||
378 | } | ||
379 | diff --git a/src/tvheadend/utilities/AsyncState.cpp b/src/tvheadend/utilities/AsyncState.cpp | ||
380 | index 0c30a93..1f4fdf3 100644 | ||
381 | --- a/src/tvheadend/utilities/AsyncState.cpp | ||
382 | +++ b/src/tvheadend/utilities/AsyncState.cpp | ||
383 | @@ -22,7 +22,7 @@ | ||
384 | #include "AsyncState.h" | ||
385 | |||
386 | using namespace tvheadend::utilities; | ||
387 | -using namespace PLATFORM; | ||
388 | +using namespace P8PLATFORM; | ||
389 | |||
390 | struct Param { | ||
391 | eAsyncState state; | ||
392 | @@ -37,7 +37,7 @@ AsyncState::AsyncState(int timeout) | ||
393 | |||
394 | eAsyncState AsyncState::GetState() | ||
395 | { | ||
396 | - PLATFORM::CLockObject lock(m_mutex); | ||
397 | + P8PLATFORM::CLockObject lock(m_mutex); | ||
398 | return m_state; | ||
399 | } | ||
400 | |||
401 | diff --git a/src/tvheadend/utilities/AsyncState.h b/src/tvheadend/utilities/AsyncState.h | ||
402 | index 1d672da..0819cd8 100644 | ||
403 | --- a/src/tvheadend/utilities/AsyncState.h | ||
404 | +++ b/src/tvheadend/utilities/AsyncState.h | ||
405 | @@ -22,7 +22,7 @@ | ||
406 | #ifndef ASYNCSTATE_H | ||
407 | #define ASYNCSTATE_H | ||
408 | |||
409 | -#include "platform/threads/mutex.h" | ||
410 | +#include "p8-platform/threads/mutex.h" | ||
411 | |||
412 | namespace tvheadend { | ||
413 | namespace utilities { | ||
414 | @@ -75,8 +75,8 @@ namespace tvheadend { | ||
415 | static bool PredicateCallback ( void *param ); | ||
416 | |||
417 | eAsyncState m_state; | ||
418 | - PLATFORM::CMutex m_mutex; | ||
419 | - PLATFORM::CCondition<bool> m_condition; | ||
420 | + P8PLATFORM::CMutex m_mutex; | ||
421 | + P8PLATFORM::CCondition<bool> m_condition; | ||
422 | int m_timeout; | ||
423 | |||
424 | }; | ||
425 | -- | ||
426 | 2.0.1 | ||
427 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb new file mode 100644 index 000000000..1f33a8a39 --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-addon-pvr-hts_git.bb | |||
@@ -0,0 +1,55 @@ | |||
1 | SUMMARY = "Kodi Media Center PVR plugins" | ||
2 | |||
3 | LICENSE = "GPLv2+" | ||
4 | LIC_FILES_CHKSUM = "file://src/client.cpp;md5=c8f6b73c5bc1048a3d6506700a7a91d2" | ||
5 | |||
6 | DEPENDS = " \ | ||
7 | zip-native \ | ||
8 | p8platform \ | ||
9 | kodi-platform \ | ||
10 | " | ||
11 | |||
12 | SRCREV_pvrhts = "7f75b70527922aef953123ff97ebaa22d9fb7cb4" | ||
13 | |||
14 | SRCREV_FORMAT = "pvrhts" | ||
15 | |||
16 | PV = "2.2.13+gitr${SRCPV}" | ||
17 | SRC_URI = "git://github.com/kodi-pvr/pvr.hts.git;branch=Jarvis;destsuffix=pvr.hts;name=pvrhts \ | ||
18 | file://0001-Update-to-p8-platform.patch \ | ||
19 | " | ||
20 | |||
21 | inherit cmake pkgconfig gettext | ||
22 | |||
23 | S = "${WORKDIR}/pvr.hts" | ||
24 | |||
25 | EXTRA_OECMAKE = " \ | ||
26 | -DADDONS_TO_BUILD=pvr.hts \ | ||
27 | -DADDON_SRC_PREFIX=${WORKDIR}/git \ | ||
28 | -DCMAKE_BUILD_TYPE=Debug \ | ||
29 | -DCMAKE_INSTALL_PREFIX=${datadir}/kodi/addons \ | ||
30 | -DCMAKE_MODULE_PATH=${STAGING_DIR_HOST}${libdir}/kodi \ | ||
31 | -DCMAKE_PREFIX_PATH=${STAGING_DIR_HOST}${prefix} \ | ||
32 | -DPACKAGE_ZIP=1 \ | ||
33 | " | ||
34 | |||
35 | do_compile_prepend() { | ||
36 | sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' \ | ||
37 | -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g' \ | ||
38 | ${B}/CMakeFiles/*/flags.make | ||
39 | sed -i -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g'\ | ||
40 | ${B}/CMakeFiles/*/link.txt | ||
41 | } | ||
42 | |||
43 | # Make zip package for manual installation | ||
44 | do_install_append() { | ||
45 | install -d ${D}${datadir}/kodi/addons/packages/ | ||
46 | ( cd ${D}${datadir}/kodi/addons | ||
47 | zip -r ${D}${datadir}/kodi/addons/packages/pvr.hts-${PV}.zip pvr.hts -x '*.debug*' ) | ||
48 | } | ||
49 | |||
50 | # Doesn't get added automagically, dlopen()? | ||
51 | RDEPENDS_${PN} = "libkodiplatform" | ||
52 | |||
53 | INSANE_SKIP_${PN} = "dev-so" | ||
54 | FILES_${PN} += "${datadir}/kodi" | ||
55 | FILES_${PN}-dbg += "${datadir}/kodi/addons/*/.debug/" | ||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch new file mode 100644 index 000000000..35e51342f --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-Fix-build-after-platform-rename.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From 7cf366faa7a24c7146c745c8cd8dc3ae3d1cabea Mon Sep 17 00:00:00 2001 | ||
2 | From: Garrett Brown <themagnificentmrb@gmail.com> | ||
3 | Date: Thu, 7 Jan 2016 15:55:22 -0800 | ||
4 | Subject: [PATCH] Fix build after platform rename | ||
5 | |||
6 | update source code to use renamed platform pkg | ||
7 | --- | ||
8 | CMakeLists.txt | 6 +++--- | ||
9 | debian/control | 2 +- | ||
10 | src/util/XMLUtils.h | 2 +- | ||
11 | 3 files changed, 5 insertions(+), 5 deletions(-) | ||
12 | |||
13 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
14 | index 2ce8c0d..bf6b659 100644 | ||
15 | --- a/CMakeLists.txt | ||
16 | +++ b/CMakeLists.txt | ||
17 | @@ -8,7 +8,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}) | ||
18 | find_package(kodi REQUIRED) | ||
19 | find_package(TinyXML REQUIRED) | ||
20 | find_package(Threads REQUIRED) | ||
21 | -find_package(platform REQUIRED) | ||
22 | +find_package(p8-platform REQUIRED) | ||
23 | include(UseMultiArch.cmake) | ||
24 | include(CheckAtomic.cmake) | ||
25 | |||
26 | @@ -36,10 +36,10 @@ endif() | ||
27 | |||
28 | set(SOURCES src/util/XMLUtils.cpp) | ||
29 | |||
30 | -include_directories(${TINYXML_INCLUDE_DIR} ${KODI_INCLUDE_DIR} ${platform_INCLUDE_DIRS}) | ||
31 | +include_directories(${TINYXML_INCLUDE_DIR} ${KODI_INCLUDE_DIR} ${p8-platform_INCLUDE_DIRS}) | ||
32 | |||
33 | add_library(kodiplatform ${SOURCES} ${PLAT_SOURCES}) | ||
34 | -target_link_libraries(kodiplatform ${kodiplatform_LIBRARIES} ${platform_LIBRARIES}) | ||
35 | +target_link_libraries(kodiplatform ${kodiplatform_LIBRARIES} ${p8-platform_LIBRARIES}) | ||
36 | set_target_properties(kodiplatform PROPERTIES VERSION ${kodiplatform_VERSION_MAJOR}.${kodiplatform_VERSION_MINOR}.${kodiplatform_VERSION_PATCH} | ||
37 | SOVERSION ${kodiplatform_VERSION_MAJOR}.0) | ||
38 | |||
39 | diff --git a/debian/control b/debian/control | ||
40 | index 42cadb2..e40c982 100644 | ||
41 | --- a/debian/control | ||
42 | +++ b/debian/control | ||
43 | @@ -1,7 +1,7 @@ | ||
44 | Source: kodiplatform | ||
45 | Priority: extra | ||
46 | Maintainer: Arne Morten Kvarving <arne.morten.kvarving@sintef.no> | ||
47 | -Build-Depends: debhelper (>= 8.0.0), cmake, libtinyxml-dev, kodi-addon-dev, libplatform-dev | ||
48 | +Build-Depends: debhelper (>= 8.0.0), cmake, libtinyxml-dev, kodi-addon-dev, libp8-platform-dev | ||
49 | Standards-Version: 3.9.2 | ||
50 | Section: libs | ||
51 | |||
52 | diff --git a/src/util/XMLUtils.h b/src/util/XMLUtils.h | ||
53 | index f22fd07..a10d831 100644 | ||
54 | --- a/src/util/XMLUtils.h | ||
55 | +++ b/src/util/XMLUtils.h | ||
56 | @@ -21,7 +21,7 @@ | ||
57 | * | ||
58 | */ | ||
59 | |||
60 | -#include <platform/util/StdString.h> | ||
61 | +#include <p8-platform/util/StdString.h> | ||
62 | #include "tinyxml.h" | ||
63 | |||
64 | class XMLUtils | ||
65 | -- | ||
66 | 2.0.1 | ||
67 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch new file mode 100644 index 000000000..27e9d217c --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/0001-fix-cross-compile-badness.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 3136317f096ea7fda4fb907e775a01952c4aae3d Mon Sep 17 00:00:00 2001 | ||
2 | From: Stefan Saraev <stefan@saraev.ca> | ||
3 | Date: Fri, 19 Feb 2016 10:33:00 +0100 | ||
4 | Subject: [PATCH] fix cross compile badness | ||
5 | |||
6 | From https://github.com/OpenELEC/OpenELEC.tv/blob/master/packages/mediacenter/kodi-platform/patches/kodi-platform-01_crosscompile-badness.patch | ||
7 | --- | ||
8 | CMakeLists.txt | 2 +- | ||
9 | kodiplatform-config.cmake.in | 2 +- | ||
10 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
13 | index bf6b659..9abe773 100644 | ||
14 | --- a/CMakeLists.txt | ||
15 | +++ b/CMakeLists.txt | ||
16 | @@ -22,7 +22,7 @@ if(NOT WIN32) | ||
17 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") | ||
18 | endif() | ||
19 | |||
20 | -set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX}/include/kodi") | ||
21 | +set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX_TOOLCHAIN}/include/kodi") | ||
22 | IF(WIN32) | ||
23 | LIST(APPEND kodiplatform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/kodi/windows") | ||
24 | ENDIF(WIN32) | ||
25 | diff --git a/kodiplatform-config.cmake.in b/kodiplatform-config.cmake.in | ||
26 | index 3fc5273..60bdf1b 100644 | ||
27 | --- a/kodiplatform-config.cmake.in | ||
28 | +++ b/kodiplatform-config.cmake.in | ||
29 | @@ -10,7 +10,7 @@ | ||
30 | # | ||
31 | # propagate these properties from one build system to the other | ||
32 | set (kodiplatform_VERSION "@kodiplatform_VERSION_MAJOR@.@kodiplatform_VERSION_MINOR@") | ||
33 | -set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include) | ||
34 | +set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX_TOOLCHAIN@/include) | ||
35 | set (kodiplatform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@") | ||
36 | set (kodiplatform_LINKER_FLAGS "@kodiplatform_LINKER_FLAGS@") | ||
37 | set (kodiplatform_CONFIG_VARS "@kodiplatform_CONFIG_VARS@") | ||
38 | -- | ||
39 | 2.0.1 | ||
40 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch new file mode 100644 index 000000000..a13c53be1 --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform/kodi-platform-02_no-multi-lib.patch | |||
@@ -0,0 +1,12 @@ | |||
1 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
2 | index 9abe773..ae433fc 100644 | ||
3 | --- a/CMakeLists.txt | ||
4 | +++ b/CMakeLists.txt | ||
5 | @@ -9,7 +9,6 @@ find_package(kodi REQUIRED) | ||
6 | find_package(TinyXML REQUIRED) | ||
7 | find_package(Threads REQUIRED) | ||
8 | find_package(p8-platform REQUIRED) | ||
9 | -include(UseMultiArch.cmake) | ||
10 | include(CheckAtomic.cmake) | ||
11 | |||
12 | set(kodiplatform_NAME kodiplatform) | ||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb new file mode 100644 index 000000000..50774544b --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-platform_git.bb | |||
@@ -0,0 +1,39 @@ | |||
1 | SUMMARY = "Platform support library used by libCEC and binary add-ons for Kodi" | ||
2 | HOMEPAGE = "http://libcec.pulse-eight.com/" | ||
3 | |||
4 | LICENSE = "GPLv2+" | ||
5 | LIC_FILES_CHKSUM = "file://src/util/XMLUtils.cpp;beginline=2;endline=18;md5=dae8e846500e70dd8ecee55f3f018c30" | ||
6 | |||
7 | DEPENDS = "libtinyxml kodi" | ||
8 | |||
9 | PV = "16.0.0" | ||
10 | |||
11 | SRCREV = "15edaf78d6307eaa5e1d17028122d8bce9d55aa2" | ||
12 | SRC_URI = "git://github.com/xbmc/kodi-platform.git \ | ||
13 | file://0001-Fix-build-after-platform-rename.patch \ | ||
14 | file://0001-fix-cross-compile-badness.patch \ | ||
15 | file://kodi-platform-02_no-multi-lib.patch \ | ||
16 | " | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | inherit cmake pkgconfig | ||
21 | |||
22 | EXTRA_OECMAKE = " -DCMAKE_INSTALL_PREFIX_TOOLCHAIN=${STAGING_DIR_TARGET} \ | ||
23 | -DCMAKE_INSTALL_LIBDIR=${libdir} \ | ||
24 | -DCMAKE_INSTALL_LIBDIR_NOARCH=${libdir} \ | ||
25 | -DKODI_INCLUDE_DIR=${STAGING_LIBDIR}/kodi \ | ||
26 | -DKODI_INCLUDE_DIR=${STAGING_INCDIR}/kodi \ | ||
27 | " | ||
28 | |||
29 | do_compile_prepend() { | ||
30 | sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' \ | ||
31 | -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g' \ | ||
32 | ${B}/CMakeFiles/kodiplatform.dir/flags.make | ||
33 | sed -i -e 's:-pipe:${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} -pipe:g'\ | ||
34 | ${B}/CMakeFiles/kodiplatform.dir/link.txt | ||
35 | } | ||
36 | |||
37 | RPROVIDES_${PN} += "libkodiplatform" | ||
38 | FILES_${PN}-dev += "${libdir}/*platform" | ||
39 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb new file mode 100644 index 000000000..955d02bf7 --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup.bb | |||
@@ -0,0 +1,20 @@ | |||
1 | SUMMARY = "Systemd service for kodi startup" | ||
2 | |||
3 | LICENSE = "MIT" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" | ||
5 | |||
6 | PV = "1.0" | ||
7 | |||
8 | SRC_URI = "file://kodi.service" | ||
9 | |||
10 | inherit systemd | ||
11 | |||
12 | do_install() { | ||
13 | install -d ${D}/lib/systemd/system | ||
14 | install -m 0644 ${WORKDIR}/kodi.service ${D}/lib/systemd/system/ | ||
15 | } | ||
16 | |||
17 | SYSTEMD_PACKAGES = "${PN}" | ||
18 | SYSTEMD_SERVICE_${PN} = "kodi.service" | ||
19 | |||
20 | RDEPENDS_${PN} += "xinit kodi" | ||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service new file mode 100644 index 000000000..29d0394e4 --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service | |||
@@ -0,0 +1,14 @@ | |||
1 | [Unit] | ||
2 | Description=Kodi media thing | ||
3 | |||
4 | [Service] | ||
5 | User=root | ||
6 | Type=simple | ||
7 | SuccessExitStatus=0 1 | ||
8 | IOSchedulingClass=realtime | ||
9 | IOSchedulingPriority=0 | ||
10 | |||
11 | ExecStart=/usr/bin/xinit /usr/bin/kodi-standalone -- /usr/bin/X :0 | ||
12 | |||
13 | [Install] | ||
14 | WantedBy=basic.target | ||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb new file mode 100644 index 000000000..c9de5920d --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb | |||
@@ -0,0 +1,179 @@ | |||
1 | SUMMARY = "Kodi Media Center" | ||
2 | |||
3 | LICENSE = "GPLv2" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=930e2a5f63425d8dd72dbd7391c43c46" | ||
5 | |||
6 | DEFAULT_PREFERENCE = "-1" | ||
7 | |||
8 | FILESPATH =. "${FILE_DIRNAME}/kodi-17:" | ||
9 | |||
10 | DEPENDS = " \ | ||
11 | cmake-native \ | ||
12 | curl-native \ | ||
13 | gperf-native \ | ||
14 | jsonschemabuilder-native \ | ||
15 | nasm-native \ | ||
16 | swig-native \ | ||
17 | yasm-native \ | ||
18 | zip-native \ | ||
19 | avahi \ | ||
20 | boost \ | ||
21 | bzip2 \ | ||
22 | curl \ | ||
23 | dcadec \ | ||
24 | enca \ | ||
25 | expat \ | ||
26 | faad2 \ | ||
27 | ffmpeg \ | ||
28 | fontconfig \ | ||
29 | fribidi \ | ||
30 | giflib \ | ||
31 | jasper \ | ||
32 | libass \ | ||
33 | libcdio \ | ||
34 | libcec \ | ||
35 | libmad \ | ||
36 | libmicrohttpd \ | ||
37 | libmms \ | ||
38 | libmms \ | ||
39 | libmodplug \ | ||
40 | libpcre \ | ||
41 | libplist \ | ||
42 | libsamplerate0 \ | ||
43 | libsdl-image \ | ||
44 | libsdl-mixer \ | ||
45 | libsquish \ | ||
46 | libssh \ | ||
47 | libtinyxml \ | ||
48 | libusb1 \ | ||
49 | libxslt \ | ||
50 | lzo \ | ||
51 | mpeg2dec \ | ||
52 | python \ | ||
53 | samba \ | ||
54 | sqlite3 \ | ||
55 | taglib \ | ||
56 | virtual/egl \ | ||
57 | virtual/libsdl \ | ||
58 | wavpack \ | ||
59 | yajl \ | ||
60 | zlib \ | ||
61 | ${@enable_glew(bb, d)} \ | ||
62 | " | ||
63 | |||
64 | PROVIDES = "xbmc" | ||
65 | |||
66 | SRCREV = "32c7788e7cce711be5b7f3893c82dddd79658268" | ||
67 | PV = "17.0+gitr${SRCPV}" | ||
68 | SRC_URI = "git://github.com/xbmc/xbmc.git;branch=master \ | ||
69 | file://0001-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch \ | ||
70 | file://0002-handle-SIGTERM.patch \ | ||
71 | file://0003-add-support-to-read-frequency-output-if-using-intel-.patch \ | ||
72 | file://0004-Disable-DVD-support.patch \ | ||
73 | " | ||
74 | |||
75 | inherit autotools-brokensep gettext pythonnative | ||
76 | |||
77 | S = "${WORKDIR}/git" | ||
78 | |||
79 | # breaks compilation | ||
80 | ASNEEDED = "" | ||
81 | |||
82 | ACCEL ?= "" | ||
83 | ACCEL_x86 = "vaapi vdpau" | ||
84 | ACCEL_x86-64 = "vaapi vdpau" | ||
85 | |||
86 | PACKAGECONFIG ??= "${ACCEL}" | ||
87 | PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)}" | ||
88 | PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', ' opengl', ' openglesv2', d)}" | ||
89 | |||
90 | PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles," | ||
91 | PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,virtual/egl" | ||
92 | PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" | ||
93 | PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" | ||
94 | PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5" | ||
95 | PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxinerama libxmu libxrandr libxtst" | ||
96 | PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio" | ||
97 | |||
98 | EXTRA_OECONF = " \ | ||
99 | --disable-debug \ | ||
100 | --disable-libcap \ | ||
101 | --disable-ccache \ | ||
102 | --disable-mid \ | ||
103 | --enable-libusb \ | ||
104 | --enable-alsa \ | ||
105 | --enable-airplay \ | ||
106 | --disable-optical-drive \ | ||
107 | --with-ffmpeg=shared \ | ||
108 | --enable-texturepacker=no \ | ||
109 | " | ||
110 | |||
111 | FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math" | ||
112 | FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math" | ||
113 | BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}" | ||
114 | |||
115 | # for python modules | ||
116 | export HOST_SYS | ||
117 | export BUILD_SYS | ||
118 | export STAGING_LIBDIR | ||
119 | export STAGING_INCDIR | ||
120 | export PYTHON_DIR | ||
121 | |||
122 | def enable_glew(bb, d): | ||
123 | if bb.utils.contains('PACKAGECONFIG', 'x11', True, False, d) and bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d): | ||
124 | return "glew" | ||
125 | return "" | ||
126 | |||
127 | do_configure() { | ||
128 | ( for i in $(find ${S} -name "configure.*" ) ; do | ||
129 | cd $(dirname $i) && gnu-configize --force || true | ||
130 | done ) | ||
131 | make -C tools/depends/target/crossguid PREFIX=${STAGING_DIR_HOST}${prefix} | ||
132 | |||
133 | BOOTSTRAP_STANDALONE=1 make -f bootstrap.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder" | ||
134 | BOOTSTRAP_STANDALONE=1 make -f codegenerator.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder" | ||
135 | oe_runconf | ||
136 | } | ||
137 | |||
138 | do_compile_prepend() { | ||
139 | for i in $(find . -name "Makefile") ; do | ||
140 | sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i | ||
141 | done | ||
142 | |||
143 | for i in $(find . -name "*.mak*" -o -name "Makefile") ; do | ||
144 | sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i | ||
145 | done | ||
146 | } | ||
147 | |||
148 | INSANE_SKIP_${PN} = "rpaths" | ||
149 | |||
150 | FILES_${PN} += "${datadir}/xsessions ${datadir}/icons ${libdir}/xbmc ${datadir}/xbmc" | ||
151 | FILES_${PN}-dbg += "${libdir}/kodi/.debug ${libdir}/kodi/*/.debug ${libdir}/kodi/*/*/.debug ${libdir}/kodi/*/*/*/.debug" | ||
152 | |||
153 | # kodi uses some kind of dlopen() method for libcec so we need to add it manually | ||
154 | # OpenGL builds need glxinfo, that's in mesa-demos | ||
155 | RRECOMMENDS_${PN}_append = " libcec \ | ||
156 | python \ | ||
157 | python-lang \ | ||
158 | python-re \ | ||
159 | python-netclient \ | ||
160 | python-html \ | ||
161 | python-difflib \ | ||
162 | python-json \ | ||
163 | python-zlib \ | ||
164 | python-shell \ | ||
165 | python-sqlite3 \ | ||
166 | python-compression \ | ||
167 | libcurl \ | ||
168 | ${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr xdpyinfo', '', d)} \ | ||
169 | " | ||
170 | RRECOMMENDS_${PN}_append_libc-glibc = " glibc-charmap-ibm850 \ | ||
171 | glibc-gconv-ibm850 \ | ||
172 | glibc-gconv-unicode \ | ||
173 | glibc-gconv-utf-32 \ | ||
174 | glibc-charmap-utf-8 \ | ||
175 | glibc-localedata-en-us \ | ||
176 | " | ||
177 | |||
178 | RPROVIDES_${PN} += "xbmc" | ||
179 | |||