kodi: fold kodi-rpi into it, rebuild for libfmt.so.8

We don't want to maintain kodi 18.x into eternity (which would start
with patching it correctly for libfmt.so.8), and, as explained in
9f8647640b, current kodi can't be built
for rpi specifically anymore. We will assume normal kodi is enough.
This commit is contained in:
skmpz 2021-07-24 22:51:11 +04:00 committed by Érico Nogueira Rolim
parent 66dcd8fb0c
commit afdf4a9b75
17 changed files with 15 additions and 364 deletions

1
srcpkgs/kodi-rpi Symbolic link
View file

@ -0,0 +1 @@
kodi

View file

@ -1,6 +0,0 @@
case "${ACTION}" in
post)
mkdir -p var/lib/xbmc
chown xbmc:xbmc var/lib/xbmc
;;
esac

View file

@ -1,5 +0,0 @@
case "${ACTION}" in
purge)
rm -rf var/lib/xbmc
;;
esac

View file

@ -1,3 +0,0 @@
#!/bin/sh
PATH=$PATH:/opt/vc/bin
exec chpst -P sudo LD_LIBRARY_PATH=/opt/vc/lib -u xbmc -- /usr/lib/kodi/kodi-rbpi --standalone

View file

@ -1,20 +0,0 @@
--- a/xbmc/windowing/GraphicContext.cpp 2019-11-16 12:12:49.000000000 +0100
+++ b/xbmc/windowing/GraphicContext.cpp 2020-01-16 21:15:35.293001948 +0100
@@ -6,6 +6,7 @@
* See LICENSES/README.md for more information.
*/
+#include <cassert>
#include "GraphicContext.h"
#include "WinSystem.h"
#include "Application.h"
--- a/xbmc/profiles/dialogs/GUIDialogProfileSettings.cpp 2019-11-16 12:12:49.000000000 +0100
+++ b/xbmc/profiles/dialogs/GUIDialogProfileSettings.cpp 2020-01-16 21:47:47.500101629 +0100
@@ -8,6 +8,7 @@
#include "GUIDialogProfileSettings.h"
+#include <cassert>
#include <utility>
#include "dialogs/GUIDialogFileBrowser.h"

View file

@ -1,10 +0,0 @@
--- 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

