commit:     79eb2ebdcc7ed50c2a2ca66ebbb6691921fbbf40
Author:     James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 21 23:00:22 2019 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Sun Sep 22 02:12:12 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79eb2ebd

app-emulation/qemu: Add oss USE flag instead of always enabling

It requires no additional dependencies but some platforms like Windows
cannot build the OSS driver and have the oss flag masked.

Package-Manager: Portage-2.3.76, Repoman-2.3.17
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 app-emulation/qemu/qemu-9999.ebuild | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/app-emulation/qemu/qemu-9999.ebuild 
b/app-emulation/qemu/qemu-9999.ebuild
index f1f1b3bc6f7..58a7d0b8580 100644
--- a/app-emulation/qemu/qemu-9999.ebuild
+++ b/app-emulation/qemu/qemu-9999.ebuild
@@ -35,8 +35,8 @@ SLOT="0"
 
 IUSE="accessibility +aio alsa bzip2 capstone +caps +curl debug doc
        +fdt glusterfs gnutls gtk infiniband iscsi +jpeg kernel_linux
-       kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png
-       pulseaudio python rbd sasl +seccomp sdl selinux smartcard snappy
+       kernel_FreeBSD lzo ncurses nfs nls numa opengl +oss +pin-upstream-blobs
+       +png pulseaudio python rbd sasl +seccomp sdl selinux smartcard snappy
        spice ssh static static-user systemtap tci test usb usbredir vde
        +vhost-net virgl virtfs +vnc vte xattr xen xfs +xkb"
 
@@ -475,12 +475,14 @@ qemu_src_configure() {
 
        if [[ ! ${buildtype} == "user" ]] ; then
                # audio options
-               local audio_opts="oss"
-               use alsa && audio_opts="alsa,${audio_opts}"
-               use sdl && audio_opts="sdl,${audio_opts}"
-               use pulseaudio && audio_opts="pa,${audio_opts}"
+               local audio_opts=(
+                       $(usev alsa)
+                       $(usev oss)
+                       $(usev sdl)
+                       $(usex pulseaudio pa "")
+               )
                conf_opts+=(
-                       --audio-drv-list="${audio_opts}"
+                       --audio-drv-list=$(printf "%s," "${audio_opts[@]}")
                )
        fi
 

Reply via email to