alarm/kodi-rpi to 21.2-1

This commit is contained in:
graysky 2025-01-20 06:21:40 -05:00
parent 38278f112e
commit 7e7a9f0367
2 changed files with 110 additions and 6 deletions

View file

@ -0,0 +1,100 @@
From 313d78c92cb3344baa416aeeba8d4403017e82ea Mon Sep 17 00:00:00 2001
From: Stephan Sundermann <stephansundermann@gmail.com>
Date: Sun, 15 Dec 2024 17:08:34 +0100
Subject: [PATCH 1/4] [nfs] Fix API breakage in libnfs 6.0
---
xbmc/filesystem/NFSFile.cpp | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/xbmc/filesystem/NFSFile.cpp b/xbmc/filesystem/NFSFile.cpp
index b96b2bc4fad4b..a64fc860635b6 100644
--- a/xbmc/filesystem/NFSFile.cpp
+++ b/xbmc/filesystem/NFSFile.cpp
@@ -477,7 +477,11 @@ void CNfsConnection::keepAlive(const std::string& _exportPath, struct nfsfh* _pF
nfs_lseek(pContext, _pFileHandle, 0, SEEK_CUR, &offset);
+#ifdef LIBNFS_API_V2
+ int bytes = nfs_read(pContext, _pFileHandle, buffer, sizeof(buffer));
+#else
int bytes = nfs_read(pContext, _pFileHandle, 32, buffer);
+#endif
if (bytes < 0)
{
CLog::LogF(LOGERROR, "nfs_read - Error ({}, {})", bytes, nfs_get_error(pContext));
@@ -741,8 +745,11 @@ ssize_t CNFSFile::Read(void *lpBuf, size_t uiBufSize)
if (m_pFileHandle == NULL || m_pNfsContext == NULL )
return -1;
-
+#ifdef LIBNFS_API_V2
+ numberOfBytesRead = nfs_read(m_pNfsContext, m_pFileHandle, lpBuf, uiBufSize);
+#else
numberOfBytesRead = nfs_read(m_pNfsContext, m_pFileHandle, uiBufSize, (char *)lpBuf);
+#endif
lock.unlock(); //no need to keep the connection lock after that
@@ -841,12 +848,17 @@ ssize_t CNFSFile::Write(const void* lpBuf, size_t uiBufSize)
{
chunkSize = leftBytes;//write last chunk with correct size
}
+#ifdef LIBNFS_API_V2
+ writtenBytes = nfs_write(m_pNfsContext, m_pFileHandle,
+ static_cast<const char*>(lpBuf) + numberOfBytesWritten, chunkSize);
+#else
//write chunk
//! @bug libnfs < 2.0.0 isn't const correct
writtenBytes = nfs_write(m_pNfsContext,
m_pFileHandle,
chunkSize,
const_cast<char*>((const char *)lpBuf) + numberOfBytesWritten);
+#endif
//decrease left bytes
leftBytes-= writtenBytes;
//increase overall written bytes
From b78237b97ec2d5837cafb8921ec18c8f66df2536 Mon Sep 17 00:00:00 2001
From: Stephan Sundermann <stephansundermann@gmail.com>
Date: Sun, 15 Dec 2024 17:07:05 +0100
Subject: [PATCH 2/4] [depends] Update to libnfs 6.0.2
---
tools/depends/target/libnfs/LIBNFS-VERSION | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/depends/target/libnfs/LIBNFS-VERSION b/tools/depends/target/libnfs/LIBNFS-VERSION
index 892aa7afcfd48..699a31c70fcae 100644
--- a/tools/depends/target/libnfs/LIBNFS-VERSION
+++ b/tools/depends/target/libnfs/LIBNFS-VERSION
@@ -1,6 +1,6 @@
LIBNAME=libnfs
-VERSION=5.0.2
+VERSION=6.0.2
ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
-SHA512=6dcf4ea8a01b35beb53694625d20fbebd858a88725c2742671878ad6fe7877999f93d262fb58a435b00c283c3e6fb6fa7222d04bb4540bf674b7ce196e9424f5
+SHA512=539790ab98aac7b2f25755b745d1f5e016518f1adb3748b8c58df187048bc31e091915d59e6359bb95c49dd986361cbbf2536edcda02598b0fac236762b61a46
BYPRODUCT=libnfs.a
BYPRODUCT_WIN=nfs.lib
From 28857698a05aba4b7168ed775b4ffce381421fc1 Mon Sep 17 00:00:00 2001
From: Stephan Sundermann <stephansundermann@gmail.com>
Date: Sun, 15 Dec 2024 17:28:21 +0100
Subject: [PATCH 3/4] [depends] TEMP: BASE_URL change
---
tools/depends/target/libnfs/LIBNFS-VERSION | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/depends/target/libnfs/LIBNFS-VERSION b/tools/depends/target/libnfs/LIBNFS-VERSION
index 699a31c70fcae..a6cc0bc8da16a 100644
--- a/tools/depends/target/libnfs/LIBNFS-VERSION
+++ b/tools/depends/target/libnfs/LIBNFS-VERSION
@@ -4,3 +4,5 @@ ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz
SHA512=539790ab98aac7b2f25755b745d1f5e016518f1adb3748b8c58df187048bc31e091915d59e6359bb95c49dd986361cbbf2536edcda02598b0fac236762b61a46
BYPRODUCT=libnfs.a
BYPRODUCT_WIN=nfs.lib
+
+BASE_URL=https://github.com/sahlberg/libnfs/archive/refs/tags

View file

@ -15,15 +15,15 @@ pkgname=(
'kodi-rpi-eventclients' 'kodi-rpi-tools-texturepacker' 'kodi-rpi-dev'
)
_commitnumber=65726
_commit=141466d91563efe26387d7b93843b8b94402ff16
_commitnumber=65793
_commit=fa22c8aa85256f3aee8ac9abf024ac75e081c1a1
# set this to anything to build with clang
# recommend manually setting -DUSE_LTO=OFF to -DUSE_LTO=$(nproc) in build()
_clangbuild=
pkgver=21.1
pkgrel=4
pkgver=21.2
pkgrel=1
arch=('aarch64' 'armv7h')
url="https://github.com/graysky2/xbmc/tree/gs-gbm_omega"
license=('GPL2')
@ -73,6 +73,7 @@ source=(
0001-temp-revert-fences.patch
0002-ffmpeg-build-with-lto-when-duse-lto.patch::https://github.com/xbmc/xbmc/commit/2cc6f1728ccb67ef575fe57680dd42836e3d6a1f.patch
0003-taglib-use-1.13.1-for-internal-build-like-LE.patch
0004-fix-libnfs-6-compatibility.patch
)
backup=(boot/kodi.config.txt etc/conf.d/kodi-standalone)
noextract=(
@ -86,7 +87,7 @@ noextract=(
"libudfread-$_libudfread_version.tar.gz"
taglib-1.13.1.tar.gz
)
sha256sums=('82c80d65cdfc08fe216d5d51d171ae2fb7f1bad0f9d4f98a5e820a1114ca987d'
sha256sums=('1710bcfeca5d75834179864274f059acfb26952b994eda352979e96c0a610ea8'
'f38c4a4e7a4f4da6d8e83b8852489aa3bb6588a915dc41f5ee89d9aad305a06e'
'584f62a3896794408d46368e2ecf2c6217ab9c676ce85921b2d68b8961f49dfc'
'719130091e3adc9725ba72df808f24a14737a009dca5a4c38c601c0c76449b62'
@ -100,7 +101,8 @@ sha256sums=('82c80d65cdfc08fe216d5d51d171ae2fb7f1bad0f9d4f98a5e820a1114ca987d'
'5ac76e6ff16d8f0f60a414647bddb13b46402563dd02d69a05e90c0ddbb085f0'
'e812fc2f74d71915c3179785a8f99647612bd21ce96f866769ee1bc58682ee3b'
'5a2f1c5fa9189d56eaf7e05024071c57e11f92b4eeb68b4bb0555c1fdd66c890'
'c0efb77425f86e8a743d59529c4ab0b2d634d53413db1c6f71974c000bc31c14')
'c0efb77425f86e8a743d59529c4ab0b2d634d53413db1c6f71974c000bc31c14'
'2cceccdb90c94ef972c2c2cdd1824cb46a783c9611dad334b8cc9044ad221397')
prepare() {
[[ -d kodi-build ]] && rm -rf kodi-build
@ -117,6 +119,8 @@ prepare() {
# modify to use internal taglib v1.13.1 due to build fails for armv7h with v2.0+
patch -p1 -i ../0003-taglib-use-1.13.1-for-internal-build-like-LE.patch
patch -p1 -i ../0004-fix-libnfs-6-compatibility.patch
}
build() {