From 51af5f0eb4cddbe6aa7953717873691d77aae9ff Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 10 Jul 2019 23:40:16 +0100 Subject: gentoo resync : 11.07.2019 --- media-video/ffmpeg/Manifest | 4 +- media-video/ffmpeg/ffmpeg-3.4.6-r1.ebuild | 489 +++++++++++++++++++++ media-video/ffmpeg/ffmpeg-4.1.3.ebuild | 2 +- ...mpeg-3.4.6-fix-building-against-fdk-aac-2.patch | 74 ++++ 4 files changed, 567 insertions(+), 2 deletions(-) create mode 100644 media-video/ffmpeg/ffmpeg-3.4.6-r1.ebuild create mode 100644 media-video/ffmpeg/files/ffmpeg-3.4.6-fix-building-against-fdk-aac-2.patch (limited to 'media-video/ffmpeg') diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest index 7eaff08e79e3..d46f7957e139 100644 --- a/media-video/ffmpeg/Manifest +++ b/media-video/ffmpeg/Manifest @@ -1,5 +1,6 @@ AUX chromium-r1.patch 1582 BLAKE2B 48547a7d53fd1f0f44b682c7e2306e79f007f8e96b36253f76775c4a3ced54ffaaf403dfaae94e81aa26c60887677b2dabdd2c5cef9fc4553e203f8259453910 SHA512 808daad5afed13a6d3926c9f9ab5cb58f80e16969533022c7ee959147908bb2c12d066d2125a6b6975ef9304d9b8d49c39aeb0a047009adabb4529e3cf54498f AUX chromium.patch 1420 BLAKE2B 1acf931cd2e635b0b6c2c42d649d1bc92ac59321acc451501c70076d84449fd17b3a95c24a33208994df9aac8f8959a084f0ebaedaf0c997f535008594872bd8 SHA512 1f3f6d08aac64bb8c9d8a974170064b8a3531a6d06cea6fb208439dc687addeaf0c90f7f407dd7e71f50cd524f69c110c92d5276d04fe3bcaf7fb1ff2494ec59 +AUX ffmpeg-3.4.6-fix-building-against-fdk-aac-2.patch 2820 BLAKE2B 05c0dc79d8e34de518625d4dff4c08f529ee85062da9185f1312e3b32ea2577a249cfbd40e665cbc185ca5acb68cf5cdc9891a0454428bc0f2a602491df59589 SHA512 d9918a659e4548f0da6ef5621d8ab2face7e9382e3ac008e47014691aebafd5e7b2f5e059b8fcf41a4a39c2efc408dda0015905f8d7cca874c0104f20327e511 AUX ffmpeg32-openjpeg22.patch 4777 BLAKE2B 4ea7ed6b6b31c6d0d3e99358231ce27f18423aab866ceed75c10bf2c4b514ae4d023f9b0f4dd91346773f2ef2014943a08e6093e53266fa307557da69d766c8b SHA512 0d619b0e353ee9f80dffdb94bedd31b55fb4e6a18a0e60d8ef7119e5012583c1c0531b0b200b41c32caaa71cbade4899f74c9d0ae70d15403ef0aa6f3d77e07d AUX openjpeg22.patch 4770 BLAKE2B b5fd034e2af9d180b2e0ee76e5227fcc948e20bacc5e463c8d7d640db3c3e52dd0f12149e5a095388c3b8db0d7c37bb4080be3141b90fd554c46aa4650585b27 SHA512 8a198910cdf43df83fdf50e372c2ec5d911637dd61768d5ac3a1984f99d1f374f594af9ff6c501b248c390a22898e4964f7d07c81eb3586fa1bebad2c9e00730 AUX openjpeg23.patch 5105 BLAKE2B 64aab97ec21e44f7ab94c9513ebf63e60a76698889ed3cafebec3a25adb07dddffe9358c4c3b29f89b0d0b4c8bb54d9197a5b8ca2e4105c539fd6b513ad5c247 SHA512 a1e3b91add49a80633e19eb49870ecb7ef1493cf3503d121bdeb74f2fcd0320b8e5f04a3505241f7375f4a598f5da651afb92350e3b92412977f55b9193409a7 @@ -19,9 +20,10 @@ EBUILD ffmpeg-3.3.4.ebuild 15808 BLAKE2B c64f1cd480d0bf2e8834073571f40eef01093b6 EBUILD ffmpeg-3.3.6.ebuild 15809 BLAKE2B b78701e736d5b1a8c029bbbec3c5ce40356223c35e78e160cb93a3e30732441abe1a14ab5940d302556abffde9d798de3ad160a98cd274334d467b0e9ba5de80 SHA512 b71dfc45bf7e29e8a5e70402c1dccfe2148223e60a1270a58918c3c3486472193e269e81cd8a1074a792b12b3d24d7a8733f62e3ef5002689d46ce9ce588f605 EBUILD ffmpeg-3.3.8.ebuild 15815 BLAKE2B 2bce668121996c1bbdf472dcede998450fa4b53b36dfa25ef62b1eaa988cb6b7f8ab216ef29ebefae026ee06b9d4ad001ecb90076efb61e1c6bbaff9b09dce1f SHA512 8650a978d1283d35f37b549e937f9c04cdc860540f7e7ee1871c07b21c13c3c165322075dd00ffbbeaf629d2c79b445b0fd715ae88fba3e59b0fd217b4c3dc72 EBUILD ffmpeg-3.4.5.ebuild 15589 BLAKE2B 4c0a74578c7e93f007e149a0874a3bde915d5037f9d7ae038eaae815b86254341045bb4d730ae0726c09b61c50622544afb548776476e8d7118b9c64dbc8c6f3 SHA512 e71404901e95550401dc6a0a58e74778327d7a0f32d154ea05e6e5537e5ce629bed613bf9c7a4d6844e501231e1775d8005846ad8698c03e7028f6661c06ce70 +EBUILD ffmpeg-3.4.6-r1.ebuild 15660 BLAKE2B ae3b4da3da992fdb606850366282f68c813556cc5c4b31d48b670c1cf9fa525d4ede9cc43c50548b64d74ee0226364e2091c2162932fd35ab16e6ee8ad7c0a2e SHA512 704a0c1afa0dca84fa781730e9d91d54c177ec620cd657ba51ee3254ca9bd82bb7a4dc6e5edca4ddfba17813b4c88ed3569a6aa83a77b7b7b021e375ff50b98d EBUILD ffmpeg-3.4.6.ebuild 15588 BLAKE2B d49f5b8411ee48a41af83136a8f0ec673f4feb3a13e194d72716c5d220b929688ff1bb20555091ee113546669ba385df7d1cd880fb724556f90420bffcdb00c7 SHA512 8497f50238398bb270e20bf3a896c95fac17ffae62482d3475aa28df27f7ac23c5d230a0a68de089a9f3230826345cbf9b12cd38a2f6fdbdf76b533fa50b1d84 EBUILD ffmpeg-4.1.1.ebuild 17072 BLAKE2B 4e3d25a7b01920c2e89740ef5847b3f99aa283e8926efcb641687ce9064f69aac5a25132f1295fd0c1dd1dff0f532d12acda72acaf09671549adb8d626266229 SHA512 3e2f5362b30dc2dc9a14356887304af89768774efb3025c4af7276da03ee75ae0a0ed85afd43c0a04b59c687aee901eba4db868720d130b0e282d25324e77977 EBUILD ffmpeg-4.1.2.ebuild 17072 BLAKE2B 4e3d25a7b01920c2e89740ef5847b3f99aa283e8926efcb641687ce9064f69aac5a25132f1295fd0c1dd1dff0f532d12acda72acaf09671549adb8d626266229 SHA512 3e2f5362b30dc2dc9a14356887304af89768774efb3025c4af7276da03ee75ae0a0ed85afd43c0a04b59c687aee901eba4db868720d130b0e282d25324e77977 -EBUILD ffmpeg-4.1.3.ebuild 17070 BLAKE2B c04bc55b090d81d9a587a18a19f0518306d65c17255999c8e63c5aa2c9e10b10088b88ad9a549c0576ea33750b5654efecee70ec75017eb2ff8ce542937504e5 SHA512 6d818dafb8835ded68e62fb810e591e41668a21d0a0bd6f0b8d1789df78c9eaf9c47ebc31545ea9ae46c25ced1c93a7164743ff172284e8c8b10fce091970d90 +EBUILD ffmpeg-4.1.3.ebuild 17069 BLAKE2B 9bd743bce0fbe0a31076f8918449a655d40b05bdbb4d1aebbeda7faf005bd868435514feea267a38d58d59c52cf728a3d2ecd80e9cbecb02dc3d4d3c7ac8aa1e SHA512 577f0103c4201cef03cd5a8492f82767b824fb6bb985ad00e3270c45ac5357515456952c4ce79d1a6c51bcc8fd0ffbd795b0ed7aff2c8a2a987714927d49d8af EBUILD ffmpeg-9999.ebuild 17208 BLAKE2B 0c9c9bbbdf2238d995008d6ac8f6a357993abd976958738747edca1e966caabf6dd5816a70c9da34072157fe08b3fad6b04bf2cc65cfe5a548144d968a116938 SHA512 b6e99a8d554b18afc5719468f80d46b5d6a1f3e71ec1c68beb17797f3c7ef301418afdbf9f365db554617564b290d3596e1ad0e355b4b08da47f76c747ad9aec MISC metadata.xml 5992 BLAKE2B 640b4b6e9904cc8653cd5c7788cbd5b0b48579e7a87fdd58b98e5ad88d3e34f05aa181a89830aabca4f9262c1ce9e07ed1b1c323352d40b1da6800b5e0e41fe7 SHA512 542bf49855f46b3391a9061b3c5e8c025ea5fb67af6046f0aa2bd6fb5cdf17bff92d5c2fea181f7e2f7dffb84452f8876ed8ef744b41b7828d0188ce57b184ae diff --git a/media-video/ffmpeg/ffmpeg-3.4.6-r1.ebuild b/media-video/ffmpeg/ffmpeg-3.4.6-r1.ebuild new file mode 100644 index 000000000000..dcd142fdee87 --- /dev/null +++ b/media-video/ffmpeg/ffmpeg-3.4.6-r1.ebuild @@ -0,0 +1,489 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +# Subslot: libavutil major.libavcodec major.libavformat major +# Since FFmpeg ships several libraries, subslot is kind of limited here. +# Most consumers will use those three libraries, if a "less used" library +# changes its soname, consumers will have to be rebuilt the old way +# (preserve-libs). +# If, for example, a package does not link to libavformat and only libavformat +# changes its ABI then this package will be rebuilt needlessly. Hence, such a +# package is free _not_ to := depend on FFmpeg but I would strongly encourage +# doing so since such a case is unlikely. +FFMPEG_SUBSLOT=55.57.57 + +SCM="" +if [ "${PV#9999}" != "${PV}" ] ; then + SCM="git-r3" + EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git" +fi + +inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM} + +DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec" +HOMEPAGE="http://ffmpeg.org/" +if [ "${PV#9999}" != "${PV}" ] ; then + SRC_URI="" +elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot + SRC_URI="mirror://gentoo/${P}.tar.bz2" +else # Release + SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2" +fi +FFMPEG_REVISION="${PV#*_p}" + +SLOT="0/${FFMPEG_SUBSLOT}" +LICENSE=" + !gpl? ( LGPL-2.1 ) + gpl? ( GPL-2 ) + amr? ( + gpl? ( GPL-3 ) + !gpl? ( LGPL-3 ) + ) + gmp? ( + gpl? ( GPL-3 ) + !gpl? ( LGPL-3 ) + ) + encode? ( + amrenc? ( + gpl? ( GPL-3 ) + !gpl? ( LGPL-3 ) + ) + ) + samba? ( GPL-3 ) +" +if [ "${PV#9999}" = "${PV}" ] ; then + KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" +fi + +# Options to use as use_enable in the foo[:bar] form. +# This will feed configure with $(use_enable foo bar) +# or $(use_enable foo foo) if no :bar is set. +# foo is added to IUSE. +FFMPEG_FLAG_MAP=( + +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt gnutls gmp + +gpl +hardcoded-tables +iconv lzma +network opencl openssl +postproc + samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau X:xlib xcb:libxcb + xcb:libxcb-shm xcb:libxcb-xfixes +zlib + # libavdevice options + cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal + opengl + # indevs + libv4l:libv4l2 pulseaudio:libpulse libdrm + # decoders + amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac + jpeg2k:libopenjpeg bluray:libbluray gme:libgme gsm:libgsm + mmal modplug:libmodplug opus:libopus libilbc librtmp ssh:libssh + speex:libspeex svg:librsvg vorbis:libvorbis + vpx:libvpx zvbi:libzvbi + # libavfilter options + appkit + bs2b:libbs2b chromaprint flite:libflite frei0r + fribidi:libfribidi fontconfig ladspa libass truetype:libfreetype + rubberband:librubberband zeromq:libzmq zimg:libzimg + # libswresample options + libsoxr + # Threads; we only support pthread for now but ffmpeg supports more + +threads:pthreads +) + +# Same as above but for encoders, i.e. they do something only with USE=encode. +FFMPEG_ENCODER_FLAG_MAP=( + amrenc:libvo-amrwbenc mp3:libmp3lame + kvazaar:libkvazaar nvenc:nvenc + openh264:libopenh264 snappy:libsnappy theora:libtheora twolame:libtwolame + wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265 xvid:libxvid +) + +IUSE=" + alsa chromium doc +encode jack oss pic static-libs test v4l + ${FFMPEG_FLAG_MAP[@]%:*} + ${FFMPEG_ENCODER_FLAG_MAP[@]%:*} +" + +# Strings for CPU features in the useflag[:configure_option] form +# if :configure_option isn't set, it will use 'useflag' as configure option +ARM_CPU_FEATURES=( + cpu_flags_arm_thumb:armv5te + cpu_flags_arm_v6:armv6 + cpu_flags_arm_thumb2:armv6t2 + cpu_flags_arm_neon:neon + cpu_flags_arm_vfp:vfp + cpu_flags_arm_vfpv3:vfpv3 + cpu_flags_arm_v8:armv8 +) +ARM_CPU_REQUIRED_USE=" + arm64? ( cpu_flags_arm_v8 ) + cpu_flags_arm_v8? ( cpu_flags_arm_vfpv3 cpu_flags_arm_neon ) + cpu_flags_arm_neon? ( cpu_flags_arm_thumb2 cpu_flags_arm_vfp ) + cpu_flags_arm_vfpv3? ( cpu_flags_arm_vfp ) + cpu_flags_arm_thumb2? ( cpu_flags_arm_v6 ) + cpu_flags_arm_v6? ( cpu_flags_arm_thumb ) +" +MIPS_CPU_FEATURES=( mipsdspr1:mipsdsp mipsdspr2 mipsfpu ) +PPC_CPU_FEATURES=( altivec ) +X86_CPU_FEATURES_RAW=( 3dnow:amd3dnow 3dnowext:amd3dnowext aes:aesni avx:avx avx2:avx2 fma3:fma3 fma4:fma4 mmx:mmx mmxext:mmxext sse:sse sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4 sse4_2:sse42 xop:xop ) +X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} ) +X86_CPU_REQUIRED_USE=" + cpu_flags_x86_avx2? ( cpu_flags_x86_avx ) + cpu_flags_x86_fma4? ( cpu_flags_x86_avx ) + cpu_flags_x86_fma3? ( cpu_flags_x86_avx ) + cpu_flags_x86_xop? ( cpu_flags_x86_avx ) + cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 ) + cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 ) + cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 ) + cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 ) + cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 ) + cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 ) + cpu_flags_x86_sse2? ( cpu_flags_x86_sse ) + cpu_flags_x86_sse? ( cpu_flags_x86_mmxext ) + cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx ) + cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow ) + cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx ) +" + +CPU_FEATURES_MAP=( + ${ARM_CPU_FEATURES[@]} + ${MIPS_CPU_FEATURES[@]} + ${PPC_CPU_FEATURES[@]} + ${X86_CPU_FEATURES[@]} +) +IUSE="${IUSE} + ${CPU_FEATURES_MAP[@]%:*}" + +CPU_REQUIRED_USE=" + ${ARM_CPU_REQUIRED_USE} + ${X86_CPU_REQUIRED_USE} +" + +FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher ) +IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}" + +RDEPEND=" + alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) + amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] ) + bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] ) + bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] ) + bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) + cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] ) + chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] ) + encode? ( + amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] ) + kvazaar? ( media-libs/kvazaar[${MULTILIB_USEDEP}] ) + mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] ) + nvenc? ( media-video/nvidia_video_sdk ) + openh264? ( >=media-libs/openh264-1.4.0-r1[${MULTILIB_USEDEP}] ) + snappy? ( >=app-arch/snappy-1.1.2-r1:=[${MULTILIB_USEDEP}] ) + theora? ( + >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}] + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] + ) + twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] ) + wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] ) + webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] ) + x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] ) + x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] ) + xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] ) + ) + fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] ) + flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] ) + fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] ) + frei0r? ( media-plugins/frei0r-plugins ) + fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] ) + gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] ) + gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] ) + gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] ) + gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] ) + gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] ) + iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] ) + iec61883? ( + >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}] + >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] + >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}] + ) + ieee1394? ( + >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}] + >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}] + ) + jack? ( virtual/jack[${MULTILIB_USEDEP}] ) + jpeg2k? ( >=media-libs/openjpeg-2:2[${MULTILIB_USEDEP}] ) + libass? ( >=media-libs/libass-0.10.2:=[${MULTILIB_USEDEP}] ) + libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] ) + libdrm? ( x11-libs/libdrm[${MULTILIB_USEDEP}] ) + libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] ) + libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] ) + libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] ) + lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] ) + mmal? ( media-libs/raspberrypi-userland ) + modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] ) + openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] ) + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) + opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] ) + openssl? ( >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] ) + opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] ) + pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] ) + librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] ) + rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] ) + samba? ( >=net-fs/samba-3.6.23-r1[client,${MULTILIB_USEDEP}] ) + sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] ) + speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] ) + ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] ) + svg? ( gnome-base/librsvg:2=[${MULTILIB_USEDEP}] ) + truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] ) + vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] ) + vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] ) + vorbis? ( + >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}] + >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}] + ) + vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] ) + X? ( + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] + >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] + >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}] + ) + xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] ) + zeromq? ( >=net-libs/zeromq-4.1.6 ) + zimg? ( >=media-libs/zimg-2.4:=[${MULTILIB_USEDEP}] ) + zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] ) + zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] ) + !media-video/qt-faststart + postproc? ( !media-libs/libpostproc ) +" + +DEPEND="${RDEPEND} + >=sys-devel/make-3.81 + doc? ( sys-apps/texinfo ) + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] + ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] ) + cpu_flags_x86_mmx? ( || ( >=dev-lang/nasm-2.13 >=dev-lang/yasm-1.3 ) ) + test? ( net-misc/wget sys-devel/bc ) + v4l? ( sys-kernel/linux-headers ) +" + +# Code requiring FFmpeg to be built under gpl license +GPL_REQUIRED_USE=" + postproc? ( gpl ) + frei0r? ( gpl ) + cdio? ( gpl ) + samba? ( gpl ) + encode? ( + x264? ( gpl ) + x265? ( gpl ) + xvid? ( gpl ) + X? ( !xcb? ( gpl ) ) + ) +" +REQUIRED_USE=" + libv4l? ( v4l ) + fftools_cws2fws? ( zlib ) + test? ( encode ) + ${GPL_REQUIRED_USE} + ${CPU_REQUIRED_USE}" +RESTRICT=" + gpl? ( openssl? ( bindist ) fdk? ( bindist ) ) +" + +S=${WORKDIR}/${P/_/-} + +PATCHES=( + "${FILESDIR}"/chromium.patch + "${FILESDIR}"/${PN}-3.4.6-fix-building-against-fdk-aac-2.patch #682890 +) + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/libavutil/avconfig.h +) + +src_prepare() { + if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot + export revision=git-N-${FFMPEG_REVISION} + fi + default + echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die +} + +multilib_src_configure() { + local myconf=( ${EXTRA_FFMPEG_CONF} ) + + local ffuse=( "${FFMPEG_FLAG_MAP[@]}" ) + use openssl && use gpl && myconf+=( --enable-nonfree ) + use samba && myconf+=( --enable-version3 ) + + # Encoders + if use encode ; then + ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" ) + + # Licensing. + if use amrenc ; then + myconf+=( --enable-version3 ) + fi + else + myconf+=( --disable-encoders ) + fi + + # Indevs + use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 ) + for i in alsa oss jack ; do + use ${i} || myconf+=( --disable-indev=${i} ) + done + + # Outdevs + for i in alsa oss sdl ; do + use ${i} || myconf+=( --disable-outdev=${i} ) + done + + # Decoders + use amr && myconf+=( --enable-version3 ) + use gmp && myconf+=( --enable-version3 ) + use fdk && use gpl && myconf+=( --enable-nonfree ) + + for i in "${ffuse[@]#+}" ; do + myconf+=( $(use_enable ${i%:*} ${i#*:}) ) + done + + # (temporarily) disable non-multilib deps + if ! multilib_is_native_abi; then + for i in frei0r libzmq ; do + myconf+=( --disable-${i} ) + done + fi + + # CPU features + for i in "${CPU_FEATURES_MAP[@]}" ; do + use ${i%:*} || myconf+=( --disable-${i#*:} ) + done + + if use pic ; then + myconf+=( --enable-pic ) + # disable asm code if PIC is required + # as the provided asm decidedly is not PIC for x86. + [[ ${ABI} == x86 ]] && myconf+=( --disable-asm ) + fi + [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004 + + # Try to get cpu type based on CFLAGS. + # Bug #172723 + # We need to do this so that features of that CPU will be better used + # If they contain an unknown CPU it will not hurt since ffmpeg's configure + # will just ignore it. + for i in $(get-flag mcpu) $(get-flag march) ; do + [[ ${i} = native ]] && i="host" # bug #273421 + myconf+=( --cpu=${i} ) + break + done + + # LTO support, bug #566282 + is-flagq "-flto*" && myconf+=( "--enable-lto" ) + + # Mandatory configuration + myconf=( + --enable-avfilter + --enable-avresample + --disable-stripping + --disable-libcelt # bug #664158 + "${myconf[@]}" + ) + + # cross compile support + if tc-is-cross-compiler ; then + myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- --host-cc="$(tc-getBUILD_CC)" ) + case ${CHOST} in + *freebsd*) + myconf+=( --target-os=freebsd ) + ;; + *mingw32*) + myconf+=( --target-os=mingw32 ) + ;; + *linux*) + myconf+=( --target-os=linux ) + ;; + esac + fi + + # doc + myconf+=( + $(multilib_native_use_enable doc) + $(multilib_native_use_enable doc htmlpages) + $(multilib_native_enable manpages) + ) + + set -- "${S}/configure" \ + --prefix="${EPREFIX}/usr" \ + --libdir="${EPREFIX}/usr/$(get_libdir)" \ + --shlibdir="${EPREFIX}/usr/$(get_libdir)" \ + --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ + --mandir="${EPREFIX}/usr/share/man" \ + --enable-shared \ + --cc="$(tc-getCC)" \ + --cxx="$(tc-getCXX)" \ + --ar="$(tc-getAR)" \ + --optflags="${CFLAGS}" \ + $(use_enable static-libs static) \ + "${myconf[@]}" + echo "${@}" + "${@}" || die + + if multilib_is_native_abi && use chromium; then + einfo "Configuring for Chromium" + mkdir -p ../chromium || die + pushd ../chromium >/dev/null || die + set -- "${@}" \ + --disable-shared \ + --enable-static \ + --enable-pic \ + --extra-cflags="-DFF_API_CONVERGENCE_DURATION=0" + echo "${@}" + "${@}" || die + popd >/dev/null || die + fi +} + +multilib_src_compile() { + emake V=1 + + if multilib_is_native_abi; then + for i in "${FFTOOLS[@]}" ; do + if use fftools_${i} ; then + emake V=1 tools/${i}$(get_exeext) + fi + done + + if use chromium; then + einfo "Compiling for Chromium" + pushd ../chromium >/dev/null || die + emake V=1 libffmpeg + popd >/dev/null || die + fi + fi +} + +multilib_src_install() { + emake V=1 DESTDIR="${D}" install install-doc + + if multilib_is_native_abi; then + for i in "${FFTOOLS[@]}" ; do + if use fftools_${i} ; then + dobin tools/${i}$(get_exeext) + fi + done + + if use chromium; then + einfo "Installing for Chromium" + pushd ../chromium >/dev/null || die + emake V=1 DESTDIR="${D}" install-libffmpeg + popd >/dev/null || die + fi + fi +} + +multilib_src_install_all() { + dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges + [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES" +} + +multilib_src_test() { + LD_LIBRARY_PATH="${BUILD_DIR}/libpostproc:${BUILD_DIR}/libswscale:${BUILD_DIR}/libswresample:${BUILD_DIR}/libavcodec:${BUILD_DIR}/libavdevice:${BUILD_DIR}/libavfilter:${BUILD_DIR}/libavformat:${BUILD_DIR}/libavutil:${BUILD_DIR}/libavresample" \ + emake V=1 fate +} diff --git a/media-video/ffmpeg/ffmpeg-4.1.3.ebuild b/media-video/ffmpeg/ffmpeg-4.1.3.ebuild index 907398cc03c3..1e051099cb54 100644 --- a/media-video/ffmpeg/ffmpeg-4.1.3.ebuild +++ b/media-video/ffmpeg/ffmpeg-4.1.3.ebuild @@ -55,7 +55,7 @@ LICENSE=" samba? ( GPL-3 ) " if [ "${PV#9999}" = "${PV}" ] ; then - KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" fi # Options to use as use_enable in the foo[:bar] form. diff --git a/media-video/ffmpeg/files/ffmpeg-3.4.6-fix-building-against-fdk-aac-2.patch b/media-video/ffmpeg/files/ffmpeg-3.4.6-fix-building-against-fdk-aac-2.patch new file mode 100644 index 000000000000..0ee99da96b3b --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-3.4.6-fix-building-against-fdk-aac-2.patch @@ -0,0 +1,74 @@ +https://bugs.gentoo.org/682890 +https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/141c960e21d2860e354f9b90df136184dd00a9a8 + +--- a/libavcodec/libfdk-aacenc.c ++++ b/libavcodec/libfdk-aacenc.c +@@ -26,6 +26,11 @@ + #include "audio_frame_queue.h" + #include "internal.h" + ++#define FDKENC_VER_AT_LEAST(vl0, vl1) \ ++ (defined(AACENCODER_LIB_VL0) && \ ++ ((AACENCODER_LIB_VL0 > vl0) || \ ++ (AACENCODER_LIB_VL0 == vl0 && AACENCODER_LIB_VL1 >= vl1))) ++ + typedef struct AACContext { + const AVClass *class; + HANDLE_AACENCODER handle; +@@ -290,7 +295,11 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) + } + + avctx->frame_size = info.frameLength; ++#if FDKENC_VER_AT_LEAST(4, 0) ++ avctx->initial_padding = info.nDelay; ++#else + avctx->initial_padding = info.encoderDelay; ++#endif + ff_af_queue_init(avctx, &s->afq); + + if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) { +@@ -323,28 +332,35 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, + int out_buffer_size, out_buffer_element_size; + void *in_ptr, *out_ptr; + int ret; ++ uint8_t dummy_buf[1]; + AACENC_ERROR err; + + /* handle end-of-stream small frame and flushing */ + if (!frame) { ++ /* Must be a non-null pointer, even if it's a dummy. We could use ++ * the address of anything else on the stack as well. */ ++ in_ptr = dummy_buf; ++ in_buffer_size = 0; ++ + in_args.numInSamples = -1; + } else { +- in_ptr = frame->data[0]; +- in_buffer_size = 2 * avctx->channels * frame->nb_samples; +- in_buffer_element_size = 2; ++ in_ptr = frame->data[0]; ++ in_buffer_size = 2 * avctx->channels * frame->nb_samples; + +- in_args.numInSamples = avctx->channels * frame->nb_samples; +- in_buf.numBufs = 1; +- in_buf.bufs = &in_ptr; +- in_buf.bufferIdentifiers = &in_buffer_identifier; +- in_buf.bufSizes = &in_buffer_size; +- in_buf.bufElSizes = &in_buffer_element_size; ++ in_args.numInSamples = avctx->channels * frame->nb_samples; + + /* add current frame to the queue */ + if ((ret = ff_af_queue_add(&s->afq, frame)) < 0) + return ret; + } + ++ in_buffer_element_size = 2; ++ in_buf.numBufs = 1; ++ in_buf.bufs = &in_ptr; ++ in_buf.bufferIdentifiers = &in_buffer_identifier; ++ in_buf.bufSizes = &in_buffer_size; ++ in_buf.bufElSizes = &in_buffer_element_size; ++ + /* The maximum packet size is 6144 bits aka 768 bytes per channel. */ + if ((ret = ff_alloc_packet(avpkt, FFMAX(8192, 768 * avctx->channels)))) { + av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n"); -- cgit v1.2.3