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