diff options
| author | Khem Raj <raj.khem@gmail.com> | 2018-08-20 21:50:07 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2018-08-20 21:50:07 -0700 |
| commit | 0b5b6ad82ec7b28f2b425caa4ec9c8c88d6b189e (patch) | |
| tree | 922512802f85993ad8026d20e3758094a489cd8d | |
| parent | 2f26e8af669a8f27723f8b0f4820bd2b4ebd266a (diff) | |
| download | meta-openembedded-0b5b6ad82ec7b28f2b425caa4ec9c8c88d6b189e.tar.gz | |
kodi: Remove, use from meta-kodi
Use more uptodate version from
https://github.com/koenkooi/meta-kodi
Signed-off-by: Khem Raj <raj.khem@gmail.com>
17 files changed, 0 insertions, 1607 deletions
diff --git a/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb b/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb deleted file mode 100644 index fdb769943d..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/jsonschemabuilder-native.bb +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 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 = "661dd08d221f5b2bf509a696a6aca5ee7d45bb27" | ||
| 7 | |||
| 8 | PV = "17.1+gitr${SRCPV}" | ||
| 9 | SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Krypton" | ||
| 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-Fix-file_Emu-on-musl.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0001-Fix-file_Emu-on-musl.patch deleted file mode 100644 index 20b6377889..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0001-Fix-file_Emu-on-musl.patch +++ /dev/null | |||
| @@ -1,496 +0,0 @@ | |||
| 1 | From 7ae4fcf290ffb0b76374efafeaee575456ac9023 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 6 Nov 2016 23:08:27 -0800 | ||
| 4 | Subject: [PATCH 01/10] Fix file_Emu on musl | ||
| 5 | |||
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 7 | --- | ||
| 8 | xbmc/cores/DllLoader/exports/emu_msvcrt.cpp | 28 ++-- | ||
| 9 | xbmc/cores/DllLoader/exports/emu_msvcrt.h | 2 +- | ||
| 10 | .../DllLoader/exports/util/EmuFileWrapper.cpp | 172 +++++++++------------ | ||
| 11 | xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h | 27 ++-- | ||
| 12 | xbmc/cores/DllLoader/exports/wrapper.c | 4 +- | ||
| 13 | 5 files changed, 99 insertions(+), 134 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp | ||
| 16 | index ab14942..a39014a 100644 | ||
| 17 | --- a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp | ||
| 18 | +++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp | ||
| 19 | @@ -51,6 +51,7 @@ | ||
| 20 | #include <fcntl.h> | ||
| 21 | #include <time.h> | ||
| 22 | #include <signal.h> | ||
| 23 | +#include <paths.h> | ||
| 24 | #ifdef TARGET_POSIX | ||
| 25 | #include "PlatformDefs.h" // for __stat64 | ||
| 26 | #include "XFileUtils.h" | ||
| 27 | @@ -476,13 +477,10 @@ extern "C" | ||
| 28 | EmuFileObject* o = g_emuFileWrapper.GetFileObjectByDescriptor(fd); | ||
| 29 | if (o) | ||
| 30 | { | ||
| 31 | - if(!o->used) | ||
| 32 | - return NULL; | ||
| 33 | - | ||
| 34 | int nmode = convert_fmode(mode); | ||
| 35 | if( (o->mode & nmode) != nmode) | ||
| 36 | CLog::Log(LOGWARNING, "dll_fdopen - mode 0x%x differs from fd mode 0x%x", nmode, o->mode); | ||
| 37 | - return &o->file_emu; | ||
| 38 | + return g_emuFileWrapper.GetStreamByFileObject(o); | ||
| 39 | } | ||
| 40 | else if (!IS_STD_DESCRIPTOR(fd)) | ||
| 41 | { | ||
| 42 | @@ -545,7 +543,7 @@ extern "C" | ||
| 43 | return -1; | ||
| 44 | } | ||
| 45 | object->mode = iMode; | ||
| 46 | - return g_emuFileWrapper.GetDescriptorByStream(&object->file_emu); | ||
| 47 | + return g_emuFileWrapper.GetDescriptorByFileObject(object); | ||
| 48 | } | ||
| 49 | delete pFile; | ||
| 50 | return -1; | ||
| 51 | @@ -1214,8 +1212,8 @@ extern "C" | ||
| 52 | { | ||
| 53 | FILE* file = NULL; | ||
| 54 | #if defined(TARGET_LINUX) && !defined(TARGET_ANDROID) | ||
| 55 | - if (strcmp(filename, MOUNTED) == 0 | ||
| 56 | - || strcmp(filename, MNTTAB) == 0) | ||
| 57 | + if (strcmp(filename, _PATH_MOUNTED) == 0 | ||
| 58 | + || strcmp(filename, _PATH_MNTTAB) == 0) | ||
| 59 | { | ||
| 60 | CLog::Log(LOGINFO, "%s - something opened the mount file, let's hope it knows what it's doing", __FUNCTION__); | ||
| 61 | return fopen(filename, mode); | ||
| 62 | @@ -1622,7 +1620,7 @@ extern "C" | ||
| 63 | int ret; | ||
| 64 | |||
| 65 | ret = dll_fgetpos64(stream, &tmpPos); | ||
| 66 | -#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) | ||
| 67 | +#if !defined(__GLIBC__) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) | ||
| 68 | *pos = (fpos_t)tmpPos; | ||
| 69 | #else | ||
| 70 | pos->__pos = (off_t)tmpPos.__pos; | ||
| 71 | @@ -1635,8 +1633,9 @@ extern "C" | ||
| 72 | CFile* pFile = g_emuFileWrapper.GetFileXbmcByStream(stream); | ||
| 73 | if (pFile != NULL) | ||
| 74 | { | ||
| 75 | -#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) | ||
| 76 | - *pos = pFile->GetPosition(); | ||
| 77 | +#if !defined(__GLIBC__) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) | ||
| 78 | + uint64_t *ppos = (uint64_t *) pos; | ||
| 79 | + *ppos = pFile->GetPosition(); | ||
| 80 | #else | ||
| 81 | pos->__pos = pFile->GetPosition(); | ||
| 82 | #endif | ||
| 83 | @@ -1657,8 +1656,9 @@ extern "C" | ||
| 84 | int fd = g_emuFileWrapper.GetDescriptorByStream(stream); | ||
| 85 | if (fd >= 0) | ||
| 86 | { | ||
| 87 | -#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) | ||
| 88 | - if (dll_lseeki64(fd, *pos, SEEK_SET) >= 0) | ||
| 89 | +#if !defined(__GLIBC__) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) | ||
| 90 | + const uint64_t *ppos = (const uint64_t *) pos; | ||
| 91 | + if (dll_lseeki64(fd, *ppos, SEEK_SET) >= 0) | ||
| 92 | #else | ||
| 93 | if (dll_lseeki64(fd, (__off64_t)pos->__pos, SEEK_SET) >= 0) | ||
| 94 | #endif | ||
| 95 | @@ -1674,7 +1674,7 @@ extern "C" | ||
| 96 | { | ||
| 97 | // it might be something else than a file, or the file is not emulated | ||
| 98 | // let the operating system handle it | ||
| 99 | -#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) | ||
| 100 | +#if !defined(__GLIBC__) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) | ||
| 101 | return fsetpos(stream, pos); | ||
| 102 | #else | ||
| 103 | return fsetpos64(stream, pos); | ||
| 104 | @@ -1690,7 +1690,7 @@ extern "C" | ||
| 105 | if (fd >= 0) | ||
| 106 | { | ||
| 107 | fpos64_t tmpPos; | ||
| 108 | -#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) | ||
| 109 | +#if !defined(__GLIBC__) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) | ||
| 110 | tmpPos= *pos; | ||
| 111 | #else | ||
| 112 | tmpPos.__pos = (off64_t)(pos->__pos); | ||
| 113 | diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.h b/xbmc/cores/DllLoader/exports/emu_msvcrt.h | ||
| 114 | index 3294d9a..c7c483f 100644 | ||
| 115 | --- a/xbmc/cores/DllLoader/exports/emu_msvcrt.h | ||
| 116 | +++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.h | ||
| 117 | @@ -24,7 +24,7 @@ | ||
| 118 | #define _onexit_t void* | ||
| 119 | #endif | ||
| 120 | |||
| 121 | -#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) | ||
| 122 | +#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(__GLIBC__) | ||
| 123 | typedef off_t __off_t; | ||
| 124 | typedef int64_t off64_t; | ||
| 125 | typedef off64_t __off64_t; | ||
| 126 | diff --git a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp | ||
| 127 | index 8927d41..e9a2ab0 100644 | ||
| 128 | --- a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp | ||
| 129 | +++ b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.cpp | ||
| 130 | @@ -52,16 +52,7 @@ constexpr bool isValidFilePtr(FILE* f) | ||
| 131 | } | ||
| 132 | CEmuFileWrapper::CEmuFileWrapper() | ||
| 133 | { | ||
| 134 | - // since we always use dlls we might just initialize it directly | ||
| 135 | - for (int i = 0; i < MAX_EMULATED_FILES; i++) | ||
| 136 | - { | ||
| 137 | - memset(&m_files[i], 0, sizeof(EmuFileObject)); | ||
| 138 | - m_files[i].used = false; | ||
| 139 | -#if defined(TARGET_WINDOWS) && (_MSC_VER >= 1900) | ||
| 140 | - m_files[i].file_emu._Placeholder = new kodi_iobuf(); | ||
| 141 | -#endif | ||
| 142 | - FileDescriptor(m_files[i].file_emu)->_file = -1; | ||
| 143 | - } | ||
| 144 | + memset(m_files, 0, sizeof(m_files)); | ||
| 145 | } | ||
| 146 | |||
| 147 | CEmuFileWrapper::~CEmuFileWrapper() | ||
| 148 | @@ -73,29 +64,7 @@ void CEmuFileWrapper::CleanUp() | ||
| 149 | { | ||
| 150 | CSingleLock lock(m_criticalSection); | ||
| 151 | for (int i = 0; i < MAX_EMULATED_FILES; i++) | ||
| 152 | - { | ||
| 153 | - if (m_files[i].used) | ||
| 154 | - { | ||
| 155 | - m_files[i].file_xbmc->Close(); | ||
| 156 | - delete m_files[i].file_xbmc; | ||
| 157 | - | ||
| 158 | - if (m_files[i].file_lock) | ||
| 159 | - { | ||
| 160 | - delete m_files[i].file_lock; | ||
| 161 | - m_files[i].file_lock = nullptr; | ||
| 162 | - } | ||
| 163 | -#if !defined(TARGET_WINDOWS) | ||
| 164 | - //Don't memset on Windows as it overwrites our pointer | ||
| 165 | - memset(&m_files[i], 0, sizeof(EmuFileObject)); | ||
| 166 | -#endif | ||
| 167 | - m_files[i].used = false; | ||
| 168 | - FileDescriptor(m_files[i].file_emu)->_file = -1; | ||
| 169 | - } | ||
| 170 | -#if defined(TARGET_WINDOWS) && (_MSC_VER >= 1900) | ||
| 171 | - delete static_cast<kodi_iobuf*>(m_files[i].file_emu._Placeholder); | ||
| 172 | - m_files[i].file_emu._Placeholder = nullptr; | ||
| 173 | -#endif | ||
| 174 | - } | ||
| 175 | + UnRegisterFileObject(&m_files[i], true); | ||
| 176 | } | ||
| 177 | |||
| 178 | EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile) | ||
| 179 | @@ -106,13 +75,11 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile) | ||
| 180 | |||
| 181 | for (int i = 0; i < MAX_EMULATED_FILES; i++) | ||
| 182 | { | ||
| 183 | - if (!m_files[i].used) | ||
| 184 | + if (!m_files[i].file_xbmc) | ||
| 185 | { | ||
| 186 | // found a free location | ||
| 187 | object = &m_files[i]; | ||
| 188 | - object->used = true; | ||
| 189 | object->file_xbmc = pFile; | ||
| 190 | - FileDescriptor(object->file_emu)->_file = (i + FILE_WRAPPER_OFFSET); | ||
| 191 | object->file_lock = new CCriticalSection(); | ||
| 192 | break; | ||
| 193 | } | ||
| 194 | @@ -121,82 +88,74 @@ EmuFileObject* CEmuFileWrapper::RegisterFileObject(XFILE::CFile* pFile) | ||
| 195 | return object; | ||
| 196 | } | ||
| 197 | |||
| 198 | -void CEmuFileWrapper::UnRegisterFileObjectByDescriptor(int fd) | ||
| 199 | +void CEmuFileWrapper::UnRegisterFileObject(EmuFileObject *object, bool free_file) | ||
| 200 | + | ||
| 201 | { | ||
| 202 | - int i = fd - FILE_WRAPPER_OFFSET; | ||
| 203 | - if (! (i >= 0 && i < MAX_EMULATED_FILES)) | ||
| 204 | - return; | ||
| 205 | + if (object && object->file_xbmc) | ||
| 206 | + { | ||
| 207 | + if (object->file_xbmc && free_file) | ||
| 208 | + { | ||
| 209 | + object->file_xbmc->Close(); | ||
| 210 | + delete object->file_xbmc; | ||
| 211 | + } | ||
| 212 | + if (object->file_lock) | ||
| 213 | + { | ||
| 214 | + delete object->file_lock; | ||
| 215 | + } | ||
| 216 | |||
| 217 | - if (!m_files[i].used) | ||
| 218 | - return; | ||
| 219 | + memset(object, 0, sizeof(*object)); | ||
| 220 | + } | ||
| 221 | +} | ||
| 222 | |||
| 223 | +void CEmuFileWrapper::UnRegisterFileObjectByDescriptor(int fd) | ||
| 224 | +{ | ||
| 225 | CSingleLock lock(m_criticalSection); | ||
| 226 | - | ||
| 227 | - // we assume the emulated function alreay deleted the CFile object | ||
| 228 | - if (m_files[i].file_lock) | ||
| 229 | - { | ||
| 230 | - delete m_files[i].file_lock; | ||
| 231 | - m_files[i].file_lock = nullptr; | ||
| 232 | - } | ||
| 233 | -#if !defined(TARGET_WINDOWS) | ||
| 234 | - //Don't memset on Windows as it overwrites our pointer | ||
| 235 | - memset(&m_files[i], 0, sizeof(EmuFileObject)); | ||
| 236 | -#endif | ||
| 237 | - m_files[i].used = false; | ||
| 238 | - FileDescriptor(m_files[i].file_emu)->_file = -1; | ||
| 239 | + UnRegisterFileObject(GetFileObjectByDescriptor(fd), false); | ||
| 240 | } | ||
| 241 | |||
| 242 | void CEmuFileWrapper::UnRegisterFileObjectByStream(FILE* stream) | ||
| 243 | { | ||
| 244 | if (isValidFilePtr(stream)) | ||
| 245 | { | ||
| 246 | - return UnRegisterFileObjectByDescriptor(FileDescriptor(*stream)->_file); | ||
| 247 | + CSingleLock lock(m_criticalSection); | ||
| 248 | + UnRegisterFileObject(GetFileObjectByStream(stream), false); | ||
| 249 | } | ||
| 250 | } | ||
| 251 | |||
| 252 | void CEmuFileWrapper::LockFileObjectByDescriptor(int fd) | ||
| 253 | { | ||
| 254 | - int i = fd - FILE_WRAPPER_OFFSET; | ||
| 255 | - if (i >= 0 && i < MAX_EMULATED_FILES) | ||
| 256 | + EmuFileObject* object = GetFileObjectByDescriptor(fd); | ||
| 257 | + if (object && object->file_xbmc) | ||
| 258 | { | ||
| 259 | - if (m_files[i].used) | ||
| 260 | - { | ||
| 261 | - m_files[i].file_lock->lock(); | ||
| 262 | - } | ||
| 263 | + object->file_lock->lock(); | ||
| 264 | } | ||
| 265 | } | ||
| 266 | |||
| 267 | bool CEmuFileWrapper::TryLockFileObjectByDescriptor(int fd) | ||
| 268 | { | ||
| 269 | - int i = fd - FILE_WRAPPER_OFFSET; | ||
| 270 | - if (i >= 0 && i < MAX_EMULATED_FILES) | ||
| 271 | + EmuFileObject* object = GetFileObjectByDescriptor(fd); | ||
| 272 | + if (object && object->file_xbmc) | ||
| 273 | { | ||
| 274 | - if (m_files[i].used) | ||
| 275 | - { | ||
| 276 | - return m_files[i].file_lock->try_lock(); | ||
| 277 | - } | ||
| 278 | + return object->file_lock->try_lock(); | ||
| 279 | } | ||
| 280 | return false; | ||
| 281 | } | ||
| 282 | |||
| 283 | void CEmuFileWrapper::UnlockFileObjectByDescriptor(int fd) | ||
| 284 | { | ||
| 285 | - int i = fd - FILE_WRAPPER_OFFSET; | ||
| 286 | - if (i >= 0 && i < MAX_EMULATED_FILES) | ||
| 287 | + EmuFileObject* object = GetFileObjectByDescriptor(fd); | ||
| 288 | + if (object && object->file_xbmc) | ||
| 289 | { | ||
| 290 | - if (m_files[i].used) | ||
| 291 | - { | ||
| 292 | - m_files[i].file_lock->unlock(); | ||
| 293 | - } | ||
| 294 | + object->file_lock->unlock(); | ||
| 295 | } | ||
| 296 | } | ||
| 297 | |||
| 298 | EmuFileObject* CEmuFileWrapper::GetFileObjectByDescriptor(int fd) | ||
| 299 | { | ||
| 300 | - int i = fd - FILE_WRAPPER_OFFSET; | ||
| 301 | + int i = fd - 0x7000000; | ||
| 302 | if (i >= 0 && i < MAX_EMULATED_FILES) | ||
| 303 | { | ||
| 304 | - if (m_files[i].used) | ||
| 305 | + if (m_files[i].file_xbmc) | ||
| 306 | { | ||
| 307 | return &m_files[i]; | ||
| 308 | } | ||
| 309 | @@ -204,20 +163,39 @@ EmuFileObject* CEmuFileWrapper::GetFileObjectByDescriptor(int fd) | ||
| 310 | return nullptr; | ||
| 311 | } | ||
| 312 | |||
| 313 | +int CEmuFileWrapper::GetDescriptorByFileObject(EmuFileObject *object) | ||
| 314 | +{ | ||
| 315 | + int i = object - m_files; | ||
| 316 | + if (i >= 0 && i < MAX_EMULATED_FILES) | ||
| 317 | + { | ||
| 318 | + return 0x7000000 + i; | ||
| 319 | + } | ||
| 320 | + | ||
| 321 | + return -1; | ||
| 322 | +} | ||
| 323 | + | ||
| 324 | EmuFileObject* CEmuFileWrapper::GetFileObjectByStream(FILE* stream) | ||
| 325 | { | ||
| 326 | - if (isValidFilePtr(stream)) | ||
| 327 | + EmuFileObject *object = (EmuFileObject*) stream; | ||
| 328 | + if (object >= &m_files[0] || object < &m_files[MAX_EMULATED_FILES]) | ||
| 329 | { | ||
| 330 | - return GetFileObjectByDescriptor(FileDescriptor(*stream)->_file); | ||
| 331 | + if (object->file_xbmc) | ||
| 332 | + { | ||
| 333 | + return object; | ||
| 334 | + } | ||
| 335 | } | ||
| 336 | + return NULL; | ||
| 337 | +} | ||
| 338 | |||
| 339 | - return nullptr; | ||
| 340 | +FILE* CEmuFileWrapper::GetStreamByFileObject(EmuFileObject *object) | ||
| 341 | +{ | ||
| 342 | + return (FILE*) object; | ||
| 343 | } | ||
| 344 | |||
| 345 | XFILE::CFile* CEmuFileWrapper::GetFileXbmcByDescriptor(int fd) | ||
| 346 | { | ||
| 347 | auto object = GetFileObjectByDescriptor(fd); | ||
| 348 | - if (object != nullptr && object->used) | ||
| 349 | + if (object != nullptr) | ||
| 350 | { | ||
| 351 | return object->file_xbmc; | ||
| 352 | } | ||
| 353 | @@ -228,8 +206,9 @@ XFILE::CFile* CEmuFileWrapper::GetFileXbmcByStream(FILE* stream) | ||
| 354 | { | ||
| 355 | if (isValidFilePtr(stream)) | ||
| 356 | { | ||
| 357 | - auto object = GetFileObjectByDescriptor(FileDescriptor(*stream)->_file); | ||
| 358 | - if (object != nullptr && object->used) | ||
| 359 | + EmuFileObject* object = GetFileObjectByStream(stream); | ||
| 360 | + if (object != NULL) | ||
| 361 | + | ||
| 362 | { | ||
| 363 | return object->file_xbmc; | ||
| 364 | } | ||
| 365 | @@ -239,32 +218,21 @@ XFILE::CFile* CEmuFileWrapper::GetFileXbmcByStream(FILE* stream) | ||
| 366 | |||
| 367 | int CEmuFileWrapper::GetDescriptorByStream(FILE* stream) | ||
| 368 | { | ||
| 369 | - if (isValidFilePtr(stream)) | ||
| 370 | - { | ||
| 371 | - int i = FileDescriptor(*stream)->_file - FILE_WRAPPER_OFFSET; | ||
| 372 | - if (i >= 0 && i < MAX_EMULATED_FILES) | ||
| 373 | - { | ||
| 374 | - return i + FILE_WRAPPER_OFFSET; | ||
| 375 | - } | ||
| 376 | - } | ||
| 377 | - return -1; | ||
| 378 | + return GetDescriptorByFileObject(GetFileObjectByStream(stream)); | ||
| 379 | } | ||
| 380 | |||
| 381 | FILE* CEmuFileWrapper::GetStreamByDescriptor(int fd) | ||
| 382 | { | ||
| 383 | - auto object = GetFileObjectByDescriptor(fd); | ||
| 384 | - if (object != nullptr && object->used) | ||
| 385 | - { | ||
| 386 | - return &object->file_emu; | ||
| 387 | - } | ||
| 388 | - return nullptr; | ||
| 389 | + return GetStreamByFileObject(GetFileObjectByDescriptor(fd)); | ||
| 390 | +} | ||
| 391 | + | ||
| 392 | +bool CEmuFileWrapper::DescriptorIsEmulatedFile(int fd) | ||
| 393 | +{ | ||
| 394 | + return GetFileObjectByDescriptor(fd) != NULL; | ||
| 395 | } | ||
| 396 | |||
| 397 | bool CEmuFileWrapper::StreamIsEmulatedFile(FILE* stream) | ||
| 398 | { | ||
| 399 | - if (isValidFilePtr(stream)) | ||
| 400 | - { | ||
| 401 | - return DescriptorIsEmulatedFile(FileDescriptor(*stream)->_file); | ||
| 402 | - } | ||
| 403 | - return false; | ||
| 404 | + return GetFileObjectByStream(stream) != NULL; | ||
| 405 | } | ||
| 406 | + | ||
| 407 | diff --git a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h | ||
| 408 | index 786fa85..311a5cf 100644 | ||
| 409 | --- a/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h | ||
| 410 | +++ b/xbmc/cores/DllLoader/exports/util/EmuFileWrapper.h | ||
| 411 | @@ -25,14 +25,14 @@ | ||
| 412 | #include "system.h" | ||
| 413 | #include "threads/CriticalSection.h" | ||
| 414 | |||
| 415 | -#if defined(TARGET_POSIX) && !defined(TARGET_DARWIN) && !defined(TARGET_FREEBSD) && !defined(TARGET_ANDROID) && !defined(__UCLIBC__) | ||
| 416 | -#define _file _fileno | ||
| 417 | -#elif defined(__UCLIBC__) | ||
| 418 | -#define _file __filedes | ||
| 419 | -#endif | ||
| 420 | +//#if defined(TARGET_POSIX) && !defined(TARGET_DARWIN) && !defined(TARGET_FREEBSD) && !defined(TARGET_ANDROID) && !defined(__UCLIBC__) | ||
| 421 | +//#define _file _fileno | ||
| 422 | +//#elif defined(__UCLIBC__) | ||
| 423 | +//#define _file __filedes | ||
| 424 | +//#endif | ||
| 425 | |||
| 426 | #define MAX_EMULATED_FILES 50 | ||
| 427 | -#define FILE_WRAPPER_OFFSET 0x00000200 | ||
| 428 | +//#define FILE_WRAPPER_OFFSET 0x00000200 | ||
| 429 | |||
| 430 | namespace XFILE | ||
| 431 | { | ||
| 432 | @@ -47,12 +47,9 @@ struct kodi_iobuf { | ||
| 433 | |||
| 434 | typedef struct stEmuFileObject | ||
| 435 | { | ||
| 436 | - FILE file_emu; | ||
| 437 | XFILE::CFile* file_xbmc; | ||
| 438 | CCriticalSection *file_lock; | ||
| 439 | int mode; | ||
| 440 | - //Stick this last to avoid 3-7 bytes of padding | ||
| 441 | - bool used; | ||
| 442 | } EmuFileObject; | ||
| 443 | |||
| 444 | class CEmuFileWrapper | ||
| 445 | @@ -67,22 +64,22 @@ public: | ||
| 446 | void CleanUp(); | ||
| 447 | |||
| 448 | EmuFileObject* RegisterFileObject(XFILE::CFile* pFile); | ||
| 449 | + void UnRegisterFileObject(EmuFileObject*, bool free_file); | ||
| 450 | void UnRegisterFileObjectByDescriptor(int fd); | ||
| 451 | void UnRegisterFileObjectByStream(FILE* stream); | ||
| 452 | void LockFileObjectByDescriptor(int fd); | ||
| 453 | bool TryLockFileObjectByDescriptor(int fd); | ||
| 454 | void UnlockFileObjectByDescriptor(int fd); | ||
| 455 | EmuFileObject* GetFileObjectByDescriptor(int fd); | ||
| 456 | + int GetDescriptorByFileObject(EmuFileObject*); | ||
| 457 | EmuFileObject* GetFileObjectByStream(FILE* stream); | ||
| 458 | + FILE* GetStreamByFileObject(EmuFileObject*); | ||
| 459 | XFILE::CFile* GetFileXbmcByDescriptor(int fd); | ||
| 460 | XFILE::CFile* GetFileXbmcByStream(FILE* stream); | ||
| 461 | - static int GetDescriptorByStream(FILE* stream); | ||
| 462 | + int GetDescriptorByStream(FILE* stream); | ||
| 463 | FILE* GetStreamByDescriptor(int fd); | ||
| 464 | - static constexpr bool DescriptorIsEmulatedFile(int fd) | ||
| 465 | - { | ||
| 466 | - return fd >= FILE_WRAPPER_OFFSET && fd < FILE_WRAPPER_OFFSET + MAX_EMULATED_FILES; | ||
| 467 | - } | ||
| 468 | - static bool StreamIsEmulatedFile(FILE* stream); | ||
| 469 | + bool DescriptorIsEmulatedFile(int fd); | ||
| 470 | + bool StreamIsEmulatedFile(FILE* stream); | ||
| 471 | private: | ||
| 472 | EmuFileObject m_files[MAX_EMULATED_FILES]; | ||
| 473 | CCriticalSection m_criticalSection; | ||
| 474 | diff --git a/xbmc/cores/DllLoader/exports/wrapper.c b/xbmc/cores/DllLoader/exports/wrapper.c | ||
| 475 | index e363662..07825f3 100644 | ||
| 476 | --- a/xbmc/cores/DllLoader/exports/wrapper.c | ||
| 477 | +++ b/xbmc/cores/DllLoader/exports/wrapper.c | ||
| 478 | @@ -39,13 +39,13 @@ | ||
| 479 | #endif | ||
| 480 | #include <dlfcn.h> | ||
| 481 | |||
| 482 | -#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) | ||
| 483 | +#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(__GLIBC__) | ||
| 484 | typedef off_t __off_t; | ||
| 485 | typedef int64_t off64_t; | ||
| 486 | typedef off64_t __off64_t; | ||
| 487 | typedef fpos_t fpos64_t; | ||
| 488 | #define stat64 stat | ||
| 489 | -#if defined(TARGET_DARWIN) || defined(TARGET_ANDROID) | ||
| 490 | +#if defined(TARGET_DARWIN) || defined(TARGET_ANDROID) || !defined(__GLIBC__) | ||
| 491 | #define _G_va_list va_list | ||
| 492 | #endif | ||
| 493 | #endif | ||
| 494 | -- | ||
| 495 | 2.10.2 | ||
| 496 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0001-change-order-of-detecting-libegl-and-libgles2.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0001-change-order-of-detecting-libegl-and-libgles2.patch deleted file mode 100644 index 12a6c06e82..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0001-change-order-of-detecting-libegl-and-libgles2.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | From 21524598110e7a55113205dda4bc1a6d5987111c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 9 May 2017 06:41:33 +0000 | ||
| 4 | Subject: [PATCH] change order of detecting libegl and libgles2 | ||
| 5 | |||
| 6 | This actually helps building it on rpi/userland | ||
| 7 | where libEGL depends on few functions from libGLESv2 | ||
| 8 | see | ||
| 9 | https://www.raspberrypi.org/forums/viewtopic.php?t=7090 | ||
| 10 | |||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | configure.ac | 2 +- | ||
| 14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/configure.ac b/configure.ac | ||
| 17 | index b9e4240..1ca0297 100644 | ||
| 18 | --- a/configure.ac | ||
| 19 | +++ b/configure.ac | ||
| 20 | @@ -951,8 +951,8 @@ if test "$use_gles" = "yes"; then | ||
| 21 | AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.) | ||
| 22 | LIBS="$LIBS -lEGL -lGLESv2 -lbcm_host -lvcos -lvchiq_arm -lmmal -lmmal_core -lmmal_util -lvcsm" | ||
| 23 | else | ||
| 24 | - AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library)) | ||
| 25 | AC_CHECK_LIB([GLESv2],[main],, AC_MSG_ERROR($missing_library)) | ||
| 26 | + AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library)) | ||
| 27 | fi | ||
| 28 | fi | ||
| 29 | else | ||
| 30 | -- | ||
| 31 | 1.9.1 | ||
| 32 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0002-Remove-FILEWRAP.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0002-Remove-FILEWRAP.patch deleted file mode 100644 index 463a5c4f81..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0002-Remove-FILEWRAP.patch +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | From ad1977a358319093b305df6d84be6db676ef1e4a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 6 Nov 2016 22:35:16 -0800 | ||
| 4 | Subject: [PATCH 02/10] Remove FILEWRAP | ||
| 5 | |||
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 7 | --- | ||
| 8 | xbmc/utils/posix/PosixInterfaceForCLog.cpp | 6 +----- | ||
| 9 | xbmc/utils/posix/PosixInterfaceForCLog.h | 4 +--- | ||
| 10 | 2 files changed, 2 insertions(+), 8 deletions(-) | ||
| 11 | |||
| 12 | Index: git/xbmc/utils/posix/PosixInterfaceForCLog.cpp | ||
| 13 | =================================================================== | ||
| 14 | --- git.orig/xbmc/utils/posix/PosixInterfaceForCLog.cpp | ||
| 15 | +++ git/xbmc/utils/posix/PosixInterfaceForCLog.cpp | ||
| 16 | @@ -29,10 +29,6 @@ | ||
| 17 | #include "platform/android/activity/XBMCApp.h" | ||
| 18 | #endif // TARGET_ANDROID | ||
| 19 | |||
| 20 | -struct FILEWRAP : public FILE | ||
| 21 | -{}; | ||
| 22 | - | ||
| 23 | - | ||
| 24 | CPosixInterfaceForCLog::CPosixInterfaceForCLog() : | ||
| 25 | m_file(NULL) | ||
| 26 | { } | ||
| 27 | @@ -52,7 +48,7 @@ bool CPosixInterfaceForCLog::OpenLogFile | ||
| 28 | (void)remove(backupOldLogToFilename.c_str()); // if it's failed, try to continue | ||
| 29 | (void)rename(logFilename.c_str(), backupOldLogToFilename.c_str()); // if it's failed, try to continue | ||
| 30 | |||
| 31 | - m_file = (FILEWRAP*)fopen(logFilename.c_str(), "wb"); | ||
| 32 | + m_file = fopen(logFilename.c_str(), "wb"); | ||
| 33 | if (!m_file) | ||
| 34 | return false; // error, can't open log file | ||
| 35 | |||
| 36 | Index: git/xbmc/utils/posix/PosixInterfaceForCLog.h | ||
| 37 | =================================================================== | ||
| 38 | --- git.orig/xbmc/utils/posix/PosixInterfaceForCLog.h | ||
| 39 | +++ git/xbmc/utils/posix/PosixInterfaceForCLog.h | ||
| 40 | @@ -34,5 +34,5 @@ public: | ||
| 41 | void PrintDebugString(const std::string& debugString); | ||
| 42 | static void GetCurrentLocalTime(int& hour, int& minute, int& second, double& millisecond); | ||
| 43 | private: | ||
| 44 | - FILEWRAP* m_file; | ||
| 45 | + FILE* m_file; | ||
| 46 | }; | ||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0003-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0003-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch deleted file mode 100644 index 49217a4f7b..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0003-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | From a91a3ba229dc5903935f7dd98dd03bbb4fe5ac1f 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 03/10] 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 34fe643..3132dc1 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.2 | ||
| 25 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0004-handle-SIGTERM.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0004-handle-SIGTERM.patch deleted file mode 100644 index dc37439353..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0004-handle-SIGTERM.patch +++ /dev/null | |||
| @@ -1,163 +0,0 @@ | |||
| 1 | From 49046c1685465a5486fe9e1c04b99c585aab6862 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 04/10] 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 100a2f2..fda892d 100644 | ||
| 30 | --- a/xbmc/Application.cpp | ||
| 31 | +++ b/xbmc/Application.cpp | ||
| 32 | @@ -2426,12 +2426,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 | @@ -2452,12 +2452,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 | @@ -2881,6 +2882,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 | @@ -2888,7 +2896,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 | @@ -2922,7 +2930,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 a9d9bf5..e536deb 100644 | ||
| 95 | --- a/xbmc/Application.h | ||
| 96 | +++ b/xbmc/Application.h | ||
| 97 | @@ -159,6 +159,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.2 | ||
| 163 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0005-add-support-to-read-frequency-output-if-using-intel-.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0005-add-support-to-read-frequency-output-if-using-intel-.patch deleted file mode 100644 index ee10c40ac1..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0005-add-support-to-read-frequency-output-if-using-intel-.patch +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | From 4d1368d20f04216aec9551d9845b305f96a21015 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 05/10] 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.2 | ||
| 26 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0006-Disable-DVD-support.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0006-Disable-DVD-support.patch deleted file mode 100644 index 08dfac3240..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0006-Disable-DVD-support.patch +++ /dev/null | |||
| @@ -1,35 +0,0 @@ | |||
| 1 | From 3d3ec391038c6ee73897a7fab753b11b589de1ed 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 06/10] 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 0d70e9b..050c7ca 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 | @@ -347,7 +346,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.2 | ||
| 35 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0007-Always-compile-libcpluff-as-PIC.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0007-Always-compile-libcpluff-as-PIC.patch deleted file mode 100644 index 8fd7ece054..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0007-Always-compile-libcpluff-as-PIC.patch +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | From d989cbdb7686c3b95dc749967f89b93e47f955a6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 3 Nov 2016 13:10:00 -0700 | ||
| 4 | Subject: [PATCH 07/10] Always compile libcpluff as PIC | ||
| 5 | |||
| 6 | Fixes errors e.g. | ||
| 7 | |||
| 8 | ld: lib/cpluff/libcpluff/.libs/libcpluff.a(pcontrol.o): relocation R_X86_64_PC32 against symbol `cp_stop_plugins' can not be used when making a shared object; recompile with -fPIC | ||
| 9 | |||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | configure.ac | 2 +- | ||
| 13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 14 | |||
| 15 | diff --git a/configure.ac b/configure.ac | ||
| 16 | index 3132dc1..ab4eea3 100644 | ||
| 17 | --- a/configure.ac | ||
| 18 | +++ b/configure.ac | ||
| 19 | @@ -2385,7 +2385,7 @@ XB_CONFIG_MODULE([lib/cpluff], [ | ||
| 20 | --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \ | ||
| 21 | --host=$host_alias \ | ||
| 22 | --build=$build_alias \ | ||
| 23 | - --target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX" LDFLAGS="$LDFLAGS" LIBS="" | ||
| 24 | + --target=$target_alias --with-pic=yes CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX" LDFLAGS="$LDFLAGS" LIBS="" | ||
| 25 | #LDFLAGS="$LDFLAGS -Wl,-read_only_relocs,suppress" | ||
| 26 | ], [0]) | ||
| 27 | |||
| 28 | -- | ||
| 29 | 2.10.2 | ||
| 30 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0008-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0008-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch deleted file mode 100644 index 9390144ceb..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0008-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | From 51cd8d5f084013360b29fe497193288ebde2f4f9 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
| 3 | Date: Wed, 29 Jul 2015 23:13:33 +0200 | ||
| 4 | Subject: [PATCH 08/10] kodi-config.cmake: use CMAKE_FIND_ROOT_PATH to fix | ||
| 5 | cross-compilation | ||
| 6 | |||
| 7 | When cross-compiling, the location at build time of the libraries is | ||
| 8 | not the same as the one at run-time. The CMAKE_FIND_ROOT_PATH variable | ||
| 9 | is here to handle this difference, so use it in kodi-config.cmake. | ||
| 10 | |||
| 11 | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
| 12 | --- | ||
| 13 | project/cmake/KodiConfig.cmake.in | 5 +++-- | ||
| 14 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/project/cmake/KodiConfig.cmake.in b/project/cmake/KodiConfig.cmake.in | ||
| 17 | index c02a680..9d6a566 100644 | ||
| 18 | --- a/project/cmake/KodiConfig.cmake.in | ||
| 19 | +++ b/project/cmake/KodiConfig.cmake.in | ||
| 20 | @@ -7,10 +7,10 @@ if(NOT @APP_NAME_UC@_PREFIX) | ||
| 21 | set(@APP_NAME_UC@_PREFIX @APP_PREFIX@) | ||
| 22 | endif() | ||
| 23 | if(NOT @APP_NAME_UC@_INCLUDE_DIR) | ||
| 24 | - set(@APP_NAME_UC@_INCLUDE_DIR @APP_INCLUDE_DIR@) | ||
| 25 | + set(@APP_NAME_UC@_INCLUDE_DIR ${CMAKE_FIND_ROOT_PATH}/@APP_INCLUDE_DIR@) | ||
| 26 | endif() | ||
| 27 | if(NOT @APP_NAME_UC@_LIB_DIR) | ||
| 28 | - set(@APP_NAME_UC@_LIB_DIR @APP_LIB_DIR@) | ||
| 29 | + set(@APP_NAME_UC@_LIB_DIR ${CMAKE_FIND_ROOT_PATH}/@APP_LIB_DIR@) | ||
| 30 | endif() | ||
| 31 | if(NOT @APP_NAME_UC@_DATA_DIR) | ||
| 32 | set(@APP_NAME_UC@_DATA_DIR @APP_DATA_DIR@) | ||
| 33 | @@ -19,6 +19,7 @@ if(NOT WIN32) | ||
| 34 | set(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} @CXX11_SWITCH@") | ||
| 35 | endif() | ||
| 36 | list(APPEND CMAKE_MODULE_PATH @APP_LIB_DIR@ @APP_DATA_DIR@/cmake) | ||
| 37 | +list(APPEND CMAKE_MODULE_PATH ${CMAKE_FIND_ROOT_PATH}/@APP_LIB_DIR@ ${CMAKE_FIND_ROOT_PATH}/@APP_DATA_DIR@/cmake) | ||
| 38 | |||
| 39 | string(REPLACE ";" " " ARCH_DEFINES "@ARCH_DEFINES@") | ||
| 40 | add_definitions(${ARCH_DEFINES} -DBUILD_KODI_ADDON) | ||
| 41 | -- | ||
| 42 | 2.10.2 | ||
| 43 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0009-build-Add-support-for-musl-triplets.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0009-build-Add-support-for-musl-triplets.patch deleted file mode 100644 index f3e739aedb..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0009-build-Add-support-for-musl-triplets.patch +++ /dev/null | |||
| @@ -1,180 +0,0 @@ | |||
| 1 | From 8b2bad58585af0f829fb06e19c9bd2b6caf30808 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 6 Nov 2016 11:54:41 -0800 | ||
| 4 | Subject: [PATCH 09/10] build: Add support for musl triplets | ||
| 5 | |||
| 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 7 | --- | ||
| 8 | configure.ac | 12 ++++++------ | ||
| 9 | m4/xbmc_arch.m4 | 22 +++++++++++----------- | ||
| 10 | tools/depends/configure.ac | 12 ++++++------ | ||
| 11 | 3 files changed, 23 insertions(+), 23 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/configure.ac b/configure.ac | ||
| 14 | index ab4eea3..925466a 100644 | ||
| 15 | --- a/configure.ac | ||
| 16 | +++ b/configure.ac | ||
| 17 | @@ -526,7 +526,7 @@ case $host in | ||
| 18 | use_x11=no | ||
| 19 | build_shared_lib=yes | ||
| 20 | ;; | ||
| 21 | - i*86*-linux-gnu*|i*86*-*-linux-uclibc*) | ||
| 22 | + i*86*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-*-linux-musl*) | ||
| 23 | target_platform=target_linux | ||
| 24 | CORE_SYSTEM_NAME=linux | ||
| 25 | ARCH="i486-linux" | ||
| 26 | @@ -549,7 +549,7 @@ case $host in | ||
| 27 | fi | ||
| 28 | fi | ||
| 29 | ;; | ||
| 30 | - x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*) | ||
| 31 | + x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*) | ||
| 32 | target_platform=target_linux | ||
| 33 | CORE_SYSTEM_NAME=linux | ||
| 34 | ARCH="x86_64-linux" | ||
| 35 | @@ -601,17 +601,17 @@ case $host in | ||
| 36 | DEPENDS_ROOT_FOR_XCODE=$(echo ${prefix%/*}) | ||
| 37 | AC_SUBST([DEPENDS_ROOT_FOR_XCODE]) | ||
| 38 | ;; | ||
| 39 | - powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*) | ||
| 40 | + powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*|powerpc-*-linux-musl*) | ||
| 41 | target_platform=target_linux | ||
| 42 | CORE_SYSTEM_NAME=linux | ||
| 43 | ARCH="powerpc-linux" | ||
| 44 | ;; | ||
| 45 | - powerpc64*-*-linux-gnu*|powerpc64*-*-linux-uclibc*) | ||
| 46 | + powerpc64*-*-linux-gnu*|powerpc64*-*-linux-uclibc*|powerpc64*-*-linux-musl*) | ||
| 47 | target_platform=target_linux | ||
| 48 | CORE_SYSTEM_NAME=linux | ||
| 49 | ARCH="powerpc64-linux" | ||
| 50 | ;; | ||
| 51 | - arm*-*-linux-gnu*|arm*-*-linux-uclibc*) | ||
| 52 | + arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-musl*) | ||
| 53 | target_platform=target_linux | ||
| 54 | CORE_SYSTEM_NAME=linux | ||
| 55 | ARCH="arm" | ||
| 56 | @@ -621,7 +621,7 @@ case $host in | ||
| 57 | use_gl=no | ||
| 58 | USE_STATIC_FFMPEG=1 | ||
| 59 | ;; | ||
| 60 | - aarch64*-*-linux-gnu*|aarch64*-*-linux-uclibc*) | ||
| 61 | + aarch64*-*-linux-gnu*|aarch64*-*-linux-uclibc*|aarch64*-*-linux-musl*) | ||
| 62 | target_platform=target_linux | ||
| 63 | ARCH="aarch64" | ||
| 64 | use_arch="aarch64" | ||
| 65 | diff --git a/m4/xbmc_arch.m4 b/m4/xbmc_arch.m4 | ||
| 66 | index d28f263..ff5dc20 100644 | ||
| 67 | --- a/m4/xbmc_arch.m4 | ||
| 68 | +++ b/m4/xbmc_arch.m4 | ||
| 69 | @@ -2,10 +2,10 @@ AC_DEFUN([XBMC_SETUP_ARCH_DEFINES],[ | ||
| 70 | |||
| 71 | # build detection and setup - this is the native arch | ||
| 72 | case $build in | ||
| 73 | - i*86*-linux-gnu*|i*86*-*-linux-uclibc*) | ||
| 74 | + i*86*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-*-linux-musl*) | ||
| 75 | AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") | ||
| 76 | ;; | ||
| 77 | - x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*) | ||
| 78 | + x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*) | ||
| 79 | AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") | ||
| 80 | ;; | ||
| 81 | i386-*-freebsd*) | ||
| 82 | @@ -17,13 +17,13 @@ case $build in | ||
| 83 | *86*-apple-darwin*) | ||
| 84 | AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX") | ||
| 85 | ;; | ||
| 86 | - powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*) | ||
| 87 | + powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*|powerpc-*-linux-musl*) | ||
| 88 | AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC") | ||
| 89 | ;; | ||
| 90 | - powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*) | ||
| 91 | + powerpc64-*-linux-gnu*|powerpc64-*-linux-uclibc*|powerpc64-*-linux-musl*) | ||
| 92 | AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64") | ||
| 93 | ;; | ||
| 94 | - arm*-*-linux-gnu*|arm*-*-linux-uclibc*) | ||
| 95 | + arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-musl*) | ||
| 96 | AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") | ||
| 97 | ;; | ||
| 98 | *) | ||
| 99 | @@ -33,10 +33,10 @@ esac | ||
| 100 | |||
| 101 | # host detection and setup - this is the target arch | ||
| 102 | case $host in | ||
| 103 | - i*86*-linux-gnu*|i*86*-*-linux-uclibc*) | ||
| 104 | + i*86*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-*-linux-musl*) | ||
| 105 | AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") | ||
| 106 | ;; | ||
| 107 | - x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*) | ||
| 108 | + x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*) | ||
| 109 | AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") | ||
| 110 | ;; | ||
| 111 | i386-*-freebsd*) | ||
| 112 | @@ -54,16 +54,16 @@ case $host in | ||
| 113 | powerpc-apple-darwin*) | ||
| 114 | AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX") | ||
| 115 | ;; | ||
| 116 | - powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*) | ||
| 117 | + powerpc-*-linux-gnu*|powerpc-*-linux-uclibc*|powerpc-*-linux-musl*) | ||
| 118 | AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC") | ||
| 119 | ;; | ||
| 120 | - powerpc64*-*-linux-gnu*|powerpc64*-*-linux-uclibc*) | ||
| 121 | + powerpc64*-*-linux-gnu*|powerpc64*-*-linux-uclibc*|powerpc64*-*-linux-musl*) | ||
| 122 | AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_POWERPC64") | ||
| 123 | ;; | ||
| 124 | - arm*-*-linux-gnu*|arm*-*-linux-uclibc*|aarch64*-*-linux-gnu*|aarch64*-*-linux-uclibc*) | ||
| 125 | + arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-musl*|aarch64*-*-linux-gnu*|aarch64*-*-linux-uclibc*|aarch64*-*-linux-musl*) | ||
| 126 | AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") | ||
| 127 | ;; | ||
| 128 | - mips*-*-linux-gnu*|mips*-*-linux-uclibc*) | ||
| 129 | + mips*-*-linux-gnu*|mips*-*-linux-uclibc*|mips*-*-linux-musl*) | ||
| 130 | AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") | ||
| 131 | ;; | ||
| 132 | *-*linux-android*) | ||
| 133 | diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac | ||
| 134 | index f438e5d..409f4d7 100644 | ||
| 135 | --- a/tools/depends/configure.ac | ||
| 136 | +++ b/tools/depends/configure.ac | ||
| 137 | @@ -120,13 +120,13 @@ platform_cc=gcc | ||
| 138 | platform_cxx=g++ | ||
| 139 | |||
| 140 | case $build in | ||
| 141 | - arm*-*-linux-gnu*|arm*-*-linux-uclibc*) | ||
| 142 | + arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-musl*) | ||
| 143 | build_os="linux" | ||
| 144 | ;; | ||
| 145 | - *i686*-linux-gnu*|i*86*-*-linux-uclibc*) | ||
| 146 | + *i686*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-*-linux-musl*) | ||
| 147 | build_os="linux" | ||
| 148 | ;; | ||
| 149 | - x86_64*-linux-gnu*|x86_64-*-linux-uclibc*) | ||
| 150 | + x86_64*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*) | ||
| 151 | build_os="linux" | ||
| 152 | ;; | ||
| 153 | *darwin*) | ||
| 154 | @@ -186,7 +186,7 @@ case $host in | ||
| 155 | #android builds are always cross | ||
| 156 | cross_compiling="yes" | ||
| 157 | ;; | ||
| 158 | - arm*-*-linux-gnu*|arm*-*-linux-uclibc*) | ||
| 159 | + arm*-*-linux-gnu*|arm*-*-linux-uclibc*|arm*-*-linux-musl*) | ||
| 160 | if test "$use_platform" = "auto"; then | ||
| 161 | if test "x$use_cpu" = "xauto"; then | ||
| 162 | use_cpu=$host_cpu | ||
| 163 | @@ -210,12 +210,12 @@ case $host in | ||
| 164 | platform_os="linux" | ||
| 165 | fi | ||
| 166 | ;; | ||
| 167 | - *i686*-linux-gnu*|i*86*-*-linux-uclibc*) | ||
| 168 | + *i686*-linux-gnu*|i*86*-*-linux-uclibc*|i*86*-*-linux-musl*) | ||
| 169 | use_cpu=$host_cpu | ||
| 170 | use_toolchain="${use_toolchain:-/usr}" | ||
| 171 | platform_os="linux" | ||
| 172 | ;; | ||
| 173 | - x86_64*-linux-gnu*|x86_64-*-linux-uclibc*) | ||
| 174 | + x86_64*-linux-gnu*|x86_64-*-linux-uclibc*|x86_64-*-linux-musl*) | ||
| 175 | use_cpu=$host_cpu | ||
| 176 | use_toolchain="${use_toolchain:-/usr}" | ||
| 177 | platform_cflags="-fPIC -DPIC" | ||
| 178 | -- | ||
| 179 | 2.10.2 | ||
| 180 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch deleted file mode 100644 index e34a5b71e4..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch +++ /dev/null | |||
| @@ -1,40 +0,0 @@ | |||
| 1 | From 55233024648b5673dbf223586968e71cc4c70711 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 16 Nov 2016 18:49:36 -0800 | ||
| 4 | Subject: [PATCH 10/10] RssReader: Fix compiler warning comparing pointer to | ||
| 5 | zero | ||
| 6 | |||
| 7 | Clang finds this warning | ||
| 8 | RssReader.cpp:272:19: error: ordered comparison between pointer and zero ('TiXmlElement *' and 'int') | ||
| 9 | while (itemNode > 0) | ||
| 10 | ~~~~~~~~ ^ ~ | ||
| 11 | RssReader.cpp:276:22: error: ordered comparison between pointer and zero ('TiXmlNode *' and 'int') | ||
| 12 | while (childNode > 0) | ||
| 13 | ~~~~~~~~~ ^ ~ | ||
| 14 | |||
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 16 | --- | ||
| 17 | xbmc/utils/RssReader.cpp | 4 ++-- | ||
| 18 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/xbmc/utils/RssReader.cpp b/xbmc/utils/RssReader.cpp | ||
| 21 | index 9186f56..2494dc8 100644 | ||
| 22 | --- a/xbmc/utils/RssReader.cpp | ||
| 23 | +++ b/xbmc/utils/RssReader.cpp | ||
| 24 | @@ -269,11 +269,11 @@ void CRssReader::GetNewsItems(TiXmlElement* channelXmlNode, int iFeed) | ||
| 25 | if (m_tagSet.empty()) | ||
| 26 | AddTag("title"); | ||
| 27 | |||
| 28 | - while (itemNode > 0) | ||
| 29 | + while (itemNode != NULL) | ||
| 30 | { | ||
| 31 | TiXmlNode* childNode = itemNode->FirstChild(); | ||
| 32 | mTagElements.clear(); | ||
| 33 | - while (childNode > 0) | ||
| 34 | + while (childNode != NULL) | ||
| 35 | { | ||
| 36 | std::string strName = childNode->ValueStr(); | ||
| 37 | |||
| 38 | -- | ||
| 39 | 2.10.2 | ||
| 40 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0011-Let-configure-pass-on-unknown-architectures-setting-.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0011-Let-configure-pass-on-unknown-architectures-setting-.patch deleted file mode 100644 index 7ee44f1c4e..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0011-Let-configure-pass-on-unknown-architectures-setting-.patch +++ /dev/null | |||
| @@ -1,54 +0,0 @@ | |||
| 1 | From 19a1ffc1450bd3ecfb7419d74c733b2e16bf47f3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Balint Reczey <balint@balintreczey.hu> | ||
| 3 | Date: Wed, 26 Aug 2015 08:14:41 +0200 | ||
| 4 | Subject: [PATCH 11/12] Let configure pass on unknown architectures setting | ||
| 5 | sane defaults | ||
| 6 | |||
| 7 | This helps porting Kodi to new architectures while emitting warnings about | ||
| 8 | entering uncharted territory. | ||
| 9 | --- | ||
| 10 | configure.ac | 3 ++- | ||
| 11 | m4/xbmc_arch.m4 | 6 ++++-- | ||
| 12 | 2 files changed, 6 insertions(+), 3 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/configure.ac b/configure.ac | ||
| 15 | index 925466a..8369615 100644 | ||
| 16 | --- a/configure.ac | ||
| 17 | +++ b/configure.ac | ||
| 18 | @@ -658,7 +658,8 @@ case $host in | ||
| 19 | USE_STATIC_FFMPEG=1 | ||
| 20 | ;; | ||
| 21 | *) | ||
| 22 | - AC_MSG_ERROR(unsupported host ($host)) | ||
| 23 | + ARCH=$host_cpu"-"$host_os | ||
| 24 | + AC_MSG_WARN([unsupported host ($host), guessing ARCH as $ARCH.]) | ||
| 25 | esac | ||
| 26 | AC_SUBST([ARCH]) | ||
| 27 | |||
| 28 | diff --git a/m4/xbmc_arch.m4 b/m4/xbmc_arch.m4 | ||
| 29 | index ff5dc20..dfb45fd 100644 | ||
| 30 | --- a/m4/xbmc_arch.m4 | ||
| 31 | +++ b/m4/xbmc_arch.m4 | ||
| 32 | @@ -27,7 +27,8 @@ case $build in | ||
| 33 | AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") | ||
| 34 | ;; | ||
| 35 | *) | ||
| 36 | - AC_MSG_ERROR(unsupported native build platform: $build) | ||
| 37 | + AC_MSG_WARN([unsupported native build platform: $build]) | ||
| 38 | + AC_SUBST(NATIVE_ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") | ||
| 39 | esac | ||
| 40 | |||
| 41 | |||
| 42 | @@ -70,7 +71,8 @@ case $host in | ||
| 43 | AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -DTARGET_ANDROID") | ||
| 44 | ;; | ||
| 45 | *) | ||
| 46 | - AC_MSG_ERROR(unsupported build target: $host) | ||
| 47 | + AC_MSG_WARN([unsupported native build platform: $build]) | ||
| 48 | + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX") | ||
| 49 | esac | ||
| 50 | |||
| 51 | if test "$target_platform" = "target_android" ; then | ||
| 52 | -- | ||
| 53 | 2.10.2 | ||
| 54 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0012-Revert-droid-fix-builds-with-AML-disabled.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0012-Revert-droid-fix-builds-with-AML-disabled.patch deleted file mode 100644 index 8d70b3f8f3..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0012-Revert-droid-fix-builds-with-AML-disabled.patch +++ /dev/null | |||
| @@ -1,87 +0,0 @@ | |||
| 1 | From 9e88aa086083b80c05b2bf057b92682186c4e6dc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Balint Reczey <balint@balintreczey.hu> | ||
| 3 | Date: Thu, 6 Oct 2016 18:12:18 +0200 | ||
| 4 | Subject: [PATCH 12/12] Revert "[droid] fix builds with AML disabled" | ||
| 5 | |||
| 6 | This reverts commit 4733383b8f1c1dd0b95e9e5358425d8a0b7ba8fc. | ||
| 7 | --- | ||
| 8 | xbmc/utils/SystemInfo.cpp | 4 ---- | ||
| 9 | xbmc/windowing/egl/EGLWrapper.cpp | 16 ++++++---------- | ||
| 10 | 2 files changed, 6 insertions(+), 14 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/xbmc/utils/SystemInfo.cpp b/xbmc/utils/SystemInfo.cpp | ||
| 13 | index fcc6733..52e7fa3 100644 | ||
| 14 | --- a/xbmc/utils/SystemInfo.cpp | ||
| 15 | +++ b/xbmc/utils/SystemInfo.cpp | ||
| 16 | @@ -57,10 +57,8 @@ | ||
| 17 | #include "utils/XMLUtils.h" | ||
| 18 | #if defined(TARGET_ANDROID) | ||
| 19 | #include "platform/android/jni/Build.h" | ||
| 20 | -#if defined(HAS_LIBAMCODEC) | ||
| 21 | #include "utils/AMLUtils.h" | ||
| 22 | #endif | ||
| 23 | -#endif | ||
| 24 | |||
| 25 | /* Platform identification */ | ||
| 26 | #if defined(TARGET_DARWIN) | ||
| 27 | @@ -873,11 +871,9 @@ bool CSysInfo::IsAeroDisabled() | ||
| 28 | bool CSysInfo::HasHW3DInterlaced() | ||
| 29 | { | ||
| 30 | #if defined(TARGET_ANDROID) | ||
| 31 | -#if defined(HAS_LIBAMCODEC) | ||
| 32 | if (aml_hw3d_present()) | ||
| 33 | return true; | ||
| 34 | #endif | ||
| 35 | -#endif | ||
| 36 | return false; | ||
| 37 | } | ||
| 38 | |||
| 39 | diff --git a/xbmc/windowing/egl/EGLWrapper.cpp b/xbmc/windowing/egl/EGLWrapper.cpp | ||
| 40 | index 30f5757..583d43a 100644 | ||
| 41 | --- a/xbmc/windowing/egl/EGLWrapper.cpp | ||
| 42 | +++ b/xbmc/windowing/egl/EGLWrapper.cpp | ||
| 43 | @@ -24,19 +24,15 @@ | ||
| 44 | #include <assert.h> | ||
| 45 | #if defined(TARGET_ANDROID) | ||
| 46 | #include "EGLNativeTypeAndroid.h" | ||
| 47 | -#if defined(HAS_LIBAMCODEC) | ||
| 48 | #include "EGLNativeTypeAmlAndroid.h" | ||
| 49 | #endif | ||
| 50 | -#endif | ||
| 51 | #if defined(TARGET_RASPBERRY_PI) | ||
| 52 | #include "EGLNativeTypeRaspberryPI.h" | ||
| 53 | #endif | ||
| 54 | #if defined(HAS_IMXVPU) | ||
| 55 | #include "EGLNativeTypeIMX.h" | ||
| 56 | #endif | ||
| 57 | -#if defined(TARGET_LINUX) && defined(HAS_LIBAMCODEC) | ||
| 58 | #include "EGLNativeTypeAmlogic.h" | ||
| 59 | -#endif | ||
| 60 | #include "EGLWrapper.h" | ||
| 61 | |||
| 62 | #define CheckError() m_result = eglGetError(); if(m_result != EGL_SUCCESS) CLog::Log(LOGERROR, "EGL error in %s: %x",__FUNCTION__, m_result); | ||
| 63 | @@ -91,15 +87,15 @@ bool CEGLWrapper::Initialize(const std::string &implementation) | ||
| 64 | // Try to create each backend in sequence and go with the first one | ||
| 65 | // that we know will work | ||
| 66 | if ( | ||
| 67 | -#if defined(TARGET_ANDROID) && defined(HAS_LIBAMCODEC) | ||
| 68 | - (nativeGuess = CreateEGLNativeType<CEGLNativeTypeAmlAndroid>(implementation)) | ||
| 69 | -#elif defined(TARGET_ANDROID) | ||
| 70 | - (nativeGuess = CreateEGLNativeType<CEGLNativeTypeAndroid>(implementation)) | ||
| 71 | -#elif defined(TARGET_RASPBERRY_PI) | ||
| 72 | +#if defined(TARGET_ANDROID) | ||
| 73 | + (nativeGuess = CreateEGLNativeType<CEGLNativeTypeAmlAndroid>(implementation)) || | ||
| 74 | + (nativeGuess = CreateEGLNativeType<CEGLNativeTypeAndroid>(implementation)) || | ||
| 75 | +#endif | ||
| 76 | +#if defined(TARGET_RASPBERRY_PI) | ||
| 77 | (nativeGuess = CreateEGLNativeType<CEGLNativeTypeRaspberryPI>(implementation)) | ||
| 78 | #elif defined(HAS_IMXVPU) | ||
| 79 | (nativeGuess = CreateEGLNativeType<CEGLNativeTypeIMX>(implementation)) | ||
| 80 | -#elif defined(TARGET_LINUX) && defined(HAS_LIBAMCODEC) | ||
| 81 | +#else | ||
| 82 | (nativeGuess = CreateEGLNativeType<CEGLNativeTypeAmlogic>(implementation)) | ||
| 83 | #endif | ||
| 84 | ) | ||
| 85 | -- | ||
| 86 | 2.10.2 | ||
| 87 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0013-FTPParse.cpp-use-std-string.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0013-FTPParse.cpp-use-std-string.patch deleted file mode 100644 index c9c9066449..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0013-FTPParse.cpp-use-std-string.patch +++ /dev/null | |||
| @@ -1,96 +0,0 @@ | |||
| 1 | From 5fa10ff6b1b60abee172296d9c1dec8dfc10615c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Stefan Saraev <stefan@saraev.ca> | ||
| 3 | Date: Sun, 7 May 2017 17:30:47 +0300 | ||
| 4 | Subject: [PATCH] FTPParse.cpp: use std::string | ||
| 5 | |||
| 6 | Fixes build with newer gcc versions. | ||
| 7 | |||
| 8 | Taken from [1] | ||
| 9 | |||
| 10 | Upstream-Status: Backport [2] | ||
| 11 | |||
| 12 | [1] https://git.busybox.net/buildroot/plain/package/kodi/0003-FTPParse.cpp-use-std-string.patch?id=e2f03a6bde19766a1ac047c5ccfb049b5c4f61ca | ||
| 13 | [2] https://github.com/xbmc/xbmc/commit/5fa10ff6b1b60abee172296d9c1dec8dfc10615c | ||
| 14 | |||
| 15 | Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> | ||
| 16 | --- | ||
| 17 | xbmc/filesystem/FTPParse.cpp | 44 ++++++++++++++++++++++---------------------- | ||
| 18 | 1 file changed, 22 insertions(+), 22 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/xbmc/filesystem/FTPParse.cpp b/xbmc/filesystem/FTPParse.cpp | ||
| 21 | index cfcc7c64ed..b0f676ae1a 100644 | ||
| 22 | --- a/xbmc/filesystem/FTPParse.cpp | ||
| 23 | +++ b/xbmc/filesystem/FTPParse.cpp | ||
| 24 | @@ -34,7 +34,7 @@ CFTPParse::CFTPParse() | ||
| 25 | m_time = 0; | ||
| 26 | } | ||
| 27 | |||
| 28 | -string CFTPParse::getName() | ||
| 29 | +std::string CFTPParse::getName() | ||
| 30 | { | ||
| 31 | return m_name; | ||
| 32 | } | ||
| 33 | @@ -59,16 +59,16 @@ time_t CFTPParse::getTime() | ||
| 34 | return m_time; | ||
| 35 | } | ||
| 36 | |||
| 37 | -void CFTPParse::setTime(string str) | ||
| 38 | +void CFTPParse::setTime(std::string str) | ||
| 39 | { | ||
| 40 | /* Variables used to capture patterns via the regexes */ | ||
| 41 | - string month; | ||
| 42 | - string day; | ||
| 43 | - string year; | ||
| 44 | - string hour; | ||
| 45 | - string minute; | ||
| 46 | - string second; | ||
| 47 | - string am_or_pm; | ||
| 48 | + std::string month; | ||
| 49 | + std::string day; | ||
| 50 | + std::string year; | ||
| 51 | + std::string hour; | ||
| 52 | + std::string minute; | ||
| 53 | + std::string second; | ||
| 54 | + std::string am_or_pm; | ||
| 55 | |||
| 56 | /* time struct used to set the time_t variable */ | ||
| 57 | struct tm time_struct = {}; | ||
| 58 | @@ -338,21 +338,21 @@ int CFTPParse::getDayOfWeek(int month, int date, int year) | ||
| 59 | return day_of_week; | ||
| 60 | } | ||
| 61 | |||
| 62 | -int CFTPParse::FTPParse(string str) | ||
| 63 | +int CFTPParse::FTPParse(std::string str) | ||
| 64 | { | ||
| 65 | /* Various variable to capture patterns via the regexes */ | ||
| 66 | - string permissions; | ||
| 67 | - string link_count; | ||
| 68 | - string owner; | ||
| 69 | - string group; | ||
| 70 | - string size; | ||
| 71 | - string date; | ||
| 72 | - string name; | ||
| 73 | - string type; | ||
| 74 | - string stuff; | ||
| 75 | - string facts; | ||
| 76 | - string version; | ||
| 77 | - string file_id; | ||
| 78 | + std::string permissions; | ||
| 79 | + std::string link_count; | ||
| 80 | + std::string owner; | ||
| 81 | + std::string group; | ||
| 82 | + std::string size; | ||
| 83 | + std::string date; | ||
| 84 | + std::string name; | ||
| 85 | + std::string type; | ||
| 86 | + std::string stuff; | ||
| 87 | + std::string facts; | ||
| 88 | + std::string version; | ||
| 89 | + std::string file_id; | ||
| 90 | |||
| 91 | /* Regex for standard Unix listing formats */ | ||
| 92 | pcrecpp::RE unix_re("^([-bcdlps])" // type | ||
| 93 | -- | ||
| 94 | 2.11.0 | ||
| 95 | |||
| 96 | |||
diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service b/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service deleted file mode 100644 index 29d0394e42..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi-startup/kodi.service +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 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 deleted file mode 100644 index 295618914b..0000000000 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb +++ /dev/null | |||
| @@ -1,216 +0,0 @@ | |||
| 1 | SUMMARY = "Kodi Media Center" | ||
| 2 | |||
| 3 | LICENSE = "GPLv2" | ||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=930e2a5f63425d8dd72dbd7391c43c46" | ||
| 5 | |||
| 6 | FILESPATH =. "${FILE_DIRNAME}/kodi-17:" | ||
| 7 | |||
| 8 | DEPENDS = " \ | ||
| 9 | cmake-native \ | ||
| 10 | curl-native \ | ||
| 11 | gperf-native \ | ||
| 12 | jsonschemabuilder-native \ | ||
| 13 | nasm-native \ | ||
| 14 | swig-native \ | ||
| 15 | unzip-native \ | ||
| 16 | yasm-native \ | ||
| 17 | zip-native \ | ||
| 18 | avahi \ | ||
| 19 | boost \ | ||
| 20 | bzip2 \ | ||
| 21 | crossguid \ | ||
| 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 | sqlite3 \ | ||
| 54 | taglib \ | ||
| 55 | virtual/egl \ | ||
| 56 | virtual/libsdl \ | ||
| 57 | wavpack \ | ||
| 58 | yajl \ | ||
| 59 | zlib \ | ||
| 60 | ${@enable_glew(bb, d)} \ | ||
| 61 | " | ||
| 62 | |||
| 63 | PROVIDES = "xbmc" | ||
| 64 | |||
| 65 | SRCREV = "6abeebd5ba371547c8f04272296433f5e4e28e86" | ||
| 66 | PV = "17.3+gitr${SRCPV}" | ||
| 67 | ADDONSPV = "17.1" | ||
| 68 | SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Krypton \ | ||
| 69 | https://repo.voidlinux.eu/distfiles/${BPN}-${ADDONSPV}-generated-addons.tar.xz;name=addons;unpack=0 \ | ||
| 70 | file://0003-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch \ | ||
| 71 | file://0004-handle-SIGTERM.patch \ | ||
| 72 | file://0005-add-support-to-read-frequency-output-if-using-intel-.patch \ | ||
| 73 | file://0006-Disable-DVD-support.patch \ | ||
| 74 | file://0007-Always-compile-libcpluff-as-PIC.patch \ | ||
| 75 | file://0008-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch \ | ||
| 76 | file://0009-build-Add-support-for-musl-triplets.patch \ | ||
| 77 | file://0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch \ | ||
| 78 | file://0011-Let-configure-pass-on-unknown-architectures-setting-.patch \ | ||
| 79 | file://0012-Revert-droid-fix-builds-with-AML-disabled.patch \ | ||
| 80 | file://0001-change-order-of-detecting-libegl-and-libgles2.patch \ | ||
| 81 | file://0013-FTPParse.cpp-use-std-string.patch \ | ||
| 82 | " | ||
| 83 | |||
| 84 | SRC_URI_append_libc-musl = " \ | ||
| 85 | file://0001-Fix-file_Emu-on-musl.patch \ | ||
| 86 | file://0002-Remove-FILEWRAP.patch \ | ||
| 87 | " | ||
| 88 | SRC_URI[addons.md5sum] = "719614fa764011a18665d08af5c8c92f" | ||
| 89 | SRC_URI[addons.sha256sum] = "350da57408c27473eaf40e7f544bc94841bf101dc4346085260c5c4af0adac97" | ||
| 90 | |||
| 91 | inherit autotools-brokensep gettext pythonnative distro_features_check | ||
| 92 | |||
| 93 | REQUIRED_DISTRO_FEATURES += "opengl" | ||
| 94 | |||
| 95 | S = "${WORKDIR}/git" | ||
| 96 | |||
| 97 | # breaks compilation | ||
| 98 | ASNEEDED = "" | ||
| 99 | |||
| 100 | ACCEL ?= "" | ||
| 101 | ACCEL_x86 = "vaapi vdpau" | ||
| 102 | ACCEL_x86-64 = "vaapi vdpau" | ||
| 103 | |||
| 104 | PACKAGECONFIG ??= "${ACCEL} opengl \ | ||
| 105 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'openglesv2', d)} \ | ||
| 106 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'samba', '', d)} \ | ||
| 107 | " | ||
| 108 | |||
| 109 | PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles," | ||
| 110 | PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,virtual/egl" | ||
| 111 | PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" | ||
| 112 | PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" | ||
| 113 | PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5" | ||
| 114 | PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxinerama libxmu libxrandr libxtst" | ||
| 115 | PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio" | ||
| 116 | PACKAGECONFIG[lcms] = "--enable-lcms2,--disable-lcms2,lcms" | ||
| 117 | PACKAGECONFIG[samba] = "--enable-samba,--disable-samba,samba" | ||
| 118 | |||
| 119 | EXTRA_OECONF = " \ | ||
| 120 | --disable-debug \ | ||
| 121 | --disable-libcap \ | ||
| 122 | --disable-ccache \ | ||
| 123 | --disable-mid \ | ||
| 124 | --enable-libusb \ | ||
| 125 | --enable-alsa \ | ||
| 126 | --enable-airplay \ | ||
| 127 | --disable-optical-drive \ | ||
| 128 | --with-ffmpeg=shared \ | ||
| 129 | --enable-texturepacker=no \ | ||
| 130 | ac_cv_path_JAVA_EXE=/bin/true \ | ||
| 131 | " | ||
| 132 | |||
| 133 | FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O3 -ffast-math" | ||
| 134 | FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O3 -ffast-math" | ||
| 135 | BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}" | ||
| 136 | |||
| 137 | LDFLAGS_append_mips = " -latomic" | ||
| 138 | LDFLAGS_append_mipsel = " -latomic" | ||
| 139 | LDFLAGS_append_powerpc = " -latomic" | ||
| 140 | LDFLAGS_append_arm = " -latomic" | ||
| 141 | |||
| 142 | EXTRA_OECONF_append = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" | ||
| 143 | |||
| 144 | # for python modules | ||
| 145 | export HOST_SYS | ||
| 146 | export BUILD_SYS | ||
| 147 | export STAGING_LIBDIR | ||
| 148 | export STAGING_INCDIR | ||
| 149 | export PYTHON_DIR | ||
| 150 | |||
| 151 | def enable_glew(bb, d): | ||
| 152 | if bb.utils.contains('PACKAGECONFIG', 'x11', True, False, d) and bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d): | ||
| 153 | return "glew" | ||
| 154 | return "" | ||
| 155 | |||
| 156 | do_configure() { | ||
| 157 | tar xf ${WORKDIR}/${BPN}-${ADDONSPV}-generated-addons.tar.xz -C ${S}/ | ||
| 158 | |||
| 159 | ( for i in $(find ${S} -name configure.ac -or -name configure.in|grep -v ".pc") ; do | ||
| 160 | cd $(dirname $i) && gnu-configize --force || true | ||
| 161 | done ) | ||
| 162 | ( for f in ${S}/xbmc/interfaces/python/generated/*.cpp; do | ||
| 163 | touch `echo $f|sed -e 's/.cpp$/.xml/g'` | ||
| 164 | done ) | ||
| 165 | |||
| 166 | BOOTSTRAP_STANDALONE=1 make -f bootstrap.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder" | ||
| 167 | BOOTSTRAP_STANDALONE=1 make JAVA=/bin/true -f codegenerator.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder" | ||
| 168 | oe_runconf | ||
| 169 | } | ||
| 170 | |||
| 171 | do_compile_prepend() { | ||
| 172 | for i in $(find . -name "Makefile") ; do | ||
| 173 | sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i | ||
| 174 | done | ||
| 175 | |||
| 176 | for i in $(find . -name "*.mak*" -o -name "Makefile") ; do | ||
| 177 | sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i | ||
| 178 | done | ||
| 179 | } | ||
| 180 | |||
| 181 | INSANE_SKIP_${PN} = "rpaths" | ||
| 182 | |||
| 183 | FILES_${PN} += "${datadir}/xsessions ${datadir}/icons ${libdir}/xbmc ${datadir}/xbmc" | ||
| 184 | FILES_${PN}-dbg += "${libdir}/kodi/.debug ${libdir}/kodi/*/.debug ${libdir}/kodi/*/*/.debug ${libdir}/kodi/*/*/*/.debug" | ||
| 185 | |||
| 186 | # kodi uses some kind of dlopen() method for libcec so we need to add it manually | ||
| 187 | # OpenGL builds need glxinfo, that's in mesa-demos | ||
| 188 | RRECOMMENDS_${PN}_append = " \ | ||
| 189 | libcec \ | ||
| 190 | python \ | ||
| 191 | python-ctypes \ | ||
| 192 | python-lang \ | ||
| 193 | python-re \ | ||
| 194 | python-netclient \ | ||
| 195 | python-html \ | ||
| 196 | python-difflib \ | ||
| 197 | python-json \ | ||
| 198 | python-zlib \ | ||
| 199 | python-shell \ | ||
| 200 | python-sqlite3 \ | ||
| 201 | python-compression \ | ||
| 202 | libcurl \ | ||
| 203 | ${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr xdpyinfo', '', d)} \ | ||
| 204 | " | ||
| 205 | RRECOMMENDS_${PN}_append_libc-glibc = " \ | ||
| 206 | glibc-charmap-ibm850 \ | ||
| 207 | glibc-gconv-ibm850 \ | ||
| 208 | glibc-gconv-unicode \ | ||
| 209 | glibc-gconv-utf-32 \ | ||
| 210 | glibc-charmap-utf-8 \ | ||
| 211 | glibc-localedata-en-us \ | ||
| 212 | " | ||
| 213 | |||
| 214 | RPROVIDES_${PN} += "xbmc" | ||
| 215 | |||
| 216 | TOOLCHAIN = "gcc" | ||
