From afdf4a9b750688dd9101102d91c7836b593d2d78 Mon Sep 17 00:00:00 2001 From: skmpz Date: Sat, 24 Jul 2021 22:51:11 +0400 Subject: [PATCH] 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 9f8647640b3ce3e4a99f0ba7022eb6d55ba77c97, current kodi can't be built for rpi specifically anymore. We will assume normal kodi is enough. --- srcpkgs/kodi-rpi | 1 + srcpkgs/kodi-rpi/INSTALL | 6 - srcpkgs/kodi-rpi/REMOVE | 5 - srcpkgs/kodi-rpi/files/xbmc-standalone/run | 3 - .../patches/add-missing-cassert.patch | 20 --- .../patches/add-missing-includes.patch | 10 -- srcpkgs/kodi-rpi/patches/crossguid-0.2.patch | 37 ------ .../disable-static-texturepacker-build.patch | 11 -- srcpkgs/kodi-rpi/patches/fix-fileemu.patch | 74 ----------- srcpkgs/kodi-rpi/patches/fix-musl.patch | 11 -- .../kodi-rpi/patches/fortify-source-fix.patch | 11 -- srcpkgs/kodi-rpi/patches/ppc64.patch | 15 --- .../kodi-rpi/patches/remove-filewrap.patch | 40 ------ srcpkgs/kodi-rpi/template | 119 ------------------ srcpkgs/kodi-rpi/update | 1 - srcpkgs/kodi/patches/fmt8-support.patch | 7 ++ srcpkgs/kodi/template | 8 +- 17 files changed, 15 insertions(+), 364 deletions(-) create mode 120000 srcpkgs/kodi-rpi delete mode 100644 srcpkgs/kodi-rpi/INSTALL delete mode 100644 srcpkgs/kodi-rpi/REMOVE delete mode 100755 srcpkgs/kodi-rpi/files/xbmc-standalone/run delete mode 100644 srcpkgs/kodi-rpi/patches/add-missing-cassert.patch delete mode 100644 srcpkgs/kodi-rpi/patches/add-missing-includes.patch delete mode 100644 srcpkgs/kodi-rpi/patches/crossguid-0.2.patch delete mode 100644 srcpkgs/kodi-rpi/patches/disable-static-texturepacker-build.patch delete mode 100644 srcpkgs/kodi-rpi/patches/fix-fileemu.patch delete mode 100644 srcpkgs/kodi-rpi/patches/fix-musl.patch delete mode 100644 srcpkgs/kodi-rpi/patches/fortify-source-fix.patch delete mode 100644 srcpkgs/kodi-rpi/patches/ppc64.patch delete mode 100644 srcpkgs/kodi-rpi/patches/remove-filewrap.patch delete mode 100644 srcpkgs/kodi-rpi/template delete mode 100644 srcpkgs/kodi-rpi/update create mode 100644 srcpkgs/kodi/patches/fmt8-support.patch diff --git a/srcpkgs/kodi-rpi b/srcpkgs/kodi-rpi new file mode 120000 index 0000000000..355d1b91e5 --- /dev/null +++ b/srcpkgs/kodi-rpi @@ -0,0 +1 @@ +kodi \ No newline at end of file diff --git a/srcpkgs/kodi-rpi/INSTALL b/srcpkgs/kodi-rpi/INSTALL deleted file mode 100644 index 9f9deaf270..0000000000 --- a/srcpkgs/kodi-rpi/INSTALL +++ /dev/null @@ -1,6 +0,0 @@ -case "${ACTION}" in -post) - mkdir -p var/lib/xbmc - chown xbmc:xbmc var/lib/xbmc - ;; -esac diff --git a/srcpkgs/kodi-rpi/REMOVE b/srcpkgs/kodi-rpi/REMOVE deleted file mode 100644 index 83d2c7e376..0000000000 --- a/srcpkgs/kodi-rpi/REMOVE +++ /dev/null @@ -1,5 +0,0 @@ -case "${ACTION}" in -purge) - rm -rf var/lib/xbmc - ;; -esac diff --git a/srcpkgs/kodi-rpi/files/xbmc-standalone/run b/srcpkgs/kodi-rpi/files/xbmc-standalone/run deleted file mode 100755 index e4fc93b47e..0000000000 --- a/srcpkgs/kodi-rpi/files/xbmc-standalone/run +++ /dev/null @@ -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 diff --git a/srcpkgs/kodi-rpi/patches/add-missing-cassert.patch b/srcpkgs/kodi-rpi/patches/add-missing-cassert.patch deleted file mode 100644 index 1e9d860408..0000000000 --- a/srcpkgs/kodi-rpi/patches/add-missing-cassert.patch +++ /dev/null @@ -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 - #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 - #include - - #include "dialogs/GUIDialogFileBrowser.h" diff --git a/srcpkgs/kodi-rpi/patches/add-missing-includes.patch b/srcpkgs/kodi-rpi/patches/add-missing-includes.patch deleted file mode 100644 index 236bfa6fd0..0000000000 --- a/srcpkgs/kodi-rpi/patches/add-missing-includes.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/xbmc/filesystem/ZipManager.h.orig -+++ b/xbmc/filesystem/ZipManager.h -@@ -33,6 +33,7 @@ - #include - #include - #include -+#include - - class CURL; - diff --git a/srcpkgs/kodi-rpi/patches/crossguid-0.2.patch b/srcpkgs/kodi-rpi/patches/crossguid-0.2.patch deleted file mode 100644 index 1c18a84c72..0000000000 --- a/srcpkgs/kodi-rpi/patches/crossguid-0.2.patch +++ /dev/null @@ -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 -+#include - - #if defined(TARGET_ANDROID) - #include -@@ -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(); diff --git a/srcpkgs/kodi-rpi/patches/disable-static-texturepacker-build.patch b/srcpkgs/kodi-rpi/patches/disable-static-texturepacker-build.patch deleted file mode 100644 index 369f1b24d7..0000000000 --- a/srcpkgs/kodi-rpi/patches/disable-static-texturepacker-build.patch +++ /dev/null @@ -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) diff --git a/srcpkgs/kodi-rpi/patches/fix-fileemu.patch b/srcpkgs/kodi-rpi/patches/fix-fileemu.patch deleted file mode 100644 index 6cce7a4d35..0000000000 --- a/srcpkgs/kodi-rpi/patches/fix-fileemu.patch +++ /dev/null @@ -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 - --#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 - #include - #include -+#include - #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); diff --git a/srcpkgs/kodi-rpi/patches/fix-musl.patch b/srcpkgs/kodi-rpi/patches/fix-musl.patch deleted file mode 100644 index 98fa08aaff..0000000000 --- a/srcpkgs/kodi-rpi/patches/fix-musl.patch +++ /dev/null @@ -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); diff --git a/srcpkgs/kodi-rpi/patches/fortify-source-fix.patch b/srcpkgs/kodi-rpi/patches/fortify-source-fix.patch deleted file mode 100644 index 5717746e09..0000000000 --- a/srcpkgs/kodi-rpi/patches/fortify-source-fix.patch +++ /dev/null @@ -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) - { diff --git a/srcpkgs/kodi-rpi/patches/ppc64.patch b/srcpkgs/kodi-rpi/patches/ppc64.patch deleted file mode 100644 index ab008d445a..0000000000 --- a/srcpkgs/kodi-rpi/patches/ppc64.patch +++ /dev/null @@ -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() diff --git a/srcpkgs/kodi-rpi/patches/remove-filewrap.patch b/srcpkgs/kodi-rpi/patches/remove-filewrap.patch deleted file mode 100644 index 76f6602063..0000000000 --- a/srcpkgs/kodi-rpi/patches/remove-filewrap.patch +++ /dev/null @@ -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 - --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; - }; diff --git a/srcpkgs/kodi-rpi/template b/srcpkgs/kodi-rpi/template deleted file mode 100644 index d92a4f6217..0000000000 --- a/srcpkgs/kodi-rpi/template +++ /dev/null @@ -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 " -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 <= 80000 ++#include ++#endif ++ diff --git a/srcpkgs/kodi/template b/srcpkgs/kodi/template index 8f10f4f048..16f5089a29 100644 --- a/srcpkgs/kodi/template +++ b/srcpkgs/kodi/template @@ -1,7 +1,7 @@ # Template file for 'kodi' pkgname=kodi version=19.0 -revision=2 +revision=3 _codename="Matrix" wrksrc="xbmc-${version}-${_codename}" build_style=cmake @@ -156,3 +156,9 @@ kodi-devel_package() { vmove usr/share/kodi/cmake } } + +kodi-rpi_package() { + build_style=meta + short_desc+=" (transitional dummy package)" + depends="${sourcepkg}>=${version}_${revision}" +}