alarm/kodi-rpi to 21.0-1

This commit is contained in:
graysky 2024-04-06 03:18:17 -04:00
parent afb0e9a7e3
commit 4be12f3a9a
4 changed files with 472 additions and 111 deletions

View file

@ -0,0 +1,456 @@
diff --git a/xbmc/utils/EGLFence.cpp b/xbmc/utils/EGLFence.cpp
index 9d0065bdaf..535e3bce31 100644
--- a/xbmc/utils/EGLFence.cpp
+++ b/xbmc/utils/EGLFence.cpp
@@ -22,14 +22,6 @@ CEGLFence::CEGLFence(EGLDisplay display)
m_eglGetSyncAttribKHR(
CEGLUtils::GetRequiredProcAddress<PFNEGLGETSYNCATTRIBKHRPROC>("eglGetSyncAttribKHR"))
{
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
- m_eglDupNativeFenceFDANDROID =
- CEGLUtils::GetRequiredProcAddress<PFNEGLDUPNATIVEFENCEFDANDROIDPROC>(
- "eglDupNativeFenceFDANDROID");
- m_eglClientWaitSyncKHR =
- CEGLUtils::GetRequiredProcAddress<PFNEGLCLIENTWAITSYNCKHRPROC>("eglClientWaitSyncKHR");
- m_eglWaitSyncKHR = CEGLUtils::GetRequiredProcAddress<PFNEGLWAITSYNCKHRPROC>("eglWaitSyncKHR");
-#endif
}
void CEGLFence::CreateFence()
@@ -79,65 +71,3 @@ bool CEGLFence::IsSignaled()
return false;
}
-
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
-EGLSyncKHR CEGLFence::CreateFence(int fd)
-{
- CEGLAttributes<1> attributeList;
- attributeList.Add({{EGL_SYNC_NATIVE_FENCE_FD_ANDROID, fd}});
-
- EGLSyncKHR fence =
- m_eglCreateSyncKHR(m_display, EGL_SYNC_NATIVE_FENCE_ANDROID, attributeList.Get());
-
- if (fence == EGL_NO_SYNC_KHR)
- {
- CEGLUtils::Log(LOGERROR, "failed to create EGL sync object");
- return nullptr;
- }
-
- return fence;
-}
-
-void CEGLFence::CreateGPUFence()
-{
- m_gpuFence = CreateFence(EGL_NO_NATIVE_FENCE_FD_ANDROID);
-}
-
-void CEGLFence::CreateKMSFence(int fd)
-{
- m_kmsFence = CreateFence(fd);
-}
-
-EGLint CEGLFence::FlushFence()
-{
- EGLint fd = m_eglDupNativeFenceFDANDROID(m_display, m_gpuFence);
- if (fd == EGL_NO_NATIVE_FENCE_FD_ANDROID)
- CEGLUtils::Log(LOGERROR, "failed to duplicate EGL fence fd");
-
- m_eglDestroySyncKHR(m_display, m_gpuFence);
-
- return fd;
-}
-
-void CEGLFence::WaitSyncGPU()
-{
- if (!m_kmsFence)
- return;
-
- if (m_eglWaitSyncKHR(m_display, m_kmsFence, 0) != EGL_TRUE)
- CEGLUtils::Log(LOGERROR, "failed to create EGL sync point");
-}
-
-void CEGLFence::WaitSyncCPU()
-{
- if (!m_kmsFence)
- return;
-
- EGLint status{EGL_FALSE};
-
- while (status != EGL_CONDITION_SATISFIED_KHR)
- status = m_eglClientWaitSyncKHR(m_display, m_kmsFence, 0, EGL_FOREVER_KHR);
-
- m_eglDestroySyncKHR(m_display, m_kmsFence);
-}
-#endif
diff --git a/xbmc/utils/EGLFence.h b/xbmc/utils/EGLFence.h
index 03c246b60b..bd96444e47 100644
--- a/xbmc/utils/EGLFence.h
+++ b/xbmc/utils/EGLFence.h
@@ -30,14 +30,6 @@ public:
void DestroyFence();
bool IsSignaled();
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
- void CreateKMSFence(int fd);
- void CreateGPUFence();
- EGLint FlushFence();
- void WaitSyncGPU();
- void WaitSyncCPU();
-#endif
-
private:
EGLDisplay m_display{nullptr};
EGLSyncKHR m_fence{nullptr};
@@ -45,17 +37,6 @@ private:
PFNEGLCREATESYNCKHRPROC m_eglCreateSyncKHR{nullptr};
PFNEGLDESTROYSYNCKHRPROC m_eglDestroySyncKHR{nullptr};
PFNEGLGETSYNCATTRIBKHRPROC m_eglGetSyncAttribKHR{nullptr};
-
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
- EGLSyncKHR CreateFence(int fd);
-
- EGLSyncKHR m_gpuFence{EGL_NO_SYNC_KHR};
- EGLSyncKHR m_kmsFence{EGL_NO_SYNC_KHR};
-
- PFNEGLDUPNATIVEFENCEFDANDROIDPROC m_eglDupNativeFenceFDANDROID{nullptr};
- PFNEGLCLIENTWAITSYNCKHRPROC m_eglClientWaitSyncKHR{nullptr};
- PFNEGLWAITSYNCKHRPROC m_eglWaitSyncKHR{nullptr};
-#endif
};
}
diff --git a/xbmc/windowing/gbm/WinSystemGbm.cpp b/xbmc/windowing/gbm/WinSystemGbm.cpp
index f334156d89..34c8c16fe4 100644
--- a/xbmc/windowing/gbm/WinSystemGbm.cpp
+++ b/xbmc/windowing/gbm/WinSystemGbm.cpp
@@ -278,7 +278,7 @@ void CWinSystemGbm::UpdateDisplayHardwareScaling(const RESOLUTION_INFO& resInfo)
SetFullScreen(true, resMutable, false);
}
-void CWinSystemGbm::FlipPage(bool rendered, bool videoLayer, bool async)
+void CWinSystemGbm::FlipPage(bool rendered, bool videoLayer)
{
if (m_videoLayerBridge && !videoLayer)
{
@@ -293,7 +293,7 @@ void CWinSystemGbm::FlipPage(bool rendered, bool videoLayer, bool async)
bo = m_GBM->GetDevice()->GetSurface()->LockFrontBuffer()->Get();
}
- m_DRM->FlipPage(bo, rendered, videoLayer, async);
+ m_DRM->FlipPage(bo, rendered, videoLayer);
if (m_videoLayerBridge && !videoLayer)
{
@@ -310,14 +310,14 @@ bool CWinSystemGbm::UseLimitedColor()
bool CWinSystemGbm::Hide()
{
bool ret = m_DRM->SetActive(false);
- FlipPage(false, false, false);
+ FlipPage(false, false);
return ret;
}
bool CWinSystemGbm::Show(bool raise)
{
bool ret = m_DRM->SetActive(true);
- FlipPage(false, false, false);
+ FlipPage(false, false);
return ret;
}
diff --git a/xbmc/windowing/gbm/WinSystemGbm.h b/xbmc/windowing/gbm/WinSystemGbm.h
index 879d0f58f8..a800acef6b 100644
--- a/xbmc/windowing/gbm/WinSystemGbm.h
+++ b/xbmc/windowing/gbm/WinSystemGbm.h
@@ -49,7 +49,7 @@ public:
bool DisplayHardwareScalingEnabled() override;
void UpdateDisplayHardwareScaling(const RESOLUTION_INFO& resInfo) override;
- void FlipPage(bool rendered, bool videoLayer, bool async);
+ void FlipPage(bool rendered, bool videoLayer);
bool CanDoWindowed() override { return false; }
void UpdateResolutions() override;
diff --git a/xbmc/windowing/gbm/WinSystemGbmEGLContext.cpp b/xbmc/windowing/gbm/WinSystemGbmEGLContext.cpp
index ee27fba1bd..83a59413f7 100644
--- a/xbmc/windowing/gbm/WinSystemGbmEGLContext.cpp
+++ b/xbmc/windowing/gbm/WinSystemGbmEGLContext.cpp
@@ -58,17 +58,6 @@ bool CWinSystemGbmEGLContext::InitWindowSystemEGL(EGLint renderableType, EGLint
return false;
}
- if (CEGLUtils::HasExtension(m_eglContext.GetEGLDisplay(), "EGL_ANDROID_native_fence_sync") &&
- CEGLUtils::HasExtension(m_eglContext.GetEGLDisplay(), "EGL_KHR_fence_sync"))
- {
- m_eglFence = std::make_unique<KODI::UTILS::EGL::CEGLFence>(m_eglContext.GetEGLDisplay());
- }
- else
- {
- CLog::Log(LOGWARNING, "[GBM] missing support for EGL_KHR_fence_sync and "
- "EGL_ANDROID_native_fence_sync - performance may be impacted");
- }
-
return true;
}
diff --git a/xbmc/windowing/gbm/WinSystemGbmEGLContext.h b/xbmc/windowing/gbm/WinSystemGbmEGLContext.h
index fbd52354ee..84f863d6d3 100644
--- a/xbmc/windowing/gbm/WinSystemGbmEGLContext.h
+++ b/xbmc/windowing/gbm/WinSystemGbmEGLContext.h
@@ -9,7 +9,6 @@
#pragma once
#include "WinSystemGbm.h"
-#include "utils/EGLFence.h"
#include "utils/EGLUtils.h"
#include "windowing/linux/WinSystemEGL.h"
@@ -47,8 +46,6 @@ protected:
bool InitWindowSystemEGL(EGLint renderableType, EGLint apiType);
virtual bool CreateContext() = 0;
- std::unique_ptr<KODI::UTILS::EGL::CEGLFence> m_eglFence;
-
struct delete_CVaapiProxy
{
void operator()(CVaapiProxy *p) const;
diff --git a/xbmc/windowing/gbm/WinSystemGbmGLContext.cpp b/xbmc/windowing/gbm/WinSystemGbmGLContext.cpp
index adbb539f21..e4ff49c618 100644
--- a/xbmc/windowing/gbm/WinSystemGbmGLContext.cpp
+++ b/xbmc/windowing/gbm/WinSystemGbmGLContext.cpp
@@ -119,37 +119,13 @@ void CWinSystemGbmGLContext::PresentRender(bool rendered, bool videoLayer)
{
if (rendered)
{
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
- if (m_eglFence)
- {
- int fd = m_DRM->TakeOutFenceFd();
- if (fd != -1)
- {
- m_eglFence->CreateKMSFence(fd);
- m_eglFence->WaitSyncGPU();
- }
-
- m_eglFence->CreateGPUFence();
- }
-#endif
-
if (!m_eglContext.TrySwapBuffers())
{
CEGLUtils::Log(LOGERROR, "eglSwapBuffers failed");
throw std::runtime_error("eglSwapBuffers failed");
}
-
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
- if (m_eglFence)
- {
- int fd = m_eglFence->FlushFence();
- m_DRM->SetInFenceFd(fd);
-
- m_eglFence->WaitSyncCPU();
- }
-#endif
}
- CWinSystemGbm::FlipPage(rendered, videoLayer, static_cast<bool>(m_eglFence));
+ CWinSystemGbm::FlipPage(rendered, videoLayer);
if (m_dispReset && m_dispResetTimer.IsTimePast())
{
diff --git a/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp b/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp
index ad80abf46c..0d071c31f1 100644
--- a/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp
+++ b/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp
@@ -128,38 +128,13 @@ void CWinSystemGbmGLESContext::PresentRender(bool rendered, bool videoLayer)
{
if (rendered)
{
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
- if (m_eglFence)
- {
- int fd = m_DRM->TakeOutFenceFd();
- if (fd != -1)
- {
- m_eglFence->CreateKMSFence(fd);
- m_eglFence->WaitSyncGPU();
- }
-
- m_eglFence->CreateGPUFence();
- }
-#endif
-
if (!m_eglContext.TrySwapBuffers())
{
CEGLUtils::Log(LOGERROR, "eglSwapBuffers failed");
throw std::runtime_error("eglSwapBuffers failed");
}
-
-#if defined(EGL_ANDROID_native_fence_sync) && defined(EGL_KHR_fence_sync)
- if (m_eglFence)
- {
- int fd = m_eglFence->FlushFence();
- m_DRM->SetInFenceFd(fd);
-
- m_eglFence->WaitSyncCPU();
- }
-#endif
}
-
- CWinSystemGbm::FlipPage(rendered, videoLayer, static_cast<bool>(m_eglFence));
+ CWinSystemGbm::FlipPage(rendered, videoLayer);
if (m_dispReset && m_dispResetTimer.IsTimePast())
{
diff --git a/xbmc/windowing/gbm/drm/DRMAtomic.cpp b/xbmc/windowing/gbm/drm/DRMAtomic.cpp
index ff7f137d60..029b5cae81 100644
--- a/xbmc/windowing/gbm/drm/DRMAtomic.cpp
+++ b/xbmc/windowing/gbm/drm/DRMAtomic.cpp
@@ -111,11 +111,6 @@ void CDRMAtomic::DrmAtomicCommit(int fb_id, int flags, bool rendered, bool video
AddProperty(m_gui_plane, "CRTC_H", m_mode->vdisplay);
}
- if (m_inFenceFd != -1)
- {
- AddProperty(m_crtc, "OUT_FENCE_PTR", reinterpret_cast<uint64_t>(&m_outFenceFd));
- AddProperty(m_gui_plane, "IN_FENCE_FD", m_inFenceFd);
- }
}
else if (videoLayer && !CServiceBroker::GetGUI()->GetWindowManager().HasVisibleControls())
{
@@ -151,12 +146,6 @@ void CDRMAtomic::DrmAtomicCommit(int fb_id, int flags, bool rendered, bool video
strerror(errno));
}
- if (m_inFenceFd != -1)
- {
- close(m_inFenceFd);
- m_inFenceFd = -1;
- }
-
if (flags & DRM_MODE_ATOMIC_ALLOW_MODESET)
{
if (drmModeDestroyPropertyBlob(m_fd, blob_id) != 0)
@@ -171,10 +160,9 @@ void CDRMAtomic::DrmAtomicCommit(int fb_id, int flags, bool rendered, bool video
m_req = m_atomicRequestQueue.back().get();
}
-void CDRMAtomic::FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async)
+void CDRMAtomic::FlipPage(struct gbm_bo *bo, bool rendered, bool videoLayer)
{
struct drm_fb *drm_fb = nullptr;
- uint32_t flags = 0;
if (rendered)
{
@@ -189,11 +177,10 @@ void CDRMAtomic::FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, boo
CLog::Log(LOGERROR, "CDRMAtomic::{} - Failed to get a new FBO", __FUNCTION__);
return;
}
-
- if (async && !m_need_modeset)
- flags |= DRM_MODE_ATOMIC_NONBLOCK;
}
+ uint32_t flags = 0;
+
if (m_need_modeset)
{
flags |= DRM_MODE_ATOMIC_ALLOW_MODESET;
diff --git a/xbmc/windowing/gbm/drm/DRMAtomic.h b/xbmc/windowing/gbm/drm/DRMAtomic.h
index 6b19657587..ca2cd9a1d0 100644
--- a/xbmc/windowing/gbm/drm/DRMAtomic.h
+++ b/xbmc/windowing/gbm/drm/DRMAtomic.h
@@ -27,7 +27,7 @@ class CDRMAtomic : public CDRMUtils
public:
CDRMAtomic() = default;
~CDRMAtomic() override = default;
- void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async) override;
+ void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer) override;
bool SetVideoMode(const RESOLUTION_INFO& res, struct gbm_bo* bo) override;
bool SetActive(bool active) override;
bool InitDrm() override;
diff --git a/xbmc/windowing/gbm/drm/DRMLegacy.cpp b/xbmc/windowing/gbm/drm/DRMLegacy.cpp
index 4e9c3a6b9f..418d067e70 100644
--- a/xbmc/windowing/gbm/drm/DRMLegacy.cpp
+++ b/xbmc/windowing/gbm/drm/DRMLegacy.cpp
@@ -108,7 +108,7 @@ bool CDRMLegacy::QueueFlip(struct gbm_bo *bo)
return true;
}
-void CDRMLegacy::FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async)
+void CDRMLegacy::FlipPage(struct gbm_bo *bo, bool rendered, bool videoLayer)
{
if (rendered || videoLayer)
{
diff --git a/xbmc/windowing/gbm/drm/DRMLegacy.h b/xbmc/windowing/gbm/drm/DRMLegacy.h
index e763f298f7..2b7ff45617 100644
--- a/xbmc/windowing/gbm/drm/DRMLegacy.h
+++ b/xbmc/windowing/gbm/drm/DRMLegacy.h
@@ -22,7 +22,7 @@ class CDRMLegacy : public CDRMUtils
public:
CDRMLegacy() = default;
~CDRMLegacy() override = default;
- void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async) override;
+ void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer) override;
bool SetVideoMode(const RESOLUTION_INFO& res, struct gbm_bo* bo) override;
bool SetActive(bool active) override;
bool InitDrm() override;
diff --git a/xbmc/windowing/gbm/drm/DRMUtils.h b/xbmc/windowing/gbm/drm/DRMUtils.h
index f92f716fc4..5327e35570 100644
--- a/xbmc/windowing/gbm/drm/DRMUtils.h
+++ b/xbmc/windowing/gbm/drm/DRMUtils.h
@@ -15,7 +15,6 @@
#include "windowing/Resolution.h"
#include "windowing/gbm/GBMUtils.h"
-#include <utility>
#include <vector>
#include <gbm.h>
@@ -40,7 +39,7 @@ class CDRMUtils
public:
CDRMUtils() = default;
virtual ~CDRMUtils();
- virtual void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async) {}
+ virtual void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer) {}
virtual bool SetVideoMode(const RESOLUTION_INFO& res, struct gbm_bo* bo) { return false; }
virtual bool SetActive(bool active) { return false; }
virtual bool InitDrm();
@@ -63,13 +62,6 @@ public:
static uint32_t FourCCWithAlpha(uint32_t fourcc);
static uint32_t FourCCWithoutAlpha(uint32_t fourcc);
- void SetInFenceFd(int fd) { m_inFenceFd = fd; }
- int TakeOutFenceFd()
- {
- int fd{-1};
- return std::exchange(m_outFenceFd, fd);
- }
-
protected:
bool OpenDrm(bool needConnector);
drm_fb* DrmFbGetFromBo(struct gbm_bo *bo);
@@ -86,9 +78,6 @@ protected:
int m_width = 0;
int m_height = 0;
- int m_inFenceFd{-1};
- int m_outFenceFd{-1};
-
std::vector<std::unique_ptr<CDRMPlane>> m_planes;
private:
diff --git a/xbmc/windowing/gbm/drm/OffScreenModeSetting.h b/xbmc/windowing/gbm/drm/OffScreenModeSetting.h
index bba0db9a53..4270d4ecb2 100644
--- a/xbmc/windowing/gbm/drm/OffScreenModeSetting.h
+++ b/xbmc/windowing/gbm/drm/OffScreenModeSetting.h
@@ -22,7 +22,7 @@ class COffScreenModeSetting : public CDRMUtils
public:
COffScreenModeSetting() = default;
~COffScreenModeSetting() override = default;
- void FlipPage(struct gbm_bo* bo, bool rendered, bool videoLayer, bool async) override {}
+ void FlipPage(struct gbm_bo *bo, bool rendered, bool videoLayer) override {}
bool SetVideoMode(const RESOLUTION_INFO& res, struct gbm_bo *bo) override { return false; }
bool SetActive(bool active) override { return false; }
bool InitDrm() override;

