kodi: update to 19.0-Matrix and detach kodi-rpi patch files

Kodi 19 does not support rpbi as a specific core platform anymore
and thus cannot be updated to use kodi 19 and its patches.
It might be possible that kodi itelf work out of the box now using
the gdm core platform using:
```
$ kodi --windowing=gbm
```
This commit is contained in:
marmeladema 2021-03-15 21:55:33 +00:00 committed by Érico Nogueira Rolim
parent 5666ed2964
commit 9f8647640b
12 changed files with 171 additions and 15 deletions

View file

@ -1 +0,0 @@
../kodi/patches

View file

@ -0,0 +1,10 @@
--- a/xbmc/filesystem/ZipManager.h.orig
+++ b/xbmc/filesystem/ZipManager.h
@@ -33,6 +33,7 @@
#include <string>
#include <vector>
#include <map>
+#include <stdint.h>
class CURL;

View file

@ -0,0 +1,11 @@
--- a/tools/depends/native/TexturePacker/Makefile 2016-04-24 08:48:30.000000000 +0200
+++ b/tools/depends/native/TexturePacker/Makefile 2016-07-16 15:12:39.875911293 +0200
@@ -36,7 +36,7 @@
-rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
cd $(PLATFORM); cp -a $(SOURCE)/* .
cd $(PLATFORM); ./autogen.sh
- cd $(PLATFORM); ./configure --prefix=$(PREFIX) $(EXTRA_CONFIGURE) EXTRA_DEFINES="$(NATIVE_ARCH_DEFINES)"
+ cd $(PLATFORM); ./configure --prefix=$(PREFIX) EXTRA_DEFINES="$(NATIVE_ARCH_DEFINES)"
$(APP): $(PLATFORM)

View file

@ -0,0 +1,74 @@
--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.h 2019-01-30 19:20:09.336910851 +0100
+++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.h 2019-01-30 19:20:25.423668836 +0100
@@ -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;
--- a/xbmc/cores/DllLoader/exports/wrapper.c 2019-01-30 19:24:16.396348561 +0100
+++ b/xbmc/cores/DllLoader/exports/wrapper.c 2019-01-30 19:25:38.562176774 +0100
@@ -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;
--- a/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp 2019-01-30 19:29:02.249253971 +0100
+++ b/xbmc/cores/DllLoader/exports/emu_msvcrt.cpp 2019-01-30 19:39:34.911053272 +0100
@@ -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 @@
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 @@
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 @@
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 @@
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);

View file

@ -0,0 +1,11 @@
--- a/xbmc/cores/DllLoader/ldt_keeper.c 2019-01-30 20:08:15.532823846 +0100
+++ b/xbmc/cores/DllLoader/ldt_keeper.c 2019-01-30 20:08:34.139580225 +0100
@@ -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);

View file

@ -0,0 +1,11 @@
--- a/xbmc/cores/DllLoader/exports/wrapper.c.orig
+++ b/xbmc/cores/DllLoader/exports/wrapper.c
@@ -462,7 +462,7 @@
// are actually #defines which are inlined when compiled with -O. Those defines
// actally 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)
{

View file

@ -0,0 +1,15 @@
--- a/cmake/scripts/linux/ArchSetup.cmake 2019-01-30 21:03:03.146025973 +0100
+++ b/cmake/scripts/linux/ArchSetup.cmake 2019-01-30 21:03:47.810441038 +0100
@@ -32,6 +32,12 @@
elseif(CPU MATCHES aarch64 OR CPU MATCHES arm64)
set(ARCH aarch64)
set(NEON True)
+ elseif(CPU MATCHES ppc64le)
+ set(ARCH ppc64le-linux)
+ set(NEON False)
+ elseif(CPU MATCHES ppc64)
+ set(ARCH ppc64-linux)
+ set(NEON False)
else()
message(SEND_ERROR "Unknown CPU: ${CPU}")
endif()

View file

@ -4,8 +4,8 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
-#if defined(TARGET_ANDROID) && defined(__i386__) && !defined(modify_ldt) -#if defined(TARGET_ANDROID) && (defined(__i386__) || defined(__x86_64__)) && !defined(modify_ldt)
+#if defined(__linux__) && !defined(__GLIBC__) && !defined(modify_ldt) +#if defined(__linux__) && (defined(__i386__) || defined(__x86_64__)) && !defined(modify_ldt)
#define modify_ldt(a,b,c) syscall( __NR_modify_ldt, a, b, c); #define modify_ldt(a,b,c) syscall( __NR_modify_ldt, a, b, c);
#else #else
int modify_ldt(int func, void *ptr, unsigned long bytecount); int modify_ldt(int func, void *ptr, unsigned long bytecount);

View file

@ -1,19 +1,38 @@
# Template file for 'kodi' # Template file for 'kodi'
pkgname=kodi pkgname=kodi
version=18.9 version=19.0
revision=6 revision=1
_codename="Leia" _codename="Matrix"
wrksrc="xbmc-${version}-${_codename}" wrksrc="xbmc-${version}-${_codename}"
build_style=cmake build_style=cmake
configure_args="-DENABLE_INTERNAL_CROSSGUID=OFF -DWITH_FFMPEG=/usr configure_args="-DWITH_FFMPEG=/usr -DENABLE_LDGOLD=OFF
-DENABLE_LDGOLD=OFF" -DAPP_RENDER_SYSTEM=gl -DENABLE_INTERNAL_CROSSGUID=ON
-DCROSSGUID_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/crossguid-8f399e8bd4.tar.gz
-Dlibdvdcss_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libdvdcss-1.4.2-Leia-Beta-5.tar.gz
-Dlibdvdread_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libdvdread-6.0.0-Leia-Alpha-3.tar.gz
-Dlibdvdnav_URL=${XBPS_SRCDISTDIR}/${pkgname}-${version}/libdvdnav-6.0.0-Leia-Alpha-3.tar.gz"
make_build_target="all"
short_desc="Software media player and entertainment hub for digital media" short_desc="Software media player and entertainment hub for digital media"
maintainer="Orphaned <orphan@voidlinux.org>" maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later" license="GPL-2.0-or-later"
homepage="http://www.kodi.tv" homepage="http://www.kodi.tv"
distfiles="https://github.com/xbmc/xbmc/archive/${version}-${_codename}.tar.gz" distfiles="https://github.com/xbmc/xbmc/archive/${version}-${_codename}.tar.gz"
checksum=bdf8afa9356b1f815de9984801d3e0d2b46a719e747895b75528f20995c59d2b checksum=f7ef8a6f45862ae3b7ebfce4950d74f534be3cb4a0e67ce640963746b3f668f2
python_version=2 # Add CrossGUID dependency
distfiles+=" http://mirrors.kodi.tv/build-deps/sources/crossguid-8f399e8bd4.tar.gz"
checksum+=" 3d77d09a5df0de510aeeb940df4cb534787ddff3bb1828779753f5dfa1229d10"
# Add libdvdcss dependency
distfiles+=" https://github.com/xbmc/libdvdcss/archive/1.4.2-Leia-Beta-5.tar.gz>libdvdcss-1.4.2-Leia-Beta-5.tar.gz"
checksum+=" 38816f8373e243bc5950449b4f3b18938c4e1c59348e3411e23f31db4072e40d"
# Add libdvdread dependency
distfiles+=" https://github.com/xbmc/libdvdread/archive/6.0.0-Leia-Alpha-3.tar.gz>libdvdread-6.0.0-Leia-Alpha-3.tar.gz"
checksum+=" a30b6aa0aad0f2c505bc77948af2d5531a80b6e68112addb4c123fca24d5d3bf"
# Add libdvdnav dependency
distfiles+=" https://github.com/xbmc/libdvdnav/archive/6.0.0-Leia-Alpha-3.tar.gz>libdvdnav-6.0.0-Leia-Alpha-3.tar.gz"
checksum+=" 071e414e61b795f2ff9015b21a85fc009dde967f27780d23092643916538a57a"
skip_extraction="crossguid-8f399e8bd4.tar.gz libdvdcss-1.4.2-Leia-Beta-5.tar.gz
libdvdread-6.0.0-Leia-Alpha-3.tar.gz libdvdnav-6.0.0-Leia-Alpha-3.tar.gz"
python_version=3
patch_args="-Np1" patch_args="-Np1"
LDFLAGS+=" -Wl,-z,stack-size=1048576" LDFLAGS+=" -Wl,-z,stack-size=1048576"
@ -22,8 +41,8 @@ archs="i686* x86_64* aarch64*
ppc64*" ppc64*"
hostmakedepends=" hostmakedepends="
automake libtool pkg-config gperf cmake gettext zip unzip nasm yasm python-devel automake libtool pkg-config gperf cmake gettext zip unzip nasm yasm python3-devel
gettext-devel libltdl-devel curl flatbuffers swig openjdk11 which" gettext-devel libltdl-devel curl flatbuffers swig openjdk11 which wayland-scanner++"
makedepends=" makedepends="
eudev-libudev-devel pcre-devel expat-devel libpng-devel libjpeg-turbo-devel eudev-libudev-devel pcre-devel expat-devel libpng-devel libjpeg-turbo-devel
libXrandr-devel avahi-libs-devel pulseaudio-devel samba-devel tiff-devel libXrandr-devel avahi-libs-devel pulseaudio-devel samba-devel tiff-devel
@ -35,8 +54,9 @@ makedepends="
libbluetooth-devel yajl-devel libplist-devel librtmp-devel tinyxml-devel libbluetooth-devel yajl-devel libplist-devel librtmp-devel tinyxml-devel
taglib-devel libcap-devel lame-devel libbluray-devel libnfs-devel ffmpeg-devel taglib-devel libcap-devel lame-devel libbluray-devel libnfs-devel ffmpeg-devel
giflib-devel libxslt-devel gnutls-devel libssh-devel libmicrohttpd-devel giflib-devel libxslt-devel gnutls-devel libssh-devel libmicrohttpd-devel
libcec-devel dcadec-devel crossguid flatbuffers-devel fmt-devel lcms2-devel libcec-devel dcadec-devel flatbuffers-devel fmt-devel lcms2-devel
libfstrcmp-devel rapidjson libcdio-paranoia" libfstrcmp-devel rapidjson libcdio-paranoia spdlog libwaylandpp-devel
libinput-devel libdav1d-devel gtest-devel"
# The following dependencies are dlopen(3)ed. # The following dependencies are dlopen(3)ed.
depends="libbluray libmad libvorbis libcurl libflac libmodplug libass libmpeg2 depends="libbluray libmad libvorbis libcurl libflac libmodplug libass libmpeg2
@ -46,11 +66,16 @@ depends+=" glxinfo hicolor-icon-theme desktop-file-utils xdpyinfo"
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in
aarch64*) aarch64*)
hostmakedepends+=" libmariadbclient-devel SDL2_image-devel lzo-devel" hostmakedepends+=" libmariadbclient-devel SDL2_image-devel lzo-devel"
makedepends+=" python-devel ffmpeg-devel" hostmakedepends+=" libwaylandpp-devel"
makedepends+=" python3-devel ffmpeg-devel"
configure_args+=" -DENABLE_VAAPI=OFF" configure_args+=" -DENABLE_VAAPI=OFF"
;; ;;
esac esac
if [ -z "$CROSS_BUILD" ]; then
make_build_target+=" kodi-test"
fi
pre_configure() { pre_configure() {
if [ "$CROSS_BUILD" ]; then if [ "$CROSS_BUILD" ]; then
find -type f | \ find -type f | \