www-client/chromium: add system-libvpx USE flag
authorPawel Hajdan, Jr <phajdan.jr@gentoo.org>
Mon, 23 Jan 2017 16:37:03 +0000 (16:37 +0000)
committerPawel Hajdan, Jr <phajdan.jr@gentoo.org>
Mon, 23 Jan 2017 17:19:39 +0000 (18:19 +0100)
This addresses bug #598264 by Andreas Steinmetz.

www-client/chromium/chromium-57.0.2986.0.ebuild
www-client/chromium/metadata.xml

index 771fbdb556d07d6f0eb097a99b3b9abd8f2e87fd..c64343882cdd2268274b684330752e6b61af7514 100644 (file)
@@ -18,7 +18,7 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}
 LICENSE="BSD"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-IUSE="component-build cups gconf gnome-keyring gtk3 +hangouts kerberos neon pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +tcmalloc widevine"
+IUSE="component-build cups gconf gnome-keyring gtk3 +hangouts kerberos neon pic +proprietary-codecs pulseaudio selinux +suid +system-ffmpeg +system-libvpx +tcmalloc widevine"
 RESTRICT="!system-ffmpeg? ( proprietary-codecs? ( bindist ) )"
 
 # Native Client binaries are compiled with different set of flags, bug #452066.
@@ -50,7 +50,7 @@ COMMON_DEPEND="
        media-libs/libexif:=
        media-libs/libjpeg-turbo:=
        media-libs/libpng:=
-       media-libs/libvpx:=[svc]
+       system-libvpx? ( media-libs/libvpx:=[svc] )
        media-libs/speex:=
        pulseaudio? ( media-sound/pulseaudio:= )
        system-ffmpeg? ( >=media-video/ffmpeg-3:= )
@@ -319,6 +319,10 @@ src_prepare() {
        if ! use system-ffmpeg; then
                keeplibs+=( third_party/ffmpeg )
        fi
+       if ! use system-libvpx; then
+               keeplibs+=( third_party/libvpx )
+               keeplibs+=( third_party/libvpx/source/libvpx/third_party/x86inc )
+       fi
 
        # Remove most bundled libraries. Some are still needed.
        build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die
@@ -353,7 +357,6 @@ src_configure() {
                icu
                libjpeg
                libpng
-               libvpx
                libwebp
                libxml
                libxslt
@@ -365,6 +368,9 @@ src_configure() {
        if use system-ffmpeg; then
                gn_system_libraries+=( ffmpeg )
        fi
+       if use system-libvpx; then
+               gn_system_libraries+=( libvpx )
+       fi
        build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die
 
        # Optional dependencies.
index c2a73f874cc3fbfc7291e83725bf3be8e83c2f61..bed144b7ca89b85ad2e666b26c284b03ada0ecb8 100644 (file)
@@ -16,6 +16,7 @@
                <flag name="proprietary-codecs">Enable proprietary codecs like H.264, MP3</flag>
                <flag name="suid">Build the SUID sandbox, which is only needed on CONFIG_USER_NS=n kernels</flag>
                <flag name="system-ffmpeg">Use system ffmpeg instead of the bundled one</flag>
+               <flag name="system-libvpx">Use system libvpx instead of the bundled one</flag>
                <flag name="tcmalloc">Use bundled tcmalloc instead of system malloc</flag>
                <flag name="widevine">Unsupported closed-source DRM capability (required by Netflix VOD)</flag>
        </use>