package/kodi: switch to internal ffmpeg version 3.1.11 build
PATCH v2 1/1 package/kodi: switch to internal ffmpeg version 3.1.11 build
Kodi 17 is incompatible with ffmpeg-4.x. To prepare the ffmpeg bump we switch the current Kodi package to internally build and statically link to patched ffmpeg-3.1.11 provided by upstream. Gnutls is added as dependency to allow playback of https streams.
Upstream expects Kodi 17 to be used with ffmpeg 3.1.x (see upstream PR 12368) so we choose the upstream way to build ffmpeg instead of provi- ding a version choice for ffmpeg in buildroot.
This commit can be reverted when Kodi is bumped to version 18, currently released as alpha3.
---
v2:
- git-formatted patches (Thomas)
- fixed pkgconf problem by adding PKG_CONFIG_SYSROOT_DIR instead of using /usr/bin/pkg-config (Thomas)
- added upstream patch to fix ffmpeg build error on mips
Current output of test-pkg -a:
armv5-ctng-linux-gnueabi [ 1/47]: OK
armv7-ctng-linux-gnueabihf [ 2/47]: OK
br-aarch64-glibc [ 3/47]: OK
br-arcle-hs38 [ 4/47]: OK
br-arm-basic [ 5/47]: SKIPPED
br-arm-cortex-a9-glibc [ 6/47]: OK
br-arm-cortex-a9-musl [ 7/47]: SKIPPED
br-arm-cortex-m4-full [ 8/47]: SKIPPED
br-arm-full [ 9/47]: OK
br-arm-full-nothread [10/47]: SKIPPED
br-arm-full-static [11/47]: SKIPPED
br-i386-pentium4-full [12/47]: OK
br-i386-pentium-mmx-musl [13/47]: SKIPPED
br-m68k-5208-full [14/47]: SKIPPED
br-m68k-68040-full [15/47]: SKIPPED
br-microblazeel-full [16/47]: SKIPPED
br-mips32r6-el-hf-glibc [17/47]: OK
br-mips64-n64-full [18/47]: OK.../kodi/0004-Fix-ffmpeg-build-for-mips.patch | 43 ++++++++++ .../kodi/0005-Fix-crosscompiling-issues.patch | 81 +++++++++++++++++++ package/kodi/Config.in | 7 +- package/kodi/kodi.hash | 2 + package/kodi/kodi.mk | 16 ++-- 5 files changed, 138 insertions(+), 11 deletions(-) create mode 100644 package/kodi/0004-Fix-ffmpeg-build-for-mips.patch create mode 100644 package/kodi/0005-Fix-crosscompiling-issues.patch
package/kodi/0004-Fix-ffmpeg-build-for-mips.patch new file +43 -0
@@ -0,0 +1,43 @@ +From e3882a7d6c2e47731c0435d0faa3594041d58a2c Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +Date: Sun, 12 Aug 2018 15:12:29 +0200 +Subject: [PATCH] Fix ffmpeg build for mips + +Backported from upstream master branch: +https://github.com/xbmc/xbmc/commit/71e09dd1ac66059e31e6240352da7091d820ef83 + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + tools/depends/target/ffmpeg/CMakeLists.txt | 2 +- + tools/depends/target/ffmpeg/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/depends/target/ffmpeg/CMakeLists.txt b/tools/depends/target/ffmpeg/CMakeLists.txt +index 0a9e9d38ea..fda6b0cac4 100644 +--- a/tools/depends/target/ffmpeg/CMakeLists.txt ++++ b/tools/depends/target/ffmpeg/CMakeLists.txt +@@ -63,7 +63,7 @@ endif() + if(CPU MATCHES arm OR CORE_SYSTEM_NAME STREQUAL rbpi) + list(APPEND ffmpeg_conf --enable-pic --disable-armv5te --disable-armv6t2) + elseif(CPU MATCHES mips) +- list(APPEND ffmpeg_conf --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2) ++ list(APPEND ffmpeg_conf --disable-mips32r2 --disable-mipsdsp --disable-mipsdspr2) + endif() + + find_package(GnuTls) +diff --git a/tools/depends/target/ffmpeg/Makefile b/tools/depends/target/ffmpeg/Makefile +index ea1113d293..098f6c0c14 100644 +--- a/tools/depends/target/ffmpeg/Makefile ++++ b/tools/depends/target/ffmpeg/Makefile +@@ -58,7 +58,7 @@ ifeq ($(findstring arm, $(CPU)), arm) + ffmpg_config += --enable-pic --disable-armv5te --disable-armv6t2 + endif + ifeq ($(findstring mips, $(CPU)), mips) +- ffmpg_config += --disable-mips32r2 --disable-mipsdspr1 --disable-mipsdspr2 ++ ffmpg_config += --disable-mips32r2 --disable-mipsdsp --disable-mipsdspr2 + endif + ifeq ($(Configuration), Release) + ffmpg_config += --disable-debug +-- +2.18.0 +
package/kodi/0005-Fix-crosscompiling-issues.patch new file +81 -0
81 lines not on this page · raw message
package/kodi/Config.in +2 -5
@@ -40,19 +40,16 @@ menuconfig BR2_PACKAGE_KODI depends on !BR2_TOOLCHAIN_USES_MUSL depends on BR2_PACKAGE_KODI_EGL_GLES || BR2_PACKAGE_KODI_GL_EGL depends on BR2_USE_WCHAR - depends on !BR2_STATIC_LIBS # python and others + depends on !BR2_STATIC_LIBS # gnutls, python and others depends on BR2_PACKAGE_KODI_ARCH_SUPPORTS depends on BR2_PACKAGE_PYTHON depends on !BR2_PACKAGE_PYTHON_PYC_ONLY select BR2_NEEDS_HOST_JAVA select BR2_PACKAGE_BZIP2 select BR2_PACKAGE_EXPAT - select BR2_PACKAGE_FFMPEG - select BR2_PACKAGE_FFMPEG_GPL - select BR2_PACKAGE_FFMPEG_POSTPROC # postproc depends on GPL - select BR2_PACKAGE_FFMPEG_SWSCALE select BR2_PACKAGE_FONTCONFIG select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_GNUTLS select BR2_PACKAGE_LIBASS select BR2_PACKAGE_LIBCDIO select BR2_PACKAGE_LIBCROSSGUID
package/kodi/kodi.hash +2 -0
@@ -1,5 +1,7 @@ # Locally computed sha256 c8312fe92e5bab1cdac1da93d60baed88fa1574146c50c44e3c86d01671c2b1d kodi-17.6-Krypton.tar.gz +# Locally computed - ffmpeg +sha256 7df8bce40765b39de5766ca9d08b5b9ac1f498c65c805c989461b907cee6b7c0 3.1.11-Krypton-17.5.tar.gz # Locally computed - libdvdcss sha256 b6eb2d929ff56cb051152c32010afc5e7cf5fe8c5ae32dca412a2b46b6b57e34 2f12236.tar.gz # Locally computed - libdvdnav
package/kodi/kodi.mk +10 -6
@@ -15,9 +15,9 @@ KODI_INSTALL_STAGING = YES KODI_DEPENDENCIES = \ bzip2 \ expat \ - ffmpeg \ fontconfig \ freetype \ + gnutls \ host-gawk \ host-gperf \ host-kodi-jsonschemabuilder \
@@ -47,11 +47,15 @@ KODI_DEPENDENCIES = \ KODI_SUBDIR = project/cmake +# taken from tools/depends/target/ffmpeg/FFMPEG-VERSION +KODI_FFMPEG_VERSION = 3.1.11-Krypton-17.5 +KODI_EXTRA_DOWNLOADS += \ + https://github.com/xbmc/FFmpeg/archive/$(KODI_FFMPEG_VERSION).tar.gz \ + KODI_LIBDVDCSS_VERSION = 2f12236 KODI_LIBDVDNAV_VERSION = 981488f KODI_LIBDVDREAD_VERSION = 17d99db - -KODI_EXTRA_DOWNLOADS = \ +KODI_EXTRA_DOWNLOADS += \ https://github.com/xbmc/libdvdcss/archive/$(KODI_LIBDVDCSS_VERSION).tar.gz \ https://github.com/xbmc/libdvdnav/archive/$(KODI_LIBDVDNAV_VERSION).tar.gz \ https://github.com/xbmc/libdvdread/archive/$(KODI_LIBDVDREAD_VERSION).tar.gz
@@ -62,12 +66,12 @@ KODI_CONF_OPTS += \ -DENABLE_CCACHE=OFF \ -DENABLE_DVDCSS=ON \ -DENABLE_INTERNAL_CROSSGUID=OFF \ - -DENABLE_INTERNAL_FFMPEG=OFF \ + -DENABLE_INTERNAL_FFMPEG=ON \ + -DFFMPEG_URL=$(KODI_DL_DIR)/$(KODI_FFMPEG_VERSION).tar.gz \ -DKODI_DEPENDSBUILD=OFF \ -DENABLE_OPENSSL=ON \ -DNATIVEPREFIX=$(HOST_DIR) \ - -DDEPENDS_PATH=$(@D) \ - -DWITH_FFMPEG=$(STAGING_DIR)/usr \ + -DDEPENDS_PATH=$(STAGING_DIR)/usr \ -DWITH_TEXTUREPACKER=$(HOST_DIR)/bin/TexturePacker \ -DLIBDVDCSS_URL=$(KODI_DL_DIR)/$(KODI_LIBDVDCSS_VERSION).tar.gz \ -DLIBDVDNAV_URL=$(KODI_DL_DIR)/$(KODI_LIBDVDNAV_VERSION).tar.gz \
Signature · 1 line
2.18.0
Thomas Petazzoni
AppliedPATCH v2 1/1 package/kodi: switch to internal ffmpeg version 3.1.11 build
Hello,
Quoted 12 lines · Bernd Kuhls
Kodi 17 is incompatible with ffmpeg-4.x. To prepare the ffmpeg bump we switch the current Kodi package to internally build and statically link to patched ffmpeg-3.1.11 provided by upstream. Gnutls is added as dependency to allow playback of https streams.
Upstream expects Kodi 17 to be used with ffmpeg 3.1.x (see upstream PR 12368) so we choose the upstream way to build ffmpeg instead of provi- ding a version choice for ffmpeg in buildroot.
This commit can be reverted when Kodi is bumped to version 18, currently released as alpha3.
Quoted 7 lines
Signed-off-by Bernd Kuhls <[email protected]>---
v2:
- git-formatted patches (Thomas)
- fixed pkgconf problem by addingPKG_CONFIG_SYSROOT_DIRinstead of using/usr/bin/pkg-config(Thomas)
- added upstream patch to fix ffmpeg build error on mips
Applied to next, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 1/1 package/kodi: switch to internal ffmpeg version 3.1.11 build
In reply to Bernd KuhlsHello,
package/kodi/kodi.mk KODI_DEPENDENCIES = \ · line 53
Quoted 4 lines · Bernd Kuhls
package/kodi/kodi.mk +4
-0+# taken from tools/depends/target/ffmpeg/FFMPEG-VERSION +KODI_FFMPEG_VERSION = 3.1.11-Krypton-17.5 +KODI_EXTRA_DOWNLOADS += \ + https://github.com/xbmc/FFmpeg/archive/$(KODI_FFMPEG_VERSION).tar.gz \
There was a trailing backslash on this line, which check-package didn't like, so I fixed that in a follow-up commit.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com