Refactor the way that SoftMMU targets are enabled by default and detect which
authorDoug Goldstein <cardoe@gentoo.org>
Fri, 22 Jul 2011 14:57:51 +0000 (14:57 +0000)
committerDoug Goldstein <cardoe@gentoo.org>
Fri, 22 Jul 2011 14:57:51 +0000 (14:57 +0000)
ones users have on. This fixes bug #375957 and #375949.

Package-Manager: portage-2.1.10.7/cvs/Linux x86_64

app-emulation/qemu-kvm/ChangeLog
app-emulation/qemu-kvm/Manifest
app-emulation/qemu-kvm/qemu-kvm-0.14.1-r2.ebuild

index 7fcfed345f30b5ca6015dd6af122a8d2b0e6ed26..24fd3be0b3ca72de7c796aa8bcf6638d56f15476 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for app-emulation/qemu-kvm
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.59 2011/07/21 21:47:51 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/ChangeLog,v 1.60 2011/07/22 14:57:51 cardoe Exp $
+
+  22 Jul 2011; Doug Goldstein <cardoe@gentoo.org> qemu-kvm-0.14.1-r2.ebuild:
+  Refactor the way that SoftMMU targets are enabled by default and detect which
+  ones users have on. This fixes bug #375957 and #375949.
 
   21 Jul 2011; Doug Goldstein <cardoe@gentoo.org> -qemu-kvm-0.14.1-r1.ebuild:
   Remove old version
index 43f5a67016ef6cbbf924290788364a53e7e23e37..ce82643d8e8c9fcc2254c09ae279dd207117098f 100644 (file)
@@ -7,7 +7,7 @@ DIST qemu-kvm-0.13.0.tar.gz 5153895 RMD160 7b8f4d8cdbb9730bb9d7fbf4cec165a870369
 DIST qemu-kvm-0.14.1-backports-2.tar.bz2 20045 RMD160 a6dfdfc4969ff96d287af389c99c9df9df16ff07 SHA1 4ea70f09ca8d24e30d307319352d9857031d3ccb SHA256 ab0e30b550475b379215d2fdeae9be2b8ad4e66a42bfad406683132892ea5982
 DIST qemu-kvm-0.14.1.tar.gz 5321321 RMD160 e3d69b4756bb0e45d14baad72d85827d949e0ae0 SHA1 7378f10ea04db19e5a5009cae1ecb65517e82877 SHA256 a59c4f6ab8646f2f019d2f9f15443e4db8289cf7cf47743d3c63d18fc584da27
 EBUILD qemu-kvm-0.13.0-r2.ebuild 7933 RMD160 92674548b241a1e698820ab892e145ea9cf10c11 SHA1 d2ab36fb81a4d63a1726ffec53eb83f35a986e0b SHA256 794d92dbcbef069f140051091a17853ddabe11baa1b55bc76bfc7319e7ece635
-EBUILD qemu-kvm-0.14.1-r2.ebuild 8815 RMD160 b054ffed939f197fd8081147579b6dffc90c02cf SHA1 4a4e0cb41f4cef4a596938fde30d04cf71e5a960 SHA256 aab1be8e246c3db97f13838cf08e86602cca0dd5d8c996316d120641b29ed00e
+EBUILD qemu-kvm-0.14.1-r2.ebuild 9073 RMD160 4791ae5e962aec333845734e0dd61bf9c0155e32 SHA1 db12166eef29c1720499639bdde5a06a75cb6d44 SHA256 6efc717a015b12a6fb8bda70b4e382e730cfb96752870785549095184b5570a3
 EBUILD qemu-kvm-9999.ebuild 8365 RMD160 0b58833811ff033e62ee45b1b5ba2232746e432b SHA1 3eec4fd431bf1dc597714ef39d4205c08aacf077 SHA256 3720954c6247b4aa767b22d9d835313892bfb0792e9a0e22e736c66ca2e5a8fb
