summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@gentoo.org>2012-10-20 16:23:41 +0000
committerDoug Goldstein <cardoe@gentoo.org>2012-10-20 16:23:41 +0000
commitf0ceb33f4da0e717d2a3dfacf0e804a491590a79 (patch)
tree67088c86b8b3260e99ba5833e64bc17fe1d3e51d
parentMarked ~hppa (bug #438388). (diff)
downloadhistorical-f0ceb33f4da0e717d2a3dfacf0e804a491590a79.tar.gz
historical-f0ceb33f4da0e717d2a3dfacf0e804a491590a79.tar.bz2
historical-f0ceb33f4da0e717d2a3dfacf0e804a491590a79.zip
Restore the Gentoo patchset for qemu-kvm.
Package-Manager: portage-2.1.11.9/cvs/Linux x86_64
-rw-r--r--app-emulation/qemu/ChangeLog7
-rw-r--r--app-emulation/qemu/Manifest15
-rw-r--r--app-emulation/qemu/qemu-1.1.2-r1.ebuild368
3 files changed, 377 insertions, 13 deletions
diff --git a/app-emulation/qemu/ChangeLog b/app-emulation/qemu/ChangeLog
index 3a18395f1c14..77ac232d2392 100644
--- a/app-emulation/qemu/ChangeLog
+++ b/app-emulation/qemu/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-emulation/qemu
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.127 2012/10/11 09:40:02 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.128 2012/10/20 16:23:41 cardoe Exp $
+
+*qemu-1.1.2-r1 (20 Oct 2012)
+
+ 20 Oct 2012; Doug Goldstein <cardoe@gentoo.org> +qemu-1.1.2-r1.ebuild:
+ Restore the Gentoo patchset for qemu-kvm.
11 Oct 2012; Justin Lecher <jlec@gentoo.org> metadata.xml:
Add better USE description for jpeg and png
diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest
index b03245566c5c..b5563155adad 100644
--- a/app-emulation/qemu/Manifest
+++ b/app-emulation/qemu/Manifest
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA256
-
AUX 65-kvm.rules 40 SHA256 c16a8dc7855880b2651f1a3ff488ecc54d4ac1036c71fffd5007021d8d18a7c5 SHA512 98aad2a2f212a7ac0ee5b60a9c92744fa462bce5f26594845c7a31d692aaaca2d52cb57bdbede7dfc60b9862c2a6510665dbb03215d5cf76e62516a283decdd6 WHIRLPOOL 937de93a23930f6b8533f0c3e0dd249c99ddf7d54446dea857607266ac0a4b435c5b4a52b2986b138bace9c0a7ade66f94116b38e2bc4767ead54bd11baf0920
AUX qemu-0.11.0-mips64-user-fix.patch 313 SHA256 b4173fc177bd0d0ba67f5551a3512047a19a9b2c0a122f968e32fbd834848d2f SHA512 ca7f92b7d094ed62c15e539ac760aab50255699edfd6faf2bc017e13fb73da66f455c07999c6ee6a1f2196b7c0a2e2caa6c7a584be22d04717d1abea08781dbf WHIRLPOOL 2eb95b7dd79e30ecd4b50a4901553866180c0022760cb1e425bb23f14411ef84356db00eca593230d8fc204f5f5b724567d051fad299a8d6bdb81a346bfa7436
AUX qemu-0.11.1-CVE-2012-0029-backport.patch 1448 SHA256 fb739ca478977f17b73489823b92d8964da1bb308db997596e1160900f2c9236 SHA512 d143a497af349aa58a4542754c757a73bc9ab89ed54498c6d22a18452634f81a8d009aaa3aa4a9a06888af4461987390b8ccae7b2e4c9f5095b38bcb108c608a WHIRLPOOL ae30b58043818d0643d04b689105fb19ded7220152b838305d1db30ad6d47a0230acbeaae788a833246d5c0b975a2106421ba561332c2c5aa7c9e4bf05e9dea0
@@ -18,20 +15,14 @@ DIST qemu-0.11.1.tar.gz 3830070 SHA256 2ecd2fc0af2ce5d96067ae82cc98a08275c596de5
DIST qemu-1.2.0.tar.bz2 9865186 SHA256 c8b84420d9f4869397f84cad2dabd9a475b7723d619a924a873740353e9df936 SHA512 b590ea4ff484abc1abf2d3ec3fb294d4ece24d2dfa0a179d9c5f60baca0ea474d47a560f5d95b010a53a5563793414f3257240c5e9917a8d0f556a2066ccd60e WHIRLPOOL 5e5a5f09b828b0aff6139d7efad4dd0d1ed8d86badc2657f7ea53352aa1dbb6e6e227501f7ab63f7e95ee248007942ae94431b7f99092a4ed7005c345b10ca4e
DIST qemu-kvm-1.1.1-bp-1.tar.xz 2908 SHA256 16b7cd2e10b3a05d20006898bcfdb26eb596f7c7d3c0e18fb216cb2b2026af40 SHA512 781eae1fdc1cb7482d3d6fd1cf81e0d565588e3987fc4cab92abc06741b1b57d999b0de1fffce7270f50033b53c5707e4ef477ca3b7ddfca3dc1a432c1e15cc7 WHIRLPOOL 3f80b4cc9902021686bea823a41af136d21dd5a6b8aa59913aeb8697c3a38acc02d92ee59b9d052b6d161830a72d709fe684beb95f756a92216fe79cce4c5d9a
DIST qemu-kvm-1.1.1.tar.gz 6599376 SHA256 c6fab57ccadcad5deb34728623840a0141a0f3c8f29d0c253db577f059c796df SHA512 1106a35212cdac1fe5b043af6754595d03232f22bf74cdab86973759adb3cff2d3d7b42290883d2d99d97d163fe274de0108a05eed906ffdc3349c0631f52492 WHIRLPOOL 4d9b2b788a7f87104032635b3b6e2cd96275b92683e3003510b0951536ed6bcb959959bc7529e3f912a7a2055b5c1710b9310d591a8b443a17a231e5b86f6105
+DIST qemu-kvm-1.1.2-2612b38e.tar.xz 4736 SHA256 c1a00380591b1b2b902c2aa1ea881c216997f18e33b466108b8c52178a829258 SHA512 f27e52bbb8f7c8c5a6f3b3de2966d7000d77178c6522a6311abd366913fc40582106b27fb7b37620c0a2a39346b6edd8827a2a4f31c654bd32adadb023ff325d WHIRLPOOL a5aefd25af0dccf177e7897690433841aaba8629ef6bf8e40a22176508ef4fec5a0f65a9b618b74bb8ab3420f36604b9a736a1a5ba665dee52e6a471693b88f3
DIST qemu-kvm-1.1.2.tar.gz 6605075 SHA256 2be9cb9986c0b67ef97a2d21a51a945e91c4032b8c4229297461d8ed91f95178 SHA512 c1fc6a91276347ec2188c9fa8750b51ed14116ea0a7afc74e0ddf305e9f175a6c16d3dc6ef1ee52926c4d8b9bd0fd5465041f32ec24ce315059062a078e2df82 WHIRLPOOL f21af6107de2343c6a45cbd6aa97cbc58e36a37c37db42110397658a2c303d63e5af96b84b778b5f08e958a5e65a84088c596e1b83cbdcd4009efff64dab4d09
EBUILD qemu-0.11.1-r1.ebuild 4894 SHA256 25ef257efc5ee950d5f93ad3dc059c24cc8104e094b62840477ec719c66bd5f5 SHA512 0afcc745a78a23a8fba3cdd518595894f4ed12b4048b128c55be3f53c96f97d7701dd5bebbfcbb06cf37da617a78f3813f847792542e27e85e932ba9395eb542 WHIRLPOOL 3b606df1b67a37b61f858a0e76133867b2c281d0cde1024c510cf4bcdb433e25db117bd817e6e91eadf0d42246c55873e69078bb5f4c212122fc89a36cd7c5c4
EBUILD qemu-0.11.1.ebuild 4826 SHA256 7aaf359e5b09721faeb9b97ff0fd8ac4c91ba8906d8f9439ac21550af786fcda SHA512 5a9631fe38c86b1fd56519544f381ab4fdb064004a1b229adda361916724ef88451dd72713c61b092a056111a7a66143d9dd0e4b5638a69f9c782f21b63d2289 WHIRLPOOL 2c50d082e32176108d661a199dd9633c4d5bdd94288921d443148c62657cf9f8f24db268f0babf4fdc707d24e3f317e0a019670104849b6b00b272cb505a2006
EBUILD qemu-1.1.1-r1.ebuild 12073 SHA256 7f408c7425a3e34d31e48a6c886d4a415a970e7d2fb4ffaf58b44f9d9e88f50c SHA512 efd0c757fab7fa7e06b86e32fcedd0347f8728a7ea0bf67718b34b3b0c0135450276fc13ec02755d173626a5e69f09d5382afe2e901c310f3b50efb2e3e2f21a WHIRLPOOL 63949afad70876a426db6808a60d09d0fcf98e221afc24005181114203bb6586509620dee18b9009cf602c57cc0429cb8e718fc89c44a1d64ac2d7309f9ddb67
+EBUILD qemu-1.1.2-r1.ebuild 12070 SHA256 5f3b8052bebdbf6eb27755fb7635c363b0639f54aa2bfa2e5c1bbb054cf0f46f SHA512 0eeca6486a6906ba7a90431f3b4177ae220efde83cb6b6857a058d5fd98f1bcac4cdfa9af4f891dfc167387ef5c456784bcd563e8ff1db89df552f69cfe4fbf8 WHIRLPOOL 430b799979dc5d9412fab9a7f6a5d342081d7a3f1b8264d70d8b09ce99c719ef742c55f176209dc7b60390fb58c5c310bb53059178ab4e0f3c4e2c89484a5114
EBUILD qemu-1.1.2.ebuild 12064 SHA256 5943cf3394891d8fd046f6e8e350af67417ee648c97935fcd44efd3e17d713a4 SHA512 245e913027ab3dda208582f36d35258d3fc0bbb44edf8de13eb31f5e04f289364ae814ee39c12f271fc9d501038838d3377df605044bc4a595a62f6b11fd47fe WHIRLPOOL a5a43d4660bebac1e257d1fed3bcf6aecca53dbba45fb50c77ea1200334cb677d6867be1e05b3a15414f87472332bab2e43a75247ac162894fa475e65fceebdc
EBUILD qemu-1.2.0.ebuild 6781 SHA256 c3315377ba5fe331fa028bc2e1dc4231b09c9180856732943e5fb3b5534c9445 SHA512 68d1422c70f52461294ac703cb8bb6c6daca0efa41fa994f034d5dfc5a47674774b9e60cc03eefe9f635b750a6b089a3333b95ef3be0792d1648437a14a13017 WHIRLPOOL c6ed1c57c820d77c804f6ff5127aa0e16b3597462c3c0005cb1d8a364ac7f84ff00b641d1e95a1d914e48b8e2a1421b326d3095af56163179afe51548d15d4f2
EBUILD qemu-9999.ebuild 12834 SHA256 f0e9ef23ebe1b7d16269620237cc12fd6c2158dad5bd001c4c6d3007dc2cbd88 SHA512 ee609002815e041ee022ac3aa738ba7bfb38a40457fc99724c9f155f51a0a2b760f5346ddb42c5da051a375a6206c178f5db197e5c3d4f109f177d0105d1f306 WHIRLPOOL a09d752353ed41e437916525d38a70848c29fe8f7b93b234e71dd84c829967ed3158dba4e6f1c08ae9538d50e2d0107a5d3048986f56db91db477db3a0275e66
-MISC ChangeLog 19482 SHA256 62809988766cfb01a1e052bdc4de78e253cbd5d003169a54c9f1beff0725bb40 SHA512 59ff3dff9b53fbeba63eda26e08bddc0a4e00f164f7de17424036e7fd9024321da595cea96895a28fa11852c9a0e917c9a22ef1b8cd13a4db57e8f4cdfb62411 WHIRLPOOL 299201252ea5ee3346c5b71e199a3088ae35735cf1e116e563f59e04e434018bc26894de2189924ede30af679eaee519f0c64ff02f88879bb3cd53738894765e
+MISC ChangeLog 19632 SHA256 cc124983f49eb9c53caf1fe00d6104932c68354cd7a3dcf75a4f09373c99f293 SHA512 e42269e1b0fbb710e73450432d2ff2329cbdda7a3d2838c04c4449bc3b4a5d2eeb0b7ba0affc45b975adb785c5c3c0552f7078c12c738ed58c1cd36adb26077e WHIRLPOOL c19d1f574bf1c76e9b0cba7db1f451581c95d5bbaae3d091a7b9629de97ce795e4da6ec53ab8759fed91e236910b4e8b22d06e63b0f235e65b1769513fd704b6
MISC metadata.xml 2855 SHA256 dbab1b21199efeb9b1af9513ea1b6cf6d2afc0bcb68657d4e281db3a7cc38299 SHA512 77b690ac05c7a4d3266b8040684ccf1cbcc53220fc0737cde801db4510dcb2b6a3053a8116eb2d9b91ff9cffd3ec0e6d46ae93674b38b95f1ece7e5c7635a0ce WHIRLPOOL 70b34675609d4aa2ee27301cefea28c48bf49e4b3371b14cee57b12f15e4f1d4c9cd237f40562116709c225d31a1d19f08be415252e902eec7d38bf911ed20da
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.19 (GNU/Linux)
-Comment: GPGTools - http://gpgtools.org
-
-iEYEAREIAAYFAlB2k/MACgkQgAnW8HDreRZxsgCgvE9YBxFawAmIydcSlIGe12m8
-XCcAn3GHKiQdzrvYLXUo026vKmIkFN9W
-=5RKQ
------END PGP SIGNATURE-----
diff --git a/app-emulation/qemu/qemu-1.1.2-r1.ebuild b/app-emulation/qemu/qemu-1.1.2-r1.ebuild
new file mode 100644
index 000000000000..d1433020d333
--- /dev/null
+++ b/app-emulation/qemu/qemu-1.1.2-r1.ebuild
@@ -0,0 +1,368 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-1.1.2-r1.ebuild,v 1.1 2012/10/20 16:23:41 cardoe Exp $
+
+EAPI="4"
+
+MY_PN="qemu-kvm"
+MY_P=${MY_PN}-${PV}
+
+PYTHON_DEPEND="2"
+inherit eutils flag-o-matic linux-info toolchain-funcs multilib python user
+BACKPORTS=2612b38e
+
+if [[ ${PV} = *9999* ]]; then
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git"
+ inherit git-2
+ SRC_URI=""
+ KEYWORDS=""
+else
+ SRC_URI="mirror://sourceforge/kvm/${MY_PN}/${MY_P}.tar.gz
+ ${BACKPORTS:+
+ http://dev.gentoo.org/~cardoe/distfiles/${MY_P}-${BACKPORTS}.tar.xz}"
+ KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+fi
+
+DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
+HOMEPAGE="http://www.linux-kvm.org"
+
+LICENSE="GPL-2 LGPL-2 BSD-2"
+SLOT="0"
+IUSE="+aio alsa bluetooth brltty +caps +curl debug doc fdt +jpeg kernel_linux \
+kernel_FreeBSD mixemu ncurses opengl +png pulseaudio python rbd sasl sdl \
+smartcard spice static systemtap tci +threads tls usbredir +uuid vde +vhost-net \
+virtfs +vnc xattr xen xfs"
+
+COMMON_TARGETS="i386 x86_64 alpha arm cris m68k microblaze microblazeel mips mipsel ppc ppc64 sh4 sh4eb sparc sparc64 s390x"
+IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 mips64 mips64el ppcemb xtensa xtensaeb"
+IUSE_USER_TARGETS="${COMMON_TARGETS} armeb ppc64abi32 sparc32plus unicore32"
+
+# Setup the default SoftMMU targets, while using the loops
+# below to setup the other targets.
+IUSE="${IUSE}"
+REQUIRED_USE="|| ("
+
+for target in ${IUSE_SOFTMMU_TARGETS}; do
+ IUSE="${IUSE} qemu_softmmu_targets_${target}"
+ REQUIRED_USE="${REQUIRED_USE} qemu_softmmu_targets_${target}"
+done
+REQUIRED_USE="${REQUIRED_USE} )"
+
+for target in ${IUSE_USER_TARGETS}; do
+ IUSE="${IUSE} qemu_user_targets_${target}"
+done
+
+REQUIRED_USE="${REQUIRED_USE}
+ static? ( !alsa !pulseaudio )
+ virtfs? ( xattr )"
+
+# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
+LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)]
+ sys-apps/pciutils[static-libs(+)]
+ sys-libs/zlib[static-libs(+)]
+ aio? ( dev-libs/libaio[static-libs(+)] )
+ caps? ( sys-libs/libcap-ng[static-libs(+)] )
+ curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
+ fdt? ( >=sys-apps/dtc-1.2.0[static-libs(+)] )
+ jpeg? ( virtual/jpeg[static-libs(+)] )
+ ncurses? ( sys-libs/ncurses[static-libs(+)] )
+ png? ( media-libs/libpng[static-libs(+)] )
+ rbd? ( sys-cluster/ceph[static-libs(+)] )
+ sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
+ sdl? ( >=media-libs/libsdl-1.2.11[static-libs(+)] )
+ spice? ( >=app-emulation/spice-0.9.0[static-libs(+)] )
+ tls? ( net-libs/gnutls[static-libs(+)] )
+ uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] )
+ vde? ( net-misc/vde[static-libs(+)] )
+ xattr? ( sys-apps/attr[static-libs(+)] )
+ xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+ !app-emulation/kqemu
+ !app-emulation/qemu
+ !<app-emulation/qemu-1.0
+ >=sys-firmware/seabios-1.7.0
+ sys-firmware/sgabios
+ sys-firmware/vgabios
+ alsa? ( >=media-libs/alsa-lib-1.0.13 )
+ bluetooth? ( net-wireless/bluez )
+ brltty? ( app-accessibility/brltty )
+ opengl? ( virtual/opengl )
+ pulseaudio? ( media-sound/pulseaudio )
+ python? ( =dev-lang/python-2*[ncurses] )
+ sdl? ( media-libs/libsdl[X] )
+ smartcard? ( dev-libs/nss )
+ spice? ( >=app-emulation/spice-protocol-0.8.1 )
+ systemtap? ( dev-util/systemtap )
+ usbredir? ( sys-apps/usbredir )
+ virtfs? ( sys-libs/libcap )
+ xen? ( app-emulation/xen-tools )"
+
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-text/texi2html )
+ kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
+ static? ( ${LIB_DEPEND} )"
+
+S="${WORKDIR}/${MY_P}"
+
+STRIP_MASK="/usr/share/qemu/palcode-clipper"
+
+QA_PREBUILT="
+ usr/share/qemu/openbios-ppc
+ usr/share/qemu/openbios-sparc64
+ usr/share/qemu/openbios-sparc32
+ usr/share/qemu/palcode-clipper"
+
+QA_WX_LOAD="${QA_PRESTRIPPED}
+ usr/bin/qemu-i386
+ usr/bin/qemu-x86_64
+ usr/bin/qemu-alpha
+ usr/bin/qemu-arm
+ usr/bin/qemu-cris
+ usr/bin/qemu-m68k
+ usr/bin/qemu-microblaze
+ usr/bin/qemu-mips
+ usr/bin/qemu-mipsel
+ usr/bin/qemu-ppc
+ usr/bin/qemu-ppc64
+ usr/bin/qemu-ppc64abi32
+ usr/bin/qemu-sh4
+ usr/bin/qemu-sh4eb
+ usr/bin/qemu-sparc
+ usr/bin/qemu-sparc64
+ usr/bin/qemu-armeb
+ usr/bin/qemu-sparc32plus"
+
+pkg_pretend() {
+ if use kernel_linux && kernel_is lt 2 6 25; then
+ eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
+ elif use kernel_linux; then
+ if ! linux_config_exists; then
+ eerror "Unable to check your kernel for KVM support"
+ else
+ CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
+ ERROR_KVM="You must enable KVM in your kernel to continue"
+ ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
+ ERROR_KVM_AMD+=" your kernel configuration."
+ ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
+ ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
+ ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
+ ERROR_TUN+=" into your kernel or loaded as a module to use the"
+ ERROR_TUN+=" virtual network device if using -net tap."
+ ERROR_BRIDGE="You will also need support for 802.1d"
+ ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
+ use vhost-net && CHECK_CHECK+=" ~VHOST_NET"
+ ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
+ ERROR_VHOST_NET+=" support"
+
+ if use amd64 || use x86 || use amd64-linux || use x86-linux; then
+ CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
+ fi
+
+ use python && CONFIG_CHECK+=" ~DEBUG_FS"
+ ERROR_DEBUG_FS="debugFS support required for kvm_stat"
+
+ # Now do the actual checks setup above
+ check_extra_config
+ fi
+ fi
+
+ if use static; then
+ ewarn "USE=static is very much a moving target because of the packages"
+ ewarn "we depend on will have their static libs ripped out or wrapped"
+ ewarn "with USE=static-libs or USE=static due to continued dicsussion"
+ ewarn "on the mailing list about USE=static's place in Gentoo. As a"
+ ewarn "result what worked today may not work tomorrow."
+ fi
+}
+
+pkg_setup() {
+ python_set_active_version 2
+ python_pkg_setup
+
+ enewgroup kvm 78
+}
+
+src_prepare() {
+ # Alter target makefiles to accept CFLAGS set via flag-o
+ sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \
+ Makefile Makefile.target || die
+
+ python_convert_shebangs -r 2 "${S}/scripts/kvm/kvm_stat"
+
+ [[ -n ${BACKPORTS} ]] && \
+ EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \
+ epatch
+
+ epatch_user
+}
+
+src_configure() {
+ local conf_opts audio_opts user_targets
+
+ for target in ${IUSE_SOFTMMU_TARGETS} ; do
+ use "qemu_softmmu_targets_${target}" && \
+ softmmu_targets="${softmmu_targets} ${target}-softmmu"
+ done
+
+ for target in ${IUSE_USER_TARGETS} ; do
+ use "qemu_user_targets_${target}" && \
+ user_targets="${user_targets} ${target}-linux-user"
+ done
+
+ einfo "Building the following softmmu targets: ${softmmu_targets}"
+
+ if [[ -n ${user_targets} ]]; then
+ einfo "Building the following user targets: ${user_targets}"
+ conf_opts="${conf_opts} --enable-linux-user"
+ else
+ conf_opts="${conf_opts} --disable-linux-user"
+ fi
+
+ # Add support for SystemTAP
+ use systemtap && conf_opts="${conf_opts} --enable-trace-backend=dtrace"
+
+ # Fix QA issues. QEMU needs executable heaps and we need to mark it as such
+ #conf_opts="${conf_opts} --extra-ldflags=-Wl,-z,execheap"
+
+ # Add support for static builds
+ use static && conf_opts="${conf_opts} --static --disable-pie"
+
+ # We always want to attempt to build with PIE support as it results
+ # in a more secure binary. But it doesn't work with static or if
+ # the current GCC doesn't have PIE support.
+ if ! use static && gcc-specs-pie; then
+ conf_opts="${conf_opts} --enable-pie"
+ fi
+
+ # audio options
+ audio_opts="oss"
+ use alsa && audio_opts="alsa,${audio_opts}"
+ use sdl && audio_opts="sdl,${audio_opts}"
+ use pulseaudio && audio_opts="pa,${audio_opts}"
+ use mixemu && conf_opts="${conf_opts} --enable-mixemu"
+
+ # --enable-vnc-thread will go away in 1.2
+ # $(use_enable xen xen-pci-passthrough) for 1.2
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-bsd-user \
+ --disable-guest-agent \
+ --disable-libiscsi \
+ --disable-strip \
+ --disable-werror \
+ --python=python2 \
+ $(use_enable aio linux-aio) \
+ $(use_enable bluetooth bluez) \
+ $(use_enable brltty brlapi) \
+ $(use_enable caps cap-ng) \
+ $(use_enable curl) \
+ $(use_enable debug debug-info) \
+ $(use_enable debug debug-mon) \
+ $(use_enable debug debug-tcg) \
+ $(use_enable doc docs) \
+ $(use_enable fdt) \
+ $(use_enable jpeg vnc-jpeg) \
+ $(use_enable kernel_linux kvm) \
+ $(use_enable kernel_linux kvm-device-assignment) \
+ $(use_enable kernel_linux nptl) \
+ $(use_enable ncurses curses) \
+ $(use_enable opengl) \
+ $(use_enable png vnc-png) \
+ $(use_enable rbd) \
+ $(use_enable sasl vnc-sasl) \
+ $(use_enable sdl) \
+ $(use_enable smartcard smartcard) \
+ $(use_enable smartcard smartcard-nss) \
+ $(use_enable spice) \
+ $(use_enable tci tcg-interpreter) \
+ $(use_enable threads vnc-thread) \
+ $(use_enable tls vnc-tls) \
+ $(use_enable usbredir usb-redir) \
+ $(use_enable uuid) \
+ $(use_enable vde) \
+ $(use_enable vhost-net) \
+ $(use_enable virtfs) \
+ $(use_enable vnc) \
+ $(use_enable xattr attr) \
+ $(use_enable xen) \
+ $(use_enable xfs xfsctl) \
+ --audio-drv-list=${audio_opts} \
+ --target-list="${softmmu_targets} ${user_targets}" \
+ --cc="$(tc-getCC)" \
+ --host-cc="$(tc-getBUILD_CC)" \
+ ${conf_opts} \
+ || die "configure failed"
+
+ # FreeBSD's kernel does not support QEMU assigning/grabbing
+ # host USB devices yet
+ use kernel_FreeBSD && \
+ sed -E -e "s|^(HOST_USB=)bsd|\1stub|" -i "${S}"/config-host.mak
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+
+ if [[ -n ${softmmu_targets} ]]; then
+ if use kernel_linux; then
+ insinto /lib/udev/rules.d/
+ doins "${FILESDIR}"/65-kvm.rules
+ fi
+
+ if use qemu_softmmu_targets_x86_64 ; then
+ dobin "${FILESDIR}"/qemu-kvm
+ ewarn "The depreciated '/usr/bin/kvm' symlink is no longer installed"
+ ewarn "You should use '/usr/bin/qemu-kvm', you may need to edit"
+ ewarn "your libvirt configs or other wrappers for ${PN}"
+ else
+ elog "You disabled QEMU_SOFTMMU_TARGETS=x86_64, this disables install"
+ elog "of /usr/bin/qemu-kvm"
+ fi
+ fi
+
+ dodoc Changelog MAINTAINERS TODO pci-ids.txt
+ newdoc pc-bios/README README.pc-bios
+
+ if use doc; then
+ dohtml qemu-doc.html qemu-tech.html || die
+ fi
+
+ use python & dobin scripts/kvm/kvm_stat
+
+ # Remove SeaBIOS since we're using the SeaBIOS packaged one
+ rm "${ED}/usr/share/qemu/bios.bin"
+ dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
+
+ # Remove vgabios since we're using the vgabios packaged one
+ rm "${ED}/usr/share/qemu/vgabios.bin"
+ rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
+ rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
+ rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
+ rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
+ dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin
+ dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
+ dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
+ dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
+ dosym ../vgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
+
+ # Remove sgabios since we're using the sgabios packaged one
+ rm "${ED}/usr/share/qemu/sgabios.bin"
+ dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
+}
+
+pkg_postinst() {
+ if [[ -n ${softmmu_targets} ]]; then
+ elog "If you don't have kvm compiled into the kernel, make sure you have"
+ elog "the kernel module loaded before running kvm. The easiest way to"
+ elog "ensure that the kernel module is loaded is to load it on boot."
+ elog "For AMD CPUs the module is called 'kvm-amd'"
+ elog "For Intel CPUs the module is called 'kvm-intel'"
+ elog "Please review /etc/conf.d/modules for how to load these"
+ elog
+ elog "Make sure your user is in the 'kvm' group"
+ elog "Just run 'gpasswd -a <USER> kvm', then have <USER> re-login."
+ elog
+ elog "The ssl USE flag was renamed to tls, so adjust your USE flags."
+ elog "The nss USE flag was renamed to smartcard, so adjust your USE flags."
+ fi
+}