diff options
Diffstat (limited to 'meta/recipes-multimedia/ffmpeg')
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch | 21 | ||||
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch | 32 | ||||
-rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.bb (renamed from meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.2.bb) | 100 |
3 files changed, 71 insertions, 82 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch index 3b503c49c9..7d0a06f85b 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavutil-include-assembly-with-full-path-from-sourc.patch @@ -1,4 +1,4 @@ -From 24a58d70cbb3997e471366bd5afe54be9007bfb1 Mon Sep 17 00:00:00 2001 +From 4a891e1eddbf63f32fe769b5bff289f6748abf45 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Tue, 10 Nov 2020 15:32:14 +0000 Subject: [PATCH] libavutil: include assembly with full path from source root @@ -6,8 +6,9 @@ Subject: [PATCH] libavutil: include assembly with full path from source root Otherwise nasm writes the full host-specific paths into .o output, which breaks binary reproducibility. -Upstream-Status: Pending +Upstream-Status: Submitted [http://ffmpeg.org/pipermail/ffmpeg-devel/2022-January/291781.html] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> + --- libavutil/x86/cpuid.asm | 2 +- libavutil/x86/emms.asm | 2 +- @@ -15,7 +16,8 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> libavutil/x86/float_dsp.asm | 2 +- libavutil/x86/lls.asm | 2 +- libavutil/x86/pixelutils.asm | 2 +- - 6 files changed, 6 insertions(+), 6 deletions(-) + libavutil/x86/tx_float.asm | 2 +- + 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libavutil/x86/cpuid.asm b/libavutil/x86/cpuid.asm index c3f7866..766f77f 100644 @@ -95,3 +97,16 @@ index 36c57c5..8b45ead 100644 SECTION .text +diff --git a/libavutil/x86/tx_float.asm b/libavutil/x86/tx_float.asm +index 4d2283f..ea39f21 100644 +--- a/libavutil/x86/tx_float.asm ++++ b/libavutil/x86/tx_float.asm +@@ -29,7 +29,7 @@ + ; replace some shuffles with vblends? + ; avx512 split-radix + +-%include "x86util.asm" ++%include "libavutil/x86/x86util.asm" + + %if ARCH_X86_64 + %define ptr resq diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch deleted file mode 100644 index 69429af8f0..0000000000 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg/mips64_cpu_detection.patch +++ /dev/null @@ -1,32 +0,0 @@ -It will add -mips64r6 and -mips64r2 to cmdline which will -cause conflicts - -in OE we user mips32r2 and mips64r2 for mips arch versions -so there is no benefit of detecting it automatically by -poking at tools especially in cross env - -Fixes errors like - -linking -mnan=2008 module with previous -mnan=legacy modules -failed to merge target specific data of file - --Khem -Upstream-Status: Inappropriate [OE-Specific] - -Index: ffmpeg-3.1.1/configure -=================================================================== ---- ffmpeg-3.1.1.orig/configure -+++ ffmpeg-3.1.1/configure -@@ -5220,12 +5220,9 @@ elif enabled mips; then - - # Enable minimum ISA based on selected options - if enabled mips64; then -- enabled mips64r6 && check_inline_asm_flags mips64r6 '"dlsa $0, $0, $0, 1"' '-mips64r6' - enabled mips64r2 && check_inline_asm_flags mips64r2 '"dext $0, $0, 0, 1"' '-mips64r2' - disabled mips64r6 && disabled mips64r2 && check_inline_asm_flags mips64r1 '"daddi $0, $0, 0"' '-mips64' - else -- enabled mips32r6 && check_inline_asm_flags mips32r6 '"aui $0, $0, 0"' '-mips32r6' -- enabled mips32r5 && check_inline_asm_flags mips32r5 '"eretnc"' '-mips32r5' - enabled mips32r2 && check_inline_asm_flags mips32r2 '"ext $0, $0, 0, 1"' '-mips32r2' - disabled mips32r6 && disabled mips32r5 && disabled mips32r2 && check_inline_asm_flags mips32r1 '"addi $0, $0, 0"' '-mips32' - fi diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.2.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.bb index 08be38ca50..96eef5e0fe 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_4.3.2.bb +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.bb @@ -5,17 +5,16 @@ DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encod HOMEPAGE = "https://www.ffmpeg.org/" SECTION = "libs" -LICENSE = "BSD & GPLv2+ & LGPLv2.1+ & MIT" -LICENSE_${PN} = "GPLv2+" -LICENSE_libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE_libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE_libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE_libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE_libavresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE_libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE_libpostproc = "GPLv2+" -LICENSE_libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" -LICENSE_libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPLv2+', 'LGPLv2.1+', d)}" +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & ISC & MIT & BSD-2-Clause & BSD-3-Clause & IJG" +LICENSE:${PN} = "GPL-2.0-or-later" +LICENSE:libavcodec = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavdevice = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavfilter = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavformat = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libavutil = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libpostproc = "GPL-2.0-or-later" +LICENSE:libswresample = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" +LICENSE:libswscale = "${@bb.utils.contains('PACKAGECONFIG', 'gpl', 'GPL-2.0-or-later', 'LGPL-2.1-or-later', d)}" LICENSE_FLAGS = "commercial" LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ @@ -24,15 +23,14 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ - file://mips64_cpu_detection.patch \ file://0001-libavutil-include-assembly-with-full-path-from-sourc.patch \ " -SRC_URI[sha256sum] = "46e4e64f1dd0233cbc0934b9f1c0da676008cad34725113fb7f802cfa84ccddb" +SRC_URI[sha256sum] = "51e919f7d205062c0fd4fae6243a84850391115104ccf1efc451733bc0ac7298" # Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" -ARM_INSTRUCTION_SET_armv6 = "arm" +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" +ARM_INSTRUCTION_SET:armv6 = "arm" # Should be API compatible with libav (which was a fork of ffmpeg) # libpostproc was previously packaged from a separate recipe @@ -42,7 +40,7 @@ DEPENDS = "nasm-native" inherit autotools pkgconfig -PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc avresample \ +PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \ alsa bzlib lzma pic pthreads shared theora zlib \ ${@bb.utils.contains('AVAILTUNES', 'mips32r2', 'mips32r2', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}" @@ -55,7 +53,6 @@ PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat" PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample" PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale" PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" -PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample" # features to support PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" @@ -65,6 +62,7 @@ PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk- PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" +PACKAGECONFIG[libopus] = "--enable-libopus,--disable-libopus,libopus" PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz" PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk" @@ -104,15 +102,15 @@ EXTRA_OECONF = " \ \ --cross-prefix=${TARGET_PREFIX} \ \ - --ld="${CCLD}" \ - --cc="${CC}" \ - --cxx="${CXX}" \ + --ld='${CCLD}' \ + --cc='${CC}' \ + --cxx='${CXX}' \ --arch=${TARGET_ARCH} \ - --target-os="linux" \ + --target-os='linux' \ --enable-cross-compile \ - --extra-cflags="${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ - --extra-ldflags="${LDFLAGS}" \ - --sysroot="${STAGING_DIR_TARGET}" \ + --extra-cflags='${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}' \ + --extra-ldflags='${LDFLAGS}' \ + --sysroot='${STAGING_DIR_TARGET}' \ ${EXTRA_FFCONF} \ --libdir=${libdir} \ --shlibdir=${libdir} \ @@ -121,11 +119,22 @@ EXTRA_OECONF = " \ --pkg-config=pkg-config \ " -EXTRA_OECONF_append_linux-gnux32 = " --disable-asm" +EXTRA_OECONF:append:linux-gnux32 = " --disable-asm" + +EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}" +EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}" +EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', '--disable-mips64r6 --disable-mips32r6', '', d)}" +EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mips32r6', '--disable-mips64r2 --disable-mips32r2', '', d)}" +EXTRA_OECONF:append:mips = " --extra-libs=-latomic --disable-mips32r5 --disable-mipsdsp --disable-mipsdspr2 \ + --disable-loongson2 --disable-loongson3 --disable-mmi --disable-msa" +EXTRA_OECONF:append:riscv32 = " --extra-libs=-latomic" +EXTRA_OECONF:append:armv5 = " --extra-libs=-latomic" +EXTRA_OECONF:append:powerpc = " --extra-libs=-latomic" + # gold crashes on x86, another solution is to --disable-asm but thats more hacky # ld.gold: internal error in relocate_section, at ../../gold/i386.cc:3684 -LDFLAGS_append_x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" +LDFLAGS:append:x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" EXTRA_OEMAKE = "V=1" @@ -134,7 +143,7 @@ do_configure() { } # patch out build host paths for reproducibility -do_compile_prepend_class-target() { +do_compile:prepend:class-target() { sed -i -e "s,${WORKDIR},,g" ${B}/config.h } @@ -142,29 +151,26 @@ PACKAGES =+ "libavcodec \ libavdevice \ libavfilter \ libavformat \ - libavresample \ libavutil \ libpostproc \ libswresample \ libswscale" -FILES_libavcodec = "${libdir}/libavcodec${SOLIBS}" -FILES_libavdevice = "${libdir}/libavdevice${SOLIBS}" -FILES_libavfilter = "${libdir}/libavfilter${SOLIBS}" -FILES_libavformat = "${libdir}/libavformat${SOLIBS}" -FILES_libavresample = "${libdir}/libavresample${SOLIBS}" -FILES_libavutil = "${libdir}/libavutil${SOLIBS}" -FILES_libpostproc = "${libdir}/libpostproc${SOLIBS}" -FILES_libswresample = "${libdir}/libswresample${SOLIBS}" -FILES_libswscale = "${libdir}/libswscale${SOLIBS}" +FILES:libavcodec = "${libdir}/libavcodec${SOLIBS}" +FILES:libavdevice = "${libdir}/libavdevice${SOLIBS}" +FILES:libavfilter = "${libdir}/libavfilter${SOLIBS}" +FILES:libavformat = "${libdir}/libavformat${SOLIBS}" +FILES:libavutil = "${libdir}/libavutil${SOLIBS}" +FILES:libpostproc = "${libdir}/libpostproc${SOLIBS}" +FILES:libswresample = "${libdir}/libswresample${SOLIBS}" +FILES:libswscale = "${libdir}/libswscale${SOLIBS}" # ffmpeg disables PIC on some platforms (e.g. x86-32) -INSANE_SKIP_${MLPREFIX}libavcodec = "textrel" -INSANE_SKIP_${MLPREFIX}libavdevice = "textrel" -INSANE_SKIP_${MLPREFIX}libavfilter = "textrel" -INSANE_SKIP_${MLPREFIX}libavformat = "textrel" -INSANE_SKIP_${MLPREFIX}libavutil = "textrel" -INSANE_SKIP_${MLPREFIX}libavresample = "textrel" -INSANE_SKIP_${MLPREFIX}libswscale = "textrel" -INSANE_SKIP_${MLPREFIX}libswresample = "textrel" -INSANE_SKIP_${MLPREFIX}libpostproc = "textrel" +INSANE_SKIP:${MLPREFIX}libavcodec = "textrel" +INSANE_SKIP:${MLPREFIX}libavdevice = "textrel" +INSANE_SKIP:${MLPREFIX}libavfilter = "textrel" +INSANE_SKIP:${MLPREFIX}libavformat = "textrel" +INSANE_SKIP:${MLPREFIX}libavutil = "textrel" +INSANE_SKIP:${MLPREFIX}libswscale = "textrel" +INSANE_SKIP:${MLPREFIX}libswresample = "textrel" +INSANE_SKIP:${MLPREFIX}libpostproc = "textrel" |