commit:     f92dba6164179f3894e3977e6410c912f579e71c
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  9 18:39:31 2017 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Thu Mar  9 18:48:47 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f92dba61

app-emulation/qemu: configure tools with all options, bug #611958

This fixes a bug introduced in my previous commit
  fe801faa69cb147f4fcf2c112e8275f7da935b3d

Package-Manager: Portage-2.3.3, Repoman-2.3.2

 .../{qemu-2.8.0-r6.ebuild => qemu-2.8.0-r7.ebuild} | 115 +++++++++++----------
 1 file changed, 59 insertions(+), 56 deletions(-)

diff --git a/app-emulation/qemu/qemu-2.8.0-r6.ebuild 
b/app-emulation/qemu/qemu-2.8.0-r7.ebuild
similarity index 93%
rename from app-emulation/qemu/qemu-2.8.0-r6.ebuild
rename to app-emulation/qemu/qemu-2.8.0-r7.ebuild
index 584a2e15773..4e09e1aca5f 100644
--- a/app-emulation/qemu/qemu-2.8.0-r6.ebuild
+++ b/app-emulation/qemu/qemu-2.8.0-r7.ebuild
@@ -410,58 +410,71 @@ qemu_src_configure() {
                $(use_enable xattr attr)
        )
 
-       # Disable options not used by user targets as the default configure
-       # options will autoprobe and try to link in a bunch of unused junk.
-       conf_softmmu() {
-               if [[ ${buildtype} == "softmmu" ]] ; then
-                       use_enable "$@"
-               else
+       # Disable options not used by user targets. This simplifies building
+       # static user targets (USE=static-user) considerably.
+       conf_notuser() {
+               if [[ ${buildtype} == "user" ]] ; then
                        echo "--disable-${2:-$1}"
+               else
+                       use_enable "$@"
                fi
        }
        conf_opts+=(
-               $(conf_softmmu accessibility brlapi)
-               $(conf_softmmu aio linux-aio)
-               $(conf_softmmu bzip2)
-               $(conf_softmmu bluetooth bluez)
-               $(conf_softmmu caps cap-ng)
-               $(conf_softmmu curl)
-               $(conf_softmmu fdt)
-               $(conf_softmmu glusterfs)
-               $(conf_softmmu gnutls)
-               $(conf_softmmu gnutls nettle)
-               $(conf_softmmu gtk)
-               $(conf_softmmu infiniband rdma)
-               $(conf_softmmu iscsi libiscsi)
-               $(conf_softmmu jpeg vnc-jpeg)
-               $(conf_softmmu kernel_linux kvm)
-               $(conf_softmmu lzo)
-               $(conf_softmmu ncurses curses)
-               $(conf_softmmu nfs libnfs)
-               $(conf_softmmu numa)
-               $(conf_softmmu opengl)
-               $(conf_softmmu png vnc-png)
-               $(conf_softmmu rbd)
-               $(conf_softmmu sasl vnc-sasl)
-               $(conf_softmmu sdl)
-               $(conf_softmmu seccomp)
-               $(conf_softmmu smartcard)
-               $(conf_softmmu snappy)
-               $(conf_softmmu spice)
-               $(conf_softmmu ssh libssh2)
-               $(conf_softmmu usb libusb)
-               $(conf_softmmu usbredir usb-redir)
-               $(conf_softmmu vde)
-               $(conf_softmmu vhost-net)
-               $(conf_softmmu virgl virglrenderer)
-               $(conf_softmmu virtfs)
-               $(conf_softmmu vnc)
-               $(conf_softmmu vte)
-               $(conf_softmmu xen)
-               $(conf_softmmu xen xen-pci-passthrough)
-               $(conf_softmmu xfs xfsctl)
+               $(conf_notuser accessibility brlapi)
+               $(conf_notuser aio linux-aio)
+               $(conf_notuser bzip2)
+               $(conf_notuser bluetooth bluez)
+               $(conf_notuser caps cap-ng)
+               $(conf_notuser curl)
+               $(conf_notuser fdt)
+               $(conf_notuser glusterfs)
+               $(conf_notuser gnutls)
+               $(conf_notuser gnutls nettle)
+               $(conf_notuser gtk)
+               $(conf_notuser infiniband rdma)
+               $(conf_notuser iscsi libiscsi)
+               $(conf_notuser jpeg vnc-jpeg)
+               $(conf_notuser kernel_linux kvm)
+               $(conf_notuser lzo)
+               $(conf_notuser ncurses curses)
+               $(conf_notuser nfs libnfs)
+               $(conf_notuser numa)
+               $(conf_notuser opengl)
+               $(conf_notuser png vnc-png)
+               $(conf_notuser rbd)
+               $(conf_notuser sasl vnc-sasl)
+               $(conf_notuser sdl)
+               $(conf_notuser seccomp)
+               $(conf_notuser smartcard)
+               $(conf_notuser snappy)
+               $(conf_notuser spice)
+               $(conf_notuser ssh libssh2)
+               $(conf_notuser usb libusb)
+               $(conf_notuser usbredir usb-redir)
+               $(conf_notuser vde)
+               $(conf_notuser vhost-net)
+               $(conf_notuser virgl virglrenderer)
+               $(conf_notuser virtfs)
+               $(conf_notuser vnc)
+               $(conf_notuser vte)
+               $(conf_notuser xen)
+               $(conf_notuser xen xen-pci-passthrough)
+               $(conf_notuser xfs xfsctl)
        )
 
+       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}"
+               conf_opts+=(
+                       --audio-drv-list="${audio_opts}"
+               )
+               use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) )
+               use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) )
+       fi
+
        case ${buildtype} in
        user)
                conf_opts+=(
@@ -473,21 +486,12 @@ qemu_src_configure() {
                local static_flag="static-user"
                ;;
        softmmu)
-               # 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}"
-
                conf_opts+=(
                        --disable-linux-user
                        --enable-system
                        --disable-tools
                        --with-system-pixman
-                       --audio-drv-list="${audio_opts}"
                )
-               use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) )
-               use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) )
                local static_flag="static"
                ;;
        tools)
@@ -496,7 +500,6 @@ qemu_src_configure() {
                        --disable-system
                        --disable-blobs
                        --enable-tools
-                       $(use_enable bzip2)
                )
                local static_flag="static"
                ;;

Reply via email to