diff options
-rw-r--r-- | media-video/libav/libav-12.ebuild | 13 | ||||
-rw-r--r-- | media-video/libav/metadata.xml | 1 | ||||
-rw-r--r-- | profiles/arch/x86/package.use.mask | 4 |
3 files changed, 15 insertions, 3 deletions
diff --git a/media-video/libav/libav-12.ebuild b/media-video/libav/libav-12.ebuild index 57a650750f27..214466a166a3 100644 --- a/media-video/libav/libav-12.ebuild +++ b/media-video/libav/libav-12.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -37,7 +37,7 @@ SLOT="0/12" ~x64-solaris ~x86-solaris" IUSE="aac alsa amr bs2b +bzip2 cdio cpudetection custom-cflags debug doc +encode faac fdk frei0r fontconfig +gpl gsm +hardcoded-tables ieee1394 jack jpeg2k libressl mp3 - +network openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl + +network nvidia openssl opus oss pic pulseaudio rtmp schroedinger sdl speex ssl static-libs test theora threads tools truetype twolame v4l vaapi vdpau vorbis vpx X wavpack webp x264 x265 xvid +zlib" @@ -79,6 +79,7 @@ RDEPEND=" x265? ( >=media-libs/x265-1.2:=[${MULTILIB_USEDEP}] ) xvid? ( >=media-libs/xvid-1.3.2-r1[${MULTILIB_USEDEP}] ) ) + nvidia? ( media-video/nvidia-video-codec[${MULTILIB_USEDEP}] ) fdk? ( >=media-libs/fdk-aac-0.1.2[${MULTILIB_USEDEP}] ) frei0r? ( media-plugins/frei0r-plugins ) gsm? ( >=media-sound/gsm-1.0.13-r1[${MULTILIB_USEDEP}] ) @@ -139,7 +140,7 @@ REQUIRED_USE=" test? ( encode zlib ) fontconfig? ( truetype ) " -RESTRICT="faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist )" +RESTRICT="faac? ( bindist ) fdk? ( bindist ) openssl? ( bindist ) nvidia? ( bindist )" MULTILIB_WRAPPED_HEADERS=( /usr/include/libavutil/avconfig.h @@ -200,12 +201,18 @@ multilib_src_configure() { use vaapi && myconf+=( --enable-vaapi ) + NVIDIA_INCLUDES="-I/opt/nvidia-video-codec/include -I/opt/cuda/include" + NVIDIA_LIBS="-L/opt/cuda/lib64" + use nvidia && myconf+=( --enable-nonfree --enable-cuda --enable-libnpp + --extra-cflags="$NVIDIA_INCLUDES" --extra-ldflags="$NVIDIA_LIBS" ) + # Encoders if use encode; then use faac && myconf+=( --enable-nonfree ) use mp3 && myconf+=( --enable-libmp3lame ) use amr && myconf+=( --enable-libvo-amrwbenc ) use aac && myconf+=( --enable-libvo-aacenc ) + use nvidia && myconf+=( --enable-nvenc ) uses="faac theora twolame vorbis wavpack webp x264 x265 xvid" for i in ${uses}; do use ${i} && myconf+=( --enable-lib${i} ) diff --git a/media-video/libav/metadata.xml b/media-video/libav/metadata.xml index 9277436519b1..222399a18306 100644 --- a/media-video/libav/metadata.xml +++ b/media-video/libav/metadata.xml @@ -20,6 +20,7 @@ <flag name="gpl">Build all GPL licensed code. Without this flag set the package is build under LGPL license.</flag> <flag name="hardcoded-tables">Use pre-calculated tables rather than calculating them on the fly.</flag> <flag name="network">Enable network streaming support.</flag> + <flag name="nvidia">Enable nvidia video codec hardware acceleration support.</flag> <flag name="openssl">Prefer <pkg>dev-libs/openssl</pkg> over <pkg>net-libs/gnutls</pkg> to provide SSL/TLS support (notice: the resulting binaries are unredistributable).</flag> <flag name="opus">Use the external opus library for encoding and decoding.</flag> <flag name="pulseaudio">Enable pulseaudio input support.</flag> diff --git a/profiles/arch/x86/package.use.mask b/profiles/arch/x86/package.use.mask index 8bb03a7d8a38..7d028f6693bf 100644 --- a/profiles/arch/x86/package.use.mask +++ b/profiles/arch/x86/package.use.mask @@ -4,6 +4,10 @@ # This file requires >=portage-2.1.1 +# Luca Barbato <lu_zero@gentoo.org> (22 Jan 2017) +# cuda is not available on x86 nvidia-video-codec depends on it +media-video/libav nvidia + # Ilya Tumaykin <itumaykin+gentoo@gmail.com> (19 Jan 2017) # Requires yet unavailable >=media-video/ffmpeg-3.3. >=media-video/mpv-0.23.0 cuda |