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