Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/, app-emulation/xen-tools/files/
Date: Tue, 02 Oct 2018 11:03:23
Message-Id: 1538478188.bdac6c2182b4bbbb593f3153cd8eeb4b2c219a19.whissi@gentoo
1 commit: bdac6c2182b4bbbb593f3153cd8eeb4b2c219a19
2 Author: Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Tue Oct 2 11:02:39 2018 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 2 11:03:08 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdac6c21
7
8 app-emulation/xen-tools: drop old
9
10 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
11 Package-Manager: Portage-2.3.50, Repoman-2.3.11
12 Closes: https://github.com/gentoo/gentoo/pull/9980
13 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
14
15 app-emulation/xen-tools/Manifest | 7 -
16 app-emulation/xen-tools/files/gentoo-patches.conf | 56 ---
17 app-emulation/xen-tools/xen-tools-4.10.0.ebuild | 455 --------------------
18 app-emulation/xen-tools/xen-tools-4.10.1-r1.ebuild | 456 --------------------
19 app-emulation/xen-tools/xen-tools-4.11.0-r1.ebuild | 457 ---------------------
20 app-emulation/xen-tools/xen-tools-4.9.2-r1.ebuild | 453 --------------------
21 6 files changed, 1884 deletions(-)
22
23 diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
24 index e76a49a265c..1b0e99aa996 100644
25 --- a/app-emulation/xen-tools/Manifest
26 +++ b/app-emulation/xen-tools/Manifest
27 @@ -1,16 +1,9 @@
28 DIST ovmf-20170321.tar.xz 22141096 BLAKE2B 79e991c8f9deb297865c319e88b6e6d46b1d08067d3fd639c83f2a379670779ecc60c74c2671ea4eb4a6659fe08ac2d7d4ff337b010b42a908a50829a2d18eeb SHA512 f65dabde3df967224e2072817211786ee4fc3994ee31f8f9d6f67fd74e3479e1da459c720169dd81020cdc1777e4600e531bb124b4625c2ded42c6005bdc802a
29 DIST seabios-1.10.0.tar.gz 588213 BLAKE2B 254eb4572a1dac06020a545820efb53a130a027aaab035cd916009b424475f89bd151f82f1bc5103c01c4657d09da3219d2fbcc7728add473011dcfc7bff7410 SHA512 f1b83ce37b59070b488e19f98c95ca9f413cf4969663331b631c3ccb884c90b2db793d32a779ef05cead538c2fd123be4b73391ad2fa20c900a1f14237178d8c
30 -DIST xen-4.10.0-upstream-patches-0.tar.xz 70884 BLAKE2B 9a27e7989486ba3ba59548de356384527cc5b78e63b6ed042506e6534e488272369f021cd2daa516820313c3fe18625a5864794ae0806e7018b8ad28b0a294b1 SHA512 e64bf1d30d24e922c60c3b518a4de7874b43cc695134b4cdd65f6d95ae9ae579c521fab13ca82409fde55e43815d072c3194997e2bda106204cbf329e93a0a00
31 -DIST xen-4.10.0.tar.gz 24618123 BLAKE2B 009faa980f9734525c137d525e626bfa3443c285aeb6b4af91bb2c32a2e98376ded0b1114b541d11e2d4353f4f588d58e8add5b1e0d7de2fe3399d4687c5bfae SHA512 5a37935c382f9cfe3641a35c3be0ba11689bca10c7d3c2401963513e3a834ee8d0c8a0ddcf3716dbf0a795aea1bab78caf19acf1272e5e054bf012cfa06a4690
32 -DIST xen-4.10.1-upstream-patches-1.tar.xz 85048 BLAKE2B d00f01980e1c889b2f6899970999b93a7ddbaa03f88219d576bfbe4ccfe0ef3f75afad1538065045833430baa16b64d8dd7eb42af6ad7c3ef948601b941c51bc SHA512 ede74a53faf82712d6ee0cf2a995bb78b7079481e47e829243632fac40069194671e6b9b765e535aa533f618cdcd7715f540e81acd947a42f7b8cbb693a3df82
33 DIST xen-4.10.1-upstream-patches-2.tar.xz 117588 BLAKE2B ddcd58964117652b50f3524d89089e2e9b14a8399fb5bd2db5d12827035ab94cedbfd5d65134d8953e4062a50e0e8a9b320e9c34008db8fd364456f47fd9cd26 SHA512 49ee8497af3753f3d611bf12c65fb7a79abb018862f1af096e9dde3ddfe8780bb95fc3da338c8d5f16a5d6d233d606d4cf8025a3d0e2897bf2668a1d5b27b198
34 DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff65a18e194286a3fc372d4a45f6682cd636b7ac5b4fa0125e54ed51f8876a411d498cf75791718fd088c4a6d2 SHA512 236c02bee69e33644703ed26d323d4c491a91fc05bd0ee0990a7368579f7c82f5bb4510845bf80348fd923024d7d60d521f593dfd0365d971dc592f8ef10fbea
35 DIST xen-4.10.2.tar.gz 24697204 BLAKE2B b331d3ad8d7842446f7d2da5dd31560f636aa1408dd3cc8798dff35b868ef5a609d17e97ef4355e1e5aa825a5abc74103796f9a8015037f0a564ffcebd825722 SHA512 2e301b4d6eb106fcb52203bc1208c8fd1fc7bb5d795166c0f86e4085227050301f7daa6f21db440c47bc2ca2c7f87d9b96753cfdf3fa724e0416b5679b84c163
36 -DIST xen-4.11.0-upstream-patches-0.tar.xz 21720 BLAKE2B 92c2ef90ca6af5032e9181d8edbe2b91a4117cc402f5abdff208aa76ee76b56ce75f576c56220d2ebf6d1a21957c10f7c45a2c88d2c77aa8b17fa9a0a99e5b57 SHA512 6ea0ee376251b20b7fa9b6334bca462f115d8a9929e31ae269ae9591b433b46e4e9076a2d2e39ec5f868d5d74739ad7b0ba0d9244e599da5255ccca0babd669e
37 DIST xen-4.11.0-upstream-patches-1.tar.xz 56664 BLAKE2B 27579f4e628bb0d3fdd59f7e133e9134d4ca175842dfdae3a3f765b133254239ae3bca94d75dd655735b5bcbd67f9b8d444dd227028642e6e459e57ed8a20341 SHA512 e90b8e7fa9433e93b1620a776833a6d3578babebe5d73dcaae11186f473945a2270046932ab314a9c6049d3b460a655456f487a5b59730fe88a4f08d482c47a1
38 DIST xen-4.11.0.tar.gz 25131533 BLAKE2B 892639b8bcd9b9956104e4d5137ffd88e17f92d965fa967b4af8d74a4fddcc21c6971c53026e0fb5ce833ab2c25c68f827abcac0b7b1dcebc21dca645c465573 SHA512 33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a
39 -DIST xen-4.9.2-upstream-patches-2.tar.xz 16100 BLAKE2B 469b5ab7c5514a4974ba6370136d3b0b8da66a137e57ea2d8ba4341582ecc65e9131340cfc854b2e4991de778802726479176bf3a54a59660cef7337c31958e5 SHA512 900ed3a63986ad6add07fa4f2c2596c48f7e9aac18d0876229c3a0b076a6417488e0d7bd1bdbe9886e6900bbece35c378b7f8735778b4bdfa115a9662d43108b
40 -DIST xen-4.9.2.tar.gz 23392753 BLAKE2B 5f96f0e5062eff8ac2971eef85ea2bae0e94e7542151237937a1cf7e74690bb0ce1c952e830d2fc13b3277f70b9ed1de511afe4f780ad7b3be0c58742ece39b2 SHA512 e06aec25439abcc548c174ba8e271c23031ea704bcc2480905140aa68490064fbb1c58d9c4174f6617b4f7bbcddfda284317df6f480a6e5b5b5a2c71fbe0ac93
41 -DIST xen-gentoo-patches-12.tar.xz 28188 BLAKE2B 75f565d52e75d4f68d7a1be88a79e7cefe82350ca1f4852ecdb79137549d73ef1ffb665bac998956a6f180cde6faeb9a11ec1f5442c8ae53c7cbd869318ef315 SHA512 4e1ebbd244670d3a4171fd93eda7eb14deae3e3ad45b3a85c015696ff0a86b69156f24ee428d6c92b7be426938997cec2fab031ecb5b03ad26a38451523882de
42 DIST xen-gentoo-patches-14.tar.xz 36244 BLAKE2B 94b751df0ae9a49d1c52ec5fa835d4a040ccb6a4a0f63ef6ef628191163ce7dbd47d4e3b2dbb1cf6cf6c8b368bea4267ff989754482c4794209a80eae9313c25 SHA512 8a23aeddbcf80c049da36e3ef9d797c16996b45be21b56f46f3c9c3833a7c1028fd9ed56fc8053faeb78db21076608de2eb32908e1ae1285f4f200ace40c8c2d
43 DIST xen-ovmf-patches-3.tar.xz 4208 BLAKE2B 0df8f85667a33c91cbfd86c59aec2ae65eca892b45d66eed76f793a52e2748989bc2785861f8bfdf94235ef7a6c0be6572c6e6cce9695469e40f0facd0ce3947 SHA512 abe001053ca702138bbcdd6bea14e2daae5c785f862d6a15001ca894c8ed8617f0c5dc439c6f54a41433b988acf57c71911af1db074aa76732c39d98622a3b5b
44
45 diff --git a/app-emulation/xen-tools/files/gentoo-patches.conf b/app-emulation/xen-tools/files/gentoo-patches.conf
46 index 8239fa46ab8..d4bdaa12c71 100644
47 --- a/app-emulation/xen-tools/files/gentoo-patches.conf
48 +++ b/app-emulation/xen-tools/files/gentoo-patches.conf
49 @@ -116,62 +116,6 @@ _gx048=" xen-tools-4.11.0-gcc8.patch"
50 # Fix pdf document generation, bug #650396
51 _gx049=" xen-tools-4.10.1-pdfdoc.patch"
52
53 -# xen-tools-4.8.2 patches set
54 -_gpv_xen_tools_482_0="
55 -${_gx008}
56 -${_gx038} ${_gx017} ${_gx039}
57 -${_gx027} ${_gx032}
58 -${_gx028} ${_gx029}
59 -${_gx037} ${_gx040} ${_gx042}
60 -"
61 -
62 -# xen-tools-4.9.0 patches set
63 -_gpv_xen_tools_490_0="
64 -${_gx008}
65 -${_gx038} ${_gx017} ${_gx039}
66 -${_gx027}
67 -${_gx028} ${_gx029}
68 -${_gx037} ${_gx042}
69 -"
70 -
71 -# xen-tools-4.9.1 patches set
72 -_gpv_xen_tools_491_0="
73 -${_gx008}
74 -${_gx038} ${_gx017} ${_gx039}
75 -${_gx027}
76 -${_gx028} ${_gx029}
77 -${_gx037} ${_gx042}
78 -"
79 -
80 -_gpv_xen_tools_491_1="
81 -${_gx008}
82 -${_gx038} ${_gx017} ${_gx039}
83 -${_gx027}
84 -${_gx028} ${_gx029}
85 -${_gx037} ${_gx042}
86 -${_gx044}
87 -"
88 -
89 -# xen-tools-4.9.2 patches set
90 -_gpv_xen_tools_492_0="
91 -${_gx008}
92 -${_gx038} ${_gx017} ${_gx039}
93 -${_gx027}
94 -${_gx028} ${_gx029}
95 -${_gx037} ${_gx042}
96 -${_gx044}
97 -"
98 -
99 -# xen-tools-4.10.0 patches set
100 -_gpv_xen_tools_4100_0="
101 -${_gx008}
102 -${_gx038} ${_gx017} ${_gx043}
103 -${_gx027}
104 -${_gx028} ${_gx029}
105 -${_gx037} ${_gx042}
106 -${_gx044}
107 -"
108 -
109 # xen-tools-4.10.1 patches set
110 _gpv_xen_tools_4101_0="
111 ${_gx038} ${_gx017} ${_gx043}
112
113 diff --git a/app-emulation/xen-tools/xen-tools-4.10.0.ebuild b/app-emulation/xen-tools/xen-tools-4.10.0.ebuild
114 deleted file mode 100644
115 index 2180656b679..00000000000
116 --- a/app-emulation/xen-tools/xen-tools-4.10.0.ebuild
117 +++ /dev/null
118 @@ -1,455 +0,0 @@
119 -# Copyright 1999-2018 Gentoo Foundation
120 -# Distributed under the terms of the GNU General Public License v2
121 -
122 -EAPI=6
123 -
124 -PYTHON_COMPAT=( python2_7 )
125 -PYTHON_REQ_USE='ncurses,xml,threads'
126 -
127 -inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
128 -
129 -MY_PV=${PV/_/-}
130 -MAJOR_V="$(get_version_component_range 1-2)"
131 -
132 -if [[ $PV == *9999 ]]; then
133 - inherit git-r3
134 - REPO="xen.git"
135 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
136 - S="${WORKDIR}/${REPO}"
137 -else
138 - KEYWORDS="~amd64 ~arm ~arm64 ~x86"
139 - UPSTREAM_VER=0
140 - SECURITY_VER=
141 - # xen-tools's gentoo patches tarball
142 - GENTOO_VER=12
143 - # xen-tools's gentoo patches version which apply to this specific ebuild
144 - GENTOO_GPV=0
145 - # xen-tools ovmf's patches
146 - OVMF_VER=3
147 -
148 - SEABIOS_VER=1.10.0
149 - # OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
150 - OVMF_PV=20170321
151 -
152 - [[ -n ${UPSTREAM_VER} ]] && \
153 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
154 - https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
155 - [[ -n ${SECURITY_VER} ]] && \
156 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
157 - [[ -n ${GENTOO_VER} ]] && \
158 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
159 - https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
160 - [[ -n ${OVMF_VER} ]] && \
161 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
162 -
163 - SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
164 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
165 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
166 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
167 - ${OVMF_PATCHSET_URI} )
168 - ${UPSTREAM_PATCHSET_URI}
169 - ${SECURITY_PATCHSET_URI}
170 - ${GENTOO_PATCHSET_URI}"
171 -
172 - S="${WORKDIR}/xen-${MY_PV}"
173 -fi
174 -
175 -DESCRIPTION="Xen tools including QEMU and xl"
176 -HOMEPAGE="https://www.xenproject.org"
177 -DOCS=( README docs/README.xen-bugtool )
178 -
179 -LICENSE="GPL-2"
180 -SLOT="0/${MAJOR_V}"
181 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
182 -# >=dev-lang/ocaml-4 stable
183 -# Masked in profiles/eapi-5-files instead
184 -IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
185 -
186 -REQUIRED_USE="
187 - ${PYTHON_REQUIRED_USE}
188 - pygrub? ( python )
189 - ovmf? ( hvm )
190 - ^^ ( qemu system-qemu )"
191 -
192 -COMMON_DEPEND="
193 - sys-apps/pciutils
194 - dev-libs/lzo:2
195 - dev-libs/glib:2
196 - dev-libs/yajl
197 - dev-libs/libaio
198 - dev-libs/libgcrypt:0
199 - sys-libs/zlib
200 - ${PYTHON_DEPS}
201 -"
202 -
203 -DEPEND="${COMMON_DEPEND}
204 - >=sys-kernel/linux-headers-4.11
205 - dev-python/lxml[${PYTHON_USEDEP}]
206 - x86? ( sys-devel/dev86
207 - sys-power/iasl )
208 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
209 - api? ( dev-libs/libxml2
210 - net-misc/curl )
211 - ovmf? (
212 - !arm? ( !arm64? ( dev-lang/nasm ) )
213 - $(python_gen_impl_dep sqlite)
214 - )
215 - !amd64? ( >=sys-apps/dtc-1.4.0 )
216 - amd64? ( sys-devel/bin86
217 - system-seabios? ( sys-firmware/seabios )
218 - sys-firmware/ipxe
219 - sys-devel/dev86
220 - sys-power/iasl )
221 - dev-lang/perl
222 - app-misc/pax-utils
223 - doc? (
224 - app-text/ghostscript-gpl
225 - app-text/pandoc
226 - dev-python/markdown[${PYTHON_USEDEP}]
227 - dev-texlive/texlive-latexextra
228 - media-gfx/transfig
229 - )
230 - hvm? ( x11-base/xorg-proto
231 - !net-libs/libiscsi )
232 - qemu? (
233 - app-arch/snappy:=
234 - x11-libs/pixman
235 - sdl? ( media-libs/libsdl[X] )
236 - )
237 - system-qemu? ( app-emulation/qemu[xen] )
238 - ocaml? ( dev-ml/findlib
239 - >=dev-lang/ocaml-4 )"
240 -
241 -RDEPEND="${COMMON_DEPEND}
242 - sys-apps/iproute2[-minimal]
243 - net-misc/bridge-utils
244 - screen? (
245 - app-misc/screen
246 - app-admin/logrotate
247 - )"
248 -
249 -# hvmloader is used to bootstrap a fully virtualized kernel
250 -# Approved by QA team in bug #144032
251 -QA_WX_LOAD="
252 - usr/libexec/xen/boot/hvmloader
253 - usr/share/qemu-xen/qemu/s390-ccw.img
254 - usr/share/qemu-xen/qemu/u-boot.e500
255 -"
256 -
257 -QA_PREBUILT="
258 - usr/libexec/xen/bin/ivshmem-client
259 - usr/libexec/xen/bin/ivshmem-server
260 - usr/libexec/xen/bin/qemu-img
261 - usr/libexec/xen/bin/qemu-io
262 - usr/libexec/xen/bin/qemu-nbd
263 - usr/libexec/xen/bin/qemu-system-i386
264 - usr/libexec/xen/bin/virtfs-proxy-helper
265 - usr/libexec/xen/libexec/xen-bridge-helper
266 - usr/share/qemu-xen/qemu/s390-ccw.img
267 - usr/share/qemu-xen/qemu/u-boot.e500
268 -"
269 -
270 -RESTRICT="test"
271 -
272 -pkg_setup() {
273 - python_setup
274 - export "CONFIG_LOMOUNT=y"
275 -
276 - #bug 522642, disable compile tools/tests
277 - export "CONFIG_TESTS=n"
278 -
279 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
280 - if use x86 && use amd64; then
281 - die "Confusion! Both x86 and amd64 are set in your use flags!"
282 - elif use x86; then
283 - export XEN_TARGET_ARCH="x86_32"
284 - elif use amd64 ; then
285 - export XEN_TARGET_ARCH="x86_64"
286 - elif use arm; then
287 - export XEN_TARGET_ARCH="arm32"
288 - elif use arm64; then
289 - export XEN_TARGET_ARCH="arm64"
290 - else
291 - die "Unsupported architecture!"
292 - fi
293 - fi
294 -}
295 -
296 -src_prepare() {
297 - local i
298 -
299 - # Upstream's patchset
300 - if [[ -n ${UPSTREAM_VER} ]]; then
301 - einfo "Try to apply Xen Upstream patch set"
302 - eapply "${WORKDIR}"/patches-upstream
303 - fi
304 -
305 - # Security patchset
306 - if [[ -n ${SECURITY_VER} ]]; then
307 - einfo "Try to apply Xen Security patch set"
308 - # apply main xen patches
309 - # Two parallel systems, both work side by side
310 - # Over time they may concdense into one. This will suffice for now
311 - EPATCH_SUFFIX="patch"
312 - EPATCH_FORCE="yes"
313 -
314 - source "${WORKDIR}"/patches-security/${PV}.conf || die
315 -
316 - for i in ${XEN_SECURITY_MAIN}; do
317 - eapply "${WORKDIR}"/patches-security/xen/$i
318 - done
319 -
320 - # apply qemu-xen/upstream patches
321 - pushd "${S}"/tools/qemu-xen/ > /dev/null
322 - for i in ${XEN_SECURITY_QEMUU}; do
323 - eapply "${WORKDIR}"/patches-security/qemuu/$i
324 - done
325 - popd > /dev/null
326 -
327 - # apply qemu-traditional patches
328 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
329 - for i in ${XEN_SECURITY_QEMUT}; do
330 - eapply "${WORKDIR}"/patches-security/qemut/$i
331 - done
332 - popd > /dev/null
333 - fi
334 -
335 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
336 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
337 - pushd tools/firmware/ > /dev/null
338 - ln -s seabios-dir-remote seabios-dir || die
339 - popd > /dev/null
340 -
341 - # Gentoo's patchset
342 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
343 - einfo "Try to apply Gentoo specific patch set"
344 - source "${FILESDIR}"/gentoo-patches.conf || die
345 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
346 - for i in ${!_gpv}; do
347 - eapply "${WORKDIR}"/patches-gentoo/$i
348 - done
349 - fi
350 -
351 - # Ovmf's patchset
352 - if use ovmf; then
353 - if [[ -n ${OVMF_VER} ]];then
354 - einfo "Try to apply Ovmf patch set"
355 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
356 - eapply "${WORKDIR}"/patches-ovmf
357 - popd > /dev/null
358 - fi
359 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
360 - fi
361 -
362 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
363 -
364 - # Fix texi2html build error with new texi2html, qemu.doc.html
365 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
366 -
367 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
368 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
369 - -i tools/firmware/Makefile || die
370 -
371 - # Drop .config, fixes to gcc-4.6
372 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
373 -
374 - # if the user *really* wants to use their own custom-cflags, let them
375 - if use custom-cflags; then
376 - einfo "User wants their own CFLAGS - removing defaults"
377 -
378 - # try and remove all the default cflags
379 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
380 - -exec sed \
381 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
382 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
383 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
384 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
385 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
386 - -i {} + || die "failed to re-set custom-cflags"
387 - else
388 - unset CFLAGS
389 - unset LDFLAGS
390 - unset ASFLAGS
391 - unset CPPFLAGS
392 - fi
393 -
394 - if ! use pygrub; then
395 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
396 - fi
397 -
398 - if ! use python; then
399 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
400 - fi
401 -
402 - if ! use hvm; then
403 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
404 - # Bug 351648
405 - elif ! use x86 && ! has x86 $(get_all_abis); then
406 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
407 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
408 - export CPATH="${WORKDIR}"/extra-headers
409 - fi
410 -
411 - if use qemu; then
412 - if use sdl; then
413 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
414 - tools/Makefile || die
415 - else
416 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
417 - tools/qemu-xen-traditional/xen-setup || die
418 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
419 - tools/Makefile || die
420 - fi
421 - else
422 - # Don't bother with qemu, only needed for fully virtualised guests
423 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
424 - fi
425 -
426 - # Reset bash completion dir; Bug 472438
427 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
428 - -i Config.mk || die
429 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
430 -
431 - # xencommons, Bug #492332, sed lighter weight than patching
432 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
433 - -i tools/hotplug/Linux/init.d/xencommons.in || die
434 -
435 - # fix bashishm
436 - sed -e '/Usage/s/\$//g' \
437 - -i tools/hotplug/Linux/init.d/xendriverdomain.in || die
438 -
439 - # respect multilib, usr/lib/libcacard.so.0.0.0
440 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
441 - -i tools/qemu-xen/configure || die
442 -
443 - #bug 518136, don't build 32bit exactuable for nomultilib profile
444 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
445 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
446 - fi
447 -
448 - # uncomment lines in xl.conf
449 - sed -e 's:^#autoballoon=:autoballoon=:' \
450 - -e 's:^#lockfile=:lockfile=:' \
451 - -e 's:^#vif.default.script=:vif.default.script=:' \
452 - -i tools/examples/xl.conf || die
453 -
454 - default
455 -}
456 -
457 -src_configure() {
458 - local myconf="--prefix=${PREFIX}/usr \
459 - --libdir=${PREFIX}/usr/$(get_libdir) \
460 - --libexecdir=${PREFIX}/usr/libexec \
461 - --localstatedir=${EPREFIX}/var \
462 - --disable-werror \
463 - --disable-xen \
464 - --enable-tools \
465 - --enable-docs \
466 - $(use_enable pam) \
467 - $(use_enable api xenapi) \
468 - $(use_enable ovmf) \
469 - $(use_enable ocaml ocamltools) \
470 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
471 - "
472 -
473 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
474 - use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
475 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
476 - econf ${myconf}
477 -}
478 -
479 -src_compile() {
480 - local myopt
481 - use debug && myopt="${myopt} debug=y"
482 -
483 - if test-flag-CC -fno-strict-overflow; then
484 - append-flags -fno-strict-overflow
485 - fi
486 -
487 - emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
488 -
489 - if use doc; then
490 - emake -C docs build
491 - else
492 - emake -C docs man-pages
493 - fi
494 -}
495 -
496 -src_install() {
497 - # Override auto-detection in the build system, bug #382573
498 - export INITD_DIR=/tmp/init.d
499 - export CONFIG_LEAF_DIR=../tmp/default
500 -
501 - # Let the build system compile installed Python modules.
502 - local PYTHONDONTWRITEBYTECODE
503 - export PYTHONDONTWRITEBYTECODE
504 -
505 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
506 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
507 -
508 - # Created at runtime
509 - rm -rv "${ED%/}/var/run" || die
510 -
511 - # Fix the remaining Python shebangs.
512 - python_fix_shebang "${D}"
513 -
514 - # Remove RedHat-specific stuff
515 - rm -rf "${D}"tmp || die
516 -
517 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
518 - use doc && dodoc -r docs/{pdf,txt}
519 - dodoc ${DOCS[@]}
520 -
521 - newconfd "${FILESDIR}"/xendomains.confd xendomains
522 - newconfd "${FILESDIR}"/xenstored.confd xenstored
523 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
524 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
525 - newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
526 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
527 - newinitd "${FILESDIR}"/xencommons.initd xencommons
528 - newconfd "${FILESDIR}"/xencommons.confd xencommons
529 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
530 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
531 - newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
532 -
533 - if use screen; then
534 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
535 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
536 - keepdir /var/log/xen-consoles
537 - fi
538 -
539 - # For -static-libs wrt Bug 384355
540 - if ! use static-libs; then
541 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
542 - fi
543 -
544 - # for xendomains
545 - keepdir /etc/xen/auto
546 -
547 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
548 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
549 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
550 -}
551 -
552 -pkg_postinst() {
553 - elog "Official Xen Guide and the offical wiki page:"
554 - elog "https://wiki.gentoo.org/wiki/Xen"
555 - elog "https://wiki.xen.org/wiki/Main_Page"
556 - elog ""
557 - elog "Recommended to utilise the xencommons script to config sytem At boot"
558 - elog "Add by use of rc-update on completion of the install"
559 -
560 - if ! use hvm; then
561 - echo
562 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
563 - elog "support enable the hvm use flag."
564 - elog "An x86 or amd64 system is required to build HVM support."
565 - fi
566 -
567 - if use qemu; then
568 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
569 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
570 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
571 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
572 - fi
573 -}
574
575 diff --git a/app-emulation/xen-tools/xen-tools-4.10.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.10.1-r1.ebuild
576 deleted file mode 100644
577 index 3c9506c4f34..00000000000
578 --- a/app-emulation/xen-tools/xen-tools-4.10.1-r1.ebuild
579 +++ /dev/null
580 @@ -1,456 +0,0 @@
581 -# Copyright 1999-2018 Gentoo Foundation
582 -# Distributed under the terms of the GNU General Public License v2
583 -
584 -EAPI=6
585 -
586 -PYTHON_COMPAT=( python2_7 )
587 -PYTHON_REQ_USE='ncurses,xml,threads'
588 -
589 -inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
590 -
591 -MY_PV=${PV/_/-}
592 -MAJOR_V="$(get_version_component_range 1-2)"
593 -
594 -if [[ $PV == *9999 ]]; then
595 - inherit git-r3
596 - REPO="xen.git"
597 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
598 - S="${WORKDIR}/${REPO}"
599 -else
600 - KEYWORDS="~amd64 ~arm ~arm64 ~x86"
601 - UPSTREAM_VER=1
602 - SECURITY_VER=
603 - # xen-tools's gentoo patches tarball
604 - GENTOO_VER=14
605 - # xen-tools's gentoo patches version which apply to this specific ebuild
606 - GENTOO_GPV=0
607 - # xen-tools ovmf's patches
608 - OVMF_VER=3
609 -
610 - SEABIOS_VER=1.10.0
611 - # OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
612 - OVMF_PV=20170321
613 -
614 - [[ -n ${UPSTREAM_VER} ]] && \
615 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
616 - https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
617 - [[ -n ${SECURITY_VER} ]] && \
618 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
619 - [[ -n ${GENTOO_VER} ]] && \
620 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
621 - https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
622 - [[ -n ${OVMF_VER} ]] && \
623 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
624 -
625 - SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
626 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
627 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
628 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
629 - ${OVMF_PATCHSET_URI} )
630 - ${UPSTREAM_PATCHSET_URI}
631 - ${SECURITY_PATCHSET_URI}
632 - ${GENTOO_PATCHSET_URI}"
633 -
634 - S="${WORKDIR}/xen-${MY_PV}"
635 -fi
636 -
637 -DESCRIPTION="Xen tools including QEMU and xl"
638 -HOMEPAGE="https://www.xenproject.org"
639 -DOCS=( README docs/README.xen-bugtool )
640 -
641 -LICENSE="GPL-2"
642 -SLOT="0/${MAJOR_V}"
643 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
644 -# >=dev-lang/ocaml-4 stable
645 -# Masked in profiles/eapi-5-files instead
646 -IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
647 -
648 -REQUIRED_USE="
649 - ${PYTHON_REQUIRED_USE}
650 - pygrub? ( python )
651 - ovmf? ( hvm )
652 - ^^ ( qemu system-qemu )"
653 -
654 -COMMON_DEPEND="
655 - sys-apps/pciutils
656 - dev-libs/lzo:2
657 - dev-libs/glib:2
658 - dev-libs/yajl
659 - dev-libs/libaio
660 - dev-libs/libgcrypt:0
661 - sys-libs/zlib
662 - ${PYTHON_DEPS}
663 -"
664 -
665 -DEPEND="${COMMON_DEPEND}
666 - >=sys-kernel/linux-headers-4.11
667 - dev-python/lxml[${PYTHON_USEDEP}]
668 - x86? ( sys-devel/dev86
669 - sys-power/iasl )
670 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
671 - api? ( dev-libs/libxml2
672 - net-misc/curl )
673 - ovmf? (
674 - !arm? ( !arm64? ( dev-lang/nasm ) )
675 - $(python_gen_impl_dep sqlite)
676 - )
677 - !amd64? ( >=sys-apps/dtc-1.4.0 )
678 - amd64? ( sys-devel/bin86
679 - system-seabios? ( sys-firmware/seabios )
680 - sys-firmware/ipxe
681 - sys-devel/dev86
682 - sys-power/iasl )
683 - dev-lang/perl
684 - app-misc/pax-utils
685 - doc? (
686 - app-text/ghostscript-gpl
687 - app-text/pandoc
688 - dev-python/markdown[${PYTHON_USEDEP}]
689 - dev-texlive/texlive-latexextra
690 - media-gfx/transfig
691 - )
692 - hvm? ( x11-base/xorg-proto
693 - !net-libs/libiscsi )
694 - qemu? (
695 - app-arch/snappy:=
696 - x11-libs/pixman
697 - sdl? ( media-libs/libsdl[X] )
698 - )
699 - system-qemu? ( app-emulation/qemu[xen] )
700 - ocaml? ( dev-ml/findlib
701 - >=dev-lang/ocaml-4 )"
702 -
703 -RDEPEND="${COMMON_DEPEND}
704 - sys-apps/iproute2[-minimal]
705 - net-misc/bridge-utils
706 - screen? (
707 - app-misc/screen
708 - app-admin/logrotate
709 - )"
710 -
711 -# hvmloader is used to bootstrap a fully virtualized kernel
712 -# Approved by QA team in bug #144032
713 -QA_WX_LOAD="
714 - usr/libexec/xen/boot/hvmloader
715 - usr/share/qemu-xen/qemu/s390-ccw.img
716 - usr/share/qemu-xen/qemu/u-boot.e500
717 -"
718 -
719 -QA_PREBUILT="
720 - usr/libexec/xen/bin/ivshmem-client
721 - usr/libexec/xen/bin/ivshmem-server
722 - usr/libexec/xen/bin/qemu-img
723 - usr/libexec/xen/bin/qemu-io
724 - usr/libexec/xen/bin/qemu-nbd
725 - usr/libexec/xen/bin/qemu-system-i386
726 - usr/libexec/xen/bin/virtfs-proxy-helper
727 - usr/libexec/xen/libexec/xen-bridge-helper
728 - usr/share/qemu-xen/qemu/s390-ccw.img
729 - usr/share/qemu-xen/qemu/s390-netboot.img
730 - usr/share/qemu-xen/qemu/u-boot.e500
731 -"
732 -
733 -RESTRICT="test"
734 -
735 -pkg_setup() {
736 - python_setup
737 - export "CONFIG_LOMOUNT=y"
738 -
739 - #bug 522642, disable compile tools/tests
740 - export "CONFIG_TESTS=n"
741 -
742 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
743 - if use x86 && use amd64; then
744 - die "Confusion! Both x86 and amd64 are set in your use flags!"
745 - elif use x86; then
746 - export XEN_TARGET_ARCH="x86_32"
747 - elif use amd64 ; then
748 - export XEN_TARGET_ARCH="x86_64"
749 - elif use arm; then
750 - export XEN_TARGET_ARCH="arm32"
751 - elif use arm64; then
752 - export XEN_TARGET_ARCH="arm64"
753 - else
754 - die "Unsupported architecture!"
755 - fi
756 - fi
757 -}
758 -
759 -src_prepare() {
760 - local i
761 -
762 - # Upstream's patchset
763 - if [[ -n ${UPSTREAM_VER} ]]; then
764 - einfo "Try to apply Xen Upstream patch set"
765 - eapply "${WORKDIR}"/patches-upstream
766 - fi
767 -
768 - # Security patchset
769 - if [[ -n ${SECURITY_VER} ]]; then
770 - einfo "Try to apply Xen Security patch set"
771 - # apply main xen patches
772 - # Two parallel systems, both work side by side
773 - # Over time they may concdense into one. This will suffice for now
774 - EPATCH_SUFFIX="patch"
775 - EPATCH_FORCE="yes"
776 -
777 - source "${WORKDIR}"/patches-security/${PV}.conf || die
778 -
779 - for i in ${XEN_SECURITY_MAIN}; do
780 - eapply "${WORKDIR}"/patches-security/xen/$i
781 - done
782 -
783 - # apply qemu-xen/upstream patches
784 - pushd "${S}"/tools/qemu-xen/ > /dev/null
785 - for i in ${XEN_SECURITY_QEMUU}; do
786 - eapply "${WORKDIR}"/patches-security/qemuu/$i
787 - done
788 - popd > /dev/null
789 -
790 - # apply qemu-traditional patches
791 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
792 - for i in ${XEN_SECURITY_QEMUT}; do
793 - eapply "${WORKDIR}"/patches-security/qemut/$i
794 - done
795 - popd > /dev/null
796 - fi
797 -
798 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
799 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
800 - pushd tools/firmware/ > /dev/null
801 - ln -s seabios-dir-remote seabios-dir || die
802 - popd > /dev/null
803 -
804 - # Gentoo's patchset
805 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
806 - einfo "Try to apply Gentoo specific patch set"
807 - source "${FILESDIR}"/gentoo-patches.conf || die
808 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
809 - for i in ${!_gpv}; do
810 - eapply "${WORKDIR}"/patches-gentoo/$i
811 - done
812 - fi
813 -
814 - # Ovmf's patchset
815 - if use ovmf; then
816 - if [[ -n ${OVMF_VER} ]];then
817 - einfo "Try to apply Ovmf patch set"
818 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
819 - eapply "${WORKDIR}"/patches-ovmf
820 - popd > /dev/null
821 - fi
822 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
823 - fi
824 -
825 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
826 -
827 - # Fix texi2html build error with new texi2html, qemu.doc.html
828 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
829 -
830 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
831 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
832 - -i tools/firmware/Makefile || die
833 -
834 - # Drop .config, fixes to gcc-4.6
835 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
836 -
837 - # if the user *really* wants to use their own custom-cflags, let them
838 - if use custom-cflags; then
839 - einfo "User wants their own CFLAGS - removing defaults"
840 -
841 - # try and remove all the default cflags
842 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
843 - -exec sed \
844 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
845 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
846 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
847 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
848 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
849 - -i {} + || die "failed to re-set custom-cflags"
850 - else
851 - unset CFLAGS
852 - unset LDFLAGS
853 - unset ASFLAGS
854 - unset CPPFLAGS
855 - fi
856 -
857 - if ! use pygrub; then
858 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
859 - fi
860 -
861 - if ! use python; then
862 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
863 - fi
864 -
865 - if ! use hvm; then
866 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
867 - # Bug 351648
868 - elif ! use x86 && ! has x86 $(get_all_abis); then
869 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
870 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
871 - export CPATH="${WORKDIR}"/extra-headers
872 - fi
873 -
874 - if use qemu; then
875 - if use sdl; then
876 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
877 - tools/Makefile || die
878 - else
879 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
880 - tools/qemu-xen-traditional/xen-setup || die
881 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
882 - tools/Makefile || die
883 - fi
884 - else
885 - # Don't bother with qemu, only needed for fully virtualised guests
886 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
887 - fi
888 -
889 - # Reset bash completion dir; Bug 472438
890 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
891 - -i Config.mk || die
892 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
893 -
894 - # xencommons, Bug #492332, sed lighter weight than patching
895 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
896 - -i tools/hotplug/Linux/init.d/xencommons.in || die
897 -
898 - # fix bashishm
899 - sed -e '/Usage/s/\$//g' \
900 - -i tools/hotplug/Linux/init.d/xendriverdomain.in || die
901 -
902 - # respect multilib, usr/lib/libcacard.so.0.0.0
903 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
904 - -i tools/qemu-xen/configure || die
905 -
906 - #bug 518136, don't build 32bit exactuable for nomultilib profile
907 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
908 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
909 - fi
910 -
911 - # uncomment lines in xl.conf
912 - sed -e 's:^#autoballoon=:autoballoon=:' \
913 - -e 's:^#lockfile=:lockfile=:' \
914 - -e 's:^#vif.default.script=:vif.default.script=:' \
915 - -i tools/examples/xl.conf || die
916 -
917 - default
918 -}
919 -
920 -src_configure() {
921 - local myconf="--prefix=${PREFIX}/usr \
922 - --libdir=${PREFIX}/usr/$(get_libdir) \
923 - --libexecdir=${PREFIX}/usr/libexec \
924 - --localstatedir=${EPREFIX}/var \
925 - --disable-werror \
926 - --disable-xen \
927 - --enable-tools \
928 - --enable-docs \
929 - $(use_enable pam) \
930 - $(use_enable api xenapi) \
931 - $(use_enable ovmf) \
932 - $(use_enable ocaml ocamltools) \
933 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
934 - "
935 -
936 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
937 - use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
938 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
939 - econf ${myconf}
940 -}
941 -
942 -src_compile() {
943 - local myopt
944 - use debug && myopt="${myopt} debug=y"
945 -
946 - if test-flag-CC -fno-strict-overflow; then
947 - append-flags -fno-strict-overflow
948 - fi
949 -
950 - emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
951 -
952 - if use doc; then
953 - emake -C docs build
954 - else
955 - emake -C docs man-pages
956 - fi
957 -}
958 -
959 -src_install() {
960 - # Override auto-detection in the build system, bug #382573
961 - export INITD_DIR=/tmp/init.d
962 - export CONFIG_LEAF_DIR=../tmp/default
963 -
964 - # Let the build system compile installed Python modules.
965 - local PYTHONDONTWRITEBYTECODE
966 - export PYTHONDONTWRITEBYTECODE
967 -
968 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
969 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
970 -
971 - # Created at runtime
972 - rm -rv "${ED%/}/var/run" || die
973 -
974 - # Fix the remaining Python shebangs.
975 - python_fix_shebang "${D}"
976 -
977 - # Remove RedHat-specific stuff
978 - rm -rf "${D}"tmp || die
979 -
980 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
981 - use doc && dodoc -r docs/{pdf,txt}
982 - dodoc ${DOCS[@]}
983 -
984 - newconfd "${FILESDIR}"/xendomains.confd xendomains
985 - newconfd "${FILESDIR}"/xenstored.confd xenstored
986 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
987 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
988 - newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
989 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
990 - newinitd "${FILESDIR}"/xencommons.initd xencommons
991 - newconfd "${FILESDIR}"/xencommons.confd xencommons
992 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
993 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
994 - newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
995 -
996 - if use screen; then
997 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
998 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
999 - keepdir /var/log/xen-consoles
1000 - fi
1001 -
1002 - # For -static-libs wrt Bug 384355
1003 - if ! use static-libs; then
1004 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
1005 - fi
1006 -
1007 - # for xendomains
1008 - keepdir /etc/xen/auto
1009 -
1010 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
1011 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
1012 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
1013 -}
1014 -
1015 -pkg_postinst() {
1016 - elog "Official Xen Guide and the offical wiki page:"
1017 - elog "https://wiki.gentoo.org/wiki/Xen"
1018 - elog "https://wiki.xen.org/wiki/Main_Page"
1019 - elog ""
1020 - elog "Recommended to utilise the xencommons script to config sytem At boot"
1021 - elog "Add by use of rc-update on completion of the install"
1022 -
1023 - if ! use hvm; then
1024 - echo
1025 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
1026 - elog "support enable the hvm use flag."
1027 - elog "An x86 or amd64 system is required to build HVM support."
1028 - fi
1029 -
1030 - if use qemu; then
1031 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
1032 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
1033 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
1034 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
1035 - fi
1036 -}
1037
1038 diff --git a/app-emulation/xen-tools/xen-tools-4.11.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.11.0-r1.ebuild
1039 deleted file mode 100644
1040 index 6f927ec809a..00000000000
1041 --- a/app-emulation/xen-tools/xen-tools-4.11.0-r1.ebuild
1042 +++ /dev/null
1043 @@ -1,457 +0,0 @@
1044 -# Copyright 1999-2018 Gentoo Foundation
1045 -# Distributed under the terms of the GNU General Public License v2
1046 -
1047 -EAPI=6
1048 -
1049 -PYTHON_COMPAT=( python2_7 )
1050 -PYTHON_REQ_USE='ncurses,xml,threads'
1051 -
1052 -inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
1053 -
1054 -MY_PV=${PV/_/-}
1055 -MAJOR_V="$(get_version_component_range 1-2)"
1056 -
1057 -if [[ $PV == *9999 ]]; then
1058 - inherit git-r3
1059 - REPO="xen.git"
1060 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
1061 - S="${WORKDIR}/${REPO}"
1062 -else
1063 - KEYWORDS="~amd64 ~arm ~arm64 ~x86"
1064 - UPSTREAM_VER=0
1065 - SECURITY_VER=
1066 - # xen-tools's gentoo patches tarball
1067 - GENTOO_VER=14
1068 - # xen-tools's gentoo patches version which apply to this specific ebuild
1069 - GENTOO_GPV=0
1070 - # xen-tools ovmf's patches
1071 - OVMF_VER=3
1072 -
1073 - SEABIOS_VER=1.10.0
1074 - # OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
1075 - OVMF_PV=20170321
1076 -
1077 - [[ -n ${UPSTREAM_VER} ]] && \
1078 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
1079 - https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
1080 - [[ -n ${SECURITY_VER} ]] && \
1081 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
1082 - [[ -n ${GENTOO_VER} ]] && \
1083 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
1084 - https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
1085 - [[ -n ${OVMF_VER} ]] && \
1086 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
1087 -
1088 - SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
1089 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
1090 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
1091 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
1092 - ${OVMF_PATCHSET_URI} )
1093 - ${UPSTREAM_PATCHSET_URI}
1094 - ${SECURITY_PATCHSET_URI}
1095 - ${GENTOO_PATCHSET_URI}"
1096 -
1097 - S="${WORKDIR}/xen-${MY_PV}"
1098 -fi
1099 -
1100 -DESCRIPTION="Xen tools including QEMU and xl"
1101 -HOMEPAGE="https://www.xenproject.org"
1102 -DOCS=( README docs/README.xen-bugtool )
1103 -
1104 -LICENSE="GPL-2"
1105 -SLOT="0/${MAJOR_V}"
1106 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
1107 -# >=dev-lang/ocaml-4 stable
1108 -# Masked in profiles/eapi-5-files instead
1109 -IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
1110 -
1111 -REQUIRED_USE="
1112 - ${PYTHON_REQUIRED_USE}
1113 - pygrub? ( python )
1114 - ovmf? ( hvm )
1115 - ^^ ( qemu system-qemu )"
1116 -
1117 -COMMON_DEPEND="
1118 - sys-apps/pciutils
1119 - dev-libs/lzo:2
1120 - dev-libs/glib:2
1121 - dev-libs/yajl
1122 - dev-libs/libaio
1123 - dev-libs/libgcrypt:0
1124 - sys-libs/zlib
1125 - ${PYTHON_DEPS}
1126 -"
1127 -
1128 -DEPEND="${COMMON_DEPEND}
1129 - >=sys-kernel/linux-headers-4.11
1130 - dev-python/lxml[${PYTHON_USEDEP}]
1131 - x86? ( sys-devel/dev86
1132 - sys-power/iasl )
1133 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
1134 - api? ( dev-libs/libxml2
1135 - net-misc/curl )
1136 - ovmf? (
1137 - !arm? ( !arm64? ( dev-lang/nasm ) )
1138 - $(python_gen_impl_dep sqlite)
1139 - )
1140 - !amd64? ( >=sys-apps/dtc-1.4.0 )
1141 - amd64? ( sys-devel/bin86
1142 - system-seabios? ( sys-firmware/seabios )
1143 - sys-firmware/ipxe
1144 - sys-devel/dev86
1145 - sys-power/iasl )
1146 - dev-lang/perl
1147 - app-misc/pax-utils
1148 - doc? (
1149 - app-text/ghostscript-gpl
1150 - app-text/pandoc
1151 - dev-python/markdown[${PYTHON_USEDEP}]
1152 - dev-texlive/texlive-latexextra
1153 - media-gfx/transfig
1154 - )
1155 - hvm? ( x11-base/xorg-proto )
1156 - qemu? (
1157 - app-arch/snappy:=
1158 - x11-libs/pixman
1159 - sdl? ( media-libs/libsdl[X] )
1160 - )
1161 - system-qemu? ( app-emulation/qemu[xen] )
1162 - ocaml? ( dev-ml/findlib
1163 - >=dev-lang/ocaml-4 )"
1164 -
1165 -RDEPEND="${COMMON_DEPEND}
1166 - sys-apps/iproute2[-minimal]
1167 - net-misc/bridge-utils
1168 - screen? (
1169 - app-misc/screen
1170 - app-admin/logrotate
1171 - )"
1172 -
1173 -# hvmloader is used to bootstrap a fully virtualized kernel
1174 -# Approved by QA team in bug #144032
1175 -QA_WX_LOAD="
1176 - usr/libexec/xen/boot/hvmloader
1177 - usr/share/qemu-xen/qemu/s390-ccw.img
1178 - usr/share/qemu-xen/qemu/u-boot.e500
1179 -"
1180 -
1181 -QA_PREBUILT="
1182 - usr/libexec/xen/bin/ivshmem-client
1183 - usr/libexec/xen/bin/ivshmem-server
1184 - usr/libexec/xen/bin/qemu-img
1185 - usr/libexec/xen/bin/qemu-io
1186 - usr/libexec/xen/bin/qemu-keymap
1187 - usr/libexec/xen/bin/qemu-nbd
1188 - usr/libexec/xen/bin/qemu-pr-helper
1189 - usr/libexec/xen/bin/qemu-system-i386
1190 - usr/libexec/xen/bin/virtfs-proxy-helper
1191 - usr/libexec/xen/libexec/xen-bridge-helper
1192 - usr/share/qemu-xen/qemu/s390-ccw.img
1193 - usr/share/qemu-xen/qemu/s390-netboot.img
1194 - usr/share/qemu-xen/qemu/u-boot.e500
1195 -"
1196 -
1197 -RESTRICT="test"
1198 -
1199 -pkg_setup() {
1200 - python_setup
1201 - export "CONFIG_LOMOUNT=y"
1202 -
1203 - #bug 522642, disable compile tools/tests
1204 - export "CONFIG_TESTS=n"
1205 -
1206 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
1207 - if use x86 && use amd64; then
1208 - die "Confusion! Both x86 and amd64 are set in your use flags!"
1209 - elif use x86; then
1210 - export XEN_TARGET_ARCH="x86_32"
1211 - elif use amd64 ; then
1212 - export XEN_TARGET_ARCH="x86_64"
1213 - elif use arm; then
1214 - export XEN_TARGET_ARCH="arm32"
1215 - elif use arm64; then
1216 - export XEN_TARGET_ARCH="arm64"
1217 - else
1218 - die "Unsupported architecture!"
1219 - fi
1220 - fi
1221 -}
1222 -
1223 -src_prepare() {
1224 - local i
1225 -
1226 - # Upstream's patchset
1227 - if [[ -n ${UPSTREAM_VER} ]]; then
1228 - einfo "Try to apply Xen Upstream patch set"
1229 - eapply "${WORKDIR}"/patches-upstream
1230 - fi
1231 -
1232 - # Security patchset
1233 - if [[ -n ${SECURITY_VER} ]]; then
1234 - einfo "Try to apply Xen Security patch set"
1235 - # apply main xen patches
1236 - # Two parallel systems, both work side by side
1237 - # Over time they may concdense into one. This will suffice for now
1238 - EPATCH_SUFFIX="patch"
1239 - EPATCH_FORCE="yes"
1240 -
1241 - source "${WORKDIR}"/patches-security/${PV}.conf || die
1242 -
1243 - for i in ${XEN_SECURITY_MAIN}; do
1244 - eapply "${WORKDIR}"/patches-security/xen/$i
1245 - done
1246 -
1247 - # apply qemu-xen/upstream patches
1248 - pushd "${S}"/tools/qemu-xen/ > /dev/null
1249 - for i in ${XEN_SECURITY_QEMUU}; do
1250 - eapply "${WORKDIR}"/patches-security/qemuu/$i
1251 - done
1252 - popd > /dev/null
1253 -
1254 - # apply qemu-traditional patches
1255 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
1256 - for i in ${XEN_SECURITY_QEMUT}; do
1257 - eapply "${WORKDIR}"/patches-security/qemut/$i
1258 - done
1259 - popd > /dev/null
1260 - fi
1261 -
1262 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
1263 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
1264 - pushd tools/firmware/ > /dev/null
1265 - ln -s seabios-dir-remote seabios-dir || die
1266 - popd > /dev/null
1267 -
1268 - # Gentoo's patchset
1269 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
1270 - einfo "Try to apply Gentoo specific patch set"
1271 - source "${FILESDIR}"/gentoo-patches.conf || die
1272 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
1273 - for i in ${!_gpv}; do
1274 - eapply "${WORKDIR}"/patches-gentoo/$i
1275 - done
1276 - fi
1277 -
1278 - # Ovmf's patchset
1279 - if use ovmf; then
1280 - if [[ -n ${OVMF_VER} ]];then
1281 - einfo "Try to apply Ovmf patch set"
1282 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
1283 - eapply "${WORKDIR}"/patches-ovmf
1284 - popd > /dev/null
1285 - fi
1286 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
1287 - fi
1288 -
1289 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
1290 -
1291 - # Fix texi2html build error with new texi2html, qemu.doc.html
1292 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
1293 -
1294 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
1295 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
1296 - -i tools/firmware/Makefile || die
1297 -
1298 - # Drop .config, fixes to gcc-4.6
1299 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
1300 -
1301 - # if the user *really* wants to use their own custom-cflags, let them
1302 - if use custom-cflags; then
1303 - einfo "User wants their own CFLAGS - removing defaults"
1304 -
1305 - # try and remove all the default cflags
1306 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
1307 - -exec sed \
1308 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
1309 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
1310 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
1311 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
1312 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
1313 - -i {} + || die "failed to re-set custom-cflags"
1314 - else
1315 - unset CFLAGS
1316 - unset LDFLAGS
1317 - unset ASFLAGS
1318 - unset CPPFLAGS
1319 - fi
1320 -
1321 - if ! use pygrub; then
1322 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
1323 - fi
1324 -
1325 - if ! use python; then
1326 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
1327 - fi
1328 -
1329 - if ! use hvm; then
1330 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
1331 - # Bug 351648
1332 - elif ! use x86 && ! has x86 $(get_all_abis); then
1333 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
1334 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
1335 - export CPATH="${WORKDIR}"/extra-headers
1336 - fi
1337 -
1338 - if use qemu; then
1339 - if use sdl; then
1340 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
1341 - tools/Makefile || die
1342 - else
1343 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
1344 - tools/qemu-xen-traditional/xen-setup || die
1345 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
1346 - tools/Makefile || die
1347 - fi
1348 - else
1349 - # Don't bother with qemu, only needed for fully virtualised guests
1350 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
1351 - fi
1352 -
1353 - # Reset bash completion dir; Bug 472438
1354 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
1355 - -i Config.mk || die
1356 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
1357 -
1358 - # xencommons, Bug #492332, sed lighter weight than patching
1359 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
1360 - -i tools/hotplug/Linux/init.d/xencommons.in || die
1361 -
1362 - # fix bashishm
1363 - sed -e '/Usage/s/\$//g' \
1364 - -i tools/hotplug/Linux/init.d/xendriverdomain.in || die
1365 -
1366 - # respect multilib, usr/lib/libcacard.so.0.0.0
1367 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
1368 - -i tools/qemu-xen/configure || die
1369 -
1370 - #bug 518136, don't build 32bit exactuable for nomultilib profile
1371 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
1372 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
1373 - fi
1374 -
1375 - # uncomment lines in xl.conf
1376 - sed -e 's:^#autoballoon=:autoballoon=:' \
1377 - -e 's:^#lockfile=:lockfile=:' \
1378 - -e 's:^#vif.default.script=:vif.default.script=:' \
1379 - -i tools/examples/xl.conf || die
1380 -
1381 - default
1382 -}
1383 -
1384 -src_configure() {
1385 - local myconf="--prefix=${PREFIX}/usr \
1386 - --libdir=${PREFIX}/usr/$(get_libdir) \
1387 - --libexecdir=${PREFIX}/usr/libexec \
1388 - --localstatedir=${EPREFIX}/var \
1389 - --disable-werror \
1390 - --disable-xen \
1391 - --enable-tools \
1392 - --enable-docs \
1393 - $(use_enable pam) \
1394 - $(use_enable api xenapi) \
1395 - $(use_enable ovmf) \
1396 - $(use_enable ocaml ocamltools) \
1397 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
1398 - "
1399 -
1400 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
1401 - use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
1402 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
1403 - econf ${myconf}
1404 -}
1405 -
1406 -src_compile() {
1407 - local myopt
1408 - use debug && myopt="${myopt} debug=y"
1409 -
1410 - if test-flag-CC -fno-strict-overflow; then
1411 - append-flags -fno-strict-overflow
1412 - fi
1413 -
1414 - emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
1415 -
1416 - if use doc; then
1417 - emake -C docs build
1418 - else
1419 - emake -C docs man-pages
1420 - fi
1421 -}
1422 -
1423 -src_install() {
1424 - # Override auto-detection in the build system, bug #382573
1425 - export INITD_DIR=/tmp/init.d
1426 - export CONFIG_LEAF_DIR=../tmp/default
1427 -
1428 - # Let the build system compile installed Python modules.
1429 - local PYTHONDONTWRITEBYTECODE
1430 - export PYTHONDONTWRITEBYTECODE
1431 -
1432 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
1433 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
1434 -
1435 - # Created at runtime
1436 - rm -rv "${ED%/}/var/run" || die
1437 -
1438 - # Fix the remaining Python shebangs.
1439 - python_fix_shebang "${D}"
1440 -
1441 - # Remove RedHat-specific stuff
1442 - rm -rf "${D}"tmp || die
1443 -
1444 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
1445 - use doc && dodoc -r docs/{pdf,txt}
1446 - dodoc ${DOCS[@]}
1447 -
1448 - newconfd "${FILESDIR}"/xendomains.confd xendomains
1449 - newconfd "${FILESDIR}"/xenstored.confd xenstored
1450 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
1451 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
1452 - newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
1453 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
1454 - newinitd "${FILESDIR}"/xencommons.initd xencommons
1455 - newconfd "${FILESDIR}"/xencommons.confd xencommons
1456 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
1457 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
1458 - newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
1459 -
1460 - if use screen; then
1461 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
1462 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
1463 - keepdir /var/log/xen-consoles
1464 - fi
1465 -
1466 - # For -static-libs wrt Bug 384355
1467 - if ! use static-libs; then
1468 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
1469 - fi
1470 -
1471 - # for xendomains
1472 - keepdir /etc/xen/auto
1473 -
1474 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
1475 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
1476 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
1477 -}
1478 -
1479 -pkg_postinst() {
1480 - elog "Official Xen Guide and the offical wiki page:"
1481 - elog "https://wiki.gentoo.org/wiki/Xen"
1482 - elog "https://wiki.xen.org/wiki/Main_Page"
1483 - elog ""
1484 - elog "Recommended to utilise the xencommons script to config sytem At boot"
1485 - elog "Add by use of rc-update on completion of the install"
1486 -
1487 - if ! use hvm; then
1488 - echo
1489 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
1490 - elog "support enable the hvm use flag."
1491 - elog "An x86 or amd64 system is required to build HVM support."
1492 - fi
1493 -
1494 - if use qemu; then
1495 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
1496 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
1497 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
1498 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
1499 - fi
1500 -}
1501
1502 diff --git a/app-emulation/xen-tools/xen-tools-4.9.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.9.2-r1.ebuild
1503 deleted file mode 100644
1504 index d8eb34ba9c5..00000000000
1505 --- a/app-emulation/xen-tools/xen-tools-4.9.2-r1.ebuild
1506 +++ /dev/null
1507 @@ -1,453 +0,0 @@
1508 -# Copyright 1999-2018 Gentoo Foundation
1509 -# Distributed under the terms of the GNU General Public License v2
1510 -
1511 -EAPI=6
1512 -
1513 -PYTHON_COMPAT=( python2_7 )
1514 -PYTHON_REQ_USE='ncurses,xml,threads'
1515 -
1516 -inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
1517 -
1518 -MY_PV=${PV/_/-}
1519 -MAJOR_V="$(get_version_component_range 1-2)"
1520 -
1521 -if [[ $PV == *9999 ]]; then
1522 - inherit git-r3
1523 - REPO="xen.git"
1524 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
1525 - S="${WORKDIR}/${REPO}"
1526 -else
1527 - KEYWORDS="amd64 ~arm ~arm64 x86"
1528 - UPSTREAM_VER=2
1529 - SECURITY_VER=
1530 - # xen-tools's gentoo patches tarball
1531 - GENTOO_VER=12
1532 - # xen-tools's gentoo patches version which apply to this specific ebuild
1533 - GENTOO_GPV=0
1534 - # xen-tools ovmf's patches
1535 - OVMF_VER=3
1536 -
1537 - SEABIOS_VER=1.10.0
1538 - # OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
1539 - OVMF_PV=20170321
1540 -
1541 - [[ -n ${UPSTREAM_VER} ]] && \
1542 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
1543 - [[ -n ${SECURITY_VER} ]] && \
1544 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
1545 - [[ -n ${GENTOO_VER} ]] && \
1546 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
1547 - [[ -n ${OVMF_VER} ]] && \
1548 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
1549 -
1550 - SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
1551 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
1552 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
1553 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
1554 - ${OVMF_PATCHSET_URI} )
1555 - ${UPSTREAM_PATCHSET_URI}
1556 - ${SECURITY_PATCHSET_URI}
1557 - ${GENTOO_PATCHSET_URI}"
1558 -
1559 - S="${WORKDIR}/xen-${MY_PV}"
1560 -fi
1561 -
1562 -DESCRIPTION="Xen tools including QEMU and xl"
1563 -HOMEPAGE="https://www.xenproject.org"
1564 -DOCS=( README docs/README.xen-bugtool )
1565 -
1566 -LICENSE="GPL-2"
1567 -SLOT="0/${MAJOR_V}"
1568 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
1569 -# >=dev-lang/ocaml-4 stable
1570 -# Masked in profiles/eapi-5-files instead
1571 -IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
1572 -
1573 -REQUIRED_USE="
1574 - ${PYTHON_REQUIRED_USE}
1575 - pygrub? ( python )
1576 - ovmf? ( hvm )
1577 - ^^ ( qemu system-qemu )"
1578 -
1579 -COMMON_DEPEND="
1580 - sys-apps/pciutils
1581 - dev-libs/lzo:2
1582 - dev-libs/glib:2
1583 - dev-libs/yajl
1584 - dev-libs/libaio
1585 - dev-libs/libgcrypt:0
1586 - sys-libs/zlib
1587 - ${PYTHON_DEPS}
1588 -"
1589 -
1590 -DEPEND="${COMMON_DEPEND}
1591 - >=sys-kernel/linux-headers-4.11
1592 - dev-python/lxml[${PYTHON_USEDEP}]
1593 - x86? ( sys-devel/dev86
1594 - sys-power/iasl )
1595 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
1596 - api? ( dev-libs/libxml2
1597 - net-misc/curl )
1598 - ovmf? (
1599 - !arm? ( !arm64? ( dev-lang/nasm ) )
1600 - $(python_gen_impl_dep sqlite)
1601 - )
1602 - !amd64? ( >=sys-apps/dtc-1.4.0 )
1603 - amd64? ( sys-devel/bin86
1604 - system-seabios? ( sys-firmware/seabios )
1605 - sys-firmware/ipxe
1606 - sys-devel/dev86
1607 - sys-power/iasl )
1608 - dev-lang/perl
1609 - app-misc/pax-utils
1610 - doc? (
1611 - app-text/ghostscript-gpl
1612 - app-text/pandoc
1613 - dev-python/markdown[${PYTHON_USEDEP}]
1614 - dev-texlive/texlive-latexextra
1615 - media-gfx/transfig
1616 - )
1617 - hvm? ( x11-base/xorg-proto
1618 - !net-libs/libiscsi )
1619 - qemu? (
1620 - app-arch/snappy:=
1621 - x11-libs/pixman
1622 - sdl? ( media-libs/libsdl[X] )
1623 - )
1624 - system-qemu? ( app-emulation/qemu[xen] )
1625 - ocaml? ( dev-ml/findlib
1626 - >=dev-lang/ocaml-4 )"
1627 -
1628 -RDEPEND="${COMMON_DEPEND}
1629 - sys-apps/iproute2[-minimal]
1630 - net-misc/bridge-utils
1631 - screen? (
1632 - app-misc/screen
1633 - app-admin/logrotate
1634 - )"
1635 -
1636 -# hvmloader is used to bootstrap a fully virtualized kernel
1637 -# Approved by QA team in bug #144032
1638 -QA_WX_LOAD="
1639 - usr/libexec/xen/boot/hvmloader
1640 - usr/share/qemu-xen/qemu/s390-ccw.img
1641 - usr/share/qemu-xen/qemu/u-boot.e500
1642 -"
1643 -
1644 -QA_PREBUILT="
1645 - usr/libexec/xen/bin/ivshmem-client
1646 - usr/libexec/xen/bin/ivshmem-server
1647 - usr/libexec/xen/bin/qemu-img
1648 - usr/libexec/xen/bin/qemu-io
1649 - usr/libexec/xen/bin/qemu-nbd
1650 - usr/libexec/xen/bin/qemu-system-i386
1651 - usr/libexec/xen/bin/virtfs-proxy-helper
1652 - usr/libexec/xen/libexec/xen-bridge-helper
1653 - usr/share/qemu-xen/qemu/s390-ccw.img
1654 - usr/share/qemu-xen/qemu/u-boot.e500
1655 -"
1656 -
1657 -RESTRICT="test"
1658 -
1659 -pkg_setup() {
1660 - python_setup
1661 - export "CONFIG_LOMOUNT=y"
1662 -
1663 - #bug 522642, disable compile tools/tests
1664 - export "CONFIG_TESTS=n"
1665 -
1666 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
1667 - if use x86 && use amd64; then
1668 - die "Confusion! Both x86 and amd64 are set in your use flags!"
1669 - elif use x86; then
1670 - export XEN_TARGET_ARCH="x86_32"
1671 - elif use amd64 ; then
1672 - export XEN_TARGET_ARCH="x86_64"
1673 - elif use arm; then
1674 - export XEN_TARGET_ARCH="arm32"
1675 - elif use arm64; then
1676 - export XEN_TARGET_ARCH="arm64"
1677 - else
1678 - die "Unsupported architecture!"
1679 - fi
1680 - fi
1681 -}
1682 -
1683 -src_prepare() {
1684 - local i
1685 -
1686 - # Upstream's patchset
1687 - if [[ -n ${UPSTREAM_VER} ]]; then
1688 - einfo "Try to apply Xen Upstream patch set"
1689 - eapply "${WORKDIR}"/patches-upstream
1690 - fi
1691 -
1692 - # Security patchset
1693 - if [[ -n ${SECURITY_VER} ]]; then
1694 - einfo "Try to apply Xen Security patch set"
1695 - # apply main xen patches
1696 - # Two parallel systems, both work side by side
1697 - # Over time they may concdense into one. This will suffice for now
1698 - EPATCH_SUFFIX="patch"
1699 - EPATCH_FORCE="yes"
1700 -
1701 - source "${WORKDIR}"/patches-security/${PV}.conf || die
1702 -
1703 - for i in ${XEN_SECURITY_MAIN}; do
1704 - eapply "${WORKDIR}"/patches-security/xen/$i
1705 - done
1706 -
1707 - # apply qemu-xen/upstream patches
1708 - pushd "${S}"/tools/qemu-xen/ > /dev/null
1709 - for i in ${XEN_SECURITY_QEMUU}; do
1710 - eapply "${WORKDIR}"/patches-security/qemuu/$i
1711 - done
1712 - popd > /dev/null
1713 -
1714 - # apply qemu-traditional patches
1715 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
1716 - for i in ${XEN_SECURITY_QEMUT}; do
1717 - eapply "${WORKDIR}"/patches-security/qemut/$i
1718 - done
1719 - popd > /dev/null
1720 - fi
1721 -
1722 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
1723 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
1724 - pushd tools/firmware/ > /dev/null
1725 - ln -s seabios-dir-remote seabios-dir || die
1726 - popd > /dev/null
1727 -
1728 - # Gentoo's patchset
1729 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
1730 - einfo "Try to apply Gentoo specific patch set"
1731 - source "${FILESDIR}"/gentoo-patches.conf || die
1732 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
1733 - for i in ${!_gpv}; do
1734 - eapply "${WORKDIR}"/patches-gentoo/$i
1735 - done
1736 - fi
1737 -
1738 - # Ovmf's patchset
1739 - if use ovmf; then
1740 - if [[ -n ${OVMF_VER} ]];then
1741 - einfo "Try to apply Ovmf patch set"
1742 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
1743 - eapply "${WORKDIR}"/patches-ovmf
1744 - popd > /dev/null
1745 - fi
1746 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
1747 - fi
1748 -
1749 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
1750 -
1751 - # Fix texi2html build error with new texi2html, qemu.doc.html
1752 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
1753 -
1754 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
1755 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
1756 - -i tools/firmware/Makefile || die
1757 -
1758 - # Drop .config, fixes to gcc-4.6
1759 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
1760 -
1761 - # if the user *really* wants to use their own custom-cflags, let them
1762 - if use custom-cflags; then
1763 - einfo "User wants their own CFLAGS - removing defaults"
1764 -
1765 - # try and remove all the default cflags
1766 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
1767 - -exec sed \
1768 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
1769 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
1770 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
1771 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
1772 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
1773 - -i {} + || die "failed to re-set custom-cflags"
1774 - else
1775 - unset CFLAGS
1776 - unset LDFLAGS
1777 - unset ASFLAGS
1778 - unset CPPFLAGS
1779 - fi
1780 -
1781 - if ! use pygrub; then
1782 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
1783 - fi
1784 -
1785 - if ! use python; then
1786 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
1787 - fi
1788 -
1789 - if ! use hvm; then
1790 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
1791 - # Bug 351648
1792 - elif ! use x86 && ! has x86 $(get_all_abis); then
1793 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
1794 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
1795 - export CPATH="${WORKDIR}"/extra-headers
1796 - fi
1797 -
1798 - if use qemu; then
1799 - if use sdl; then
1800 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
1801 - tools/Makefile || die
1802 - else
1803 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
1804 - tools/qemu-xen-traditional/xen-setup || die
1805 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
1806 - tools/Makefile || die
1807 - fi
1808 - else
1809 - # Don't bother with qemu, only needed for fully virtualised guests
1810 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
1811 - fi
1812 -
1813 - # Reset bash completion dir; Bug 472438
1814 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
1815 - -i Config.mk || die
1816 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
1817 -
1818 - # xencommons, Bug #492332, sed lighter weight than patching
1819 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
1820 - -i tools/hotplug/Linux/init.d/xencommons.in || die
1821 -
1822 - # fix bashishm
1823 - sed -e '/Usage/s/\$//g' \
1824 - -i tools/hotplug/Linux/init.d/xendriverdomain.in || die
1825 -
1826 - # respect multilib, usr/lib/libcacard.so.0.0.0
1827 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
1828 - -i tools/qemu-xen/configure || die
1829 -
1830 - #bug 518136, don't build 32bit exactuable for nomultilib profile
1831 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
1832 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
1833 - fi
1834 -
1835 - # uncomment lines in xl.conf
1836 - sed -e 's:^#autoballoon=:autoballoon=:' \
1837 - -e 's:^#lockfile=:lockfile=:' \
1838 - -e 's:^#vif.default.script=:vif.default.script=:' \
1839 - -i tools/examples/xl.conf || die
1840 -
1841 - default
1842 -}
1843 -
1844 -src_configure() {
1845 - local myconf="--prefix=${PREFIX}/usr \
1846 - --libdir=${PREFIX}/usr/$(get_libdir) \
1847 - --libexecdir=${PREFIX}/usr/libexec \
1848 - --localstatedir=${EPREFIX}/var \
1849 - --disable-werror \
1850 - --disable-xen \
1851 - --enable-tools \
1852 - --enable-docs \
1853 - $(use_enable pam) \
1854 - $(use_enable api xenapi) \
1855 - $(use_enable ovmf) \
1856 - $(use_enable ocaml ocamltools) \
1857 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
1858 - "
1859 -
1860 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
1861 - use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
1862 - use amd64 && myconf+=" $(use_enable qemu-traditional)"
1863 - econf ${myconf}
1864 -}
1865 -
1866 -src_compile() {
1867 - local myopt
1868 - use debug && myopt="${myopt} debug=y"
1869 -
1870 - if test-flag-CC -fno-strict-overflow; then
1871 - append-flags -fno-strict-overflow
1872 - fi
1873 -
1874 - emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
1875 -
1876 - if use doc; then
1877 - emake -C docs build
1878 - else
1879 - emake -C docs man-pages
1880 - fi
1881 -}
1882 -
1883 -src_install() {
1884 - # Override auto-detection in the build system, bug #382573
1885 - export INITD_DIR=/tmp/init.d
1886 - export CONFIG_LEAF_DIR=../tmp/default
1887 -
1888 - # Let the build system compile installed Python modules.
1889 - local PYTHONDONTWRITEBYTECODE
1890 - export PYTHONDONTWRITEBYTECODE
1891 -
1892 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
1893 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
1894 -
1895 - # Created at runtime
1896 - rm -rv "${ED%/}/var/run" || die
1897 -
1898 - # Fix the remaining Python shebangs.
1899 - python_fix_shebang "${D}"
1900 -
1901 - # Remove RedHat-specific stuff
1902 - rm -rf "${D}"tmp || die
1903 -
1904 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
1905 - use doc && dodoc -r docs/{pdf,txt}
1906 - dodoc ${DOCS[@]}
1907 -
1908 - newconfd "${FILESDIR}"/xendomains.confd xendomains
1909 - newconfd "${FILESDIR}"/xenstored.confd xenstored
1910 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
1911 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
1912 - newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
1913 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
1914 - newinitd "${FILESDIR}"/xencommons.initd xencommons
1915 - newconfd "${FILESDIR}"/xencommons.confd xencommons
1916 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
1917 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
1918 - newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
1919 -
1920 - if use screen; then
1921 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
1922 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
1923 - keepdir /var/log/xen-consoles
1924 - fi
1925 -
1926 - # For -static-libs wrt Bug 384355
1927 - if ! use static-libs; then
1928 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
1929 - fi
1930 -
1931 - # for xendomains
1932 - keepdir /etc/xen/auto
1933 -
1934 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
1935 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
1936 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
1937 -}
1938 -
1939 -pkg_postinst() {
1940 - elog "Official Xen Guide and the offical wiki page:"
1941 - elog "https://wiki.gentoo.org/wiki/Xen"
1942 - elog "https://wiki.xen.org/wiki/Main_Page"
1943 - elog ""
1944 - elog "Recommended to utilise the xencommons script to config sytem At boot"
1945 - elog "Add by use of rc-update on completion of the install"
1946 -
1947 - if ! use hvm; then
1948 - echo
1949 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
1950 - elog "support enable the hvm use flag."
1951 - elog "An x86 or amd64 system is required to build HVM support."
1952 - fi
1953 -
1954 - if use qemu; then
1955 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
1956 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
1957 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
1958 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
1959 - fi
1960 -}