Quarks Gentoo Overlay
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

ffmpeg-3.2.2-r1.ebuild 15KB

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