summaryrefslogtreecommitdiff
path: root/media-video/ffmpeg
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-12-16 10:16:28 +0300
committerGluzskiy Alexandr <sss@sss.chaoslab.ru>2017-12-16 10:16:28 +0300
commit23b02440204b922932e6979870fd3458cd119554 (patch)
tree80ede3e8d16ce1d155dccf2675d923b68f305429 /media-video/ffmpeg
parent9004b11bb07a5db3bcc82211a9003fb0ffbb5b1d (diff)
mpv: fortunately mpv team games with ffmpeg ended
Diffstat (limited to 'media-video/ffmpeg')
-rw-r--r--media-video/ffmpeg/ffmpeg-scm.ebuild50
-rw-r--r--media-video/ffmpeg/files/4a98362b2b5daf7bb9c092404ac7e73e4f282963.diff13
2 files changed, 45 insertions, 18 deletions
diff --git a/media-video/ffmpeg/ffmpeg-scm.ebuild b/media-video/ffmpeg/ffmpeg-scm.ebuild
index 8d7a5db..8f03b7d 100644
--- a/media-video/ffmpeg/ffmpeg-scm.ebuild
+++ b/media-video/ffmpeg/ffmpeg-scm.ebuild
@@ -1,6 +1,5 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id$
EAPI=6
@@ -13,7 +12,7 @@ EAPI=6
# 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
+FFMPEG_SUBSLOT=56.58.58
SCM="git-r3"
@@ -87,7 +86,7 @@ FFMPEG_ENCODER_FLAG_MAP=(
)
IUSE="
- alsa doc +encode jack oss pic static-libs test v4l
+ alsa chromium doc +encode jack oss pic static-libs test v4l
${FFMPEG_FLAG_MAP[@]%:*}
${FFMPEG_ENCODER_FLAG_MAP[@]%:*}
"
@@ -188,7 +187,7 @@ RDEPEND="
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}] )
+ gnutls? ( !openssl? ( >=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? (
@@ -237,7 +236,7 @@ RDEPEND="
)
xcb? ( >=x11-libs/libxcb-1.4[${MULTILIB_USEDEP}] )
zeromq? ( >=net-libs/zeromq-4.1.6 )
- zimg? ( >=media-libs/zimg-2.4:=[${MULTILIB_USEDEP}] )
+ zimg? ( >=media-libs/zimg-2.6.2:=[${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
@@ -283,6 +282,10 @@ RESTRICT="
S=${WORKDIR}/${P/_/-}
+PATCHES=(
+ "${FILESDIR}"/chromium.patch
+)
+
MULTILIB_WRAPPED_HEADERS=(
/usr/include/libavutil/avconfig.h
)
@@ -297,6 +300,7 @@ src_prepare() {
export revision=git-N-${FFMPEG_REVISION}
fi
default
+ echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die
}
multilib_src_configure() {
@@ -338,6 +342,14 @@ multilib_src_configure() {
myconf+=( $(use_enable ${i%:*} ${i#*:}) )
done
+ # Incompatible features: openssl and gnutls
+ # openssl support provides a (strict) superset of gnutls support as of 2017.11.30
+ # So, we warn the user and disable gnutls
+ if use openssl && use gnutls; then
+ ewarn "openssl and gnutls are mutually exclusive in ${PN}, disabling gnutls since openssl provides more features"
+ myconf+=( --disable-gnutls )
+ fi
+
# (temporarily) disable non-multilib deps
if ! multilib_is_native_abi; then
for i in frei0r libzmq ; do
@@ -418,6 +430,20 @@ multilib_src_configure() {
"${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() {
@@ -429,6 +455,13 @@ multilib_src_compile() {
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
}
@@ -441,6 +474,13 @@ multilib_src_install() {
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
}
diff --git a/media-video/ffmpeg/files/4a98362b2b5daf7bb9c092404ac7e73e4f282963.diff b/media-video/ffmpeg/files/4a98362b2b5daf7bb9c092404ac7e73e4f282963.diff
deleted file mode 100644
index 92ef6ab..0000000
--- a/media-video/ffmpeg/files/4a98362b2b5daf7bb9c092404ac7e73e4f282963.diff
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/libavcodec/version.h b/libavcodec/version.h
-index 226da1935fe..fc5018efe99 100644
---- a/libavcodec/version.h
-+++ b/libavcodec/version.h
-@@ -41,6 +41,8 @@
-
- #define LIBAVCODEC_IDENT "Lavc" AV_STRINGIFY(LIBAVCODEC_VERSION)
-
-+#define LIBAVCODEC_MPV 1
-+
- /**
- * FF_API_* defines may be placed below to indicate public API that will be
- * dropped at a future version bump. The defines themselves are not part of