Gentoo Archives: gentoo-commits

From: Yixun Lan <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
Date: Thu, 18 Feb 2016 03:18:00
Message-Id: 1455764782.1e4ed66f2c53e64a4c3d14e357a3ae97611c3b25.dlan@gentoo
1 commit: 1e4ed66f2c53e64a4c3d14e357a3ae97611c3b25
2 Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 18 03:03:11 2016 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 18 03:06:22 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e4ed66f
7
8 app-emulation/xen-tools: drop old versions
9
10 Package-Manager: portage-2.2.27
11
12 app-emulation/xen-tools/Manifest | 3 -
13 app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild | 472 ---------------------
14 app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild | 473 ----------------------
15 app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild | 463 ---------------------
16 app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild | 465 ---------------------
17 app-emulation/xen-tools/xen-tools-4.6.0-r6.ebuild | 469 ---------------------
18 6 files changed, 2345 deletions(-)
19
20 diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
21 index e4b823f..80dc2ff 100644
22 --- a/app-emulation/xen-tools/Manifest
23 +++ b/app-emulation/xen-tools/Manifest
24 @@ -10,9 +10,6 @@ DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73a
25 DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
26 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
27 DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798deff5c2c72d1efb5459c72f4278f00 SHA512 4fd0c663a733436188aca364e927ac430d9bbef9859da65c074d7fd66c330645b05ff1f3e849f4581dfcd7054801d65edcff8445c1c63c2725f11e3903415af0 WHIRLPOOL 5504d7ffbd3c1970026c1f43252d9c76f10c5448ede247719e2698aa8f8e93b20e4cc353da5582b3b6887fb3fd7d1e13765f664ea60daeb6020f052eaca9b9f4
28 -DIST xen-security-patches-1.tar.gz 7040 SHA256 30733e9ca71bf4291ff212eb191afb22687ccd9b2579767fe0ee013152980c76 SHA512 89c72897f18a86c2060bb76a182e7cca72ad2f33a3aab964ecae66e057aeecafee2e9986204d6feb98f81ccb740460ee2cb37663b1ab79f47adc1dd73e0091bc WHIRLPOOL c27e612b87b4a30abbf59e6be019e2c21a78bfbdf1715da5498d95607d390d616251768d419ac5ce76087bbf7cdfc410dd0088ba48e425082cea971efcb64346
29 -DIST xen-security-patches-2.tar.gz 7370 SHA256 f24bf4b0cba29b51ee71f6ef82654cddf157c63d62fc1119f17255b2388e03ab SHA512 209dea670467ff1df18428c15b25229c05d676d1a2f646cddb221544ae888241ade48a22be037f97dce249ac322c1f30bb477675e5e2cc04a2fbd839e02f1f57 WHIRLPOOL ae66a2fbc0d0f0a555d407ebd3198fa58ee043515fb9821d7b9eda46d088bc87b3de16fe015fd1142294429dd2c1c7826e414a55980e27123185c1a86fb0a8a6
30 -DIST xen-security-patches-3.tar.gz 7349 SHA256 a1876b918c0a608618f349deed11b547a65c5909c31d72a89340d4908c572f46 SHA512 f5e8e7ab5d9be6aa036e52627931f1b2648de642664b2922f9cab64f44d19ac8682f5beb7fdbcb842ee19346202093fade3f10e39ba60fcb12a101deb4408818 WHIRLPOOL 14ee65babe4edd901914c8b8ddb5d7b54e6738d77642514fe611bf84541ae0a932bcb48f86179d5e7a6741135b9c7b129e8244cc22922c4e592604a696b6082f
31 DIST xen-security-patches-5.tar.gz 8716 SHA256 afd114f2cb1b623ac1709d75c771006f91b5b2a0a0695f4da3d6aa6f6b340d9f SHA512 f2276759cb418e252052701f5e41e626e1d232098bd7e393e7e58286d356ef33f249c2f9d7b5b1219279de7c4c66832f0d4f761d36bc51e7c10cea973dd9882e WHIRLPOOL 18cb29a0fde10f1bac698c577713db1307c02408778b5d128a4f017ae8be6fba893feb9b8f09fe2d8164dc761d136190d1dbee8a3eb4caa35d8bf976a498d405
32 DIST xen-security-patches-6.tar.gz 8308 SHA256 b0dc1df6b27073a83b12a17a04a01e74af8c19a1c96d9dda580bb738eaab25f3 SHA512 b9155eef3f18e47288a6a6bb570a073d4c84449fe11fbac4c35cceaa4f7c06624597f63a8768bddd735c345b8c430aeee18b71f43e9b188de3cfa0cbf608dc0a WHIRLPOOL 9933ed07a2419170070a9eedfda200ec5ebef67b6b98c1b435793008c126347cdc8c0ef9ff2cb4fe0b7333ff51211545a3fe2ff726ca7c22d46f231d6d1e82aa
33 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
34
35 diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
36 deleted file mode 100644
37 index ba2f756..0000000
38 --- a/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
39 +++ /dev/null
40 @@ -1,472 +0,0 @@
41 -# Copyright 1999-2015 Gentoo Foundation
42 -# Distributed under the terms of the GNU General Public License v2
43 -# $Id$
44 -
45 -EAPI=5
46 -
47 -MY_PV=${PV/_/-}
48 -
49 -PYTHON_COMPAT=( python2_7 )
50 -PYTHON_REQ_USE='xml,threads'
51 -
52 -if [[ $PV == *9999 ]]; then
53 - KEYWORDS=""
54 - REPO="xen-unstable.hg"
55 - EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
56 - S="${WORKDIR}/${REPO}"
57 - live_eclass="mercurial"
58 -else
59 - KEYWORDS="amd64 ~arm ~arm64 -x86"
60 - UPSTREAM_VER=
61 - SECURITY_VER=7
62 - SEC_VER=1
63 - # xen-tools's gentoo patches tarball
64 - GENTOO_VER=4
65 - # xen-tools's gentoo patches version which apply to this specific ebuild
66 - GENTOO_GPV=0
67 - # xen-tools ovmf's patches
68 - OVMF_VER=1
69 -
70 - SEABIOS_VER=1.7.5
71 - OVMF_PV=20150629
72 -
73 - [[ -n ${UPSTREAM_VER} ]] && \
74 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
75 - [[ -n ${SECURITY_VER} ]] && \
76 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
77 - [[ -n ${GENTOO_VER} ]] && \
78 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
79 - [[ -n ${OVMF_VER} ]] && \
80 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
81 -
82 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
83 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
84 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
85 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
86 - ${OVMF_PATCHSET_URI} )
87 - ${UPSTREAM_PATCHSET_URI}
88 - ${SECURITY_PATCHSET_URI}
89 - ${GENTOO_PATCHSET_URI}
90 - https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-${SEC_VER}.tar.gz"
91 -
92 - S="${WORKDIR}/xen-${MY_PV}"
93 -fi
94 -
95 -inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
96 -
97 -DESCRIPTION="Xend daemon and tools"
98 -HOMEPAGE="http://xen.org/"
99 -DOCS=( README docs/README.xen-bugtool )
100 -
101 -LICENSE="GPL-2"
102 -SLOT="0"
103 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
104 -# >=dev-lang/ocaml-4 stable
105 -# Masked in profiles/eapi-5-files instead
106 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
107 -
108 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
109 - ${PYTHON_REQUIRED_USE}
110 - pygrub? ( python )
111 - ovmf? ( hvm )
112 - qemu? ( !system-qemu )"
113 -
114 -COMMON_DEPEND="
115 - dev-libs/lzo:2
116 - dev-libs/glib:2
117 - dev-libs/yajl
118 - dev-libs/libaio
119 - dev-libs/libgcrypt:0
120 - sys-libs/zlib
121 -"
122 -
123 -DEPEND="${COMMON_DEPEND}
124 - dev-python/lxml[${PYTHON_USEDEP}]
125 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
126 - hvm? ( media-libs/libsdl )
127 - ${PYTHON_DEPS}
128 - api? ( dev-libs/libxml2
129 - net-misc/curl )
130 - pygrub? ( $(python_gen_impl_dep ncurses) )
131 - ovmf? ( $(python_gen_impl_dep sqlite) )
132 - !amd64? ( >=sys-apps/dtc-1.4.0 )
133 - amd64? ( sys-devel/bin86
134 - system-seabios? ( sys-firmware/seabios )
135 - sys-firmware/ipxe
136 - sys-devel/dev86
137 - sys-power/iasl )
138 - dev-lang/perl
139 - app-misc/pax-utils
140 - doc? (
141 - app-doc/doxygen
142 - dev-python/markdown[${PYTHON_USEDEP}]
143 - dev-tex/latex2html[png,gif]
144 - media-gfx/graphviz
145 - dev-tex/xcolor
146 - media-gfx/transfig
147 - dev-texlive/texlive-latexextra
148 - virtual/latex-base
149 - dev-tex/latexmk
150 - dev-texlive/texlive-latex
151 - dev-texlive/texlive-pictures
152 - dev-texlive/texlive-latexrecommended
153 - )
154 - hvm? ( x11-proto/xproto
155 - !net-libs/libiscsi )
156 - qemu? ( x11-libs/pixman )
157 - system-qemu? ( app-emulation/qemu[xen] )
158 - ocaml? ( dev-ml/findlib
159 - >=dev-lang/ocaml-4 )"
160 -
161 -RDEPEND="${COMMON_DEPEND}
162 - sys-apps/iproute2
163 - net-misc/bridge-utils
164 - screen? (
165 - app-misc/screen
166 - app-admin/logrotate
167 - )
168 - virtual/udev"
169 -
170 -# hvmloader is used to bootstrap a fully virtualized kernel
171 -# Approved by QA team in bug #144032
172 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
173 - usr/share/qemu-xen/qemu/s390-ccw.img"
174 -
175 -RESTRICT="test"
176 -
177 -pkg_setup() {
178 - python-single-r1_pkg_setup
179 - export "CONFIG_LOMOUNT=y"
180 -
181 - #bug 522642, disable compile tools/tests
182 - export "CONFIG_TESTS=n"
183 -
184 - if has_version dev-libs/libgcrypt:0; then
185 - export "CONFIG_GCRYPT=y"
186 - fi
187 -
188 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
189 - if use x86 && use amd64; then
190 - die "Confusion! Both x86 and amd64 are set in your use flags!"
191 - elif use x86; then
192 - export XEN_TARGET_ARCH="x86_32"
193 - elif use amd64 ; then
194 - export XEN_TARGET_ARCH="x86_64"
195 - elif use arm; then
196 - export XEN_TARGET_ARCH="arm32"
197 - elif use arm64; then
198 - export XEN_TARGET_ARCH="arm64"
199 - else
200 - die "Unsupported architecture!"
201 - fi
202 - fi
203 -}
204 -
205 -src_prepare() {
206 - # Upstream's patchset
207 - if [[ -n ${UPSTREAM_VER} ]]; then
208 - einfo "Try to apply Xen Upstream patcheset"
209 - EPATCH_SUFFIX="patch" \
210 - EPATCH_FORCE="yes" \
211 - EPATCH_OPTS="-p1" \
212 - epatch "${WORKDIR}"/patches-upstream
213 - fi
214 -
215 - # Security patchset
216 - if [[ -n ${SECURITY_VER} ]]; then
217 - einfo "Try to apply Xen Security patcheset"
218 - source "${WORKDIR}"/patches-security/${PV}.conf
219 - # apply main xen patches
220 - # In contrast to xen-4.5.2-r2.ebuild, these are moved into the dir structure
221 - # prepared and deposited by dlan in his devspace
222 - mv "${WORKDIR}"/{xsa156-4.5.patch,xsa15[8-9].patch,xsa160-4.6.patch} \
223 - "${WORKDIR}"/patches-security/xen || die
224 - XEN_SECURITY_MAIN="${XEN_SECURITY_MAIN} xsa156-4.5.patch xsa15[8-9].patch xsa160-4.6.patch"
225 - for i in ${XEN_SECURITY_MAIN}; do
226 - EPATCH_SUFFIX="patch" \
227 - EPATCH_FORCE="yes" \
228 - epatch "${WORKDIR}"/patches-security/xen/$i
229 - done
230 -
231 - # apply qemu-traditional patches
232 - mv "${WORKDIR}"/xsa162-qemut.patch \
233 - "${WORKDIR}"/patches-security/qemut/ || die
234 - XEN_SECURITY_QEMUT="xsa162-qemut.patch"
235 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
236 - for i in ${XEN_SECURITY_QEMUT}; do
237 - EPATCH_SUFFIX="patch" \
238 - EPATCH_FORCE="yes" \
239 - epatch "${WORKDIR}"/patches-security/qemut/$i
240 - done
241 - popd > /dev/null
242 -
243 - # apply qemu-xen/upstream patches
244 - mv "${WORKDIR}"/xsa162-qemuu.patch \
245 - "${WORKDIR}"/patches-security/qemuu/ || die
246 - XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
247 - pushd "${S}"/tools/qemu-xen/ > /dev/null
248 - for i in ${XEN_SECURITY_QEMUU}; do
249 - EPATCH_SUFFIX="patch" \
250 - EPATCH_FORCE="yes" \
251 - epatch "${WORKDIR}"/patches-security/qemuu/$i
252 - done
253 - popd > /dev/null
254 - fi
255 -
256 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
257 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
258 - pushd tools/firmware/ > /dev/null
259 - ln -s seabios-dir-remote seabios-dir || die
260 - popd > /dev/null
261 -
262 - # Gentoo's patchset
263 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
264 - einfo "Try to apply Gentoo specific patch set"
265 - source "${FILESDIR}"/gentoo-patches.conf
266 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
267 - for i in ${!_gpv}; do
268 - EPATCH_SUFFIX="patch" \
269 - EPATCH_FORCE="yes" \
270 - epatch "${WORKDIR}"/patches-gentoo/$i
271 - done
272 - fi
273 -
274 - # Ovmf's patchset
275 - if [[ -n ${OVMF_VER} ]] && use ovmf; then
276 - einfo "Try to apply Ovmf patch set"
277 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
278 - EPATCH_SUFFIX="patch" \
279 - EPATCH_FORCE="yes" \
280 - EPATCH_OPTS="-p1" \
281 - epatch "${WORKDIR}"/patches-ovmf
282 - popd > /dev/null
283 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
284 - fi
285 -
286 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
287 -
288 - # Fix texi2html build error with new texi2html, qemu.doc.html
289 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
290 -
291 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
292 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
293 - -i tools/firmware/Makefile || die
294 -
295 - # Drop .config, fixes to gcc-4.6
296 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
297 -
298 - # if the user *really* wants to use their own custom-cflags, let them
299 - if use custom-cflags; then
300 - einfo "User wants their own CFLAGS - removing defaults"
301 -
302 - # try and remove all the default cflags
303 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
304 - -exec sed \
305 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
306 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
307 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
308 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
309 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
310 - -i {} + || die "failed to re-set custom-cflags"
311 - fi
312 -
313 - if ! use pygrub; then
314 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
315 - fi
316 -
317 - if ! use python; then
318 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
319 - fi
320 -
321 - if ! use hvm; then
322 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
323 - # Bug 351648
324 - elif ! use x86 && ! has x86 $(get_all_abis); then
325 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
326 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
327 - export CPATH="${WORKDIR}"/extra-headers
328 - fi
329 -
330 - # Don't bother with qemu, only needed for fully virtualised guests
331 - if ! use qemu; then
332 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
333 - fi
334 -
335 - # Reset bash completion dir; Bug 472438
336 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
337 - -i Config.mk || die
338 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
339 -
340 - # xencommons, Bug #492332, sed lighter weight than patching
341 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
342 - -i tools/hotplug/Linux/init.d/xencommons.in || die
343 -
344 - # respect multilib, usr/lib/libcacard.so.0.0.0
345 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
346 - -i tools/qemu-xen/configure || die
347 -
348 - #bug 518136, don't build 32bit exactuable for nomultilib profile
349 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
350 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
351 - fi
352 -
353 - # use /var instead of /var/lib, consistat with previous ebuild
354 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
355 - m4/paths.m4 configure tools/configure || die
356 - # use /run instead of /var/run
357 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
358 - m4/paths.m4 configure tools/configure || die
359 -
360 - # uncomment lines in xl.conf
361 - sed -e 's:^#autoballoon=:autoballoon=:' \
362 - -e 's:^#lockfile=:lockfile=:' \
363 - -e 's:^#vif.default.script=:vif.default.script=:' \
364 - -i tools/examples/xl.conf || die
365 -
366 - epatch_user
367 -}
368 -
369 -src_configure() {
370 - local myconf="--prefix=${PREFIX}/usr \
371 - --libdir=${PREFIX}/usr/$(get_libdir) \
372 - --libexecdir=${PREFIX}/usr/libexec \
373 - --disable-werror \
374 - --disable-xen \
375 - --enable-tools \
376 - --enable-docs \
377 - $(use_with system-qemu) \
378 - $(use_enable pam) \
379 - $(use_enable api xenapi) \
380 - $(use_enable ovmf) \
381 - $(use_enable ocaml ocamltools) \
382 - "
383 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
384 - use qemu || myconf+=" --with-system-qemu"
385 - use amd64 && myconf+=" --enable-qemu-traditional"
386 - econf ${myconf}
387 -}
388 -
389 -src_compile() {
390 - export VARTEXFONTS="${T}/fonts"
391 - local myopt
392 - use debug && myopt="${myopt} debug=y"
393 -
394 - use custom-cflags || unset CFLAGS
395 - if test-flag-CC -fno-strict-overflow; then
396 - append-flags -fno-strict-overflow
397 - fi
398 -
399 - unset LDFLAGS
400 - unset CFLAGS
401 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
402 -
403 - use doc && emake -C docs txt html
404 - emake -C docs man-pages
405 -}
406 -
407 -src_install() {
408 - # Override auto-detection in the build system, bug #382573
409 - export INITD_DIR=/tmp/init.d
410 - export CONFIG_LEAF_DIR=../tmp/default
411 -
412 - # Let the build system compile installed Python modules.
413 - local PYTHONDONTWRITEBYTECODE
414 - export PYTHONDONTWRITEBYTECODE
415 -
416 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
417 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
418 -
419 - # Fix the remaining Python shebangs.
420 - python_fix_shebang "${D}"
421 -
422 - # Remove RedHat-specific stuff
423 - rm -rf "${D}"tmp || die
424 -
425 - if use doc; then
426 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
427 -
428 - dohtml -r docs/
429 - docinto pdf
430 - dodoc ${DOCS[@]}
431 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
432 - fi
433 -
434 - rm -rf "${D}"/usr/share/doc/xen/
435 - doman docs/man?/*
436 -
437 - newconfd "${FILESDIR}"/xendomains.confd xendomains
438 - newconfd "${FILESDIR}"/xenstored.confd xenstored
439 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
440 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
441 - newinitd "${FILESDIR}"/xenstored.initd xenstored
442 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
443 - newinitd "${FILESDIR}"/xencommons.initd xencommons
444 - newconfd "${FILESDIR}"/xencommons.confd xencommons
445 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
446 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
447 -
448 - if use screen; then
449 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
450 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
451 - keepdir /var/log/xen-consoles
452 - fi
453 -
454 - # For -static-libs wrt Bug 384355
455 - if ! use static-libs; then
456 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
457 - fi
458 -
459 - # for xendomains
460 - keepdir /etc/xen/auto
461 -
462 - # Temp QA workaround
463 - dodir "$(get_udevdir)"
464 - mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
465 - rm -rf "${D}"/etc/udev
466 -
467 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
468 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
469 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
470 -}
471 -
472 -pkg_postinst() {
473 - elog "Official Xen Guide and the offical wiki page:"
474 - elog "https://wiki.gentoo.org/wiki/Xen"
475 - elog "http://wiki.xen.org/wiki/Main_Page"
476 - elog ""
477 - elog "Recommended to utilise the xencommons script to config sytem At boot"
478 - elog "Add by use of rc-update on completion of the install"
479 -
480 - # TODO: we need to have the current Python slot here.
481 - if ! has_version "dev-lang/python[ncurses]"; then
482 - echo
483 - ewarn "NB: Your dev-lang/python is built without USE=ncurses."
484 - ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
485 - fi
486 -
487 - if has_version "sys-apps/iproute2[minimal]"; then
488 - echo
489 - ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
490 - ewarn "will not work until you rebuild iproute2 without USE=minimal."
491 - fi
492 -
493 - if ! use hvm; then
494 - echo
495 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
496 - elog "support enable the hvm use flag."
497 - elog "An x86 or amd64 system is required to build HVM support."
498 - fi
499 -
500 - if use qemu; then
501 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
502 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
503 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
504 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
505 - fi
506 -
507 - if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
508 - echo
509 - elog "xensv is broken upstream (Gentoo bug #142011)."
510 - elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
511 - fi
512 -}
513
514 diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
515 deleted file mode 100644
516 index acef34a..0000000
517 --- a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
518 +++ /dev/null
519 @@ -1,473 +0,0 @@
520 -# Copyright 1999-2016 Gentoo Foundation
521 -# Distributed under the terms of the GNU General Public License v2
522 -# $Id$
523 -
524 -EAPI=5
525 -
526 -MY_PV=${PV/_/-}
527 -
528 -PYTHON_COMPAT=( python2_7 )
529 -PYTHON_REQ_USE='xml,threads'
530 -
531 -if [[ $PV == *9999 ]]; then
532 - KEYWORDS=""
533 - REPO="xen-unstable.hg"
534 - EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
535 - S="${WORKDIR}/${REPO}"
536 - live_eclass="mercurial"
537 -else
538 - KEYWORDS="amd64 ~arm ~arm64 x86"
539 - UPSTREAM_VER=
540 - SECURITY_VER=7
541 - # vars set to reflect https://dev.gentoo.org/~idella4/
542 - SEC_VER=2
543 - QEMU_VER=0
544 - # xen-tools's gentoo patches tarball
545 - GENTOO_VER=4
546 - # xen-tools's gentoo patches version which apply to this specific ebuild
547 - GENTOO_GPV=0
548 - # xen-tools ovmf's patches
549 - OVMF_VER=1
550 -
551 - SEABIOS_VER=1.7.5
552 - OVMF_PV=20150629
553 -
554 - [[ -n ${UPSTREAM_VER} ]] && \
555 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
556 - [[ -n ${SECURITY_VER} ]] && \
557 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
558 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
559 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
560 - [[ -n ${GENTOO_VER} ]] && \
561 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
562 - [[ -n ${OVMF_VER} ]] && \
563 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
564 -
565 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
566 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
567 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
568 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
569 - ${OVMF_PATCHSET_URI} )
570 - ${UPSTREAM_PATCHSET_URI}
571 - ${SECURITY_PATCHSET_URI}
572 - ${GENTOO_PATCHSET_URI}"
573 -
574 - S="${WORKDIR}/xen-${MY_PV}"
575 -fi
576 -
577 -inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
578 -
579 -DESCRIPTION="Xend daemon and tools"
580 -HOMEPAGE="http://xen.org/"
581 -DOCS=( README docs/README.xen-bugtool )
582 -
583 -LICENSE="GPL-2"
584 -SLOT="0"
585 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
586 -# >=dev-lang/ocaml-4 stable
587 -# Masked in profiles/eapi-5-files instead
588 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
589 -
590 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
591 - ${PYTHON_REQUIRED_USE}
592 - pygrub? ( python )
593 - ovmf? ( hvm )
594 - qemu? ( !system-qemu )"
595 -
596 -COMMON_DEPEND="
597 - dev-libs/lzo:2
598 - dev-libs/glib:2
599 - dev-libs/yajl
600 - dev-libs/libaio
601 - dev-libs/libgcrypt:0
602 - sys-libs/zlib
603 -"
604 -
605 -DEPEND="${COMMON_DEPEND}
606 - dev-python/lxml[${PYTHON_USEDEP}]
607 - x86? ( sys-devel/dev86
608 - sys-power/iasl )
609 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
610 - hvm? ( media-libs/libsdl )
611 - ${PYTHON_DEPS}
612 - api? ( dev-libs/libxml2
613 - net-misc/curl )
614 - pygrub? ( $(python_gen_impl_dep ncurses) )
615 - ovmf? ( $(python_gen_impl_dep sqlite) )
616 - !amd64? ( >=sys-apps/dtc-1.4.0 )
617 - amd64? ( sys-devel/bin86
618 - system-seabios? ( sys-firmware/seabios )
619 - sys-firmware/ipxe
620 - sys-devel/dev86
621 - sys-power/iasl )
622 - dev-lang/perl
623 - app-misc/pax-utils
624 - doc? (
625 - app-doc/doxygen
626 - dev-python/markdown[${PYTHON_USEDEP}]
627 - dev-tex/latex2html[png,gif]
628 - media-gfx/graphviz
629 - dev-tex/xcolor
630 - media-gfx/transfig
631 - dev-texlive/texlive-latexextra
632 - virtual/latex-base
633 - dev-tex/latexmk
634 - dev-texlive/texlive-latex
635 - dev-texlive/texlive-pictures
636 - dev-texlive/texlive-latexrecommended
637 - )
638 - hvm? ( x11-proto/xproto
639 - !net-libs/libiscsi )
640 - qemu? ( x11-libs/pixman )
641 - system-qemu? ( app-emulation/qemu[xen] )
642 - ocaml? ( dev-ml/findlib
643 - >=dev-lang/ocaml-4 )"
644 -
645 -RDEPEND="${COMMON_DEPEND}
646 - sys-apps/iproute2
647 - net-misc/bridge-utils
648 - screen? (
649 - app-misc/screen
650 - app-admin/logrotate
651 - )
652 - virtual/udev"
653 -
654 -# hvmloader is used to bootstrap a fully virtualized kernel
655 -# Approved by QA team in bug #144032
656 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
657 - usr/share/qemu-xen/qemu/s390-ccw.img"
658 -
659 -RESTRICT="test"
660 -
661 -pkg_setup() {
662 - python-single-r1_pkg_setup
663 - export "CONFIG_LOMOUNT=y"
664 -
665 - #bug 522642, disable compile tools/tests
666 - export "CONFIG_TESTS=n"
667 -
668 - if has_version dev-libs/libgcrypt:0; then
669 - export "CONFIG_GCRYPT=y"
670 - fi
671 -
672 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
673 - if use x86 && use amd64; then
674 - die "Confusion! Both x86 and amd64 are set in your use flags!"
675 - elif use x86; then
676 - export XEN_TARGET_ARCH="x86_32"
677 - elif use amd64 ; then
678 - export XEN_TARGET_ARCH="x86_64"
679 - elif use arm; then
680 - export XEN_TARGET_ARCH="arm32"
681 - elif use arm64; then
682 - export XEN_TARGET_ARCH="arm64"
683 - else
684 - die "Unsupported architecture!"
685 - fi
686 - fi
687 -}
688 -
689 -src_prepare() {
690 - # Upstream's patchset
691 - if [[ -n ${UPSTREAM_VER} ]]; then
692 - einfo "Try to apply Xen Upstream patcheset"
693 - EPATCH_SUFFIX="patch" \
694 - EPATCH_FORCE="yes" \
695 - EPATCH_OPTS="-p1" \
696 - epatch "${WORKDIR}"/patches-upstream
697 - fi
698 -
699 - # Security patchset
700 - if [[ -n ${SECURITY_VER} ]]; then
701 - einfo "Try to apply Xen Security patcheset"
702 - source "${WORKDIR}"/patches-security/${PV}.conf
703 - # apply main xen patches
704 - # Two parallel systems, both work
705 - # Over time they may concdense into one. This will suffice for now
706 - EPATCH_SUFFIX="patch"
707 - EPATCH_FORCE="yes"
708 - for i in ${XEN_SECURITY_MAIN}; do
709 - epatch "${WORKDIR}"/patches-security/xen/$i
710 - done
711 - for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
712 - epatch $i
713 - done
714 -
715 - # apply qemu-traditional patches
716 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
717 - for i in ${XEN_SECURITY_QEMUT}; do
718 - epatch "${WORKDIR}"/patches-security/qemut/$i
719 - done
720 - for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
721 - epatch $i
722 - done
723 - popd > /dev/null
724 -
725 - # apply qemu-xen/upstream patches
726 - pushd "${S}"/tools/qemu-xen/ > /dev/null
727 - for i in ${XEN_SECURITY_QEMUU}; do
728 - epatch "${WORKDIR}"/patches-security/qemuu/$i
729 - done
730 - for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
731 - epatch $i
732 - done
733 - popd > /dev/null
734 - fi
735 -
736 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
737 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
738 - pushd tools/firmware/ > /dev/null
739 - ln -s seabios-dir-remote seabios-dir || die
740 - popd > /dev/null
741 -
742 - # Gentoo's patchset
743 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
744 - einfo "Try to apply Gentoo specific patch set"
745 - source "${FILESDIR}"/gentoo-patches.conf
746 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
747 - for i in ${!_gpv}; do
748 - EPATCH_SUFFIX="patch" \
749 - EPATCH_FORCE="yes" \
750 - epatch "${WORKDIR}"/patches-gentoo/$i
751 - done
752 - fi
753 -
754 - # Ovmf's patchset
755 - if [[ -n ${OVMF_VER} ]] && use ovmf; then
756 - einfo "Try to apply Ovmf patch set"
757 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
758 - EPATCH_SUFFIX="patch" \
759 - EPATCH_FORCE="yes" \
760 - EPATCH_OPTS="-p1" \
761 - epatch "${WORKDIR}"/patches-ovmf
762 - popd > /dev/null
763 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
764 - fi
765 -
766 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
767 -
768 - # Fix texi2html build error with new texi2html, qemu.doc.html
769 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
770 -
771 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
772 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
773 - -i tools/firmware/Makefile || die
774 -
775 - # Drop .config, fixes to gcc-4.6
776 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
777 -
778 - # if the user *really* wants to use their own custom-cflags, let them
779 - if use custom-cflags; then
780 - einfo "User wants their own CFLAGS - removing defaults"
781 -
782 - # try and remove all the default cflags
783 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
784 - -exec sed \
785 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
786 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
787 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
788 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
789 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
790 - -i {} + || die "failed to re-set custom-cflags"
791 - fi
792 -
793 - if ! use pygrub; then
794 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
795 - fi
796 -
797 - if ! use python; then
798 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
799 - fi
800 -
801 - if ! use hvm; then
802 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
803 - # Bug 351648
804 - elif ! use x86 && ! has x86 $(get_all_abis); then
805 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
806 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
807 - export CPATH="${WORKDIR}"/extra-headers
808 - fi
809 -
810 - # Don't bother with qemu, only needed for fully virtualised guests
811 - if ! use qemu; then
812 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
813 - fi
814 -
815 - # Reset bash completion dir; Bug 472438
816 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
817 - -i Config.mk || die
818 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
819 -
820 - # xencommons, Bug #492332, sed lighter weight than patching
821 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
822 - -i tools/hotplug/Linux/init.d/xencommons.in || die
823 -
824 - # respect multilib, usr/lib/libcacard.so.0.0.0
825 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
826 - -i tools/qemu-xen/configure || die
827 -
828 - #bug 518136, don't build 32bit exactuable for nomultilib profile
829 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
830 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
831 - fi
832 -
833 - # use /var instead of /var/lib, consistat with previous ebuild
834 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
835 - m4/paths.m4 configure tools/configure || die
836 - # use /run instead of /var/run
837 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
838 - m4/paths.m4 configure tools/configure || die
839 -
840 - # uncomment lines in xl.conf
841 - sed -e 's:^#autoballoon=:autoballoon=:' \
842 - -e 's:^#lockfile=:lockfile=:' \
843 - -e 's:^#vif.default.script=:vif.default.script=:' \
844 - -i tools/examples/xl.conf || die
845 -
846 - epatch_user
847 -}
848 -
849 -src_configure() {
850 - local myconf="--prefix=${PREFIX}/usr \
851 - --libdir=${PREFIX}/usr/$(get_libdir) \
852 - --libexecdir=${PREFIX}/usr/libexec \
853 - --disable-werror \
854 - --disable-xen \
855 - --enable-tools \
856 - --enable-docs \
857 - $(use_with system-qemu) \
858 - $(use_enable pam) \
859 - $(use_enable api xenapi) \
860 - $(use_enable ovmf) \
861 - $(use_enable ocaml ocamltools) \
862 - "
863 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
864 - use qemu || myconf+=" --with-system-qemu"
865 - use amd64 && myconf+=" --enable-qemu-traditional"
866 - econf ${myconf}
867 -}
868 -
869 -src_compile() {
870 - export VARTEXFONTS="${T}/fonts"
871 - local myopt
872 - use debug && myopt="${myopt} debug=y"
873 -
874 - use custom-cflags || unset CFLAGS
875 - if test-flag-CC -fno-strict-overflow; then
876 - append-flags -fno-strict-overflow
877 - fi
878 -
879 - unset LDFLAGS
880 - unset CFLAGS
881 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
882 -
883 - use doc && emake -C docs txt html
884 - emake -C docs man-pages
885 -}
886 -
887 -src_install() {
888 - # Override auto-detection in the build system, bug #382573
889 - export INITD_DIR=/tmp/init.d
890 - export CONFIG_LEAF_DIR=../tmp/default
891 -
892 - # Let the build system compile installed Python modules.
893 - local PYTHONDONTWRITEBYTECODE
894 - export PYTHONDONTWRITEBYTECODE
895 -
896 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
897 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
898 -
899 - # Fix the remaining Python shebangs.
900 - python_fix_shebang "${D}"
901 -
902 - # Remove RedHat-specific stuff
903 - rm -rf "${D}"tmp || die
904 -
905 - if use doc; then
906 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
907 -
908 - dohtml -r docs/
909 - docinto pdf
910 - dodoc ${DOCS[@]}
911 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
912 - fi
913 -
914 - rm -rf "${D}"/usr/share/doc/xen/
915 - doman docs/man?/*
916 -
917 - newconfd "${FILESDIR}"/xendomains.confd xendomains
918 - newconfd "${FILESDIR}"/xenstored.confd xenstored
919 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
920 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
921 - newinitd "${FILESDIR}"/xenstored.initd xenstored
922 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
923 - newinitd "${FILESDIR}"/xencommons.initd xencommons
924 - newconfd "${FILESDIR}"/xencommons.confd xencommons
925 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
926 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
927 -
928 - if use screen; then
929 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
930 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
931 - keepdir /var/log/xen-consoles
932 - fi
933 -
934 - # For -static-libs wrt Bug 384355
935 - if ! use static-libs; then
936 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
937 - fi
938 -
939 - # for xendomains
940 - keepdir /etc/xen/auto
941 -
942 - # Temp QA workaround
943 - dodir "$(get_udevdir)"
944 - mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
945 - rm -rf "${D}"/etc/udev
946 -
947 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
948 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
949 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
950 -}
951 -
952 -pkg_postinst() {
953 - elog "Official Xen Guide and the offical wiki page:"
954 - elog "https://wiki.gentoo.org/wiki/Xen"
955 - elog "http://wiki.xen.org/wiki/Main_Page"
956 - elog ""
957 - elog "Recommended to utilise the xencommons script to config sytem At boot"
958 - elog "Add by use of rc-update on completion of the install"
959 -
960 - # TODO: we need to have the current Python slot here.
961 - if ! has_version "dev-lang/python[ncurses]"; then
962 - echo
963 - ewarn "NB: Your dev-lang/python is built without USE=ncurses."
964 - ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
965 - fi
966 -
967 - if has_version "sys-apps/iproute2[minimal]"; then
968 - echo
969 - ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
970 - ewarn "will not work until you rebuild iproute2 without USE=minimal."
971 - fi
972 -
973 - if ! use hvm; then
974 - echo
975 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
976 - elog "support enable the hvm use flag."
977 - elog "An x86 or amd64 system is required to build HVM support."
978 - fi
979 -
980 - if use qemu; then
981 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
982 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
983 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
984 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
985 - fi
986 -
987 - if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
988 - echo
989 - elog "xensv is broken upstream (Gentoo bug #142011)."
990 - elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
991 - fi
992 -}
993
994 diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
995 deleted file mode 100644
996 index e9f84c0..0000000
997 --- a/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
998 +++ /dev/null
999 @@ -1,463 +0,0 @@
1000 -# Copyright 1999-2015 Gentoo Foundation
1001 -# Distributed under the terms of the GNU General Public License v2
1002 -# $Id$
1003 -
1004 -EAPI=5
1005 -
1006 -PYTHON_COMPAT=( python2_7 )
1007 -PYTHON_REQ_USE='ncurses,xml,threads'
1008 -
1009 -inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
1010 -
1011 -MY_PV=${PV/_/-}
1012 -MAJOR_V="$(get_version_component_range 1-2)"
1013 -
1014 -if [[ $PV == *9999 ]]; then
1015 - inherit git-r3
1016 - KEYWORDS=""
1017 - REPO="xen.git"
1018 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
1019 - S="${WORKDIR}/${REPO}"
1020 -else
1021 - KEYWORDS="~amd64 ~arm ~arm64 -x86"
1022 - UPSTREAM_VER=0
1023 - SECURITY_VER=7
1024 - SEC_VER=1
1025 - # xen-tools's gentoo patches tarball
1026 - GENTOO_VER=4
1027 - # xen-tools's gentoo patches version which apply to this specific ebuild
1028 - GENTOO_GPV=0
1029 - # xen-tools ovmf's patches
1030 - OVMF_VER=1
1031 -
1032 - SEABIOS_VER=1.8.2
1033 - OVMF_PV=20150629
1034 -
1035 - [[ -n ${UPSTREAM_VER} ]] && \
1036 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
1037 - [[ -n ${SECURITY_VER} ]] && \
1038 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
1039 - [[ -n ${GENTOO_VER} ]] && \
1040 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
1041 - [[ -n ${OVMF_VER} ]] && \
1042 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
1043 -
1044 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
1045 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
1046 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
1047 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
1048 - ${OVMF_PATCHSET_URI} )
1049 - ${UPSTREAM_PATCHSET_URI}
1050 - ${SECURITY_PATCHSET_URI}
1051 - ${GENTOO_PATCHSET_URI}
1052 - https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-${SEC_VER}.tar.gz"
1053 -
1054 - S="${WORKDIR}/xen-${MY_PV}"
1055 -fi
1056 -
1057 -DESCRIPTION="Xen tools including QEMU and xl"
1058 -HOMEPAGE="http://xen.org/"
1059 -DOCS=( README docs/README.xen-bugtool )
1060 -
1061 -LICENSE="GPL-2"
1062 -SLOT="0/${MAJOR_V}"
1063 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
1064 -# >=dev-lang/ocaml-4 stable
1065 -# Masked in profiles/eapi-5-files instead
1066 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
1067 -
1068 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
1069 - ${PYTHON_REQUIRED_USE}
1070 - pygrub? ( python )
1071 - ovmf? ( hvm )
1072 - qemu? ( !system-qemu )"
1073 -
1074 -COMMON_DEPEND="
1075 - dev-libs/lzo:2
1076 - dev-libs/glib:2
1077 - dev-libs/yajl
1078 - dev-libs/libaio
1079 - dev-libs/libgcrypt:0
1080 - sys-libs/zlib
1081 -"
1082 -
1083 -DEPEND="${COMMON_DEPEND}
1084 - dev-python/lxml[${PYTHON_USEDEP}]
1085 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
1086 - ${PYTHON_DEPS}
1087 - api? ( dev-libs/libxml2
1088 - net-misc/curl )
1089 - ovmf? ( $(python_gen_impl_dep sqlite) )
1090 - !amd64? ( >=sys-apps/dtc-1.4.0 )
1091 - amd64? ( sys-devel/bin86
1092 - system-seabios? ( sys-firmware/seabios )
1093 - sys-firmware/ipxe
1094 - sys-devel/dev86
1095 - sys-power/iasl )
1096 - dev-lang/perl
1097 - app-misc/pax-utils
1098 - doc? (
1099 - app-doc/doxygen
1100 - dev-python/markdown[${PYTHON_USEDEP}]
1101 - dev-tex/latex2html[png,gif]
1102 - media-gfx/graphviz
1103 - dev-tex/xcolor
1104 - media-gfx/transfig
1105 - dev-texlive/texlive-latexextra
1106 - virtual/latex-base
1107 - dev-tex/latexmk
1108 - dev-texlive/texlive-latex
1109 - dev-texlive/texlive-pictures
1110 - dev-texlive/texlive-latexrecommended
1111 - )
1112 - hvm? ( x11-proto/xproto
1113 - !net-libs/libiscsi )
1114 - qemu? (
1115 - x11-libs/pixman
1116 - sdl? ( media-libs/libsdl[X] )
1117 - )
1118 - system-qemu? ( app-emulation/qemu[xen] )
1119 - ocaml? ( dev-ml/findlib
1120 - >=dev-lang/ocaml-4 )"
1121 -
1122 -RDEPEND="${COMMON_DEPEND}
1123 - sys-apps/iproute2[-minimal]
1124 - net-misc/bridge-utils
1125 - screen? (
1126 - app-misc/screen
1127 - app-admin/logrotate
1128 - )"
1129 -
1130 -# hvmloader is used to bootstrap a fully virtualized kernel
1131 -# Approved by QA team in bug #144032
1132 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
1133 - usr/share/qemu-xen/qemu/s390-ccw.img"
1134 -
1135 -RESTRICT="test"
1136 -
1137 -pkg_setup() {
1138 - python-single-r1_pkg_setup
1139 - export "CONFIG_LOMOUNT=y"
1140 -
1141 - #bug 522642, disable compile tools/tests
1142 - export "CONFIG_TESTS=n"
1143 -
1144 - if has_version dev-libs/libgcrypt:0; then
1145 - export "CONFIG_GCRYPT=y"
1146 - fi
1147 -
1148 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
1149 - if use x86 && use amd64; then
1150 - die "Confusion! Both x86 and amd64 are set in your use flags!"
1151 - elif use x86; then
1152 - export XEN_TARGET_ARCH="x86_32"
1153 - elif use amd64 ; then
1154 - export XEN_TARGET_ARCH="x86_64"
1155 - elif use arm; then
1156 - export XEN_TARGET_ARCH="arm32"
1157 - elif use arm64; then
1158 - export XEN_TARGET_ARCH="arm64"
1159 - else
1160 - die "Unsupported architecture!"
1161 - fi
1162 - fi
1163 -}
1164 -
1165 -src_prepare() {
1166 - # Upstream's patchset
1167 - if [[ -n ${UPSTREAM_VER} ]]; then
1168 - einfo "Try to apply Xen Upstream patch set"
1169 - EPATCH_SUFFIX="patch" \
1170 - EPATCH_FORCE="yes" \
1171 - EPATCH_OPTS="-p1" \
1172 - epatch "${WORKDIR}"/patches-upstream
1173 - fi
1174 -
1175 - # Security patchset
1176 - if [[ -n ${SECURITY_VER} ]]; then
1177 - einfo "Try to apply Xen Security patch set"
1178 - source "${WORKDIR}"/patches-security/${PV}.conf
1179 - # apply main xen patches
1180 - # In contrast to xen-4.5.2-r2.ebuild, these are moved into the dir structure
1181 - # prepared and deposited by dlan in his devspace
1182 - mv "${WORKDIR}"/{xsa15[6-9].patch,xsa160-4.6.patch} \
1183 - "${WORKDIR}"/patches-security/xen || die
1184 - XEN_SECURITY_MAIN="${XEN_SECURITY_MAIN} xsa15[6-9].patch xsa160-4.6.patch"
1185 - for i in ${XEN_SECURITY_MAIN}; do
1186 - EPATCH_SUFFIX="patch" \
1187 - EPATCH_FORCE="yes" \
1188 - epatch "${WORKDIR}"/patches-security/xen/$i
1189 - done
1190 -
1191 - # apply qemu-traditional patches
1192 - mv "${WORKDIR}"/xsa162-qemut.patch \
1193 - "${WORKDIR}"/patches-security/qemut/ || die
1194 - XEN_SECURITY_QEMUT="xsa162-qemut.patch"
1195 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
1196 - for i in ${XEN_SECURITY_QEMUT}; do
1197 - EPATCH_SUFFIX="patch" \
1198 - EPATCH_FORCE="yes" \
1199 - epatch "${WORKDIR}"/patches-security/qemut/$i
1200 - done
1201 - popd > /dev/null
1202 -
1203 - # apply qemu-xen/upstream patches
1204 - mv "${WORKDIR}"/xsa162-qemuu.patch \
1205 - "${WORKDIR}"/patches-security/qemuu/ || die
1206 - XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
1207 - pushd "${S}"/tools/qemu-xen/ > /dev/null
1208 - for i in ${XEN_SECURITY_QEMUU}; do
1209 - EPATCH_SUFFIX="patch" \
1210 - EPATCH_FORCE="yes" \
1211 - epatch "${WORKDIR}"/patches-security/qemuu/$i
1212 - done
1213 - popd > /dev/null
1214 - fi
1215 -
1216 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
1217 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
1218 - pushd tools/firmware/ > /dev/null
1219 - ln -s seabios-dir-remote seabios-dir || die
1220 - popd > /dev/null
1221 -
1222 - # Gentoo's patchset
1223 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
1224 - einfo "Try to apply Gentoo specific patch set"
1225 - source "${FILESDIR}"/gentoo-patches.conf
1226 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
1227 - for i in ${!_gpv}; do
1228 - EPATCH_SUFFIX="patch" \
1229 - EPATCH_FORCE="yes" \
1230 - epatch "${WORKDIR}"/patches-gentoo/$i
1231 - done
1232 - fi
1233 -
1234 - # Ovmf's patchset
1235 - if [[ -n ${OVMF_VER} ]] && use ovmf; then
1236 - einfo "Try to apply Ovmf patch set"
1237 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
1238 - EPATCH_SUFFIX="patch" \
1239 - EPATCH_FORCE="yes" \
1240 - EPATCH_OPTS="-p1" \
1241 - epatch "${WORKDIR}"/patches-ovmf
1242 - popd > /dev/null
1243 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
1244 - fi
1245 -
1246 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
1247 -
1248 - # Fix texi2html build error with new texi2html, qemu.doc.html
1249 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
1250 -
1251 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
1252 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
1253 - -i tools/firmware/Makefile || die
1254 -
1255 - # Drop .config, fixes to gcc-4.6
1256 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
1257 -
1258 - # if the user *really* wants to use their own custom-cflags, let them
1259 - if use custom-cflags; then
1260 - einfo "User wants their own CFLAGS - removing defaults"
1261 -
1262 - # try and remove all the default cflags
1263 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
1264 - -exec sed \
1265 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
1266 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
1267 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
1268 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
1269 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
1270 - -i {} + || die "failed to re-set custom-cflags"
1271 - else
1272 - unset CFLAGS
1273 - unset LDFLAGS
1274 - unset ASFLAGS
1275 - unset CPPFLAGS
1276 - fi
1277 -
1278 - if ! use pygrub; then
1279 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
1280 - fi
1281 -
1282 - if ! use python; then
1283 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
1284 - fi
1285 -
1286 - if ! use hvm; then
1287 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
1288 - # Bug 351648
1289 - elif ! use x86 && ! has x86 $(get_all_abis); then
1290 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
1291 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
1292 - export CPATH="${WORKDIR}"/extra-headers
1293 - fi
1294 -
1295 - if use qemu; then
1296 - if use sdl; then
1297 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
1298 - tools/Makefile || die
1299 - else
1300 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
1301 - tools/qemu-xen-traditional/xen-setup || die
1302 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
1303 - tools/Makefile || die
1304 - fi
1305 - else
1306 - # Don't bother with qemu, only needed for fully virtualised guests
1307 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
1308 - fi
1309 -
1310 - # Reset bash completion dir; Bug 472438
1311 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
1312 - -i Config.mk || die
1313 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
1314 -
1315 - # xencommons, Bug #492332, sed lighter weight than patching
1316 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
1317 - -i tools/hotplug/Linux/init.d/xencommons.in || die
1318 -
1319 - # respect multilib, usr/lib/libcacard.so.0.0.0
1320 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
1321 - -i tools/qemu-xen/configure || die
1322 -
1323 - #bug 518136, don't build 32bit exactuable for nomultilib profile
1324 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
1325 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
1326 - fi
1327 -
1328 - # use /var instead of /var/lib, consistat with previous ebuild
1329 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
1330 - m4/paths.m4 configure tools/configure || die
1331 - # use /run instead of /var/run
1332 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
1333 - m4/paths.m4 configure tools/configure || die
1334 -
1335 - # uncomment lines in xl.conf
1336 - sed -e 's:^#autoballoon=:autoballoon=:' \
1337 - -e 's:^#lockfile=:lockfile=:' \
1338 - -e 's:^#vif.default.script=:vif.default.script=:' \
1339 - -i tools/examples/xl.conf || die
1340 -
1341 - epatch_user
1342 -}
1343 -
1344 -src_configure() {
1345 - local myconf="--prefix=${PREFIX}/usr \
1346 - --libdir=${PREFIX}/usr/$(get_libdir) \
1347 - --libexecdir=${PREFIX}/usr/libexec \
1348 - --disable-werror \
1349 - --disable-xen \
1350 - --enable-tools \
1351 - --enable-docs \
1352 - $(use_with system-qemu) \
1353 - $(use_enable pam) \
1354 - $(use_enable api xenapi) \
1355 - $(use_enable ovmf) \
1356 - $(use_enable ocaml ocamltools) \
1357 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
1358 - "
1359 -
1360 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
1361 - use qemu || myconf+=" --with-system-qemu"
1362 - use amd64 && myconf+=" --enable-qemu-traditional"
1363 - econf ${myconf}
1364 -}
1365 -
1366 -src_compile() {
1367 - export VARTEXFONTS="${T}/fonts"
1368 - local myopt
1369 - use debug && myopt="${myopt} debug=y"
1370 -
1371 - if test-flag-CC -fno-strict-overflow; then
1372 - append-flags -fno-strict-overflow
1373 - fi
1374 -
1375 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
1376 -
1377 - use doc && emake -C docs txt html
1378 - emake -C docs man-pages
1379 -}
1380 -
1381 -src_install() {
1382 - # Override auto-detection in the build system, bug #382573
1383 - export INITD_DIR=/tmp/init.d
1384 - export CONFIG_LEAF_DIR=../tmp/default
1385 -
1386 - # Let the build system compile installed Python modules.
1387 - local PYTHONDONTWRITEBYTECODE
1388 - export PYTHONDONTWRITEBYTECODE
1389 -
1390 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
1391 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
1392 -
1393 - # Fix the remaining Python shebangs.
1394 - python_fix_shebang "${D}"
1395 -
1396 - # Remove RedHat-specific stuff
1397 - rm -rf "${D}"tmp || die
1398 -
1399 - if use doc; then
1400 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
1401 -
1402 - dohtml -r docs/
1403 - docinto pdf
1404 - dodoc ${DOCS[@]}
1405 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
1406 - fi
1407 -
1408 - rm -rf "${D}"/usr/share/doc/xen/
1409 - doman docs/man?/*
1410 -
1411 - newconfd "${FILESDIR}"/xendomains.confd xendomains
1412 - newconfd "${FILESDIR}"/xenstored.confd xenstored
1413 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
1414 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
1415 - newinitd "${FILESDIR}"/xenstored.initd xenstored
1416 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
1417 - newinitd "${FILESDIR}"/xencommons.initd xencommons
1418 - newconfd "${FILESDIR}"/xencommons.confd xencommons
1419 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
1420 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
1421 -
1422 - if use screen; then
1423 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
1424 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
1425 - keepdir /var/log/xen-consoles
1426 - fi
1427 -
1428 - # For -static-libs wrt Bug 384355
1429 - if ! use static-libs; then
1430 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
1431 - fi
1432 -
1433 - # for xendomains
1434 - keepdir /etc/xen/auto
1435 -
1436 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
1437 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
1438 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
1439 -}
1440 -
1441 -pkg_postinst() {
1442 - elog "Official Xen Guide and the offical wiki page:"
1443 - elog "https://wiki.gentoo.org/wiki/Xen"
1444 - elog "http://wiki.xen.org/wiki/Main_Page"
1445 - elog ""
1446 - elog "Recommended to utilise the xencommons script to config sytem At boot"
1447 - elog "Add by use of rc-update on completion of the install"
1448 -
1449 - if ! use hvm; then
1450 - echo
1451 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
1452 - elog "support enable the hvm use flag."
1453 - elog "An x86 or amd64 system is required to build HVM support."
1454 - fi
1455 -
1456 - if use qemu; then
1457 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
1458 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
1459 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
1460 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
1461 - fi
1462 -}
1463
1464 diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
1465 deleted file mode 100644
1466 index 3481cb6..0000000
1467 --- a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
1468 +++ /dev/null
1469 @@ -1,465 +0,0 @@
1470 -# Copyright 1999-2016 Gentoo Foundation
1471 -# Distributed under the terms of the GNU General Public License v2
1472 -# $Id$
1473 -
1474 -EAPI=5
1475 -
1476 -PYTHON_COMPAT=( python2_7 )
1477 -PYTHON_REQ_USE='ncurses,xml,threads'
1478 -
1479 -inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
1480 -
1481 -MY_PV=${PV/_/-}
1482 -MAJOR_V="$(get_version_component_range 1-2)"
1483 -
1484 -if [[ $PV == *9999 ]]; then
1485 - inherit git-r3
1486 - KEYWORDS=""
1487 - REPO="xen.git"
1488 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
1489 - S="${WORKDIR}/${REPO}"
1490 -else
1491 - KEYWORDS="amd64 ~arm ~arm64 x86"
1492 - UPSTREAM_VER=0
1493 - SECURITY_VER=7
1494 - # vars set to reflect https://dev.gentoo.org/~idella4/
1495 - SEC_VER=3
1496 - QEMU_VER=0
1497 - # xen-tools's gentoo patches tarball
1498 - GENTOO_VER=4
1499 - # xen-tools's gentoo patches version which apply to this specific ebuild
1500 - GENTOO_GPV=0
1501 - # xen-tools ovmf's patches
1502 - OVMF_VER=1
1503 -
1504 - SEABIOS_VER=1.8.2
1505 - OVMF_PV=20150629
1506 -
1507 - [[ -n ${UPSTREAM_VER} ]] && \
1508 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
1509 - [[ -n ${SECURITY_VER} ]] && \
1510 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
1511 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
1512 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
1513 - [[ -n ${GENTOO_VER} ]] && \
1514 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
1515 - [[ -n ${OVMF_VER} ]] && \
1516 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
1517 -
1518 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
1519 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
1520 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
1521 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
1522 - ${OVMF_PATCHSET_URI} )
1523 - ${UPSTREAM_PATCHSET_URI}
1524 - ${SECURITY_PATCHSET_URI}
1525 - ${GENTOO_PATCHSET_URI}"
1526 -
1527 - S="${WORKDIR}/xen-${MY_PV}"
1528 -fi
1529 -
1530 -DESCRIPTION="Xen tools including QEMU and xl"
1531 -HOMEPAGE="http://xen.org/"
1532 -DOCS=( README docs/README.xen-bugtool )
1533 -
1534 -LICENSE="GPL-2"
1535 -SLOT="0/${MAJOR_V}"
1536 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
1537 -# >=dev-lang/ocaml-4 stable
1538 -# Masked in profiles/eapi-5-files instead
1539 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
1540 -
1541 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
1542 - ${PYTHON_REQUIRED_USE}
1543 - pygrub? ( python )
1544 - ovmf? ( hvm )
1545 - qemu? ( !system-qemu )"
1546 -
1547 -COMMON_DEPEND="
1548 - dev-libs/lzo:2
1549 - dev-libs/glib:2
1550 - dev-libs/yajl
1551 - dev-libs/libaio
1552 - dev-libs/libgcrypt:0
1553 - sys-libs/zlib
1554 -"
1555 -
1556 -DEPEND="${COMMON_DEPEND}
1557 - dev-python/lxml[${PYTHON_USEDEP}]
1558 - x86? ( sys-devel/dev86
1559 - sys-power/iasl )
1560 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
1561 - ${PYTHON_DEPS}
1562 - api? ( dev-libs/libxml2
1563 - net-misc/curl )
1564 - ovmf? ( $(python_gen_impl_dep sqlite) )
1565 - !amd64? ( >=sys-apps/dtc-1.4.0 )
1566 - amd64? ( sys-devel/bin86
1567 - system-seabios? ( sys-firmware/seabios )
1568 - sys-firmware/ipxe
1569 - sys-devel/dev86
1570 - sys-power/iasl )
1571 - dev-lang/perl
1572 - app-misc/pax-utils
1573 - doc? (
1574 - app-doc/doxygen
1575 - dev-python/markdown[${PYTHON_USEDEP}]
1576 - dev-tex/latex2html[png,gif]
1577 - media-gfx/graphviz
1578 - dev-tex/xcolor
1579 - media-gfx/transfig
1580 - dev-texlive/texlive-latexextra
1581 - virtual/latex-base
1582 - dev-tex/latexmk
1583 - dev-texlive/texlive-latex
1584 - dev-texlive/texlive-pictures
1585 - dev-texlive/texlive-latexrecommended
1586 - )
1587 - hvm? ( x11-proto/xproto
1588 - !net-libs/libiscsi )
1589 - qemu? (
1590 - x11-libs/pixman
1591 - sdl? ( media-libs/libsdl[X] )
1592 - )
1593 - system-qemu? ( app-emulation/qemu[xen] )
1594 - ocaml? ( dev-ml/findlib
1595 - >=dev-lang/ocaml-4 )"
1596 -
1597 -RDEPEND="${COMMON_DEPEND}
1598 - sys-apps/iproute2[-minimal]
1599 - net-misc/bridge-utils
1600 - screen? (
1601 - app-misc/screen
1602 - app-admin/logrotate
1603 - )"
1604 -
1605 -# hvmloader is used to bootstrap a fully virtualized kernel
1606 -# Approved by QA team in bug #144032
1607 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
1608 - usr/share/qemu-xen/qemu/s390-ccw.img"
1609 -
1610 -RESTRICT="test"
1611 -
1612 -pkg_setup() {
1613 - python-single-r1_pkg_setup
1614 - export "CONFIG_LOMOUNT=y"
1615 -
1616 - #bug 522642, disable compile tools/tests
1617 - export "CONFIG_TESTS=n"
1618 -
1619 - if has_version dev-libs/libgcrypt:0; then
1620 - export "CONFIG_GCRYPT=y"
1621 - fi
1622 -
1623 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
1624 - if use x86 && use amd64; then
1625 - die "Confusion! Both x86 and amd64 are set in your use flags!"
1626 - elif use x86; then
1627 - export XEN_TARGET_ARCH="x86_32"
1628 - elif use amd64 ; then
1629 - export XEN_TARGET_ARCH="x86_64"
1630 - elif use arm; then
1631 - export XEN_TARGET_ARCH="arm32"
1632 - elif use arm64; then
1633 - export XEN_TARGET_ARCH="arm64"
1634 - else
1635 - die "Unsupported architecture!"
1636 - fi
1637 - fi
1638 -}
1639 -
1640 -src_prepare() {
1641 - # Upstream's patchset
1642 - if [[ -n ${UPSTREAM_VER} ]]; then
1643 - einfo "Try to apply Xen Upstream patch set"
1644 - EPATCH_SUFFIX="patch" \
1645 - EPATCH_FORCE="yes" \
1646 - EPATCH_OPTS="-p1" \
1647 - epatch "${WORKDIR}"/patches-upstream
1648 - fi
1649 -
1650 - # Security patchset
1651 - if [[ -n ${SECURITY_VER} ]]; then
1652 - einfo "Try to apply Xen Security patch set"
1653 - source "${WORKDIR}"/patches-security/${PV}.conf
1654 - # apply main xen patches
1655 - # Two parallel systems, both work side by side
1656 - # Over time they may concdense into one. This will suffice for now
1657 - EPATCH_SUFFIX="patch"
1658 - EPATCH_FORCE="yes"
1659 - for i in ${XEN_SECURITY_MAIN}; do
1660 - epatch "${WORKDIR}"/patches-security/xen/$i
1661 - done
1662 -
1663 - for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
1664 - epatch $i
1665 - done
1666 -
1667 - # apply qemu-traditional patches
1668 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
1669 - for i in ${XEN_SECURITY_QEMUT}; do
1670 - epatch "${WORKDIR}"/patches-security/qemut/$i
1671 - done
1672 - for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
1673 - epatch $i
1674 - done
1675 - popd > /dev/null
1676 -
1677 - # apply qemu-xen/upstream patches
1678 - pushd "${S}"/tools/qemu-xen/ > /dev/null
1679 - for i in ${XEN_SECURITY_QEMUU}; do
1680 - epatch "${WORKDIR}"/patches-security/qemuu/$i
1681 - done
1682 - for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
1683 - epatch $i
1684 - done
1685 - popd > /dev/null
1686 - fi
1687 -
1688 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
1689 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
1690 - pushd tools/firmware/ > /dev/null
1691 - ln -s seabios-dir-remote seabios-dir || die
1692 - popd > /dev/null
1693 -
1694 - # Gentoo's patchset
1695 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
1696 - einfo "Try to apply Gentoo specific patch set"
1697 - source "${FILESDIR}"/gentoo-patches.conf
1698 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
1699 - for i in ${!_gpv}; do
1700 - EPATCH_SUFFIX="patch" \
1701 - EPATCH_FORCE="yes" \
1702 - epatch "${WORKDIR}"/patches-gentoo/$i
1703 - done
1704 - fi
1705 -
1706 - # Ovmf's patchset
1707 - if [[ -n ${OVMF_VER} ]] && use ovmf; then
1708 - einfo "Try to apply Ovmf patch set"
1709 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
1710 - EPATCH_SUFFIX="patch" \
1711 - EPATCH_FORCE="yes" \
1712 - EPATCH_OPTS="-p1" \
1713 - epatch "${WORKDIR}"/patches-ovmf
1714 - popd > /dev/null
1715 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
1716 - fi
1717 -
1718 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
1719 -
1720 - # Fix texi2html build error with new texi2html, qemu.doc.html
1721 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
1722 -
1723 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
1724 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
1725 - -i tools/firmware/Makefile || die
1726 -
1727 - # Drop .config, fixes to gcc-4.6
1728 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
1729 -
1730 - # if the user *really* wants to use their own custom-cflags, let them
1731 - if use custom-cflags; then
1732 - einfo "User wants their own CFLAGS - removing defaults"
1733 -
1734 - # try and remove all the default cflags
1735 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
1736 - -exec sed \
1737 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
1738 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
1739 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
1740 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
1741 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
1742 - -i {} + || die "failed to re-set custom-cflags"
1743 - else
1744 - unset CFLAGS
1745 - unset LDFLAGS
1746 - unset ASFLAGS
1747 - unset CPPFLAGS
1748 - fi
1749 -
1750 - if ! use pygrub; then
1751 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
1752 - fi
1753 -
1754 - if ! use python; then
1755 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
1756 - fi
1757 -
1758 - if ! use hvm; then
1759 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
1760 - # Bug 351648
1761 - elif ! use x86 && ! has x86 $(get_all_abis); then
1762 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
1763 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
1764 - export CPATH="${WORKDIR}"/extra-headers
1765 - fi
1766 -
1767 - if use qemu; then
1768 - if use sdl; then
1769 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
1770 - tools/Makefile || die
1771 - else
1772 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
1773 - tools/qemu-xen-traditional/xen-setup || die
1774 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
1775 - tools/Makefile || die
1776 - fi
1777 - else
1778 - # Don't bother with qemu, only needed for fully virtualised guests
1779 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
1780 - fi
1781 -
1782 - # Reset bash completion dir; Bug 472438
1783 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
1784 - -i Config.mk || die
1785 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
1786 -
1787 - # xencommons, Bug #492332, sed lighter weight than patching
1788 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
1789 - -i tools/hotplug/Linux/init.d/xencommons.in || die
1790 -
1791 - # respect multilib, usr/lib/libcacard.so.0.0.0
1792 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
1793 - -i tools/qemu-xen/configure || die
1794 -
1795 - #bug 518136, don't build 32bit exactuable for nomultilib profile
1796 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
1797 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
1798 - fi
1799 -
1800 - # use /var instead of /var/lib, consistat with previous ebuild
1801 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
1802 - m4/paths.m4 configure tools/configure || die
1803 - # use /run instead of /var/run
1804 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
1805 - m4/paths.m4 configure tools/configure || die
1806 -
1807 - # uncomment lines in xl.conf
1808 - sed -e 's:^#autoballoon=:autoballoon=:' \
1809 - -e 's:^#lockfile=:lockfile=:' \
1810 - -e 's:^#vif.default.script=:vif.default.script=:' \
1811 - -i tools/examples/xl.conf || die
1812 -
1813 - epatch_user
1814 -}
1815 -
1816 -src_configure() {
1817 - local myconf="--prefix=${PREFIX}/usr \
1818 - --libdir=${PREFIX}/usr/$(get_libdir) \
1819 - --libexecdir=${PREFIX}/usr/libexec \
1820 - --disable-werror \
1821 - --disable-xen \
1822 - --enable-tools \
1823 - --enable-docs \
1824 - $(use_with system-qemu) \
1825 - $(use_enable pam) \
1826 - $(use_enable api xenapi) \
1827 - $(use_enable ovmf) \
1828 - $(use_enable ocaml ocamltools) \
1829 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
1830 - "
1831 -
1832 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
1833 - use qemu || myconf+=" --with-system-qemu"
1834 - use amd64 && myconf+=" --enable-qemu-traditional"
1835 - econf ${myconf}
1836 -}
1837 -
1838 -src_compile() {
1839 - export VARTEXFONTS="${T}/fonts"
1840 - local myopt
1841 - use debug && myopt="${myopt} debug=y"
1842 -
1843 - if test-flag-CC -fno-strict-overflow; then
1844 - append-flags -fno-strict-overflow
1845 - fi
1846 -
1847 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
1848 -
1849 - use doc && emake -C docs txt html
1850 - emake -C docs man-pages
1851 -}
1852 -
1853 -src_install() {
1854 - # Override auto-detection in the build system, bug #382573
1855 - export INITD_DIR=/tmp/init.d
1856 - export CONFIG_LEAF_DIR=../tmp/default
1857 -
1858 - # Let the build system compile installed Python modules.
1859 - local PYTHONDONTWRITEBYTECODE
1860 - export PYTHONDONTWRITEBYTECODE
1861 -
1862 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
1863 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
1864 -
1865 - # Fix the remaining Python shebangs.
1866 - python_fix_shebang "${D}"
1867 -
1868 - # Remove RedHat-specific stuff
1869 - rm -rf "${D}"tmp || die
1870 -
1871 - if use doc; then
1872 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
1873 -
1874 - dohtml -r docs/
1875 - docinto pdf
1876 - dodoc ${DOCS[@]}
1877 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
1878 - fi
1879 -
1880 - rm -rf "${D}"/usr/share/doc/xen/
1881 - doman docs/man?/*
1882 -
1883 - newconfd "${FILESDIR}"/xendomains.confd xendomains
1884 - newconfd "${FILESDIR}"/xenstored.confd xenstored
1885 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
1886 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
1887 - newinitd "${FILESDIR}"/xenstored.initd xenstored
1888 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
1889 - newinitd "${FILESDIR}"/xencommons.initd xencommons
1890 - newconfd "${FILESDIR}"/xencommons.confd xencommons
1891 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
1892 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
1893 -
1894 - if use screen; then
1895 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
1896 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
1897 - keepdir /var/log/xen-consoles
1898 - fi
1899 -
1900 - # For -static-libs wrt Bug 384355
1901 - if ! use static-libs; then
1902 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
1903 - fi
1904 -
1905 - # for xendomains
1906 - keepdir /etc/xen/auto
1907 -
1908 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
1909 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
1910 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
1911 -}
1912 -
1913 -pkg_postinst() {
1914 - elog "Official Xen Guide and the offical wiki page:"
1915 - elog "https://wiki.gentoo.org/wiki/Xen"
1916 - elog "http://wiki.xen.org/wiki/Main_Page"
1917 - elog ""
1918 - elog "Recommended to utilise the xencommons script to config sytem At boot"
1919 - elog "Add by use of rc-update on completion of the install"
1920 -
1921 - if ! use hvm; then
1922 - echo
1923 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
1924 - elog "support enable the hvm use flag."
1925 - elog "An x86 or amd64 system is required to build HVM support."
1926 - fi
1927 -
1928 - if use qemu; then
1929 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
1930 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
1931 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
1932 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
1933 - fi
1934 -}
1935
1936 diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r6.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r6.ebuild
1937 deleted file mode 100644
1938 index b0c8b5f..0000000
1939 --- a/app-emulation/xen-tools/xen-tools-4.6.0-r6.ebuild
1940 +++ /dev/null
1941 @@ -1,469 +0,0 @@
1942 -# Copyright 1999-2016 Gentoo Foundation
1943 -# Distributed under the terms of the GNU General Public License v2
1944 -# $Id$
1945 -
1946 -EAPI=5
1947 -
1948 -PYTHON_COMPAT=( python2_7 )
1949 -PYTHON_REQ_USE='ncurses,xml,threads'
1950 -
1951 -inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
1952 -
1953 -MY_PV=${PV/_/-}
1954 -MAJOR_V="$(get_version_component_range 1-2)"
1955 -
1956 -if [[ $PV == *9999 ]]; then
1957 - inherit git-r3
1958 - KEYWORDS=""
1959 - REPO="xen.git"
1960 - EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
1961 - S="${WORKDIR}/${REPO}"
1962 -else
1963 - KEYWORDS="~amd64 ~arm ~arm64 ~x86"
1964 - UPSTREAM_VER=0
1965 - SECURITY_VER=7
1966 - # vars set to reflect https://dev.gentoo.org/~idella4/
1967 - # first instance of UPS_VER (usptream ver)
1968 - UPS_VER=0
1969 - SEC_VER=3
1970 - QEMU_VER=0
1971 - # xen-tools's gentoo patches tarball
1972 - GENTOO_VER=4
1973 - # xen-tools's gentoo patches version which apply to this specific ebuild
1974 - GENTOO_GPV=0
1975 - # xen-tools ovmf's patches
1976 - OVMF_VER=1
1977 -
1978 - SEABIOS_VER=1.8.2
1979 - OVMF_PV=20150629
1980 -
1981 - [[ -n ${UPSTREAM_VER} ]] && \
1982 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
1983 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
1984 - [[ -n ${SECURITY_VER} ]] && \
1985 - SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
1986 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
1987 - https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
1988 - [[ -n ${GENTOO_VER} ]] && \
1989 - GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
1990 - [[ -n ${OVMF_VER} ]] && \
1991 - OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
1992 -
1993 - SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
1994 - http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
1995 - https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
1996 - ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
1997 - ${OVMF_PATCHSET_URI} )
1998 - ${UPSTREAM_PATCHSET_URI}
1999 - ${SECURITY_PATCHSET_URI}
2000 - ${GENTOO_PATCHSET_URI}"
2001 -
2002 - S="${WORKDIR}/xen-${MY_PV}"
2003 -fi
2004 -
2005 -DESCRIPTION="Xen tools including QEMU and xl"
2006 -HOMEPAGE="http://xen.org/"
2007 -DOCS=( README docs/README.xen-bugtool )
2008 -
2009 -LICENSE="GPL-2"
2010 -SLOT="0/${MAJOR_V}"
2011 -# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
2012 -# >=dev-lang/ocaml-4 stable
2013 -# Masked in profiles/eapi-5-files instead
2014 -IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
2015 -
2016 -REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
2017 - ${PYTHON_REQUIRED_USE}
2018 - pygrub? ( python )
2019 - ovmf? ( hvm )
2020 - qemu? ( !system-qemu )"
2021 -
2022 -COMMON_DEPEND="
2023 - dev-libs/lzo:2
2024 - dev-libs/glib:2
2025 - dev-libs/yajl
2026 - dev-libs/libaio
2027 - dev-libs/libgcrypt:0
2028 - sys-libs/zlib
2029 -"
2030 -
2031 -DEPEND="${COMMON_DEPEND}
2032 - dev-python/lxml[${PYTHON_USEDEP}]
2033 - x86? ( sys-devel/dev86
2034 - sys-power/iasl )
2035 - pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
2036 - ${PYTHON_DEPS}
2037 - api? ( dev-libs/libxml2
2038 - net-misc/curl )
2039 - ovmf? ( $(python_gen_impl_dep sqlite) )
2040 - !amd64? ( >=sys-apps/dtc-1.4.0 )
2041 - amd64? ( sys-devel/bin86
2042 - system-seabios? ( sys-firmware/seabios )
2043 - sys-firmware/ipxe
2044 - sys-devel/dev86
2045 - sys-power/iasl )
2046 - dev-lang/perl
2047 - app-misc/pax-utils
2048 - doc? (
2049 - app-doc/doxygen
2050 - dev-python/markdown[${PYTHON_USEDEP}]
2051 - dev-tex/latex2html[png,gif]
2052 - media-gfx/graphviz
2053 - dev-tex/xcolor
2054 - media-gfx/transfig
2055 - dev-texlive/texlive-latexextra
2056 - virtual/latex-base
2057 - dev-tex/latexmk
2058 - dev-texlive/texlive-latex
2059 - dev-texlive/texlive-pictures
2060 - dev-texlive/texlive-latexrecommended
2061 - )
2062 - hvm? ( x11-proto/xproto
2063 - !net-libs/libiscsi )
2064 - qemu? (
2065 - x11-libs/pixman
2066 - sdl? ( media-libs/libsdl[X] )
2067 - )
2068 - system-qemu? ( app-emulation/qemu[xen] )
2069 - ocaml? ( dev-ml/findlib
2070 - >=dev-lang/ocaml-4 )"
2071 -
2072 -RDEPEND="${COMMON_DEPEND}
2073 - sys-apps/iproute2[-minimal]
2074 - net-misc/bridge-utils
2075 - screen? (
2076 - app-misc/screen
2077 - app-admin/logrotate
2078 - )"
2079 -
2080 -# hvmloader is used to bootstrap a fully virtualized kernel
2081 -# Approved by QA team in bug #144032
2082 -QA_WX_LOAD="usr/lib/xen/boot/hvmloader
2083 - usr/share/qemu-xen/qemu/s390-ccw.img"
2084 -
2085 -RESTRICT="test"
2086 -
2087 -pkg_setup() {
2088 - python-single-r1_pkg_setup
2089 - export "CONFIG_LOMOUNT=y"
2090 -
2091 - #bug 522642, disable compile tools/tests
2092 - export "CONFIG_TESTS=n"
2093 -
2094 - if has_version dev-libs/libgcrypt:0; then
2095 - export "CONFIG_GCRYPT=y"
2096 - fi
2097 -
2098 - if [[ -z ${XEN_TARGET_ARCH} ]] ; then
2099 - if use x86 && use amd64; then
2100 - die "Confusion! Both x86 and amd64 are set in your use flags!"
2101 - elif use x86; then
2102 - export XEN_TARGET_ARCH="x86_32"
2103 - elif use amd64 ; then
2104 - export XEN_TARGET_ARCH="x86_64"
2105 - elif use arm; then
2106 - export XEN_TARGET_ARCH="arm32"
2107 - elif use arm64; then
2108 - export XEN_TARGET_ARCH="arm64"
2109 - else
2110 - die "Unsupported architecture!"
2111 - fi
2112 - fi
2113 -}
2114 -
2115 -src_prepare() {
2116 - # Upstream's patchset
2117 - if [[ -n ${UPSTREAM_VER} ]]; then
2118 - einfo "Try to apply Xen Upstream patch set"
2119 - EPATCH_SUFFIX="patch" \
2120 - EPATCH_FORCE="yes" \
2121 - EPATCH_OPTS="-p1" \
2122 - epatch "${WORKDIR}"/patches-upstream \
2123 - "${WORKDIR}"/libexec.patch
2124 - fi
2125 -
2126 - # Security patchset
2127 - if [[ -n ${SECURITY_VER} ]]; then
2128 - einfo "Try to apply Xen Security patch set"
2129 - source "${WORKDIR}"/patches-security/${PV}.conf
2130 - # apply main xen patches
2131 - # Two parallel systems, both work side by side
2132 - # Over time they may concdense into one. This will suffice for now
2133 - EPATCH_SUFFIX="patch"
2134 - EPATCH_FORCE="yes"
2135 - for i in ${XEN_SECURITY_MAIN}; do
2136 - epatch "${WORKDIR}"/patches-security/xen/$i
2137 - done
2138 -
2139 - for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
2140 - epatch $i
2141 - done
2142 -
2143 - # apply qemu-traditional patches
2144 - pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
2145 - for i in ${XEN_SECURITY_QEMUT}; do
2146 - epatch "${WORKDIR}"/patches-security/qemut/$i
2147 - done
2148 - for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
2149 - epatch $i
2150 - done
2151 - popd > /dev/null
2152 -
2153 - # apply qemu-xen/upstream patches
2154 - pushd "${S}"/tools/qemu-xen/ > /dev/null
2155 - for i in ${XEN_SECURITY_QEMUU}; do
2156 - epatch "${WORKDIR}"/patches-security/qemuu/$i
2157 - done
2158 - for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
2159 - epatch $i
2160 - done
2161 - popd > /dev/null
2162 - fi
2163 -
2164 - # move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
2165 - mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
2166 - pushd tools/firmware/ > /dev/null
2167 - ln -s seabios-dir-remote seabios-dir || die
2168 - popd > /dev/null
2169 -
2170 - # Gentoo's patchset
2171 - if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
2172 - einfo "Try to apply Gentoo specific patch set"
2173 - source "${FILESDIR}"/gentoo-patches.conf
2174 - _gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
2175 - for i in ${!_gpv}; do
2176 - EPATCH_SUFFIX="patch" \
2177 - EPATCH_FORCE="yes" \
2178 - epatch "${WORKDIR}"/patches-gentoo/$i
2179 - done
2180 - fi
2181 -
2182 - # Ovmf's patchset
2183 - if [[ -n ${OVMF_VER} ]] && use ovmf; then
2184 - einfo "Try to apply Ovmf patch set"
2185 - pushd "${WORKDIR}"/ovmf-*/ > /dev/null
2186 - EPATCH_SUFFIX="patch" \
2187 - EPATCH_FORCE="yes" \
2188 - EPATCH_OPTS="-p1" \
2189 - epatch "${WORKDIR}"/patches-ovmf
2190 - popd > /dev/null
2191 - mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
2192 - fi
2193 -
2194 - mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
2195 -
2196 - # Fix texi2html build error with new texi2html, qemu.doc.html
2197 - sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
2198 -
2199 - use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
2200 - sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
2201 - -i tools/firmware/Makefile || die
2202 -
2203 - # Drop .config, fixes to gcc-4.6
2204 - sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
2205 -
2206 - # if the user *really* wants to use their own custom-cflags, let them
2207 - if use custom-cflags; then
2208 - einfo "User wants their own CFLAGS - removing defaults"
2209 -
2210 - # try and remove all the default cflags
2211 - find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
2212 - -exec sed \
2213 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
2214 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
2215 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
2216 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
2217 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
2218 - -i {} + || die "failed to re-set custom-cflags"
2219 - else
2220 - unset CFLAGS
2221 - unset LDFLAGS
2222 - unset ASFLAGS
2223 - unset CPPFLAGS
2224 - fi
2225 -
2226 - if ! use pygrub; then
2227 - sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
2228 - fi
2229 -
2230 - if ! use python; then
2231 - sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
2232 - fi
2233 -
2234 - if ! use hvm; then
2235 - sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
2236 - # Bug 351648
2237 - elif ! use x86 && ! has x86 $(get_all_abis); then
2238 - mkdir -p "${WORKDIR}"/extra-headers/gnu || die
2239 - touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
2240 - export CPATH="${WORKDIR}"/extra-headers
2241 - fi
2242 -
2243 - if use qemu; then
2244 - if use sdl; then
2245 - sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
2246 - tools/Makefile || die
2247 - else
2248 - sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
2249 - tools/qemu-xen-traditional/xen-setup || die
2250 - sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
2251 - tools/Makefile || die
2252 - fi
2253 - else
2254 - # Don't bother with qemu, only needed for fully virtualised guests
2255 - sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
2256 - fi
2257 -
2258 - # Reset bash completion dir; Bug 472438
2259 - sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
2260 - -i Config.mk || die
2261 - sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
2262 -
2263 - # xencommons, Bug #492332, sed lighter weight than patching
2264 - sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
2265 - -i tools/hotplug/Linux/init.d/xencommons.in || die
2266 -
2267 - # respect multilib, usr/lib/libcacard.so.0.0.0
2268 - sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
2269 - -i tools/qemu-xen/configure || die
2270 -
2271 - #bug 518136, don't build 32bit exactuable for nomultilib profile
2272 - if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
2273 - sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
2274 - fi
2275 -
2276 - # use /var instead of /var/lib, consistat with previous ebuild
2277 - sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
2278 - m4/paths.m4 configure tools/configure || die
2279 - # use /run instead of /var/run
2280 - sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
2281 - m4/paths.m4 configure tools/configure || die
2282 -
2283 - # uncomment lines in xl.conf
2284 - sed -e 's:^#autoballoon=:autoballoon=:' \
2285 - -e 's:^#lockfile=:lockfile=:' \
2286 - -e 's:^#vif.default.script=:vif.default.script=:' \
2287 - -i tools/examples/xl.conf || die
2288 -
2289 - epatch_user
2290 -}
2291 -
2292 -src_configure() {
2293 - local myconf="--prefix=${PREFIX}/usr \
2294 - --libdir=${PREFIX}/usr/$(get_libdir) \
2295 - --libexecdir=${PREFIX}/usr/libexec \
2296 - --disable-werror \
2297 - --disable-xen \
2298 - --enable-tools \
2299 - --enable-docs \
2300 - $(use_with system-qemu) \
2301 - $(use_enable pam) \
2302 - $(use_enable api xenapi) \
2303 - $(use_enable ovmf) \
2304 - $(use_enable ocaml ocamltools) \
2305 - --with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
2306 - "
2307 -
2308 - use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
2309 - use qemu || myconf+=" --with-system-qemu"
2310 - use amd64 && myconf+=" --enable-qemu-traditional"
2311 - econf ${myconf}
2312 -}
2313 -
2314 -src_compile() {
2315 - export VARTEXFONTS="${T}/fonts"
2316 - local myopt
2317 - use debug && myopt="${myopt} debug=y"
2318 -
2319 - if test-flag-CC -fno-strict-overflow; then
2320 - append-flags -fno-strict-overflow
2321 - fi
2322 -
2323 - emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
2324 -
2325 - use doc && emake -C docs txt html
2326 - emake -C docs man-pages
2327 -}
2328 -
2329 -src_install() {
2330 - # Override auto-detection in the build system, bug #382573
2331 - export INITD_DIR=/tmp/init.d
2332 - export CONFIG_LEAF_DIR=../tmp/default
2333 -
2334 - # Let the build system compile installed Python modules.
2335 - local PYTHONDONTWRITEBYTECODE
2336 - export PYTHONDONTWRITEBYTECODE
2337 -
2338 - emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
2339 - XEN_PYTHON_NATIVE_INSTALL=y install-tools
2340 -
2341 - # Fix the remaining Python shebangs.
2342 - python_fix_shebang "${D}"
2343 -
2344 - # Remove RedHat-specific stuff
2345 - rm -rf "${D}"tmp || die
2346 -
2347 - if use doc; then
2348 - emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
2349 -
2350 - dohtml -r docs/
2351 - docinto pdf
2352 - dodoc ${DOCS[@]}
2353 - [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
2354 - fi
2355 -
2356 - rm -rf "${D}"/usr/share/doc/xen/
2357 - doman docs/man?/*
2358 -
2359 - newconfd "${FILESDIR}"/xendomains.confd xendomains
2360 - newconfd "${FILESDIR}"/xenstored.confd xenstored
2361 - newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
2362 - newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
2363 - newinitd "${FILESDIR}"/xenstored.initd xenstored
2364 - newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
2365 - newinitd "${FILESDIR}"/xencommons.initd xencommons
2366 - newconfd "${FILESDIR}"/xencommons.confd xencommons
2367 - newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
2368 - newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
2369 -
2370 - if use screen; then
2371 - cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
2372 - cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
2373 - keepdir /var/log/xen-consoles
2374 - fi
2375 -
2376 - # For -static-libs wrt Bug 384355
2377 - if ! use static-libs; then
2378 - rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
2379 - fi
2380 -
2381 - # for xendomains
2382 - keepdir /etc/xen/auto
2383 -
2384 - # Remove files failing QA AFTER emake installs them, avoiding seeking absent files
2385 - find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
2386 - -o -name openbios-ppc -o -name palcode-clipper \) -delete || die
2387 -}
2388 -
2389 -pkg_postinst() {
2390 - elog "Official Xen Guide and the offical wiki page:"
2391 - elog "https://wiki.gentoo.org/wiki/Xen"
2392 - elog "http://wiki.xen.org/wiki/Main_Page"
2393 - elog ""
2394 - elog "Recommended to utilise the xencommons script to config sytem At boot"
2395 - elog "Add by use of rc-update on completion of the install"
2396 -
2397 - if ! use hvm; then
2398 - echo
2399 - elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
2400 - elog "support enable the hvm use flag."
2401 - elog "An x86 or amd64 system is required to build HVM support."
2402 - fi
2403 -
2404 - if use qemu; then
2405 - elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
2406 - elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
2407 - elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
2408 - elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
2409 - fi
2410 -}