Gentoo Archives: gentoo-commits

From: Aric Belsito <lluixhi@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/musl:master commit in: app-emulation/qemu/
Date: Sun, 10 Jun 2018 17:24:26
Message-Id: 1528651400.b5401b3069b9b32aedd97a78ed7ab4a0232b682a.lluixhi@gentoo
1 commit: b5401b3069b9b32aedd97a78ed7ab4a0232b682a
2 Author: Aric Belsito <lluixhi <AT> gmail <DOT> com>
3 AuthorDate: Sun Jun 10 17:23:20 2018 +0000
4 Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com>
5 CommitDate: Sun Jun 10 17:23:20 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=b5401b30
7
8 app-emulation/qemu: version bump to 2.12.0-r1
9
10 app-emulation/qemu/Manifest | 1 -
11 app-emulation/qemu/metadata.xml | 8 +-
12 app-emulation/qemu/qemu-2.11.1-r53.ebuild | 811 ---------------------
13 .../{qemu-2.12.0.ebuild => qemu-2.12.0-r1.ebuild} | 16 +-
14 4 files changed, 20 insertions(+), 816 deletions(-)
15
16 diff --git a/app-emulation/qemu/Manifest b/app-emulation/qemu/Manifest
17 index ba96472..ec7e815 100644
18 --- a/app-emulation/qemu/Manifest
19 +++ b/app-emulation/qemu/Manifest
20 @@ -1,4 +1,3 @@
21 DIST qemu-2.11.1-patches-r1.tar.xz 2064 BLAKE2B 533c916b01c014bcfa6c733b76aa6da1f12cdf5f0d4ae33136453705a8aca9fdfeef998747cfdc72d19e08fa40ea97e2fd4c21412c030af314605059282f49ef SHA512 12de7b4777ec98871d0786291534f61b37534feef64b556caeab72e020ff14d61fe19d24cb151ebfdb912df2a7ba72c0d882566b368d88d02c9f1354c2adae4a
22 -DIST qemu-2.11.1-patches-r2.tar.xz 3652 BLAKE2B 4c3bf7503a838c2a978bcc973ee7d8909d662980aa2ccb71f3bff69a7aa79cc2ed405ed4648914808c64a538c0ceeef2904380cae38ee6c94176a11c9ebdbed3 SHA512 35d3aaeffe7655e739cd6d7c420692fcc6d2d76e49a8fd288f09bec81146075485675d1f912a7fc531ac8497977bcd259e97c260b61a7e854c378f6b9b2d4a79
23 DIST qemu-2.11.1.tar.bz2 32819412 BLAKE2B 6b6d4e7b8dcf33aeedb0b33bad267da07ad17c2eeeb5fbd2c038d760bc03224e55ba0f03eb248c62bc0e8636c2c660ea76b367eaea96bee16388053f82c8b8a9 SHA512 1b692bbdfc3dc785738c7192aa2a3f9cf53d9f5bf3b3f49fa8692050dc50f7056c8a4d1b527d48ffb2a674a0fd3a46d87addd1eaaa758f35eec1ab5adfe32354
24 DIST qemu-2.12.0.tar.bz2 41196232 BLAKE2B f258e570558249ea647c3571908f90b8bacdcef9a1814009b98571cf0e96406194d44aa041fd0a97c9b673f39a9eaae8d873824745509778a6784cd85f8398b0 SHA512 91d829f44c431e4c1cd335f3efea5afff9da62d832b0296a92417463ea0826d09ce226c2ea8ac167fe7b99b6bb976c7cb1357aaf17735ee57af6602161e46346
25
26 diff --git a/app-emulation/qemu/metadata.xml b/app-emulation/qemu/metadata.xml
27 index 61c159a..680e203 100644
28 --- a/app-emulation/qemu/metadata.xml
29 +++ b/app-emulation/qemu/metadata.xml
30 @@ -1,9 +1,13 @@
31 <?xml version="1.0" encoding="UTF-8"?>
32 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
33 <pkgmetadata>
34 + <maintainer type="person">
35 + <email>tamiko@g.o</email>
36 + <name>Matthias Maier</name>
37 + </maintainer>
38 <maintainer type="project">
39 - <email>qemu@g.o</email>
40 - <name>Gentoo QEMU Project</name>
41 + <email>virtualization@g.o</email>
42 + <name>Gentoo Virtualization Project</name>
43 </maintainer>
44 <use>
45 <flag name="accessibility">Adds support for braille displays using brltty</flag>
46
47 diff --git a/app-emulation/qemu/qemu-2.11.1-r53.ebuild b/app-emulation/qemu/qemu-2.11.1-r53.ebuild
48 deleted file mode 100644
49 index b34b1d7..0000000
50 --- a/app-emulation/qemu/qemu-2.11.1-r53.ebuild
51 +++ /dev/null
52 @@ -1,811 +0,0 @@
53 -# Copyright 1999-2018 Gentoo Foundation
54 -# Distributed under the terms of the GNU General Public License v2
55 -
56 -EAPI="6"
57 -
58 -PYTHON_COMPAT=( python2_7 )
59 -PYTHON_REQ_USE="ncurses,readline"
60 -
61 -PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
62 -
63 -FIRMWARE_ABI_VERSION="2.11.1-r50"
64 -
65 -inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \
66 - user udev fcaps readme.gentoo-r1 pax-utils l10n
67 -
68 -if [[ ${PV} = *9999* ]]; then
69 - EGIT_REPO_URI="git://git.qemu.org/qemu.git"
70 - inherit git-r3
71 - SRC_URI=""
72 -else
73 - SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2"
74 - KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
75 -
76 - # Gentoo specific patchsets:
77 - SRC_URI+=" https://dev.gentoo.org/~tamiko/distfiles/${P}-patches-r2.tar.xz"
78 -fi
79 -
80 -DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools"
81 -HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org"
82 -
83 -LICENSE="GPL-2 LGPL-2 BSD-2"
84 -SLOT="0"
85 -IUSE="accessibility +aio alsa bluetooth bzip2 capstone +caps +curl debug
86 - +fdt glusterfs gnutls gtk gtk2 infiniband iscsi +jpeg kernel_linux
87 - kernel_FreeBSD lzo ncurses nfs nls numa opengl +pin-upstream-blobs +png
88 - pulseaudio python rbd sasl +seccomp sdl sdl2 selinux smartcard snappy
89 - spice ssh static static-user systemtap tci test usb usbredir vde
90 - +vhost-net virgl virtfs +vnc vte xattr xen xfs"
91 -
92 -COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel
93 - mips mips64 mips64el mipsel nios2 or1k ppc ppc64 s390x sh4 sh4eb sparc
94 - sparc64 x86_64"
95 -IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS}
96 - lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb"
97 -IUSE_USER_TARGETS="${COMMON_TARGETS}
98 - armeb hppa mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx"
99 -
100 -use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})
101 -use_user_targets=$(printf ' qemu_user_targets_%s' ${IUSE_USER_TARGETS})
102 -IUSE+=" ${use_softmmu_targets} ${use_user_targets}"
103 -
104 -# Allow no targets to be built so that people can get a tools-only build.
105 -# Block USE flag configurations known to not work.
106 -REQUIRED_USE="${PYTHON_REQUIRED_USE}
107 - gtk2? ( gtk )
108 - qemu_softmmu_targets_arm? ( fdt )
109 - qemu_softmmu_targets_microblaze? ( fdt )
110 - qemu_softmmu_targets_mips64el? ( fdt )
111 - qemu_softmmu_targets_ppc? ( fdt )
112 - qemu_softmmu_targets_ppc64? ( fdt )
113 - sdl2? ( sdl )
114 - static? ( static-user !alsa !bluetooth !gtk !gtk2 !opengl !pulseaudio !snappy )
115 - virtfs? ( xattr )
116 - vte? ( gtk )"
117 -
118 -# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
119 -# and user/softmmu targets (qemu-*, qemu-system-*).
120 -#
121 -# Yep, you need both libcap and libcap-ng since virtfs only uses libcap.
122 -#
123 -# The attr lib isn't always linked in (although the USE flag is always
124 -# respected). This is because qemu supports using the C library's API
125 -# when available rather than always using the external library.
126 -ALL_DEPEND="
127 - >=dev-libs/glib-2.0[static-libs(+)]
128 - sys-libs/zlib[static-libs(+)]
129 - python? ( ${PYTHON_DEPS} )
130 - systemtap? ( dev-util/systemtap )
131 - xattr? ( sys-apps/attr[static-libs(+)] )"
132 -
133 -# Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
134 -# softmmu targets (qemu-system-*).
135 -SOFTMMU_TOOLS_DEPEND="
136 - >=x11-libs/pixman-0.28.0[static-libs(+)]
137 - accessibility? (
138 - app-accessibility/brltty[api]
139 - app-accessibility/brltty[static-libs(+)]
140 - )
141 - aio? ( dev-libs/libaio[static-libs(+)] )
142 - alsa? ( >=media-libs/alsa-lib-1.0.13 )
143 - bluetooth? ( net-wireless/bluez )
144 - bzip2? ( app-arch/bzip2[static-libs(+)] )
145 - capstone? ( dev-libs/capstone )
146 - caps? ( sys-libs/libcap-ng[static-libs(+)] )
147 - curl? ( >=net-misc/curl-7.15.4[static-libs(+)] )
148 - fdt? ( >=sys-apps/dtc-1.4.2[static-libs(+)] )
149 - glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] )
150 - gnutls? (
151 - dev-libs/nettle:=[static-libs(+)]
152 - >=net-libs/gnutls-3.0:=[static-libs(+)]
153 - )
154 - gtk? (
155 - gtk2? (
156 - x11-libs/gtk+:2
157 - vte? ( x11-libs/vte:0 )
158 - )
159 - !gtk2? (
160 - x11-libs/gtk+:3
161 - vte? ( x11-libs/vte:2.91 )
162 - )
163 - )
164 - infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] )
165 - iscsi? ( net-libs/libiscsi )
166 - jpeg? ( virtual/jpeg:0=[static-libs(+)] )
167 - lzo? ( dev-libs/lzo:2[static-libs(+)] )
168 - ncurses? (
169 - sys-libs/ncurses:0=[unicode]
170 - sys-libs/ncurses:0=[static-libs(+)]
171 - )
172 - nfs? ( >=net-fs/libnfs-1.9.3:=[static-libs(+)] )
173 - numa? ( sys-process/numactl[static-libs(+)] )
174 - opengl? (
175 - virtual/opengl
176 - media-libs/libepoxy[static-libs(+)]
177 - media-libs/mesa[static-libs(+)]
178 - media-libs/mesa[egl,gbm]
179 - )
180 - png? ( media-libs/libpng:0=[static-libs(+)] )
181 - pulseaudio? ( media-sound/pulseaudio )
182 - rbd? ( sys-cluster/ceph[static-libs(+)] )
183 - sasl? ( dev-libs/cyrus-sasl[static-libs(+)] )
184 - sdl? (
185 - !sdl2? (
186 - media-libs/libsdl[X]
187 - >=media-libs/libsdl-1.2.11[static-libs(+)]
188 - )
189 - sdl2? (
190 - media-libs/libsdl2[X]
191 - media-libs/libsdl2[static-libs(+)]
192 - )
193 - )
194 - seccomp? ( >=sys-libs/libseccomp-2.1.0[static-libs(+)] )
195 - smartcard? ( >=app-emulation/libcacard-2.5.0[static-libs(+)] )
196 - snappy? ( app-arch/snappy:= )
197 - spice? (
198 - >=app-emulation/spice-protocol-0.12.3
199 - >=app-emulation/spice-0.12.0[static-libs(+)]
200 - )
201 - ssh? ( >=net-libs/libssh2-1.2.8[static-libs(+)] )
202 - usb? ( >=virtual/libusb-1-r2[static-libs(+)] )
203 - usbredir? ( >=sys-apps/usbredir-0.6[static-libs(+)] )
204 - vde? ( net-misc/vde[static-libs(+)] )
205 - virgl? ( media-libs/virglrenderer[static-libs(+)] )
206 - virtfs? ( sys-libs/libcap )
207 - xen? ( app-emulation/xen-tools:= )
208 - xfs? ( sys-fs/xfsprogs[static-libs(+)] )"
209 -
210 -X86_FIRMWARE_DEPEND="
211 - pin-upstream-blobs? (
212 - ~sys-firmware/edk2-ovmf-2017_p20180211[binary]
213 - ~sys-firmware/ipxe-1.0.0_p20180211[binary]
214 - ~sys-firmware/seabios-1.11.0[binary,seavgabios]
215 - ~sys-firmware/sgabios-0.1_pre8[binary]
216 - )
217 - !pin-upstream-blobs? (
218 - sys-firmware/edk2-ovmf
219 - sys-firmware/ipxe
220 - >=sys-firmware/seabios-1.10.2[seavgabios]
221 - sys-firmware/sgabios
222 - )"
223 -PPC64_FIRMWARE_DEPEND="
224 - pin-upstream-blobs? (
225 - ~sys-firmware/seabios-1.11.0[binary,seavgabios]
226 - )
227 - !pin-upstream-blobs? (
228 - >=sys-firmware/seabios-1.10.2[seavgabios]
229 - )
230 -"
231 -
232 -CDEPEND="
233 - !static? (
234 - ${ALL_DEPEND//\[static-libs(+)]}
235 - ${SOFTMMU_TOOLS_DEPEND//\[static-libs(+)]}
236 - )
237 - qemu_softmmu_targets_i386? ( ${X86_FIRMWARE_DEPEND} )
238 - qemu_softmmu_targets_x86_64? ( ${X86_FIRMWARE_DEPEND} )
239 - qemu_softmmu_targets_ppc64? ( ${PPC64_FIRMWARE_DEPEND} )
240 -"
241 -DEPEND="${CDEPEND}
242 - dev-lang/perl
243 - =dev-lang/python-2*
244 - sys-apps/texinfo
245 - virtual/pkgconfig
246 - kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 )
247 - gtk? ( nls? ( sys-devel/gettext ) )
248 - static? (
249 - ${ALL_DEPEND}
250 - ${SOFTMMU_TOOLS_DEPEND}
251 - )
252 - static-user? ( ${ALL_DEPEND} )
253 - test? (
254 - dev-libs/glib[utils]
255 - sys-devel/bc
256 - )"
257 -RDEPEND="${CDEPEND}
258 - selinux? ( sec-policy/selinux-qemu )"
259 -
260 -PATCHES=(
261 - # musl patches
262 - "${FILESDIR}"/${PN}-2.8.0-F_SHLCK-and-F_EXLCK.patch
263 - "${FILESDIR}"/${PN}-2.0.0-linux-user-signal.c-define-__SIGRTMIN-MAX-for-non-GN.patch
264 - "${FILESDIR}"/${PN}-2.2.0-_sigev_un.patch
265 -
266 - # gentoo patches
267 - "${FILESDIR}"/${PN}-2.5.0-cflags.patch
268 - "${FILESDIR}"/${PN}-2.5.0-sysmacros.patch
269 - "${FILESDIR}"/${PN}-2.11.0-glibc-2.27.patch
270 - "${FILESDIR}"/${PN}-2.11.1-capstone_include_path.patch
271 - "${WORKDIR}"/patches
272 -)
273 -
274 -STRIP_MASK="/usr/share/qemu/palcode-clipper"
275 -
276 -QA_PREBUILT="
277 - usr/share/qemu/openbios-ppc
278 - usr/share/qemu/openbios-sparc64
279 - usr/share/qemu/openbios-sparc32
280 - usr/share/qemu/palcode-clipper
281 - usr/share/qemu/s390-ccw.img
282 - usr/share/qemu/s390-netboot.img
283 - usr/share/qemu/u-boot.e500"
284 -
285 -QA_WX_LOAD="usr/bin/qemu-i386
286 - usr/bin/qemu-x86_64
287 - usr/bin/qemu-alpha
288 - usr/bin/qemu-arm
289 - usr/bin/qemu-cris
290 - usr/bin/qemu-m68k
291 - usr/bin/qemu-microblaze
292 - usr/bin/qemu-microblazeel
293 - usr/bin/qemu-mips
294 - usr/bin/qemu-mipsel
295 - usr/bin/qemu-or1k
296 - usr/bin/qemu-ppc
297 - usr/bin/qemu-ppc64
298 - usr/bin/qemu-ppc64abi32
299 - usr/bin/qemu-sh4
300 - usr/bin/qemu-sh4eb
301 - usr/bin/qemu-sparc
302 - usr/bin/qemu-sparc64
303 - usr/bin/qemu-armeb
304 - usr/bin/qemu-sparc32plus
305 - usr/bin/qemu-s390x
306 - usr/bin/qemu-unicore32"
307 -
308 -DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure you have the
309 -kernel module loaded before running kvm. The easiest way to ensure that the
310 -kernel module is loaded is to load it on boot.
311 - For AMD CPUs the module is called 'kvm-amd'.
312 - For Intel CPUs the module is called 'kvm-intel'.
313 -Please review /etc/conf.d/modules for how to load these.
314 -
315 -Make sure your user is in the 'kvm' group. Just run
316 - $ gpasswd -a <USER> kvm
317 -then have <USER> re-login.
318 -
319 -For brand new installs, the default permissions on /dev/kvm might not let
320 -you access it. You can tell udev to reset ownership/perms:
321 - $ udevadm trigger -c add /dev/kvm
322 -
323 -If you want to register binfmt handlers for qemu user targets:
324 -For openrc:
325 - # rc-update add qemu-binfmt
326 -For systemd:
327 - # ln -s /usr/share/qemu/binfmt.d/qemu.conf /etc/binfmt.d/qemu.conf"
328 -
329 -pkg_pretend() {
330 - if use kernel_linux && kernel_is lt 2 6 25; then
331 - eerror "This version of KVM requres a host kernel of 2.6.25 or higher."
332 - elif use kernel_linux; then
333 - if ! linux_config_exists; then
334 - eerror "Unable to check your kernel for KVM support"
335 - else
336 - CONFIG_CHECK="~KVM ~TUN ~BRIDGE"
337 - ERROR_KVM="You must enable KVM in your kernel to continue"
338 - ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in"
339 - ERROR_KVM_AMD+=" your kernel configuration."
340 - ERROR_KVM_INTEL="If you have an Intel CPU, you must enable"
341 - ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration."
342 - ERROR_TUN="You will need the Universal TUN/TAP driver compiled"
343 - ERROR_TUN+=" into your kernel or loaded as a module to use the"
344 - ERROR_TUN+=" virtual network device if using -net tap."
345 - ERROR_BRIDGE="You will also need support for 802.1d"
346 - ERROR_BRIDGE+=" Ethernet Bridging for some network configurations."
347 - use vhost-net && CONFIG_CHECK+=" ~VHOST_NET"
348 - ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net"
349 - ERROR_VHOST_NET+=" support"
350 -
351 - if use amd64 || use x86 || use amd64-linux || use x86-linux; then
352 - if grep -q AuthenticAMD /proc/cpuinfo; then
353 - CONFIG_CHECK+=" ~KVM_AMD"
354 - elif grep -q GenuineIntel /proc/cpuinfo; then
355 - CONFIG_CHECK+=" ~KVM_INTEL"
356 - fi
357 - fi
358 -
359 - use python && CONFIG_CHECK+=" ~DEBUG_FS"
360 - ERROR_DEBUG_FS="debugFS support required for kvm_stat"
361 -
362 - # Now do the actual checks setup above
363 - check_extra_config
364 - fi
365 - fi
366 -
367 - if grep -qs '/usr/bin/qemu-kvm' "${EROOT}"/etc/libvirt/qemu/*.xml; then
368 - eerror "The kvm/qemu-kvm wrappers no longer exist, but your libvirt"
369 - eerror "instances are still pointing to it. Please update your"
370 - eerror "configs in /etc/libvirt/qemu/ to use the -enable-kvm flag"
371 - eerror "and the right system binary (e.g. qemu-system-x86_64)."
372 - die "update your virt configs to not use qemu-kvm"
373 - fi
374 -}
375 -
376 -pkg_setup() {
377 - enewgroup kvm 78
378 -}
379 -
380 -# Sanity check to make sure target lists are kept up-to-date.
381 -check_targets() {
382 - local var=$1 mak=$2
383 - local detected sorted
384 -
385 - pushd "${S}"/default-configs >/dev/null || die
386 -
387 - # Force C locale until glibc is updated. #564936
388 - detected=$(echo $(printf '%s\n' *-${mak}.mak | sed "s:-${mak}.mak::" | LC_COLLATE=C sort -u))
389 - sorted=$(echo $(printf '%s\n' ${!var} | LC_COLLATE=C sort -u))
390 - if [[ ${sorted} != "${detected}" ]] ; then
391 - eerror "The ebuild needs to be kept in sync."
392 - eerror "${var}: ${sorted}"
393 - eerror "$(printf '%-*s' ${#var} configure): ${detected}"
394 - die "sync ${var} to the list of targets"
395 - fi
396 -
397 - popd >/dev/null
398 -}
399 -
400 -handle_locales() {
401 - # Make sure locale list is kept up-to-date.
402 - local detected sorted
403 - detected=$(echo $(cd po && printf '%s\n' *.po | grep -v messages.po | sed 's:.po$::' | sort -u))
404 - sorted=$(echo $(printf '%s\n' ${PLOCALES} | sort -u))
405 - if [[ ${sorted} != "${detected}" ]] ; then
406 - eerror "The ebuild needs to be kept in sync."
407 - eerror "PLOCALES: ${sorted}"
408 - eerror " po/*.po: ${detected}"
409 - die "sync PLOCALES"
410 - fi
411 -
412 - # Deal with selective install of locales.
413 - if use nls ; then
414 - # Delete locales the user does not want. #577814
415 - rm_loc() { rm po/$1.po || die; }
416 - l10n_for_each_disabled_locale_do rm_loc
417 - else
418 - # Cheap hack to disable gettext .mo generation.
419 - rm -f po/*.po
420 - fi
421 -}
422 -
423 -src_prepare() {
424 - check_targets IUSE_SOFTMMU_TARGETS softmmu
425 - check_targets IUSE_USER_TARGETS linux-user
426 -
427 - # Alter target makefiles to accept CFLAGS set via flag-o
428 - sed -i -r \
429 - -e 's/^(C|OP_C|HELPER_C)FLAGS=/\1FLAGS+=/' \
430 - Makefile Makefile.target || die
431 -
432 - default
433 -
434 - # Fix ld and objcopy being called directly
435 - tc-export AR LD OBJCOPY
436 -
437 - # Verbose builds
438 - MAKEOPTS+=" V=1"
439 -
440 - # Run after we've applied all patches.
441 - handle_locales
442 -
443 - # Remove bundled copy of libfdt
444 - rm -r dtc || die
445 -}
446 -
447 -##
448 -# configures qemu based on the build directory and the build type
449 -# we are using.
450 -#
451 -qemu_src_configure() {
452 - debug-print-function ${FUNCNAME} "$@"
453 -
454 - local buildtype=$1
455 - local builddir="${S}/${buildtype}-build"
456 -
457 - mkdir "${builddir}"
458 -
459 - local conf_opts=(
460 - --prefix=/usr
461 - --sysconfdir=/etc
462 - --libdir=/usr/$(get_libdir)
463 - --docdir=/usr/share/doc/${PF}/html
464 - --disable-bsd-user
465 - --disable-guest-agent
466 - --disable-strip
467 - --disable-werror
468 - # We support gnutls/nettle for crypto operations. It is possible
469 - # to use gcrypt when gnutls/nettle are disabled (but not when they
470 - # are enabled), but it's not really worth the hassle. Disable it
471 - # all the time to avoid automatically detecting it. #568856
472 - --disable-gcrypt
473 - --python="${PYTHON}"
474 - --cc="$(tc-getCC)"
475 - --cxx="$(tc-getCXX)"
476 - --host-cc="$(tc-getBUILD_CC)"
477 - $(use_enable debug debug-info)
478 - $(use_enable debug debug-tcg)
479 - --enable-docs
480 - $(use_enable tci tcg-interpreter)
481 - $(use_enable xattr attr)
482 - )
483 -
484 - # Disable options not used by user targets. This simplifies building
485 - # static user targets (USE=static-user) considerably.
486 - conf_notuser() {
487 - if [[ ${buildtype} == "user" ]] ; then
488 - echo "--disable-${2:-$1}"
489 - else
490 - use_enable "$@"
491 - fi
492 - }
493 - conf_opts+=(
494 - $(conf_notuser accessibility brlapi)
495 - $(conf_notuser aio linux-aio)
496 - $(conf_notuser bzip2)
497 - $(conf_notuser bluetooth bluez)
498 - $(conf_notuser capstone)
499 - $(conf_notuser caps cap-ng)
500 - $(conf_notuser curl)
501 - $(conf_notuser fdt)
502 - $(conf_notuser glusterfs)
503 - $(conf_notuser gnutls)
504 - $(conf_notuser gnutls nettle)
505 - $(conf_notuser gtk)
506 - $(conf_notuser infiniband rdma)
507 - $(conf_notuser iscsi libiscsi)
508 - $(conf_notuser jpeg vnc-jpeg)
509 - $(conf_notuser kernel_linux kvm)
510 - $(conf_notuser lzo)
511 - $(conf_notuser ncurses curses)
512 - $(conf_notuser nfs libnfs)
513 - $(conf_notuser numa)
514 - $(conf_notuser opengl)
515 - $(conf_notuser png vnc-png)
516 - $(conf_notuser rbd)
517 - $(conf_notuser sasl vnc-sasl)
518 - $(conf_notuser sdl)
519 - $(conf_notuser seccomp)
520 - $(conf_notuser smartcard)
521 - $(conf_notuser snappy)
522 - $(conf_notuser spice)
523 - $(conf_notuser ssh libssh2)
524 - $(conf_notuser usb libusb)
525 - $(conf_notuser usbredir usb-redir)
526 - $(conf_notuser vde)
527 - $(conf_notuser vhost-net)
528 - $(conf_notuser virgl virglrenderer)
529 - $(conf_notuser virtfs)
530 - $(conf_notuser vnc)
531 - $(conf_notuser vte)
532 - $(conf_notuser xen)
533 - $(conf_notuser xen xen-pci-passthrough)
534 - $(conf_notuser xfs xfsctl)
535 - )
536 -
537 - if [[ ! ${buildtype} == "user" ]] ; then
538 - # audio options
539 - local audio_opts="oss"
540 - use alsa && audio_opts="alsa,${audio_opts}"
541 - use sdl && audio_opts="sdl,${audio_opts}"
542 - use pulseaudio && audio_opts="pa,${audio_opts}"
543 - conf_opts+=(
544 - --audio-drv-list="${audio_opts}"
545 - )
546 - use gtk && conf_opts+=( --with-gtkabi=$(usex gtk2 2.0 3.0) )
547 - use sdl && conf_opts+=( --with-sdlabi=$(usex sdl2 2.0 1.2) )
548 - fi
549 -
550 - case ${buildtype} in
551 - user)
552 - conf_opts+=(
553 - --enable-linux-user
554 - --disable-system
555 - --disable-blobs
556 - --disable-tools
557 - )
558 - local static_flag="static-user"
559 - ;;
560 - softmmu)
561 - conf_opts+=(
562 - --disable-linux-user
563 - --enable-system
564 - --disable-tools
565 - )
566 - local static_flag="static"
567 - ;;
568 - tools)
569 - conf_opts+=(
570 - --disable-linux-user
571 - --disable-system
572 - --disable-blobs
573 - --enable-tools
574 - )
575 - local static_flag="static"
576 - ;;
577 - esac
578 -
579 - local targets="${buildtype}_targets"
580 - [[ -n ${targets} ]] && conf_opts+=( --target-list="${!targets}" )
581 -
582 - # Add support for SystemTAP
583 - use systemtap && conf_opts+=( --enable-trace-backend=dtrace )
584 -
585 - # We always want to attempt to build with PIE support as it results
586 - # in a more secure binary. But it doesn't work with static or if
587 - # the current GCC doesn't have PIE support.
588 - if use ${static_flag}; then
589 - conf_opts+=( --static --disable-pie )
590 - else
591 - tc-enables-pie && conf_opts+=( --enable-pie )
592 - fi
593 -
594 - echo "../configure ${conf_opts[*]}"
595 - cd "${builddir}"
596 - ../configure "${conf_opts[@]}" || die "configure failed"
597 -
598 - # FreeBSD's kernel does not support QEMU assigning/grabbing
599 - # host USB devices yet
600 - use kernel_FreeBSD && \
601 - sed -i -E -e "s|^(HOST_USB=)bsd|\1stub|" "${S}"/config-host.mak
602 -}
603 -
604 -src_configure() {
605 - local target
606 -
607 - python_setup
608 -
609 - softmmu_targets= softmmu_bins=()
610 - user_targets= user_bins=()
611 -
612 - for target in ${IUSE_SOFTMMU_TARGETS} ; do
613 - if use "qemu_softmmu_targets_${target}"; then
614 - softmmu_targets+=",${target}-softmmu"
615 - softmmu_bins+=( "qemu-system-${target}" )
616 - fi
617 - done
618 -
619 - for target in ${IUSE_USER_TARGETS} ; do
620 - if use "qemu_user_targets_${target}"; then
621 - user_targets+=",${target}-linux-user"
622 - user_bins+=( "qemu-${target}" )
623 - fi
624 - done
625 -
626 - softmmu_targets=${softmmu_targets#,}
627 - user_targets=${user_targets#,}
628 -
629 - [[ -n ${softmmu_targets} ]] && qemu_src_configure "softmmu"
630 - [[ -n ${user_targets} ]] && qemu_src_configure "user"
631 - qemu_src_configure "tools"
632 -}
633 -
634 -src_compile() {
635 - if [[ -n ${user_targets} ]]; then
636 - cd "${S}/user-build"
637 - default
638 - fi
639 -
640 - if [[ -n ${softmmu_targets} ]]; then
641 - cd "${S}/softmmu-build"
642 - default
643 - fi
644 -
645 - cd "${S}/tools-build"
646 - default
647 -}
648 -
649 -src_test() {
650 - if [[ -n ${softmmu_targets} ]]; then
651 - cd "${S}/softmmu-build"
652 - pax-mark m */qemu-system-* #515550
653 - emake -j1 check
654 - emake -j1 check-report.html
655 - fi
656 -}
657 -
658 -qemu_python_install() {
659 - python_domodule "${S}/scripts/qmp/qmp.py"
660 -
661 - python_doscript "${S}/scripts/kvm/vmxcap"
662 - python_doscript "${S}/scripts/qmp/qmp-shell"
663 - python_doscript "${S}/scripts/qmp/qemu-ga-client"
664 -}
665 -
666 -# Generate binfmt support files.
667 -# - /etc/init.d/qemu-binfmt script which registers the user handlers (openrc)
668 -# - /usr/share/qemu/binfmt.d/qemu.conf (for use with systemd-binfmt)
669 -generate_initd() {
670 - local out="${T}/qemu-binfmt"
671 - local out_systemd="${T}/qemu.conf"
672 - local d="${T}/binfmt.d"
673 -
674 - einfo "Generating qemu binfmt scripts and configuration files"
675 -
676 - # Generate the debian fragments first.
677 - mkdir -p "${d}"
678 - "${S}"/scripts/qemu-binfmt-conf.sh \
679 - --debian \
680 - --exportdir "${d}" \
681 - --qemu-path "${EPREFIX}/usr/bin" \
682 - || die
683 - # Then turn the fragments into a shell script we can source.
684 - sed -E -i \
685 - -e 's:^([^ ]+) (.*)$:\1="\2":' \
686 - "${d}"/* || die
687 -
688 - # Generate the init.d script by assembling the fragments from above.
689 - local f qcpu package interpreter magic mask
690 - cat "${FILESDIR}"/qemu-binfmt.initd.head >"${out}" || die
691 - for f in "${d}"/qemu-* ; do
692 - source "${f}"
693 -
694 - # Normalize the cpu logic like we do in the init.d for the native cpu.
695 - qcpu=${package#qemu-}
696 - case ${qcpu} in
697 - arm*) qcpu="arm";;
698 - mips*) qcpu="mips";;
699 - ppc*) qcpu="ppc";;
700 - s390*) qcpu="s390";;
701 - sh*) qcpu="sh";;
702 - sparc*) qcpu="sparc";;
703 - esac
704 -
705 - cat <<EOF >>"${out}"
706 - if [ "\${cpu}" != "${qcpu}" -a -x "${interpreter}" ] ; then
707 - echo ':${package}:M::${magic}:${mask}:${interpreter}:'"\${QEMU_BINFMT_FLAGS}" >/proc/sys/fs/binfmt_misc/register
708 - fi
709 -EOF
710 -
711 - echo ":${package}:M::${magic}:${mask}:${interpreter}:OC" >>"${out_systemd}"
712 -
713 - done
714 - cat "${FILESDIR}"/qemu-binfmt.initd.tail >>"${out}" || die
715 -}
716 -
717 -src_install() {
718 - if [[ -n ${user_targets} ]]; then
719 - cd "${S}/user-build"
720 - emake DESTDIR="${ED}" install
721 -
722 - # Install binfmt handler init script for user targets.
723 - generate_initd
724 - doinitd "${T}/qemu-binfmt"
725 -
726 - # Install binfmt/qemu.conf.
727 - insinto "/usr/share/qemu/binfmt.d"
728 - doins "${T}/qemu.conf"
729 - fi
730 -
731 - if [[ -n ${softmmu_targets} ]]; then
732 - cd "${S}/softmmu-build"
733 - emake DESTDIR="${ED}" install
734 -
735 - # This might not exist if the test failed. #512010
736 - [[ -e check-report.html ]] && dohtml check-report.html
737 -
738 - if use kernel_linux; then
739 - udev_newrules "${FILESDIR}"/65-kvm.rules-r1 65-kvm.rules
740 - fi
741 -
742 - if use python; then
743 - python_foreach_impl qemu_python_install
744 - fi
745 - fi
746 -
747 - cd "${S}/tools-build"
748 - emake DESTDIR="${ED}" install
749 -
750 - # Disable mprotect on the qemu binaries as they use JITs to be fast #459348
751 - pushd "${ED}"/usr/bin >/dev/null
752 - pax-mark mr "${softmmu_bins[@]}" "${user_bins[@]}" # bug 575594
753 - popd >/dev/null
754 -
755 - # Install config file example for qemu-bridge-helper
756 - insinto "/etc/qemu"
757 - doins "${FILESDIR}/bridge.conf"
758 -
759 - cd "${S}"
760 - dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt
761 - newdoc pc-bios/README README.pc-bios
762 -
763 - if [[ -n ${softmmu_targets} ]]; then
764 - # Remove SeaBIOS since we're using the SeaBIOS packaged one
765 - rm "${ED}/usr/share/qemu/bios.bin"
766 - rm "${ED}/usr/share/qemu/bios-256k.bin"
767 - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
768 - dosym ../seabios/bios.bin /usr/share/qemu/bios.bin
769 - dosym ../seabios/bios-256k.bin /usr/share/qemu/bios-256k.bin
770 - fi
771 -
772 - # Remove vgabios since we're using the seavgabios packaged one
773 - rm "${ED}/usr/share/qemu/vgabios.bin"
774 - rm "${ED}/usr/share/qemu/vgabios-cirrus.bin"
775 - rm "${ED}/usr/share/qemu/vgabios-qxl.bin"
776 - rm "${ED}/usr/share/qemu/vgabios-stdvga.bin"
777 - rm "${ED}/usr/share/qemu/vgabios-virtio.bin"
778 - rm "${ED}/usr/share/qemu/vgabios-vmware.bin"
779 - # PPC64 loads vgabios-stdvga
780 - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 || use qemu_softmmu_targets_ppc64; then
781 - dosym ../seavgabios/vgabios-isavga.bin /usr/share/qemu/vgabios.bin
782 - dosym ../seavgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin
783 - dosym ../seavgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin
784 - dosym ../seavgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin
785 - dosym ../seavgabios/vgabios-virtio.bin /usr/share/qemu/vgabios-virtio.bin
786 - dosym ../seavgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin
787 - fi
788 -
789 - # Remove sgabios since we're using the sgabios packaged one
790 - rm "${ED}/usr/share/qemu/sgabios.bin"
791 - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
792 - dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin
793 - fi
794 -
795 - # Remove iPXE since we're using the iPXE packaged one
796 - rm "${ED}"/usr/share/qemu/pxe-*.rom
797 - if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then
798 - dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom
799 - dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom
800 - dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom
801 - dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom
802 - dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom
803 - dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom
804 - fi
805 - fi
806 -
807 - DISABLE_AUTOFORMATTING=true
808 - readme.gentoo_create_doc
809 -}
810 -
811 -firmware_abi_change() {
812 - local pv
813 - for pv in ${REPLACING_VERSIONS}; do
814 - if ! version_is_at_least ${FIRMWARE_ABI_VERSION} ${pv}; then
815 - return 0
816 - fi
817 - done
818 - return 1
819 -}
820 -
821 -pkg_postinst() {
822 - if [[ -n ${softmmu_targets} ]] && use kernel_linux; then
823 - udev_reload
824 - fi
825 -
826 - fcaps cap_net_admin /usr/libexec/qemu-bridge-helper
827 -
828 - DISABLE_AUTOFORMATTING=true
829 - readme.gentoo_print_elog
830 -
831 - if use pin-upstream-blobs && firmware_abi_change; then
832 - ewarn "This version of qemu pins new versions of firmware blobs:"
833 - ewarn " $(best_version sys-firmware/edk2-ovmf)"
834 - ewarn " $(best_version sys-firmware/ipxe)"
835 - ewarn " $(best_version sys-firmware/seabios)"
836 - ewarn " $(best_version sys-firmware/sgabios)"
837 - ewarn "This might break resume of hibernated guests (started with a different"
838 - ewarn "firmware version) and live migration to/from qemu versions with different"
839 - ewarn "firmware. Please (cold) restart all running guests. For functional"
840 - ewarn "guest migration ensure that all"
841 - ewarn "hosts run at least"
842 - ewarn " app-emulation/qemu-${FIRMWARE_ABI_VERSION}."
843 - fi
844 -}
845 -
846 -pkg_info() {
847 - echo "Using:"
848 - echo " $(best_version app-emulation/spice-protocol)"
849 - echo " $(best_version sys-firmware/edk2-ovmf)"
850 - if has_version 'sys-firmware/edk2-ovmf[binary]'; then
851 - echo " USE=binary"
852 - else
853 - echo " USE=''"
854 - fi
855 - echo " $(best_version sys-firmware/ipxe)"
856 - echo " $(best_version sys-firmware/seabios)"
857 - if has_version 'sys-firmware/seabios[binary]'; then
858 - echo " USE=binary"
859 - else
860 - echo " USE=''"
861 - fi
862 - echo " $(best_version sys-firmware/sgabios)"
863 -}
864
865 diff --git a/app-emulation/qemu/qemu-2.12.0.ebuild b/app-emulation/qemu/qemu-2.12.0-r1.ebuild
866 similarity index 98%
867 rename from app-emulation/qemu/qemu-2.12.0.ebuild
868 rename to app-emulation/qemu/qemu-2.12.0-r1.ebuild
869 index ddbdf77..b5721e0 100644
870 --- a/app-emulation/qemu/qemu-2.12.0.ebuild
871 +++ b/app-emulation/qemu/qemu-2.12.0-r1.ebuild
872 @@ -3,7 +3,7 @@
873
874 EAPI="6"
875
876 -PYTHON_COMPAT=( python2_7 )
877 +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
878 PYTHON_REQ_USE="ncurses,readline"
879
880 PLOCALES="bg de_DE fr_FR hu it tr zh_CN"
881 @@ -82,6 +82,8 @@ ALL_DEPEND="
882 # Dependencies required for qemu tools (qemu-nbd, qemu-img, qemu-io, ...)
883 # softmmu targets (qemu-system-*).
884 SOFTMMU_TOOLS_DEPEND="
885 + dev-libs/libxml2[static-libs(+)]
886 + x11-libs/libxkbcommon[static-libs(+)]
887 >=x11-libs/pixman-0.28.0[static-libs(+)]
888 accessibility? (
889 app-accessibility/brltty[api]
890 @@ -110,7 +112,11 @@ SOFTMMU_TOOLS_DEPEND="
891 vte? ( x11-libs/vte:2.91 )
892 )
893 )
894 - infiniband? ( sys-fabric/librdmacm:=[static-libs(+)] )
895 + infiniband? (
896 + sys-fabric/libibumad:=[static-libs(+)]
897 + sys-fabric/libibverbs:=[static-libs(+)]
898 + sys-fabric/librdmacm:=[static-libs(+)]
899 + )
900 iscsi? ( net-libs/libiscsi )
901 jpeg? ( virtual/jpeg:0=[static-libs(+)] )
902 lzo? ( dev-libs/lzo:2[static-libs(+)] )
903 @@ -481,6 +487,12 @@ qemu_src_configure() {
904 $(conf_notuser xfs xfsctl)
905 )
906
907 + if [[ ${buildtype} == "user" ]] ; then
908 + conf_opts+=( --disable-libxml2 )
909 + else
910 + conf_opts+=( --enable-libxml2 )
911 + fi
912 +
913 if [[ ! ${buildtype} == "user" ]] ; then
914 # audio options
915 local audio_opts="oss"