kumquat-buildroot/package/kodi/0002-Fix-crosscompiling-issues.patch
Bernd Kuhls 4146e12c1b package/kodi: bump to version 18.5-Leia
Reworked raspberry pi handling, it is not treated as separate platform
anymore.

Added dependencies to autoreconf cpluff. The autoreconf is normally
called from CMake, but it's better if we do it under our control.

Rebased patch
- 0001-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch

Removed unneeded patch
- 0002-CMake-Remove-dependency-on-gmp-and-libintl-from-Find.patch

Removed backported patches
- 0003-cmake-iconv-is-a-required-dependency.patch
- 0004-Fix-ffmpeg-build-for-mips.patch
- kodi-texturepacker/0002-fix_reallocarray.patch

Added backported patches
- 0003-Add-missing-cassert-includes.patch
- 0004-Backport-Add-missing-cstddef-includes.patch

Updated dependencies
- bzip2 is not used anymore
- flatbuffers (upstream PR 14209)
- fmt (upstream PR 11039)
- fstrcmp (upstream PR 14221)
- yajl was replaced by RapidJSON (upstream PR 8008)
- internal rar support was removed (upstream PR 11912)
  CMake option ENABLE_NONFREE was also removed
- internal sftp support was removed (upstream PR 12005)
- host-zip was removed (upstream PR 12643)
- CMake option ENABLE_OPENSSL was removed (upstream PR 13650)
- lirc support is now provided by lirc-tools (upstream PR 13761)
- IMX support was removed (upstream PR 12990)
- ENABLE_X11 was renamed to -DCORE_PLATFORM_NAME=x11 (upstream PR 12134)

License hash changes because it was converted to markdown.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2020-01-23 00:59:19 +01:00

77 lines
4.8 KiB
Diff

From d2c343a20bb61098d0450b15ea2d1dacd28d954a Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Sun, 12 Aug 2018 15:13:24 +0200
Subject: [PATCH] Fix crosscompiling issues
The codepath for KODI_DEPENDSBUILD needs to be used in order to provide
the correct crosscompiling options to ffmpeg. The CMake option
KODI_DEPENDSBUILD itself can not be enabled because it disables the
internal build of libdvd*.
To link kodi.bin with the statically built ffmpeg libraries kodi uses
a wrapper script which calls pkgconfig. Our pkgconfig is patched to
alter paths which breaks the link command in this case, to fix this
PKG_CONFIG_SYSROOT_DIR was added.
Also remove configure option --cpu from ffmpeg_conf to fix build
errors.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
project/cmake/modules/FindFFMPEG.cmake | 16 +++++++---------
tools/depends/target/ffmpeg/CMakeLists.txt | 2 +-
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/project/cmake/modules/FindFFMPEG.cmake b/project/cmake/modules/FindFFMPEG.cmake
index 28cc80710e..1ac8793149 100644
--- a/cmake/modules/FindFFMPEG.cmake
+++ b/cmake/modules/FindFFMPEG.cmake
@@ -234,14 +234,12 @@
-DENABLE_VAAPI=${ENABLE_VAAPI}
-DENABLE_VDPAU=${ENABLE_VDPAU})
- if(KODI_DEPENDSBUILD)
set(CROSS_ARGS -DDEPENDS_PATH=${DEPENDS_PATH}
-DPKG_CONFIG_EXECUTABLE=${PKG_CONFIG_EXECUTABLE}
-DCROSSCOMPILING=${CMAKE_CROSSCOMPILING}
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
- -DOS=${OS}
+ -DOS=linux
-DCMAKE_AR=${CMAKE_AR})
- endif()
set(LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS})
list(APPEND LINKER_FLAGS ${SYSTEM_LDFLAGS})
@@ -280,12 +278,12 @@
"#!${BASH_COMMAND}
if [[ $@ == *${APP_NAME_LC}.bin* || $@ == *${APP_NAME_LC}${APP_BINARY_SUFFIX}* || $@ == *${APP_NAME_LC}.so* || $@ == *${APP_NAME_LC}-test* ]]
then
- avformat=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavcodec`
- avcodec=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavformat`
- avfilter=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavfilter`
- avutil=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavutil`
- swscale=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libswscale`
- swresample=`PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libswresample`
+ avformat=`PKG_CONFIG_SYSROOT_DIR=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavcodec`
+ avcodec=`PKG_CONFIG_SYSROOT_DIR=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavformat`
+ avfilter=`PKG_CONFIG_SYSROOT_DIR=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavfilter`
+ avutil=`PKG_CONFIG_SYSROOT_DIR=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libavutil`
+ swscale=`PKG_CONFIG_SYSROOT_DIR=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libswscale`
+ swresample=`PKG_CONFIG_SYSROOT_DIR=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR} PKG_CONFIG_PATH=${CMAKE_BINARY_DIR}/${CORE_BUILD_DIR}/lib/pkgconfig ${PKG_CONFIG_EXECUTABLE} --libs --static libswresample`
gnutls=`PKG_CONFIG_PATH=${DEPENDS_PATH}/lib/pkgconfig/ ${PKG_CONFIG_EXECUTABLE} --libs-only-l --static --silence-errors gnutls`
$@ $avcodec $avformat $avcodec $avfilter $swscale $swresample -lpostproc $gnutls
else
diff --git a/tools/depends/target/ffmpeg/CMakeLists.txt b/tools/depends/target/ffmpeg/CMakeLists.txt
index fda6b0cac4..af3afa6b60 100644
--- a/tools/depends/target/ffmpeg/CMakeLists.txt
+++ b/tools/depends/target/ffmpeg/CMakeLists.txt
@@ -13,7 +13,7 @@
if(CROSSCOMPILING)
set(pkgconf "PKG_CONFIG_LIBDIR=${DEPENDS_PATH}/lib/pkgconfig")
list(APPEND ffmpeg_conf --pkg-config=${PKG_CONFIG_EXECUTABLE} --pkg-config-flags=--static)
- list(APPEND ffmpeg_conf --enable-cross-compile --cpu=${CPU} --arch=${CPU} --target-os=${OS})
+ list(APPEND ffmpeg_conf --enable-cross-compile --arch=${CPU} --target-os=${OS})
list(APPEND ffmpeg_conf --ar=${CMAKE_AR} --strip=${CMAKE_STRIP})
message(STATUS "CROSS: ${ffmpeg_conf}")
endif()