alarm/kodi-rpi-legacy to 20.5-2

This commit is contained in:
graysky 2024-03-04 19:59:23 -05:00
parent 28199b43cd
commit 9383e08a31
2 changed files with 57 additions and 2 deletions

View file

@ -0,0 +1,51 @@
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

@ -8,6 +8,7 @@
# Contributor Adrian Fedoreanu <adrian [dot] fedoreanu [at] gmail [dot] com>
buildarch=4
highmem=1
pkgbase=kodi-rpi-legacy
pkgname=(
@ -23,7 +24,7 @@ _commit=8ff17bbfc65c9b3c1923e85c4b40e5033aceebcc
_clangbuild=
pkgver=20.5
pkgrel=1
pkgrel=2
arch=('armv7h')
url="https://github.com/graysky2/xbmc/tree/gs-gbm_nexus"
license=('GPL2')
@ -63,6 +64,7 @@ source=(
"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
@ -90,6 +92,7 @@ sha256sums=('c57658cf04c18556fa7a60a9ec26cd8630da39438cf5f2e822395a47240162a1'
'8f8ab84a0cf3bd382edb118e475b336ca2fe1e1d4da3ad8e4637f8278ed9179c'
'590a2fcc8d4855ef1e1196b7a81954670cd1d7580d94e41c8b5e99c5f206d37d'
'9dd3923d87f645ed31d37bca6cd791798d7a486335e952dd09b8076bb4c1908b'
'9d2d52787abf59ceaf116e5d9e7b2ed33ce789d74766c9e407da34e86c796999'
'ea7a409c4e260bd8f4f949cbd02b7a6609ac0ec5a6920b405abc63ec1a3e312b'
'41ed62f58f531ee65278eba2c05411c8948957989c6a21af4e19ca2623d5c03c'
'c0570dfddbd42a88446695ec4af38f6cf8a5a99f95210eeefb596c155a18f9d9')
@ -102,6 +105,7 @@ 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
@ -129,7 +133,7 @@ build() {
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=/usr
-DCMAKE_INSTALL_LIBDIR=/usr/lib
-DUSE_LTO=OFF
-DUSE_LTO=ON
-DVERBOSE=ON
-DENABLE_LDGOLD=OFF
-DENABLE_AIRTUNES=ON