diff --git a/kodi-20.2-binutils-2.41.patch b/kodi-20.2-binutils-2.41.patch new file mode 100644 index 0000000..3852ac2 --- /dev/null +++ b/kodi-20.2-binutils-2.41.patch @@ -0,0 +1,112 @@ +From 6a83b674531d980a459057a8fd7c8b5050ba2f7c Mon Sep 17 00:00:00 2001 +From: graysky +Date: Wed, 2 Aug 2023 14:43:24 -0400 +Subject: [PATCH] ffmpeg: fix build with binutils update + +--- + cmake/modules/FindFFMPEG.cmake | 5 +- + ...1-Fixes-assembling-w-binutil-as-2.41.patch | 76 +++++++++++++++++++ + 2 files changed, 80 insertions(+), 1 deletion(-) + create mode 100644 tools/depends/target/ffmpeg/0001-Fixes-assembling-w-binutil-as-2.41.patch + +diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake +index e53a121..eca8e27 100644 +--- a/cmake/modules/FindFFMPEG.cmake ++++ b/cmake/modules/FindFFMPEG.cmake +@@ -85,7 +85,10 @@ macro(buildFFMPEG) + -DPKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig) + set(PATCH_COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/CMakeLists.txt +- ) ++ && ++ patch -p1 < ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/0001-Fixes-assembling-w-binutil-as-2.41.patch && ++ echo "########################################## patched ffmpeg ##############################" ++ ) + + if(CMAKE_GENERATOR STREQUAL Xcode) + set(FFMPEG_GENERATOR CMAKE_GENERATOR "Unix Makefiles") +diff --git a/tools/depends/target/ffmpeg/0001-Fixes-assembling-w-binutil-as-2.41.patch b/tools/depends/target/ffmpeg/0001-Fixes-assembling-w-binutil-as-2.41.patch +new file mode 100644 +index 0000000..33fd3d4 +--- /dev/null ++++ b/tools/depends/target/ffmpeg/0001-Fixes-assembling-w-binutil-as-2.41.patch +@@ -0,0 +1,76 @@ ++From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001 ++From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= ++Date: Sun, 16 Jul 2023 18:18:02 +0300 ++Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift ++ instructions within inline assembly ++ ++Fixes assembling with binutil as >= 2.41 ++ ++Signed-off-by: James Almer ++--- ++ libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++--- ++ 1 file changed, 23 insertions(+), 3 deletions(-) ++ ++diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h ++index 6298f5ed19..ca7e2dffc1 100644 ++--- a/libavcodec/x86/mathops.h +++++ b/libavcodec/x86/mathops.h ++@@ -35,12 +35,20 @@ ++ static av_always_inline av_const int MULL(int a, int b, unsigned shift) ++ { ++ int rt, dummy; +++ if (__builtin_constant_p(shift)) ++ __asm__ ( ++ "imull %3 \n\t" ++ "shrdl %4, %%edx, %%eax \n\t" ++ :"=a"(rt), "=d"(dummy) ++- :"a"(a), "rm"(b), "ci"((uint8_t)shift) +++ :"a"(a), "rm"(b), "i"(shift & 0x1F) ++ ); +++ else +++ __asm__ ( +++ "imull %3 \n\t" +++ "shrdl %4, %%edx, %%eax \n\t" +++ :"=a"(rt), "=d"(dummy) +++ :"a"(a), "rm"(b), "c"((uint8_t)shift) +++ ); ++ return rt; ++ } ++ ++@@ -113,19 +121,31 @@ __asm__ volatile(\ ++ // avoid +32 for shift optimization (gcc should do that ...) ++ #define NEG_SSR32 NEG_SSR32 ++ static inline int32_t NEG_SSR32( int32_t a, int8_t s){ +++ if (__builtin_constant_p(s)) ++ __asm__ ("sarl %1, %0\n\t" ++ : "+r" (a) ++- : "ic" ((uint8_t)(-s)) +++ : "i" (-s & 0x1F) ++ ); +++ else +++ __asm__ ("sarl %1, %0\n\t" +++ : "+r" (a) +++ : "c" ((uint8_t)(-s)) +++ ); ++ return a; ++ } ++ ++ #define NEG_USR32 NEG_USR32 ++ static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ +++ if (__builtin_constant_p(s)) ++ __asm__ ("shrl %1, %0\n\t" ++ : "+r" (a) ++- : "ic" ((uint8_t)(-s)) +++ : "i" (-s & 0x1F) ++ ); +++ else +++ __asm__ ("shrl %1, %0\n\t" +++ : "+r" (a) +++ : "c" ((uint8_t)(-s)) +++ ); ++ return a; ++ } ++ ++-- ++2.30.2 ++ +-- +2.41.0 + diff --git a/kodi-20.2-fmt-10.1.0.patch b/kodi-20.2-fmt-10.1.0.patch new file mode 100644 index 0000000..ff00c1d --- /dev/null +++ b/kodi-20.2-fmt-10.1.0.patch @@ -0,0 +1,108 @@ +From 3a20f5b67ff32cc3663e0ccd72941e666e8756a4 Mon Sep 17 00:00:00 2001 +From: Lukas Rusak +Date: Tue, 27 Jun 2023 11:21:50 -0700 +Subject: [PATCH 1/4] CGUIWindowHome: use AnnouncementFlagToString when logging + +Signed-off-by: Lukas Rusak +--- + xbmc/windows/GUIWindowHome.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/xbmc/windows/GUIWindowHome.cpp b/xbmc/windows/GUIWindowHome.cpp +index c42e073c48ced..abc6cfc94d5a0 100644 +--- a/xbmc/windows/GUIWindowHome.cpp ++++ b/xbmc/windows/GUIWindowHome.cpp +@@ -78,7 +78,8 @@ void CGUIWindowHome::Announce(ANNOUNCEMENT::AnnouncementFlag flag, + { + int ra_flag = 0; + +- CLog::Log(LOGDEBUG, LOGANNOUNCE, "GOT ANNOUNCEMENT, type: {}, from {}, message {}", flag, sender, message); ++ CLog::Log(LOGDEBUG, LOGANNOUNCE, "GOT ANNOUNCEMENT, type: {}, from {}, message {}", ++ AnnouncementFlagToString(flag), sender, message); + + // we are only interested in library changes + if ((flag & (ANNOUNCEMENT::VideoLibrary | ANNOUNCEMENT::AudioLibrary)) == 0) + +From c82006b575b78efbb3f5aff40a159b90f245ea9d Mon Sep 17 00:00:00 2001 +From: Lukas Rusak +Date: Tue, 27 Jun 2023 11:22:32 -0700 +Subject: [PATCH 2/4] CGUIColorButtonControl: use explicit cast to + UTILS::COLOR::Color when formatting + +Signed-off-by: Lukas Rusak +--- + xbmc/guilib/GUIColorButtonControl.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/xbmc/guilib/GUIColorButtonControl.cpp b/xbmc/guilib/GUIColorButtonControl.cpp +index 940834cb68852..67597d7ab504b 100644 +--- a/xbmc/guilib/GUIColorButtonControl.cpp ++++ b/xbmc/guilib/GUIColorButtonControl.cpp +@@ -188,7 +188,8 @@ void CGUIColorButtonControl::RenderInfoText() + void CGUIColorButtonControl::ProcessInfoText(unsigned int currentTime) + { + CRect labelRenderRect = m_labelInfo.GetRenderRect(); +- bool changed = m_labelInfo.SetText(StringUtils::Format("#{:08X}", m_imgBoxColor)); ++ bool changed = m_labelInfo.SetText( ++ StringUtils::Format("#{:08X}", static_cast(m_imgBoxColor))); + // Set Label X position based on image mask control position + float textWidth = m_labelInfo.GetTextWidth() + 2 * m_labelInfo.GetLabelInfo().offsetX; + float textPosX = m_imgColorMask->GetXPosition() - textWidth; + +From e4b1aa8450fabfb41379953c8ccec0a512421531 Mon Sep 17 00:00:00 2001 +From: Lukas Rusak +Date: Tue, 27 Jun 2023 11:24:02 -0700 +Subject: [PATCH 3/4] CLog: allow using fmt::enums::format_as for explicit enum + conversion when using libfmt>=10 + +Signed-off-by: Lukas Rusak +--- + xbmc/utils/log.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/xbmc/utils/log.h b/xbmc/utils/log.h +index 9fc4aae36813e..adf46905a86c6 100644 +--- a/xbmc/utils/log.h ++++ b/xbmc/utils/log.h +@@ -46,6 +46,10 @@ class dist_sink; + } // namespace sinks + } // namespace spdlog + ++#if FMT_VERSION >= 100000 ++using fmt::enums::format_as; ++#endif ++ + class CLog : public ISettingsHandler, public ISettingCallback + { + public: + +From 26c164a28cfd18ceef7a1f2bbba5bf8a4a5a750c Mon Sep 17 00:00:00 2001 +From: Lukas Rusak +Date: Tue, 27 Jun 2023 11:24:34 -0700 +Subject: [PATCH 4/4] CLog: add formatter for std::atomic for explicit atomic + conversion when using libfmt>=10 + +Signed-off-by: Lukas Rusak +--- + xbmc/utils/log.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/xbmc/utils/log.h b/xbmc/utils/log.h +index adf46905a86c6..1c42c888cb655 100644 +--- a/xbmc/utils/log.h ++++ b/xbmc/utils/log.h +@@ -48,6 +48,14 @@ class dist_sink; + + #if FMT_VERSION >= 100000 + using fmt::enums::format_as; ++ ++namespace fmt ++{ ++template ++struct formatter, Char> : formatter ++{ ++}; ++} // namespace fmt + #endif + + class CLog : public ISettingsHandler, public ISettingCallback diff --git a/kodi.spec b/kodi.spec index 66de21c..6be41fb 100644 --- a/kodi.spec +++ b/kodi.spec @@ -16,7 +16,7 @@ #%define ffmpeg_ver 4.3.2%{codenameadd}-19.1 Name: kodi -Version: 20.1 +Version: 20.2 Release: 1mamba Summary: A media player and entertainment hub for digital media Group: Graphical Desktop/Applications/Multimedia @@ -37,8 +37,9 @@ Patch5: xbmc-12.0-arm-no-fp.patch Patch6: xbmc-13.1-libnfs-1.9.4.patch Patch7: kodi-15.2-ffmpeg-x86-asm-impossible-contraints-fix.patch Patch8: kodi-16.1-gcc-6.1.0.patch +Patch9: kodi-20.2-binutils-2.41.patch +Patch10: kodi-20.2-fmt-10.1.0.patch License: GPL - ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libX11-devel @@ -121,6 +122,7 @@ BuildRequires: swig BuildRequires: unzip BuildRequires: libdvdcss-devel BuildRequires: libflac-devel +BuildRequires: libfmt-devel >= 10.1.0 BuildRequires: libGLESv2-devel BuildRequires: liblame-devel BuildRequires: libmad-devel @@ -182,8 +184,8 @@ XBMC is an award-winning free and open source (GPL) software media player and en #:<< ___EOF %if "%{?_with_raspberrypi}" -%patch3 -p1 -%patch4 -p1 +%patch 3 -p1 +%patch 4 -p1 %endif #ln -s %{SOURCE1} tools/depends/target/ffmpeg/ @@ -195,6 +197,9 @@ XBMC is an award-winning free and open source (GPL) software media player and en #%patch7 -p1 #%endif +%patch 9 -p1 +%patch 10 -p1 -b .fmt-10.1.0 + %build #:<< ___EOF %cmake -d build \ @@ -280,6 +285,9 @@ fi %doc README.md %changelog +* Sat Aug 26 2023 Automatic Build System 20.2-1mamba +- automatic version update by autodist + * Sun Mar 12 2023 Automatic Build System 20.1-1mamba - automatic version update by autodist