Gentoo Archives: gentoo-commits

From: Yixun Lan <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/files/, app-emulation/xen-tools/
Date: Sat, 16 Feb 2019 13:59:11
Message-Id: 1550325541.4a0c57cd681155f88da46dffc1070011473c193c.dlan@gentoo
1 commit: 4a0c57cd681155f88da46dffc1070011473c193c
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Fri Feb 15 09:25:25 2019 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 16 13:59:01 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a0c57cd
7
8 app-emulation/xen-tools: bump to 4.10.3
9
10 Package-Manager: Portage-2.3.60, Repoman-2.3.12
11 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
12 Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
13
14 app-emulation/xen-tools/Manifest | 1 +
15 app-emulation/xen-tools/files/gentoo-patches.conf | 10 +-
16 app-emulation/xen-tools/xen-tools-4.10.3.ebuild | 464 ++++++++++++++++++++++
17 3 files changed, 470 insertions(+), 5 deletions(-)
18
19 diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
20 index ba60b89b002..d5571374eb8 100644
21 --- a/app-emulation/xen-tools/Manifest
22 +++ b/app-emulation/xen-tools/Manifest
23 @@ -3,6 +3,7 @@ DIST seabios-1.10.0.tar.gz 588213 BLAKE2B 254eb4572a1dac06020a545820efb53a130a02
24 DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27
25 DIST xen-4.10.2-upstream-patches-1.tar.xz 31768 BLAKE2B 9205e5fa011426ae3eeaa19694d14ca233805be1e60326d53ec319de1fa28e3b30e7949d7d694ccc8f0e5ea77df580bb6cf22652ae1fd023fdc49b2d37dbce0a SHA512 38c2286d8c1e39d42c266c76d97b5321ca5fb931ebe33ff01c5210fdda4d64ccb39eb6463e756c5178ab7d1c8433a56668abf1dabf4b5b5e85823817d927cd33
26 DIST xen-4.10.2.tar.gz 24697204 BLAKE2B b331d3ad8d7842446f7d2da5dd31560f636aa1408dd3cc8798dff35b868ef5a609d17e97ef4355e1e5aa825a5abc74103796f9a8015037f0a564ffcebd825722 SHA512 2e301b4d6eb106fcb52203bc1208c8fd1fc7bb5d795166c0f86e4085227050301f7daa6f21db440c47bc2ca2c7f87d9b96753cfdf3fa724e0416b5679b84c163
27 +DIST xen-4.10.3.tar.gz 24695778 BLAKE2B 50a9e31fb4cf587eeedb357fc710405a1cd4506174a38eb9b032a0cdd9b7f7343d98624ecb07cf605b1403664c7117cdc8f011290309caa18ca9604b4008b906 SHA512 030d23109ce4c0ebf50ade6841d5525a39032bcf8fd0599ccaa9502ff301c1f61f9c5f49233b41a5934a71228958febc1e529a9fc6822ba401a0c18c490ad412
28 DIST xen-4.11.0-upstream-patches-2.tar.xz 83788 BLAKE2B 3f612492827a1408a3ba058c64b8b9562f7415d19f15241257b7b6754aed472e37538bfed2a017c6664b276f43a1e9c5f87b60454b2eaa0613c84edeb035a28d SHA512 cddc270f2fddbf75f33b45496f5db4586b5463d65fa3604e9df48c116231f088551213c2a021f2b0ad329f7290b36bfdd577cda506c359311c65e897cdf50bd1
29 DIST xen-4.11.0.tar.gz 25131533 BLAKE2B 892639b8bcd9b9956104e4d5137ffd88e17f92d965fa967b4af8d74a4fddcc21c6971c53026e0fb5ce833ab2c25c68f827abcac0b7b1dcebc21dca645c465573 SHA512 33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a
30 DIST xen-4.11.1.tar.gz 25152217 BLAKE2B a8dfbeb3d490787725c589e1ce82dcbbcd0be7fb4743b38daf3a8704dffda34d1faabb07d74e01d2fab1572ce0b730c21192469317545e8b3edb3fae1130ef8c SHA512 c1655c5decdaed95a2b9a99652318cfc72f6cfdae957cfe60d635f7787e8850f33e8fafc4c4b8d61fb579c9b9d93028a6382903e71808a0418b931e76d72a649
31
32 diff --git a/app-emulation/xen-tools/files/gentoo-patches.conf b/app-emulation/xen-tools/files/gentoo-patches.conf
33 index 0f303522167..a8c1aff4b5c 100644
34 --- a/app-emulation/xen-tools/files/gentoo-patches.conf
35 +++ b/app-emulation/xen-tools/files/gentoo-patches.conf
36 @@ -118,18 +118,18 @@ _gx048=" xen-tools-4.11.0-gcc8.patch"
37 # Fix pdf document generation, bug #650396
38 _gx049=" xen-tools-4.10.1-pdfdoc.patch"
39
40 -# xen-tools-4.10.1 patches set
41 -_gpv_xen_tools_4101_0="
42 +# xen-tools-4.10.2 patches set
43 +_gpv_xen_tools_4102_0="
44 ${_gx038} ${_gx017} ${_gx043}
45 ${_gx027}
46 ${_gx028} ${_gx029}
47 ${_gx037} ${_gx042}
48 -${_gx044} ${_gx045} ${_gx046} ${_gx047}
49 +${_gx045} ${_gx046} ${_gx047}
50 ${_gx049}
51 "
52
53 -# xen-tools-4.10.2 patches set
54 -_gpv_xen_tools_4102_0="
55 +# xen-tools-4.10.3 patches set
56 +_gpv_xen_tools_4103_0="
57 ${_gx038} ${_gx017} ${_gx043}
58 ${_gx027}
59 ${_gx028} ${_gx029}
60
61 diff --git a/app-emulation/xen-tools/xen-tools-4.10.3.ebuild b/app-emulation/xen-tools/xen-tools-4.10.3.ebuild
62 new file mode 100644
63 index 00000000000..f8e1a14db29
64 --- /dev/null
65 +++ b/app-emulation/xen-tools/xen-tools-4.10.3.ebuild
66 @@ -0,0 +1,464 @@
67 +# Copyright 1999-2019 Gentoo Authors
68 +# Distributed under the terms of the GNU General Public License v2
69 +
70 +EAPI=7
71 +
72 +PYTHON_COMPAT=( python2_7 )
73 +PYTHON_REQ_USE='ncurses,xml,threads'
74 +
75 +inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
76 +
77 +MY_PV=${PV/_/-}
78 +
79 +if [[ $PV == *9999 ]]; then
80 + inherit git-r3
81 + REPO="xen.git"
82 + EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
83 + S="${WORKDIR}/${REPO}"
84 +else
85 + KEYWORDS="~amd64 ~arm ~arm64 ~x86"
86 + UPSTREAM_VER=
87 + SECURITY_VER=
88 + # xen-tools's gentoo patches tarball
89 + GENTOO_VER=14
90 + # xen-tools's gentoo patches version which apply to this specific ebuild
91 + GENTOO_GPV=0
92 + # xen-tools ovmf's patches
93 + OVMF_VER=3
94 +
95 + SEABIOS_VER=1.10.0
96 + # OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
97 + OVMF_PV=20170321
98 +
99 + [[ -n ${UPSTREAM_VER} ]] && \
100 + UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
101 + https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
102 + [[ -n ${SECURITY_VER} ]] && \
103 + SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
104 + [[ -n ${GENTOO_VER} ]] && \
105 + GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
106 + https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
107 + [[ -n ${OVMF_VER} ]] && \
108 + OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
109 +
110 + SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
111 + http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
112 + https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
113 + ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
114 + ${OVMF_PATCHSET_URI} )
115 + ${UPSTREAM_PATCHSET_URI}
116 + ${SECURITY_PATCHSET_URI}
117 + ${GENTOO_PATCHSET_URI}"
118 +
119 + S="${WORKDIR}/xen-${MY_PV}"
120 +fi
121 +
122 +DESCRIPTION="Xen tools including QEMU and xl"
123 +HOMEPAGE="https://www.xenproject.org"
124 +DOCS=( README docs/README.xen-bugtool )
125 +
126 +LICENSE="GPL-2"
127 +SLOT="0/$(ver_cut 1-2)"
128 +# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
129 +# >=dev-lang/ocaml-4 stable
130 +# Masked in profiles/eapi-5-files instead
131 +IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
132 +
133 +REQUIRED_USE="
134 + ${PYTHON_REQUIRED_USE}
135 + pygrub? ( python )
136 + ovmf? ( hvm )
137 + ^^ ( qemu system-qemu )"
138 +
139 +COMMON_DEPEND="
140 + sys-apps/pciutils
141 + dev-libs/lzo:2
142 + dev-libs/glib:2
143 + dev-libs/yajl
144 + dev-libs/libaio
145 + dev-libs/libgcrypt:0
146 + sys-libs/zlib
147 + ${PYTHON_DEPS}
148 +"
149 +
150 +DEPEND="${COMMON_DEPEND}
151 + >=sys-kernel/linux-headers-4.11
152 + dev-python/lxml[${PYTHON_USEDEP}]
153 + x86? ( sys-devel/dev86
154 + sys-power/iasl )
155 + pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
156 + api? ( dev-libs/libxml2
157 + net-misc/curl )
158 + ovmf? (
159 + !arm? ( !arm64? ( dev-lang/nasm ) )
160 + $(python_gen_impl_dep sqlite)
161 + )
162 + !amd64? ( >=sys-apps/dtc-1.4.0 )
163 + amd64? ( sys-devel/bin86
164 + system-seabios? ( sys-firmware/seabios )
165 + sys-firmware/ipxe
166 + sys-devel/dev86
167 + sys-power/iasl )
168 + dev-lang/perl
169 + app-misc/pax-utils
170 + doc? (
171 + app-text/ghostscript-gpl
172 + app-text/pandoc
173 + dev-python/markdown[${PYTHON_USEDEP}]
174 + dev-texlive/texlive-latexextra
175 + media-gfx/transfig
176 + )
177 + hvm? ( x11-base/xorg-proto )
178 + qemu? (
179 + app-arch/snappy:=
180 + x11-libs/pixman
181 + sdl? ( media-libs/libsdl[X] )
182 + )
183 + system-qemu? ( app-emulation/qemu[xen] )
184 + ocaml? ( dev-ml/findlib
185 + >=dev-lang/ocaml-4 )"
186 +
187 +RDEPEND="${COMMON_DEPEND}
188 + sys-apps/iproute2[-minimal]
189 + net-misc/bridge-utils
190 + screen? (
191 + app-misc/screen
192 + app-admin/logrotate
193 + )"
194 +
195 +# hvmloader is used to bootstrap a fully virtualized kernel
196 +# Approved by QA team in bug #144032
197 +QA_WX_LOAD="
198 + usr/libexec/xen/boot/hvmloader
199 + usr/share/qemu-xen/qemu/s390-ccw.img
200 + usr/share/qemu-xen/qemu/u-boot.e500
201 +"
202 +
203 +QA_PREBUILT="
204 + usr/libexec/xen/bin/ivshmem-client
205 + usr/libexec/xen/bin/ivshmem-server
206 + usr/libexec/xen/bin/qemu-img
207 + usr/libexec/xen/bin/qemu-io
208 + usr/libexec/xen/bin/qemu-nbd
209 + usr/libexec/xen/bin/qemu-system-i386
210 + usr/libexec/xen/bin/virtfs-proxy-helper
211 + usr/libexec/xen/libexec/xen-bridge-helper
212 + usr/share/qemu-xen/qemu/s390-ccw.img
213 + usr/share/qemu-xen/qemu/s390-netboot.img
214 + usr/share/qemu-xen/qemu/u-boot.e500
215 +"
216 +
217 +RESTRICT="test"
218 +
219 +pkg_setup() {
220 + python_setup
221 + export "CONFIG_LOMOUNT=y"
222 +
223 + #bug 522642, disable compile tools/tests
224 + export "CONFIG_TESTS=n"
225 +
226 + if [[ -z ${XEN_TARGET_ARCH} ]] ; then
227 + if use x86 && use amd64; then
228 + die "Confusion! Both x86 and amd64 are set in your use flags!"
229 + elif use x86; then
230 + export XEN_TARGET_ARCH="x86_32"
231 + elif use amd64 ; then
232 + export XEN_TARGET_ARCH="x86_64"
233 + elif use arm; then
234 + export XEN_TARGET_ARCH="arm32"
235 + elif use arm64; then
236 + export XEN_TARGET_ARCH="arm64"
237 + else
238 + die "Unsupported architecture!"
239 + fi
240 + fi
241 +}
242 +
243 +src_prepare() {
244 + local i
245 +
246 + # Upstream's patchset
247 + if [[ -n ${UPSTREAM_VER} ]]; then
248 + einfo "Try to apply Xen Upstream patch set"
249 + eapply "${WORKDIR}"/patches-upstream
250 + fi
251 +
252 + # Security patchset
253 + if [[ -n ${SECURITY_VER} ]]; then
254 + einfo "Try to apply Xen Security patch set"
255 + # apply main xen patches
256 + # Two parallel systems, both work side by side
257 + # Over time they may concdense into one. This will suffice for now
258 + EPATCH_SUFFIX="patch"
259 + EPATCH_FORCE="yes"
260 +
261 + source "${WORKDIR}"/patches-security/${PV}.conf || die
262 +
263 + for i in ${XEN_SECURITY_MAIN}; do
264 + eapply "${WORKDIR}"/patches-security/xen/$i
265 + done
266 +
267 + # apply qemu-xen/upstream patches
268 + pushd "${S}"/tools/qemu-xen/ > /dev/null
269 + for i in ${XEN_SECURITY_QEMUU}; do
270 + eapply "${WORKDIR}"/patches-security/qemuu/$i
271 + done
272 + popd > /dev/null
273 +
274 + # apply qemu-traditional patches
275 + pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
276 + for i in ${XEN_SECURITY_QEMUT}; do
277 + eapply "${WORKDIR}"/patches-security/qemut/$i
278 + done
279 + popd > /dev/null
280 + fi
281 +
282 + # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
283 + mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
284 + pushd tools/firmware/ > /dev/null
285 + ln -s seabios-dir-remote seabios-dir || die
286 + popd > /dev/null
287 +
288 + # Gentoo's patchset
289 + if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
290 + einfo "Try to apply Gentoo specific patch set"
291 + source "${FILESDIR}"/gentoo-patches.conf || die
292 + _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
293 + for i in ${!_gpv}; do
294 + eapply "${WORKDIR}"/patches-gentoo/$i
295 + done
296 + fi
297 +
298 + # Ovmf's patchset
299 + if use ovmf; then
300 + if [[ -n ${OVMF_VER} ]];then
301 + einfo "Try to apply Ovmf patch set"
302 + pushd "${WORKDIR}"/ovmf-*/ > /dev/null
303 + eapply "${WORKDIR}"/patches-ovmf
304 + popd > /dev/null
305 + fi
306 + mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
307 + fi
308 +
309 + mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
310 +
311 + # Fix texi2html build error with new texi2html, qemu.doc.html
312 + sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
313 +
314 + use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
315 + sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
316 + -i tools/firmware/Makefile || die
317 +
318 + # Drop .config, fixes to gcc-4.6
319 + sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
320 +
321 + # if the user *really* wants to use their own custom-cflags, let them
322 + if use custom-cflags; then
323 + einfo "User wants their own CFLAGS - removing defaults"
324 +
325 + # try and remove all the default cflags
326 + find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
327 + -exec sed \
328 + -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
329 + -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
330 + -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
331 + -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
332 + -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
333 + -i {} + || die "failed to re-set custom-cflags"
334 + else
335 + unset CFLAGS
336 + unset LDFLAGS
337 + unset ASFLAGS
338 + unset CPPFLAGS
339 + fi
340 +
341 + if ! use pygrub; then
342 + sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
343 + fi
344 +
345 + if ! use python; then
346 + sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
347 + fi
348 +
349 + if ! use hvm; then
350 + sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
351 + # Bug 351648
352 + elif ! use x86 && ! has x86 $(get_all_abis); then
353 + mkdir -p "${WORKDIR}"/extra-headers/gnu || die
354 + touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
355 + export CPATH="${WORKDIR}"/extra-headers
356 + fi
357 +
358 + if use qemu; then
359 + if use sdl; then
360 + sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
361 + tools/Makefile || die
362 + else
363 + sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
364 + tools/qemu-xen-traditional/xen-setup || die
365 + sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
366 + tools/Makefile || die
367 + fi
368 + else
369 + # Don't bother with qemu, only needed for fully virtualised guests
370 + sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
371 + fi
372 +
373 + # Reset bash completion dir; Bug 472438
374 + sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
375 + -i Config.mk || die
376 + sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
377 +
378 + # xencommons, Bug #492332, sed lighter weight than patching
379 + sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
380 + -i tools/hotplug/Linux/init.d/xencommons.in || die
381 +
382 + # fix bashishm
383 + sed -e '/Usage/s/\$//g' \
384 + -i tools/hotplug/Linux/init.d/xendriverdomain.in || die
385 +
386 + # respect multilib, usr/lib/libcacard.so.0.0.0
387 + sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
388 + -i tools/qemu-xen/configure || die
389 +
390 + #bug 518136, don't build 32bit exactuable for nomultilib profile
391 + if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
392 + sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
393 + fi
394 +
395 + # uncomment lines in xl.conf
396 + sed -e 's:^#autoballoon=:autoballoon=:' \
397 + -e 's:^#lockfile=:lockfile=:' \
398 + -e 's:^#vif.default.script=:vif.default.script=:' \
399 + -i tools/examples/xl.conf || die
400 +
401 + default
402 +}
403 +
404 +src_configure() {
405 + local myconf="--prefix=${PREFIX}/usr \
406 + --libdir=${PREFIX}/usr/$(get_libdir) \
407 + --libexecdir=${PREFIX}/usr/libexec \
408 + --localstatedir=${EPREFIX}/var \
409 + --disable-werror \
410 + --disable-xen \
411 + --enable-tools \
412 + --enable-docs \
413 + $(use_enable pam) \
414 + $(use_enable api xenapi) \
415 + $(use_enable ovmf) \
416 + $(use_enable ocaml ocamltools) \
417 + --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
418 + "
419 +
420 + use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
421 + use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
422 + use amd64 && myconf+=" $(use_enable qemu-traditional)"
423 + tc-ld-disable-gold # Bug 669570
424 + econf ${myconf}
425 +}
426 +
427 +src_compile() {
428 + local myopt
429 + use debug && myopt="${myopt} debug=y"
430 +
431 + if test-flag-CC -fno-strict-overflow; then
432 + append-flags -fno-strict-overflow
433 + fi
434 +
435 + emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
436 +
437 + if use doc; then
438 + emake -C docs build
439 + else
440 + emake -C docs man-pages
441 + fi
442 +}
443 +
444 +src_install() {
445 + # Override auto-detection in the build system, bug #382573
446 + export INITD_DIR=/tmp/init.d
447 + export CONFIG_LEAF_DIR=../tmp/default
448 +
449 + # Let the build system compile installed Python modules.
450 + local PYTHONDONTWRITEBYTECODE
451 + export PYTHONDONTWRITEBYTECODE
452 +
453 + emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
454 + XEN_PYTHON_NATIVE_INSTALL=y install-tools
455 +
456 + # Created at runtime
457 + rm -rv "${ED%/}/var/run" || die
458 +
459 + # Fix the remaining Python shebangs.
460 + python_fix_shebang "${D}"
461 +
462 + # Remove RedHat-specific stuff
463 + rm -rf "${D}"tmp || die
464 +
465 + if use doc; then
466 + emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
467 + dodoc -r docs/{pdf,txt}
468 + else
469 + emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
470 + fi
471 + dodoc ${DOCS[@]}
472 +
473 + newconfd "${FILESDIR}"/xendomains.confd xendomains
474 + newconfd "${FILESDIR}"/xenstored.confd xenstored
475 + newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
476 + newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
477 + newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
478 + newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
479 + newinitd "${FILESDIR}"/xencommons.initd xencommons
480 + newconfd "${FILESDIR}"/xencommons.confd xencommons
481 + newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
482 + newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
483 + newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
484 +
485 + if use screen; then
486 + cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
487 + cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
488 + keepdir /var/log/xen-consoles
489 + fi
490 +
491 + # For -static-libs wrt Bug 384355
492 + if ! use static-libs; then
493 + rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
494 + fi
495 +
496 + # for xendomains
497 + keepdir /etc/xen/auto
498 +
499 + # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
500 + find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
501 + -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
502 +
503 + keepdir /var/lib/xen/dump
504 + keepdir /var/lib/xen/xenpaging
505 + keepdir /var/lib/xenstored
506 + keepdir /var/log/xen
507 +}
508 +
509 +pkg_postinst() {
510 + elog "Official Xen Guide and the offical wiki page:"
511 + elog "https://wiki.gentoo.org/wiki/Xen"
512 + elog "https://wiki.xen.org/wiki/Main_Page"
513 + elog ""
514 + elog "Recommended to utilise the xencommons script to config system at boot"
515 + elog "Add by use of rc-update on completion of the install"
516 +
517 + if ! use hvm; then
518 + echo
519 + elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
520 + elog "support enable the hvm use flag."
521 + elog "An x86 or amd64 system is required to build HVM support."
522 + fi
523 +
524 + if use qemu; then
525 + elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
526 + elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
527 + elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
528 + elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
529 + fi
530 +}