1 |
cardoe 13/08/27 23:41:32 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: qemu-1.5.3.ebuild |
5 |
Log: |
6 |
Version bump |
7 |
|
8 |
(Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key D7DFA8D318FA9AEF!) |
9 |
|
10 |
Revision Changes Path |
11 |
1.238 app-emulation/qemu/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/ChangeLog?rev=1.238&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/ChangeLog?rev=1.238&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/ChangeLog?r1=1.237&r2=1.238 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v |
20 |
retrieving revision 1.237 |
21 |
retrieving revision 1.238 |
22 |
diff -u -r1.237 -r1.238 |
23 |
--- ChangeLog 19 Aug 2013 14:08:33 -0000 1.237 |
24 |
+++ ChangeLog 27 Aug 2013 23:41:32 -0000 1.238 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for app-emulation/qemu |
27 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.237 2013/08/19 14:08:33 cardoe Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/ChangeLog,v 1.238 2013/08/27 23:41:32 cardoe Exp $ |
30 |
+ |
31 |
+*qemu-1.5.3 (27 Aug 2013) |
32 |
+ |
33 |
+ 27 Aug 2013; Doug Goldstein <cardoe@g.o> +qemu-1.5.3.ebuild: |
34 |
+ Version bump |
35 |
|
36 |
19 Aug 2013; Doug Goldstein <cardoe@g.o> qemu-9999.ebuild: |
37 |
SeaBIOS/VGABios/sgabios are not meant to be a versioned depend for the live |
38 |
|
39 |
|
40 |
|
41 |
1.1 app-emulation/qemu/qemu-1.5.3.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/qemu-1.5.3.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/qemu/qemu-1.5.3.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: qemu-1.5.3.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2013 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/app-emulation/qemu/qemu-1.5.3.ebuild,v 1.1 2013/08/27 23:41:32 cardoe Exp $ |
51 |
|
52 |
EAPI=5 |
53 |
|
54 |
PYTHON_COMPAT=( python{2_5,2_6,2_7} ) |
55 |
PYTHON_REQ_USE="ncurses,readline" |
56 |
|
57 |
inherit eutils flag-o-matic linux-info toolchain-funcs multilib python-r1 \ |
58 |
user udev fcaps readme.gentoo |
59 |
|
60 |
BACKPORTS=25d93791 |
61 |
|
62 |
if [[ ${PV} = *9999* ]]; then |
63 |
EGIT_REPO_URI="git://git.qemu.org/qemu.git" |
64 |
inherit git-2 |
65 |
SRC_URI="" |
66 |
KEYWORDS="" |
67 |
else |
68 |
SRC_URI="http://wiki.qemu-project.org/download/${P}.tar.bz2 |
69 |
${BACKPORTS:+ |
70 |
http://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz}" |
71 |
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd" |
72 |
fi |
73 |
|
74 |
DESCRIPTION="QEMU + Kernel-based Virtual Machine userland tools" |
75 |
HOMEPAGE="http://www.qemu.org http://www.linux-kvm.org" |
76 |
|
77 |
LICENSE="GPL-2 LGPL-2 BSD-2" |
78 |
SLOT="0" |
79 |
IUSE="accessibility +aio alsa bluetooth +caps +curl debug fdt glusterfs \ |
80 |
gtk iscsi +jpeg \ |
81 |
kernel_linux kernel_FreeBSD mixemu ncurses opengl +png pulseaudio python \ |
82 |
rbd sasl +seccomp sdl selinux smartcard spice static static-softmmu \ |
83 |
static-user systemtap tci test +threads tls usbredir +uuid vde +vhost-net \ |
84 |
virtfs +vnc xattr xen xfs" |
85 |
|
86 |
COMMON_TARGETS="i386 x86_64 alpha arm cris m68k microblaze microblazeel mips |
87 |
mipsel mips64 mips64el or32 ppc ppc64 sh4 sh4eb sparc sparc64 s390x unicore32" |
88 |
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb xtensa xtensaeb" |
89 |
IUSE_USER_TARGETS="${COMMON_TARGETS} armeb mipsn32 mipsn32el ppc64abi32 sparc32plus" |
90 |
|
91 |
# Setup the default SoftMMU targets, while using the loops |
92 |
# below to setup the other targets. |
93 |
REQUIRED_USE="|| (" |
94 |
|
95 |
for target in ${IUSE_SOFTMMU_TARGETS}; do |
96 |
IUSE="${IUSE} qemu_softmmu_targets_${target}" |
97 |
REQUIRED_USE="${REQUIRED_USE} qemu_softmmu_targets_${target}" |
98 |
done |
99 |
|
100 |
for target in ${IUSE_USER_TARGETS}; do |
101 |
IUSE="${IUSE} qemu_user_targets_${target}" |
102 |
REQUIRED_USE="${REQUIRED_USE} qemu_user_targets_${target}" |
103 |
done |
104 |
REQUIRED_USE="${REQUIRED_USE} )" |
105 |
|
106 |
# Block USE flag configurations known to not work |
107 |
REQUIRED_USE="${REQUIRED_USE} |
108 |
python? ( ${PYTHON_REQUIRED_USE} ) |
109 |
static? ( static-softmmu static-user ) |
110 |
static-softmmu? ( !alsa !pulseaudio !bluetooth !opengl !gtk ) |
111 |
virtfs? ( xattr )" |
112 |
|
113 |
# Yep, you need both libcap and libcap-ng since virtfs only uses libcap. |
114 |
LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)] |
115 |
sys-apps/pciutils[static-libs(+)] |
116 |
sys-libs/zlib[static-libs(+)] |
117 |
>=x11-libs/pixman-0.28.0[static-libs(+)] |
118 |
aio? ( dev-libs/libaio[static-libs(+)] ) |
119 |
caps? ( sys-libs/libcap-ng[static-libs(+)] ) |
120 |
curl? ( >=net-misc/curl-7.15.4[static-libs(+)] ) |
121 |
fdt? ( >=sys-apps/dtc-1.2.0[static-libs(+)] <sys-apps/dtc-1.4.0[static-libs(+)] ) |
122 |
glusterfs? ( >=sys-cluster/glusterfs-3.4.0[static-libs(+)] ) |
123 |
jpeg? ( virtual/jpeg[static-libs(+)] ) |
124 |
ncurses? ( sys-libs/ncurses[static-libs(+)] ) |
125 |
png? ( media-libs/libpng[static-libs(+)] ) |
126 |
rbd? ( sys-cluster/ceph[static-libs(+)] ) |
127 |
sasl? ( dev-libs/cyrus-sasl[static-libs(+)] ) |
128 |
sdl? ( >=media-libs/libsdl-1.2.11[static-libs(+)] ) |
129 |
seccomp? ( >=sys-libs/libseccomp-1.0.1[static-libs(+)] ) |
130 |
spice? ( >=app-emulation/spice-0.12.0[static-libs(+)] ) |
131 |
tls? ( net-libs/gnutls[static-libs(+)] ) |
132 |
uuid? ( >=sys-apps/util-linux-2.16.0[static-libs(+)] ) |
133 |
vde? ( net-misc/vde[static-libs(+)] ) |
134 |
xattr? ( sys-apps/attr[static-libs(+)] ) |
135 |
xfs? ( sys-fs/xfsprogs[static-libs(+)] )" |
136 |
RDEPEND="!static-softmmu? ( ${LIB_DEPEND//\[static-libs(+)]} ) |
137 |
static-user? ( >=dev-libs/glib-2.0[static-libs(+)] ) |
138 |
qemu_softmmu_targets_i386? ( |
139 |
>=sys-firmware/ipxe-1.0.0_p20130624 |
140 |
~sys-firmware/seabios-1.7.2.2 |
141 |
~sys-firmware/sgabios-0.1_pre8 |
142 |
~sys-firmware/vgabios-0.7a |
143 |
) |
144 |
qemu_softmmu_targets_x86_64? ( |
145 |
>=sys-firmware/ipxe-1.0.0_p20130624 |
146 |
~sys-firmware/seabios-1.7.2.2 |
147 |
~sys-firmware/sgabios-0.1_pre8 |
148 |
~sys-firmware/vgabios-0.7a |
149 |
) |
150 |
accessibility? ( app-accessibility/brltty ) |
151 |
alsa? ( >=media-libs/alsa-lib-1.0.13 ) |
152 |
bluetooth? ( net-wireless/bluez ) |
153 |
gtk? ( |
154 |
x11-libs/gtk+:3 |
155 |
x11-libs/vte:2.90 |
156 |
) |
157 |
iscsi? ( net-libs/libiscsi ) |
158 |
opengl? ( virtual/opengl ) |
159 |
pulseaudio? ( media-sound/pulseaudio ) |
160 |
python? ( ${PYTHON_DEPS} ) |
161 |
sdl? ( media-libs/libsdl[X] ) |
162 |
selinux? ( sec-policy/selinux-qemu ) |
163 |
smartcard? ( dev-libs/nss !app-emulation/libcacard ) |
164 |
spice? ( >=app-emulation/spice-protocol-0.12.3 ) |
165 |
systemtap? ( dev-util/systemtap ) |
166 |
usbredir? ( >=sys-apps/usbredir-0.6 ) |
167 |
virtfs? ( sys-libs/libcap ) |
168 |
xen? ( app-emulation/xen-tools )" |
169 |
|
170 |
DEPEND="${RDEPEND} |
171 |
dev-lang/perl |
172 |
=dev-lang/python-2* |
173 |
sys-apps/texinfo |
174 |
virtual/pkgconfig |
175 |
kernel_linux? ( >=sys-kernel/linux-headers-2.6.35 ) |
176 |
static-softmmu? ( ${LIB_DEPEND} ) |
177 |
test? ( |
178 |
dev-libs/glib[utils] |
179 |
sys-devel/bc |
180 |
)" |
181 |
|
182 |
STRIP_MASK="/usr/share/qemu/palcode-clipper" |
183 |
|
184 |
QA_PREBUILT=" |
185 |
usr/share/qemu/openbios-ppc |
186 |
usr/share/qemu/openbios-sparc64 |
187 |
usr/share/qemu/openbios-sparc32 |
188 |
usr/share/qemu/palcode-clipper |
189 |
usr/share/qemu/s390-ccw.img" |
190 |
|
191 |
QA_WX_LOAD="usr/bin/qemu-i386 |
192 |
usr/bin/qemu-x86_64 |
193 |
usr/bin/qemu-alpha |
194 |
usr/bin/qemu-arm |
195 |
usr/bin/qemu-cris |
196 |
usr/bin/qemu-m68k |
197 |
usr/bin/qemu-microblaze |
198 |
usr/bin/qemu-microblazeel |
199 |
usr/bin/qemu-mips |
200 |
usr/bin/qemu-mipsel |
201 |
usr/bin/qemu-or32 |
202 |
usr/bin/qemu-ppc |
203 |
usr/bin/qemu-ppc64 |
204 |
usr/bin/qemu-ppc64abi32 |
205 |
usr/bin/qemu-sh4 |
206 |
usr/bin/qemu-sh4eb |
207 |
usr/bin/qemu-sparc |
208 |
usr/bin/qemu-sparc64 |
209 |
usr/bin/qemu-armeb |
210 |
usr/bin/qemu-sparc32plus |
211 |
usr/bin/qemu-s390x |
212 |
usr/bin/qemu-unicore32" |
213 |
|
214 |
DOC_CONTENTS="If you don't have kvm compiled into the kernel, make sure |
215 |
you have the kernel module loaded before running kvm. The easiest way to |
216 |
ensure that the kernel module is loaded is to load it on boot.\n |
217 |
For AMD CPUs the module is called 'kvm-amd'\n |
218 |
For Intel CPUs the module is called 'kvm-intel'\n |
219 |
Please review /etc/conf.d/modules for how to load these\n\n |
220 |
Make sure your user is in the 'kvm' group\n |
221 |
Just run 'gpasswd -a <USER> kvm', then have <USER> re-login." |
222 |
|
223 |
qemu_support_kvm() { |
224 |
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386 \ |
225 |
use qemu_softmmu_targets_ppc || use qemu_softmmu_targets_ppc64 \ |
226 |
use qemu_softmmu_targets_s390x; then |
227 |
return 0 |
228 |
fi |
229 |
|
230 |
return 1 |
231 |
} |
232 |
|
233 |
pkg_pretend() { |
234 |
if use kernel_linux && kernel_is lt 2 6 25; then |
235 |
eerror "This version of KVM requres a host kernel of 2.6.25 or higher." |
236 |
elif use kernel_linux; then |
237 |
if ! linux_config_exists; then |
238 |
eerror "Unable to check your kernel for KVM support" |
239 |
else |
240 |
CONFIG_CHECK="~KVM ~TUN ~BRIDGE" |
241 |
ERROR_KVM="You must enable KVM in your kernel to continue" |
242 |
ERROR_KVM_AMD="If you have an AMD CPU, you must enable KVM_AMD in" |
243 |
ERROR_KVM_AMD+=" your kernel configuration." |
244 |
ERROR_KVM_INTEL="If you have an Intel CPU, you must enable" |
245 |
ERROR_KVM_INTEL+=" KVM_INTEL in your kernel configuration." |
246 |
ERROR_TUN="You will need the Universal TUN/TAP driver compiled" |
247 |
ERROR_TUN+=" into your kernel or loaded as a module to use the" |
248 |
ERROR_TUN+=" virtual network device if using -net tap." |
249 |
ERROR_BRIDGE="You will also need support for 802.1d" |
250 |
ERROR_BRIDGE+=" Ethernet Bridging for some network configurations." |
251 |
use vhost-net && CONFIG_CHECK+=" ~VHOST_NET" |
252 |
ERROR_VHOST_NET="You must enable VHOST_NET to have vhost-net" |
253 |
ERROR_VHOST_NET+=" support" |
254 |
|
255 |
if use amd64 || use x86 || use amd64-linux || use x86-linux; then |
256 |
CONFIG_CHECK+=" ~KVM_AMD ~KVM_INTEL" |
257 |
fi |
258 |
|
259 |
use python && CONFIG_CHECK+=" ~DEBUG_FS" |
260 |
ERROR_DEBUG_FS="debugFS support required for kvm_stat" |
261 |
|
262 |
# Now do the actual checks setup above |
263 |
check_extra_config |
264 |
fi |
265 |
fi |
266 |
} |
267 |
|
268 |
pkg_setup() { |
269 |
enewgroup kvm 78 |
270 |
|
271 |
python_export_best |
272 |
} |
273 |
|
274 |
src_prepare() { |
275 |
# Alter target makefiles to accept CFLAGS set via flag-o |
276 |
sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ |
277 |
Makefile Makefile.target || die |
278 |
|
279 |
epatch "${FILESDIR}"/qemu-9999-cflags.patch |
280 |
[[ -n ${BACKPORTS} ]] && \ |
281 |
EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \ |
282 |
epatch |
283 |
|
284 |
# Fix ld and objcopy being called directly |
285 |
tc-export LD OBJCOPY |
286 |
|
287 |
# Verbose builds |
288 |
MAKEOPTS+=" V=1" |
289 |
|
290 |
epatch_user |
291 |
} |
292 |
|
293 |
## |
294 |
# configures qemu based on the build directory and the build type |
295 |
# we are using. |
296 |
# |
297 |
qemu_src_configure() { |
298 |
debug-print-function $FUNCNAME "$@" |
299 |
|
300 |
local buildtype=$1 |
301 |
local builddir=$2 |
302 |
local conf_opts audio_opts |
303 |
local static_flag="static-${buildtype}" |
304 |
|
305 |
conf_opts="--prefix=/usr" |
306 |
conf_opts+=" --sysconfdir=/etc" |
307 |
conf_opts+=" --libdir=/usr/$(get_libdir)" |
308 |
conf_opts+=" --docdir=/usr/share/doc/${PF}/html" |
309 |
conf_opts+=" --disable-bsd-user" |
310 |
conf_opts+=" --disable-guest-agent" |
311 |
conf_opts+=" --disable-strip" |
312 |
conf_opts+=" --disable-werror" |
313 |
conf_opts+=" --python=${PYTHON}" |
314 |
|
315 |
# audio options |
316 |
audio_opts="oss" |
317 |
use alsa && audio_opts="alsa,${audio_opts}" |
318 |
use sdl && audio_opts="sdl,${audio_opts}" |
319 |
use pulseaudio && audio_opts="pa,${audio_opts}" |
320 |
|
321 |
if [[ ${buildtype} == "user" ]]; then |
322 |
conf_opts+=" --enable-linux-user" |
323 |
conf_opts+=" --disable-system" |
324 |
conf_opts+=" --target-list=${user_targets}" |
325 |
conf_opts+=" --disable-blobs" |
326 |
conf_opts+=" --disable-bluez" |
327 |
conf_opts+=" --disable-curses" |
328 |
conf_opts+=" --disable-kvm" |
329 |
conf_opts+=" --disable-libiscsi" |
330 |
conf_opts+=" --disable-glusterfs" |
331 |
conf_opts+=" $(use_enable seccomp)" |
332 |
conf_opts+=" --disable-sdl" |
333 |
conf_opts+=" --disable-smartcard-nss" |
334 |
conf_opts+=" --disable-tools" |
335 |
conf_opts+=" --disable-vde" |
336 |
fi |
337 |
|
338 |
if [[ ${buildtype} == "softmmu" ]]; then |
339 |
conf_opts+=" --disable-linux-user" |
340 |
conf_opts+=" --enable-system" |
341 |
conf_opts+=" --with-system-pixman" |
342 |
conf_opts+=" --target-list=${softmmu_targets}" |
343 |
conf_opts+=" $(use_enable bluetooth bluez)" |
344 |
conf_opts+=" $(use_enable gtk)" |
345 |
use gtk && conf_opts+=" --with-gtkabi=3.0" |
346 |
conf_opts+=" $(use_enable sdl)" |
347 |
conf_opts+=" $(use_enable aio linux-aio)" |
348 |
conf_opts+=" $(use_enable accessibility brlapi)" |
349 |
conf_opts+=" $(use_enable caps cap-ng)" |
350 |
conf_opts+=" $(use_enable curl)" |
351 |
conf_opts+=" $(use_enable fdt)" |
352 |
conf_opts+=" $(use_enable glusterfs)" |
353 |
conf_opts+=" $(use_enable iscsi libiscsi)" |
354 |
conf_opts+=" $(use_enable jpeg vnc-jpeg)" |
355 |
conf_opts+=" $(use_enable kernel_linux kvm)" |
356 |
conf_opts+=" $(use_enable kernel_linux nptl)" |
357 |
conf_opts+=" $(use_enable ncurses curses)" |
358 |
conf_opts+=" $(use_enable opengl glx)" |
359 |
conf_opts+=" $(use_enable png vnc-png)" |
360 |
conf_opts+=" $(use_enable rbd)" |
361 |
conf_opts+=" $(use_enable sasl vnc-sasl)" |
362 |
conf_opts+=" $(use_enable seccomp)" |
363 |
conf_opts+=" $(use_enable smartcard smartcard-nss)" |
364 |
conf_opts+=" $(use_enable spice)" |
365 |
conf_opts+=" $(use_enable tls vnc-tls)" |
366 |
conf_opts+=" $(use_enable tls vnc-ws)" |
367 |
conf_opts+=" $(use_enable usbredir usb-redir)" |
368 |
conf_opts+=" $(use_enable uuid)" |
369 |
conf_opts+=" $(use_enable vde)" |
370 |
conf_opts+=" $(use_enable vhost-net)" |
371 |
conf_opts+=" $(use_enable virtfs)" |
372 |
conf_opts+=" $(use_enable vnc)" |
373 |
conf_opts+=" $(use_enable xattr attr)" |
374 |
conf_opts+=" $(use_enable xen)" |
375 |
conf_opts+=" $(use_enable xen xen-pci-passthrough)" |
376 |
conf_opts+=" $(use_enable xfs xfsctl)" |
377 |
use mixemu && conf_opts+=" --enable-mixemu" |
378 |
conf_opts+=" --audio-drv-list=${audio_opts}" |
379 |
conf_opts+=" --enable-migration-from-qemu-kvm" |
380 |
fi |
381 |
|
382 |
conf_opts+=" $(use_enable debug debug-info)" |
383 |
conf_opts+=" $(use_enable debug debug-tcg)" |
384 |
conf_opts+=" --enable-docs" |
385 |
conf_opts+=" $(use_enable tci tcg-interpreter)" |
386 |
|
387 |
# Add support for SystemTAP |
388 |
use systemtap && conf_opts="${conf_opts} --enable-trace-backend=dtrace" |
389 |
|
390 |
# Add support for static builds |
391 |
use ${static_flag} && conf_opts="${conf_opts} --static --disable-pie" |
392 |
|
393 |
# We always want to attempt to build with PIE support as it results |
394 |
# in a more secure binary. But it doesn't work with static or if |
395 |
# the current GCC doesn't have PIE support. |
396 |
if ! use ${static_flag} && gcc-specs-pie; then |
397 |
conf_opts="${conf_opts} --enable-pie" |
398 |
fi |
399 |
|
400 |
einfo "./configure ${conf_opts}" |
401 |
cd ${builddir} |
402 |
../configure \ |
403 |
--cc="$(tc-getCC)" \ |
404 |
--host-cc="$(tc-getBUILD_CC)" \ |
405 |
${conf_opts} \ |
406 |
|| die "configure failed" |
407 |
|
408 |
# FreeBSD's kernel does not support QEMU assigning/grabbing |
409 |
# host USB devices yet |
410 |
use kernel_FreeBSD && \ |
411 |
sed -E -e "s|^(HOST_USB=)bsd|\1stub|" -i "${S}"/config-host.mak |
412 |
} |
413 |
|
414 |
src_configure() { |
415 |
softmmu_targets= |
416 |
user_targets= |
417 |
|
418 |
for target in ${IUSE_SOFTMMU_TARGETS} ; do |
419 |
use "qemu_softmmu_targets_${target}" && \ |
420 |
softmmu_targets="${softmmu_targets},${target}-softmmu" |
421 |
done |
422 |
|
423 |
for target in ${IUSE_USER_TARGETS} ; do |
424 |
use "qemu_user_targets_${target}" && \ |
425 |
user_targets="${user_targets},${target}-linux-user" |
426 |
done |
427 |
|
428 |
[[ -n ${softmmu_targets} ]] && \ |
429 |
einfo "Building the following softmmu targets: ${softmmu_targets}" |
430 |
|
431 |
[[ -n ${user_targets} ]] && \ |
432 |
einfo "Building the following user targets: ${user_targets}" |
433 |
|
434 |
if [[ -n ${softmmu_targets} ]]; then |
435 |
mkdir "${S}/softmmu-build" |
436 |
qemu_src_configure "softmmu" "${S}/softmmu-build" |
437 |
fi |
438 |
|
439 |
if [[ -n ${user_targets} ]]; then |
440 |
mkdir "${S}/user-build" |
441 |
qemu_src_configure "user" "${S}/user-build" |
442 |
fi |
443 |
} |
444 |
|
445 |
src_compile() { |
446 |
if [[ -n ${user_targets} ]]; then |
447 |
cd "${S}/user-build" |
448 |
default |
449 |
fi |
450 |
|
451 |
if [[ -n ${softmmu_targets} ]]; then |
452 |
cd "${S}/softmmu-build" |
453 |
default |
454 |
fi |
455 |
} |
456 |
|
457 |
src_test() { |
458 |
cd "${S}/softmmu-build" |
459 |
emake -j1 check |
460 |
emake -j1 check-report.html |
461 |
} |
462 |
|
463 |
qemu_python_install() { |
464 |
python_domodule "${S}/QMP/qmp.py" |
465 |
|
466 |
python_doscript "${S}/scripts/kvm/kvm_stat" |
467 |
python_doscript "${S}/scripts/kvm/vmxcap" |
468 |
python_doscript "${S}/QMP/qmp-shell" |
469 |
python_doscript "${S}/QMP/qemu-ga-client" |
470 |
} |
471 |
|
472 |
src_install() { |
473 |
if [[ -n ${user_targets} ]]; then |
474 |
cd "${S}/user-build" |
475 |
emake DESTDIR="${ED}" install |
476 |
|
477 |
# Install binfmt handler init script for user targets |
478 |
newinitd "${FILESDIR}/qemu-binfmt.initd-r1" qemu-binfmt |
479 |
fi |
480 |
|
481 |
if [[ -n ${softmmu_targets} ]]; then |
482 |
cd "${S}/softmmu-build" |
483 |
emake DESTDIR="${ED}" install |
484 |
|
485 |
if use test; then |
486 |
dohtml check-report.html |
487 |
fi |
488 |
|
489 |
if use kernel_linux; then |
490 |
udev_dorules "${FILESDIR}"/65-kvm.rules |
491 |
fi |
492 |
|
493 |
if use qemu_softmmu_targets_x86_64 ; then |
494 |
newbin "${FILESDIR}/qemu-kvm-1.4" qemu-kvm |
495 |
ewarn "The deprecated '/usr/bin/kvm' symlink is no longer installed" |
496 |
ewarn "You should use '/usr/bin/qemu-kvm', you may need to edit" |
497 |
ewarn "your libvirt configs or other wrappers for ${PN}" |
498 |
elif use x86 || use amd64; then |
499 |
elog "You disabled QEMU_SOFTMMU_TARGETS=x86_64, this disables install" |
500 |
elog "of the /usr/bin/qemu-kvm script." |
501 |
fi |
502 |
|
503 |
if use python; then |
504 |
python_foreach_impl qemu_python_install |
505 |
fi |
506 |
fi |
507 |
|
508 |
# Install config file example for qemu-bridge-helper |
509 |
insinto "/etc/qemu" |
510 |
doins "${FILESDIR}/bridge.conf" |
511 |
|
512 |
# Remove the docdir placed qmp-commands.txt |
513 |
mv "${ED}/usr/share/doc/${PF}/html/qmp-commands.txt" "${S}/QMP/" |
514 |
|
515 |
cd "${S}" |
516 |
dodoc Changelog MAINTAINERS docs/specs/pci-ids.txt |
517 |
newdoc pc-bios/README README.pc-bios |
518 |
dodoc QMP/qmp-commands.txt QMP/qmp-events.txt QMP/qmp-spec.txt |
519 |
|
520 |
# Remove SeaBIOS since we're using the SeaBIOS packaged one |
521 |
rm "${ED}/usr/share/qemu/bios.bin" |
522 |
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then |
523 |
dosym ../seabios/bios.bin /usr/share/qemu/bios.bin |
524 |
fi |
525 |
|
526 |
# Remove vgabios since we're using the vgabios packaged one |
527 |
rm "${ED}/usr/share/qemu/vgabios.bin" |
528 |
rm "${ED}/usr/share/qemu/vgabios-cirrus.bin" |
529 |
rm "${ED}/usr/share/qemu/vgabios-qxl.bin" |
530 |
rm "${ED}/usr/share/qemu/vgabios-stdvga.bin" |
531 |
rm "${ED}/usr/share/qemu/vgabios-vmware.bin" |
532 |
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then |
533 |
dosym ../vgabios/vgabios.bin /usr/share/qemu/vgabios.bin |
534 |
dosym ../vgabios/vgabios-cirrus.bin /usr/share/qemu/vgabios-cirrus.bin |
535 |
dosym ../vgabios/vgabios-qxl.bin /usr/share/qemu/vgabios-qxl.bin |
536 |
dosym ../vgabios/vgabios-stdvga.bin /usr/share/qemu/vgabios-stdvga.bin |
537 |
dosym ../vgabios/vgabios-vmware.bin /usr/share/qemu/vgabios-vmware.bin |
538 |
fi |
539 |
|
540 |
# Remove sgabios since we're using the sgabios packaged one |
541 |
rm "${ED}/usr/share/qemu/sgabios.bin" |
542 |
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then |
543 |
dosym ../sgabios/sgabios.bin /usr/share/qemu/sgabios.bin |
544 |
fi |
545 |
|
546 |
# Remove iPXE since we're using the iPXE packaged one |
547 |
rm "${ED}"/usr/share/qemu/pxe-*.rom |
548 |
if use qemu_softmmu_targets_x86_64 || use qemu_softmmu_targets_i386; then |
549 |
dosym ../ipxe/8086100e.rom /usr/share/qemu/pxe-e1000.rom |
550 |
dosym ../ipxe/80861209.rom /usr/share/qemu/pxe-eepro100.rom |
551 |
dosym ../ipxe/10500940.rom /usr/share/qemu/pxe-ne2k_pci.rom |
552 |
dosym ../ipxe/10222000.rom /usr/share/qemu/pxe-pcnet.rom |
553 |
dosym ../ipxe/10ec8139.rom /usr/share/qemu/pxe-rtl8139.rom |
554 |
dosym ../ipxe/1af41000.rom /usr/share/qemu/pxe-virtio.rom |
555 |
fi |
556 |
|
557 |
qemu_support_kvm && readme.gentoo_create_doc |
558 |
} |
559 |
|
560 |
pkg_postinst() { |
561 |
local virtfs_caps= |
562 |
|
563 |
if qemu_support_kvm; then |
564 |
readme.gentoo_print_elog |
565 |
ewarn "Migration from qemu-kvm instances and loading qemu-kvm created" |
566 |
ewarn "save states will be removed in the next release (1.6.x)" |
567 |
ewarn |
568 |
ewarn "It is recommended that you migrate any VMs that may be running" |
569 |
ewarn "on qemu-kvm to a host with a newer qemu and regenerate" |
570 |
ewarn "any saved states with a newer qemu." |
571 |
ewarn |
572 |
ewarn "qemu-kvm was the primary qemu provider in Gentoo through 1.2.x" |
573 |
fi |
574 |
|
575 |
virtfs_caps+="cap_chown,cap_dac_override,cap_fowner,cap_fsetid," |
576 |
virtfs_caps+="cap_setgid,cap_mknod,cap_setuid" |
577 |
|
578 |
fcaps cap_net_admin /usr/libexec/qemu-bridge-helper |
579 |
use virtfs && fcaps ${virtfs_caps} /usr/bin/virtfs-proxy-helper |
580 |
} |
581 |
|
582 |
pkg_info() { |
583 |
echo "Using:" |
584 |
echo " $(best_version app-emulation/spice-protocol)" |
585 |
echo " $(best_version sys-firmware/ipxe)" |
586 |
echo " $(best_version sys-firmware/seabios)" |
587 |
if has_version sys-firmware/seabios[binary]; then |
588 |
echo " USE=binary" |
589 |
else |
590 |
echo " USE=''" |
591 |
fi |
592 |
echo " $(best_version sys-firmware/vgabios)" |
593 |
} |