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