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