app-emulation/qemu: Add oss USE flag instead of always enabling
authorJames Le Cuirot <chewi@gentoo.org>
Sat, 21 Sep 2019 23:00:22 +0000 (00:00 +0100)
committerMatthias Maier <tamiko@gentoo.org>
Sun, 22 Sep 2019 02:12:12 +0000 (21:12 -0500)
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@gentoo.org>
Signed-off-by: Matthias Maier <tamiko@gentoo.org>
app-emulation/qemu/qemu-9999.ebuild

index f1f1b3bc6f7181c422e66027e98ba4ea013adffe..58a7d0b858075ce0cb0987278218d90a0b8f7664 100644 (file)
@@ -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