Skip to content
Snippets Groups Projects
Commit b5c2fd24 authored by achill (fossdd)'s avatar achill (fossdd) Committed by Kevin Daudt
Browse files

community/kodi: enable working architectures

parent 6750cdf4
No related branches found
No related tags found
1 merge request!80389community/kodi: enable all architectures
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: fossdd <fossdd@pwned.life>
maintainer="fossdd <fossdd@pwned.life>"
pkgname=kodi
pkgver=21.2
_realname=Omega
......@@ -10,9 +10,10 @@ _libdvdread="6.1.3-Next-Nexus-Alpha2-2"
_crossguid="ca1bf4b810e2d188d04cb6286f957008ee1b7681"
pkgdesc="Software media player and entertainment hub for digital media"
url="https://kodi.tv/"
# kodi does not know of other archs
# x86: no flatbuffers
arch="x86_64 aarch64 armv7"
# armhf: flatbuffers
# riscv64: openjdk8
# loongarch64: clang is saying the triple-implied ABI is invalid
arch="all !armhf !riscv64 !loongarch64"
license="GPL-2.0-only"
install="kodi-gbm.pre-install"
depends="
......@@ -137,6 +138,8 @@ source="https://github.com/xbmc/xbmc/archive/$pkgver-$_realname.tar.gz
gcc13.patch
lfs64.patch
sse-build.patch
other-archs.patch
dyn-pagesize.patch
kodi.initd
60-kodi.rules
"
......@@ -289,10 +292,12 @@ f0a80d8e99b10473bcfdfde3d1c5fd7b766959819f0d1c0595ac84ce46db9007a5fbfde9a55aca60
d3be3bfc13c5ea56d8db745c2aab090c99760684fe4c8f62a13d266feb319e9180ceeecf8116bfd2ed90d9accba2c11dbbf93b61ad00f69a40812ebf4eabcdda libdvdcss-1.4.3-Next-Nexus-Alpha2-2.tar.gz
51e6fc033121241354a5f0b3fc9a430577ae3ff6bb7f31445aa548ef4893037fb80eea3b2c6774c81e9ebaf9c45e9b490c98c2c65eb38f9f7daba84b236f7e1d libdvdnav-6.1.1-Next-Nexus-Alpha2-2.tar.gz
629a41157d07b8ec0ea1fe89ae5ec48f63047472a862782b805c531ae31a0376fc4dc15175f8280c3ef91d7fa977bacebb1b51232640034a34bab2293210fc5e libdvdread-6.1.3-Next-Nexus-Alpha2-2.tar.gz
5326494b48b9f453321572c647dc30b8233530432962d83212d25787602cfc0f7219bdabf00308c712b974569abe791aa36fad484c4b2d60e554380e28db6689 fix-musl-incompability.patch
a8394d27eb1f5edabad255ee2afa0a3fb727e7e067a11205395010566d3748e595f4c8237eea7c9e6d7330949c3bff4d9b2cd66c00c94438b11ec9d1dd5d57a7 fix-musl-incompability.patch
f2cd6ec55e44f3a413e2eebeba8b1d591d9ee64b9099578466d19033b620deba8012134aab9017ccb23912518219f725f33b682abf681994c34e160ea07cfa6c gcc13.patch
2aa75f17ecf65e59770746e436a807f2697ba43278158e5123761c543cba40c2b596c5f5c51cc7ca3a7c79bab81213f81017afa6c1228e51546fe14a8cff13de lfs64.patch
82c73147c4f4cd369b413eb503e22b5ac0e4c6dc4c5558efb0b093bf9338da74510bf45141cf7a7b2b30c817eaaa0c7dab7d44960de58bfdcdff51b6e1e7652d sse-build.patch
263b6a2c1ba8c461636e50f982c533c39aa06a9aada944f9baf96dfcaeedf264495d7567d0f8b5dcad9e510c567246aa32391e255f2c6b2068c5911f344483b2 other-archs.patch
349e8a78508e2f3c2b6928067227540e68f41a0ce665a4f1593e98fa44ab21d235b105cd2f41bfb5678727b0083cb2b7c4572694b1c7b8ab6581f059302d0fc9 dyn-pagesize.patch
c47e90b6bb011092c033705195c8f1e4fcb56be412f12133514f46f5cb52acda7075c8350d78c98b86e0808f3d373ac3735f0fae10e907610b5405ba623cebac kodi.initd
465a2079d598bf909a458d8e9d0ddd2b2a41dff83ba736542cffec7811c044295d5af092928f20aaa6cd3bc8b13bb03ede5c7ded1783680f890464e103392787 60-kodi.rules
"
Patch-Source: https://github.com/xbmc/xbmc/pull/26447
---
From da89dfce2da4c68ef3a7f89a4fba1cd6f861e363 Mon Sep 17 00:00:00 2001
From: fossdd <fossdd@pwned.life>
Date: Sat, 22 Feb 2025 22:52:11 +0100
Subject: [PATCH] [UDMABufferObject] Use sysconf(_SC_PAGESIZE) to retrieve page
size
getpagesize() is deprecated and legacy since POSIX.1-2001 and is not available
on architectures where PAGESIZE is not defined. Instead query the
current page size at runtime.
---
xbmc/utils/UDMABufferObject.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/xbmc/utils/UDMABufferObject.cpp b/xbmc/utils/UDMABufferObject.cpp
index 2b8336bcea9c8..f6ba81c18f721 100644
--- a/xbmc/utils/UDMABufferObject.cpp
+++ b/xbmc/utils/UDMABufferObject.cpp
@@ -23,8 +23,6 @@
namespace
{
-const auto PAGESIZE = getpagesize();
-
int RoundUp(int num, int factor)
{
return num + factor - 1 - (num - 1) % factor;
@@ -93,7 +91,7 @@ bool CUDMABufferObject::CreateBufferObject(uint32_t format, uint32_t width, uint
bool CUDMABufferObject::CreateBufferObject(uint64_t size)
{
// Must be rounded to the system page size
- m_size = RoundUp(size, PAGESIZE);
+ m_size = RoundUp(size, sysconf(_SC_PAGESIZE));
m_memfd = memfd_create("kodi", MFD_CLOEXEC | MFD_ALLOW_SEALING);
if (m_memfd < 0)
......@@ -91,17 +91,3 @@ index 33ab3437c1..5a68de2c64 100644
typedef off_t __off_t;
typedef int64_t off64_t;
typedef off64_t __off64_t;
--- a/xbmc/utils/UDMABufferObject.cpp
+++ b/xbmc/utils/UDMABufferObject.cpp
@@ -23,7 +23,9 @@
namespace
{
-const auto PAGESIZE = getpagesize();
+#if !defined(__i386__) && !defined(__x86_64__)
+const auto PAGESIZE = getpagesize();
+#endif
int RoundUp(int num, int factor)
{
return num + factor - 1 - (num - 1) % factor;
Patch-Source: https://github.com/xbmc/xbmc/pull/26446
---
From 1695ba12380272056f369f434747839b2ae38d91 Mon Sep 17 00:00:00 2001
From: fossdd <fossdd@pwned.life>
Date: Sat, 22 Feb 2025 20:59:28 +0100
Subject: [PATCH] [cmake] Set ARCH to CPU by default
Reduces complexity of redundant architecture names and allows building
for other architectures implicitly.
---
cmake/scripts/linux/ArchSetup.cmake | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/cmake/scripts/linux/ArchSetup.cmake b/cmake/scripts/linux/ArchSetup.cmake
index ab142177c81b4..f29a870a1e8b7 100644
--- a/cmake/scripts/linux/ArchSetup.cmake
+++ b/cmake/scripts/linux/ArchSetup.cmake
@@ -37,17 +37,8 @@ else()
elseif(CPU MATCHES aarch64 OR CPU MATCHES arm64)
set(ARCH aarch64)
set(NEON True)
- elseif(CPU MATCHES riscv64)
- set(ARCH riscv64)
- set(NEON False)
- elseif(CPU MATCHES ppc64le)
- set(ARCH ppc64le)
- set(NEON False)
- elseif(CPU MATCHES loongarch64)
- set(ARCH loongarch64)
- set(NEON False)
else()
- message(SEND_ERROR "Unknown CPU: ${CPU}")
+ set(ARCH ${CPU})
endif()
endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment