Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/qemu/
Date: Mon, 05 Sep 2016 05:30:19
Message-Id: 1473053400.681f5aaab1ddbbc1e8b923638e1da24d7feca688.tamiko@gentoo
1 commit: 681f5aaab1ddbbc1e8b923638e1da24d7feca688
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 5 04:51:35 2016 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 5 05:30:00 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=681f5aaa
7
8 app-emulation/qemu: drop vulnerable 2.6.0
9
10 Package-Manager: portage-2.2.28
11
12 app-emulation/qemu/Manifest | 1 -
13 app-emulation/qemu/qemu-2.6.0.ebuild | 679 -----------------------------------
14 app-emulation/qemu/qemu-2.7.0.ebuild | 1 +
15 3 files changed, 1 insertion(+), 680 deletions(-)
16
17 diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest
18 index ffbb5ee..773b14d 100644
19 --- a/app-emulation/qemu/Manifest
20 +++ b/app-emulation/qemu/Manifest
21 @@ -1,3 +1,2 @@
22 DIST qemu-2.5.1.tar.bz2 25464539 SHA256 028752c33bb786abbfe496ba57315dc5a7d0a33b5a7a767f6d7a29020c525d2c SHA512 66959ad6a2a89f23c5daba245c76f71ddc03a33a1167bca639a042ebbf7329b2e698cd2c0e65c22a9874563a34256a48386aa9df6475b06d38db74187e3e3b3f WHIRLPOOL 32525271574692d56b7794dc63606659f46e6ae19a56dee31b3cec33dab9c4eb74147a65db4940229492d8680f38c2d05bc2a8fbcb4b6887b0c1cbe5fbbe44cf
23 -DIST qemu-2.6.0.tar.bz2 25755267 SHA256 c9ac4a651b273233d21b8bec32e30507cb9cce7900841febc330956a1a8434ec SHA512 0d17075e52f7688cc05776ad7a76509d1f22ae8eda896fddb06c1fd6dea6da485422c8efb3ba118b054d9a413b7b02baba656a9131658dabdb71def50c92b215 WHIRLPOOL f9373bf66f67301787e7510ac161b0072ba7c7bc067e10215fb97a52524adaba0fcbc79a4c0cefac9c6e2b4e07380eb9d10f65ed6ce6867e43843043684231ed
24 DIST qemu-2.7.0.tar.bz2 26867760 SHA256 326e739506ba690daf69fc17bd3913a6c313d9928d743bd8eddb82f403f81e53 SHA512 654acaa7b3724a288e5d7e2a26ab780d9c9ed9f647fba00a906cbaffbe9d58fd666f2d962514aa2c5b391b4c53811ac3170d2eb51727f090bd19dfe45ca9a9db WHIRLPOOL dcb3e5f7da89dd8e14d636d7ebd476e076e0043880bb9ea3fb1c03cb4bcd4e5c7d3c4719da26c3ce521e3a3db5ae671e86f198ac1bc3474e774d75504fef8b8d
25
26 diff --git a/app-emulation/qemu/qemu-2.6.0.ebuild b/app-emulation/qemu/qemu-2.6.0.ebuild
27 deleted file mode 100644
28 index e45a5d1..00000000
29 --- a/app-emulation/qemu/qemu-2.6.0.ebuild
30 +++ /dev/null
31 @@ -1,679 +0,0 @@
32 -# Copyright 1999-2016 Gentoo Foundation
33 -# Distributed under the terms of the GNU General Public License v2
34 -
35 -EAPI="5"
36 -
37 -PYTHON_COMPAT=( python2_7 )
38 -PYTHON_REQ_USE="ncurses,readline"
39 -
40 -PLOCALES="de_DE fr_FR hu it tr zh_CN"
41 -
42 -inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
43 - user udev fcaps readme.gentoo pax-utils l10n
44 -
45 -if [[ ${PV} = *9999* ]]; then
46 - EGIT_REPO_URI="git://git.qemu.org/qemu.git"
47 - inherit git-2
48 - SRC_URI=""
49 -else
50 - SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2"
51 - KEYWORDS="~amd64 ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
52 -fi
53 -
54 -DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
55 -HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
56 -
57 -LICENSE="GPL-2 LGPL-2 BSD-2"
58 -SLOT="0"
59 -IUSE="accessibility +aio alsa bluetooth bzip2 +caps +curl debug +fdt glusterfs \
60 -gnutls gtk gtk2 infiniband iscsi +jpeg \
61 -kernel_linux kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs
62 -+png pulseaudio python \
63 -rbd sasl +seccomp sdl sdl2 selinux smartcard snappy spice ssh static static-softmmu
64 -static-user systemtap tci test +threads usb usbredir +uuid vde +vhost-net \
65 -virgl virtfs +vnc vte xattr xen xfs"
66 -
67 -COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel mips
68 -mips64 mips64el mipsel or32 ppc ppc64 s390x sh4 sh4eb sparc sparc64 unicore32
69 -x86_64"
70 -IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb tricore xtensa xtensaeb"
71 -IUSE_USER_TARGETS="${COMMON_TARGETS} armeb mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx"
72 -
73 -use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
74 -use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
75 -IUSE+=" ${use_softmmu_targets} ${use_user_targets}"
76 -
77 -# Allow no targets to be built so that people can get a tools-only build.
78 -# Block USE flag configurations known to not work.
79 -REQUIRED_USE="${PYTHON_REQUIRED_USE}
80 - gtk2? ( gtk )
81 - qemu_softmmu_targets_arm? ( fdt )
82 - qemu_softmmu_targets_microblaze? ( fdt )
83 - qemu_softmmu_targets_ppc? ( fdt )
84 - qemu_softmmu_targets_ppc64? ( fdt )
85 - sdl2? ( sdl )
86 - static? ( static-softmmu static-user )
87 - static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk !gtk2 )
88 - virtfs? ( xattr )
89 - vte? ( gtk )"
90 -
91 -# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
92 -#
93 -# The attr lib isn't always linked in (although the USE flag is always
94 -# respected). This is because qemu supports using the C library's API
95 -# when available rather than always using the extranl library.
96 -#
97 -# Older versions of gnutls are supported, but it's simpler to just require
98 -# the latest versions. This is also why we require nettle.
99 -#
100 -# TODO: Split out tools deps into another var. e.g. bzip2 is only used by
101 -# system binaries and tools, not user binaries.
102 -COMMON_LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)]
103 - sys-libs/zlib[static-libs(+)]
104 - bzip2? ( app-arch/bzip2[static-libs(+)] )
105 - xattr? ( sys-apps/attr[static-libs(+)] )"
106 -SOFTMMU_LIB_DEPEND="${COMMON_LIB_DEPEND}
107 - >=x11-libs/pixman-0.28.0[static-libs(+)]
108 - accessibility? ( app-accessibility/brltty[static-libs(+)] )
109 - aio? ( dev-libs/libaio[static-libs(+)] )
110 - alsa? ( >=media-libs/alsa-lib-1.0.13 )
111 - bluetooth? ( net-wireless/bluez )
112 - caps? ( sys-libs/libcap-ng[static-libs(+)] )
113 - curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
114 - fdt? ( >=sys-apps/dtc-1.4.0[static-libs(+)] )
115 - glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
116 - gnutls? (
117 - dev-libs/nettle:=[static-libs(+)]
118 - >=net-libs/gnutls-3.0:=[static-libs(+)]
119 - )
120 - gtk? (
121 - gtk2? (
122 - x11-libs/gtk+:2
123 - vte? ( x11-libs/vte:0 )
124 - )
125 - !gtk2? (
126 - x11-libs/gtk+:3
127 - vte? ( x11-libs/vte:2.90 )
128 - )
129 - )
130 - infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] )
131 - iscsi? ( net-libs/libiscsi )
132 - jpeg? ( virtual/jpeg:0=[static-libs(+)] )
133 - lzo? ( dev-libs/lzo:2[static-libs(+)] )
134 - ncurses? ( sys-libs/ncurses:0=[static-libs(+)] )
135 - nfs? ( >=net-fs/libnfs-1.9.3[static-libs(+)] )
136 - numa? ( sys-process/numactl[static-libs(+)] )
137 - opengl? (
138 - virtual/opengl
139 - media-libs/libepoxy[static-libs(+)]
140 - media-libs/mesa[static-libs(+)]
141 - media-libs/mesa[egl,gles2]
142 - )
143 - png? ( media-libs/libpng:0=[static-libs(+)] )
144 - pulseaudio? ( media-sound/pulseaudio )
145 - rbd? ( sys-cluster/ceph[static-libs(+)] )
146 - sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
147 - sdl? (
148 - !sdl2? (
149 - media-libs/libsdl[X]
150 - >=media-libs/libsdl-1.2.11[static-libs(+)]
151 - )
152 - sdl2? (
153 - media-libs/libsdl2[X]
154 - media-libs/libsdl2[static-libs(+)]
155 - )
156 - )
157 - seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
158 - smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
159 - snappy? ( app-arch/snappy[static-libs(+)] )
160 - spice? (
161 - >=app-emulation/spice-protocol-0.12.3
162 - >=app-emulation/spice-0.12.0[static-libs(+)]
163 - )
164 - ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
165 - usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
166 - usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
167 - uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] )
168 - vde? ( net-misc/vde[static-libs(+)] )
169 - virgl? ( media-libs/virglrenderer[static-libs(+)] )
170 - virtfs? ( sys-libs/libcap )
171 - xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
172 -USER_LIB_DEPEND="${COMMON_LIB_DEPEND}"
173 -X86_FIRMWARE_DEPEND="
174 - >=sys-firmware/ipxe-1.0.0_p20130624
175 - pin-upstream-blobs? (
176 - ~sys-firmware/seabios-1.8.2
177 - ~sys-firmware/sgabios-0.1_pre8
178 - ~sys-firmware/vgabios-0.7a
179 - )
180 - !pin-upstream-blobs? (
181 - sys-firmware/seabios
182 - sys-firmware/sgabios
183 - sys-firmware/vgabios
184 - )"
185 -CDEPEND="
186 - !static-softmmu? ( $(printf "%s? ( ${SOFTMMU_LIB_DEPEND//\[static-libs(+)]} ) " ${use_softmmu_targets}) )
187 - !static-user? ( $(printf "%s? ( ${USER_LIB_DEPEND//\[static-libs(+)]} ) " ${use_user_targets}) )
188 - qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
189 - qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
190 - python? ( ${PYTHON_DEPS} )
191 - systemtap? ( dev-util/systemtap )
192 - xen? ( app-emulation/xen-tools:= )"
193 -DEPEND="${CDEPEND}
194 - dev-lang/perl
195 - =dev-lang/python-2*
196 - sys-apps/texinfo
197 - virtual/pkgconfig
198 - kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
199 - gtk? ( nls? ( sys-devel/gettext ) )
200 - static-softmmu? ( $(printf "%s? ( ${SOFTMMU_LIB_DEPEND} ) " ${use_softmmu_targets}) )
201 - static-user? ( $(printf "%s? ( ${USER_LIB_DEPEND} ) " ${use_user_targets}) )
202 - test? (
203 - dev-libs/glib[utils]
204 - sys-devel/bc
205 - )"
206 -RDEPEND="${CDEPEND}
207 - selinux? ( sec-policy/selinux-qemu )
208 -"
209 -
210 -STRIP_MASK="/usr/share/qemu/palcode-clipper"
211 -
212 -QA_PREBUILT="
213 - usr/share/qemu/openbios-ppc
214 - usr/share/qemu/openbios-sparc64
215 - usr/share/qemu/openbios-sparc32
216 - usr/share/qemu/palcode-clipper
217 - usr/share/qemu/s390-ccw.img
218 - usr/share/qemu/u-boot.e500
219 -"
220 -
221 -QA_WX_LOAD="usr/bin/qemu-i386
222 - usr/bin/qemu-x86_64
223 - usr/bin/qemu-alpha
224 - usr/bin/qemu-arm
225 - usr/bin/qemu-cris
226 - usr/bin/qemu-m68k
227 - usr/bin/qemu-microblaze
228 - usr/bin/qemu-microblazeel
229 - usr/bin/qemu-mips
230 - usr/bin/qemu-mipsel
231 - usr/bin/qemu-or32
232 - usr/bin/qemu-ppc
233 - usr/bin/qemu-ppc64
234 - usr/bin/qemu-ppc64abi32
235 - usr/bin/qemu-sh4
236 - usr/bin/qemu-sh4eb
237 - usr/bin/qemu-sparc
238 - usr/bin/qemu-sparc64
239 - usr/bin/qemu-armeb
240 - usr/bin/qemu-sparc32plus
241 - usr/bin/qemu-s390x
242 - usr/bin/qemu-unicore32"
243 -
244 -DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure
245 -you have the kernel module loaded before running kvm. The easiest way to
246 -ensure that the kernel module is loaded is to load it on boot.\n
247 -For AMD CPUs the module is called 'kvm-amd'.\n
248 -For Intel CPUs the module is called 'kvm-intel'.\n
249 -Please review /etc/conf.d/modules for how to load these.\n\n
250 -Make sure your user is in the 'kvm' group\n
251 -Just run 'gpasswd -a <USER> kvm', then have <USER> re-login.\n\n
252 -For brand new installs, the default permissions on /dev/kvm might not let you
253 -access it. You can tell udev to reset ownership/perms:\n
254 -udevadm trigger -c add /dev/kvm"
255 -
256 -qemu_support_kvm() {
257 - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 \
258 - use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64 \
259 - use qemu_softmmu_targets_s390x; then
260 - return 0
261 - fi
262 -
263 - return 1
264 -}
265 -
266 -pkg_pretend() {
267 - if use kernel_linux && kernel_is lt 2 6 25; then
268 - eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
269 - elif use kernel_linux; then
270 - if ! linux_config_exists; then
271 - eerror "Unable to check your kernel for KVM support"
272 - else
273 - CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
274 - ERROR_KVM="You must enable KVM in your kernel to continue"
275 - ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
276 - ERROR_KVM_AMD+=" your kernel configuration."
277 - ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
278 - ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
279 - ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
280 - ERROR_TUN+=" into your kernel or loaded as a module to use the"
281 - ERROR_TUN+=" virtual network device if using -net tap."
282 - ERROR_BRIDGE="You will also need support for 802.1d"
283 - ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
284 - use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
285 - ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
286 - ERROR_VHOST_NET+=" support"
287 -
288 - if use amd64 || use x86 || use amd64-linux || use x86-linux; then
289 - CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL"
290 - fi
291 -
292 - use python && CONFIG_CHECK+=" ~DEBUG_FS"
293 - ERROR_DEBUG_FS="debugFS support required for kvm_stat"
294 -
295 - # Now do the actual checks setup above
296 - check_extra_config
297 - fi
298 - fi
299 -
300 - if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
301 - eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
302 - eerror "instances are still pointing to it. Please update your"
303 - eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
304 - eerror "and the right system binary (e.g. qemu-system-x86_64)."
305 - die "update your virt configs to not use qemu-kvm"
306 - fi
307 -}
308 -
309 -pkg_setup() {
310 - enewgroup kvm 78
311 -}
312 -
313 -# Sanity check to make sure target lists are kept up-to-date.
314 -check_targets() {
315 - local var=$1 mak=$2
316 - local detected sorted
317 -
318 - pushd "${S}"/default-configs >/dev/null || die
319 -
320 - # Force C locale until glibc is updated. #564936
321 - detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u))
322 - sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u))
323 - if [[ ${sorted} != "${detected}" ]] ; then
324 - eerror "The ebuild needs to be kept in sync."
325 - eerror "${var}: ${sorted}"
326 - eerror "$(printf '%-*s' ${#var} configure): ${detected}"
327 - die "sync ${var} to the list of targets"
328 - fi
329 -
330 - popd >/dev/null
331 -}
332 -
333 -handle_locales() {
334 - # Make sure locale list is kept up-to-date.
335 - local detected sorted
336 - detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u))
337 - sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u))
338 - if [[ ${sorted} != "${detected}" ]] ; then
339 - eerror "The ebuild needs to be kept in sync."
340 - eerror "PLOCALES: ${sorted}"
341 - eerror " po/*.po: ${detected}"
342 - die "sync PLOCALES"
343 - fi
344 -
345 - # Deal with selective install of locales.
346 - if use nls ; then
347 - # Delete locales the user does not want. #577814
348 - rm_loc() { rm po/$1.po || die; }
349 - l10n_for_each_disabled_locale_do rm_loc
350 - else
351 - # Cheap hack to disable gettext .mo generation.
352 - rm -f po/*.po
353 - fi
354 -}
355 -
356 -src_prepare() {
357 - check_targets IUSE_SOFTMMU_TARGETS softmmu
358 - check_targets IUSE_USER_TARGETS linux-user
359 -
360 - # Alter target makefiles to accept CFLAGS set via flag-o
361 - sed -i -r \
362 - -e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
363 - Makefile Makefile.target || die
364 -
365 - epatch "${FILESDIR}"/${PN}-2.5.0-cflags.patch
366 - epatch "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
367 - epatch "${FILESDIR}"/${PN}-2.6.0-crypto-static.patch
368 - epatch "${FILESDIR}"/${PN}-2.6.0-glib-size_t.patch
369 - # Fix ld and objcopy being called directly
370 - tc-export AR LD OBJCOPY
371 -
372 - # Verbose builds
373 - MAKEOPTS+=" V=1"
374 -
375 - epatch_user
376 -
377 - # Run after we've applied all patches.
378 - handle_locales
379 -}
380 -
381 -##
382 -# configures qemu based on the build directory and the build type
383 -# we are using.
384 -#
385 -qemu_src_configure() {
386 - debug-print-function ${FUNCNAME} "$@"
387 -
388 - local buildtype=$1
389 - local builddir="${S}/${buildtype}-build"
390 - local static_flag="static-${buildtype}"
391 -
392 - mkdir "${builddir}"
393 -
394 - local conf_opts=(
395 - --prefix=/usr
396 - --sysconfdir=/etc
397 - --libdir=/usr/$(get_libdir)
398 - --docdir=/usr/share/doc/${PF}/html
399 - --disable-bsd-user
400 - --disable-guest-agent
401 - --disable-strip
402 - --disable-werror
403 - # We support gnutls/nettle for crypto operations. It is possible
404 - # to use gcrypt when gnutls/nettle are disabled (but not when they
405 - # are enabled), but it's not really worth the hassle. Disable it
406 - # all the time to avoid automatically detecting it. #568856
407 - --disable-gcrypt
408 - --python="${PYTHON}"
409 - --cc="$(tc-getCC)"
410 - --cxx="$(tc-getCXX)"
411 - --host-cc="$(tc-getBUILD_CC)"
412 - $(use_enable debug debug-info)
413 - $(use_enable debug debug-tcg)
414 - --enable-docs
415 - $(use_enable tci tcg-interpreter)
416 - $(use_enable xattr attr)
417 - )
418 -
419 - # Disable options not used by user targets as the default configure
420 - # options will autoprobe and try to link in a bunch of unused junk.
421 - conf_softmmu() {
422 - if [[ ${buildtype} == "user" ]] ; then
423 - echo "--disable-${2:-$1}"
424 - else
425 - use_enable "$@"
426 - fi
427 - }
428 - conf_opts+=(
429 - $(conf_softmmu accessibility brlapi)
430 - $(conf_softmmu aio linux-aio)
431 - $(conf_softmmu bzip2)
432 - $(conf_softmmu bluetooth bluez)
433 - $(conf_softmmu caps cap-ng)
434 - $(conf_softmmu curl)
435 - $(conf_softmmu fdt)
436 - $(conf_softmmu glusterfs)
437 - $(conf_softmmu gnutls)
438 - $(conf_softmmu gnutls nettle)
439 - $(conf_softmmu gtk)
440 - $(conf_softmmu infiniband rdma)
441 - $(conf_softmmu iscsi libiscsi)
442 - $(conf_softmmu jpeg vnc-jpeg)
443 - $(conf_softmmu kernel_linux kvm)
444 - $(conf_softmmu lzo)
445 - $(conf_softmmu ncurses curses)
446 - $(conf_softmmu nfs libnfs)
447 - $(conf_softmmu numa)
448 - $(conf_softmmu opengl)
449 - $(conf_softmmu png vnc-png)
450 - $(conf_softmmu rbd)
451 - $(conf_softmmu sasl vnc-sasl)
452 - $(conf_softmmu sdl)
453 - $(conf_softmmu seccomp)
454 - $(conf_softmmu smartcard)
455 - $(conf_softmmu snappy)
456 - $(conf_softmmu spice)
457 - $(conf_softmmu ssh libssh2)
458 - $(conf_softmmu usb libusb)
459 - $(conf_softmmu usbredir usb-redir)
460 - $(conf_softmmu uuid)
461 - $(conf_softmmu vde)
462 - $(conf_softmmu vhost-net)
463 - $(conf_softmmu virgl virglrenderer)
464 - $(conf_softmmu virtfs)
465 - $(conf_softmmu vnc)
466 - $(conf_softmmu vte)
467 - $(conf_softmmu xen)
468 - $(conf_softmmu xen xen-pci-passthrough)
469 - $(conf_softmmu xfs xfsctl)
470 - )
471 -
472 - case ${buildtype} in
473 - user)
474 - conf_opts+=(
475 - --enable-linux-user
476 - --disable-system
477 - --disable-blobs
478 - --disable-tools
479 - )
480 - ;;
481 - softmmu)
482 - # audio options
483 - local audio_opts="oss"
484 - use alsa && audio_opts="alsa,${audio_opts}"
485 - use sdl && audio_opts="sdl,${audio_opts}"
486 - use pulseaudio && audio_opts="pa,${audio_opts}"
487 -
488 - conf_opts+=(
489 - --disable-linux-user
490 - --enable-system
491 - --with-system-pixman
492 - --audio-drv-list="${audio_opts}"
493 - )
494 - use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) )
495 - use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) )
496 - ;;
497 - tools)
498 - conf_opts+=(
499 - --disable-linux-user
500 - --disable-system
501 - --disable-blobs
502 - $(use_enable bzip2)
503 - )
504 - static_flag="static"
505 - ;;
506 - esac
507 -
508 - local targets="${buildtype}_targets"
509 - [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" )
510 -
511 - # Add support for SystemTAP
512 - use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
513 -
514 - # We always want to attempt to build with PIE support as it results
515 - # in a more secure binary. But it doesn't work with static or if
516 - # the current GCC doesn't have PIE support.
517 - if use ${static_flag}; then
518 - conf_opts+=( --static --disable-pie )
519 - else
520 - gcc-specs-pie && conf_opts+=( --enable-pie )
521 - fi
522 -
523 - echo "../configure ${conf_opts[*]}"
524 - cd "${builddir}"
525 - ../configure "${conf_opts[@]}" || die "configure failed"
526 -
527 - # FreeBSD's kernel does not support QEMU assigning/grabbing
528 - # host USB devices yet
529 - use kernel_FreeBSD && \
530 - sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
531 -}
532 -
533 -src_configure() {
534 - local target
535 -
536 - python_setup
537 -
538 - softmmu_targets= softmmu_bins=()
539 - user_targets= user_bins=()
540 -
541 - for target in ${IUSE_SOFTMMU_TARGETS} ; do
542 - if use "qemu_softmmu_targets_${target}"; then
543 - softmmu_targets+=",${target}-softmmu"
544 - softmmu_bins+=( "qemu-system-${target}" )
545 - fi
546 - done
547 -
548 - for target in ${IUSE_USER_TARGETS} ; do
549 - if use "qemu_user_targets_${target}"; then
550 - user_targets+=",${target}-linux-user"
551 - user_bins+=( "qemu-${target}" )
552 - fi
553 - done
554 -
555 - softmmu_targets=${softmmu_targets#,}
556 - user_targets=${user_targets#,}
557 -
558 - [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
559 - [[ -n ${user_targets} ]] && qemu_src_configure "user"
560 - [[ -z ${softmmu_targets}${user_targets} ]] && qemu_src_configure "tools"
561 -}
562 -
563 -src_compile() {
564 - if [[ -n ${user_targets} ]]; then
565 - cd "${S}/user-build"
566 - default
567 - fi
568 -
569 - if [[ -n ${softmmu_targets} ]]; then
570 - cd "${S}/softmmu-build"
571 - default
572 - fi
573 -
574 - if [[ -z ${softmmu_targets}${user_targets} ]]; then
575 - cd "${S}/tools-build"
576 - default
577 - fi
578 -}
579 -
580 -src_test() {
581 - if [[ -n ${softmmu_targets} ]]; then
582 - cd "${S}/softmmu-build"
583 - pax-mark m */qemu-system-* #515550
584 - emake -j1 check
585 - emake -j1 check-report.html
586 - fi
587 -}
588 -
589 -qemu_python_install() {
590 - python_domodule "${S}/scripts/qmp/qmp.py"
591 -
592 - python_doscript "${S}/scripts/kvm/kvm_stat"
593 - python_doscript "${S}/scripts/kvm/vmxcap"
594 - python_doscript "${S}/scripts/qmp/qmp-shell"
595 - python_doscript "${S}/scripts/qmp/qemu-ga-client"
596 -}
597 -
598 -src_install() {
599 - if [[ -n ${user_targets} ]]; then
600 - cd "${S}/user-build"
601 - emake DESTDIR="${ED}" install
602 -
603 - # Install binfmt handler init script for user targets
604 - newinitd "${FILESDIR}/qemu-binfmt.initd-r1" qemu-binfmt
605 - fi
606 -
607 - if [[ -n ${softmmu_targets} ]]; then
608 - cd "${S}/softmmu-build"
609 - emake DESTDIR="${ED}" install
610 -
611 - # This might not exist if the test failed. #512010
612 - [[ -e check-report.html ]] && dohtml check-report.html
613 -
614 - if use kernel_linux; then
615 - udev_dorules "${FILESDIR}"/65-kvm.rules
616 - fi
617 -
618 - if use python; then
619 - python_foreach_impl qemu_python_install
620 - fi
621 - fi
622 -
623 - if [[ -z ${softmmu_targets}${user_targets} ]]; then
624 - cd "${S}/tools-build"
625 - emake DESTDIR="${ED}" install
626 - fi
627 -
628 - # Disable mprotect on the qemu binaries as they use JITs to be fast #459348
629 - pushd "${ED}"/usr/bin >/dev/null
630 - pax-mark m "${softmmu_bins[@]}" "${user_bins[@]}"
631 - popd >/dev/null
632 -
633 - # Install config file example for qemu-bridge-helper
634 - insinto "/etc/qemu"
635 - doins "${FILESDIR}/bridge.conf"
636 -
637 - # Remove the docdir placed qmp-commands.txt
638 - mv "${ED}/usr/share/doc/${PF}/html/qmp-commands.txt" "${S}/docs/" || die
639 -
640 - cd "${S}"
641 - dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
642 - newdoc pc-bios/README README.pc-bios
643 - dodoc docs/qmp-*.txt
644 -
645 - if [[ -n ${softmmu_targets} ]]; then
646 - # Remove SeaBIOS since we're using the SeaBIOS packaged one
647 - rm "${ED}/usr/share/qemu/bios.bin"
648 - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
649 - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
650 - fi
651 -
652 - # Remove vgabios since we're using the vgabios packaged one
653 - rm "${ED}/usr/share/qemu/vgabios.bin"
654 - rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
655 - rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
656 - rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
657 - rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
658 - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
659 - dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin
660 - dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
661 - dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
662 - dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
663 - dosym ../vgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
664 - fi
665 -
666 - # Remove sgabios since we're using the sgabios packaged one
667 - rm "${ED}/usr/share/qemu/sgabios.bin"
668 - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
669 - dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
670 - fi
671 -
672 - # Remove iPXE since we're using the iPXE packaged one
673 - rm "${ED}"/usr/share/qemu/pxe-*.rom
674 - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
675 - dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
676 - dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
677 - dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
678 - dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
679 - dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
680 - dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
681 - fi
682 - fi
683 -
684 - qemu_support_kvm && readme.gentoo_create_doc
685 -}
686 -
687 -pkg_postinst() {
688 - if qemu_support_kvm; then
689 - readme.gentoo_print_elog
690 - fi
691 -
692 - if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
693 - udev_reload
694 - fi
695 -
696 - fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
697 -}
698 -
699 -pkg_info() {
700 - echo "Using:"
701 - echo " $(best_version app-emulation/spice-protocol)"
702 - echo " $(best_version sys-firmware/ipxe)"
703 - echo " $(best_version sys-firmware/seabios)"
704 - if has_version 'sys-firmware/seabios[binary]'; then
705 - echo " USE=binary"
706 - else
707 - echo " USE=''"
708 - fi
709 - echo " $(best_version sys-firmware/vgabios)"
710 -}
711
712 diff --git a/app-emulation/qemu/qemu-2.7.0.ebuild b/app-emulation/qemu/qemu-2.7.0.ebuild
713 index a3aefc2..4c9b433 100644
714 --- a/app-emulation/qemu/qemu-2.7.0.ebuild
715 +++ b/app-emulation/qemu/qemu-2.7.0.ebuild
716 @@ -1,5 +1,6 @@
717 # Copyright 1999-2016 Gentoo Foundation
718 # Distributed under the terms of the GNU General Public License v2
719 +# $Id$
720
721 EAPI="5"