@ -1,37 +0,0 @@
--- a/cmake/modules/FindCrossGUID.cmake 2019-01-30 18:31:51.519546398 +0100
+++ b/cmake/modules/FindCrossGUID.cmake 2019-01-30 18:32:51.197608565 +0100
@@ -49,10 +49,10 @@
set(CROSSGUID_LIBRARIES ${CROSSGUID_LIBRARY})
set(CROSSGUID_INCLUDE_DIRS ${CROSSGUID_INCLUDE_DIR})
else()
- find_path(CROSSGUID_INCLUDE_DIR NAMES guid.h)
+ find_path(CROSSGUID_INCLUDE_DIR NAMES Guid.hpp)
- find_library(CROSSGUID_LIBRARY_RELEASE NAMES crossguid)
- find_library(CROSSGUID_LIBRARY_DEBUG NAMES crossguidd)
+ find_library(CROSSGUID_LIBRARY_RELEASE NAMES xg)
+ find_library(CROSSGUID_LIBRARY_DEBUG NAMES xg)
include(SelectLibraryConfigurations)
select_library_configurations(CROSSGUID)
--- a/xbmc/utils/StringUtils.cpp 2019-01-30 18:35:42.588517593 +0100
+++ b/xbmc/utils/StringUtils.cpp 2019-01-30 18:37:38.058555463 +0100
@@ -16,7 +16,7 @@
//
//------------------------------------------------------------------------
-#include <guid.h>
+#include <Guid.hpp>
#if defined(TARGET_ANDROID)
#include <androidjni/JNIThreading.h>
@@ -1126,8 +1126,7 @@
std::string StringUtils::CreateUUID()
{
- static GuidGenerator guidGenerator;
- auto guid = guidGenerator.newGuid();
+ auto guid = xg::newGuid();
std::stringstream strGuid; strGuid << guid;
return strGuid.str();

View file

@ -1,11 +0,0 @@
--- 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

@ -1,74 +0,0 @@
--- 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

@ -1,11 +0,0 @@
--- 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

@ -1,11 +0,0 @@
--- 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

@ -1,15 +0,0 @@
--- 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

@ -1,40 +0,0 @@
--- a/xbmc/platform/posix/utils/PosixInterfaceForCLog.cpp 2019-01-30 19:51:15.744119125 +0100
+++ b/xbmc/platform/posix/utils/PosixInterfaceForCLog.cpp 2019-01-30 19:54:51.940377340 +0100
@@ -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 @@
(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
--- a/xbmc/platform/posix/utils/PosixInterfaceForCLog.h 2019-01-30 19:55:21.460002043 +0100
+++ b/xbmc/platform/posix/utils/PosixInterfaceForCLog.h 2019-01-30 19:55:36.156814572 +0100
@@ -10,8 +10,6 @@
#include <string>
-struct FILEWRAP; // forward declaration, wrapper for FILE
-
class CPosixInterfaceForCLog
{
public:
@@ -23,5 +21,5 @@
void PrintDebugString(const std::string& debugString);
static void GetCurrentLocalTime(int& hour, int& minute, int& second, double& millisecond);
private:
- FILEWRAP* m_file;
+ FILE* m_file;
};

View file

@ -1,119 +0,0 @@
# Template file for 'kodi-rpi'
pkgname=kodi-rpi
version=18.8
revision=6
_codename="Leia"
wrksrc="xbmc-${version}-${_codename}"
build_style=cmake
short_desc="Software media player and entertainment hub for digital media (RPi)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="http://www.kodi.tv/"
distfiles="https://github.com/xbmc/xbmc/archive/${version}-${_codename}.tar.gz"
checksum=6deb28f725880b1ab6c5920b55ef1190a79b0684ffb30b6e13b199d23a0af296
LDFLAGS+=" -Wl,-z,stack-size=1048576"
python_version=2
nopie=yes
archs="armv6l* armv7l*"
hostmakedepends="
automake libtool pkg-config gperf cmake zip unzip nasm yasm
gettext-devel libltdl-devel python-devel libmariadbclient-devel
SDL2_image-devel lzo-devel flatbuffers swig openjdk11"
makedepends="
libatomic-devel eudev-libudev-devel pcre-devel expat-devel libpng-devel
libjpeg-turbo-devel avahi-libs-devel alsa-lib-devel samba-devel tiff-devel
libmariadbclient-devel libmpeg2-devel wavpack-devel zlib-devel lzo-devel
fribidi-devel sqlite-devel freetype-devel jasper-devel faac-devel
faad2-devel libmodplug-devel openssl-devel libass-devel libmad-devel
fontconfig-devel libsamplerate-devel libmms-devel libcurl-devel ffmpeg-devel
enca-devel boost-devel libbluetooth-devel yajl-devel libplist-devel
librtmp-devel tinyxml-devel taglib-devel libcap-devel lame-devel libnfs-devel
libxslt-devel libuuid-devel giflib-devel libcec-devel libmicrohttpd-devel
libcdio-devel python-devel libssh-devel rpi-userland-devel dcadec-devel
flatbuffers-devel fmt-devel lcms2-devel libfstrcmp-devel rapidjson crossguid
libinput-devel libxkbcommon-devel libcdio-paranoia"
# gold broken with musl
case "$XBPS_MACHINE" in
*-musl) configure_args+=" -DENABLE_LDGOLD=Off";;
esac
configure_args="
-DCORE_PLATFORM_NAME=rbpi
-DENABLE_OPENGL=OFF
-DENABLE_OPENGLES=ON
-DENABLE_X11=OFF
-DENABLE_INTERNAL_CROSSGUID=OFF
-DENABLE_VAAPI=OFF
-DENABLE_VDPAU=OFF
-DWITH_FFMPEG=/usr
-DCMAKE_PREFIX_PATH=${XBPS_CROSS_BASE}/opt/vc
-DCMAKE_INSTALL_RPATH=/opt/vc/lib
"
case "$XBPS_TARGET_MACHINE" in
armv6*) configure_args+=" -DWITH_CPU=arm1176jzf-s -DCMAKE_EXE_LINKER_FLAGS=-latomic"
LDFLAGS+=" -latomic";;
armv7*) configure_args+=" -DWITH_CPU=cortex-a7";;
aarch64*) configure_args+=" -DWITH_CPU=cortex-a53";;
esac
# The following dependencies are dlopen(3)ed.
depends="libmad libogg libcurl libflac libmodplug libass libmpeg2 lame
librtmp libnfs>=1.9.7 libplist>=1.12 libssh"
depends+=" hicolor-icon-theme desktop-file-utils"
provides="kodi-${version}_${revision}"
# Create xbmc system user to launch xbmc-standalone.
system_accounts="xbmc"
xbmc_homedir="/var/lib/xbmc"
xbmc_groups="audio,input,video"
pre_configure() {
find -type f | \
grep "configure\.ac\|Makefile\|cmake\|config\.site" | \
xargs sed -i -e "s;-isystem;-I;g"
. /etc/profile.d/10_openjdk11.sh
if [ "$CROSS_BUILD" ]; then
for i in JsonSchemaBuilder TexturePacker; do
cat > cmake/modules/Find$i.cmake <<EOF
add_executable($i::$i IMPORTED GLOBAL)
set_target_properties($i::$i PROPERTIES
IMPORTED_LOCATION "\${CORE_SOURCE_DIR}/tools/depends/native/$i/bin/$i")
set_target_properties($i::$i PROPERTIES FOLDER Tools)
EOF
done
fi
}
pre_build() {
if [ "$CROSS_BUILD" ]; then
for i in JsonSchemaBuilder TexturePacker; do
CC= LD= CXX= LDFLAGS= CFLAGS= CXXFLAGS= \
make -C tools/depends/native/$i
done
fi
}
post_build() {
# Rebuild for target
if [ "$CROSS_BUILD" ]; then
for i in JsonSchemaBuilder TexturePacker; do
make -C tools/depends/native/$i clean all \
CC="$CC" CXX="$CXX" LD="$LD" AR="$AR" RANLIB="$RANLIB" \
CPP="$CPP" AS="$AS" OBJDUMP="$OBJDUMP" \
CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
done
fi
}
post_install() {
# remove unused stuff
rm -rf ${DESTDIR}/usr/include
find ${DESTDIR}/usr/lib -name "*.cmake" -delete
vsv xbmc-standalone
}

View file

@ -1 +0,0 @@
pattern="\d+\.[\d.]+(?=-\w+\.tar\.gz)"

View file

@ -0,0 +1,7 @@
--- a/xbmc/utils/StringUtils.h 2021-02-19 02:17:59.000000000 +0400
+++ b/xbmc/utils/StringUtils.h 2021-07-29 01:23:03.569130175 +0400
@@ -39,0 +40,4 @@
+#if FMT_VERSION >= 80000
+#include <fmt/xchar.h>
+#endif
+

View file

@ -1,7 +1,7 @@
# Template file for 'kodi' # Template file for 'kodi'
pkgname=kodi pkgname=kodi
version=19.0 version=19.0
revision=2 revision=3
_codename="Matrix" _codename="Matrix"
wrksrc="xbmc-${version}-${_codename}" wrksrc="xbmc-${version}-${_codename}"
build_style=cmake build_style=cmake
@ -156,3 +156,9 @@ kodi-devel_package() {
vmove usr/share/kodi/cmake vmove usr/share/kodi/cmake
} }
} }
kodi-rpi_package() {
build_style=meta
short_desc+=" (transitional dummy package)"
depends="${sourcepkg}>=${version}_${revision}"
}