mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-01-17 23:34:07 +00:00
alarm/kodi-rpi-legacy to 19.4-5
When building this package on RPi4/armv7h, cmake will detect -march=armv7-a+simd (see src/kodi-build/CMakeFiles/CMakeOutput.log) which will conflict with the mcpu value we previously defined so just remove custom *FLAGS. Also use ffmpeg 4.4.2 to match kodi-rpi and remove libva from depends which is not needed.
This commit is contained in:
parent
2df4547cdc
commit
4f77e2f7f0
3 changed files with 9 additions and 128 deletions
|
@ -1,24 +0,0 @@
|
|||
From 9bc4045471dd0f6a23023db6801173b0c624e127 Mon Sep 17 00:00:00 2001
|
||||
From: graysky <therealgraysky@proton.me>
|
||||
Date: Sat, 7 May 2022 06:11:27 -0400
|
||||
Subject: [PATCH 2/2] add dav1d patch to build system
|
||||
|
||||
---
|
||||
cmake/modules/FindFFMPEG.cmake | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/cmake/modules/FindFFMPEG.cmake b/cmake/modules/FindFFMPEG.cmake
|
||||
index 9ce807c..de4287d 100644
|
||||
--- a/cmake/modules/FindFFMPEG.cmake
|
||||
+++ b/cmake/modules/FindFFMPEG.cmake
|
||||
@@ -279,6 +279,7 @@ if(NOT FFMPEG_FOUND)
|
||||
${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/FindGnuTls.cmake
|
||||
<SOURCE_DIR> &&
|
||||
patch -p1 < ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/0001-rpi-Add-hevc-acceleration.patch &&
|
||||
+ patch -p1 < ${CMAKE_SOURCE_DIR}/tools/depends/target/ffmpeg/0002-add-dav1d-patch-to-build-system.patch &&
|
||||
echo "########################################## patched ffmpeg ##############################"
|
||||
)
|
||||
|
||||
--
|
||||
2.37.2
|
||||
|
|
@ -15,8 +15,8 @@ pkgname=(
|
|||
'kodi-rpi-legacy-eventclients' 'kodi-rpi-legacy-tools-texturepacker' 'kodi-rpi-legacy-dev'
|
||||
)
|
||||
pkgver=19.4
|
||||
pkgrel=4
|
||||
_commit=51a36cca9f6dd2bc717e41153fb2d0aa9caf11ca
|
||||
pkgrel=5
|
||||
_commit=176201ccb46e8a809ce91e31205016f757ceea39
|
||||
arch=('armv7h')
|
||||
url="https://github.com/graysky2/xbmc/tree/gs-gbm_matrix"
|
||||
license=('GPL2')
|
||||
|
@ -36,7 +36,7 @@ _init_version=1.136
|
|||
_libdvdcss_version="1.4.2-Leia-Beta-5"
|
||||
_libdvdnav_version="6.0.0-Leia-Alpha-3"
|
||||
_libdvdread_version="6.0.0-Leia-Alpha-3"
|
||||
_ffmpeg_version="4.3.2-$_codename-19.2"
|
||||
_ffmpeg_version="4.4.2"
|
||||
_fmt_version="6.1.2"
|
||||
_spdlog_version="1.5.0"
|
||||
_crossguid_version="8f399e8bd4"
|
||||
|
@ -47,7 +47,7 @@ source=(
|
|||
"libdvdcss-$_libdvdcss_version.tar.gz::https://github.com/xbmc/libdvdcss/archive/$_libdvdcss_version.tar.gz"
|
||||
"libdvdnav-$_libdvdnav_version.tar.gz::https://github.com/xbmc/libdvdnav/archive/$_libdvdnav_version.tar.gz"
|
||||
"libdvdread-$_libdvdread_version.tar.gz::https://github.com/xbmc/libdvdread/archive/$_libdvdread_version.tar.gz"
|
||||
"ffmpeg-$_ffmpeg_version.tar.gz::https://github.com/xbmc/FFmpeg/archive/$_ffmpeg_version.tar.gz"
|
||||
https://ffmpeg.org/releases/ffmpeg-4.4.2.tar.gz
|
||||
"http://mirrors.kodi.tv/build-deps/sources/fmt-$_fmt_version.tar.gz"
|
||||
"http://mirrors.kodi.tv/build-deps/sources/crossguid-$_crossguid_version.tar.gz"
|
||||
"http://mirrors.kodi.tv/build-deps/sources/fstrcmp-$_fstrcmp_version.tar.gz"
|
||||
|
@ -55,8 +55,6 @@ source=(
|
|||
"http://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
|
||||
build-fix-for-dav1d-1.0.0.patch
|
||||
0001-add-dav1d-patch-to-build-system.patch
|
||||
)
|
||||
backup=(boot/kodi.config.txt etc/conf.d/kodi-standalone)
|
||||
noextract=(
|
||||
|
@ -70,44 +68,29 @@ noextract=(
|
|||
"fstrcmp-$_fstrcmp_version.tar.gz"
|
||||
"libudfread-$_libudfread_version.tar.gz"
|
||||
)
|
||||
sha256sums=('ea57f7d2339bede8086082865afbb47c953f195dbfbaf54c43aeb4b46b8f9f2e'
|
||||
sha256sums=('fbe7029f1dca674406ad8695662ddd85442bcee9342b2dee44723b8108b1b723'
|
||||
'38816f8373e243bc5950449b4f3b18938c4e1c59348e3411e23f31db4072e40d'
|
||||
'071e414e61b795f2ff9015b21a85fc009dde967f27780d23092643916538a57a'
|
||||
'a30b6aa0aad0f2c505bc77948af2d5531a80b6e68112addb4c123fca24d5d3bf'
|
||||
'58fe3a3ba38d2b30cd8bfe40e1b3bf82296b258627d0740c284af29f0c8a6655'
|
||||
'058efd4b6459bc9df54186f17a989d0af619a793aa62f07e96b88632706d6a17'
|
||||
'1cafc80701b746085dddf41bd9193e6d35089e1c6ec1940e037fcb9c98f62365'
|
||||
'3d77d09a5df0de510aeeb940df4cb534787ddff3bb1828779753f5dfa1229d10'
|
||||
'e4018e850f80700acee8da296e56e15b1eef711ab15157e542e7d7e1237c3476'
|
||||
'b38e0bbef7faac2b82fed550a0c19b0d4e7f6737d5321d4fd8f216b80f8aee8a'
|
||||
'5ad9f95c53e8f29853c1fefa0a20a301be4045e2c7ae49d1164bc74d94155627'
|
||||
'b94c70baa45e30346224ceecfab031dd183e09303b1f97d6522f9941da9b0067'
|
||||
'590a2fcc8d4855ef1e1196b7a81954670cd1d7580d94e41c8b5e99c5f206d37d'
|
||||
'bcde6299a805430c3ca1f2807101edc7001e77b1934088db9057f74d9a9dd8f6'
|
||||
'6ddcfe192cac6edaa18b3adfd0f19c9c3be897c064ec88e0db27e30530d4313a')
|
||||
'590a2fcc8d4855ef1e1196b7a81954670cd1d7580d94e41c8b5e99c5f206d37d')
|
||||
|
||||
prepare() {
|
||||
[[ -d kodi-build ]] && rm -rf kodi-build
|
||||
mkdir "$srcdir/kodi-build"
|
||||
|
||||
cd "xbmc-$_commit"
|
||||
|
||||
cp ../build-fix-for-dav1d-1.0.0.patch \
|
||||
tools/depends/target/ffmpeg/0002-add-dav1d-patch-to-build-system.patch
|
||||
|
||||
# patch kodi build system to apply the patches we just copied over
|
||||
patch -p1 -i ../0001-add-dav1d-patch-to-build-system.patch
|
||||
#cd "xbmc-$_commit"
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/kodi-build"
|
||||
|
||||
# -march= defined in /etc/makepkg.conf will override the value for -mcpu we
|
||||
# uses here so unset them and redefine below
|
||||
unset CFLAGS CXXFLAGS
|
||||
|
||||
export CFLAGS="-mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -O2 -pipe -fstack-protector-strong -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection"
|
||||
CXXFLAGS="${CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS"
|
||||
|
||||
_args=(
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
|
@ -146,7 +129,7 @@ package_kodi-rpi-legacy() {
|
|||
depends=(
|
||||
'bluez-libs' 'curl' 'dav1d' 'desktop-file-utils' 'hicolor-icon-theme'
|
||||
'lcms2' 'libass' 'libbluray' 'libcdio' 'libcec-rpi' 'libmicrohttpd' 'libnfs'
|
||||
'libplist' 'libpulse' 'libva' 'libxslt' 'lirc' 'mariadb-libs' 'mesa'
|
||||
'libplist' 'libpulse' 'libxslt' 'lirc' 'mariadb-libs' 'mesa'
|
||||
'python-pillow' 'python-pycryptodomex' 'python-simplejson'
|
||||
'shairplay' 'smbclient' 'sqlite' 'taglib' 'tinyxml'
|
||||
'libinput' 'libxkbcommon' 'polkit' 'linux>=5.4.35' 'lzo' 'flatbuffers'
|
||||
|
|
|
@ -1,78 +0,0 @@
|
|||
From 2546e1ed27f92a840a2cf319e3c1833799974cf1 Mon Sep 17 00:00:00 2001
|
||||
From: BlackEagle <ike.devolder@gmail.com>
|
||||
Date: Fri, 29 Apr 2022 14:33:12 +0200
|
||||
Subject: [PATCH] add build fix for dav1d 1.0.0
|
||||
|
||||
Taken from https://github.com/FFmpeg/FFmpeg/commit/e204846ec16c1ab34c7f3a681734cf5190433018
|
||||
|
||||
add FF_DAV1D_VERSION_AT_LEAST
|
||||
|
||||
Extracted from https://github.com/FFmpeg/FFmpeg/commit/7ee17ec7e46afef0e0af20af196292ec75f50b62
|
||||
|
||||
Signed-off-by: BlackEagle <ike.devolder@gmail.com>
|
||||
---
|
||||
libavcodec/libdav1d.c | 24 ++++++++++++++++++++++--
|
||||
1 file changed, 22 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
|
||||
index bbb3ec1e6c..08b4af8ac8 100644
|
||||
--- a/libavcodec/libdav1d.c
|
||||
+++ b/libavcodec/libdav1d.c
|
||||
@@ -30,6 +30,9 @@
|
||||
#include "decode.h"
|
||||
#include "internal.h"
|
||||
|
||||
+#define FF_DAV1D_VERSION_AT_LEAST(x,y) \
|
||||
+ (DAV1D_API_VERSION_MAJOR > (x) || DAV1D_API_VERSION_MAJOR == (x) && DAV1D_API_VERSION_MINOR >= (y))
|
||||
+
|
||||
typedef struct Libdav1dContext {
|
||||
AVClass *class;
|
||||
Dav1dContext *c;
|
||||
@@ -140,6 +143,15 @@ static av_cold int libdav1d_init(AVCodecContext *c)
|
||||
if (dav1d->operating_point >= 0)
|
||||
s.operating_point = dav1d->operating_point;
|
||||
|
||||
+#if FF_DAV1D_VERSION_AT_LEAST(6,0)
|
||||
+ if (dav1d->frame_threads || dav1d->tile_threads)
|
||||
+ s.n_threads = FFMAX(dav1d->frame_threads, dav1d->tile_threads);
|
||||
+ else
|
||||
+ s.n_threads = FFMIN(threads, DAV1D_MAX_THREADS);
|
||||
+ s.max_frame_delay = (c->flags & AV_CODEC_FLAG_LOW_DELAY) ? 1 : s.n_threads;
|
||||
+ av_log(c, AV_LOG_DEBUG, "Using %d threads, %d max_frame_delay\n",
|
||||
+ s.n_threads, s.max_frame_delay);
|
||||
+#else
|
||||
s.n_tile_threads = dav1d->tile_threads
|
||||
? dav1d->tile_threads
|
||||
: FFMIN(floor(sqrt(threads)), DAV1D_MAX_TILE_THREADS);
|
||||
@@ -148,6 +160,7 @@ static av_cold int libdav1d_init(AVCodecContext *c)
|
||||
: FFMIN(ceil(threads / s.n_tile_threads), DAV1D_MAX_FRAME_THREADS);
|
||||
av_log(c, AV_LOG_DEBUG, "Using %d frame threads, %d tile threads\n",
|
||||
s.n_frame_threads, s.n_tile_threads);
|
||||
+#endif
|
||||
|
||||
res = dav1d_open(&dav1d->c, &s);
|
||||
if (res < 0)
|
||||
@@ -384,11 +397,18 @@ static av_cold int libdav1d_close(AVCodecContext *c)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+#ifndef DAV1D_MAX_FRAME_THREADS
|
||||
+#define DAV1D_MAX_FRAME_THREADS DAV1D_MAX_THREADS
|
||||
+#endif
|
||||
+#ifndef DAV1D_MAX_TILE_THREADS
|
||||
+#define DAV1D_MAX_TILE_THREADS DAV1D_MAX_THREADS
|
||||
+#endif
|
||||
+
|
||||
#define OFFSET(x) offsetof(Libdav1dContext, x)
|
||||
#define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
|
||||
static const AVOption libdav1d_options[] = {
|
||||
- { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD },
|
||||
- { "framethreads", "Frame threads", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD },
|
||||
+ { "tilethreads", "Tile threads", OFFSET(tile_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_TILE_THREADS, VD | AV_OPT_FLAG_DEPRECATED },
|
||||
+ { "framethreads", "Frame threads", OFFSET(frame_threads), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, DAV1D_MAX_FRAME_THREADS, VD | AV_OPT_FLAG_DEPRECATED },
|
||||
{ "filmgrain", "Apply Film Grain", OFFSET(apply_grain), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VD },
|
||||
{ "oppoint", "Select an operating point of the scalable bitstream", OFFSET(operating_point), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 31, VD },
|
||||
{ "alllayers", "Output all spatial layers", OFFSET(all_layers), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VD },
|
||||
--
|
||||
2.36.0
|
||||
|
Loading…
Reference in a new issue