View file

@ -1,23 +0,0 @@
From 19668d52077b6352522ee21b225e7672dad746e7 Mon Sep 17 00:00:00 2001
Date: Fri, 10 Nov 2023 15:08:12 -0400
Subject: [PATCH] ffmpeg: update for official 5.1.4
---
tools/depends/target/ffmpeg/FFMPEG-VERSION | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/depends/target/ffmpeg/FFMPEG-VERSION b/tools/depends/target/ffmpeg/FFMPEG-VERSION
index d80ab0a..b2f6ec1 100644
--- a/tools/depends/target/ffmpeg/FFMPEG-VERSION
+++ b/tools/depends/target/ffmpeg/FFMPEG-VERSION
@@ -1,5 +1,5 @@
LIBNAME=ffmpeg
BASE_URL=https://github.com/xbmc/FFmpeg
-VERSION=5.1.2-Nexus-Alpha3
+VERSION=5.1.4
ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
-SHA512=ce60852b8456d6f4bfc60de0ceadb33034d9b3eea8c0bc84d8b7199984ecbf334a2c4d9b42eade439d0ef30ce22e3b2ca0a49d4df837a18cd3136b4343ed3113
+SHA512=02817439d8382a9f27acc2d5b0fd778872a5fc8283022f3c9d08926abb8c62dca576b5fae4c6afa5d53e01f3d3e3a803df8efc58d294587fa0b3057e80fd1a6d
--
2.40.1

View file

@ -1,51 +0,0 @@
From e32ddfda63944ef786b3a3ddea243dc0ed2f4c11 Mon Sep 17 00:00:00 2001
From: graysky <graysky@archlinux.us>
Date: Fri, 7 Jan 2022 10:22:22 -0500
Subject: [PATCH] ffmpeg: build with lto when -DUSE_LTO=ON
I do not believe the internal ffmpeg build uses LTO if the user calls for it
via -DUSE_LTO=ON. This commit passes --enable-lto to ffmpeg's configure script
if CMAKE has CMAKE_INTERPROCEDURAL_OPTIMIZATION set which -DUSE_LTO=ON does.
The original author of this, loqs, points this out here[1].
1. https://bugs.archlinux.org/task/69333#comment196255
---
cmake/modules/FindFFMPEG.cmake | 5 +++++
tools/depends/target/ffmpeg/CMakeLists.txt | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake
index 13c810591b..5f0c596cb7 100644
--- a/cmake/modules/FindFFMPEG.cmake
+++ b/cmake/modules/FindFFMPEG.cmake
@@ -55,6 +55,11 @@ macro(buildFFMPEG)
-DOS=${OS}
-DCMAKE_AR=${CMAKE_AR})
endif()
+
+ if(USE_LTO)
+ list(APPEND FFMPEG_OPTIONS -DUSE_LTO=ON)
+ endif()
+
set(LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
list(APPEND LINKER_FLAGS ${SYSTEM_LDFLAGS})
diff --git a/tools/depends/target/ffmpeg/CMakeLists.txt b/tools/depends/target/ffmpeg/CMakeLists.txt
index 1bf9f53499..d438449888 100644
--- a/tools/depends/target/ffmpeg/CMakeLists.txt
+++ b/tools/depends/target/ffmpeg/CMakeLists.txt
@@ -126,6 +126,10 @@ if(CPU MATCHES x86 OR CPU MATCHES x86_64)
list(APPEND ffmpeg_conf --x86asmexe=${NASM_EXECUTABLE})
endif()
+if(USE_LTO)
+ list(APPEND ffmpeg_conf --enable-lto)
+endif()
+
if(ENABLE_DAV1D)
list(APPEND ffmpeg_conf --enable-libdav1d)
set(pkgconf_path "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}")
--
2.44.0

View file

@ -15,17 +15,17 @@ pkgname=(
'kodi-rpi-eventclients' 'kodi-rpi-tools-texturepacker' 'kodi-rpi-dev'
)
_commitnumber=62420
_commit=8ff17bbfc65c9b3c1923e85c4b40e5033aceebcc
_commitnumber=65539
_commit=7ead006b14bf638bb1928e389b5552ec32288222
# set this to anything to build with clang
# recommend manually setting -DUSE_LTO=OFF to -DUSE_LTO=$(nproc) in build()
_clangbuild=
pkgver=20.5
pkgrel=7
pkgver=21.0
pkgrel=1
arch=('aarch64' 'armv7h')
url="https://github.com/graysky2/xbmc/tree/gs-gbm_nexus"
url="https://github.com/graysky2/xbmc/tree/gs-gbm_omega"
license=('GPL2')
makedepends=(
'afpfs-ng' 'bluez-libs' 'cmake' 'curl' 'dav1d' 'doxygen' 'git' 'glew'
@ -36,7 +36,7 @@ makedepends=(
'pipewire' 'python-pycryptodomex' 'python-pillow' 'python-pybluez'
'python-simplejson' 'shairplay' 'smbclient' 'sndio' 'spdlog' 'taglib'
'tinyxml' 'swig' 'upower' 'giflib' 'rapidjson' 'ghostscript' 'meson' 'gtest'
'graphviz' 'libinput' 'libxkbcommon' 'pcre'
'graphviz' 'libinput' 'libxkbcommon' 'pcre' 'libdisplay-info' 'tinyxml2'
)
# there are incompatibilities with recent java releases
@ -47,12 +47,12 @@ makedepends_aarch64=('java-environment<21')
[[ -n "$_clangbuild" ]] && makedepends+=('clang' 'lld' 'llvm')
_codename=Nexus
_codename=Omega
_init_version=1.137
_libdvdcss_version="1.4.3-Next-Nexus-Alpha2-2"
_libdvdnav_version="6.1.1-Next-Nexus-Alpha2-2"
_libdvdread_version="6.1.3-Next-Nexus-Alpha2-2"
_ffmpeg_version="5.1.4"
_ffmpeg_version="6.0.1"
_crossguid_version="ca1bf4b810e2d188d04cb6286f957008ee1b7681"
_fstrcmp_version="0.7.D001"
_flatbuffers_version="23.3.3"
@ -69,11 +69,7 @@ source=(
"https://mirrors.kodi.tv/build-deps/sources/libudfread-$_libudfread_version.tar.gz"
"ArchARM-kodi-init-v$_init_version.tar.gz::https://github.com/graysky2/kodi-standalone-service/archive/v$_init_version.tar.gz"
kodi.config.txt
0001-ffmpeg-update-for-official-5.1.4.patch
0002-ffmpeg-build-with-lto-when-DUSE_LTO-ON.patch
flatbuffers-23.3.3.patch::https://github.com/xbmc/xbmc/commit/35be40daa39965a9ea5b3569eb7d515e6a14da5d.patch
pr23703.patch::https://patch-diff.githubusercontent.com/raw/xbmc/xbmc/pull/23703.patch
https://github.com/xbmc/xbmc/pull/23227.patch
000-temp-revert-fences.patch
)
backup=(boot/kodi.config.txt etc/conf.d/kodi-standalone)
noextract=(
@ -86,22 +82,18 @@ noextract=(
"flatbuffers-$_flatbuffers_version.tar.gz"
"libudfread-$_libudfread_version.tar.gz"
)
sha256sums=('c57658cf04c18556fa7a60a9ec26cd8630da39438cf5f2e822395a47240162a1'
sha256sums=('9917487bc8dfef0c12d7c59c736c09072284df3c7befbc8ac418488e5116add8'
'f38c4a4e7a4f4da6d8e83b8852489aa3bb6588a915dc41f5ee89d9aad305a06e'
'584f62a3896794408d46368e2ecf2c6217ab9c676ce85921b2d68b8961f49dfc'
'719130091e3adc9725ba72df808f24a14737a009dca5a4c38c601c0c76449b62'
'ad1d83e0f022ba405928ea4985c9cab978c4698bb7937738a1085808c3eb78b4'
'375fd8abab657d18578554927d23abfc9cb3b6794bd9839330230cf5f9fcea26'
'6be27e0b3a4907f0cd3cfadec255ee1b925569e1bd06e67a4d2f4267299b69c4'
'e4018e850f80700acee8da296e56e15b1eef711ab15157e542e7d7e1237c3476'
'8aff985da30aaab37edf8e5b02fda33ed4cbdd962699a8e2af98fdef306f4e4d'
'2bf16726ac98d093156195bb049a663e07d3323e079c26912546f4e05c77bac5'
'8f8ab84a0cf3bd382edb118e475b336ca2fe1e1d4da3ad8e4637f8278ed9179c'
'5ac76e6ff16d8f0f60a414647bddb13b46402563dd02d69a05e90c0ddbb085f0'
'9dd3923d87f645ed31d37bca6cd791798d7a486335e952dd09b8076bb4c1908b'
'9d2d52787abf59ceaf116e5d9e7b2ed33ce789d74766c9e407da34e86c796999'
'ea7a409c4e260bd8f4f949cbd02b7a6609ac0ec5a6920b405abc63ec1a3e312b'
'41ed62f58f531ee65278eba2c05411c8948957989c6a21af4e19ca2623d5c03c'
'c0570dfddbd42a88446695ec4af38f6cf8a5a99f95210eeefb596c155a18f9d9')
'e812fc2f74d71915c3179785a8f99647612bd21ce96f866769ee1bc58682ee3b')
prepare() {
[[ -d kodi-build ]] && rm -rf kodi-build
@ -110,18 +102,8 @@ prepare() {
rm -rf system/certs # remove not needed cacert
patch -p1 -i ../0001-ffmpeg-update-for-official-5.1.4.patch
patch -p1 -i ../0002-ffmpeg-build-with-lto-when-DUSE_LTO-ON.patch
# use flatbuffers 23.3.3
patch -p1 -i ../flatbuffers-23.3.3.patch
# expose CPU temp for RPis
patch -p1 -i ../pr23703.patch
# potential fix for thread priority crash
# https://gitlab.archlinux.org/archlinux/packaging/packages/kodi/-/issues/3
patch -p1 -i ../23227.patch
# fix https://forum.kodi.tv/showthread.php?tid=376430
patch -p1 -i ../000-temp-revert-fences.patch
}
build() {
@ -199,16 +181,13 @@ build() {
-DCORE_PLATFORM_NAME="x11 gbm"
)
# https://github.com/google/flatbuffers/issues/7404
CXXFLAGS+=' -Wno-error=restrict'
echo "building kodi"
cmake "${_args[@]}" ../"xbmc-$_commit"
make
}
package_kodi-rpi() {
pkgdesc="Media player and entertainment hub with hw accel for RPi 3 and above, gbm_nexus fork"
pkgdesc="Media player and entertainment hub with hw accel for RPi 3 and above, gbm_omega fork"
depends=(
'bluez-libs' 'curl' 'dav1d' 'desktop-file-utils' 'hicolor-icon-theme' 'fmt'
'lcms2' 'libass' 'libbluray' 'libcdio' 'libcec' 'libmicrohttpd' 'libnfs'
@ -216,7 +195,7 @@ package_kodi-rpi() {
'mesa' 'libpipewire' 'python-pillow' 'python-pycryptodomex'
'python-simplejson' 'shairplay' 'smbclient' 'sndio' 'spdlog' 'sqlite'
'taglib' 'tinyxml' 'libxkbcommon' 'polkit' 'linux>=5.4.35' 'lzo' 'libinput'
'pcre'
'pcre' 'libdisplay-info' 'tinyxml2'
)
[[ -n "$_clangbuild" ]] && depends+=('glu')