ffmpeg-9999.ebuild 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. # Subslot: libavutil major.libavcodec major.libavformat major
  5. # Since FFmpeg ships several libraries, subslot is kind of limited here.
  6. # Most consumers will use those three libraries, if a "less used" library
  7. # changes its soname, consumers will have to be rebuilt the old way
  8. # (preserve-libs).
  9. # If, for example, a package does not link to libavformat and only libavformat
  10. # changes its ABI then this package will be rebuilt needlessly. Hence, such a
  11. # package is free _not_ to := depend on FFmpeg but I would strongly encourage
  12. # doing so since such a case is unlikely.
  13. FFMPEG_SUBSLOT=55.57.57
  14. SCM=""
  15. if [ "${PV#9999}" != "${PV}" ] ; then
  16. SCM="git-r3"
  17. EGIT_REPO_URI="git://source.ffmpeg.org/ffmpeg.git"
  18. fi
  19. inherit eutils flag-o-matic multilib multilib-minimal toolchain-funcs ${SCM}
  20. DESCRIPTION="Complete solution to record, convert and stream audio and video. Includes libavcodec"
  21. HOMEPAGE="http://ffmpeg.org/"
  22. if [ "${PV#9999}" != "${PV}" ] ; then
  23. SRC_URI=""
  24. elif [ "${PV%_p*}" != "${PV}" ] ; then # Snapshot
  25. SRC_URI="mirror://gentoo/${P}.tar.bz2"
  26. else # Release
  27. SRC_URI="http://ffmpeg.org/releases/${P/_/-}.tar.bz2"
  28. fi
  29. FFMPEG_REVISION="${PV#*_p}"
  30. SLOT="0/${FFMPEG_SUBSLOT}"
  31. LICENSE="
  32. !gpl? ( LGPL-2.1 )
  33. gpl? ( GPL-2 )
  34. amr? (
  35. gpl? ( GPL-3 )
  36. !gpl? ( LGPL-3 )
  37. )
  38. gmp? (
  39. gpl? ( GPL-3 )
  40. !gpl? ( LGPL-3 )
  41. )
  42. encode? (
  43. amrenc? (
  44. gpl? ( GPL-3 )
  45. !gpl? ( LGPL-3 )
  46. )
  47. )
  48. samba? ( GPL-3 )
  49. "
  50. if [ "${PV#9999}" = "${PV}" ] ; then
  51. KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
  52. fi
  53. # Options to use as use_enable in the foo[:bar] form.
  54. # This will feed configure with $(use_enable foo bar)
  55. # or $(use_enable foo foo) if no :bar is set.
  56. # foo is added to IUSE.
  57. FFMPEG_FLAG_MAP=(
  58. +bzip2:bzlib cpudetection:runtime-cpudetect debug gcrypt gnutls gmp
  59. +gpl +hardcoded-tables +iconv lzma +network openssl +postproc
  60. samba:libsmbclient sdl:ffplay sdl:sdl2 vaapi vdpau X:xlib xcb:libxcb
  61. xcb:libxcb-shm xcb:libxcb-xfixes +zlib
  62. # libavdevice options
  63. cdio:libcdio iec61883:libiec61883 ieee1394:libdc1394 libcaca openal
  64. opengl
  65. # indevs
  66. libv4l:libv4l2 pulseaudio:libpulse
  67. # decoders
  68. amr:libopencore-amrwb amr:libopencore-amrnb fdk:libfdk-aac
  69. jpeg2k:libopenjpeg bluray:libbluray celt:libcelt gme:libgme gsm:libgsm
  70. mmal modplug:libmodplug opus:libopus libilbc librtmp ssh:libssh
  71. schroedinger:libschroedinger speex:libspeex vorbis:libvorbis vpx:libvpx
  72. zvbi:libzvbi
  73. # libavfilter options
  74. bs2b:libbs2b chromaprint flite:libflite frei0r
  75. fribidi:libfribidi fontconfig ladspa libass truetype:libfreetype
  76. rubberband:librubberband sofalizer:netcdf zeromq:libzmq zimg:libzimg
  77. # libswresample options
  78. libsoxr
  79. # Threads; we only support pthread for now but ffmpeg supports more
  80. +threads:pthreads
  81. )
  82. # Same as above but for encoders, i.e. they do something only with USE=encode.
  83. FFMPEG_ENCODER_FLAG_MAP=(
  84. amrenc:libvo-amrwbenc mp3:libmp3lame
  85. kvazaar:libkvazaar nvenc:nvenc
  86. openh264:libopenh264 snappy:libsnappy theora:libtheora twolame:libtwolame
  87. wavpack:libwavpack webp:libwebp x264:libx264 x265:libx265 xvid:libxvid
  88. )
  89. IUSE="
  90. alsa doc +encode jack oss pic static-libs test v4l
  91. ${FFMPEG_FLAG_MAP[@]%:*}
  92. ${FFMPEG_ENCODER_FLAG_MAP[@]%:*}
  93. "
  94. # Strings for CPU features in the useflag[:configure_option] form
  95. # if :configure_option isn't set, it will use 'useflag' as configure option
  96. ARM_CPU_FEATURES=( armv5te armv6 armv6t2 neon armvfp:vfp )
  97. ARM_CPU_REQUIRED_USE="arm64? ( armvfp neon )"
  98. MIPS_CPU_FEATURES=( mipsdspr1 mipsdspr2 mipsfpu )
  99. PPC_CPU_FEATURES=( altivec )
  100. 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 )
  101. X86_CPU_FEATURES=( ${X86_CPU_FEATURES_RAW[@]/#/cpu_flags_x86_} )
  102. X86_CPU_REQUIRED_USE="
  103. cpu_flags_x86_avx2? ( cpu_flags_x86_avx )
  104. cpu_flags_x86_fma4? ( cpu_flags_x86_avx )
  105. cpu_flags_x86_fma3? ( cpu_flags_x86_avx )
  106. cpu_flags_x86_xop? ( cpu_flags_x86_avx )
  107. cpu_flags_x86_avx? ( cpu_flags_x86_sse4_2 )
  108. cpu_flags_x86_aes? ( cpu_flags_x86_sse4_2 )
  109. cpu_flags_x86_sse4_2? ( cpu_flags_x86_sse4_1 )
  110. cpu_flags_x86_sse4_1? ( cpu_flags_x86_ssse3 )
  111. cpu_flags_x86_ssse3? ( cpu_flags_x86_sse3 )
  112. cpu_flags_x86_sse3? ( cpu_flags_x86_sse2 )
  113. cpu_flags_x86_sse2? ( cpu_flags_x86_sse )
  114. cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )
  115. cpu_flags_x86_mmxext? ( cpu_flags_x86_mmx )
  116. cpu_flags_x86_3dnowext? ( cpu_flags_x86_3dnow )
  117. cpu_flags_x86_3dnow? ( cpu_flags_x86_mmx )
  118. "
  119. IUSE="${IUSE}
  120. ${ARM_CPU_FEATURES[@]%:*}
  121. ${MIPS_CPU_FEATURES[@]%:*}
  122. ${PPC_CPU_FEATURES[@]%:*}
  123. ${X86_CPU_FEATURES[@]%:*}
  124. "
  125. CPU_REQUIRED_USE="
  126. ${ARM_CPU_REQUIRED_USE}
  127. ${X86_CPU_REQUIRED_USE}
  128. "
  129. # "$(tc-arch):XXX" form where XXX_CPU_FEATURES are the cpu features that apply to
  130. # $(tc-arch).
  131. CPU_FEATURES_MAP="
  132. arm:ARM
  133. arm64:ARM
  134. mips:MIPS
  135. ppc:PPC
  136. ppc64:PPC
  137. x86:X86
  138. amd64:X86
  139. "
  140. FFTOOLS=( aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher )
  141. IUSE="${IUSE} ${FFTOOLS[@]/#/+fftools_}"
  142. RDEPEND="
  143. alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
  144. amr? ( >=media-libs/opencore-amr-0.1.3-r1[${MULTILIB_USEDEP}] )
  145. bluray? ( >=media-libs/libbluray-0.3.0-r1:=[${MULTILIB_USEDEP}] )
  146. bs2b? ( >=media-libs/libbs2b-3.1.0-r1[${MULTILIB_USEDEP}] )
  147. bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
  148. cdio? ( >=dev-libs/libcdio-paranoia-0.90_p1-r1[${MULTILIB_USEDEP}] )
  149. celt? ( >=media-libs/celt-0.11.1-r1[${MULTILIB_USEDEP}] )
  150. chromaprint? ( >=media-libs/chromaprint-1.2-r1[${MULTILIB_USEDEP}] )
  151. encode? (
  152. amrenc? ( >=media-libs/vo-amrwbenc-0.1.2-r1[${MULTILIB_USEDEP}] )
  153. kvazaar? ( media-libs/kvazaar[${MULTILIB_USEDEP}] )
  154. mp3? ( >=media-sound/lame-3.99.5-r1[${MULTILIB_USEDEP}] )
  155. nvenc? ( media-video/nvidia_video_sdk )
  156. openh264? ( >=media-libs/openh264-1.4.0-r1[${MULTILIB_USEDEP}] )
  157. snappy? ( >=app-arch/snappy-1.1.2-r1[${MULTILIB_USEDEP}] )
  158. theora? (
  159. >=media-libs/libtheora-1.1.1[encode,${MULTILIB_USEDEP}]
  160. >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
  161. )
  162. twolame? ( >=media-sound/twolame-0.3.13-r1[${MULTILIB_USEDEP}] )
  163. wavpack? ( >=media-sound/wavpack-4.60.1-r1[${MULTILIB_USEDEP}] )
  164. webp? ( >=media-libs/libwebp-0.3.0[${MULTILIB_USEDEP}] )
  165. x264? ( >=media-libs/x264-0.0.20130506:=[${MULTILIB_USEDEP}] )
  166. x265? ( >=media-libs/x265-1.6:=[${MULTILIB_USEDEP}] )
  167. xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] )
  168. )
  169. fdk? ( >=media-libs/fdk-aac-0.1.3:=[${MULTILIB_USEDEP}] )
  170. flite? ( >=app-accessibility/flite-1.4-r4[${MULTILIB_USEDEP}] )
  171. fontconfig? ( >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] )
  172. frei0r? ( media-plugins/frei0r-plugins )
  173. fribidi? ( >=dev-libs/fribidi-0.19.6[${MULTILIB_USEDEP}] )
  174. gcrypt? ( >=dev-libs/libgcrypt-1.6:0=[${MULTILIB_USEDEP}] )
  175. gme? ( >=media-libs/game-music-emu-0.6.0[${MULTILIB_USEDEP}] )
  176. gmp? ( >=dev-libs/gmp-6:0=[${MULTILIB_USEDEP}] )
  177. gnutls? ( >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] )
  178. gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] )
  179. iconv? ( >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] )
  180. iec61883? (
  181. >=media-libs/libiec61883-1.2.0-r1[${MULTILIB_USEDEP}]
  182. >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
  183. >=sys-libs/libavc1394-0.5.4-r1[${MULTILIB_USEDEP}]
  184. )
  185. ieee1394? (
  186. >=media-libs/libdc1394-2.2.1[${MULTILIB_USEDEP}]
  187. >=sys-libs/libraw1394-2.1.0-r1[${MULTILIB_USEDEP}]
  188. )
  189. jack? ( virtual/jack[${MULTILIB_USEDEP}] )
  190. jpeg2k? ( >=media-libs/openjpeg-2:2[${MULTILIB_USEDEP}] )
  191. libass? ( >=media-libs/libass-0.10.2:=[${MULTILIB_USEDEP}] )
  192. libcaca? ( >=media-libs/libcaca-0.99_beta18-r1[${MULTILIB_USEDEP}] )
  193. libilbc? ( >=media-libs/libilbc-2[${MULTILIB_USEDEP}] )
  194. libsoxr? ( >=media-libs/soxr-0.1.0[${MULTILIB_USEDEP}] )
  195. libv4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
  196. lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
  197. mmal? ( media-libs/raspberrypi-userland )
  198. modplug? ( >=media-libs/libmodplug-0.8.8.4-r1[${MULTILIB_USEDEP}] )
  199. openal? ( >=media-libs/openal-1.15.1[${MULTILIB_USEDEP}] )
  200. opengl? ( >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] )
  201. openssl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
  202. opus? ( >=media-libs/opus-1.0.2-r2[${MULTILIB_USEDEP}] )
  203. pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
  204. librtmp? ( >=media-video/rtmpdump-2.4_p20131018[${MULTILIB_USEDEP}] )
  205. rubberband? ( >=media-libs/rubberband-1.8.1-r1[${MULTILIB_USEDEP}] )
  206. samba? ( >=net-fs/samba-3.6.23-r1[${MULTILIB_USEDEP}] )
  207. schroedinger? ( >=media-libs/schroedinger-1.0.11-r1[${MULTILIB_USEDEP}] )
  208. sdl? ( media-libs/libsdl2[sound,video,${MULTILIB_USEDEP}] )
  209. sofalizer? (
  210. >=sci-libs/netcdf-4.3.2-r1[hdf5]
  211. >=sci-libs/hdf5-1.8.18[hl]
  212. )
  213. speex? ( >=media-libs/speex-1.2_rc1-r1[${MULTILIB_USEDEP}] )
  214. ssh? ( >=net-libs/libssh-0.5.5[${MULTILIB_USEDEP}] )
  215. truetype? ( >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] )
  216. vaapi? ( >=x11-libs/libva-1.2.1-r1[${MULTILIB_USEDEP}] )
  217. vdpau? ( >=x11-libs/libvdpau-0.7[${MULTILIB_USEDEP}] )
  218. vorbis? (
  219. >=media-libs/libvorbis-1.3.3-r1[${MULTILIB_USEDEP}]
  220. >=media-libs/libogg-1.3.0[${MULTILIB_USEDEP}]
  221. )
  222. vpx? ( >=media-libs/libvpx-1.4.0:=[${MULTILIB_USEDEP}] )
  223. X? (
  224. >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
  225. >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
  226. !xcb? ( >=x11-libs/libXfixes-5.0.1[${MULTILIB_USEDEP}] )
  227. >=x11-libs/libXv-1.0.10[${MULTILIB_USEDEP}]
  228. )
  229. xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] )
  230. zeromq? ( >=net-libs/zeromq-4.1.6 )
  231. zimg? ( >=media-libs/zimg-2.4:=[${MULTILIB_USEDEP}] )
  232. zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
  233. zvbi? ( >=media-libs/zvbi-0.2.35[${MULTILIB_USEDEP}] )
  234. !media-video/qt-faststart
  235. postproc? ( !media-libs/libpostproc )
  236. "
  237. DEPEND="${RDEPEND}
  238. >=sys-devel/make-3.81
  239. doc? ( sys-apps/texinfo )
  240. >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
  241. ladspa? ( >=media-libs/ladspa-sdk-1.13-r2[${MULTILIB_USEDEP}] )
  242. cpu_flags_x86_mmx? ( >=dev-lang/yasm-1.2 )
  243. test? ( net-misc/wget sys-devel/bc )
  244. v4l? ( sys-kernel/linux-headers )
  245. "
  246. RDEPEND="${RDEPEND}
  247. abi_x86_32? ( !<=app-emulation/emul-linux-x86-medialibs-20140508-r3
  248. !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
  249. # Code requiring FFmpeg to be built under gpl license
  250. GPL_REQUIRED_USE="
  251. postproc? ( gpl )
  252. frei0r? ( gpl )
  253. cdio? ( gpl )
  254. samba? ( gpl )
  255. encode? (
  256. x264? ( gpl )
  257. x265? ( gpl )
  258. xvid? ( gpl )
  259. X? ( !xcb? ( gpl ) )
  260. )
  261. "
  262. REQUIRED_USE="
  263. libv4l? ( v4l )
  264. fftools_cws2fws? ( zlib )
  265. test? ( encode )
  266. ${GPL_REQUIRED_USE}
  267. ${CPU_REQUIRED_USE}"
  268. RESTRICT="
  269. gpl? ( openssl? ( bindist ) fdk? ( bindist ) )
  270. "
  271. S=${WORKDIR}/${P/_/-}
  272. MULTILIB_WRAPPED_HEADERS=(
  273. /usr/include/libavutil/avconfig.h
  274. )
  275. src_prepare() {
  276. if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot
  277. export revision=git-N-${FFMPEG_REVISION}
  278. fi
  279. default
  280. }
  281. multilib_src_configure() {
  282. local myconf=( ${EXTRA_FFMPEG_CONF} )
  283. local ffuse=( "${FFMPEG_FLAG_MAP[@]}" )
  284. use openssl && use gpl && myconf+=( --enable-nonfree )
  285. use samba && myconf+=( --enable-version3 )
  286. # Encoders
  287. if use encode ; then
  288. ffuse+=( "${FFMPEG_ENCODER_FLAG_MAP[@]}" )
  289. # Licensing.
  290. if use amrenc ; then
  291. myconf+=( --enable-version3 )
  292. fi
  293. else
  294. myconf+=( --disable-encoders )
  295. fi
  296. # Indevs
  297. use v4l || myconf+=( --disable-indev=v4l2 --disable-outdev=v4l2 )
  298. for i in alsa oss jack ; do
  299. use ${i} || myconf+=( --disable-indev=${i} )
  300. done
  301. use xcb || ffuse+=( X:x11grab )
  302. # Outdevs
  303. for i in alsa oss sdl ; do
  304. use ${i} || myconf+=( --disable-outdev=${i} )
  305. done
  306. # Decoders
  307. use amr && myconf+=( --enable-version3 )
  308. use gmp && myconf+=( --enable-version3 )
  309. use fdk && use gpl && myconf+=( --enable-nonfree )
  310. for i in "${ffuse[@]#+}" ; do
  311. myconf+=( $(use_enable ${i%:*} ${i#*:}) )
  312. done
  313. # (temporarily) disable non-multilib deps
  314. if ! multilib_is_native_abi; then
  315. for i in frei0r netcdf libzmq ; do
  316. myconf+=( --disable-${i} )
  317. done
  318. fi
  319. # CPU features
  320. for i in ${CPU_FEATURES_MAP} ; do
  321. if [ "$(tc-arch)" = "${i%:*}" ] ; then
  322. local var="${i#*:}_CPU_FEATURES[@]"
  323. for j in ${!var} ; do
  324. use ${j%:*} || myconf+=( --disable-${j#*:} )
  325. done
  326. fi
  327. done
  328. if use pic ; then
  329. myconf+=( --enable-pic )
  330. # disable asm code if PIC is required
  331. # as the provided asm decidedly is not PIC for x86.
  332. [[ ${ABI} == x86 ]] && myconf+=( --disable-asm )
  333. fi
  334. [[ ${ABI} == x32 ]] && myconf+=( --disable-asm ) #427004
  335. # Try to get cpu type based on CFLAGS.
  336. # Bug #172723
  337. # We need to do this so that features of that CPU will be better used
  338. # If they contain an unknown CPU it will not hurt since ffmpeg's configure
  339. # will just ignore it.
  340. for i in $(get-flag mcpu) $(get-flag march) ; do
  341. [[ ${i} = native ]] && i="host" # bug #273421
  342. myconf+=( --cpu=${i} )
  343. break
  344. done
  345. # LTO support, bug #566282
  346. is-flagq "-flto*" && myconf+=( "--enable-lto" )
  347. # Mandatory configuration
  348. myconf=(
  349. --enable-avfilter
  350. --enable-avresample
  351. --disable-stripping
  352. "${myconf[@]}"
  353. )
  354. # cross compile support
  355. if tc-is-cross-compiler ; then
  356. myconf+=( --enable-cross-compile --arch=$(tc-arch-kernel) --cross-prefix=${CHOST}- )
  357. case ${CHOST} in
  358. *freebsd*)
  359. myconf+=( --target-os=freebsd )
  360. ;;
  361. *mingw32*)
  362. myconf+=( --target-os=mingw32 )
  363. ;;
  364. *linux*)
  365. myconf+=( --target-os=linux )
  366. ;;
  367. esac
  368. fi
  369. # doc
  370. myconf+=(
  371. $(multilib_native_use_enable doc)
  372. $(multilib_native_use_enable doc htmlpages)
  373. $(multilib_native_enable manpages)
  374. )
  375. set -- "${S}/configure" \
  376. --prefix="${EPREFIX}/usr" \
  377. --libdir="${EPREFIX}/usr/$(get_libdir)" \
  378. --shlibdir="${EPREFIX}/usr/$(get_libdir)" \
  379. --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
  380. --mandir="${EPREFIX}/usr/share/man" \
  381. --enable-shared \
  382. --cc="$(tc-getCC)" \
  383. --cxx="$(tc-getCXX)" \
  384. --ar="$(tc-getAR)" \
  385. --optflags="${CFLAGS}" \
  386. $(use_enable static-libs static) \
  387. "${myconf[@]}"
  388. echo "${@}"
  389. "${@}" || die
  390. }
  391. multilib_src_compile() {
  392. emake V=1
  393. if multilib_is_native_abi; then
  394. for i in "${FFTOOLS[@]}" ; do
  395. if use fftools_${i} ; then
  396. emake V=1 tools/${i}
  397. fi
  398. done
  399. fi
  400. }
  401. multilib_src_install() {
  402. emake V=1 DESTDIR="${D}" install install-doc
  403. if multilib_is_native_abi; then
  404. for i in "${FFTOOLS[@]}" ; do
  405. if use fftools_${i} ; then
  406. dobin tools/${i}
  407. fi
  408. done
  409. fi
  410. }
  411. multilib_src_install_all() {
  412. dodoc Changelog README.md CREDITS doc/*.txt doc/APIchanges
  413. [ -f "RELEASE_NOTES" ] && dodoc "RELEASE_NOTES"
  414. }
  415. multilib_src_test() {
  416. 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" \
  417. emake V=1 fate
  418. }