-MISC ChangeLog 13494 RMD160 13418fe98230079d7ea89afaffd3859e32c541fb SHA1 14db5aeb5a2e38abb9f6567a91d5dc30118ccdd1 SHA256 59c9ed4d8cfeb9dadc5fb13299e379cca4ed4d5bd91a1b4e6feb0feb8975c659
+MISC ChangeLog 13710 RMD160 3cd1e1d4727f412cf740c4168332a4bec8820d29 SHA1 3f7059aa60a0420977ed628d808068eb54d44ee1 SHA256 89e297454140ce57cafbb8895a4296a3461a56b8076b9258fa6b852bdf504442
 MISC metadata.xml 1492 RMD160 aca7aa5f18297340d955e4f015c521d2fa82ac31 SHA1 2b141c7a4a4dba5eb734dc48537d6b8356320410 SHA256 7a450ebff5eec77efb6b8a209ca44c4e648c37932914ae243b869ef7dbb17c9e
index 4a167caf9c774f4c9dc92d97b67b44b4268913d5..23434271a2b2fdca19b36e0ffc0bbeaf1cb6d7f4 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-0.14.1-r2.ebuild,v 1.1 2011/07/21 20:52:11 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu-kvm/qemu-kvm-0.14.1-r2.ebuild,v 1.2 2011/07/22 14:57:51 cardoe Exp $
 
 BACKPORTS=2
 
@@ -34,16 +34,19 @@ png pulseaudio qemu-ifup rbd sasl sdl spice ssl threads vde \
 # static, depends on libsdl being built with USE=static-libs, which can not
 # be expressed in current EAPI's
 
-COMMON_TARGETS="arm cris m68k microblaze mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64"
+COMMON_TARGETS="i386 x86_64 arm cris m68k microblaze mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64"
 IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} mips64 mips64el ppcemb"
-IUSE_USER_TARGETS="${COMMON_TARGETS} i386 x86_64 alpha armeb ppc64abi32 sparc32plus"
+IUSE_USER_TARGETS="${COMMON_TARGETS} alpha armeb ppc64abi32 sparc32plus"
 
 # Setup the default SoftMMU targets, while using the loops
-# below to setup the other targets. i386 & x86_64 should be the only
+# below to setup the other targets. x86_64 should be the only
 # defaults on for qemu-kvm
-IUSE="${IUSE} +qemu_softmmu_targets_i386 +qemu_softmmu_targets_x86_64"
+IUSE="${IUSE} +qemu_softmmu_targets_x86_64"
 
 for target in ${IUSE_SOFTMMU_TARGETS}; do
+       if [ "x${target}" = "xx86_64" ]; then
+               continue
+       fi
        IUSE="${IUSE} qemu_softmmu_targets_${target}"
 done
 
@@ -98,7 +101,13 @@ kvm_kern_warn() {
 }
 
 pkg_setup() {
-       use qemu_softmmu_targets_x86_64 || ewarn "You disabled default target QEMU_SOFTMMU_TARGETS=x86_64"
+       if ! use qemu_softmmu_targets_x86_64 && use x86_64 ; then
+               eerror "You disabled default target QEMU_SOFTMMU_TARGETS=x86_64"
+       fi
+
+       if ! use qemu_softmmu_targets_x86_64 && use x86 ; then
+               eerror "You disabled default target QEMU_SOFTMMU_TARGETS=x86_64"
+       fi
 
        if kernel_is lt 2 6 25; then
                eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
@@ -154,7 +163,8 @@ src_configure() {
        done
 
        if [ -z "${softmmu_targets}" ]; then
-               conf_opts="${conf_opts} --disable-system"
+               eerror "All SoftMMU targets are disabled. This is invalid for qemu-kvm"
+               die "At least 1 SoftMMU target must be enabled"
        else
                einfo "Building the following softmmu targets: ${softmmu_targets}"
        fi