diff options
author | Jory Pratt <anarchy@gentoo.org> | 2019-12-06 23:28:32 -0600 |
---|---|---|
committer | Jory Pratt <anarchy@gentoo.org> | 2019-12-06 23:28:32 -0600 |
commit | e8d78bfd2dabf29161d38f7d8958adbe91d4b8f4 (patch) | |
tree | 9aa9272b57d1e8b22e9e754947b2ec67274adf04 /media-tv | |
parent | sys-kernel/ck-sources: initial 5.4.1 release ebuild (diff) | |
download | anarchy-e8d78bfd2dabf29161d38f7d8958adbe91d4b8f4.tar.gz anarchy-e8d78bfd2dabf29161d38f7d8958adbe91d4b8f4.tar.bz2 anarchy-e8d78bfd2dabf29161d38f7d8958adbe91d4b8f4.zip |
media-tv/kodi: Sync with tree, add musl patches
Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: Jory Pratt <anarchy@gentoo.org>
Diffstat (limited to 'media-tv')
-rw-r--r-- | media-tv/kodi/Manifest | 12 | ||||
-rw-r--r-- | media-tv/kodi/files/kodi-18.5-cassert.patch | 42 | ||||
-rw-r--r-- | media-tv/kodi/files/musl/0001-add-missing-stdint.h.patch | 24 | ||||
-rw-r--r-- | media-tv/kodi/files/musl/0002-fix-fileemu.patch | 94 | ||||
-rw-r--r-- | media-tv/kodi/files/musl/0003_use_stdint_for_musl.patch | 34 | ||||
-rw-r--r-- | media-tv/kodi/files/musl/0004-Fix-ldt-for-musl.patch | 25 | ||||
-rw-r--r-- | media-tv/kodi/files/musl/0005-fix-fortify-sources.patch | 25 | ||||
-rw-r--r-- | media-tv/kodi/files/musl/0006-remove-filewrap.patch | 57 | ||||
-rw-r--r-- | media-tv/kodi/files/musl/0007-set-default-stacksize-for-musl.patch | 24 | ||||
-rw-r--r-- | media-tv/kodi/kodi-18.5.ebuild | 65 | ||||
-rw-r--r-- | media-tv/kodi/metadata.xml | 1 |
11 files changed, 372 insertions, 31 deletions
diff --git a/media-tv/kodi/Manifest b/media-tv/kodi/Manifest index 6e2d308..226a1e8 100644 --- a/media-tv/kodi/Manifest +++ b/media-tv/kodi/Manifest @@ -1,8 +1,16 @@ +AUX kodi-18.5-cassert.patch 1402 BLAKE2B 02f2b63856cf1fd75749d78a0f9cf37cac55b20fc22302846011781c56e8902312a10e71c3e1b21f44aaa362efba2acefb73c5ae68643b569c541508f44d97bd SHA512 fbaa126dd647559749944c09e5424a76dccdaa5d8dc6299a52cb6215f20af29f3cf8d0596280f335e8a9be1ffe556fa47b33c9d28b22c2b47f51d738219aeb8c +AUX musl/0001-add-missing-stdint.h.patch 558 BLAKE2B 9e7f50f09c218dc1eed39b174320b2243973ca0057ede65f188e6d38b3ff9b34c421ef047da8bcd3cd78d19c9bfcd09fb6f8094efae7e3cc8ec9c1b5b7794fe0 SHA512 09a46f1aa1c1eb915447d71f8a0a5ef30ff84742da68e6fb91fee03cb297bcbdffe88ecf0af8e98a91d014624a43c5e18d59f90f273ba285579267fe5a5faf6a +AUX musl/0002-fix-fileemu.patch 3846 BLAKE2B 1bee8bd936ac75f5e2317522fc11856542d12d6b4ab3e142ee6081765274b1d74c5a10d92c9c9e045fcc6b1fc82e1dc25748cbcd7effe66d0338e47fc63c8c73 SHA512 44b4623d6814a8e78d2484e45db74884c91c0886c0cb701fe06300d525f461ed6c9e6d22fb23876f397323e068c76719d043f9aa4c80147efe6c46b5bd7fb4da +AUX musl/0003_use_stdint_for_musl.patch 1041 BLAKE2B 69cac71ecd4a00b5b267374a348418a7cb2271f35d0eb64a59204702755a9f0357d06478cc3a6b54a62253629b2c0a422d0391ba2e446199395160fc0b00aeb3 SHA512 7e5234fd6bdad5c493671ef24803c553609d3def8992af6f2b8f65a37f82643c320aa334f2d7b2353e02e3ae6a5b5ac021a60f52e3c2020454dd6860a59cc552 +AUX musl/0004-Fix-ldt-for-musl.patch 825 BLAKE2B 44fb4949b3b64c16ded8a19e8abb7ed35e8cf004259cc12bb1dc1133aabdca81dba40a7fea13e986bd81a5ca0adfc2f891ec601bcd4fac4fdbf7050faa977410 SHA512 21329b7eec18d91bd0758c7f88f14b5d557d9c28e147d7647a72b207989eeffa86226217762ac636429e224943a7ae385b4ba3111a97d70af4cc42affbfb7a2e +AUX musl/0005-fix-fortify-sources.patch 957 BLAKE2B 8278bc0904160aba37c44e407c286950a98f697c9684750237af3d715ec95355c0b420868afca77b8efd53ea6f9aab1a90dee39d2361dcf4bcb4d18b9d1f7953 SHA512 e305599f4f9133002e30d76ee2074172871541dee06f7a8bf66821a4d23364bb87adbae988f0785154f76660f2ca9c07945ff35dbbbfaedcc790cfc8cb988e93 +AUX musl/0006-remove-filewrap.patch 1975 BLAKE2B 2297018cb2f8549aae8c54833829bdffe085828c75b156c68909c1853669a543ca37c40d758f5a6acafeaee09b67d6445cc5a1cfb70d8331d8f3b7758c689b91 SHA512 54382349d55f5d531849d8893096a1ad7749585c1af20207c2f525c310654dcaea707a8687ad7b0b6dce8665158f81c9c9e27402214199862761825a8717dac4 +AUX musl/0007-set-default-stacksize-for-musl.patch 881 BLAKE2B cc5355a1ead38dae5590cf39ef4305925a4243ce4a6aebd5f24840efb9dee17b9346a19bd35557ab689d804beeac98f101525b9710344cd937c6fac55b0c8977 SHA512 7321601d9e9ef91cb6e1e5396646255a8fd658207e3f2c7c3ece52fac032cb00ec22a4fd956f9fc32ab0ba4409ad5dd688271e97792c573acf3c8668a2e23615 DIST ffmpeg-kodi-4.0.4-Leia-18.4.tar.gz 12430413 BLAKE2B 6de6fde2c16264f851466b46f87c23c34e7d503203f69d47342d46034f153860190d196da51221f866315405c8a33325b2160283333256ee5d5e293336afae99 SHA512 c6dd75dbff7119adeeda246cfb640b5e8d3b4c242ef83e5ba070207b60f0c715c3fe3cb328d87687b70a133f122a03aba990f0e95f3aac7d5dbcee25bec59078 DIST kodi-18.2-no-java-required.patch 991361 BLAKE2B ec58367d2ac378107bf84ab0b675a74f4eac620984811f50051e1fa0ccae5b52520eb106e3508c4bf4d98899a5068279370a2ddcebe33278d20642208d3a17e2 SHA512 8267f3ca7156c9498473ac33c24419f62541f68beffbb090a5e3da18fc6e9c32e509c10c91bc2721d07fc0d3ffc723966306d44cc0a00a51e363b1c24ac5d03f DIST kodi-18.5.tar.gz 51025415 BLAKE2B c439790a85466d50875cd63ccdc6fee1b16c5ee67d9a3371b1a006292f642e59c6321cb63f698e1a43bc7be45209dbf993028b1184722f7b51dbe6fef6a292ba SHA512 6fe70d8ee5b6ffd3d43b89487554e41eed8dbf95bb017b82578b547ec248ae94f4dda298f0d85c5896019f7032eba4e1e2494c8140dde9c9b9cb21802acfd029 DIST libdvdcss-1.4.2-Leia-Beta-5.tar.gz 101068 BLAKE2B 283aa2cec0a2200d3569bc280cb9659e9224a6b3a77db8a35b269cd8caf1337ac9d8b92b806df66f63ef7458a46bd6261f0b8b14678b10e26644a79dcbeea5da SHA512 5185dbdbeb1bd13ea9d8723f1f4ab599d6f3102f5ba1096cd085aa1cda252c045f327c719227bba8e1b742352ade5e335106c8d0c1637a5a6b93ce661620dd7e DIST libdvdnav-6.0.0-Leia-Alpha-3.tar.gz 137942 BLAKE2B 7573434a0ae8e8ccabf48173f81fcde29074eb138e119a2ae9156cde3c3d8bfd716f5d0e605b97f2dcac21f570781137c8533c5ae306b51e3905822fda318355 SHA512 11c93eaacd156f8fd7dec7c43d366438b201f31ad55b2870463a9e286912b6ada08882319a021fb7992190f87b909a49f2b83e0321cc17aedc29f7fe5898fa72 DIST libdvdread-6.0.0-Leia-Alpha-3.tar.gz 130649 BLAKE2B 0c206acdaf0776841ab792c74e023af07d9539eb72e03ae164382a31ed950f60e5e15f1d055979d28f1398924471b294d11f064b11b8373353b3962a3777ff3c SHA512 b3419ba0a1a2dd70f1bb6236afdfe1c6e88c9ad4264198b289e3bba9375e077cecf7f89848c7b09debaa445327f3507101f3d157e692f7a7163b2bb52643e1e7 -EBUILD kodi-18.5.ebuild 9592 BLAKE2B 43c680e8d5f0fa940cfc67cdafea4e9182d147009aacfc0f42c21844fbba7dc9becaa9268f3fc25eaf493840841867db096b90b026fd1bd1bdae48be6c7b8a29 SHA512 66484d9bd01f516f85dd4d127e64b2bf4d436160bdfeef51585d344cc6fe4924ba77d228a41145ab9858eeb76bf45d2ead5ac50578c3a081b026ab55ea69c509 -MISC metadata.xml 1649 BLAKE2B c102ccbe3a0d3ca203b445b6ee98b6fd68e75678fd034bc72cdeebfb06c7afe85ab947cf1264d1ba64449a42d05ee3ab5334885f01b656582f69b1dbdb39d2a1 SHA512 caf69d7fc2ab53692ec44ba75bf7aef9adf3b85d768e4d930b8b7889971128aecd1c3e186ad48ccbe3970cd98e2ec3d3fd249f6b5d19513980bfc6f42c9b9f39 +EBUILD kodi-18.5.ebuild 10037 BLAKE2B cbd4f5824873110a77b8793a67afeabd6c05939bfb25f9565082dd1b1349e5eb519882af82dfbcff4aba18d7c6b07d2ee2f07fa33fb30a3f45e32248cacd1059 SHA512 1733944fb4eecb09a44d4f6052bdc687079055baa447224ddfb3cd0ac60bffc90e4eaa65e39fb1768af91911a9ef679221c95844e1d32218a8fc63fa14139303 +MISC metadata.xml 1720 BLAKE2B 3158b87065286649496de2edf821c37042cafe7e729f7ba31c571ade72cf8f9fbce218485ac721ad896fa5ef751becfd2f3b4ce1645e97b4db673ec879884834 SHA512 f8d52358276ad8c2eb23632451f025ac45f799fa392bd59fcfd4417d9e9e76cf9ce066ac50cd8ee563319d7f2248b28c45fee3059a4e069ebb862e41d230b1da diff --git a/media-tv/kodi/files/kodi-18.5-cassert.patch b/media-tv/kodi/files/kodi-18.5-cassert.patch new file mode 100644 index 0000000..9558baa --- /dev/null +++ b/media-tv/kodi/files/kodi-18.5-cassert.patch @@ -0,0 +1,42 @@ +https://github.com/xbmc/xbmc/pull/17000 + +From bbfc36f06c191d3bdea19cacc498afb86bd25404 Mon Sep 17 00:00:00 2001 +From: Craig Andrews <candrews@integralblue.com> +Date: Thu, 5 Dec 2019 14:49:50 -0500 +Subject: [PATCH] Add missing cassert includes +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Without these includes, ‘assert’ was not declared in this scope errors +occur. +--- + xbmc/profiles/dialogs/GUIDialogProfileSettings.cpp | 1 + + xbmc/windowing/GraphicContext.cpp | 2 ++ + 2 files changed, 3 insertions(+) + +diff --git a/xbmc/profiles/dialogs/GUIDialogProfileSettings.cpp b/xbmc/profiles/dialogs/GUIDialogProfileSettings.cpp +index 1303d894478c..aa85d95b3234 100644 +--- a/xbmc/profiles/dialogs/GUIDialogProfileSettings.cpp ++++ b/xbmc/profiles/dialogs/GUIDialogProfileSettings.cpp +@@ -31,6 +31,7 @@ + #include "utils/Variant.h" + #include "utils/log.h" + ++#include <cassert> + #include <utility> + + #define SETTING_PROFILE_NAME "profile.name" +diff --git a/xbmc/windowing/GraphicContext.cpp b/xbmc/windowing/GraphicContext.cpp +index b47bafba57dc..75b333ea6daa 100644 +--- a/xbmc/windowing/GraphicContext.cpp ++++ b/xbmc/windowing/GraphicContext.cpp +@@ -25,6 +25,8 @@ + #include "settings/lib/Setting.h" + #include "utils/log.h" + ++#include <cassert> ++ + using namespace KODI::MESSAGING; + + CGraphicContext::CGraphicContext(void) = default; diff --git a/media-tv/kodi/files/musl/0001-add-missing-stdint.h.patch b/media-tv/kodi/files/musl/0001-add-missing-stdint.h.patch new file mode 100644 index 0000000..8a1bfcd --- /dev/null +++ b/media-tv/kodi/files/musl/0001-add-missing-stdint.h.patch @@ -0,0 +1,24 @@ +From 014f4b37a13366d1df37ab86db7fcb7c7cb6da7c Mon Sep 17 00:00:00 2001 +From: Jory Pratt <anarchy@gentoo.org> +Date: Wed, 24 Apr 2019 10:09:26 -0500 +Subject: [PATCH 1/7] add missing stdint.h + +--- + xbmc/filesystem/ZipManager.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/xbmc/filesystem/ZipManager.h b/xbmc/filesystem/ZipManager.h +index f24d459..4cd899c 100644 +--- a/xbmc/filesystem/ZipManager.h ++++ b/xbmc/filesystem/ZipManager.h +@@ -21,6 +21,7 @@ + #include <string> + #include <vector> + #include <map> ++#include <stdint.h> + + class CURL; + +-- +2.21.0 + diff --git a/media-tv/kodi/files/musl/0002-fix-fileemu.patch b/media-tv/kodi/files/musl/0002-fix-fileemu.patch new file mode 100644 index 0000000..25b8e5a --- /dev/null +++ b/media-tv/kodi/files/musl/0002-fix-fileemu.patch @@ -0,0 +1,94 @@ +From eee360d98c2a506a3124b538a9f6629596607698 Mon Sep 17 00:00:00 2001 +From: Jory Pratt <anarchy@gentoo.org> +Date: Wed, 24 Apr 2019 10:10:22 -0500 +Subject: [PATCH 2/7] fix fileemu + +--- + xbmc/cores/DllLoader/exports/emu_msvcrt.cpp | 15 +++++++++------ + xbmc/cores/DllLoader/exports/emu_msvcrt.h | 2 +- + xbmc/cores/DllLoader/exports/wrapper.c | 2 +- + 3 files changed, 11 insertions(+), 8 deletions(-) + +diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp +index 5546f6e..c40eee8 100644 +--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp ++++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp +@@ -38,6 +38,7 @@ + #include <fcntl.h> + #include <time.h> + #include <signal.h> ++#include <paths.h> + #ifdef TARGET_POSIX + #include "PlatformDefs.h" // for __stat64 + #include "XFileUtils.h" +@@ -1480,7 +1481,7 @@ extern "C" + int ret; + + ret = dll_fgetpos64(stream, &tmpPos); +-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) ++#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(__GLIBC__) + *pos = (fpos_t)tmpPos; + #else + pos->__pos = (off_t)tmpPos.__pos; +@@ -1493,8 +1494,9 @@ extern "C" + CFile* pFile = g_emuFileWrapper.GetFileXbmcByStream(stream); + if (pFile != NULL) + { +-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) +- *pos = pFile->GetPosition(); ++#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(__GLIBC__) ++ uint64_t *ppos = (uint64_t *) pos; ++ *ppos = pFile->GetPosition(); + #else + pos->__pos = pFile->GetPosition(); + #endif +@@ -1509,8 +1511,9 @@ extern "C" + int fd = g_emuFileWrapper.GetDescriptorByStream(stream); + if (fd >= 0) + { +-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) +- if (dll_lseeki64(fd, *pos, SEEK_SET) >= 0) ++#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(__GLIBC__) ++ const uint64_t *ppos = (const uint64_t *) pos; ++ if (dll_lseeki64(fd, *ppos, SEEK_SET) >= 0) + #else + if (dll_lseeki64(fd, (__off64_t)pos->__pos, SEEK_SET) >= 0) + #endif +@@ -1532,7 +1535,7 @@ extern "C" + if (fd >= 0) + { + fpos64_t tmpPos; +-#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) ++#if !defined(TARGET_POSIX) || defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(__GLIBC__) + tmpPos= *pos; + #else + tmpPos.__pos = (off64_t)(pos->__pos); +diff --git a/xbmc/cores/DllLoader/exports/emu_msvcrt.h b/xbmc/cores/DllLoader/exports/emu_msvcrt.h +index eb30c44..d8ca2cb 100644 +--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.h ++++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.h +@@ -12,7 +12,7 @@ + #define _onexit_t void* + #endif + +-#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) ++#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(__GLIBC__) + typedef off_t __off_t; + typedef int64_t off64_t; + typedef off64_t __off64_t; +diff --git a/xbmc/cores/DllLoader/exports/wrapper.c b/xbmc/cores/DllLoader/exports/wrapper.c +index d618565..05e6368 100644 +--- a/xbmc/cores/DllLoader/exports/wrapper.c ++++ b/xbmc/cores/DllLoader/exports/wrapper.c +@@ -27,7 +27,7 @@ + #endif + #include <dlfcn.h> + +-#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) ++#if defined(TARGET_DARWIN) || defined(TARGET_FREEBSD) || defined(TARGET_ANDROID) || !defined(__GLIBC__) + typedef off_t __off_t; + typedef int64_t off64_t; + typedef off64_t __off64_t; +-- +2.21.0 + diff --git a/media-tv/kodi/files/musl/0003_use_stdint_for_musl.patch b/media-tv/kodi/files/musl/0003_use_stdint_for_musl.patch new file mode 100644 index 0000000..df5d52f --- /dev/null +++ b/media-tv/kodi/files/musl/0003_use_stdint_for_musl.patch @@ -0,0 +1,34 @@ +From 6ba5baa56fcfadc66a6e36184dbab7f111737663 Mon Sep 17 00:00:00 2001 +From: Jory Pratt <anarchy@gentoo.org> +Date: Wed, 24 Apr 2019 11:20:27 -0500 +Subject: [PATCH] Use stdint.h defined types uint8_t, uint16_t, uint32_t and + uint64_t for compatibility with musl libc + +--- + xbmc/platform/linux/storage/UDisks2Provider.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/xbmc/platform/linux/storage/UDisks2Provider.h b/xbmc/platform/linux/storage/UDisks2Provider.h +index c0eb915..3697ef4 100644 +--- a/xbmc/platform/linux/storage/UDisks2Provider.h ++++ b/xbmc/platform/linux/storage/UDisks2Provider.h +@@ -10,6 +10,7 @@ + + #include <string> + #include <vector> ++#include <stdint.h> + + #include "storage/IStorageProvider.h" + #include "DBusUtil.h" +@@ -40,7 +41,7 @@ class CUDisks2Provider : public IStorageProvider + std::string m_label; + std::string m_device; + bool m_isSystem = false; +- u_int64_t m_size = 0; ++ int64_t m_size = 0; + + explicit Block(const char *object); + ~Block() = default; +-- +2.21.0 + diff --git a/media-tv/kodi/files/musl/0004-Fix-ldt-for-musl.patch b/media-tv/kodi/files/musl/0004-Fix-ldt-for-musl.patch new file mode 100644 index 0000000..bf45c28 --- /dev/null +++ b/media-tv/kodi/files/musl/0004-Fix-ldt-for-musl.patch @@ -0,0 +1,25 @@ +From 557e8a2e6616e6946558276aa93d812d1ffa860c Mon Sep 17 00:00:00 2001 +From: Jory Pratt <anarchy@gentoo.org> +Date: Wed, 24 Apr 2019 10:10:59 -0500 +Subject: [PATCH 3/7] Fix ldt for musl + +--- + xbmc/cores/DllLoader/ldt_keeper.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xbmc/cores/DllLoader/ldt_keeper.c b/xbmc/cores/DllLoader/ldt_keeper.c +index 0e6bc81..73f1346 100644 +--- a/xbmc/cores/DllLoader/ldt_keeper.c ++++ b/xbmc/cores/DllLoader/ldt_keeper.c +@@ -49,7 +49,7 @@ + #ifdef __cplusplus + extern "C" { + #endif +-#if defined(TARGET_ANDROID) && defined(__i386__) && !defined(modify_ldt) ++#if defined(__linux__) && !defined(__GLIBC__) && !defined(modify_ldt) + #define modify_ldt(a,b,c) syscall( __NR_modify_ldt, a, b, c); + #else + int modify_ldt(int func, void *ptr, unsigned long bytecount); +-- +2.21.0 + diff --git a/media-tv/kodi/files/musl/0005-fix-fortify-sources.patch b/media-tv/kodi/files/musl/0005-fix-fortify-sources.patch new file mode 100644 index 0000000..82d5141 --- /dev/null +++ b/media-tv/kodi/files/musl/0005-fix-fortify-sources.patch @@ -0,0 +1,25 @@ +From 995276d672ecebf01b7a36f5ea7532f02f7ec68e Mon Sep 17 00:00:00 2001 +From: Jory Pratt <anarchy@gentoo.org> +Date: Wed, 24 Apr 2019 10:13:46 -0500 +Subject: [PATCH 4/7] fix fortify sources + +--- + xbmc/cores/DllLoader/exports/wrapper.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xbmc/cores/DllLoader/exports/wrapper.c b/xbmc/cores/DllLoader/exports/wrapper.c +index 05e6368..a2ce079 100644 +--- a/xbmc/cores/DllLoader/exports/wrapper.c ++++ b/xbmc/cores/DllLoader/exports/wrapper.c +@@ -453,7 +453,7 @@ struct mntent *__wrap_getmntent(FILE *fp) + // are actually #defines which are inlined when compiled with -O. Those defines + // actually call __*chk (for example, __fread_chk). We need to bypass this whole + // thing to actually call our wrapped functions. +-#if _FORTIFY_SOURCE > 1 ++#if defined(__GLIBC__) && _FORTIFY_SOURCE > 1 + + size_t __wrap___fread_chk(void * ptr, size_t ptrlen, size_t size, size_t n, FILE * stream) + { +-- +2.21.0 + diff --git a/media-tv/kodi/files/musl/0006-remove-filewrap.patch b/media-tv/kodi/files/musl/0006-remove-filewrap.patch new file mode 100644 index 0000000..93c90fa --- /dev/null +++ b/media-tv/kodi/files/musl/0006-remove-filewrap.patch @@ -0,0 +1,57 @@ +From 04e63b1f7a3ead576bcf504950af48b3d7383301 Mon Sep 17 00:00:00 2001 +From: Jory Pratt <anarchy@gentoo.org> +Date: Wed, 24 Apr 2019 10:14:17 -0500 +Subject: [PATCH 5/7] remove filewrap + +--- + xbmc/platform/posix/utils/PosixInterfaceForCLog.cpp | 6 +----- + xbmc/platform/posix/utils/PosixInterfaceForCLog.h | 4 +--- + 2 files changed, 2 insertions(+), 8 deletions(-) + +diff --git a/xbmc/platform/posix/utils/PosixInterfaceForCLog.cpp b/xbmc/platform/posix/utils/PosixInterfaceForCLog.cpp +index ce4c5aa..8c674eb 100644 +--- a/xbmc/platform/posix/utils/PosixInterfaceForCLog.cpp ++++ b/xbmc/platform/posix/utils/PosixInterfaceForCLog.cpp +@@ -17,10 +17,6 @@ + #include "platform/android/activity/XBMCApp.h" + #endif // TARGET_ANDROID + +-struct FILEWRAP : public FILE +-{}; +- +- + CPosixInterfaceForCLog::CPosixInterfaceForCLog() : + m_file(NULL) + { } +@@ -40,7 +36,7 @@ bool CPosixInterfaceForCLog::OpenLogFile(const std::string &logFilename, const s + (void)remove(backupOldLogToFilename.c_str()); // if it's failed, try to continue + (void)rename(logFilename.c_str(), backupOldLogToFilename.c_str()); // if it's failed, try to continue + +- m_file = (FILEWRAP*)fopen(logFilename.c_str(), "wb"); ++ m_file = fopen(logFilename.c_str(), "wb"); + if (!m_file) + return false; // error, can't open log file + +diff --git a/xbmc/platform/posix/utils/PosixInterfaceForCLog.h b/xbmc/platform/posix/utils/PosixInterfaceForCLog.h +index 4e0f6c6..758debd 100644 +--- a/xbmc/platform/posix/utils/PosixInterfaceForCLog.h ++++ b/xbmc/platform/posix/utils/PosixInterfaceForCLog.h +@@ -10,8 +10,6 @@ + + #include <string> + +-struct FILEWRAP; // forward declaration, wrapper for FILE +- + class CPosixInterfaceForCLog + { + public: +@@ -23,5 +21,5 @@ public: + void PrintDebugString(const std::string& debugString); + static void GetCurrentLocalTime(int& year, int& month, int& day, int& hour, int& minute, int& second, double& millisecond); + private: +- FILEWRAP* m_file; ++ FILE* m_file; + }; +-- +2.21.0 + diff --git a/media-tv/kodi/files/musl/0007-set-default-stacksize-for-musl.patch b/media-tv/kodi/files/musl/0007-set-default-stacksize-for-musl.patch new file mode 100644 index 0000000..5b0f4a3 --- /dev/null +++ b/media-tv/kodi/files/musl/0007-set-default-stacksize-for-musl.patch @@ -0,0 +1,24 @@ +From 099f2448dd4294abb91bae2135bac103a819ff8f Mon Sep 17 00:00:00 2001 +From: Jory Pratt <anarchy@gentoo.org> +Date: Wed, 24 Apr 2019 10:15:33 -0500 +Subject: [PATCH 6/7] set default stacksize for musl + +--- + xbmc/threads/platform/pthreads/ThreadImpl.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/xbmc/threads/platform/pthreads/ThreadImpl.cpp b/xbmc/threads/platform/pthreads/ThreadImpl.cpp +index 4ad675e..46efbc2 100644 +--- a/xbmc/threads/platform/pthreads/ThreadImpl.cpp ++++ b/xbmc/threads/platform/pthreads/ThreadImpl.cpp +@@ -56,6 +56,7 @@ void CThread::SpawnThread(unsigned stacksize) + { + pthread_attr_t attr; + pthread_attr_init(&attr); ++ if (!stacksize) stacksize = 1024*1024; + #if !defined(TARGET_ANDROID) // http://code.google.com/p/android/issues/detail?id=7808 + if (stacksize > PTHREAD_STACK_MIN) + pthread_attr_setstacksize(&attr, stacksize); +-- +2.21.0 + diff --git a/media-tv/kodi/kodi-18.5.ebuild b/media-tv/kodi/kodi-18.5.ebuild index 5db89f3..da3825d 100644 --- a/media-tv/kodi/kodi-18.5.ebuild +++ b/media-tv/kodi/kodi-18.5.ebuild @@ -3,7 +3,6 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} PYTHON_REQ_USE="libressl?,sqlite,ssl" LIBDVDCSS_VERSION="1.4.2-Leia-Beta-5" LIBDVDREAD_VERSION="6.0.0-Leia-Alpha-3" @@ -14,8 +13,19 @@ FFMPEG_KODI_VERSION="18.4" SRC_URI="https://github.com/xbmc/libdvdcss/archive/${LIBDVDCSS_VERSION}.tar.gz -> libdvdcss-${LIBDVDCSS_VERSION}.tar.gz https://github.com/xbmc/libdvdread/archive/${LIBDVDREAD_VERSION}.tar.gz -> libdvdread-${LIBDVDREAD_VERSION}.tar.gz https://github.com/xbmc/libdvdnav/archive/${LIBDVDNAV_VERSION}.tar.gz -> libdvdnav-${LIBDVDNAV_VERSION}.tar.gz - !system-ffmpeg? ( https://github.com/xbmc/FFmpeg/archive/${FFMPEG_VERSION}-${CODENAME}-${FFMPEG_KODI_VERSION}.tar.gz -> ffmpeg-${PN}-${FFMPEG_VERSION}-${CODENAME}-${FFMPEG_KODI_VERSION}.tar.gz ) - !java? ( https://dev.gentoo.org/~anarchy/patches/${PN}-18.2-no-java-required.patch )" + !java? ( https://dev.gentoo.org/~anarchy/patches/${PN}-18.2-no-java-required.patch ) + !system-ffmpeg? ( https://github.com/xbmc/FFmpeg/archive/${FFMPEG_VERSION}-${CODENAME}-${FFMPEG_KODI_VERSION}.tar.gz -> ffmpeg-${PN}-${FFMPEG_VERSION}-${CODENAME}-${FFMPEG_KODI_VERSION}.tar.gz )" + +PATCHES=( + "${FILESDIR}/${P}-cassert.patch" + "${FILESDIR}/musl/0001-add-missing-stdint.h.patch" + "${FILESDIR}/musl/0002-fix-fileemu.patch" + "${FILESDIR}/musl/0003_use_stdint_for_musl.patch" + "${FILESDIR}/musl/0004-Fix-ldt-for-musl.patch" + "${FILESDIR}/musl/0005-fix-fortify-sources.patch" + "${FILESDIR}/musl/0006-remove-filewrap.patch" + "${FILESDIR}/musl/0007-set-default-stacksize-for-musl.patch" +) if [[ ${PV} == *9999 ]] ; then PYTHON_COMPAT=( python2_7 python3_{5,6,7} ) @@ -33,7 +43,7 @@ else S=${WORKDIR}/xbmc-${MY_PV}-${CODENAME} fi -inherit autotools cmake-utils linux-info pax-utils python-single-r1 xdg-utils +inherit autotools cmake-utils desktop linux-info pax-utils python-single-r1 xdg DESCRIPTION="A free and open source media-player and entertainment hub" HOMEPAGE="https://kodi.tv/ https://kodi.wiki/" @@ -43,19 +53,17 @@ SLOT="0" # use flag is called libusb so that it doesn't fool people in thinking that # it is _required_ for USB support. Otherwise they'll disable udev and # that's going to be worse. -IUSE="airplay alsa bluetooth bluray caps cec +css dbus dvd gbm gles java lcms libressl libusb lirc mariadb mysql nfs +opengl pulseaudio samba systemd +system-ffmpeg test +udev udisks upnp upower vaapi vdpau wayland webserver +X +xslt zeroconf" - -RESTRICT="!test? ( test )" - +IUSE="airplay alsa bluetooth bluray caps cec +css dbus dvd gbm gles java lcms libressl libusb lirc mariadb mysql nfs +opengl pulseaudio raspberry-pi samba systemd +system-ffmpeg test +udev udisks upnp upower vaapi vdpau wayland webserver +X +xslt zeroconf" REQUIRED_USE=" ${PYTHON_REQUIRED_USE} || ( gles opengl ) - ^^ ( gbm wayland X ) + ^^ ( gbm raspberry-pi wayland X ) ?? ( mariadb mysql ) udev? ( !libusb ) udisks? ( dbus ) upower? ( dbus ) " +RESTRICT="!test? ( test )" COMMON_DEPEND="${PYTHON_DEPS} airplay? ( @@ -71,7 +79,7 @@ COMMON_DEPEND="${PYTHON_DEPS} dev-libs/expat dev-libs/flatbuffers >=dev-libs/fribidi-0.19.7 - cec? ( >=dev-libs/libcec-4.0 ) + cec? ( >=dev-libs/libcec-4.0[raspberry-pi?] ) dev-libs/libpcre[cxx] >=dev-libs/libinput-1.10.5 >=dev-libs/libxml2-2.9.4 @@ -83,7 +91,9 @@ COMMON_DEPEND="${PYTHON_DEPS} >=dev-libs/libfmt-3.0.1 dev-libs/libfstrcmp gbm? ( media-libs/mesa[gbm] ) - gles? ( media-libs/mesa[gles2] ) + gles? ( + !raspberry-pi? ( media-libs/mesa[gles2] ) + ) lcms? ( media-libs/lcms:2 ) libusb? ( virtual/libusb:1 ) virtual/ttf-fonts @@ -91,7 +101,7 @@ COMMON_DEPEND="${PYTHON_DEPS} >=media-libs/fontconfig-2.12.4 >=media-libs/freetype-2.8 >=media-libs/libass-0.13.4 - media-libs/mesa[egl] + !raspberry-pi? ( media-libs/mesa[egl,X(+)] ) >=media-libs/taglib-1.11.1 system-ffmpeg? ( >=media-video/ffmpeg-${FFMPEG_VERSION}:=[encode,postproc] @@ -105,6 +115,9 @@ COMMON_DEPEND="${PYTHON_DEPS} opengl? ( media-libs/glu ) !libressl? ( >=dev-libs/openssl-1.0.2l:0= ) libressl? ( dev-libs/libressl:0= ) + raspberry-pi? ( + || ( media-libs/raspberrypi-userland media-libs/raspberrypi-userland-bin media-libs/mesa[egl,gles2,vc4] ) + ) pulseaudio? ( media-sound/pulseaudio ) samba? ( >=net-fs/samba-3.4.6[smbclient(+)] ) >=sys-libs/zlib-1.2.11 @@ -126,9 +139,8 @@ COMMON_DEPEND="${PYTHON_DEPS} >=dev-cpp/waylandpp-0.2.3:= media-libs/mesa[wayland] >=dev-libs/wayland-protocols-1.7 - >=x11-libs/libxkbcommon-0.4.1 ) - webserver? ( >=net-libs/libmicrohttpd-0.9.55[messages] ) + webserver? ( >=net-libs/libmicrohttpd-0.9.55[messages(+)] ) X? ( x11-libs/libX11 x11-libs/libXrandr @@ -136,11 +148,13 @@ COMMON_DEPEND="${PYTHON_DEPS} system-ffmpeg? ( media-video/ffmpeg[X] ) ) x11-libs/libdrm + >=x11-libs/libxkbcommon-0.4.1 xslt? ( dev-libs/libxslt ) zeroconf? ( net-dns/avahi[dbus] ) " RDEPEND="${COMMON_DEPEND} lirc? ( app-misc/lirc ) + !media-tv/xbmc udisks? ( sys-fs/udisks:2 ) upower? ( sys-power/upower ) " @@ -192,6 +206,7 @@ src_prepare() { if in_iuse java && use !java; then eapply "${DISTDIR}"/${PN}-18.2-no-java-required.patch fi + cmake-utils_src_prepare # avoid long delays when powerkit isn't running #348580 @@ -242,7 +257,6 @@ src_configure() { -DENABLE_LCMS2=$(usex lcms) -DENABLE_LIRCCLIENT=$(usex lirc) -DENABLE_MARIADBCLIENT=$(usex mariadb) - -DENABLE_MYSQLCLIENT=$(usex mysql) -DENABLE_MICROHTTPD=$(usex webserver) -DENABLE_MYSQLCLIENT=$(usex mysql) -DENABLE_NFS=$(usex nfs) @@ -284,6 +298,10 @@ src_configure() { ) fi + if use raspberry-pi; then + mycmakeargs+=( -DCORE_PLATFORM_NAME="rbpi" ) + fi + if use X; then mycmakeargs+=( -DCORE_PLATFORM_NAME="x11" ) fi @@ -293,34 +311,23 @@ src_configure() { src_compile() { cmake-utils_src_compile all - use test && emake -C "${BUILD_DIR}" kodi-test } src_test() { - emake -C "${BUILD_DIR}" test + cmake-utils_src_make check } src_install() { cmake-utils_src_install - pax-mark Em "${ED%/}"/usr/$(get_libdir)/${PN}/${PN}.bin + pax-mark Em "${ED}"/usr/$(get_libdir)/${PN}/${PN}.bin newicon media/icon48x48.png kodi.png - rm "${ED%/}"/usr/share/kodi/addons/skin.estuary/fonts/Roboto-Thin.ttf || die + rm "${ED}"/usr/share/kodi/addons/skin.estuary/fonts/Roboto-Thin.ttf || die dosym ../../../../fonts/roboto/Roboto-Thin.ttf \ usr/share/kodi/addons/skin.estuary/fonts/Roboto-Thin.ttf python_domodule tools/EventClients/lib/python/xbmcclient.py python_newscript "tools/EventClients/Clients/KodiSend/kodi-send.py" kodi-send } - -pkg_postinst() { - xdg_desktop_database_update - xdg_icon_cache_update -} - -pkg_postrm() { - xdg_desktop_database_update - xdg_icon_cache_update -} diff --git a/media-tv/kodi/metadata.xml b/media-tv/kodi/metadata.xml index 1f21b8a..269b8bf 100644 --- a/media-tv/kodi/metadata.xml +++ b/media-tv/kodi/metadata.xml @@ -15,6 +15,7 @@ <flag name="mariadb">Add MariaDB support</flag> <flag name="nfs">Enable NFS client support</flag> <flag name="dvd">Enable optical (CD/DVD drive) support</flag> + <flag name="raspberry-pi">Enable support for the Raspberry Pi</flag> <flag name="system-ffmpeg">Use system ffmpeg instead of the bundled one</flag> <flag name="libusb">Use <pkg>virtual/libusb</pkg> for usb device hotplug support. This flag should only be enabled if you're running a non-Linux kernel or you don't want to use <pkg>sys-fs/udev</pkg>.</flag> <flag name="udev">Use <pkg>sys-fs/udev</pkg> rules to handle devices' permissions and hotplug support. Unless you know what you're doing do not disable this flag on Linux kernels. This is provided as an option for completeness.</flag> |