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 | |
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')
-rw-r--r-- | media-video/ffmpeg/ffmpeg-4.0.2.ebuild | 30 | ||||
-rw-r--r-- | media-video/ffmpeg/ffmpeg-4.0.3.ebuild | 30 | ||||
-rw-r--r-- | media-video/ffmpeg/ffmpeg-4.1.ebuild | 30 | ||||
-rw-r--r-- | media-video/ffmpeg/ffmpeg-9999.ebuild | 30 |
4 files changed, 84 insertions, 36 deletions
diff --git a/media-video/ffmpeg/ffmpeg-4.0.2.ebuild b/media-video/ffmpeg/ffmpeg-4.0.2.ebuild index 3a5a70b3e2b0..4cb26fd90478 100644 --- a/media-video/ffmpeg/ffmpeg-4.0.2.ebuild +++ b/media-video/ffmpeg/ffmpeg-4.0.2.ebuild @@ -310,6 +310,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} @@ -446,7 +450,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 @@ -472,10 +476,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 } @@ -491,10 +499,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 } diff --git a/media-video/ffmpeg/ffmpeg-4.0.3.ebuild b/media-video/ffmpeg/ffmpeg-4.0.3.ebuild index 0e284c3f0513..8e011cb6e0b5 100644 --- a/media-video/ffmpeg/ffmpeg-4.0.3.ebuild +++ b/media-video/ffmpeg/ffmpeg-4.0.3.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} @@ -447,7 +451,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 @@ -473,10 +477,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 } @@ -492,10 +500,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 } diff --git a/media-video/ffmpeg/ffmpeg-4.1.ebuild b/media-video/ffmpeg/ffmpeg-4.1.ebuild index 1b1172dce71a..f9bb47a5c713 100644 --- a/media-video/ffmpeg/ffmpeg-4.1.ebuild +++ b/media-video/ffmpeg/ffmpeg-4.1.ebuild @@ -312,6 +312,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} @@ -452,7 +456,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 @@ -478,10 +482,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 } @@ -497,10 +505,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 } 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 } |