diff options
author | James Le Cuirot <chewi@gentoo.org> | 2018-12-02 21:38:57 +0000 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2018-12-02 21:41:19 +0000 |
commit | f348b5c168a446787b6b1abba235b520705f7fce (patch) | |
tree | 6f6eb529122bda30a5f8127e1fbb213e59bc8af5 /media-video/ffmpeg/ffmpeg-9999.ebuild | |
parent | media-video/ffmpeg: Fix Chromium build for v4+ (diff) | |
download | gentoo-f348b5c168a446787b6b1abba235b520705f7fce.tar.gz gentoo-f348b5c168a446787b6b1abba235b520705f7fce.tar.bz2 gentoo-f348b5c168a446787b6b1abba235b520705f7fce.zip |
media-video/ffmpeg: Use main build for Chromium where possible in v4+
The main build is now compatible with Chromium, except when OpenCL is
enabled. I thought about keeping the build separate or adding to
REQUIRED_USE but in the end, I decided to let it work both ways. The
precise compatibility requirements may change over time so I have
added a build_separate_libffmpeg function.
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'media-video/ffmpeg/ffmpeg-9999.ebuild')
-rw-r--r-- | media-video/ffmpeg/ffmpeg-9999.ebuild | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild index b3739eb76f8e..1e84ce798624 100644 --- a/media-video/ffmpeg/ffmpeg-9999.ebuild +++ b/media-video/ffmpeg/ffmpeg-9999.ebuild @@ -311,6 +311,10 @@ MULTILIB_WRAPPED_HEADERS=( /usr/include/libavutil/avconfig.h ) +build_separate_libffmpeg() { + use opencl +} + src_prepare() { if [[ "${PV%_p*}" != "${PV}" ]] ; then # Snapshot export revision=git-N-${FFMPEG_REVISION} @@ -451,7 +455,7 @@ multilib_src_configure() { echo "${@}" "${@}" || die - if multilib_is_native_abi && use chromium; then + if multilib_is_native_abi && use chromium && build_separate_libffmpeg; then einfo "Configuring for Chromium" mkdir -p ../chromium || die pushd ../chromium >/dev/null || die @@ -477,10 +481,14 @@ multilib_src_compile() { done if use chromium; then - einfo "Compiling for Chromium" - pushd ../chromium >/dev/null || die - emake V=1 libffmpeg - popd >/dev/null || die + if build_separate_libffmpeg; then + einfo "Compiling for Chromium" + pushd ../chromium >/dev/null || die + emake V=1 libffmpeg + popd >/dev/null || die + else + emake V=1 libffmpeg + fi fi fi } @@ -496,10 +504,14 @@ multilib_src_install() { 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 + if build_separate_libffmpeg; then + einfo "Installing for Chromium" + pushd ../chromium >/dev/null || die + emake V=1 DESTDIR="${D}" install-libffmpeg + popd >/dev/null || die + else + emake V=1 DESTDIR="${D}" install-libffmpeg + fi fi fi } |