public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-11-10  8:50 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2015-11-10  8:50 UTC (permalink / raw
  To: gentoo-commits

commit:     11763475c6127c5ba09a7adfdfeade2b3df504fb
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 10 08:50:39 2015 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Tue Nov 10 08:50:39 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11763475

app-emulation/xen-tools: amd64 stable wrt bug #564472

Package-Manager: portage-2.2.20.1
RepoMan-Options: --include-arches="amd64"

 app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.5.2.ebuild     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild b/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
index 96a0ccf..cf3d9a5 100644
--- a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
@@ -14,7 +14,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 	live_eclass="mercurial"
 else
-	KEYWORDS="~amd64 ~x86"
+	KEYWORDS="amd64 ~x86"
 	UPSTREAM_VER=10
 	SECURITY_VER=7
 	# xen-tools's gentoo patches tarball

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2.ebuild
index d43a1c2..7a70a4d 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 	live_eclass="mercurial"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 -x86"
+	KEYWORDS="amd64 ~arm ~arm64 -x86"
 	UPSTREAM_VER=
 	SECURITY_VER=7
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-11-10  8:56 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2015-11-10  8:56 UTC (permalink / raw
  To: gentoo-commits

commit:     9a46db507f964c2e78b40a8c1dd5f144abe34595
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 10 08:56:19 2015 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Tue Nov 10 08:56:19 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a46db50

app-emulation/xen-tools: x86 stable wrt bug #564472

Package-Manager: portage-2.2.20.1
RepoMan-Options: --include-arches="x86"

 app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild b/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
index cf3d9a5..ae93f4d 100644
--- a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
@@ -14,7 +14,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 	live_eclass="mercurial"
 else
-	KEYWORDS="amd64 ~x86"
+	KEYWORDS="amd64 x86"
 	UPSTREAM_VER=10
 	SECURITY_VER=7
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-11-25  3:29 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2015-11-25  3:29 UTC (permalink / raw
  To: gentoo-commits

commit:     5e87e43050c39ef15ab00bbc67dda4211b594a6a
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 25 03:28:21 2015 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Nov 25 03:28:21 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e87e430

app-emulation/xen-tools: bump seabios, fix sdl bug

0) bump seabios to 1.8.2, to keep sync with upstream
1) introduce USE=sdl to fix automagic dependency bug
Gentoo-Bug: 565750

Package-Manager: portage-2.2.24

 app-emulation/xen-tools/Manifest                  |   1 +
 app-emulation/xen-tools/xen-tools-4.6.0-r2.ebuild | 470 ++++++++++++++++++++++
 2 files changed, 471 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 71bcf10..e0d8fa6 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,6 +1,7 @@
 DIST ovmf-20150629.tar.bz2 24265640 SHA256 9f316dc44e192fa9d5d7486cf1dae3f3094ab4f20f282f80d6251632c2cd6118 SHA512 b15a896b5222b920a500ec8a1eba5d670505441ffd02accf9b6c0deb9a12c1c5513a016f91eae5cb33f75ee9f28435dc957686e6ce8b5d0744c11a7d7262fffd WHIRLPOOL 8db4360dcb85f183dbd827f7381787c84065f94eaf746068b11ef7b30412b16cc0ba75effb04f01dea5f4f67967721f7aca11a2550035e95c59645c7964526ac
 DIST seabios-1.6.3.2.tar.gz 422376 SHA256 888aafe37ef3d1f502a73518a5e4dd0e9373ce4cd41681c354771314f1e41dd7 SHA512 c54431d8e81d25b74427696da689e90d3ab68c7c1be1dec05c81658d28b650f53daa34dcee2da826c1cf5d5d39396b12b0b16ea20ed6fd89de8f732163c8cca5 WHIRLPOOL 826c0e034ca46291661faa363189ee6cf56098cabc39f8fc84d2c442cc2da2174c2fa027cc11e11a7c3fed619f2e524f2aee804d9836d256448cdad28631d69a
 DIST seabios-1.7.5.tar.gz 537566 SHA256 858d9eda4ad91efa1c45a5a401d560ef9ca8dd172f03b0a106f06661c252dc51 SHA512 ecf5fb9ac44dde6e4ac00baa6c920dde51b923f23dd74e62c5a02eceaf235e57b885975c5a8bd0927e268115c72bd1143a080fdfd4eff4e168ebeaa30436280e WHIRLPOOL 5e1e99b3bd82a8607c5986fde4592c7437bec4bd78abd5873710f6c431d075436725e8d0d32e9f0dd2921c9d84b8613108b21d31c5309a73e337ead7adf35e90
+DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61 SHA512 798d222d5f5725a805cde9e6000b5ce714d0551fd4a3c2642cc6e77b2bdab1a9e239939a358a23bbe0e00112f5ad70696c87d20b90655463c835541fc04e1a00 WHIRLPOOL 9cda0ad502a59dd718c543b759ac3fcf5acb4adee70c3da9bfea95ab188415acf6425827de77f45421ec3be8fd9e0c37fb486e62828217ba3e83f88d942a3f4a
 DIST xen-4.2.5-upstream-patches-10.tar.xz 41428 SHA256 b29ce85b049420838c3386b67184f4ba56794846d056837fa780ae89a80b40d0 SHA512 9e8046e27506d864e2d69728897cbba3eea1dd5ca748a3febb722901c5a67cca2ab49bb420071292538bd0345023fa337eb2d176b9ca05ca6bce47562f6710ec WHIRLPOOL 29e534ef6b951cf220a3a9476d1f76ac344bfc5c74998f2b472ec83cbe4781746298272e3c1fe8661a838cbc7d734d2730de6a1e9985b8a60f40c98f54449e2a
 DIST xen-4.2.5-upstream-patches-9.tar.xz 23208 SHA256 2206e9a8aeeed207abbae995c5d2baa14d5f0da4120ae44f2de733ecf7ea5af1 SHA512 8a2edaba48002449a521edf2ae078ffe1b3db4f491a85b063886a147a0be3ec7fdb819ce84c90cdae80ed34c10ab2d637506700be10052a67be6ef128fa40fb1 WHIRLPOOL 037820e0fad60d1f7ed054efa797585c992d08f1ffd533705c515ad289f8cdddc72b97f2a3d75ebd683c6bb6988d7285452b4f3cebbe9a879f701156e387ff3b
 DIST xen-4.2.5.tar.gz 15671925 SHA256 3cf440866315e8085050eb0586f0447b6b47a08dbed6a72226bf5ed5d89ec567 SHA512 42c0fc241952fc55fc44480fb6752b004b54ae40e946159ec047adf229b65cbfbd810271d01b064ad8fdbddb73c640dcdcb6bc19f91e8968829889c129920dac WHIRLPOOL 762a91c0111892b33e6bd3e7f7714709b04697ad7c2b0919fef6cc9570a343a77fd5a2b82833e75dac9d12d4e41acdcf0743b0d593595910ddd326f5cd721368

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r2.ebuild
new file mode 100644
index 0000000..7c0a941
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r2.ebuild
@@ -0,0 +1,470 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV=${PV/_/-}
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='xml,threads'
+
+if [[ $PV == *9999 ]]; then
+	KEYWORDS=""
+	REPO="xen-unstable.hg"
+	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
+	S="${WORKDIR}/${REPO}"
+	live_eclass="mercurial"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 -x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=7
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.8.2
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	dev-python/markdown[${PYTHON_USEDEP}]
+	doc? (
+		app-doc/doxygen
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	virtual/udev"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patcheset"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patcheset"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		for i in ${XEN_SECURITY_MAIN}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patcheset"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patcheset"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		"
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" --enable-qemu-traditional"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	use custom-cflags || unset CFLAGS
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	unset LDFLAGS
+	unset CFLAGS
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Temp QA workaround
+	dodir "$(get_udevdir)"
+	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
+	rm -rf "${D}"/etc/udev
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	# TODO: we need to have the current Python slot here.
+	if ! has_version "dev-lang/python[ncurses]"; then
+		echo
+		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+	fi
+
+	if has_version "sys-apps/iproute2[minimal]"; then
+		echo
+		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
+		ewarn "will not work until you rebuild iproute2 without USE=minimal."
+	fi
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+
+	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+		echo
+		elog "xensv is broken upstream (Gentoo bug #142011)."
+		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-11-29  7:57 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2015-11-29  7:57 UTC (permalink / raw
  To: gentoo-commits

commit:     0dc0f01fedc4c51ea1b7b9ebfbeec16ac4439cbd
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 29 07:55:34 2015 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Sun Nov 29 07:56:50 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dc0f01f

app-emulation/xen-tools: clean old vns.: 4.5.1-r3, 4.6.0-r1

Package-Manager: portage-2.2.24

 app-emulation/xen-tools/Manifest                  |   2 -
 app-emulation/xen-tools/xen-tools-4.5.1-r3.ebuild | 458 ----------------------
 app-emulation/xen-tools/xen-tools-4.6.0-r1.ebuild | 458 ----------------------
 3 files changed, 918 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index e0d8fa6..ae27247 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,8 +5,6 @@ DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a
 DIST xen-4.2.5-upstream-patches-10.tar.xz 41428 SHA256 b29ce85b049420838c3386b67184f4ba56794846d056837fa780ae89a80b40d0 SHA512 9e8046e27506d864e2d69728897cbba3eea1dd5ca748a3febb722901c5a67cca2ab49bb420071292538bd0345023fa337eb2d176b9ca05ca6bce47562f6710ec WHIRLPOOL 29e534ef6b951cf220a3a9476d1f76ac344bfc5c74998f2b472ec83cbe4781746298272e3c1fe8661a838cbc7d734d2730de6a1e9985b8a60f40c98f54449e2a
 DIST xen-4.2.5-upstream-patches-9.tar.xz 23208 SHA256 2206e9a8aeeed207abbae995c5d2baa14d5f0da4120ae44f2de733ecf7ea5af1 SHA512 8a2edaba48002449a521edf2ae078ffe1b3db4f491a85b063886a147a0be3ec7fdb819ce84c90cdae80ed34c10ab2d637506700be10052a67be6ef128fa40fb1 WHIRLPOOL 037820e0fad60d1f7ed054efa797585c992d08f1ffd533705c515ad289f8cdddc72b97f2a3d75ebd683c6bb6988d7285452b4f3cebbe9a879f701156e387ff3b
 DIST xen-4.2.5.tar.gz 15671925 SHA256 3cf440866315e8085050eb0586f0447b6b47a08dbed6a72226bf5ed5d89ec567 SHA512 42c0fc241952fc55fc44480fb6752b004b54ae40e946159ec047adf229b65cbfbd810271d01b064ad8fdbddb73c640dcdcb6bc19f91e8968829889c129920dac WHIRLPOOL 762a91c0111892b33e6bd3e7f7714709b04697ad7c2b0919fef6cc9570a343a77fd5a2b82833e75dac9d12d4e41acdcf0743b0d593595910ddd326f5cd721368
-DIST xen-4.5.1-upstream-patches-0.tar.xz 18236 SHA256 95910023cb99f11b4df6d57d82000bbd67714d4ed0700e152619c5b82c1bc6e5 SHA512 531e5bbe6b9920a58361f11bb1bb6df65ebaf01e3af13f9aca018e8512727d950009257dfc9b3d0b0f847968da499cf9423716de8a04869cec6f92f5274462e2 WHIRLPOOL 3e6dda862d1bbe736b85422117148c3db91a308a58eb1476e27bbb7355ea7793269cdfc489697c9e5eea5f0ac5319df5c88f2707b10c9a96b8142927a4169819
-DIST xen-4.5.1.tar.gz 18410400 SHA256 668c11d4fca67ac44329e369f810356eacd37b28d28fb96e66aac77f3c5e1371 SHA512 9436243e26bc64bc836a179abdc3a6b1b6fa9d3f2170453092c18be71fa62e18cd4465a9154c0f28a7ac8d69d08361ba1defef240a51197f058c012c3855ba04 WHIRLPOOL 71d8559f86683dd9fb3eb09d3f602de227f281fbd3c8cc258bfdb67c425d9e7c4d21cb0284c123e4263262c1b821fea6d28109861ce60d627f6426d352808d99
 DIST xen-4.5.2.tar.gz 18416220 SHA256 4c9e5dac4eea484974e9f76da2756c8e0973b4e884d28d37e955df9ebf00e7e8 SHA512 e0ce01a5356c254bfde48fae0b0e005c42c1615a7ccf4c1ba7dcf90784777b53995e9a9ae4575e3f19ef341014b34cb8c06e39d68be359f7fd69830501a144dd WHIRLPOOL b50ce28e58d8419915f7f85de7ab23128719fa07c54f28165c4ba864ffe57230230fa7cb61dd2ed7608b8bc178a072124aedc30c61a45fb8b745fc616715219b
 DIST xen-4.6.0-upstream-patches-0.tar.xz 19280 SHA256 8ef2d139f86cb52d2208a17c974e5a85356183ee359ab4b91882067548806e0c SHA512 9fde8d9def1d75e50c10069af7f9fea4b5b6992b7089eb554e1e2a4c78dd080f2977128d0dd541eeb735b951e7d6614a07101f7703457e7743ac6b3be962cdfe WHIRLPOOL 861c7f150811912422f6f5eb77437744d1456740a43bef3dfd88a2e6d6836c0e8460b788ccd4f14a7144652d65a825c08aa984ec4240b2b1ac6d09237695d19d
 DIST xen-4.6.0.tar.gz 19694350 SHA256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 SHA512 b4b02f306ffea360f539dd8c231b2f58c00c3638fdb665cb659c7291b475b40f1075bc59d49a6144767729e57b8bc40a1cfd9030d61de2b8fa4ac97d43655c2b WHIRLPOOL d3f01183440ca1875b6e850bd116db0c382383433e50c0902d3268e9e36b39d184fc65e925bdb5363ef4ca7a232fee15b4749c89baf789137b8a8248565c75a8

diff --git a/app-emulation/xen-tools/xen-tools-4.5.1-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.5.1-r3.ebuild
deleted file mode 100644
index 80484cd..0000000
--- a/app-emulation/xen-tools/xen-tools-4.5.1-r3.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_PV=${PV/_/-}
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="amd64 ~arm ~arm64 -x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=6
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.7.5
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	hvm? ( media-libs/libsdl )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
-	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	dev-python/markdown[${PYTHON_USEDEP}]
-	doc? (
-		app-doc/doxygen
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? ( x11-libs/pixman )
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	virtual/udev"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		for i in ${XEN_SECURITY_MAIN}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patcheset"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patcheset"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		"
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	unset CFLAGS
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r1.ebuild
deleted file mode 100644
index 4b02971..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r1.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_PV=${PV/_/-}
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 -x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=7
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.7.5
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	hvm? ( media-libs/libsdl )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
-	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	dev-python/markdown[${PYTHON_USEDEP}]
-	doc? (
-		app-doc/doxygen
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? ( x11-libs/pixman )
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	virtual/udev"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		for i in ${XEN_SECURITY_MAIN}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patcheset"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patcheset"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		"
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	unset CFLAGS
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-11-30 16:01 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2015-11-30 16:01 UTC (permalink / raw
  To: gentoo-commits

commit:     67f629f0a52e81af499dc1cb5ed4a9dc79af791e
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 30 16:00:33 2015 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Mon Nov 30 16:01:30 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67f629f0

app-emulation/xen-tools: revbumps vns. 4.5.2-r1, 4.6.0-r3

security patches (2) added from XSA-162, initally set as embargoed
security patches, publicly released today wrt the gentoo bug

Gentoo bug: #566838

Package-Manager: portage-2.2.24

 app-emulation/xen-tools/Manifest                  |   1 +
 app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild | 466 +++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild | 476 ++++++++++++++++++++++
 3 files changed, 943 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index ae27247..a14e4c1 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -12,5 +12,6 @@ DIST xen-gentoo-patches-1.tar.xz 23044 SHA256 dcff35bbc4b6946473c9b55ad595a5fea8
 DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73acfdc4df694f7b29c1135180d902049 SHA512 3006ce4cd67e80a9f79d9ba3814a64704b0d762159a439a140b1ec0a2699473cd5537950f0913b55f8f7e3d0fd2e9861f3199793120d8d2502aa3f8ef7816c8f WHIRLPOOL 4a921103df2825ccd8b0481708e7cd692fa45d5aadae286c1522c144a1576920e7d3567648565bb9af85bb6bb597ea9d0ec04ea6abd2115db4caf7e739717b1a
 DIST xen-gentoo-patches-5.tar.xz 23664 SHA256 41e23ec6fb5a4ef5a1f8746de0e33579de2c725368afed6bd2b7506df5e8c2b5 SHA512 8370cef1aa06585e8fa8f8c6eb7f29375ac6f5a240c859ebb6982d1c1ec159c9c331c861f39838f53093cdceca24ee1b0d98c1c92874dd4113e73eb884842eac WHIRLPOOL 4b65283220b66555a69b65331d3dcb8b8353fef584eb723c2a703712bc6eac57b70f500eeeffc511e75d3ab5d3a1eac8aac83133baf4c90ab498b1843764eb9f
 DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
+DIST xen-security-patches-0.tar.gz 1034 SHA256 283dfdf73735d1ce45db7d5b9880fec378317ebda097423b36d61aa1bf2146a8 SHA512 c15374546ddab803f1b1a2bc961f8d8b0ec04c141036f6a0c6a4d60129e23ace2d88ba6b292d6382463fa80d8bf8dbdfd788b325b1baa8a9aa5df63be26f8ed4 WHIRLPOOL 08fe26578f796a97e486e178a1b7b8e515e1d9797bdb868b487eabc95fa4f2063e5d08b554689fdb0392cc85643aaa22a93df197fd68729d4581c127df84fa5a
 DIST xen-security-patches-6.tar.xz 24780 SHA256 b41422583e5f7b4c85b82d89ab66f3e0fa8de8fdb2ae42aa3da40822e9507ef5 SHA512 c58831eb5e26a78a3072623b83bad125ddd4cd67c0075a708be81a7f50ee936cd2e5832a9b88129e11ec81ebafc9cfbc339fb8296d6f4b44c04630b349c4a621 WHIRLPOOL edecaefef0b6dd1a10c479362362640d9bd7a43623085c1f20b1171c65746220d7fdfd0e20892f60ea7d2f6052389da2a1d3c0179a88d7c4d52b3aa33cbef05e
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
new file mode 100644
index 0000000..a5e4b14
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
@@ -0,0 +1,466 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV=${PV/_/-}
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='xml,threads'
+
+if [[ $PV == *9999 ]]; then
+	KEYWORDS=""
+	REPO="xen-unstable.hg"
+	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
+	S="${WORKDIR}/${REPO}"
+	live_eclass="mercurial"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 -x86"
+	UPSTREAM_VER=
+	SECURITY_VER=7
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.7.5
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}
+	https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-0.tar.gz"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	hvm? ( media-libs/libsdl )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	dev-python/markdown[${PYTHON_USEDEP}]
+	doc? (
+		app-doc/doxygen
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? ( x11-libs/pixman )
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	virtual/udev"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patcheset"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patcheset"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		for i in ${XEN_SECURITY_MAIN}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-traditional patches
+		mv "${WORKDIR}"/xsa162-qemut.patch \
+			"${WORKDIR}"/patches-security/qemut/ || die
+		XEN_SECURITY_QEMUT="xsa162-qemut.patch"
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		mv "${WORKDIR}"/xsa162-qemuu.patch \
+                        "${WORKDIR}"/patches-security/qemuu/ || die
+		XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patch set"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	# Don't bother with qemu, only needed for fully virtualised guests
+	if ! use qemu; then
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		"
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" --enable-qemu-traditional"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	use custom-cflags || unset CFLAGS
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	unset LDFLAGS
+	unset CFLAGS
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Temp QA workaround
+	dodir "$(get_udevdir)"
+	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
+	rm -rf "${D}"/etc/udev
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	# TODO: we need to have the current Python slot here.
+	if ! has_version "dev-lang/python[ncurses]"; then
+		echo
+		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+	fi
+
+	if has_version "sys-apps/iproute2[minimal]"; then
+		echo
+		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
+		ewarn "will not work until you rebuild iproute2 without USE=minimal."
+	fi
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+
+	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+		echo
+		elog "xensv is broken upstream (Gentoo bug #142011)."
+		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
new file mode 100644
index 0000000..156be8a
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
@@ -0,0 +1,476 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV=${PV/_/-}
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='xml,threads'
+
+if [[ $PV == *9999 ]]; then
+	KEYWORDS=""
+	REPO="xen-unstable.hg"
+	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
+	S="${WORKDIR}/${REPO}"
+	live_eclass="mercurial"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 -x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=7
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.8.2
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	dev-python/markdown[${PYTHON_USEDEP}]
+	doc? (
+		app-doc/doxygen
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	virtual/udev"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patcheset"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patcheset"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		for i in ${XEN_SECURITY_MAIN}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-traditional patches
+		mv "${WORKDIR}"/xsa162-qemut.patch \
+			"${WORKDIR}"/patches-security/qemut/ || die
+		XEN_SECURITY_QEMUT="xsa162-qemut.patch"
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		mv "${WORKDIR}"/xsa162-qemuu.patch \
+			"${WORKDIR}"/patches-security/qemuu/ || die
+		XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patcheset"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patcheset"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		"
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" --enable-qemu-traditional"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	use custom-cflags || unset CFLAGS
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	unset LDFLAGS
+	unset CFLAGS
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Temp QA workaround
+	dodir "$(get_udevdir)"
+	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
+	rm -rf "${D}"/etc/udev
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	# TODO: we need to have the current Python slot here.
+	if ! has_version "dev-lang/python[ncurses]"; then
+		echo
+		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+	fi
+
+	if has_version "sys-apps/iproute2[minimal]"; then
+		echo
+		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
+		ewarn "will not work until you rebuild iproute2 without USE=minimal."
+	fi
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+
+	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+		echo
+		elog "xensv is broken upstream (Gentoo bug #142011)."
+		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-12-01  9:38 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2015-12-01  9:38 UTC (permalink / raw
  To: gentoo-commits

commit:     550bd45b9ed1948f01ad41a0bd92574688dca2d4
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  1 09:38:30 2015 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Tue Dec  1 09:38:30 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=550bd45b

app-emulation/xen-tools: amd64 stable wrt bug #566838

Package-Manager: portage-2.2.20.1
RepoMan-Options: --include-arches="amd64"

 app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
index a5e4b14..9a90ca4 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 	live_eclass="mercurial"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 -x86"
+	KEYWORDS="amd64 ~arm ~arm64 -x86"
 	UPSTREAM_VER=
 	SECURITY_VER=7
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-12-03 13:13 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2015-12-03 13:13 UTC (permalink / raw
  To: gentoo-commits

commit:     357835e5a56ae91c9bee9cf3ce2363a255d929be
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  3 13:12:34 2015 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Thu Dec  3 13:13:40 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=357835e5

app-emulation/xen-tools: add missed sec patches to vn. 4.6.0-r3

Already added to xen-4.5.2-r1, fixes gentoo bug.
Fix apparent typo re sec. patches in ebuild of 4.6.0-r3 only

Gentoo bug: #567190

Package-Manager: portage-2.2.24

 app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
index 156be8a..d13b307 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
@@ -45,7 +45,9 @@ else
 		${OVMF_PATCHSET_URI} )
 	${UPSTREAM_PATCHSET_URI}
 	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
+	${GENTOO_PATCHSET_URI}
+	https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-0.tar.gz"
+
 	S="${WORKDIR}/xen-${MY_PV}"
 fi
 
@@ -164,7 +166,7 @@ pkg_setup() {
 src_prepare() {
 	# Upstream's patchset
 	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
+		einfo "Try to apply Xen Upstream patch set"
 		EPATCH_SUFFIX="patch" \
 		EPATCH_FORCE="yes" \
 		EPATCH_OPTS="-p1" \
@@ -173,7 +175,7 @@ src_prepare() {
 
 	# Security patchset
 	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
+		einfo "Try to apply Xen Security patch set"
 		source "${WORKDIR}"/patches-security/${PV}.conf
 		# apply main xen patches
 		for i in ${XEN_SECURITY_MAIN}; do
@@ -215,7 +217,7 @@ src_prepare() {
 
 	# Gentoo's patchset
 	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patcheset"
+		einfo "Try to apply Gentoo specific patch set"
 		source "${FILESDIR}"/gentoo-patches.conf
 		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
 		for i in ${!_gpv}; do
@@ -227,7 +229,7 @@ src_prepare() {
 
 	# Ovmf's patchset
 	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patcheset"
+		einfo "Try to apply Ovmf patch set"
 		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
 		EPATCH_SUFFIX="patch" \
 		EPATCH_FORCE="yes" \


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-12-03 13:58 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2015-12-03 13:58 UTC (permalink / raw
  To: gentoo-commits

commit:     2e385225eec30f5fbb7703c01cd862653e07143d
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  3 13:53:32 2015 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Thu Dec  3 13:58:09 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e385225

app-emulation/xen-tools: clean vulnerable versions wrt security bug #566838

Gentoo bug : #566838

Package-Manager: portage-2.2.24

 app-emulation/xen-tools/xen-tools-4.5.2.ebuild    | 458 ---------------------
 app-emulation/xen-tools/xen-tools-4.6.0-r2.ebuild | 470 ----------------------
 2 files changed, 928 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2.ebuild
deleted file mode 100644
index 7a70a4d..0000000
--- a/app-emulation/xen-tools/xen-tools-4.5.2.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_PV=${PV/_/-}
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="amd64 ~arm ~arm64 -x86"
-	UPSTREAM_VER=
-	SECURITY_VER=7
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.7.5
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	hvm? ( media-libs/libsdl )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
-	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	dev-python/markdown[${PYTHON_USEDEP}]
-	doc? (
-		app-doc/doxygen
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? ( x11-libs/pixman )
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	virtual/udev"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		for i in ${XEN_SECURITY_MAIN}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patcheset"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patcheset"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		"
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	unset CFLAGS
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r2.ebuild
deleted file mode 100644
index 7c0a941..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r2.ebuild
+++ /dev/null
@@ -1,470 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_PV=${PV/_/-}
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 -x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=7
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.8.2
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
-	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	dev-python/markdown[${PYTHON_USEDEP}]
-	doc? (
-		app-doc/doxygen
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	virtual/udev"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		for i in ${XEN_SECURITY_MAIN}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patcheset"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patcheset"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		"
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	unset CFLAGS
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-12-04  6:29 Doug Goldstein
  0 siblings, 0 replies; 295+ messages in thread
From: Doug Goldstein @ 2015-12-04  6:29 UTC (permalink / raw
  To: gentoo-commits

commit:     cf0c508118958a271954c3112be0e6469c39af44
Author:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  4 06:27:27 2015 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Fri Dec  4 06:29:28 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf0c5081

app-emulation/xen-tools: fix up bad dependency

markdown is only used when building the docs. I've confirmed this by
checking the makefiles.

 app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
index 9a90ca4..86df54d 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
@@ -96,9 +96,9 @@ DEPEND="${COMMON_DEPEND}
 		sys-power/iasl )
 	dev-lang/perl
 	app-misc/pax-utils
-	dev-python/markdown[${PYTHON_USEDEP}]
 	doc? (
 		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
 		dev-tex/latex2html[png,gif]
 		media-gfx/graphviz
 		dev-tex/xcolor

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
index d13b307..079e75e 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
@@ -95,9 +95,9 @@ DEPEND="${COMMON_DEPEND}
 		sys-power/iasl )
 	dev-lang/perl
 	app-misc/pax-utils
-	dev-python/markdown[${PYTHON_USEDEP}]
 	doc? (
 		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
 		dev-tex/latex2html[png,gif]
 		media-gfx/graphviz
 		dev-tex/xcolor


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-12-04  6:41 Doug Goldstein
  0 siblings, 0 replies; 295+ messages in thread
From: Doug Goldstein @ 2015-12-04  6:41 UTC (permalink / raw
  To: gentoo-commits

commit:     892aacda9a78be85ceb8b30944fc9882f2a64885
Author:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  4 06:40:14 2015 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Fri Dec  4 06:41:45 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=892aacda

app-emulation/xen-tools: drop udev usage

Xen 4.6.0 and newer no longer use or ship udev rules. The functionality
is implemented by running 'xl devd', which I'll add a script for on the
next bump.

 app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
index 079e75e..b35cabe 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
@@ -51,7 +51,7 @@ else
 	S="${WORKDIR}/xen-${MY_PV}"
 fi
 
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs ${live_eclass}
 
 DESCRIPTION="Xend daemon and tools"
 HOMEPAGE="http://xen.org/"
@@ -125,8 +125,7 @@ RDEPEND="${COMMON_DEPEND}
 	screen? (
 		app-misc/screen
 		app-admin/logrotate
-	)
-	virtual/udev"
+	)"
 
 # hvmloader is used to bootstrap a fully virtualized kernel
 # Approved by QA team in bug #144032
@@ -425,11 +424,6 @@ src_install() {
 	# for xendomains
 	keepdir /etc/xen/auto
 
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
 	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
 	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
 		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-12-06 20:20 Doug Goldstein
  0 siblings, 0 replies; 295+ messages in thread
From: Doug Goldstein @ 2015-12-06 20:20 UTC (permalink / raw
  To: gentoo-commits

commit:     9029e1782621cfc4bb0af2dd1e8e0aa955a6cfb1
Author:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Sun Dec  6 05:59:21 2015 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Sun Dec  6 20:19:45 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9029e178

app-emulation/xen-tools: multiple clean ups

- switch to git from mercurial for live ebuild
- improve description
- add sub-slot to avoid ABI breaks when upgrading/downgrading
- update inherit line
- fix dependency on iproute2
- fix USE=-custom-cflags to not override some FLAGS
- fix up Python dependencies

Signed-off-by: Doug Goldstein <cardoe <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild | 53 ++++++++---------------
 1 file changed, 19 insertions(+), 34 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
index b35cabe..7e33d7a 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
@@ -4,17 +4,20 @@
 
 EAPI=5
 
-MY_PV=${PV/_/-}
-
 PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
 
 if [[ $PV == *9999 ]]; then
+	inherit git-r3
 	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 -x86"
 	UPSTREAM_VER=0
@@ -51,14 +54,12 @@ else
 	S="${WORKDIR}/xen-${MY_PV}"
 fi
 
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
+DESCRIPTION="Xen tools including QEMU and xl"
 HOMEPAGE="http://xen.org/"
 DOCS=( README docs/README.xen-bugtool )
 
 LICENSE="GPL-2"
-SLOT="0"
+SLOT="0/${MAJOR_V}"
 # Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
 # >=dev-lang/ocaml-4 stable
 # Masked in profiles/eapi-5-files instead
@@ -85,7 +86,6 @@ DEPEND="${COMMON_DEPEND}
 	${PYTHON_DEPS}
 	api? ( dev-libs/libxml2
 		net-misc/curl )
-	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
 	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
 	!amd64? ( >=sys-apps/dtc-1.4.0 )
 	amd64? ( sys-devel/bin86
@@ -120,7 +120,7 @@ DEPEND="${COMMON_DEPEND}
 		>=dev-lang/ocaml-4 )"
 
 RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2
+	sys-apps/iproute2[-minimal]
 	net-misc/bridge-utils
 	screen? (
 		app-misc/screen
@@ -263,6 +263,11 @@ src_prepare() {
 				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
 				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
 				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
 	fi
 
 	if ! use pygrub; then
@@ -344,7 +349,9 @@ src_configure() {
 		$(use_enable api xenapi) \
 		$(use_enable ovmf) \
 		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
 		"
+
 	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
 	use qemu || myconf+=" --with-system-qemu"
 	use amd64 && myconf+=" --enable-qemu-traditional"
@@ -356,13 +363,10 @@ src_compile() {
 	local myopt
 	use debug && myopt="${myopt} debug=y"
 
-	use custom-cflags || unset CFLAGS
 	if test-flag-CC -fno-strict-overflow; then
 		append-flags -fno-strict-overflow
 	fi
 
-	unset LDFLAGS
-	unset CFLAGS
 	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
 
 	use doc && emake -C docs txt html
@@ -437,19 +441,6 @@ pkg_postinst() {
 	elog "Recommended to utilise the xencommons script to config sytem At boot"
 	elog "Add by use of rc-update on completion of the install"
 
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
 	if ! use hvm; then
 		echo
 		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
@@ -463,10 +454,4 @@ pkg_postinst() {
 		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
 		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
 	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
 }


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-12-09  5:31 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2015-12-09  5:31 UTC (permalink / raw
  To: gentoo-commits

commit:     cec1b419cc9c56d2573a858a6c6e727f97d924a4
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  9 05:28:39 2015 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Wed Dec  9 05:31:16 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cec1b419

clean vulnerable vns. wrt #566842 #566844

Package-Manager: portage-2.2.24

 app-emulation/xen-tools/Manifest                  |   1 -
 app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild | 466 ----------------------
 app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild | 457 ---------------------
 3 files changed, 924 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index a67c895..d3b614f 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -12,7 +12,6 @@ DIST xen-gentoo-patches-1.tar.xz 23044 SHA256 dcff35bbc4b6946473c9b55ad595a5fea8
 DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73acfdc4df694f7b29c1135180d902049 SHA512 3006ce4cd67e80a9f79d9ba3814a64704b0d762159a439a140b1ec0a2699473cd5537950f0913b55f8f7e3d0fd2e9861f3199793120d8d2502aa3f8ef7816c8f WHIRLPOOL 4a921103df2825ccd8b0481708e7cd692fa45d5aadae286c1522c144a1576920e7d3567648565bb9af85bb6bb597ea9d0ec04ea6abd2115db4caf7e739717b1a
 DIST xen-gentoo-patches-5.tar.xz 23664 SHA256 41e23ec6fb5a4ef5a1f8746de0e33579de2c725368afed6bd2b7506df5e8c2b5 SHA512 8370cef1aa06585e8fa8f8c6eb7f29375ac6f5a240c859ebb6982d1c1ec159c9c331c861f39838f53093cdceca24ee1b0d98c1c92874dd4113e73eb884842eac WHIRLPOOL 4b65283220b66555a69b65331d3dcb8b8353fef584eb723c2a703712bc6eac57b70f500eeeffc511e75d3ab5d3a1eac8aac83133baf4c90ab498b1843764eb9f
 DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
-DIST xen-security-patches-0.tar.gz 1034 SHA256 283dfdf73735d1ce45db7d5b9880fec378317ebda097423b36d61aa1bf2146a8 SHA512 c15374546ddab803f1b1a2bc961f8d8b0ec04c141036f6a0c6a4d60129e23ace2d88ba6b292d6382463fa80d8bf8dbdfd788b325b1baa8a9aa5df63be26f8ed4 WHIRLPOOL 08fe26578f796a97e486e178a1b7b8e515e1d9797bdb868b487eabc95fa4f2063e5d08b554689fdb0392cc85643aaa22a93df197fd68729d4581c127df84fa5a
 DIST xen-security-patches-1.tar.gz 7040 SHA256 30733e9ca71bf4291ff212eb191afb22687ccd9b2579767fe0ee013152980c76 SHA512 89c72897f18a86c2060bb76a182e7cca72ad2f33a3aab964ecae66e057aeecafee2e9986204d6feb98f81ccb740460ee2cb37663b1ab79f47adc1dd73e0091bc WHIRLPOOL c27e612b87b4a30abbf59e6be019e2c21a78bfbdf1715da5498d95607d390d616251768d419ac5ce76087bbf7cdfc410dd0088ba48e425082cea971efcb64346
 DIST xen-security-patches-6.tar.xz 24780 SHA256 b41422583e5f7b4c85b82d89ab66f3e0fa8de8fdb2ae42aa3da40822e9507ef5 SHA512 c58831eb5e26a78a3072623b83bad125ddd4cd67c0075a708be81a7f50ee936cd2e5832a9b88129e11ec81ebafc9cfbc339fb8296d6f4b44c04630b349c4a621 WHIRLPOOL edecaefef0b6dd1a10c479362362640d9bd7a43623085c1f20b1171c65746220d7fdfd0e20892f60ea7d2f6052389da2a1d3c0179a88d7c4d52b3aa33cbef05e
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
deleted file mode 100644
index 86df54d..0000000
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
+++ /dev/null
@@ -1,466 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_PV=${PV/_/-}
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="amd64 ~arm ~arm64 -x86"
-	UPSTREAM_VER=
-	SECURITY_VER=7
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.7.5
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}
-	https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-0.tar.gz"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	hvm? ( media-libs/libsdl )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
-	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? ( x11-libs/pixman )
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	virtual/udev"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		for i in ${XEN_SECURITY_MAIN}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-traditional patches
-		mv "${WORKDIR}"/xsa162-qemut.patch \
-			"${WORKDIR}"/patches-security/qemut/ || die
-		XEN_SECURITY_QEMUT="xsa162-qemut.patch"
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		mv "${WORKDIR}"/xsa162-qemuu.patch \
-                        "${WORKDIR}"/patches-security/qemuu/ || die
-		XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		"
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	unset CFLAGS
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
deleted file mode 100644
index 7e33d7a..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r3.ebuild
+++ /dev/null
@@ -1,457 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 -x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=7
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.8.2
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}
-	https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-0.tar.gz"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patch set"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		for i in ${XEN_SECURITY_MAIN}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-traditional patches
-		mv "${WORKDIR}"/xsa162-qemut.patch \
-			"${WORKDIR}"/patches-security/qemut/ || die
-		XEN_SECURITY_QEMUT="xsa162-qemut.patch"
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		mv "${WORKDIR}"/xsa162-qemuu.patch \
-			"${WORKDIR}"/patches-security/qemuu/ || die
-		XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-12-09  5:31 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2015-12-09  5:31 UTC (permalink / raw
  To: gentoo-commits

commit:     d20b6d3f4e02313651ce37098087215e2e8ad92c
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  9 05:26:20 2015 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Wed Dec  9 05:31:16 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d20b6d3f

app-emulation/xen-tools: revbumps -> vns. 4.5.2-r2, 4.6.0-r3 wrt sec. bugs

Addition of patches XSA-158 (#566844), XSA-{159,160} (#566842), fixing all
corresponding security issues, patches made avaialable for public release
as of yesterday (08/12). Patches compressed into my devspace then combined
with those of dlan insource. This format will do for now. Not to be
adjusted without prior discussion. All patches pass runtests

Gentoo bugs: #566842 #566844

Package-Manager: portage-2.2.24

 app-emulation/xen-tools/Manifest                  |   1 +
 app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild | 472 ++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild | 463 +++++++++++++++++++++
 3 files changed, 936 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index a14e4c1..a67c895 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -13,5 +13,6 @@ DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73a
 DIST xen-gentoo-patches-5.tar.xz 23664 SHA256 41e23ec6fb5a4ef5a1f8746de0e33579de2c725368afed6bd2b7506df5e8c2b5 SHA512 8370cef1aa06585e8fa8f8c6eb7f29375ac6f5a240c859ebb6982d1c1ec159c9c331c861f39838f53093cdceca24ee1b0d98c1c92874dd4113e73eb884842eac WHIRLPOOL 4b65283220b66555a69b65331d3dcb8b8353fef584eb723c2a703712bc6eac57b70f500eeeffc511e75d3ab5d3a1eac8aac83133baf4c90ab498b1843764eb9f
 DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
 DIST xen-security-patches-0.tar.gz 1034 SHA256 283dfdf73735d1ce45db7d5b9880fec378317ebda097423b36d61aa1bf2146a8 SHA512 c15374546ddab803f1b1a2bc961f8d8b0ec04c141036f6a0c6a4d60129e23ace2d88ba6b292d6382463fa80d8bf8dbdfd788b325b1baa8a9aa5df63be26f8ed4 WHIRLPOOL 08fe26578f796a97e486e178a1b7b8e515e1d9797bdb868b487eabc95fa4f2063e5d08b554689fdb0392cc85643aaa22a93df197fd68729d4581c127df84fa5a
+DIST xen-security-patches-1.tar.gz 7040 SHA256 30733e9ca71bf4291ff212eb191afb22687ccd9b2579767fe0ee013152980c76 SHA512 89c72897f18a86c2060bb76a182e7cca72ad2f33a3aab964ecae66e057aeecafee2e9986204d6feb98f81ccb740460ee2cb37663b1ab79f47adc1dd73e0091bc WHIRLPOOL c27e612b87b4a30abbf59e6be019e2c21a78bfbdf1715da5498d95607d390d616251768d419ac5ce76087bbf7cdfc410dd0088ba48e425082cea971efcb64346
 DIST xen-security-patches-6.tar.xz 24780 SHA256 b41422583e5f7b4c85b82d89ab66f3e0fa8de8fdb2ae42aa3da40822e9507ef5 SHA512 c58831eb5e26a78a3072623b83bad125ddd4cd67c0075a708be81a7f50ee936cd2e5832a9b88129e11ec81ebafc9cfbc339fb8296d6f4b44c04630b349c4a621 WHIRLPOOL edecaefef0b6dd1a10c479362362640d9bd7a43623085c1f20b1171c65746220d7fdfd0e20892f60ea7d2f6052389da2a1d3c0179a88d7c4d52b3aa33cbef05e
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d

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
new file mode 100644
index 0000000..52f2ffc
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
@@ -0,0 +1,472 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV=${PV/_/-}
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='xml,threads'
+
+if [[ $PV == *9999 ]]; then
+	KEYWORDS=""
+	REPO="xen-unstable.hg"
+	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
+	S="${WORKDIR}/${REPO}"
+	live_eclass="mercurial"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 -x86"
+	UPSTREAM_VER=
+	SECURITY_VER=7
+	SEC_VER=1
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.7.5
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}
+	https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-${SEC_VER}.tar.gz"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	hvm? ( media-libs/libsdl )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? ( x11-libs/pixman )
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	virtual/udev"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patcheset"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patcheset"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# In contrast to xen-4.5.2-r2.ebuild, these are moved into the dir structure
+		# prepared and deposited by dlan in his devspace
+		mv "${WORKDIR}"/{xsa156-4.5.patch,xsa15[8-9].patch,xsa160-4.6.patch} \
+			"${WORKDIR}"/patches-security/xen || die
+		XEN_SECURITY_MAIN="${XEN_SECURITY_MAIN} xsa156-4.5.patch xsa15[8-9].patch xsa160-4.6.patch"
+		for i in ${XEN_SECURITY_MAIN}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-traditional patches
+		mv "${WORKDIR}"/xsa162-qemut.patch \
+			"${WORKDIR}"/patches-security/qemut/ || die
+		XEN_SECURITY_QEMUT="xsa162-qemut.patch"
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		mv "${WORKDIR}"/xsa162-qemuu.patch \
+                        "${WORKDIR}"/patches-security/qemuu/ || die
+		XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patch set"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	# Don't bother with qemu, only needed for fully virtualised guests
+	if ! use qemu; then
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		"
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" --enable-qemu-traditional"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	use custom-cflags || unset CFLAGS
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	unset LDFLAGS
+	unset CFLAGS
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Temp QA workaround
+	dodir "$(get_udevdir)"
+	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
+	rm -rf "${D}"/etc/udev
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	# TODO: we need to have the current Python slot here.
+	if ! has_version "dev-lang/python[ncurses]"; then
+		echo
+		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+	fi
+
+	if has_version "sys-apps/iproute2[minimal]"; then
+		echo
+		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
+		ewarn "will not work until you rebuild iproute2 without USE=minimal."
+	fi
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+
+	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+		echo
+		elog "xensv is broken upstream (Gentoo bug #142011)."
+		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+	fi
+}

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
new file mode 100644
index 0000000..57d618e
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
@@ -0,0 +1,463 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 -x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=7
+	SEC_VER=1
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.8.2
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}
+	https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-${SEC_VER}.tar.gz"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patch set"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# In contrast to xen-4.5.2-r2.ebuild, these are moved into the dir structure
+		# prepared and deposited by dlan in his devspace
+		mv "${WORKDIR}"/{xsa15[6-9].patch,xsa160-4.6.patch} \
+			"${WORKDIR}"/patches-security/xen || die
+		XEN_SECURITY_MAIN="${XEN_SECURITY_MAIN} xsa15[6-9].patch xsa160-4.6.patch"
+		for i in ${XEN_SECURITY_MAIN}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-traditional patches
+		mv "${WORKDIR}"/xsa162-qemut.patch \
+			"${WORKDIR}"/patches-security/qemut/ || die
+		XEN_SECURITY_QEMUT="xsa162-qemut.patch"
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		mv "${WORKDIR}"/xsa162-qemuu.patch \
+			"${WORKDIR}"/patches-security/qemuu/ || die
+		XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patch set"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" --enable-qemu-traditional"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-12-09  7:06 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2015-12-09  7:06 UTC (permalink / raw
  To: gentoo-commits

commit:     4d246b8f9bfd54b483d495c64c3a5ddb41d64579
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  9 07:05:28 2015 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Wed Dec  9 07:05:28 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d246b8f

app-emulation/xen-tools: re-add xen-tools-4.5.2-r1.ebuild

Package-Manager: portage-2.2.24
RepoMan-Options: --force

 app-emulation/xen-tools/Manifest                  |   1 +
 app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild | 466 ++++++++++++++++++++++
 2 files changed, 467 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index d3b614f..a67c895 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -12,6 +12,7 @@ DIST xen-gentoo-patches-1.tar.xz 23044 SHA256 dcff35bbc4b6946473c9b55ad595a5fea8
 DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73acfdc4df694f7b29c1135180d902049 SHA512 3006ce4cd67e80a9f79d9ba3814a64704b0d762159a439a140b1ec0a2699473cd5537950f0913b55f8f7e3d0fd2e9861f3199793120d8d2502aa3f8ef7816c8f WHIRLPOOL 4a921103df2825ccd8b0481708e7cd692fa45d5aadae286c1522c144a1576920e7d3567648565bb9af85bb6bb597ea9d0ec04ea6abd2115db4caf7e739717b1a
 DIST xen-gentoo-patches-5.tar.xz 23664 SHA256 41e23ec6fb5a4ef5a1f8746de0e33579de2c725368afed6bd2b7506df5e8c2b5 SHA512 8370cef1aa06585e8fa8f8c6eb7f29375ac6f5a240c859ebb6982d1c1ec159c9c331c861f39838f53093cdceca24ee1b0d98c1c92874dd4113e73eb884842eac WHIRLPOOL 4b65283220b66555a69b65331d3dcb8b8353fef584eb723c2a703712bc6eac57b70f500eeeffc511e75d3ab5d3a1eac8aac83133baf4c90ab498b1843764eb9f
 DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
+DIST xen-security-patches-0.tar.gz 1034 SHA256 283dfdf73735d1ce45db7d5b9880fec378317ebda097423b36d61aa1bf2146a8 SHA512 c15374546ddab803f1b1a2bc961f8d8b0ec04c141036f6a0c6a4d60129e23ace2d88ba6b292d6382463fa80d8bf8dbdfd788b325b1baa8a9aa5df63be26f8ed4 WHIRLPOOL 08fe26578f796a97e486e178a1b7b8e515e1d9797bdb868b487eabc95fa4f2063e5d08b554689fdb0392cc85643aaa22a93df197fd68729d4581c127df84fa5a
 DIST xen-security-patches-1.tar.gz 7040 SHA256 30733e9ca71bf4291ff212eb191afb22687ccd9b2579767fe0ee013152980c76 SHA512 89c72897f18a86c2060bb76a182e7cca72ad2f33a3aab964ecae66e057aeecafee2e9986204d6feb98f81ccb740460ee2cb37663b1ab79f47adc1dd73e0091bc WHIRLPOOL c27e612b87b4a30abbf59e6be019e2c21a78bfbdf1715da5498d95607d390d616251768d419ac5ce76087bbf7cdfc410dd0088ba48e425082cea971efcb64346
 DIST xen-security-patches-6.tar.xz 24780 SHA256 b41422583e5f7b4c85b82d89ab66f3e0fa8de8fdb2ae42aa3da40822e9507ef5 SHA512 c58831eb5e26a78a3072623b83bad125ddd4cd67c0075a708be81a7f50ee936cd2e5832a9b88129e11ec81ebafc9cfbc339fb8296d6f4b44c04630b349c4a621 WHIRLPOOL edecaefef0b6dd1a10c479362362640d9bd7a43623085c1f20b1171c65746220d7fdfd0e20892f60ea7d2f6052389da2a1d3c0179a88d7c4d52b3aa33cbef05e
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
new file mode 100644
index 0000000..86df54d
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
@@ -0,0 +1,466 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV=${PV/_/-}
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='xml,threads'
+
+if [[ $PV == *9999 ]]; then
+	KEYWORDS=""
+	REPO="xen-unstable.hg"
+	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
+	S="${WORKDIR}/${REPO}"
+	live_eclass="mercurial"
+else
+	KEYWORDS="amd64 ~arm ~arm64 -x86"
+	UPSTREAM_VER=
+	SECURITY_VER=7
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.7.5
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}
+	https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-0.tar.gz"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	hvm? ( media-libs/libsdl )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? ( x11-libs/pixman )
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	virtual/udev"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patcheset"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patcheset"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		for i in ${XEN_SECURITY_MAIN}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-traditional patches
+		mv "${WORKDIR}"/xsa162-qemut.patch \
+			"${WORKDIR}"/patches-security/qemut/ || die
+		XEN_SECURITY_QEMUT="xsa162-qemut.patch"
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		mv "${WORKDIR}"/xsa162-qemuu.patch \
+                        "${WORKDIR}"/patches-security/qemuu/ || die
+		XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patch set"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	# Don't bother with qemu, only needed for fully virtualised guests
+	if ! use qemu; then
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		"
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" --enable-qemu-traditional"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	use custom-cflags || unset CFLAGS
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	unset LDFLAGS
+	unset CFLAGS
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Temp QA workaround
+	dodir "$(get_udevdir)"
+	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
+	rm -rf "${D}"/etc/udev
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	# TODO: we need to have the current Python slot here.
+	if ! has_version "dev-lang/python[ncurses]"; then
+		echo
+		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+	fi
+
+	if has_version "sys-apps/iproute2[minimal]"; then
+		echo
+		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
+		ewarn "will not work until you rebuild iproute2 without USE=minimal."
+	fi
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+
+	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+		echo
+		elog "xensv is broken upstream (Gentoo bug #142011)."
+		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-12-17 13:59 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2015-12-17 13:59 UTC (permalink / raw
  To: gentoo-commits

commit:     4698dd8e9bf104b3dc3d9065a3fb513d7693bda2
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 17 13:35:31 2015 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Thu Dec 17 13:58:58 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4698dd8e

app-emulation/xen-tools: revbumps to vns. 4.5.2-r3, 4.6.0-r5

security patches added of xsa 164,165,166, and those effecting qemu (4)
from xsa-155 re security  Bug 567962

Gentoo bug: #567962

Package-Manager: portage-2.2.24

 app-emulation/xen-tools/Manifest                  |   3 +
 app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild | 471 ++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild | 463 +++++++++++++++++++++
 3 files changed, 937 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index a67c895..e75efab 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -12,7 +12,10 @@ DIST xen-gentoo-patches-1.tar.xz 23044 SHA256 dcff35bbc4b6946473c9b55ad595a5fea8
 DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73acfdc4df694f7b29c1135180d902049 SHA512 3006ce4cd67e80a9f79d9ba3814a64704b0d762159a439a140b1ec0a2699473cd5537950f0913b55f8f7e3d0fd2e9861f3199793120d8d2502aa3f8ef7816c8f WHIRLPOOL 4a921103df2825ccd8b0481708e7cd692fa45d5aadae286c1522c144a1576920e7d3567648565bb9af85bb6bb597ea9d0ec04ea6abd2115db4caf7e739717b1a
 DIST xen-gentoo-patches-5.tar.xz 23664 SHA256 41e23ec6fb5a4ef5a1f8746de0e33579de2c725368afed6bd2b7506df5e8c2b5 SHA512 8370cef1aa06585e8fa8f8c6eb7f29375ac6f5a240c859ebb6982d1c1ec159c9c331c861f39838f53093cdceca24ee1b0d98c1c92874dd4113e73eb884842eac WHIRLPOOL 4b65283220b66555a69b65331d3dcb8b8353fef584eb723c2a703712bc6eac57b70f500eeeffc511e75d3ab5d3a1eac8aac83133baf4c90ab498b1843764eb9f
 DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
+DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798deff5c2c72d1efb5459c72f4278f00 SHA512 4fd0c663a733436188aca364e927ac430d9bbef9859da65c074d7fd66c330645b05ff1f3e849f4581dfcd7054801d65edcff8445c1c63c2725f11e3903415af0 WHIRLPOOL 5504d7ffbd3c1970026c1f43252d9c76f10c5448ede247719e2698aa8f8e93b20e4cc353da5582b3b6887fb3fd7d1e13765f664ea60daeb6020f052eaca9b9f4
 DIST xen-security-patches-0.tar.gz 1034 SHA256 283dfdf73735d1ce45db7d5b9880fec378317ebda097423b36d61aa1bf2146a8 SHA512 c15374546ddab803f1b1a2bc961f8d8b0ec04c141036f6a0c6a4d60129e23ace2d88ba6b292d6382463fa80d8bf8dbdfd788b325b1baa8a9aa5df63be26f8ed4 WHIRLPOOL 08fe26578f796a97e486e178a1b7b8e515e1d9797bdb868b487eabc95fa4f2063e5d08b554689fdb0392cc85643aaa22a93df197fd68729d4581c127df84fa5a
 DIST xen-security-patches-1.tar.gz 7040 SHA256 30733e9ca71bf4291ff212eb191afb22687ccd9b2579767fe0ee013152980c76 SHA512 89c72897f18a86c2060bb76a182e7cca72ad2f33a3aab964ecae66e057aeecafee2e9986204d6feb98f81ccb740460ee2cb37663b1ab79f47adc1dd73e0091bc WHIRLPOOL c27e612b87b4a30abbf59e6be019e2c21a78bfbdf1715da5498d95607d390d616251768d419ac5ce76087bbf7cdfc410dd0088ba48e425082cea971efcb64346
+DIST xen-security-patches-2.tar.gz 7370 SHA256 f24bf4b0cba29b51ee71f6ef82654cddf157c63d62fc1119f17255b2388e03ab SHA512 209dea670467ff1df18428c15b25229c05d676d1a2f646cddb221544ae888241ade48a22be037f97dce249ac322c1f30bb477675e5e2cc04a2fbd839e02f1f57 WHIRLPOOL ae66a2fbc0d0f0a555d407ebd3198fa58ee043515fb9821d7b9eda46d088bc87b3de16fe015fd1142294429dd2c1c7826e414a55980e27123185c1a86fb0a8a6
+DIST xen-security-patches-3.tar.gz 7349 SHA256 a1876b918c0a608618f349deed11b547a65c5909c31d72a89340d4908c572f46 SHA512 f5e8e7ab5d9be6aa036e52627931f1b2648de642664b2922f9cab64f44d19ac8682f5beb7fdbcb842ee19346202093fade3f10e39ba60fcb12a101deb4408818 WHIRLPOOL 14ee65babe4edd901914c8b8ddb5d7b54e6738d77642514fe611bf84541ae0a932bcb48f86179d5e7a6741135b9c7b129e8244cc22922c4e592604a696b6082f
 DIST xen-security-patches-6.tar.xz 24780 SHA256 b41422583e5f7b4c85b82d89ab66f3e0fa8de8fdb2ae42aa3da40822e9507ef5 SHA512 c58831eb5e26a78a3072623b83bad125ddd4cd67c0075a708be81a7f50ee936cd2e5832a9b88129e11ec81ebafc9cfbc339fb8296d6f4b44c04630b349c4a621 WHIRLPOOL edecaefef0b6dd1a10c479362362640d9bd7a43623085c1f20b1171c65746220d7fdfd0e20892f60ea7d2f6052389da2a1d3c0179a88d7c4d52b3aa33cbef05e
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d

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
new file mode 100644
index 0000000..59e9056
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
@@ -0,0 +1,471 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV=${PV/_/-}
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='xml,threads'
+
+if [[ $PV == *9999 ]]; then
+	KEYWORDS=""
+	REPO="xen-unstable.hg"
+	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
+	S="${WORKDIR}/${REPO}"
+	live_eclass="mercurial"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 -x86"
+	UPSTREAM_VER=
+	SECURITY_VER=7
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	SEC_VER=2
+	QEMU_VER=0
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.7.5
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	hvm? ( media-libs/libsdl )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? ( x11-libs/pixman )
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	virtual/udev"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patcheset"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patcheset"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# Two parallel systems, both work
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+			epatch $i
+		done
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			 epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patch set"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	# Don't bother with qemu, only needed for fully virtualised guests
+	if ! use qemu; then
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		"
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" --enable-qemu-traditional"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	use custom-cflags || unset CFLAGS
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	unset LDFLAGS
+	unset CFLAGS
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Temp QA workaround
+	dodir "$(get_udevdir)"
+	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
+	rm -rf "${D}"/etc/udev
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	# TODO: we need to have the current Python slot here.
+	if ! has_version "dev-lang/python[ncurses]"; then
+		echo
+		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+	fi
+
+	if has_version "sys-apps/iproute2[minimal]"; then
+		echo
+		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
+		ewarn "will not work until you rebuild iproute2 without USE=minimal."
+	fi
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+
+	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+		echo
+		elog "xensv is broken upstream (Gentoo bug #142011)."
+		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+	fi
+}

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
new file mode 100644
index 0000000..104fac9
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
@@ -0,0 +1,463 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 -x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=7
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	SEC_VER=3
+	QEMU_VER=0
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.8.2
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patch set"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+			epatch $i
+		done
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patch set"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" --enable-qemu-traditional"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-12-22  9:01 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2015-12-22  9:01 UTC (permalink / raw
  To: gentoo-commits

commit:     dcc97e706e99388362b791b533ee320a300b655a
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 22 09:00:51 2015 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Tue Dec 22 09:00:51 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcc97e70

app-emulation/xen-tools: amd64 stable wrt bug #566842

Package-Manager: portage-2.2.24
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
index 52f2ffc..8af652c 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 	live_eclass="mercurial"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 -x86"
+	KEYWORDS="amd64 ~arm ~arm64 -x86"
 	UPSTREAM_VER=
 	SECURITY_VER=7
 	SEC_VER=1


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-12-23  2:21 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2015-12-23  2:21 UTC (permalink / raw
  To: gentoo-commits

commit:     15376b7a9fc87586a7767a2f5456dd861d9d0028
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 23 00:22:13 2015 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Wed Dec 23 02:21:02 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15376b7a

app-emulation/xen-tools: clean vn. 4.5.2-r1 re sec bug #566842

Package-Manager: portage-2.2.24

 app-emulation/xen-tools/Manifest                  |   1 -
 app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild | 466 ----------------------
 2 files changed, 467 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index e75efab..69abb00 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -13,7 +13,6 @@ DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73a
 DIST xen-gentoo-patches-5.tar.xz 23664 SHA256 41e23ec6fb5a4ef5a1f8746de0e33579de2c725368afed6bd2b7506df5e8c2b5 SHA512 8370cef1aa06585e8fa8f8c6eb7f29375ac6f5a240c859ebb6982d1c1ec159c9c331c861f39838f53093cdceca24ee1b0d98c1c92874dd4113e73eb884842eac WHIRLPOOL 4b65283220b66555a69b65331d3dcb8b8353fef584eb723c2a703712bc6eac57b70f500eeeffc511e75d3ab5d3a1eac8aac83133baf4c90ab498b1843764eb9f
 DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
 DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798deff5c2c72d1efb5459c72f4278f00 SHA512 4fd0c663a733436188aca364e927ac430d9bbef9859da65c074d7fd66c330645b05ff1f3e849f4581dfcd7054801d65edcff8445c1c63c2725f11e3903415af0 WHIRLPOOL 5504d7ffbd3c1970026c1f43252d9c76f10c5448ede247719e2698aa8f8e93b20e4cc353da5582b3b6887fb3fd7d1e13765f664ea60daeb6020f052eaca9b9f4
-DIST xen-security-patches-0.tar.gz 1034 SHA256 283dfdf73735d1ce45db7d5b9880fec378317ebda097423b36d61aa1bf2146a8 SHA512 c15374546ddab803f1b1a2bc961f8d8b0ec04c141036f6a0c6a4d60129e23ace2d88ba6b292d6382463fa80d8bf8dbdfd788b325b1baa8a9aa5df63be26f8ed4 WHIRLPOOL 08fe26578f796a97e486e178a1b7b8e515e1d9797bdb868b487eabc95fa4f2063e5d08b554689fdb0392cc85643aaa22a93df197fd68729d4581c127df84fa5a
 DIST xen-security-patches-1.tar.gz 7040 SHA256 30733e9ca71bf4291ff212eb191afb22687ccd9b2579767fe0ee013152980c76 SHA512 89c72897f18a86c2060bb76a182e7cca72ad2f33a3aab964ecae66e057aeecafee2e9986204d6feb98f81ccb740460ee2cb37663b1ab79f47adc1dd73e0091bc WHIRLPOOL c27e612b87b4a30abbf59e6be019e2c21a78bfbdf1715da5498d95607d390d616251768d419ac5ce76087bbf7cdfc410dd0088ba48e425082cea971efcb64346
 DIST xen-security-patches-2.tar.gz 7370 SHA256 f24bf4b0cba29b51ee71f6ef82654cddf157c63d62fc1119f17255b2388e03ab SHA512 209dea670467ff1df18428c15b25229c05d676d1a2f646cddb221544ae888241ade48a22be037f97dce249ac322c1f30bb477675e5e2cc04a2fbd839e02f1f57 WHIRLPOOL ae66a2fbc0d0f0a555d407ebd3198fa58ee043515fb9821d7b9eda46d088bc87b3de16fe015fd1142294429dd2c1c7826e414a55980e27123185c1a86fb0a8a6
 DIST xen-security-patches-3.tar.gz 7349 SHA256 a1876b918c0a608618f349deed11b547a65c5909c31d72a89340d4908c572f46 SHA512 f5e8e7ab5d9be6aa036e52627931f1b2648de642664b2922f9cab64f44d19ac8682f5beb7fdbcb842ee19346202093fade3f10e39ba60fcb12a101deb4408818 WHIRLPOOL 14ee65babe4edd901914c8b8ddb5d7b54e6738d77642514fe611bf84541ae0a932bcb48f86179d5e7a6741135b9c7b129e8244cc22922c4e592604a696b6082f

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
deleted file mode 100644
index 86df54d..0000000
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r1.ebuild
+++ /dev/null
@@ -1,466 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_PV=${PV/_/-}
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="amd64 ~arm ~arm64 -x86"
-	UPSTREAM_VER=
-	SECURITY_VER=7
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.7.5
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}
-	https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-0.tar.gz"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	hvm? ( media-libs/libsdl )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
-	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? ( x11-libs/pixman )
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	virtual/udev"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		for i in ${XEN_SECURITY_MAIN}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-traditional patches
-		mv "${WORKDIR}"/xsa162-qemut.patch \
-			"${WORKDIR}"/patches-security/qemut/ || die
-		XEN_SECURITY_QEMUT="xsa162-qemut.patch"
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		mv "${WORKDIR}"/xsa162-qemuu.patch \
-                        "${WORKDIR}"/patches-security/qemuu/ || die
-		XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		"
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	unset CFLAGS
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2015-12-31 14:52 Michał Górny
  0 siblings, 0 replies; 295+ messages in thread
From: Michał Górny @ 2015-12-31 14:52 UTC (permalink / raw
  To: gentoo-commits

commit:     00d02941dd60bdad7b30a95d4c1868c064e4198a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 23 06:53:11 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Dec 31 14:52:03 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00d02941

app-emulation/xen-tools: Make use of new python_gen_impl_dep function

 app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild  | 4 ++--
 app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild  | 4 ++--
 app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild  | 2 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild  | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild b/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
index 67e3d1c..d29aab3 100644
--- a/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
@@ -68,7 +68,7 @@ DEPEND="dev-libs/lzo:2
 	api? ( dev-libs/libxml2
 		net-misc/curl )
 	${PYTHON_DEPS}
-	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+	pygrub? ( $(python_gen_impl_dep ncurses) )
 	sys-devel/bin86
 	sys-devel/dev86
 	dev-lang/perl

diff --git a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild b/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
index ae93f4d..392be10 100644
--- a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
@@ -68,7 +68,7 @@ DEPEND="dev-libs/lzo:2
 	api? ( dev-libs/libxml2
 		net-misc/curl )
 	${PYTHON_DEPS}
-	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
+	pygrub? ( $(python_gen_impl_dep ncurses) )
 	sys-devel/bin86
 	sys-devel/dev86
 	dev-lang/perl

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
index 8af652c..ba2f756 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
@@ -87,8 +87,8 @@ DEPEND="${COMMON_DEPEND}
 	${PYTHON_DEPS}
 	api? ( dev-libs/libxml2
 		net-misc/curl )
-	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
-	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+	pygrub? ( $(python_gen_impl_dep ncurses) )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
 	!amd64? ( >=sys-apps/dtc-1.4.0 )
 	amd64? ( sys-devel/bin86
 		system-seabios? ( sys-firmware/seabios )

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
index 59e9056..a147169 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
@@ -90,8 +90,8 @@ DEPEND="${COMMON_DEPEND}
 	${PYTHON_DEPS}
 	api? ( dev-libs/libxml2
 		net-misc/curl )
-	pygrub? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/ncurses} )
-	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+	pygrub? ( $(python_gen_impl_dep ncurses) )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
 	!amd64? ( >=sys-apps/dtc-1.4.0 )
 	amd64? ( sys-devel/bin86
 		system-seabios? ( sys-firmware/seabios )

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
index 57d618e..e9f84c0 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
@@ -87,7 +87,7 @@ DEPEND="${COMMON_DEPEND}
 	${PYTHON_DEPS}
 	api? ( dev-libs/libxml2
 		net-misc/curl )
-	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
 	!amd64? ( >=sys-apps/dtc-1.4.0 )
 	amd64? ( sys-devel/bin86
 		system-seabios? ( sys-firmware/seabios )

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
index 104fac9..ceb1402 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
@@ -90,7 +90,7 @@ DEPEND="${COMMON_DEPEND}
 	${PYTHON_DEPS}
 	api? ( dev-libs/libxml2
 		net-misc/curl )
-	ovmf? ( ${PYTHON_DEPS//${PYTHON_REQ_USE}/sqlite} )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
 	!amd64? ( >=sys-apps/dtc-1.4.0 )
 	amd64? ( sys-devel/bin86
 		system-seabios? ( sys-firmware/seabios )


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-01-05  1:00 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2016-01-05  1:00 UTC (permalink / raw
  To: gentoo-commits

commit:     36baa1fc5958605af2d8b11e1acf632d3d14f5e9
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  5 00:23:53 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Tue Jan  5 01:00:23 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36baa1fc

app-emulation/xen-tools: re-add keyword x86 to latest of vns. 4.2.5, 4.2.6

These should never have been set to -x86 in xen-tools because they support
xen guests of x86

Package-Manager: portage-2.2.26

 app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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
index a147169..d472363 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 	live_eclass="mercurial"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 -x86"
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/

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
index ceb1402..8733ee6 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 -x86"
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-01-05 11:23 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-01-05 11:23 UTC (permalink / raw
  To: gentoo-commits

commit:     63acd6ac40c297bbec5b61a32cf31d53d72338c2
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  5 11:23:11 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Tue Jan  5 11:23:11 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63acd6ac

app-emulation/xen-tools: amd64 stable wrt bug #570932

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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
index d472363..61c1321 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 	live_eclass="mercurial"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/

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
index 8733ee6..97a7673 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-01-05 14:21 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-01-05 14:21 UTC (permalink / raw
  To: gentoo-commits

commit:     af5377e64fa169f81968545b22ae6369487379a5
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  5 14:21:22 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Tue Jan  5 14:21:22 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af5377e6

app-emulation/xen-tools: x86 stable wrt bug #570932

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

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
index 61c1321..85092c5 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 	live_eclass="mercurial"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/

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
index 97a7673..0517cb3 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-01-06  4:42 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2016-01-06  4:42 UTC (permalink / raw
  To: gentoo-commits

commit:     b702df18d3e51c1aec4cff9659debabd83961df9
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Wed Jan  6 04:38:41 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Wed Jan  6 04:42:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b702df18

app-emulation/xen-tools: re-add deps to support x86 reported in #570974

Gentoo bug: #570974

Package-Manager: portage-2.2.26

 app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild | 4 +++-
 app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

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
index 85092c5..acef34a 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -85,6 +85,8 @@ COMMON_DEPEND="
 
 DEPEND="${COMMON_DEPEND}
 	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
 	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
 	hvm? ( media-libs/libsdl )
 	${PYTHON_DEPS}

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
index 0517cb3..3481cb6 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -86,6 +86,8 @@ COMMON_DEPEND="
 
 DEPEND="${COMMON_DEPEND}
 	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
 	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
 	${PYTHON_DEPS}
 	api? ( dev-libs/libxml2


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-01-07  2:33 Doug Goldstein
  0 siblings, 0 replies; 295+ messages in thread
From: Doug Goldstein @ 2016-01-07  2:33 UTC (permalink / raw
  To: gentoo-commits

commit:     31f9731de2a868d9da693f507d6e4ee3bfeb9bc2
Author:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  2 20:31:18 2016 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Thu Jan  7 02:33:26 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31f9731d

app-emulation/xen-tools: remove unsupported 4.2.x series

Package-Manager: portage-2.2.24
Signed-off-by: Doug Goldstein <cardoe <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   7 -
 app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild | 391 ---------------------
 app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild | 391 ---------------------
 3 files changed, 789 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 69abb00..008dddb 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,20 +1,13 @@
 DIST ovmf-20150629.tar.bz2 24265640 SHA256 9f316dc44e192fa9d5d7486cf1dae3f3094ab4f20f282f80d6251632c2cd6118 SHA512 b15a896b5222b920a500ec8a1eba5d670505441ffd02accf9b6c0deb9a12c1c5513a016f91eae5cb33f75ee9f28435dc957686e6ce8b5d0744c11a7d7262fffd WHIRLPOOL 8db4360dcb85f183dbd827f7381787c84065f94eaf746068b11ef7b30412b16cc0ba75effb04f01dea5f4f67967721f7aca11a2550035e95c59645c7964526ac
-DIST seabios-1.6.3.2.tar.gz 422376 SHA256 888aafe37ef3d1f502a73518a5e4dd0e9373ce4cd41681c354771314f1e41dd7 SHA512 c54431d8e81d25b74427696da689e90d3ab68c7c1be1dec05c81658d28b650f53daa34dcee2da826c1cf5d5d39396b12b0b16ea20ed6fd89de8f732163c8cca5 WHIRLPOOL 826c0e034ca46291661faa363189ee6cf56098cabc39f8fc84d2c442cc2da2174c2fa027cc11e11a7c3fed619f2e524f2aee804d9836d256448cdad28631d69a
 DIST seabios-1.7.5.tar.gz 537566 SHA256 858d9eda4ad91efa1c45a5a401d560ef9ca8dd172f03b0a106f06661c252dc51 SHA512 ecf5fb9ac44dde6e4ac00baa6c920dde51b923f23dd74e62c5a02eceaf235e57b885975c5a8bd0927e268115c72bd1143a080fdfd4eff4e168ebeaa30436280e WHIRLPOOL 5e1e99b3bd82a8607c5986fde4592c7437bec4bd78abd5873710f6c431d075436725e8d0d32e9f0dd2921c9d84b8613108b21d31c5309a73e337ead7adf35e90
 DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61 SHA512 798d222d5f5725a805cde9e6000b5ce714d0551fd4a3c2642cc6e77b2bdab1a9e239939a358a23bbe0e00112f5ad70696c87d20b90655463c835541fc04e1a00 WHIRLPOOL 9cda0ad502a59dd718c543b759ac3fcf5acb4adee70c3da9bfea95ab188415acf6425827de77f45421ec3be8fd9e0c37fb486e62828217ba3e83f88d942a3f4a
-DIST xen-4.2.5-upstream-patches-10.tar.xz 41428 SHA256 b29ce85b049420838c3386b67184f4ba56794846d056837fa780ae89a80b40d0 SHA512 9e8046e27506d864e2d69728897cbba3eea1dd5ca748a3febb722901c5a67cca2ab49bb420071292538bd0345023fa337eb2d176b9ca05ca6bce47562f6710ec WHIRLPOOL 29e534ef6b951cf220a3a9476d1f76ac344bfc5c74998f2b472ec83cbe4781746298272e3c1fe8661a838cbc7d734d2730de6a1e9985b8a60f40c98f54449e2a
-DIST xen-4.2.5-upstream-patches-9.tar.xz 23208 SHA256 2206e9a8aeeed207abbae995c5d2baa14d5f0da4120ae44f2de733ecf7ea5af1 SHA512 8a2edaba48002449a521edf2ae078ffe1b3db4f491a85b063886a147a0be3ec7fdb819ce84c90cdae80ed34c10ab2d637506700be10052a67be6ef128fa40fb1 WHIRLPOOL 037820e0fad60d1f7ed054efa797585c992d08f1ffd533705c515ad289f8cdddc72b97f2a3d75ebd683c6bb6988d7285452b4f3cebbe9a879f701156e387ff3b
-DIST xen-4.2.5.tar.gz 15671925 SHA256 3cf440866315e8085050eb0586f0447b6b47a08dbed6a72226bf5ed5d89ec567 SHA512 42c0fc241952fc55fc44480fb6752b004b54ae40e946159ec047adf229b65cbfbd810271d01b064ad8fdbddb73c640dcdcb6bc19f91e8968829889c129920dac WHIRLPOOL 762a91c0111892b33e6bd3e7f7714709b04697ad7c2b0919fef6cc9570a343a77fd5a2b82833e75dac9d12d4e41acdcf0743b0d593595910ddd326f5cd721368
 DIST xen-4.5.2.tar.gz 18416220 SHA256 4c9e5dac4eea484974e9f76da2756c8e0973b4e884d28d37e955df9ebf00e7e8 SHA512 e0ce01a5356c254bfde48fae0b0e005c42c1615a7ccf4c1ba7dcf90784777b53995e9a9ae4575e3f19ef341014b34cb8c06e39d68be359f7fd69830501a144dd WHIRLPOOL b50ce28e58d8419915f7f85de7ab23128719fa07c54f28165c4ba864ffe57230230fa7cb61dd2ed7608b8bc178a072124aedc30c61a45fb8b745fc616715219b
 DIST xen-4.6.0-upstream-patches-0.tar.xz 19280 SHA256 8ef2d139f86cb52d2208a17c974e5a85356183ee359ab4b91882067548806e0c SHA512 9fde8d9def1d75e50c10069af7f9fea4b5b6992b7089eb554e1e2a4c78dd080f2977128d0dd541eeb735b951e7d6614a07101f7703457e7743ac6b3be962cdfe WHIRLPOOL 861c7f150811912422f6f5eb77437744d1456740a43bef3dfd88a2e6d6836c0e8460b788ccd4f14a7144652d65a825c08aa984ec4240b2b1ac6d09237695d19d
 DIST xen-4.6.0.tar.gz 19694350 SHA256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 SHA512 b4b02f306ffea360f539dd8c231b2f58c00c3638fdb665cb659c7291b475b40f1075bc59d49a6144767729e57b8bc40a1cfd9030d61de2b8fa4ac97d43655c2b WHIRLPOOL d3f01183440ca1875b6e850bd116db0c382383433e50c0902d3268e9e36b39d184fc65e925bdb5363ef4ca7a232fee15b4749c89baf789137b8a8248565c75a8
-DIST xen-gentoo-patches-1.tar.xz 23044 SHA256 dcff35bbc4b6946473c9b55ad595a5fea88e8dac1bd977cbe18a644b2cced2e0 SHA512 a4c66382d44112e7be09711e3ecf0f8ebd9a30b29e04d8aca536430172bdd111ab8bab7700433e0dc35165f876eb7e9cd2e554d74ce2a166fb2dfd4de482cb7a WHIRLPOOL d0443e1501ac813ac3226df32a6b050c03302c3d74e3b3bd1293ab4ad929b5c314cc0eac13505ce8a826ee357117e8eeaf0713fd8b9c55f40296966fda082c2e
 DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73acfdc4df694f7b29c1135180d902049 SHA512 3006ce4cd67e80a9f79d9ba3814a64704b0d762159a439a140b1ec0a2699473cd5537950f0913b55f8f7e3d0fd2e9861f3199793120d8d2502aa3f8ef7816c8f WHIRLPOOL 4a921103df2825ccd8b0481708e7cd692fa45d5aadae286c1522c144a1576920e7d3567648565bb9af85bb6bb597ea9d0ec04ea6abd2115db4caf7e739717b1a
-DIST xen-gentoo-patches-5.tar.xz 23664 SHA256 41e23ec6fb5a4ef5a1f8746de0e33579de2c725368afed6bd2b7506df5e8c2b5 SHA512 8370cef1aa06585e8fa8f8c6eb7f29375ac6f5a240c859ebb6982d1c1ec159c9c331c861f39838f53093cdceca24ee1b0d98c1c92874dd4113e73eb884842eac WHIRLPOOL 4b65283220b66555a69b65331d3dcb8b8353fef584eb723c2a703712bc6eac57b70f500eeeffc511e75d3ab5d3a1eac8aac83133baf4c90ab498b1843764eb9f
 DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
 DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798deff5c2c72d1efb5459c72f4278f00 SHA512 4fd0c663a733436188aca364e927ac430d9bbef9859da65c074d7fd66c330645b05ff1f3e849f4581dfcd7054801d65edcff8445c1c63c2725f11e3903415af0 WHIRLPOOL 5504d7ffbd3c1970026c1f43252d9c76f10c5448ede247719e2698aa8f8e93b20e4cc353da5582b3b6887fb3fd7d1e13765f664ea60daeb6020f052eaca9b9f4
 DIST xen-security-patches-1.tar.gz 7040 SHA256 30733e9ca71bf4291ff212eb191afb22687ccd9b2579767fe0ee013152980c76 SHA512 89c72897f18a86c2060bb76a182e7cca72ad2f33a3aab964ecae66e057aeecafee2e9986204d6feb98f81ccb740460ee2cb37663b1ab79f47adc1dd73e0091bc WHIRLPOOL c27e612b87b4a30abbf59e6be019e2c21a78bfbdf1715da5498d95607d390d616251768d419ac5ce76087bbf7cdfc410dd0088ba48e425082cea971efcb64346
 DIST xen-security-patches-2.tar.gz 7370 SHA256 f24bf4b0cba29b51ee71f6ef82654cddf157c63d62fc1119f17255b2388e03ab SHA512 209dea670467ff1df18428c15b25229c05d676d1a2f646cddb221544ae888241ade48a22be037f97dce249ac322c1f30bb477675e5e2cc04a2fbd839e02f1f57 WHIRLPOOL ae66a2fbc0d0f0a555d407ebd3198fa58ee043515fb9821d7b9eda46d088bc87b3de16fe015fd1142294429dd2c1c7826e414a55980e27123185c1a86fb0a8a6
 DIST xen-security-patches-3.tar.gz 7349 SHA256 a1876b918c0a608618f349deed11b547a65c5909c31d72a89340d4908c572f46 SHA512 f5e8e7ab5d9be6aa036e52627931f1b2648de642664b2922f9cab64f44d19ac8682f5beb7fdbcb842ee19346202093fade3f10e39ba60fcb12a101deb4408818 WHIRLPOOL 14ee65babe4edd901914c8b8ddb5d7b54e6738d77642514fe611bf84541ae0a932bcb48f86179d5e7a6741135b9c7b129e8244cc22922c4e592604a696b6082f
-DIST xen-security-patches-6.tar.xz 24780 SHA256 b41422583e5f7b4c85b82d89ab66f3e0fa8de8fdb2ae42aa3da40822e9507ef5 SHA512 c58831eb5e26a78a3072623b83bad125ddd4cd67c0075a708be81a7f50ee936cd2e5832a9b88129e11ec81ebafc9cfbc339fb8296d6f4b44c04630b349c4a621 WHIRLPOOL edecaefef0b6dd1a10c479362362640d9bd7a43623085c1f20b1171c65746220d7fdfd0e20892f60ea7d2f6052389da2a1d3c0179a88d7c4d52b3aa33cbef05e
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d

diff --git a/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild b/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
deleted file mode 100644
index d29aab3..0000000
--- a/app-emulation/xen-tools/xen-tools-4.2.5-r10.ebuild
+++ /dev/null
@@ -1,391 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="amd64 x86"
-	UPSTREAM_VER=9
-	SECURITY_VER=6
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=1
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	SEABIOS_VER=1.6.3.2
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-	S="${WORKDIR}/xen-${PV}"
-fi
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml pygrub screen static-libs system-seabios"
-
-REQUIRED_USE="hvm? ( qemu )
-	${PYTHON_REQUIRED_USE}"
-
-DEPEND="dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libgcrypt:0
-	dev-python/lxml[${PYTHON_USEDEP}]
-	dev-python/pypam[${PYTHON_USEDEP}]
-	sys-libs/zlib
-	sys-power/iasl
-	system-seabios? ( sys-firmware/seabios )
-	sys-firmware/ipxe
-	dev-ml/findlib
-	hvm? ( media-libs/libsdl )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	${PYTHON_DEPS}
-	pygrub? ( $(python_gen_impl_dep ncurses) )
-	sys-devel/bin86
-	sys-devel/dev86
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-tex/latex2html[png,gif]
-		media-gfx/transfig
-		media-gfx/graphviz
-		dev-tex/xcolor
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? (  x11-proto/xproto
-		!net-libs/libiscsi )"
-RDEPEND="sys-apps/iproute2
-	net-misc/bridge-utils
-	ocaml? ( >=dev-lang/ocaml-4 )
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	virtual/udev"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if use qemu; then
-		export "CONFIG_IOEMU=y"
-	else
-		export "CONFIG_IOEMU=n"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-
-	use api     && export "LIBXENAPI_BINDINGS=y"
-	use flask   && export "FLASK_ENABLE=y"
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		for i in ${XEN_SECURITY_MAIN}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-	fi
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patcheset"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	use system-seabios && epatch "${WORKDIR}"/patches-gentoo/${PN}-4-unbundle-seabios.patch
-
-	if gcc-specs-pie; then
-		epatch "${WORKDIR}"/patches-gentoo/ipxe-nopie.patch
-	fi
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' -i tools/Makefile || die
-	fi
-
-	# Disable hvm support on systems that don't support x86_32 binaries.
-	if ! use hvm; then
-		sed -e '/^CONFIG_IOEMU := y$/d' -i config/*.mk || die
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "/^CONFIG_IOEMU := y$/d" -i config/*.mk || die
-		sed -e "s:install-tools\: tools/ioemu-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# Bug 445986
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' -i tools/firmware/Makefile || die
-
-	# fix QA warning, create /var/run/, /var/lock dynamically
-	sed -i -e "/\$(INSTALL_DIR) \$(DESTDIR)\$(XEN_RUN_DIR)/d" \
-		tools/libxl/Makefile || die
-
-	sed -i -e "/\/var\/run\//d" \
-		tools/xenstore/Makefile \
-		tools/pygrub/Makefile || die
-
-	sed -i -e "/\/var\/lock\/subsys/d" \
-		tools/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons || die
-
-	epatch_user
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	unset CFLAGS
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" install-tools \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${ED}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=1:autoballoon=1:' \
-		-e 's:^#lockfile="/var/lock/xl":lockfile="/var/lock/xl":' \
-		-e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \
-		-i tools/examples/xl.conf  || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${ED}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${ED}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	if [[ "${ARCH}" == 'amd64' ]] && use qemu; then
-		mkdir -p "${D}"usr/$(get_libdir)/xen/bin || die
-		mv "${D}"usr/lib/xen/bin/qemu* "${D}"usr/$(get_libdir)/xen/bin/ || die
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# xend expects these to exist
-	keepdir /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://www.gentoo.org/doc/en/xen-gu"${D}"usr/ide.xml"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem at boot."
-	elog "Add by use of rc-update on completion of the install"
-
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild b/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
deleted file mode 100644
index 392be10..0000000
--- a/app-emulation/xen-tools/xen-tools-4.2.5-r11.ebuild
+++ /dev/null
@@ -1,391 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="amd64 x86"
-	UPSTREAM_VER=10
-	SECURITY_VER=7
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=5
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	SEABIOS_VER=1.6.3.2
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-	S="${WORKDIR}/xen-${PV}"
-fi
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml pygrub screen static-libs system-seabios"
-
-REQUIRED_USE="hvm? ( qemu )
-	${PYTHON_REQUIRED_USE}"
-
-DEPEND="dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libgcrypt:0
-	dev-python/lxml[${PYTHON_USEDEP}]
-	dev-python/pypam[${PYTHON_USEDEP}]
-	sys-libs/zlib
-	sys-power/iasl
-	system-seabios? ( sys-firmware/seabios )
-	sys-firmware/ipxe
-	dev-ml/findlib
-	hvm? ( media-libs/libsdl )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	${PYTHON_DEPS}
-	pygrub? ( $(python_gen_impl_dep ncurses) )
-	sys-devel/bin86
-	sys-devel/dev86
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-tex/latex2html[png,gif]
-		media-gfx/transfig
-		media-gfx/graphviz
-		dev-tex/xcolor
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? (  x11-proto/xproto
-		!net-libs/libiscsi )"
-RDEPEND="sys-apps/iproute2
-	net-misc/bridge-utils
-	ocaml? ( >=dev-lang/ocaml-4 )
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	virtual/udev"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if use qemu; then
-		export "CONFIG_IOEMU=y"
-	else
-		export "CONFIG_IOEMU=n"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-
-	use api     && export "LIBXENAPI_BINDINGS=y"
-	use flask   && export "FLASK_ENABLE=y"
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		for i in ${XEN_SECURITY_MAIN}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-	fi
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patcheset"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	use system-seabios && epatch "${WORKDIR}"/patches-gentoo/${PN}-4-unbundle-seabios.patch
-
-	if gcc-specs-pie; then
-		epatch "${WORKDIR}"/patches-gentoo/ipxe-nopie.patch
-	fi
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' -i tools/Makefile || die
-	fi
-
-	# Disable hvm support on systems that don't support x86_32 binaries.
-	if ! use hvm; then
-		sed -e '/^CONFIG_IOEMU := y$/d' -i config/*.mk || die
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "/^CONFIG_IOEMU := y$/d" -i config/*.mk || die
-		sed -e "s:install-tools\: tools/ioemu-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# Bug 445986
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' -i tools/firmware/Makefile || die
-
-	# fix QA warning, create /var/run/, /var/lock dynamically
-	sed -i -e "/\$(INSTALL_DIR) \$(DESTDIR)\$(XEN_RUN_DIR)/d" \
-		tools/libxl/Makefile || die
-
-	sed -i -e "/\/var\/run\//d" \
-		tools/xenstore/Makefile \
-		tools/pygrub/Makefile || die
-
-	sed -i -e "/\/var\/lock\/subsys/d" \
-		tools/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons || die
-
-	epatch_user
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	unset CFLAGS
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" install-tools \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${ED}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=1:autoballoon=1:' \
-		-e 's:^#lockfile="/var/lock/xl":lockfile="/var/lock/xl":' \
-		-e 's:^#vifscript="vif-bridge":vifscript="vif-bridge":' \
-		-i tools/examples/xl.conf  || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${ED}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${ED}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	if [[ "${ARCH}" == 'amd64' ]] && use qemu; then
-		mkdir -p "${D}"usr/$(get_libdir)/xen/bin || die
-		mv "${D}"usr/lib/xen/bin/qemu* "${D}"usr/$(get_libdir)/xen/bin/ || die
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# xend expects these to exist
-	keepdir /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://www.gentoo.org/doc/en/xen-gu"${D}"usr/ide.xml"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem at boot."
-	elog "Add by use of rc-update on completion of the install"
-
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-01-12 14:24 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2016-01-12 14:24 UTC (permalink / raw
  To: gentoo-commits

commit:     c0f7eaeaf1ffa9353a0bd7d1ba1808f6c431e1e5
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 12 14:19:45 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Tue Jan 12 14:23:53 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0f7eaea

app-emulation/xen:-tools revbump to 4.6.0-r6 from addition of 1 upstream patch

Package-Manager: portage-2.2.26

 app-emulation/xen-tools/Manifest                  |   1 +
 app-emulation/xen-tools/xen-tools-4.6.0-r6.ebuild | 469 ++++++++++++++++++++++
 2 files changed, 470 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 008dddb..9000654 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -11,3 +11,4 @@ DIST xen-security-patches-1.tar.gz 7040 SHA256 30733e9ca71bf4291ff212eb191afb226
 DIST xen-security-patches-2.tar.gz 7370 SHA256 f24bf4b0cba29b51ee71f6ef82654cddf157c63d62fc1119f17255b2388e03ab SHA512 209dea670467ff1df18428c15b25229c05d676d1a2f646cddb221544ae888241ade48a22be037f97dce249ac322c1f30bb477675e5e2cc04a2fbd839e02f1f57 WHIRLPOOL ae66a2fbc0d0f0a555d407ebd3198fa58ee043515fb9821d7b9eda46d088bc87b3de16fe015fd1142294429dd2c1c7826e414a55980e27123185c1a86fb0a8a6
 DIST xen-security-patches-3.tar.gz 7349 SHA256 a1876b918c0a608618f349deed11b547a65c5909c31d72a89340d4908c572f46 SHA512 f5e8e7ab5d9be6aa036e52627931f1b2648de642664b2922f9cab64f44d19ac8682f5beb7fdbcb842ee19346202093fade3f10e39ba60fcb12a101deb4408818 WHIRLPOOL 14ee65babe4edd901914c8b8ddb5d7b54e6738d77642514fe611bf84541ae0a932bcb48f86179d5e7a6741135b9c7b129e8244cc22922c4e592604a696b6082f
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
+DIST xen-upstream-patches-0.tar.gz 2297 SHA256 bf21272ad029391d30bf31896efcadc75267538f6c7de5d239453f19659d58ee SHA512 3f5d60aaebd181bddab4dd02e0064de2f75672f44a687a7331fa40e81d56763fea84504081a449d11403b21ad0ba2dac075f0b1796809ef8d16e244f6be99e3d WHIRLPOOL 4ebe79c8f2ea1c45e88e59941e477ed5639dbca3fe95c9a67e07afb0f4b6fb8b7fea8e58422d7c8f906299e4f37c14b4db15200997e5a92b647df98fa93e10c7

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
new file mode 100644
index 0000000..b0c8b5f
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r6.ebuild
@@ -0,0 +1,469 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=7
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	# first instance of UPS_VER (usptream ver)
+	UPS_VER=0
+	SEC_VER=3
+	QEMU_VER=0
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.8.2
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream \
+				"${WORKDIR}"/libexec.patch
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patch set"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+			epatch $i
+		done
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patch set"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" --enable-qemu-traditional"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-01-21 14:16 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2016-01-21 14:16 UTC (permalink / raw
  To: gentoo-commits

commit:     dd9ecb826db3250e60c35d188804cb16cf0a6dde
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 21 14:03:25 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Thu Jan 21 14:15:56 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd9ecb82

app-emulation/xen-tools: revbumps to vns. 4.5.2-r4 4.6.0-r7

wrt gentoo security bug. patches added; xsa 167-4.6, xsa168
Purging of led version to await stabilsation of revbumped vns.

Gentoo bug: #571556, #571552

Package-Manager: portage-2.2.26

 app-emulation/xen-tools/Manifest                  |   2 +
 app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild | 473 ++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild | 469 +++++++++++++++++++++
 3 files changed, 944 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 9000654..4a880d3 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -10,5 +10,7 @@ DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798def
 DIST xen-security-patches-1.tar.gz 7040 SHA256 30733e9ca71bf4291ff212eb191afb22687ccd9b2579767fe0ee013152980c76 SHA512 89c72897f18a86c2060bb76a182e7cca72ad2f33a3aab964ecae66e057aeecafee2e9986204d6feb98f81ccb740460ee2cb37663b1ab79f47adc1dd73e0091bc WHIRLPOOL c27e612b87b4a30abbf59e6be019e2c21a78bfbdf1715da5498d95607d390d616251768d419ac5ce76087bbf7cdfc410dd0088ba48e425082cea971efcb64346
 DIST xen-security-patches-2.tar.gz 7370 SHA256 f24bf4b0cba29b51ee71f6ef82654cddf157c63d62fc1119f17255b2388e03ab SHA512 209dea670467ff1df18428c15b25229c05d676d1a2f646cddb221544ae888241ade48a22be037f97dce249ac322c1f30bb477675e5e2cc04a2fbd839e02f1f57 WHIRLPOOL ae66a2fbc0d0f0a555d407ebd3198fa58ee043515fb9821d7b9eda46d088bc87b3de16fe015fd1142294429dd2c1c7826e414a55980e27123185c1a86fb0a8a6
 DIST xen-security-patches-3.tar.gz 7349 SHA256 a1876b918c0a608618f349deed11b547a65c5909c31d72a89340d4908c572f46 SHA512 f5e8e7ab5d9be6aa036e52627931f1b2648de642664b2922f9cab64f44d19ac8682f5beb7fdbcb842ee19346202093fade3f10e39ba60fcb12a101deb4408818 WHIRLPOOL 14ee65babe4edd901914c8b8ddb5d7b54e6738d77642514fe611bf84541ae0a932bcb48f86179d5e7a6741135b9c7b129e8244cc22922c4e592604a696b6082f
+DIST xen-security-patches-5.tar.gz 8716 SHA256 afd114f2cb1b623ac1709d75c771006f91b5b2a0a0695f4da3d6aa6f6b340d9f SHA512 f2276759cb418e252052701f5e41e626e1d232098bd7e393e7e58286d356ef33f249c2f9d7b5b1219279de7c4c66832f0d4f761d36bc51e7c10cea973dd9882e WHIRLPOOL 18cb29a0fde10f1bac698c577713db1307c02408778b5d128a4f017ae8be6fba893feb9b8f09fe2d8164dc761d136190d1dbee8a3eb4caa35d8bf976a498d405
+DIST xen-security-patches-6.tar.gz 8308 SHA256 b0dc1df6b27073a83b12a17a04a01e74af8c19a1c96d9dda580bb738eaab25f3 SHA512 b9155eef3f18e47288a6a6bb570a073d4c84449fe11fbac4c35cceaa4f7c06624597f63a8768bddd735c345b8c430aeee18b71f43e9b188de3cfa0cbf608dc0a WHIRLPOOL 9933ed07a2419170070a9eedfda200ec5ebef67b6b98c1b435793008c126347cdc8c0ef9ff2cb4fe0b7333ff51211545a3fe2ff726ca7c22d46f231d6d1e82aa
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
 DIST xen-upstream-patches-0.tar.gz 2297 SHA256 bf21272ad029391d30bf31896efcadc75267538f6c7de5d239453f19659d58ee SHA512 3f5d60aaebd181bddab4dd02e0064de2f75672f44a687a7331fa40e81d56763fea84504081a449d11403b21ad0ba2dac075f0b1796809ef8d16e244f6be99e3d WHIRLPOOL 4ebe79c8f2ea1c45e88e59941e477ed5639dbca3fe95c9a67e07afb0f4b6fb8b7fea8e58422d7c8f906299e4f37c14b4db15200997e5a92b647df98fa93e10c7

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild
new file mode 100644
index 0000000..9e2b240
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild
@@ -0,0 +1,473 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV=${PV/_/-}
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='xml,threads'
+
+if [[ $PV == *9999 ]]; then
+	KEYWORDS=""
+	REPO="xen-unstable.hg"
+	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
+	S="${WORKDIR}/${REPO}"
+	live_eclass="mercurial"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=7
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	SEC_VER=6
+	QEMU_VER=0
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.7.5
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	hvm? ( media-libs/libsdl )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	pygrub? ( $(python_gen_impl_dep ncurses) )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? ( x11-libs/pixman )
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	virtual/udev"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patcheset"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patcheset"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# Two parallel systems, both work
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+			epatch $i
+		done
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			 epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patch set"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	# Don't bother with qemu, only needed for fully virtualised guests
+	if ! use qemu; then
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		"
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" --enable-qemu-traditional"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	use custom-cflags || unset CFLAGS
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	unset LDFLAGS
+	unset CFLAGS
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Temp QA workaround
+	dodir "$(get_udevdir)"
+	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
+	rm -rf "${D}"/etc/udev
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	# TODO: we need to have the current Python slot here.
+	if ! has_version "dev-lang/python[ncurses]"; then
+		echo
+		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+	fi
+
+	if has_version "sys-apps/iproute2[minimal]"; then
+		echo
+		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
+		ewarn "will not work until you rebuild iproute2 without USE=minimal."
+	fi
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+
+	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+		echo
+		elog "xensv is broken upstream (Gentoo bug #142011)."
+		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild
new file mode 100644
index 0000000..69a38dd
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild
@@ -0,0 +1,469 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=7
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	# first instance of UPS_VER (usptream ver)
+	UPS_VER=0
+	SEC_VER=5
+	QEMU_VER=0
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.8.2
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream \
+				"${WORKDIR}"/libexec.patch
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patch set"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+			epatch $i
+		done
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patch set"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" --enable-qemu-traditional"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-01-22  9:31 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-01-22  9:31 UTC (permalink / raw
  To: gentoo-commits

commit:     08649fec185e0318faa0a9242bcac40194faadae
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 22 09:31:17 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Jan 22 09:31:17 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08649fec

app-emulation/xen-tools: amd64 stable wrt bug #571552

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild
index 9e2b240..5197bb8 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 	live_eclass="mercurial"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild
index 69a38dd..f409ab8 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-01-22 10:01 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-01-22 10:01 UTC (permalink / raw
  To: gentoo-commits

commit:     19274d085d8fcf2eedfeb720f5cba31fa5386b32
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 22 10:00:54 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Jan 22 10:00:54 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19274d08

app-emulation/xen-tools: x86 stable wrt bug #571552

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild
index 5197bb8..d2be7c5 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 	live_eclass="mercurial"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild
index f409ab8..d4d83ff 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-02-15 15:55 Doug Goldstein
  0 siblings, 0 replies; 295+ messages in thread
From: Doug Goldstein @ 2016-02-15 15:55 UTC (permalink / raw
  To: gentoo-commits

commit:     e4143d850ad54c74ca616880972b9b40e8df8e6f
Author:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 15 15:50:35 2016 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Mon Feb 15 15:55:36 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4143d85

app-emulation/xen-tools: allow qemu-traditional to be disabled

Provide the ability for the qemu-traditional device model to be disabled.
This device model should not be used unless you have machines that are
depending on it (e.g. Windows domains).

Package-Manager: portage-2.2.26
Signed-off-by: Doug Goldstein <cardoe <AT> gentoo.org>

 app-emulation/xen-tools/metadata.xml              |   1 +
 app-emulation/xen-tools/xen-tools-4.6.0-r8.ebuild | 469 ++++++++++++++++++++++
 2 files changed, 470 insertions(+)

diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
index 9b082eb..5009c6f 100644
--- a/app-emulation/xen-tools/metadata.xml
+++ b/app-emulation/xen-tools/metadata.xml
@@ -10,6 +10,7 @@
 		<flag name="flask">Enable the Flask XSM module from NSA</flag>
 		<flag name="hvm">Enable support for hardware based virtualization (VT-x,AMD-v)</flag>
 		<flag name="qemu">Enable IOEMU support via the use of qemu-dm</flag>
+		<flag name="qemu-traditional">Build the old qemu traditional device model (useful only if you cannot change to the new device model e.g. Windows VMs)</flag>
 		<flag name="pygrub">Install the pygrub boot loader</flag>
 		<flag name="screen">Enable support for running domain U console in an <pkg>app-misc/screen</pkg> session</flag>
 		<flag name="system-qemu">Using <pkg>app-emulation/qemu</pkg> instead of the bundled one</flag>

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r8.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r8.ebuild
new file mode 100644
index 0000000..1c747e4
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r8.ebuild
@@ -0,0 +1,469 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=7
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	# first instance of UPS_VER (usptream ver)
+	UPS_VER=0
+	SEC_VER=5
+	QEMU_VER=0
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.8.2
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream \
+				"${WORKDIR}"/libexec.patch
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patch set"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+			epatch $i
+		done
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patch set"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-02-16 16:19 Doug Goldstein
  0 siblings, 0 replies; 295+ messages in thread
From: Doug Goldstein @ 2016-02-16 16:19 UTC (permalink / raw
  To: gentoo-commits

commit:     9f5724f90e7f58a1a17ab0ace5aa0665714f57e2
Author:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 16 16:19:07 2016 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Tue Feb 16 16:19:34 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f5724f9

app-emulation/xen-tools: enable USE=qemu-traditional by default

To avoid breaking people, enable USE=qemu-traditional by default so that
xen-tools behaves like it has in the past.

Package-Manager: portage-2.2.26
Signed-off-by: Doug Goldstein <cardoe <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.6.0-r8.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r8.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r8.ebuild
index 1c747e4..17c69f7 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r8.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r8.ebuild
@@ -70,7 +70,7 @@ SLOT="0/${MAJOR_V}"
 # Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
 # >=dev-lang/ocaml-4 stable
 # Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
 
 REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
 	${PYTHON_REQUIRED_USE}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-02-18  3:17 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-02-18  3:17 UTC (permalink / raw
  To: gentoo-commits

commit:     1e4ed66f2c53e64a4c3d14e357a3ae97611c3b25
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 18 03:03:11 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Feb 18 03:06:22 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e4ed66f

app-emulation/xen-tools: drop old versions

Package-Manager: portage-2.2.27

 app-emulation/xen-tools/Manifest                  |   3 -
 app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild | 472 ---------------------
 app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild | 473 ----------------------
 app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild | 463 ---------------------
 app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild | 465 ---------------------
 app-emulation/xen-tools/xen-tools-4.6.0-r6.ebuild | 469 ---------------------
 6 files changed, 2345 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index e4b823f..80dc2ff 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -10,9 +10,6 @@ DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73a
 DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
 DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798deff5c2c72d1efb5459c72f4278f00 SHA512 4fd0c663a733436188aca364e927ac430d9bbef9859da65c074d7fd66c330645b05ff1f3e849f4581dfcd7054801d65edcff8445c1c63c2725f11e3903415af0 WHIRLPOOL 5504d7ffbd3c1970026c1f43252d9c76f10c5448ede247719e2698aa8f8e93b20e4cc353da5582b3b6887fb3fd7d1e13765f664ea60daeb6020f052eaca9b9f4
-DIST xen-security-patches-1.tar.gz 7040 SHA256 30733e9ca71bf4291ff212eb191afb22687ccd9b2579767fe0ee013152980c76 SHA512 89c72897f18a86c2060bb76a182e7cca72ad2f33a3aab964ecae66e057aeecafee2e9986204d6feb98f81ccb740460ee2cb37663b1ab79f47adc1dd73e0091bc WHIRLPOOL c27e612b87b4a30abbf59e6be019e2c21a78bfbdf1715da5498d95607d390d616251768d419ac5ce76087bbf7cdfc410dd0088ba48e425082cea971efcb64346
-DIST xen-security-patches-2.tar.gz 7370 SHA256 f24bf4b0cba29b51ee71f6ef82654cddf157c63d62fc1119f17255b2388e03ab SHA512 209dea670467ff1df18428c15b25229c05d676d1a2f646cddb221544ae888241ade48a22be037f97dce249ac322c1f30bb477675e5e2cc04a2fbd839e02f1f57 WHIRLPOOL ae66a2fbc0d0f0a555d407ebd3198fa58ee043515fb9821d7b9eda46d088bc87b3de16fe015fd1142294429dd2c1c7826e414a55980e27123185c1a86fb0a8a6
-DIST xen-security-patches-3.tar.gz 7349 SHA256 a1876b918c0a608618f349deed11b547a65c5909c31d72a89340d4908c572f46 SHA512 f5e8e7ab5d9be6aa036e52627931f1b2648de642664b2922f9cab64f44d19ac8682f5beb7fdbcb842ee19346202093fade3f10e39ba60fcb12a101deb4408818 WHIRLPOOL 14ee65babe4edd901914c8b8ddb5d7b54e6738d77642514fe611bf84541ae0a932bcb48f86179d5e7a6741135b9c7b129e8244cc22922c4e592604a696b6082f
 DIST xen-security-patches-5.tar.gz 8716 SHA256 afd114f2cb1b623ac1709d75c771006f91b5b2a0a0695f4da3d6aa6f6b340d9f SHA512 f2276759cb418e252052701f5e41e626e1d232098bd7e393e7e58286d356ef33f249c2f9d7b5b1219279de7c4c66832f0d4f761d36bc51e7c10cea973dd9882e WHIRLPOOL 18cb29a0fde10f1bac698c577713db1307c02408778b5d128a4f017ae8be6fba893feb9b8f09fe2d8164dc761d136190d1dbee8a3eb4caa35d8bf976a498d405
 DIST xen-security-patches-6.tar.gz 8308 SHA256 b0dc1df6b27073a83b12a17a04a01e74af8c19a1c96d9dda580bb738eaab25f3 SHA512 b9155eef3f18e47288a6a6bb570a073d4c84449fe11fbac4c35cceaa4f7c06624597f63a8768bddd735c345b8c430aeee18b71f43e9b188de3cfa0cbf608dc0a WHIRLPOOL 9933ed07a2419170070a9eedfda200ec5ebef67b6b98c1b435793008c126347cdc8c0ef9ff2cb4fe0b7333ff51211545a3fe2ff726ca7c22d46f231d6d1e82aa
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d

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
deleted file mode 100644
index ba2f756..0000000
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r2.ebuild
+++ /dev/null
@@ -1,472 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_PV=${PV/_/-}
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="amd64 ~arm ~arm64 -x86"
-	UPSTREAM_VER=
-	SECURITY_VER=7
-	SEC_VER=1
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.7.5
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}
-	https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-${SEC_VER}.tar.gz"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	hvm? ( media-libs/libsdl )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	pygrub? ( $(python_gen_impl_dep ncurses) )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? ( x11-libs/pixman )
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	virtual/udev"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# In contrast to xen-4.5.2-r2.ebuild, these are moved into the dir structure
-		# prepared and deposited by dlan in his devspace
-		mv "${WORKDIR}"/{xsa156-4.5.patch,xsa15[8-9].patch,xsa160-4.6.patch} \
-			"${WORKDIR}"/patches-security/xen || die
-		XEN_SECURITY_MAIN="${XEN_SECURITY_MAIN} xsa156-4.5.patch xsa15[8-9].patch xsa160-4.6.patch"
-		for i in ${XEN_SECURITY_MAIN}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-traditional patches
-		mv "${WORKDIR}"/xsa162-qemut.patch \
-			"${WORKDIR}"/patches-security/qemut/ || die
-		XEN_SECURITY_QEMUT="xsa162-qemut.patch"
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		mv "${WORKDIR}"/xsa162-qemuu.patch \
-                        "${WORKDIR}"/patches-security/qemuu/ || die
-		XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		"
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	unset CFLAGS
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-}

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
deleted file mode 100644
index acef34a..0000000
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r3.ebuild
+++ /dev/null
@@ -1,473 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_PV=${PV/_/-}
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=
-	SECURITY_VER=7
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	SEC_VER=2
-	QEMU_VER=0
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.7.5
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	hvm? ( media-libs/libsdl )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	pygrub? ( $(python_gen_impl_dep ncurses) )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? ( x11-libs/pixman )
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	virtual/udev"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# Two parallel systems, both work
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			 epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		"
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	unset CFLAGS
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-}

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
deleted file mode 100644
index e9f84c0..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r4.ebuild
+++ /dev/null
@@ -1,463 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 -x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=7
-	SEC_VER=1
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.8.2
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}
-	https://dev.gentoo.org/~idella4/distfiles/xen-security-patches-${SEC_VER}.tar.gz"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patch set"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# In contrast to xen-4.5.2-r2.ebuild, these are moved into the dir structure
-		# prepared and deposited by dlan in his devspace
-		mv "${WORKDIR}"/{xsa15[6-9].patch,xsa160-4.6.patch} \
-			"${WORKDIR}"/patches-security/xen || die
-		XEN_SECURITY_MAIN="${XEN_SECURITY_MAIN} xsa15[6-9].patch xsa160-4.6.patch"
-		for i in ${XEN_SECURITY_MAIN}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-traditional patches
-		mv "${WORKDIR}"/xsa162-qemut.patch \
-			"${WORKDIR}"/patches-security/qemut/ || die
-		XEN_SECURITY_QEMUT="xsa162-qemut.patch"
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		mv "${WORKDIR}"/xsa162-qemuu.patch \
-			"${WORKDIR}"/patches-security/qemuu/ || die
-		XEN_SECURITY_QEMUU="xsa162-qemuu.patch"
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

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
deleted file mode 100644
index 3481cb6..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r5.ebuild
+++ /dev/null
@@ -1,465 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=7
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	SEC_VER=3
-	QEMU_VER=0
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.8.2
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patch set"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

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
deleted file mode 100644
index b0c8b5f..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r6.ebuild
+++ /dev/null
@@ -1,469 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=7
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=0
-	SEC_VER=3
-	QEMU_VER=0
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.8.2
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patch set"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-02-18 20:57 Jason Donenfeld
  0 siblings, 0 replies; 295+ messages in thread
From: Jason Donenfeld @ 2016-02-18 20:57 UTC (permalink / raw
  To: gentoo-commits

commit:     630ba4d588590822f4a788414e012bfb21a3e738
Author:     Austin S. Hemmelgarn <ahferroin7 <AT> gmail <DOT> com>
AuthorDate: Thu Feb 18 20:55:28 2016 +0000
Commit:     Jason Donenfeld <zx2c4 <AT> gentoo <DOT> org>
CommitDate: Thu Feb 18 20:57:14 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=630ba4d5

app-emulation/xen-tools: Move ovmf move into conditional section

Package-Manager: portage-2.2.27

 app-emulation/xen-tools/xen-tools-4.6.1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1.ebuild
index c433fd8..9f9d763 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.1.ebuild
@@ -248,8 +248,8 @@ src_prepare() {
 		EPATCH_OPTS="-p1" \
 			epatch "${WORKDIR}"/patches-ovmf
 		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
 	fi
-	mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
 
 	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-02-19  1:28 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-02-19  1:28 UTC (permalink / raw
  To: gentoo-commits

commit:     b0a219ea59f69af680e1c5e80010686bc60be351
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 19 01:27:01 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Feb 19 01:27:31 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0a219ea

app-emulation/xen-tools: correct patching ovmf logic

while bumping ovmf, I found current logic not
handling USE=ovmf enabled && ${OVMF_VER} is unset case

Package-Manager: portage-2.2.27

 app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild | 18 ++++++++++--------
 app-emulation/xen-tools/xen-tools-4.6.1.ebuild    | 18 ++++++++++--------
 2 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild
index d2be7c5..94994ca 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild
@@ -233,14 +233,16 @@ src_prepare() {
 	fi
 
 	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
 		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
 	fi
 

diff --git a/app-emulation/xen-tools/xen-tools-4.6.1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1.ebuild
index 9f9d763..c380955 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.1.ebuild
@@ -240,14 +240,16 @@ src_prepare() {
 	fi
 
 	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
 		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
 	fi
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-02-19 16:08 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2016-02-19 16:08 UTC (permalink / raw
  To: gentoo-commits

commit:     ec32258807e87fb951a93726c93f823abb681ba3
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 19 15:59:30 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Fri Feb 19 16:08:34 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec322588

app-emulation/xen-tools: revbumps; 4.5.2-r5, 4.6.0-r9

add sec patches xsa170 wrt the security bug

Gentoo bug: #574012

Package-Manager: portage-2.2.26

 app-emulation/xen-tools/Manifest                  |   2 +
 app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild | 475 ++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild | 469 +++++++++++++++++++++
 3 files changed, 946 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index fc36474..98368b3 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -14,4 +14,6 @@ DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798def
 DIST xen-security-patches-5.tar.gz 8716 SHA256 afd114f2cb1b623ac1709d75c771006f91b5b2a0a0695f4da3d6aa6f6b340d9f SHA512 f2276759cb418e252052701f5e41e626e1d232098bd7e393e7e58286d356ef33f249c2f9d7b5b1219279de7c4c66832f0d4f761d36bc51e7c10cea973dd9882e WHIRLPOOL 18cb29a0fde10f1bac698c577713db1307c02408778b5d128a4f017ae8be6fba893feb9b8f09fe2d8164dc761d136190d1dbee8a3eb4caa35d8bf976a498d405
 DIST xen-security-patches-6.tar.gz 8308 SHA256 b0dc1df6b27073a83b12a17a04a01e74af8c19a1c96d9dda580bb738eaab25f3 SHA512 b9155eef3f18e47288a6a6bb570a073d4c84449fe11fbac4c35cceaa4f7c06624597f63a8768bddd735c345b8c430aeee18b71f43e9b188de3cfa0cbf608dc0a WHIRLPOOL 9933ed07a2419170070a9eedfda200ec5ebef67b6b98c1b435793008c126347cdc8c0ef9ff2cb4fe0b7333ff51211545a3fe2ff726ca7c22d46f231d6d1e82aa
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
+DIST xen-security-patches-8.tar.gz 9416 SHA256 3c0e6e8428f1890c8dda72ac94244fa3d6611b3612ef59ffed29b59481806a12 SHA512 f5ee325a8b25079ea256cb5a2e039e6738dee999be6d9d91ade875663c36f72a086bcb0bd1bb243483afb921da401c5d7453fea7405323fdaf8cf6e06a221049 WHIRLPOOL c30f14bb8a1a3ad22a962d4050027fa89a373f742c3eb7a161e1490beb186c6221f24247cd84b07e7f266c38aae6ef386f2e4db29a4b43cceaaaa54b644bb4f1
+DIST xen-security-patches-9.tar.gz 9793 SHA256 2167d7bc2a631cf13d5b49c9577dbc8d128517e8ecbf90ef85c38f52ab3187aa SHA512 42f4997f35cc06333584a9a3c65366493094b60a6c67928b6165f3fb7d35d3a8f9dc0c3eadd4522de0d99bcc8511afba1d5e543396399b37983eb547abedca44 WHIRLPOOL 8abb68b4ac10fbc2b590c8a29cd2474d5392d3958542dad7f21ba4ad51c7541bb1686ed2629323e214c3e72b0de7212f25a4681f653d4179404c9f4c53e3d83a
 DIST xen-upstream-patches-0.tar.gz 2297 SHA256 bf21272ad029391d30bf31896efcadc75267538f6c7de5d239453f19659d58ee SHA512 3f5d60aaebd181bddab4dd02e0064de2f75672f44a687a7331fa40e81d56763fea84504081a449d11403b21ad0ba2dac075f0b1796809ef8d16e244f6be99e3d WHIRLPOOL 4ebe79c8f2ea1c45e88e59941e477ed5639dbca3fe95c9a67e07afb0f4b6fb8b7fea8e58422d7c8f906299e4f37c14b4db15200997e5a92b647df98fa93e10c7

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild
new file mode 100644
index 0000000..650d23d
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild
@@ -0,0 +1,475 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV=${PV/_/-}
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='xml,threads'
+
+if [[ $PV == *9999 ]]; then
+	KEYWORDS=""
+	REPO="xen-unstable.hg"
+	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
+	S="${WORKDIR}/${REPO}"
+	live_eclass="mercurial"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=7
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	SEC_VER=8
+	QEMU_VER=0
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.7.5
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	hvm? ( media-libs/libsdl )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	pygrub? ( $(python_gen_impl_dep ncurses) )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? ( x11-libs/pixman )
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	virtual/udev"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patcheset"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patcheset"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# Two parallel systems, both work
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+			epatch $i
+		done
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			 epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	# Don't bother with qemu, only needed for fully virtualised guests
+	if ! use qemu; then
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		"
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" --enable-qemu-traditional"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	use custom-cflags || unset CFLAGS
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	unset LDFLAGS
+	unset CFLAGS
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Temp QA workaround
+	dodir "$(get_udevdir)"
+	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
+	rm -rf "${D}"/etc/udev
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	# TODO: we need to have the current Python slot here.
+	if ! has_version "dev-lang/python[ncurses]"; then
+		echo
+		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+	fi
+
+	if has_version "sys-apps/iproute2[minimal]"; then
+		echo
+		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
+		ewarn "will not work until you rebuild iproute2 without USE=minimal."
+	fi
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+
+	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+		echo
+		elog "xensv is broken upstream (Gentoo bug #142011)."
+		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild
new file mode 100644
index 0000000..2d03445
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild
@@ -0,0 +1,469 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=7
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	# first instance of UPS_VER (usptream ver)
+	UPS_VER=0
+	SEC_VER=9
+	QEMU_VER=0
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.8.2
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam +qemu-traditional python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream \
+				"${WORKDIR}"/libexec.patch
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patch set"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+			epatch $i
+		done
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patch set"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-03-15  8:11 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-03-15  8:11 UTC (permalink / raw
  To: gentoo-commits

commit:     a78c592549b94974c892374b391eb9d6eca44136
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 15 08:11:24 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Tue Mar 15 08:11:24 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a78c5925

app-emulation/xen-tools: amd64 stable wrt bug #574012

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild
index 650d23d..c8b063b 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 	live_eclass="mercurial"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild
index 2d03445..3d9b62f 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-03-15  8:13 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-03-15  8:13 UTC (permalink / raw
  To: gentoo-commits

commit:     c18f955bdd63fd36ca345f2346f89498606ec918
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 15 08:12:57 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Tue Mar 15 08:12:57 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c18f955b

app-emulation/xen-tools: x86 stable wrt bug #574012

Package-Manager: portage-2.2.26
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild
index c8b063b..77b13ea 100644
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 	live_eclass="mercurial"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild
index 3d9b62f..92486da 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=7
 	# vars set to reflect https://dev.gentoo.org/~idella4/


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-03-15 13:39 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2016-03-15 13:39 UTC (permalink / raw
  To: gentoo-commits

commit:     6902e0a359d140d0c8e9bbc9d6dacc5edf16d695
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 15 13:39:19 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Tue Mar 15 13:39:19 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6902e0a3

app-emulation/xen-tools: clean old vulnerable vns.

wrt the gentoo security bug

Gentoo bug: #574012

Package-Manager: portage-2.2.26

 app-emulation/xen-tools/Manifest                  |   2 -
 app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild | 475 ----------------------
 app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild | 469 ---------------------
 app-emulation/xen-tools/xen-tools-4.6.0-r8.ebuild | 469 ---------------------
 4 files changed, 1415 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 98368b3..1798ba6 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -11,8 +11,6 @@ DIST xen-gentoo-patches-6.tar.xz 23864 SHA256 96e774bd03c9df341fdb2f5d6cf231549c
 DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
 DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798deff5c2c72d1efb5459c72f4278f00 SHA512 4fd0c663a733436188aca364e927ac430d9bbef9859da65c074d7fd66c330645b05ff1f3e849f4581dfcd7054801d65edcff8445c1c63c2725f11e3903415af0 WHIRLPOOL 5504d7ffbd3c1970026c1f43252d9c76f10c5448ede247719e2698aa8f8e93b20e4cc353da5582b3b6887fb3fd7d1e13765f664ea60daeb6020f052eaca9b9f4
-DIST xen-security-patches-5.tar.gz 8716 SHA256 afd114f2cb1b623ac1709d75c771006f91b5b2a0a0695f4da3d6aa6f6b340d9f SHA512 f2276759cb418e252052701f5e41e626e1d232098bd7e393e7e58286d356ef33f249c2f9d7b5b1219279de7c4c66832f0d4f761d36bc51e7c10cea973dd9882e WHIRLPOOL 18cb29a0fde10f1bac698c577713db1307c02408778b5d128a4f017ae8be6fba893feb9b8f09fe2d8164dc761d136190d1dbee8a3eb4caa35d8bf976a498d405
-DIST xen-security-patches-6.tar.gz 8308 SHA256 b0dc1df6b27073a83b12a17a04a01e74af8c19a1c96d9dda580bb738eaab25f3 SHA512 b9155eef3f18e47288a6a6bb570a073d4c84449fe11fbac4c35cceaa4f7c06624597f63a8768bddd735c345b8c430aeee18b71f43e9b188de3cfa0cbf608dc0a WHIRLPOOL 9933ed07a2419170070a9eedfda200ec5ebef67b6b98c1b435793008c126347cdc8c0ef9ff2cb4fe0b7333ff51211545a3fe2ff726ca7c22d46f231d6d1e82aa
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
 DIST xen-security-patches-8.tar.gz 9416 SHA256 3c0e6e8428f1890c8dda72ac94244fa3d6611b3612ef59ffed29b59481806a12 SHA512 f5ee325a8b25079ea256cb5a2e039e6738dee999be6d9d91ade875663c36f72a086bcb0bd1bb243483afb921da401c5d7453fea7405323fdaf8cf6e06a221049 WHIRLPOOL c30f14bb8a1a3ad22a962d4050027fa89a373f742c3eb7a161e1490beb186c6221f24247cd84b07e7f266c38aae6ef386f2e4db29a4b43cceaaaa54b644bb4f1
 DIST xen-security-patches-9.tar.gz 9793 SHA256 2167d7bc2a631cf13d5b49c9577dbc8d128517e8ecbf90ef85c38f52ab3187aa SHA512 42f4997f35cc06333584a9a3c65366493094b60a6c67928b6165f3fb7d35d3a8f9dc0c3eadd4522de0d99bcc8511afba1d5e543396399b37983eb547abedca44 WHIRLPOOL 8abb68b4ac10fbc2b590c8a29cd2474d5392d3958542dad7f21ba4ad51c7541bb1686ed2629323e214c3e72b0de7212f25a4681f653d4179404c9f4c53e3d83a

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild
deleted file mode 100644
index 94994ca..0000000
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r4.ebuild
+++ /dev/null
@@ -1,475 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_PV=${PV/_/-}
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=
-	SECURITY_VER=7
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	SEC_VER=6
-	QEMU_VER=0
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.7.5
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	hvm? ( media-libs/libsdl )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	pygrub? ( $(python_gen_impl_dep ncurses) )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? ( x11-libs/pixman )
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	virtual/udev"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# Two parallel systems, both work
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			 epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		"
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	unset CFLAGS
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild
deleted file mode 100644
index d4d83ff..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r7.ebuild
+++ /dev/null
@@ -1,469 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=7
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=0
-	SEC_VER=5
-	QEMU_VER=0
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.8.2
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patch set"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r8.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r8.ebuild
deleted file mode 100644
index 17c69f7..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r8.ebuild
+++ /dev/null
@@ -1,469 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=7
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=0
-	SEC_VER=5
-	QEMU_VER=0
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.8.2
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patch set"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-04-14 12:07 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2016-04-14 12:07 UTC (permalink / raw
  To: gentoo-commits

commit:     5e3265d6af09ae438104fc24c8e8537c4c235061
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 14 12:00:50 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Thu Apr 14 12:07:01 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e3265d6

app-emulation/xen-tools: correct typo in source of vn. 4.6.1

noted in gentoo bug, set with an equivalent sed statement substituting
an upstream patch, the sed being completed in one line

Gentoo-bug: #575868

Package-Manager: portage-2.2.28

 app-emulation/xen-tools/xen-tools-4.6.1.ebuild | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1.ebuild
index c84766c..a63bbda 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.1.ebuild
@@ -348,6 +348,9 @@ src_prepare() {
 		-e 's:^#vif.default.script=:vif.default.script=:' \
 		-i tools/examples/xl.conf  || die
 
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
 	epatch_user
 }
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-04-23 10:05 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2016-04-23 10:05 UTC (permalink / raw
  To: gentoo-commits

commit:     90911e349565fc34ba172e2622e2ec29650844be
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 23 09:57:23 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Sat Apr 23 10:05:42 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90911e34

app-emulation/xen-tools: revbumps subsequent to addition of xsa sec patches

versions; 4.5.2-r6 4.6.0-r10 4.6.1-r1
sec patches; xsa 172 173

Gentoo-bug: #579074 #579072

Package-Manager: portage-2.2.28

 app-emulation/xen-tools/Manifest                   |   2 +
 app-emulation/xen-tools/xen-tools-4.5.2-r6.ebuild  | 475 +++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.6.0-r10.ebuild | 469 ++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.6.1-r1.ebuild  | 474 ++++++++++++++++++++
 4 files changed, 1420 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 1798ba6..04a2d4c 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -11,6 +11,8 @@ DIST xen-gentoo-patches-6.tar.xz 23864 SHA256 96e774bd03c9df341fdb2f5d6cf231549c
 DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
 DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798deff5c2c72d1efb5459c72f4278f00 SHA512 4fd0c663a733436188aca364e927ac430d9bbef9859da65c074d7fd66c330645b05ff1f3e849f4581dfcd7054801d65edcff8445c1c63c2725f11e3903415af0 WHIRLPOOL 5504d7ffbd3c1970026c1f43252d9c76f10c5448ede247719e2698aa8f8e93b20e4cc353da5582b3b6887fb3fd7d1e13765f664ea60daeb6020f052eaca9b9f4
+DIST xen-security-patches-10.tar.gz 13289 SHA256 8937b3c0045f83ac0685ce129c99be8ab035f2ed92605d0c1100d4f898d978a3 SHA512 698963479149bd63695b3ffd7d108b798ce6c694560f2908b639f3a1b00d37d4994fbc1e0e21aaba1f3a113653d5b37c28679bc1d97d75a805844345c9c070c0 WHIRLPOOL 8c2433c35499819906abf5cb8898dac23cbf7523cc4b4e9291e696eb2871971a7300d3f54865ac32738a1b67c1de18e227085f14c5717b60ec951d5038fa0493
+DIST xen-security-patches-11.tar.gz 12639 SHA256 285e009010387be18bc8588f4dca3b3ec86a637a4afb13a7a5a23b0406a36d68 SHA512 af0f0f1bacbbb3d2141267dea623f5f69e95190ddd9ef62a5c0e9eef548c248a230dc08cc07e77e206e9f8ad19fd24bc1828e25c44370091673af4dff66f5c8a WHIRLPOOL 8b085a726f8f2ed9a354103dc29f83b427db934cfaa87b9391fba934c18562765f5f99ef560189bc8d0814d37fbf5deb57a5992e4d76ebddac06c8ffb74da8de
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
 DIST xen-security-patches-8.tar.gz 9416 SHA256 3c0e6e8428f1890c8dda72ac94244fa3d6611b3612ef59ffed29b59481806a12 SHA512 f5ee325a8b25079ea256cb5a2e039e6738dee999be6d9d91ade875663c36f72a086bcb0bd1bb243483afb921da401c5d7453fea7405323fdaf8cf6e06a221049 WHIRLPOOL c30f14bb8a1a3ad22a962d4050027fa89a373f742c3eb7a161e1490beb186c6221f24247cd84b07e7f266c38aae6ef386f2e4db29a4b43cceaaaa54b644bb4f1
 DIST xen-security-patches-9.tar.gz 9793 SHA256 2167d7bc2a631cf13d5b49c9577dbc8d128517e8ecbf90ef85c38f52ab3187aa SHA512 42f4997f35cc06333584a9a3c65366493094b60a6c67928b6165f3fb7d35d3a8f9dc0c3eadd4522de0d99bcc8511afba1d5e543396399b37983eb547abedca44 WHIRLPOOL 8abb68b4ac10fbc2b590c8a29cd2474d5392d3958542dad7f21ba4ad51c7541bb1686ed2629323e214c3e72b0de7212f25a4681f653d4179404c9f4c53e3d83a

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r6.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r6.ebuild
new file mode 100644
index 0000000..18d800e
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.5.2-r6.ebuild
@@ -0,0 +1,475 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_PV=${PV/_/-}
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='xml,threads'
+
+if [[ $PV == *9999 ]]; then
+	KEYWORDS=""
+	REPO="xen-unstable.hg"
+	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
+	S="${WORKDIR}/${REPO}"
+	live_eclass="mercurial"
+else
+	KEYWORDS="~amd64 ~arm ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=7
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	SEC_VER=11
+	QEMU_VER=0
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.7.5
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	hvm? ( media-libs/libsdl )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	pygrub? ( $(python_gen_impl_dep ncurses) )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? ( x11-libs/pixman )
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	virtual/udev"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patcheset"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patcheset"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# Two parallel systems, both work
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+			epatch $i
+		done
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			 epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	# Don't bother with qemu, only needed for fully virtualised guests
+	if ! use qemu; then
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		"
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" --enable-qemu-traditional"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	use custom-cflags || unset CFLAGS
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	unset LDFLAGS
+	unset CFLAGS
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Temp QA workaround
+	dodir "$(get_udevdir)"
+	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
+	rm -rf "${D}"/etc/udev
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	# TODO: we need to have the current Python slot here.
+	if ! has_version "dev-lang/python[ncurses]"; then
+		echo
+		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+	fi
+
+	if has_version "sys-apps/iproute2[minimal]"; then
+		echo
+		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
+		ewarn "will not work until you rebuild iproute2 without USE=minimal."
+	fi
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+
+	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+		echo
+		elog "xensv is broken upstream (Gentoo bug #142011)."
+		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r10.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r10.ebuild
new file mode 100644
index 0000000..8e879dc
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r10.ebuild
@@ -0,0 +1,469 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=7
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	# first instance of UPS_VER (usptream ver)
+	UPS_VER=0
+	SEC_VER=10
+	QEMU_VER=0
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.8.2
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam +qemu-traditional python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream \
+				"${WORKDIR}"/libexec.patch
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patch set"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+			epatch $i
+		done
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patch set"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1-r1.ebuild
new file mode 100644
index 0000000..ecf2593
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.1-r1.ebuild
@@ -0,0 +1,474 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	# first instance of UPS_VER (usptream ver)
+	UPS_VER=
+	SEC_VER=
+	QEMU_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=6
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.gz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream \
+				"${WORKDIR}"/libexec.patch
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patch set"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+			epatch $i
+		done
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-05-15  3:13 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2016-05-15  3:13 UTC (permalink / raw
  To: gentoo-commits

commit:     e5ca69ac07d1c39986ca44a5b6bbb000ab4a5485
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Sun May 15 02:34:11 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Sun May 15 03:13:10 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5ca69ac

app-emulation/xen-tools: rebumps: xen-tools-4.6.0-r11 xen-tools-4.6.0-r10

consequent to the security bug re patches of xsa-179 affecting qemuu

Gentoo-bug: #582574

Package-Manager: portage-2.2.28

 app-emulation/xen-tools/Manifest                   |   2 +
 app-emulation/xen-tools/xen-tools-4.6.0-r11.ebuild | 469 +++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.6.1-r2.ebuild  | 449 ++++++++++++++++++++
 3 files changed, 920 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 04a2d4c..cef75ed 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -11,6 +11,8 @@ DIST xen-gentoo-patches-6.tar.xz 23864 SHA256 96e774bd03c9df341fdb2f5d6cf231549c
 DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
 DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798deff5c2c72d1efb5459c72f4278f00 SHA512 4fd0c663a733436188aca364e927ac430d9bbef9859da65c074d7fd66c330645b05ff1f3e849f4581dfcd7054801d65edcff8445c1c63c2725f11e3903415af0 WHIRLPOOL 5504d7ffbd3c1970026c1f43252d9c76f10c5448ede247719e2698aa8f8e93b20e4cc353da5582b3b6887fb3fd7d1e13765f664ea60daeb6020f052eaca9b9f4
+DIST xen-qemu-patches-2.tar.gz 4690 SHA256 5850513c6c6e1c68da7a04526bfc3f7ee049b1c5cbcd370d2dfcee94b49f84e9 SHA512 fb1adcccffdd53193699287049da719f826ab8ab819130e7747cb6de9f6f9446fde223e26772a6ee7380ee0691acffac2c970691583ef6cb06f3c597acac824e WHIRLPOOL ea6dc377c69261246d68342b0bf33bdcd07447f1d3547862da10dd0e72d0a6d96fcdfb5df422e88fd7119a6edc7c8990f02d33bbb4c401534aba55b287ac63fe
+DIST xen-qemu-patches-3.tar.gz 7866 SHA256 40ec7e127c149d25f783f050c693776db4f5ded7b488fba3be4b88c85c33d981 SHA512 ca1c5a10c986dcc6e39fbcb606493532203f051d622fbd7318b4c6f69b686889d81c143c7eaf7c91b1e925aa4f7667fb8f80d887ac2b45172a9db4c4231e7feb WHIRLPOOL 1aee478c6eb39fd204a0b88c02770a304765f7dba979bdebd4dd882c77b947038219aab99be95010c308207eb18d276c127c1bb5c69c62e0ef2bbb618fd99e17
 DIST xen-security-patches-10.tar.gz 13289 SHA256 8937b3c0045f83ac0685ce129c99be8ab035f2ed92605d0c1100d4f898d978a3 SHA512 698963479149bd63695b3ffd7d108b798ce6c694560f2908b639f3a1b00d37d4994fbc1e0e21aaba1f3a113653d5b37c28679bc1d97d75a805844345c9c070c0 WHIRLPOOL 8c2433c35499819906abf5cb8898dac23cbf7523cc4b4e9291e696eb2871971a7300d3f54865ac32738a1b67c1de18e227085f14c5717b60ec951d5038fa0493
 DIST xen-security-patches-11.tar.gz 12639 SHA256 285e009010387be18bc8588f4dca3b3ec86a637a4afb13a7a5a23b0406a36d68 SHA512 af0f0f1bacbbb3d2141267dea623f5f69e95190ddd9ef62a5c0e9eef548c248a230dc08cc07e77e206e9f8ad19fd24bc1828e25c44370091673af4dff66f5c8a WHIRLPOOL 8b085a726f8f2ed9a354103dc29f83b427db934cfaa87b9391fba934c18562765f5f99ef560189bc8d0814d37fbf5deb57a5992e4d76ebddac06c8ffb74da8de
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r11.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r11.ebuild
new file mode 100644
index 0000000..0ce7a84
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.0-r11.ebuild
@@ -0,0 +1,469 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=7
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	# first instance of UPS_VER (usptream ver)
+	UPS_VER=0
+	SEC_VER=10
+	QEMU_VER=3
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=4
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=1
+
+	SEABIOS_VER=1.8.2
+	OVMF_PV=20150629
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam +qemu-traditional python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream \
+				"${WORKDIR}"/libexec.patch
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		einfo "Try to apply Xen Security patch set"
+		source "${WORKDIR}"/patches-security/${PV}.conf
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+			epatch $i
+		done
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if [[ -n ${OVMF_VER} ]] && use ovmf; then
+		einfo "Try to apply Ovmf patch set"
+		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-ovmf
+		popd > /dev/null
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1-r2.ebuild
new file mode 100644
index 0000000..1d23c9f
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.1-r2.ebuild
@@ -0,0 +1,449 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=2
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	# first instance of UPS_VER (usptream ver)
+	UPS_VER=
+	SEC_VER=
+	QEMU_VER=2
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=6
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
+#		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.gz
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream \
+				"${WORKDIR}"/libexec.patch
+	fi
+
+	# Security patchset
+	if [[ -n ${QEMU_VER} ]]; then
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-05-15  3:13 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2016-05-15  3:13 UTC (permalink / raw
  To: gentoo-commits

commit:     9bf842c2e0b974678536ce5c578b847386fd739d
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Sun May 15 02:38:05 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Sun May 15 03:13:10 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bf842c2

app-emulation/xen-tools: rm old vns. 4.5.2

Package-Manager: portage-2.2.28

 app-emulation/xen-tools/Manifest                  |   4 -
 app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild | 475 ----------------------
 app-emulation/xen-tools/xen-tools-4.5.2-r6.ebuild | 475 ----------------------
 3 files changed, 954 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index cef75ed..78c1042 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,8 +1,6 @@
 DIST ovmf-20150629.tar.bz2 24265640 SHA256 9f316dc44e192fa9d5d7486cf1dae3f3094ab4f20f282f80d6251632c2cd6118 SHA512 b15a896b5222b920a500ec8a1eba5d670505441ffd02accf9b6c0deb9a12c1c5513a016f91eae5cb33f75ee9f28435dc957686e6ce8b5d0744c11a7d7262fffd WHIRLPOOL 8db4360dcb85f183dbd827f7381787c84065f94eaf746068b11ef7b30412b16cc0ba75effb04f01dea5f4f67967721f7aca11a2550035e95c59645c7964526ac
 DIST ovmf-20151110.tar.bz2 27518370 SHA256 74199f6b5c6f756881323242742c396c52096db5f61700a4eb839343f9ab0604 SHA512 dda185af2fc0b9a8d5fc7e1e96db6aa31807782fe77d38491896164d125c30d2277db3d71a7dce7bbd569723b344b97dfebbc78ddddca0a095721f6b1ae3a1d3 WHIRLPOOL 145fb1c873cce96b81b269b44800987ca1b7350425b682fd5a5799648b0270c6c17bb337ad7e06650e6b66a9ac6eef8d9c9239f1478a687be4af187e60c3f3f5
-DIST seabios-1.7.5.tar.gz 537566 SHA256 858d9eda4ad91efa1c45a5a401d560ef9ca8dd172f03b0a106f06661c252dc51 SHA512 ecf5fb9ac44dde6e4ac00baa6c920dde51b923f23dd74e62c5a02eceaf235e57b885975c5a8bd0927e268115c72bd1143a080fdfd4eff4e168ebeaa30436280e WHIRLPOOL 5e1e99b3bd82a8607c5986fde4592c7437bec4bd78abd5873710f6c431d075436725e8d0d32e9f0dd2921c9d84b8613108b21d31c5309a73e337ead7adf35e90
 DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61 SHA512 798d222d5f5725a805cde9e6000b5ce714d0551fd4a3c2642cc6e77b2bdab1a9e239939a358a23bbe0e00112f5ad70696c87d20b90655463c835541fc04e1a00 WHIRLPOOL 9cda0ad502a59dd718c543b759ac3fcf5acb4adee70c3da9bfea95ab188415acf6425827de77f45421ec3be8fd9e0c37fb486e62828217ba3e83f88d942a3f4a
-DIST xen-4.5.2.tar.gz 18416220 SHA256 4c9e5dac4eea484974e9f76da2756c8e0973b4e884d28d37e955df9ebf00e7e8 SHA512 e0ce01a5356c254bfde48fae0b0e005c42c1615a7ccf4c1ba7dcf90784777b53995e9a9ae4575e3f19ef341014b34cb8c06e39d68be359f7fd69830501a144dd WHIRLPOOL b50ce28e58d8419915f7f85de7ab23128719fa07c54f28165c4ba864ffe57230230fa7cb61dd2ed7608b8bc178a072124aedc30c61a45fb8b745fc616715219b
 DIST xen-4.6.0-upstream-patches-0.tar.xz 19280 SHA256 8ef2d139f86cb52d2208a17c974e5a85356183ee359ab4b91882067548806e0c SHA512 9fde8d9def1d75e50c10069af7f9fea4b5b6992b7089eb554e1e2a4c78dd080f2977128d0dd541eeb735b951e7d6614a07101f7703457e7743ac6b3be962cdfe WHIRLPOOL 861c7f150811912422f6f5eb77437744d1456740a43bef3dfd88a2e6d6836c0e8460b788ccd4f14a7144652d65a825c08aa984ec4240b2b1ac6d09237695d19d
 DIST xen-4.6.0.tar.gz 19694350 SHA256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 SHA512 b4b02f306ffea360f539dd8c231b2f58c00c3638fdb665cb659c7291b475b40f1075bc59d49a6144767729e57b8bc40a1cfd9030d61de2b8fa4ac97d43655c2b WHIRLPOOL d3f01183440ca1875b6e850bd116db0c382383433e50c0902d3268e9e36b39d184fc65e925bdb5363ef4ca7a232fee15b4749c89baf789137b8a8248565c75a8
 DIST xen-4.6.1.tar.gz 19693042 SHA256 44cc2fccba1e147ef4c8da0584ce0f24189c8743de0e3e9a9226da88ddb5f589 SHA512 f01a0b7874abf8b3a81432428d7ba2d5aceb9d75ae20310f8ef49a3a0df927720a51d49090f74fda7f374c779e121ad26da6966a6f2623ed1a7743b4c080427c WHIRLPOOL b4eec12118d602d1b41edee32ed7c0c61646974060bc44e3eedaf78f7c3015c151998f72573fd2bab1992263dd98f09992772334bae7826048d187de7ed022e5
@@ -14,8 +12,6 @@ DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798def
 DIST xen-qemu-patches-2.tar.gz 4690 SHA256 5850513c6c6e1c68da7a04526bfc3f7ee049b1c5cbcd370d2dfcee94b49f84e9 SHA512 fb1adcccffdd53193699287049da719f826ab8ab819130e7747cb6de9f6f9446fde223e26772a6ee7380ee0691acffac2c970691583ef6cb06f3c597acac824e WHIRLPOOL ea6dc377c69261246d68342b0bf33bdcd07447f1d3547862da10dd0e72d0a6d96fcdfb5df422e88fd7119a6edc7c8990f02d33bbb4c401534aba55b287ac63fe
 DIST xen-qemu-patches-3.tar.gz 7866 SHA256 40ec7e127c149d25f783f050c693776db4f5ded7b488fba3be4b88c85c33d981 SHA512 ca1c5a10c986dcc6e39fbcb606493532203f051d622fbd7318b4c6f69b686889d81c143c7eaf7c91b1e925aa4f7667fb8f80d887ac2b45172a9db4c4231e7feb WHIRLPOOL 1aee478c6eb39fd204a0b88c02770a304765f7dba979bdebd4dd882c77b947038219aab99be95010c308207eb18d276c127c1bb5c69c62e0ef2bbb618fd99e17
 DIST xen-security-patches-10.tar.gz 13289 SHA256 8937b3c0045f83ac0685ce129c99be8ab035f2ed92605d0c1100d4f898d978a3 SHA512 698963479149bd63695b3ffd7d108b798ce6c694560f2908b639f3a1b00d37d4994fbc1e0e21aaba1f3a113653d5b37c28679bc1d97d75a805844345c9c070c0 WHIRLPOOL 8c2433c35499819906abf5cb8898dac23cbf7523cc4b4e9291e696eb2871971a7300d3f54865ac32738a1b67c1de18e227085f14c5717b60ec951d5038fa0493
-DIST xen-security-patches-11.tar.gz 12639 SHA256 285e009010387be18bc8588f4dca3b3ec86a637a4afb13a7a5a23b0406a36d68 SHA512 af0f0f1bacbbb3d2141267dea623f5f69e95190ddd9ef62a5c0e9eef548c248a230dc08cc07e77e206e9f8ad19fd24bc1828e25c44370091673af4dff66f5c8a WHIRLPOOL 8b085a726f8f2ed9a354103dc29f83b427db934cfaa87b9391fba934c18562765f5f99ef560189bc8d0814d37fbf5deb57a5992e4d76ebddac06c8ffb74da8de
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
-DIST xen-security-patches-8.tar.gz 9416 SHA256 3c0e6e8428f1890c8dda72ac94244fa3d6611b3612ef59ffed29b59481806a12 SHA512 f5ee325a8b25079ea256cb5a2e039e6738dee999be6d9d91ade875663c36f72a086bcb0bd1bb243483afb921da401c5d7453fea7405323fdaf8cf6e06a221049 WHIRLPOOL c30f14bb8a1a3ad22a962d4050027fa89a373f742c3eb7a161e1490beb186c6221f24247cd84b07e7f266c38aae6ef386f2e4db29a4b43cceaaaa54b644bb4f1
 DIST xen-security-patches-9.tar.gz 9793 SHA256 2167d7bc2a631cf13d5b49c9577dbc8d128517e8ecbf90ef85c38f52ab3187aa SHA512 42f4997f35cc06333584a9a3c65366493094b60a6c67928b6165f3fb7d35d3a8f9dc0c3eadd4522de0d99bcc8511afba1d5e543396399b37983eb547abedca44 WHIRLPOOL 8abb68b4ac10fbc2b590c8a29cd2474d5392d3958542dad7f21ba4ad51c7541bb1686ed2629323e214c3e72b0de7212f25a4681f653d4179404c9f4c53e3d83a
 DIST xen-upstream-patches-0.tar.gz 2297 SHA256 bf21272ad029391d30bf31896efcadc75267538f6c7de5d239453f19659d58ee SHA512 3f5d60aaebd181bddab4dd02e0064de2f75672f44a687a7331fa40e81d56763fea84504081a449d11403b21ad0ba2dac075f0b1796809ef8d16e244f6be99e3d WHIRLPOOL 4ebe79c8f2ea1c45e88e59941e477ed5639dbca3fe95c9a67e07afb0f4b6fb8b7fea8e58422d7c8f906299e4f37c14b4db15200997e5a92b647df98fa93e10c7

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild
deleted file mode 100644
index 77b13ea..0000000
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r5.ebuild
+++ /dev/null
@@ -1,475 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_PV=${PV/_/-}
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=
-	SECURITY_VER=7
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	SEC_VER=8
-	QEMU_VER=0
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.7.5
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	hvm? ( media-libs/libsdl )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	pygrub? ( $(python_gen_impl_dep ncurses) )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? ( x11-libs/pixman )
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	virtual/udev"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# Two parallel systems, both work
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			 epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		"
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	unset CFLAGS
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.5.2-r6.ebuild b/app-emulation/xen-tools/xen-tools-4.5.2-r6.ebuild
deleted file mode 100644
index 18d800e..0000000
--- a/app-emulation/xen-tools/xen-tools-4.5.2-r6.ebuild
+++ /dev/null
@@ -1,475 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-MY_PV=${PV/_/-}
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='xml,threads'
-
-if [[ $PV == *9999 ]]; then
-	KEYWORDS=""
-	REPO="xen-unstable.hg"
-	EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
-	S="${WORKDIR}/${REPO}"
-	live_eclass="mercurial"
-else
-	KEYWORDS="~amd64 ~arm ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=7
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	SEC_VER=11
-	QEMU_VER=0
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.7.5
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs udev ${live_eclass}
-
-DESCRIPTION="Xend daemon and tools"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam python pygrub screen static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	hvm? ( media-libs/libsdl )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	pygrub? ( $(python_gen_impl_dep ncurses) )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? ( x11-libs/pixman )
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	virtual/udev"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patcheset"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# Two parallel systems, both work
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			 epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	# Don't bother with qemu, only needed for fully virtualised guests
-	if ! use qemu; then
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		"
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" --enable-qemu-traditional"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	use custom-cflags || unset CFLAGS
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	unset LDFLAGS
-	unset CFLAGS
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Temp QA workaround
-	dodir "$(get_udevdir)"
-	mv "${D}"/etc/udev/* "${D}/$(get_udevdir)"
-	rm -rf "${D}"/etc/udev
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	# TODO: we need to have the current Python slot here.
-	if ! has_version "dev-lang/python[ncurses]"; then
-		echo
-		ewarn "NB: Your dev-lang/python is built without USE=ncurses."
-		ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
-	fi
-
-	if has_version "sys-apps/iproute2[minimal]"; then
-		echo
-		ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
-		ewarn "will not work until you rebuild iproute2 without USE=minimal."
-	fi
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-
-	if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
-		echo
-		elog "xensv is broken upstream (Gentoo bug #142011)."
-		elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-05-20  4:41 Ian Delaney
  0 siblings, 0 replies; 295+ messages in thread
From: Ian Delaney @ 2016-05-20  4:41 UTC (permalink / raw
  To: gentoo-commits

commit:     bc21ec5985e878110034366d860b451cf9102a2e
Author:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
AuthorDate: Fri May 20 04:39:15 2016 +0000
Commit:     Ian Delaney <idella4 <AT> gentoo <DOT> org>
CommitDate: Fri May 20 04:41:23 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc21ec59

app-emulation/xen-tools: revbump to 4.6.1-r3

Add sec patch xsa-176 patch, re security bug
Holding off revbump to 4.6.0, considering also purging

Gentoo-bug: #583462

Package-Manager: portage-2.3.0_rc1

 app-emulation/xen-tools/Manifest                  |   2 +
 app-emulation/xen-tools/xen-tools-4.6.1-r3.ebuild | 469 ++++++++++++++++++++++
 2 files changed, 471 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 78c1042..b45dcf1 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -11,6 +11,8 @@ DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd76
 DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798deff5c2c72d1efb5459c72f4278f00 SHA512 4fd0c663a733436188aca364e927ac430d9bbef9859da65c074d7fd66c330645b05ff1f3e849f4581dfcd7054801d65edcff8445c1c63c2725f11e3903415af0 WHIRLPOOL 5504d7ffbd3c1970026c1f43252d9c76f10c5448ede247719e2698aa8f8e93b20e4cc353da5582b3b6887fb3fd7d1e13765f664ea60daeb6020f052eaca9b9f4
 DIST xen-qemu-patches-2.tar.gz 4690 SHA256 5850513c6c6e1c68da7a04526bfc3f7ee049b1c5cbcd370d2dfcee94b49f84e9 SHA512 fb1adcccffdd53193699287049da719f826ab8ab819130e7747cb6de9f6f9446fde223e26772a6ee7380ee0691acffac2c970691583ef6cb06f3c597acac824e WHIRLPOOL ea6dc377c69261246d68342b0bf33bdcd07447f1d3547862da10dd0e72d0a6d96fcdfb5df422e88fd7119a6edc7c8990f02d33bbb4c401534aba55b287ac63fe
 DIST xen-qemu-patches-3.tar.gz 7866 SHA256 40ec7e127c149d25f783f050c693776db4f5ded7b488fba3be4b88c85c33d981 SHA512 ca1c5a10c986dcc6e39fbcb606493532203f051d622fbd7318b4c6f69b686889d81c143c7eaf7c91b1e925aa4f7667fb8f80d887ac2b45172a9db4c4231e7feb WHIRLPOOL 1aee478c6eb39fd204a0b88c02770a304765f7dba979bdebd4dd882c77b947038219aab99be95010c308207eb18d276c127c1bb5c69c62e0ef2bbb618fd99e17
+DIST xen-qemu-patches-4.tar.gz 5231 SHA256 6ffc66654045ce6aa4f228e1a39025a0cdce613815c114d28d1c14499d25eb0d SHA512 b2cbf25a9ceec947f4c5ca7d77c8fb3b443bffc3c48c8c6fb50d72a795f86e5cc40fb2637e378fea048ee8094aebd96e5d056289d9538e5f19ed36b9e7d70431 WHIRLPOOL 2d73c793eaf00ca0f8a79f18e2b1e95931000989265d7a3bb4f6bccb2407619ddfbdfc28fcec03f37a18554352ea4dc6500de8ef6a72f2a991cff3495e66e4fc
+DIST xen-security-patches-01.tar.gz 4683 SHA256 ca1e565180aff5485f217735faa24bea2f7fc821d5c5a506d1854291681fdc28 SHA512 538d5df0c3b5b5277613af3a3fc11aa46a16cfdfdc88488da5020e3ad38580b8cdb12778e251c4b41c6b5cfe37d8266a599b8b15b4032491c0689e442b388847 WHIRLPOOL a22492288fa04919c60d9e7e15181bc7eb05f457b0aad0e8ece172443fd4208d4bdeb692ef713b99aa83eb030caf3dfcf1236b5d8de13e152b93096aa2e869b8
 DIST xen-security-patches-10.tar.gz 13289 SHA256 8937b3c0045f83ac0685ce129c99be8ab035f2ed92605d0c1100d4f898d978a3 SHA512 698963479149bd63695b3ffd7d108b798ce6c694560f2908b639f3a1b00d37d4994fbc1e0e21aaba1f3a113653d5b37c28679bc1d97d75a805844345c9c070c0 WHIRLPOOL 8c2433c35499819906abf5cb8898dac23cbf7523cc4b4e9291e696eb2871971a7300d3f54865ac32738a1b67c1de18e227085f14c5717b60ec951d5038fa0493
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
 DIST xen-security-patches-9.tar.gz 9793 SHA256 2167d7bc2a631cf13d5b49c9577dbc8d128517e8ecbf90ef85c38f52ab3187aa SHA512 42f4997f35cc06333584a9a3c65366493094b60a6c67928b6165f3fb7d35d3a8f9dc0c3eadd4522de0d99bcc8511afba1d5e543396399b37983eb547abedca44 WHIRLPOOL 8abb68b4ac10fbc2b590c8a29cd2474d5392d3958542dad7f21ba4ad51c7541bb1686ed2629323e214c3e72b0de7212f25a4681f653d4179404c9f4c53e3d83a

diff --git a/app-emulation/xen-tools/xen-tools-4.6.1-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1-r3.ebuild
new file mode 100644
index 0000000..1a0afb5
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.1-r3.ebuild
@@ -0,0 +1,469 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=01
+	# vars set to reflect https://dev.gentoo.org/~idella4/
+	# first instance of UPS_VER (usptream ver)
+	UPS_VER=
+	SEC_VER=
+	QEMU_VER=4
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=6
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz
+		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.gz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream \
+				"${WORKDIR}"/libexec.patch
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
+			epatch $i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+
+		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+
+		for i in "${WORKDIR}"/qemu-patches/qemut/*.patch; do
+			epatch $i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-06-07  5:47 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-06-07  5:47 UTC (permalink / raw
  To: gentoo-commits

commit:     f22d36084c5cdabb599a38b8e1e26832c4bacd94
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  7 05:38:13 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Jun  7 05:45:36 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f22d3608

app-emulation/xen-tools: fix XSA-175,178 bug

also include a few non-security upstream fixes

Gentoo-Bug: 583464, XSA-175
Gentoo-Bug: 583466, XSA-178

Package-Manager: portage-2.3.0_rc1

 app-emulation/xen-tools/Manifest                  |   2 +
 app-emulation/xen-tools/xen-tools-4.6.1-r4.ebuild | 458 ++++++++++++++++++++++
 2 files changed, 460 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index b45dcf1..28bb252 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -3,6 +3,7 @@ DIST ovmf-20151110.tar.bz2 27518370 SHA256 74199f6b5c6f756881323242742c396c52096
 DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61 SHA512 798d222d5f5725a805cde9e6000b5ce714d0551fd4a3c2642cc6e77b2bdab1a9e239939a358a23bbe0e00112f5ad70696c87d20b90655463c835541fc04e1a00 WHIRLPOOL 9cda0ad502a59dd718c543b759ac3fcf5acb4adee70c3da9bfea95ab188415acf6425827de77f45421ec3be8fd9e0c37fb486e62828217ba3e83f88d942a3f4a
 DIST xen-4.6.0-upstream-patches-0.tar.xz 19280 SHA256 8ef2d139f86cb52d2208a17c974e5a85356183ee359ab4b91882067548806e0c SHA512 9fde8d9def1d75e50c10069af7f9fea4b5b6992b7089eb554e1e2a4c78dd080f2977128d0dd541eeb735b951e7d6614a07101f7703457e7743ac6b3be962cdfe WHIRLPOOL 861c7f150811912422f6f5eb77437744d1456740a43bef3dfd88a2e6d6836c0e8460b788ccd4f14a7144652d65a825c08aa984ec4240b2b1ac6d09237695d19d
 DIST xen-4.6.0.tar.gz 19694350 SHA256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 SHA512 b4b02f306ffea360f539dd8c231b2f58c00c3638fdb665cb659c7291b475b40f1075bc59d49a6144767729e57b8bc40a1cfd9030d61de2b8fa4ac97d43655c2b WHIRLPOOL d3f01183440ca1875b6e850bd116db0c382383433e50c0902d3268e9e36b39d184fc65e925bdb5363ef4ca7a232fee15b4749c89baf789137b8a8248565c75a8
+DIST xen-4.6.1-upstream-patches-0.tar.xz 92472 SHA256 7b32cbd57571d838ec606c5bd2b98a51e14a6bcf44d2d61007c274fa3b6b5eb6 SHA512 2f8e9273601c70eac88fb9d94bcb607bc5ea76514f9cdee0e96309b9a9d78db881d94c57a518ad5cef398fa57274b9940ba1553d0984bb5504ca27b6b62a6003 WHIRLPOOL 9b2592f33587fc85b091fbfb357d4ab4914f39286f3207a0d8aebf26259f0ebd1eb7d6bede7da9a202427cf9c7d97c11c4c84c5f90584948b1f3c32fefac5164
 DIST xen-4.6.1.tar.gz 19693042 SHA256 44cc2fccba1e147ef4c8da0584ce0f24189c8743de0e3e9a9226da88ddb5f589 SHA512 f01a0b7874abf8b3a81432428d7ba2d5aceb9d75ae20310f8ef49a3a0df927720a51d49090f74fda7f374c779e121ad26da6966a6f2623ed1a7743b4c080427c WHIRLPOOL b4eec12118d602d1b41edee32ed7c0c61646974060bc44e3eedaf78f7c3015c151998f72573fd2bab1992263dd98f09992772334bae7826048d187de7ed022e5
 DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73acfdc4df694f7b29c1135180d902049 SHA512 3006ce4cd67e80a9f79d9ba3814a64704b0d762159a439a140b1ec0a2699473cd5537950f0913b55f8f7e3d0fd2e9861f3199793120d8d2502aa3f8ef7816c8f WHIRLPOOL 4a921103df2825ccd8b0481708e7cd692fa45d5aadae286c1522c144a1576920e7d3567648565bb9af85bb6bb597ea9d0ec04ea6abd2115db4caf7e739717b1a
 DIST xen-gentoo-patches-6.tar.xz 23864 SHA256 96e774bd03c9df341fdb2f5d6cf231549c8d7a004c3c902c07b5cb690428d4c6 SHA512 7f4966bb7dad02b213a3cbefcc312573039feaec964a2deaa6aa7f8fa488b6e31176834a4e2cf6ac380548f1b8251c7700d16d1cbc7b88fcee440f6cccd7f177 WHIRLPOOL a41cae3441370e0e18fbf28ac7a780adfaa0d6af12dc62f1dfe90f52f01ebbd8055e3b5b399ae11602b29b8a206aafe2cbecb79948233bd072e73294468f3b08
@@ -14,6 +15,7 @@ DIST xen-qemu-patches-3.tar.gz 7866 SHA256 40ec7e127c149d25f783f050c693776db4f5d
 DIST xen-qemu-patches-4.tar.gz 5231 SHA256 6ffc66654045ce6aa4f228e1a39025a0cdce613815c114d28d1c14499d25eb0d SHA512 b2cbf25a9ceec947f4c5ca7d77c8fb3b443bffc3c48c8c6fb50d72a795f86e5cc40fb2637e378fea048ee8094aebd96e5d056289d9538e5f19ed36b9e7d70431 WHIRLPOOL 2d73c793eaf00ca0f8a79f18e2b1e95931000989265d7a3bb4f6bccb2407619ddfbdfc28fcec03f37a18554352ea4dc6500de8ef6a72f2a991cff3495e66e4fc
 DIST xen-security-patches-01.tar.gz 4683 SHA256 ca1e565180aff5485f217735faa24bea2f7fc821d5c5a506d1854291681fdc28 SHA512 538d5df0c3b5b5277613af3a3fc11aa46a16cfdfdc88488da5020e3ad38580b8cdb12778e251c4b41c6b5cfe37d8266a599b8b15b4032491c0689e442b388847 WHIRLPOOL a22492288fa04919c60d9e7e15181bc7eb05f457b0aad0e8ece172443fd4208d4bdeb692ef713b99aa83eb030caf3dfcf1236b5d8de13e152b93096aa2e869b8
 DIST xen-security-patches-10.tar.gz 13289 SHA256 8937b3c0045f83ac0685ce129c99be8ab035f2ed92605d0c1100d4f898d978a3 SHA512 698963479149bd63695b3ffd7d108b798ce6c694560f2908b639f3a1b00d37d4994fbc1e0e21aaba1f3a113653d5b37c28679bc1d97d75a805844345c9c070c0 WHIRLPOOL 8c2433c35499819906abf5cb8898dac23cbf7523cc4b4e9291e696eb2871971a7300d3f54865ac32738a1b67c1de18e227085f14c5717b60ec951d5038fa0493
+DIST xen-security-patches-12.tar.xz 5172 SHA256 1d3c238cbefc243a17770722895f6bc725e807641a93908d3e4002b26e4f2a8b SHA512 06f80b12c30d18f84e880ffb529fe2b90e7ade1cb3479d2fbc21447cf2c5d50c7ba3a14ddd0b31f63e87af520bf80812158e4097e657f8316bdb5f8b443c9828 WHIRLPOOL 49b776cf3d1d05758dfe9ce9f5f5cb0573eaec5f1273648eedb04b408587bb3cfe8838ea551a29423cc30622c7426e852740138fa2795898f25c22de148f91c9
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
 DIST xen-security-patches-9.tar.gz 9793 SHA256 2167d7bc2a631cf13d5b49c9577dbc8d128517e8ecbf90ef85c38f52ab3187aa SHA512 42f4997f35cc06333584a9a3c65366493094b60a6c67928b6165f3fb7d35d3a8f9dc0c3eadd4522de0d99bcc8511afba1d5e543396399b37983eb547abedca44 WHIRLPOOL 8abb68b4ac10fbc2b590c8a29cd2474d5392d3958542dad7f21ba4ad51c7541bb1686ed2629323e214c3e72b0de7212f25a4681f653d4179404c9f4c53e3d83a
 DIST xen-upstream-patches-0.tar.gz 2297 SHA256 bf21272ad029391d30bf31896efcadc75267538f6c7de5d239453f19659d58ee SHA512 3f5d60aaebd181bddab4dd02e0064de2f75672f44a687a7331fa40e81d56763fea84504081a449d11403b21ad0ba2dac075f0b1796809ef8d16e244f6be99e3d WHIRLPOOL 4ebe79c8f2ea1c45e88e59941e477ed5639dbca3fe95c9a67e07afb0f4b6fb8b7fea8e58422d7c8f906299e4f37c14b4db15200997e5a92b647df98fa93e10c7

diff --git a/app-emulation/xen-tools/xen-tools-4.6.1-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1-r4.ebuild
new file mode 100644
index 0000000..0b7d40f
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.1-r4.ebuild
@@ -0,0 +1,458 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=12
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=6
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-07-27 18:28 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-07-27 18:28 UTC (permalink / raw
  To: gentoo-commits

commit:     3bf07cc0e82c9d0cf2f2c3bb136681e412d6eb33
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 27 03:07:00 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Jul 27 18:27:13 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bf07cc0

app-emulation/xen-tools: security bump, XSA-184

Package-Manager: portage-2.3.0

 app-emulation/xen-tools/Manifest                  |   1 +
 app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild | 458 ++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.7.0-r1.ebuild | 458 ++++++++++++++++++++++
 3 files changed, 917 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 72bf5c1..f4a828a 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -18,6 +18,7 @@ DIST xen-qemu-patches-4.tar.gz 5231 SHA256 6ffc66654045ce6aa4f228e1a39025a0cdce6
 DIST xen-security-patches-01.tar.gz 4683 SHA256 ca1e565180aff5485f217735faa24bea2f7fc821d5c5a506d1854291681fdc28 SHA512 538d5df0c3b5b5277613af3a3fc11aa46a16cfdfdc88488da5020e3ad38580b8cdb12778e251c4b41c6b5cfe37d8266a599b8b15b4032491c0689e442b388847 WHIRLPOOL a22492288fa04919c60d9e7e15181bc7eb05f457b0aad0e8ece172443fd4208d4bdeb692ef713b99aa83eb030caf3dfcf1236b5d8de13e152b93096aa2e869b8
 DIST xen-security-patches-10.tar.gz 13289 SHA256 8937b3c0045f83ac0685ce129c99be8ab035f2ed92605d0c1100d4f898d978a3 SHA512 698963479149bd63695b3ffd7d108b798ce6c694560f2908b639f3a1b00d37d4994fbc1e0e21aaba1f3a113653d5b37c28679bc1d97d75a805844345c9c070c0 WHIRLPOOL 8c2433c35499819906abf5cb8898dac23cbf7523cc4b4e9291e696eb2871971a7300d3f54865ac32738a1b67c1de18e227085f14c5717b60ec951d5038fa0493
 DIST xen-security-patches-12.tar.xz 5172 SHA256 1d3c238cbefc243a17770722895f6bc725e807641a93908d3e4002b26e4f2a8b SHA512 06f80b12c30d18f84e880ffb529fe2b90e7ade1cb3479d2fbc21447cf2c5d50c7ba3a14ddd0b31f63e87af520bf80812158e4097e657f8316bdb5f8b443c9828 WHIRLPOOL 49b776cf3d1d05758dfe9ce9f5f5cb0573eaec5f1273648eedb04b408587bb3cfe8838ea551a29423cc30622c7426e852740138fa2795898f25c22de148f91c9
+DIST xen-security-patches-14.tar.xz 4036 SHA256 2ac238d2c63b77d7f36c48cac5e1ce062229fc8cbabe5ba0f359f1014bfd0572 SHA512 51849687b10fe73c7bdee9d9243f33d386c3dce112b6c1392f5a1583922371d17ac5f7b8e6b0152aeb34160d4ad4a88d975337a8bbf73a51c24065ec129bf2cf WHIRLPOOL 3c18fdcc4db107c57b7ee4d8b261f3d390b21530aadcb0a0381d8228d87cbb67bf97103749f44b2993ab164c806026b23a43d10d3c534fe583554916633c13a4
 DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
 DIST xen-security-patches-9.tar.gz 9793 SHA256 2167d7bc2a631cf13d5b49c9577dbc8d128517e8ecbf90ef85c38f52ab3187aa SHA512 42f4997f35cc06333584a9a3c65366493094b60a6c67928b6165f3fb7d35d3a8f9dc0c3eadd4522de0d99bcc8511afba1d5e543396399b37983eb547abedca44 WHIRLPOOL 8abb68b4ac10fbc2b590c8a29cd2474d5392d3958542dad7f21ba4ad51c7541bb1686ed2629323e214c3e72b0de7212f25a4681f653d4179404c9f4c53e3d83a
 DIST xen-upstream-patches-0.tar.gz 2297 SHA256 bf21272ad029391d30bf31896efcadc75267538f6c7de5d239453f19659d58ee SHA512 3f5d60aaebd181bddab4dd02e0064de2f75672f44a687a7331fa40e81d56763fea84504081a449d11403b21ad0ba2dac075f0b1796809ef8d16e244f6be99e3d WHIRLPOOL 4ebe79c8f2ea1c45e88e59941e477ed5639dbca3fe95c9a67e07afb0f4b6fb8b7fea8e58422d7c8f906299e4f37c14b4db15200997e5a92b647df98fa93e10c7

diff --git a/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild
new file mode 100644
index 0000000..6630bd7
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild
@@ -0,0 +1,458 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=14
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=6
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.7.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.7.0-r1.ebuild
new file mode 100644
index 0000000..6630bd7
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.7.0-r1.ebuild
@@ -0,0 +1,458 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=14
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=6
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-07-28 14:51 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-07-28 14:51 UTC (permalink / raw
  To: gentoo-commits

commit:     4c0a64f3054273f6f8f4edf302e702804323815a
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 28 14:51:33 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Jul 28 14:51:33 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0a64f3

app-emulation/xen-tools: amd64 stable wrt bug #588780

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild
index 6630bd7..c7e7666 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=
 	SECURITY_VER=14
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-07-28 14:56 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-07-28 14:56 UTC (permalink / raw
  To: gentoo-commits

commit:     01da79ab8997e5549365988411e11063dbf1036d
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 28 14:56:04 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Jul 28 14:56:04 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01da79ab

app-emulation/xen-tools: x86 stable wrt bug #588780

Package-Manager: portage-2.2.28
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild
index c7e7666..91f180a 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=
 	SECURITY_VER=14
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-07-28 16:50 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-07-28 16:50 UTC (permalink / raw
  To: gentoo-commits

commit:     f2ad0b87046b1a0349f702a7126b66c4a360214c
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 28 16:44:19 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Jul 28 16:50:46 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2ad0b87

app-emulation/xen-tools: drop old vulnerable versions

Gentoo-Bug: 588780

Package-Manager: portage-2.3.0

 app-emulation/xen-tools/Manifest                   |  17 -
 app-emulation/xen-tools/xen-tools-4.6.0-r10.ebuild | 469 --------------------
 app-emulation/xen-tools/xen-tools-4.6.0-r11.ebuild | 469 --------------------
 app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild  | 469 --------------------
 app-emulation/xen-tools/xen-tools-4.6.1-r1.ebuild  | 474 --------------------
 app-emulation/xen-tools/xen-tools-4.6.1-r2.ebuild  | 449 -------------------
 app-emulation/xen-tools/xen-tools-4.6.1-r3.ebuild  | 469 --------------------
 app-emulation/xen-tools/xen-tools-4.6.1-r4.ebuild  | 458 --------------------
 app-emulation/xen-tools/xen-tools-4.6.1.ebuild     | 475 ---------------------
 app-emulation/xen-tools/xen-tools-4.6.3.ebuild     | 458 --------------------
 app-emulation/xen-tools/xen-tools-4.7.0.ebuild     | 458 --------------------
 11 files changed, 4665 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index f4a828a..c614caa 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,24 +1,7 @@
-DIST ovmf-20150629.tar.bz2 24265640 SHA256 9f316dc44e192fa9d5d7486cf1dae3f3094ab4f20f282f80d6251632c2cd6118 SHA512 b15a896b5222b920a500ec8a1eba5d670505441ffd02accf9b6c0deb9a12c1c5513a016f91eae5cb33f75ee9f28435dc957686e6ce8b5d0744c11a7d7262fffd WHIRLPOOL 8db4360dcb85f183dbd827f7381787c84065f94eaf746068b11ef7b30412b16cc0ba75effb04f01dea5f4f67967721f7aca11a2550035e95c59645c7964526ac
 DIST ovmf-20151110.tar.bz2 27518370 SHA256 74199f6b5c6f756881323242742c396c52096db5f61700a4eb839343f9ab0604 SHA512 dda185af2fc0b9a8d5fc7e1e96db6aa31807782fe77d38491896164d125c30d2277db3d71a7dce7bbd569723b344b97dfebbc78ddddca0a095721f6b1ae3a1d3 WHIRLPOOL 145fb1c873cce96b81b269b44800987ca1b7350425b682fd5a5799648b0270c6c17bb337ad7e06650e6b66a9ac6eef8d9c9239f1478a687be4af187e60c3f3f5
 DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61 SHA512 798d222d5f5725a805cde9e6000b5ce714d0551fd4a3c2642cc6e77b2bdab1a9e239939a358a23bbe0e00112f5ad70696c87d20b90655463c835541fc04e1a00 WHIRLPOOL 9cda0ad502a59dd718c543b759ac3fcf5acb4adee70c3da9bfea95ab188415acf6425827de77f45421ec3be8fd9e0c37fb486e62828217ba3e83f88d942a3f4a
-DIST xen-4.6.0-upstream-patches-0.tar.xz 19280 SHA256 8ef2d139f86cb52d2208a17c974e5a85356183ee359ab4b91882067548806e0c SHA512 9fde8d9def1d75e50c10069af7f9fea4b5b6992b7089eb554e1e2a4c78dd080f2977128d0dd541eeb735b951e7d6614a07101f7703457e7743ac6b3be962cdfe WHIRLPOOL 861c7f150811912422f6f5eb77437744d1456740a43bef3dfd88a2e6d6836c0e8460b788ccd4f14a7144652d65a825c08aa984ec4240b2b1ac6d09237695d19d
-DIST xen-4.6.0.tar.gz 19694350 SHA256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 SHA512 b4b02f306ffea360f539dd8c231b2f58c00c3638fdb665cb659c7291b475b40f1075bc59d49a6144767729e57b8bc40a1cfd9030d61de2b8fa4ac97d43655c2b WHIRLPOOL d3f01183440ca1875b6e850bd116db0c382383433e50c0902d3268e9e36b39d184fc65e925bdb5363ef4ca7a232fee15b4749c89baf789137b8a8248565c75a8
-DIST xen-4.6.1-upstream-patches-0.tar.xz 92472 SHA256 7b32cbd57571d838ec606c5bd2b98a51e14a6bcf44d2d61007c274fa3b6b5eb6 SHA512 2f8e9273601c70eac88fb9d94bcb607bc5ea76514f9cdee0e96309b9a9d78db881d94c57a518ad5cef398fa57274b9940ba1553d0984bb5504ca27b6b62a6003 WHIRLPOOL 9b2592f33587fc85b091fbfb357d4ab4914f39286f3207a0d8aebf26259f0ebd1eb7d6bede7da9a202427cf9c7d97c11c4c84c5f90584948b1f3c32fefac5164
-DIST xen-4.6.1.tar.gz 19693042 SHA256 44cc2fccba1e147ef4c8da0584ce0f24189c8743de0e3e9a9226da88ddb5f589 SHA512 f01a0b7874abf8b3a81432428d7ba2d5aceb9d75ae20310f8ef49a3a0df927720a51d49090f74fda7f374c779e121ad26da6966a6f2623ed1a7743b4c080427c WHIRLPOOL b4eec12118d602d1b41edee32ed7c0c61646974060bc44e3eedaf78f7c3015c151998f72573fd2bab1992263dd98f09992772334bae7826048d187de7ed022e5
 DIST xen-4.6.3.tar.gz 19707041 SHA256 02badfce9a037bd1bd4a94210c1f6b85467746216c71795805102b514bcf1fc4 SHA512 187a860b40c05139f22b8498a5fae1db173c3110d957147af29a56cb83b7111c9dc4946d65f9dffc847001fc01c5e9bf51886eaa1194bb9cfd0b6dbcd43a2c5c WHIRLPOOL f80fa73727218567b8d6c8d6bab9dfd577c4bb84ac737b084e4396128e8c4aa79776a277f73c283d5b12f17764b183b67fbf8596e240042dd0709f28cbab777e
 DIST xen-4.7.0.tar.gz 20702550 SHA256 be5876144d49729572ae06142e0bb93f1c1f2695578141eff2931995add24623 SHA512 2c52c8ef145dfab7d069e79318d5d631e1106a0ddc79d88b3bacf36c7f15cea67dccb704a245e785d2a1e42c6fb6c0ad74832f564aaeec025ad7b864031f0921 WHIRLPOOL 9725ac9fe94e78aab47b0534b5ee1a190106a773bf7d6204fed736abe7069b71937717b6680833736bd02a3a3a43f2eb2162fe7c0d992ddd47d12158b5d9835f
-DIST xen-gentoo-patches-4.tar.xz 23632 SHA256 5cdb0f93ee32d0a5fc4fc7282270ace73acfdc4df694f7b29c1135180d902049 SHA512 3006ce4cd67e80a9f79d9ba3814a64704b0d762159a439a140b1ec0a2699473cd5537950f0913b55f8f7e3d0fd2e9861f3199793120d8d2502aa3f8ef7816c8f WHIRLPOOL 4a921103df2825ccd8b0481708e7cd692fa45d5aadae286c1522c144a1576920e7d3567648565bb9af85bb6bb597ea9d0ec04ea6abd2115db4caf7e739717b1a
 DIST xen-gentoo-patches-6.tar.xz 23864 SHA256 96e774bd03c9df341fdb2f5d6cf231549c8d7a004c3c902c07b5cb690428d4c6 SHA512 7f4966bb7dad02b213a3cbefcc312573039feaec964a2deaa6aa7f8fa488b6e31176834a4e2cf6ac380548f1b8251c7700d16d1cbc7b88fcee440f6cccd7f177 WHIRLPOOL a41cae3441370e0e18fbf28ac7a780adfaa0d6af12dc62f1dfe90f52f01ebbd8055e3b5b399ae11602b29b8a206aafe2cbecb79948233bd072e73294468f3b08
-DIST xen-ovmf-patches-1.tar.xz 4724 SHA256 d14e98e62c78c9f4b8a7e7b4a04de6dabf300f393eff44154d06f93aa43d7703 SHA512 a17467762f6d92018ff9bce783ce148039f23159405e801ec2aef4c3db72c3976c6f1e41d8c2a2cb704a9654556a2050302f284cfe8e32f28f393b8e2c6d2f1c WHIRLPOOL de53ad07f20aa14fe76d974db92d5b6808f0a2dd26a627b818914990add7adad8e6135d42641819dc22947031981c5815bae5aeeed0f28785c90beda0a6ff6c8
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
-DIST xen-qemu-patches-0.tar.gz 3224 SHA256 ff1ac02a6d91e4abdbe069e1bb75d0b798deff5c2c72d1efb5459c72f4278f00 SHA512 4fd0c663a733436188aca364e927ac430d9bbef9859da65c074d7fd66c330645b05ff1f3e849f4581dfcd7054801d65edcff8445c1c63c2725f11e3903415af0 WHIRLPOOL 5504d7ffbd3c1970026c1f43252d9c76f10c5448ede247719e2698aa8f8e93b20e4cc353da5582b3b6887fb3fd7d1e13765f664ea60daeb6020f052eaca9b9f4
-DIST xen-qemu-patches-2.tar.gz 4690 SHA256 5850513c6c6e1c68da7a04526bfc3f7ee049b1c5cbcd370d2dfcee94b49f84e9 SHA512 fb1adcccffdd53193699287049da719f826ab8ab819130e7747cb6de9f6f9446fde223e26772a6ee7380ee0691acffac2c970691583ef6cb06f3c597acac824e WHIRLPOOL ea6dc377c69261246d68342b0bf33bdcd07447f1d3547862da10dd0e72d0a6d96fcdfb5df422e88fd7119a6edc7c8990f02d33bbb4c401534aba55b287ac63fe
-DIST xen-qemu-patches-3.tar.gz 7866 SHA256 40ec7e127c149d25f783f050c693776db4f5ded7b488fba3be4b88c85c33d981 SHA512 ca1c5a10c986dcc6e39fbcb606493532203f051d622fbd7318b4c6f69b686889d81c143c7eaf7c91b1e925aa4f7667fb8f80d887ac2b45172a9db4c4231e7feb WHIRLPOOL 1aee478c6eb39fd204a0b88c02770a304765f7dba979bdebd4dd882c77b947038219aab99be95010c308207eb18d276c127c1bb5c69c62e0ef2bbb618fd99e17
-DIST xen-qemu-patches-4.tar.gz 5231 SHA256 6ffc66654045ce6aa4f228e1a39025a0cdce613815c114d28d1c14499d25eb0d SHA512 b2cbf25a9ceec947f4c5ca7d77c8fb3b443bffc3c48c8c6fb50d72a795f86e5cc40fb2637e378fea048ee8094aebd96e5d056289d9538e5f19ed36b9e7d70431 WHIRLPOOL 2d73c793eaf00ca0f8a79f18e2b1e95931000989265d7a3bb4f6bccb2407619ddfbdfc28fcec03f37a18554352ea4dc6500de8ef6a72f2a991cff3495e66e4fc
-DIST xen-security-patches-01.tar.gz 4683 SHA256 ca1e565180aff5485f217735faa24bea2f7fc821d5c5a506d1854291681fdc28 SHA512 538d5df0c3b5b5277613af3a3fc11aa46a16cfdfdc88488da5020e3ad38580b8cdb12778e251c4b41c6b5cfe37d8266a599b8b15b4032491c0689e442b388847 WHIRLPOOL a22492288fa04919c60d9e7e15181bc7eb05f457b0aad0e8ece172443fd4208d4bdeb692ef713b99aa83eb030caf3dfcf1236b5d8de13e152b93096aa2e869b8
-DIST xen-security-patches-10.tar.gz 13289 SHA256 8937b3c0045f83ac0685ce129c99be8ab035f2ed92605d0c1100d4f898d978a3 SHA512 698963479149bd63695b3ffd7d108b798ce6c694560f2908b639f3a1b00d37d4994fbc1e0e21aaba1f3a113653d5b37c28679bc1d97d75a805844345c9c070c0 WHIRLPOOL 8c2433c35499819906abf5cb8898dac23cbf7523cc4b4e9291e696eb2871971a7300d3f54865ac32738a1b67c1de18e227085f14c5717b60ec951d5038fa0493
-DIST xen-security-patches-12.tar.xz 5172 SHA256 1d3c238cbefc243a17770722895f6bc725e807641a93908d3e4002b26e4f2a8b SHA512 06f80b12c30d18f84e880ffb529fe2b90e7ade1cb3479d2fbc21447cf2c5d50c7ba3a14ddd0b31f63e87af520bf80812158e4097e657f8316bdb5f8b443c9828 WHIRLPOOL 49b776cf3d1d05758dfe9ce9f5f5cb0573eaec5f1273648eedb04b408587bb3cfe8838ea551a29423cc30622c7426e852740138fa2795898f25c22de148f91c9
 DIST xen-security-patches-14.tar.xz 4036 SHA256 2ac238d2c63b77d7f36c48cac5e1ce062229fc8cbabe5ba0f359f1014bfd0572 SHA512 51849687b10fe73c7bdee9d9243f33d386c3dce112b6c1392f5a1583922371d17ac5f7b8e6b0152aeb34160d4ad4a88d975337a8bbf73a51c24065ec129bf2cf WHIRLPOOL 3c18fdcc4db107c57b7ee4d8b261f3d390b21530aadcb0a0381d8228d87cbb67bf97103749f44b2993ab164c806026b23a43d10d3c534fe583554916633c13a4
-DIST xen-security-patches-7.tar.xz 22604 SHA256 e831c71f830316f452eb8645a5e7ca497264587aa8b353945fd9535f485166e3 SHA512 051769f4118f5c6d5d961759f547526d3fb0e86a4c1dee265a7f0224f10a88e2217b5b5fcf8dbfc706a1ec3c8d1632ab688d3f70dfd89d830261dc7391dd41c2 WHIRLPOOL 8e6dfb4e1700a07e3e3207b67afaddc5d6aa6fd84db9b3e76bd9ff54f682740fed01070e5860bb5378d50903d5777b55dff88eb3444d45bdd63dba657889393d
-DIST xen-security-patches-9.tar.gz 9793 SHA256 2167d7bc2a631cf13d5b49c9577dbc8d128517e8ecbf90ef85c38f52ab3187aa SHA512 42f4997f35cc06333584a9a3c65366493094b60a6c67928b6165f3fb7d35d3a8f9dc0c3eadd4522de0d99bcc8511afba1d5e543396399b37983eb547abedca44 WHIRLPOOL 8abb68b4ac10fbc2b590c8a29cd2474d5392d3958542dad7f21ba4ad51c7541bb1686ed2629323e214c3e72b0de7212f25a4681f653d4179404c9f4c53e3d83a
-DIST xen-upstream-patches-0.tar.gz 2297 SHA256 bf21272ad029391d30bf31896efcadc75267538f6c7de5d239453f19659d58ee SHA512 3f5d60aaebd181bddab4dd02e0064de2f75672f44a687a7331fa40e81d56763fea84504081a449d11403b21ad0ba2dac075f0b1796809ef8d16e244f6be99e3d WHIRLPOOL 4ebe79c8f2ea1c45e88e59941e477ed5639dbca3fe95c9a67e07afb0f4b6fb8b7fea8e58422d7c8f906299e4f37c14b4db15200997e5a92b647df98fa93e10c7

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r10.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r10.ebuild
deleted file mode 100644
index 8e879dc..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r10.ebuild
+++ /dev/null
@@ -1,469 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=7
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=0
-	SEC_VER=10
-	QEMU_VER=0
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.8.2
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam +qemu-traditional python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patch set"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r11.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r11.ebuild
deleted file mode 100644
index 0ce7a84..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r11.ebuild
+++ /dev/null
@@ -1,469 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=7
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=0
-	SEC_VER=10
-	QEMU_VER=3
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.8.2
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam +qemu-traditional python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patch set"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild b/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild
deleted file mode 100644
index 92486da..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.0-r9.ebuild
+++ /dev/null
@@ -1,469 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=7
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=0
-	SEC_VER=9
-	QEMU_VER=0
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=4
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=1
-
-	SEABIOS_VER=1.8.2
-	OVMF_PV=20150629
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +pam +qemu-traditional python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patch set"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if [[ -n ${OVMF_VER} ]] && use ovmf; then
-		einfo "Try to apply Ovmf patch set"
-		pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-ovmf
-		popd > /dev/null
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1-r1.ebuild
deleted file mode 100644
index ecf2593..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.1-r1.ebuild
+++ /dev/null
@@ -1,474 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=
-	SEC_VER=
-	QEMU_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=6
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patch set"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1-r2.ebuild
deleted file mode 100644
index 1d23c9f..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.1-r2.ebuild
+++ /dev/null
@@ -1,449 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=2
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=
-	SEC_VER=
-	QEMU_VER=2
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=6
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-#		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.gz
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	# Security patchset
-	if [[ -n ${QEMU_VER} ]]; then
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.1-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1-r3.ebuild
deleted file mode 100644
index 1a0afb5..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.1-r3.ebuild
+++ /dev/null
@@ -1,469 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=01
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=
-	SEC_VER=
-	QEMU_VER=4
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=6
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-
-		for i in "${WORKDIR}"/qemu-patches/qemut/*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.1-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1-r4.ebuild
deleted file mode 100644
index 0b7d40f..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.1-r4.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=12
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=6
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.1.ebuild
deleted file mode 100644
index a63bbda..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.1.ebuild
+++ /dev/null
@@ -1,475 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# vars set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=
-	SEC_VER=
-	QEMU_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=6
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SEC_VER}.tar.gz
-		https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-qemu-patches-${QEMU_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python-single-r1_pkg_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patch set"
-		source "${WORKDIR}"/patches-security/${PV}.conf
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemut/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		for i in "${WORKDIR}"/qemu-patches/qemuu/xsa*.patch; do
-			epatch $i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.3.ebuild
deleted file mode 100644
index 62d7661..0000000
--- a/app-emulation/xen-tools/xen-tools-4.6.3.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=6
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.7.0.ebuild b/app-emulation/xen-tools/xen-tools-4.7.0.ebuild
deleted file mode 100644
index 62d7661..0000000
--- a/app-emulation/xen-tools/xen-tools-4.7.0.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=6
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-10-05  9:48 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-10-05  9:48 UTC (permalink / raw
  To: gentoo-commits

commit:     2f1373b09804420ebb385f1562ac278887f2d869
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Wed Oct  5 09:47:53 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Oct  5 09:48:41 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f1373b0

app-emulation/xen-tools: fix XSA-190

Gentoo-Bug: 594850

Package-Manager: portage-2.3.1

 app-emulation/xen-tools/Manifest                  |   1 +
 app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild | 458 ++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.7.0-r2.ebuild | 458 ++++++++++++++++++++++
 3 files changed, 917 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index c614caa..1b735b5 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,3 +5,4 @@ DIST xen-4.7.0.tar.gz 20702550 SHA256 be5876144d49729572ae06142e0bb93f1c1f269557
 DIST xen-gentoo-patches-6.tar.xz 23864 SHA256 96e774bd03c9df341fdb2f5d6cf231549c8d7a004c3c902c07b5cb690428d4c6 SHA512 7f4966bb7dad02b213a3cbefcc312573039feaec964a2deaa6aa7f8fa488b6e31176834a4e2cf6ac380548f1b8251c7700d16d1cbc7b88fcee440f6cccd7f177 WHIRLPOOL a41cae3441370e0e18fbf28ac7a780adfaa0d6af12dc62f1dfe90f52f01ebbd8055e3b5b399ae11602b29b8a206aafe2cbecb79948233bd072e73294468f3b08
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
 DIST xen-security-patches-14.tar.xz 4036 SHA256 2ac238d2c63b77d7f36c48cac5e1ce062229fc8cbabe5ba0f359f1014bfd0572 SHA512 51849687b10fe73c7bdee9d9243f33d386c3dce112b6c1392f5a1583922371d17ac5f7b8e6b0152aeb34160d4ad4a88d975337a8bbf73a51c24065ec129bf2cf WHIRLPOOL 3c18fdcc4db107c57b7ee4d8b261f3d390b21530aadcb0a0381d8228d87cbb67bf97103749f44b2993ab164c806026b23a43d10d3c534fe583554916633c13a4
+DIST xen-security-patches-16.tar.xz 7368 SHA256 3301514f20cc106f75ad84a2352f573b8d807ddeedfc57d2d5fda8c13e63bc1b SHA512 5d83107ce9972e8ab4c2aa3e6285c3cfae04b11768b7d55baf9cbe4a63fdf5175a0bbb7685641df15af4f98d6d095ff2b35b7c9fd6be6355a777547d8106874c WHIRLPOOL 3747b209ca1fead0dc7e791caed040e033b52933695e190d97bbd3f4abba957dbfaafc84e11a7f51aeb45bad3884d8b341d136351db145985f27b152aa25aa79

diff --git a/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild
new file mode 100644
index 00000000..1a68db7
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild
@@ -0,0 +1,458 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=16
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=6
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.7.0-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.7.0-r2.ebuild
new file mode 100644
index 00000000..1a68db7
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.7.0-r2.ebuild
@@ -0,0 +1,458 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=16
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=6
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-11-04  8:21 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-11-04  8:21 UTC (permalink / raw
  To: gentoo-commits

commit:     4d02a5dbd27e3dae4fe678d2a4442e1008e3b0c4
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  4 08:19:34 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Nov  4 08:19:34 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d02a5db

app-emulation/xen-tools: amd64 stable wrt bug #594850

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild
index 1a68db7..771d6b7 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=
 	SECURITY_VER=16
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-11-04  8:24 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-11-04  8:24 UTC (permalink / raw
  To: gentoo-commits

commit:     957394630bab9281f829caa2e0faba1da9d51a2d
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  4 08:23:25 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Nov  4 08:23:25 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95739463

app-emulation/xen-tools: x86 stable wrt bug #594850

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild
index 771d6b7..2f9e306 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=
 	SECURITY_VER=16
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-11-04 10:15 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-11-04 10:15 UTC (permalink / raw
  To: gentoo-commits

commit:     cc5bcd37b90e4260d696b0c328895128807f9621
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  4 10:13:42 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Nov  4 10:15:45 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc5bcd37

app-emulation/xen-tools: drop old vulnerable version

Gentoo-Bug: 594850

Package-Manager: portage-2.3.2

 app-emulation/xen-tools/Manifest                  |   1 -
 app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild | 458 ----------------------
 app-emulation/xen-tools/xen-tools-4.7.0-r1.ebuild | 458 ----------------------
 3 files changed, 917 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 1b735b5..38489f8 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -4,5 +4,4 @@ DIST xen-4.6.3.tar.gz 19707041 SHA256 02badfce9a037bd1bd4a94210c1f6b85467746216c
 DIST xen-4.7.0.tar.gz 20702550 SHA256 be5876144d49729572ae06142e0bb93f1c1f2695578141eff2931995add24623 SHA512 2c52c8ef145dfab7d069e79318d5d631e1106a0ddc79d88b3bacf36c7f15cea67dccb704a245e785d2a1e42c6fb6c0ad74832f564aaeec025ad7b864031f0921 WHIRLPOOL 9725ac9fe94e78aab47b0534b5ee1a190106a773bf7d6204fed736abe7069b71937717b6680833736bd02a3a3a43f2eb2162fe7c0d992ddd47d12158b5d9835f
 DIST xen-gentoo-patches-6.tar.xz 23864 SHA256 96e774bd03c9df341fdb2f5d6cf231549c8d7a004c3c902c07b5cb690428d4c6 SHA512 7f4966bb7dad02b213a3cbefcc312573039feaec964a2deaa6aa7f8fa488b6e31176834a4e2cf6ac380548f1b8251c7700d16d1cbc7b88fcee440f6cccd7f177 WHIRLPOOL a41cae3441370e0e18fbf28ac7a780adfaa0d6af12dc62f1dfe90f52f01ebbd8055e3b5b399ae11602b29b8a206aafe2cbecb79948233bd072e73294468f3b08
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
-DIST xen-security-patches-14.tar.xz 4036 SHA256 2ac238d2c63b77d7f36c48cac5e1ce062229fc8cbabe5ba0f359f1014bfd0572 SHA512 51849687b10fe73c7bdee9d9243f33d386c3dce112b6c1392f5a1583922371d17ac5f7b8e6b0152aeb34160d4ad4a88d975337a8bbf73a51c24065ec129bf2cf WHIRLPOOL 3c18fdcc4db107c57b7ee4d8b261f3d390b21530aadcb0a0381d8228d87cbb67bf97103749f44b2993ab164c806026b23a43d10d3c534fe583554916633c13a4
 DIST xen-security-patches-16.tar.xz 7368 SHA256 3301514f20cc106f75ad84a2352f573b8d807ddeedfc57d2d5fda8c13e63bc1b SHA512 5d83107ce9972e8ab4c2aa3e6285c3cfae04b11768b7d55baf9cbe4a63fdf5175a0bbb7685641df15af4f98d6d095ff2b35b7c9fd6be6355a777547d8106874c WHIRLPOOL 3747b209ca1fead0dc7e791caed040e033b52933695e190d97bbd3f4abba957dbfaafc84e11a7f51aeb45bad3884d8b341d136351db145985f27b152aa25aa79

diff --git a/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild
deleted file mode 100644
index 91f180a..00000000
--- a/app-emulation/xen-tools/xen-tools-4.6.3-r1.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=
-	SECURITY_VER=14
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=6
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.7.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.7.0-r1.ebuild
deleted file mode 100644
index 6630bd7..00000000
--- a/app-emulation/xen-tools/xen-tools-4.7.0-r1.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=14
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=6
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-11-22 12:41 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-11-22 12:41 UTC (permalink / raw
  To: gentoo-commits

commit:     82b8b15c1a208e5ddf328b45379485ce05a8a42a
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 21 07:07:03 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 12:41:51 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82b8b15c

app-emulation/xen-tools: security bump, fix various XSA

fix XSA-191,192,193,194,195,196,197,198

Package-Manager: portage-2.3.2

 app-emulation/xen-tools/Manifest                  |   1 +
 app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild | 458 ++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.7.1-r1.ebuild | 457 +++++++++++++++++++++
 3 files changed, 916 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index a46eee1..f827b62 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -7,3 +7,4 @@ DIST xen-4.7.1.tar.gz 20706864 SHA256 e87f4b0575e78657ee23d31470a15ecf1ce8c3a92a
 DIST xen-gentoo-patches-6.tar.xz 23864 SHA256 96e774bd03c9df341fdb2f5d6cf231549c8d7a004c3c902c07b5cb690428d4c6 SHA512 7f4966bb7dad02b213a3cbefcc312573039feaec964a2deaa6aa7f8fa488b6e31176834a4e2cf6ac380548f1b8251c7700d16d1cbc7b88fcee440f6cccd7f177 WHIRLPOOL a41cae3441370e0e18fbf28ac7a780adfaa0d6af12dc62f1dfe90f52f01ebbd8055e3b5b399ae11602b29b8a206aafe2cbecb79948233bd072e73294468f3b08
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
 DIST xen-security-patches-16.tar.xz 7368 SHA256 3301514f20cc106f75ad84a2352f573b8d807ddeedfc57d2d5fda8c13e63bc1b SHA512 5d83107ce9972e8ab4c2aa3e6285c3cfae04b11768b7d55baf9cbe4a63fdf5175a0bbb7685641df15af4f98d6d095ff2b35b7c9fd6be6355a777547d8106874c WHIRLPOOL 3747b209ca1fead0dc7e791caed040e033b52933695e190d97bbd3f4abba957dbfaafc84e11a7f51aeb45bad3884d8b341d136351db145985f27b152aa25aa79
+DIST xen-security-patches-17.tar.xz 9908 SHA256 9fc679ddea420e3aeb2f7ba4bacbb4c192b6c15d5e62b40def16cdb9e376a032 SHA512 4a5375caf5b928662b10c31ef5af2f9bd092b512d6fb1a0292b0389d3c7f5b062f7ed1401b6c5dbeb83d20418fd025bbca43e76d42c739c5a2809c6cfb59db16 WHIRLPOOL fdda75869ece47a180fce27b3d060b2dfe06861958443c55fe8de31f7c673382c468eccda0c40c87953abae57e12b2c3979a84515fb66ba190b6f7cffe57eb2d

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild
new file mode 100644
index 00000000..2d2939e
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild
@@ -0,0 +1,458 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=17
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=6
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r1.ebuild
new file mode 100644
index 00000000..382aea8
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.7.1-r1.ebuild
@@ -0,0 +1,457 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=17
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=6
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? ( $(python_gen_impl_dep sqlite) )
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-11-22 14:52 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-11-22 14:52 UTC (permalink / raw
  To: gentoo-commits

commit:     3b146e1f728a5ed8ee8a39d55cc474d75d240c13
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 22 14:51:12 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 14:52:01 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b146e1f

app-emulation/xen-tools: USE=ovmf require dev-lang/nasm

Gentoo-Bug: 599594

Package-Manager: portage-2.3.2

 app-emulation/xen-tools/xen-tools-4.6.4-r2.ebuild | 461 ++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.7.1-r2.ebuild | 460 +++++++++++++++++++++
 2 files changed, 921 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4-r2.ebuild
new file mode 100644
index 00000000..72ddade
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.4-r2.ebuild
@@ -0,0 +1,461 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=17
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=7
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=1
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( dev-lang/nasm )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r2.ebuild
new file mode 100644
index 00000000..09759be
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.7.1-r2.ebuild
@@ -0,0 +1,460 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=17
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=7
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=1
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	qemu? ( !system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( dev-lang/nasm )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-11-26 10:36 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-11-26 10:36 UTC (permalink / raw
  To: gentoo-commits

commit:     8c82983520c9d31b85e655047183e703437c8441
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 26 10:36:29 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sat Nov 26 10:36:29 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c829835

app-emulation/xen-tools: amd64 stable wrt bug #600382

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild
index 3ec09ca..881068d 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=
 	SECURITY_VER=17
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-11-26 10:44 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-11-26 10:44 UTC (permalink / raw
  To: gentoo-commits

commit:     fdb94c4ce1b448cdfce6cd74fc03c904922ab8a5
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 26 10:44:12 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sat Nov 26 10:44:12 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdb94c4c

app-emulation/xen-tools: x86 stable wrt bug #600382

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild
index 881068d..bb16290 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=
 	SECURITY_VER=17
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-11-28  4:13 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-11-28  4:13 UTC (permalink / raw
  To: gentoo-commits

commit:     d2afbcada16e07467ab83d2881a4c05050e67784
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 28 04:11:20 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Mon Nov 28 04:11:20 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2afbcad

app-emulation/xen-tools: drop old vulnerable versions

Gentoo-Bug: 600382

Package-Manager: portage-2.3.2

 app-emulation/xen-tools/Manifest                  |   4 -
 app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild | 458 ----------------------
 app-emulation/xen-tools/xen-tools-4.6.4.ebuild    | 458 ----------------------
 app-emulation/xen-tools/xen-tools-4.7.0-r2.ebuild | 458 ----------------------
 app-emulation/xen-tools/xen-tools-4.7.1-r1.ebuild | 457 ---------------------
 app-emulation/xen-tools/xen-tools-4.7.1.ebuild    | 457 ---------------------
 6 files changed, 2292 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index a359398..6154ff8 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,11 +1,7 @@
 DIST ovmf-20151110.tar.bz2 27518370 SHA256 74199f6b5c6f756881323242742c396c52096db5f61700a4eb839343f9ab0604 SHA512 dda185af2fc0b9a8d5fc7e1e96db6aa31807782fe77d38491896164d125c30d2277db3d71a7dce7bbd569723b344b97dfebbc78ddddca0a095721f6b1ae3a1d3 WHIRLPOOL 145fb1c873cce96b81b269b44800987ca1b7350425b682fd5a5799648b0270c6c17bb337ad7e06650e6b66a9ac6eef8d9c9239f1478a687be4af187e60c3f3f5
 DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61 SHA512 798d222d5f5725a805cde9e6000b5ce714d0551fd4a3c2642cc6e77b2bdab1a9e239939a358a23bbe0e00112f5ad70696c87d20b90655463c835541fc04e1a00 WHIRLPOOL 9cda0ad502a59dd718c543b759ac3fcf5acb4adee70c3da9bfea95ab188415acf6425827de77f45421ec3be8fd9e0c37fb486e62828217ba3e83f88d942a3f4a
-DIST xen-4.6.3.tar.gz 19707041 SHA256 02badfce9a037bd1bd4a94210c1f6b85467746216c71795805102b514bcf1fc4 SHA512 187a860b40c05139f22b8498a5fae1db173c3110d957147af29a56cb83b7111c9dc4946d65f9dffc847001fc01c5e9bf51886eaa1194bb9cfd0b6dbcd43a2c5c WHIRLPOOL f80fa73727218567b8d6c8d6bab9dfd577c4bb84ac737b084e4396128e8c4aa79776a277f73c283d5b12f17764b183b67fbf8596e240042dd0709f28cbab777e
 DIST xen-4.6.4.tar.gz 19709274 SHA256 b795d5631a85fb68295361067195ecd00003656dacede4ec57533fce33ab5109 SHA512 e6278061a16829628030579e115a500970ff575eb6796189bfa1e2d7a8cbbf8aec2c2bd04c77cdc87226d6cc5eaee59d6c62cacb4e74b06e1f1379734b872938 WHIRLPOOL a982f7bbf2ba16781ac0f310ef27a32e9115596e91117609d22827bc1999facb12df4f33d1ba0b7015cbfae90a24302243d508e8c38ba45ea998341b76ba0567
-DIST xen-4.7.0.tar.gz 20702550 SHA256 be5876144d49729572ae06142e0bb93f1c1f2695578141eff2931995add24623 SHA512 2c52c8ef145dfab7d069e79318d5d631e1106a0ddc79d88b3bacf36c7f15cea67dccb704a245e785d2a1e42c6fb6c0ad74832f564aaeec025ad7b864031f0921 WHIRLPOOL 9725ac9fe94e78aab47b0534b5ee1a190106a773bf7d6204fed736abe7069b71937717b6680833736bd02a3a3a43f2eb2162fe7c0d992ddd47d12158b5d9835f
 DIST xen-4.7.1.tar.gz 20706864 SHA256 e87f4b0575e78657ee23d31470a15ecf1ce8c3a92a771cda46bbcd4d0d671ffe SHA512 eb03244f5fa7b54402fcc1d38f1e69c0ea4536d5ab2f9859b41b5e94920ad9db20fb146e3c3d3635e9ca1d12e93ce0429e57f24bf53d4a2c4b69babc76ec724e WHIRLPOOL 5d7ba29ea58bdedb6a237f7cb1c0aacf361dc35ebb07ec8e55773e07b1f38c1b151615b526e14daeca7c2db235114bde0b6d124219e8818c6e529873b5151fec
-DIST xen-gentoo-patches-6.tar.xz 23864 SHA256 96e774bd03c9df341fdb2f5d6cf231549c8d7a004c3c902c07b5cb690428d4c6 SHA512 7f4966bb7dad02b213a3cbefcc312573039feaec964a2deaa6aa7f8fa488b6e31176834a4e2cf6ac380548f1b8251c7700d16d1cbc7b88fcee440f6cccd7f177 WHIRLPOOL a41cae3441370e0e18fbf28ac7a780adfaa0d6af12dc62f1dfe90f52f01ebbd8055e3b5b399ae11602b29b8a206aafe2cbecb79948233bd072e73294468f3b08
 DIST xen-gentoo-patches-7.tar.xz 24148 SHA256 859fb6b69125c0a1079b35a74bb004dce1b04827b05f056a746cc42c1b187557 SHA512 faf2b0ecd67d545366e2af7e7ecab5f808d02354d07f23cbffe1c3cb80dbb5f88cc4aa140d928ad269612e55c41740ff5bf2af3f0a1f16e375d404c3ffa712b1 WHIRLPOOL d75c35fa10dd1f1567a82c5d5cd7ddabc72def6d74ef7095b7bca9ce9adad2b6ff9c88b55bad7cdefe88da027e5c742f9b9dcafce457cf15f408ea35652546f6
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
-DIST xen-security-patches-16.tar.xz 7368 SHA256 3301514f20cc106f75ad84a2352f573b8d807ddeedfc57d2d5fda8c13e63bc1b SHA512 5d83107ce9972e8ab4c2aa3e6285c3cfae04b11768b7d55baf9cbe4a63fdf5175a0bbb7685641df15af4f98d6d095ff2b35b7c9fd6be6355a777547d8106874c WHIRLPOOL 3747b209ca1fead0dc7e791caed040e033b52933695e190d97bbd3f4abba957dbfaafc84e11a7f51aeb45bad3884d8b341d136351db145985f27b152aa25aa79
 DIST xen-security-patches-17.tar.xz 9908 SHA256 9fc679ddea420e3aeb2f7ba4bacbb4c192b6c15d5e62b40def16cdb9e376a032 SHA512 4a5375caf5b928662b10c31ef5af2f9bd092b512d6fb1a0292b0389d3c7f5b062f7ed1401b6c5dbeb83d20418fd025bbca43e76d42c739c5a2809c6cfb59db16 WHIRLPOOL fdda75869ece47a180fce27b3d060b2dfe06861958443c55fe8de31f7c673382c468eccda0c40c87953abae57e12b2c3979a84515fb66ba190b6f7cffe57eb2d

diff --git a/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild
deleted file mode 100644
index 2f9e306..00000000
--- a/app-emulation/xen-tools/xen-tools-4.6.3-r2.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=
-	SECURITY_VER=16
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=6
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4.ebuild
deleted file mode 100644
index 62d7661..00000000
--- a/app-emulation/xen-tools/xen-tools-4.6.4.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=6
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.7.0-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.7.0-r2.ebuild
deleted file mode 100644
index 1a68db7..00000000
--- a/app-emulation/xen-tools/xen-tools-4.7.0-r2.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=16
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=6
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r1.ebuild
deleted file mode 100644
index a8a7372..00000000
--- a/app-emulation/xen-tools/xen-tools-4.7.1-r1.ebuild
+++ /dev/null
@@ -1,457 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=17
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=7
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1.ebuild
deleted file mode 100644
index e5a6cdb..00000000
--- a/app-emulation/xen-tools/xen-tools-4.7.1.ebuild
+++ /dev/null
@@ -1,457 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=6
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-12-07  1:45 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-12-07  1:45 UTC (permalink / raw
  To: gentoo-commits

commit:     a32db681c2289c5894dbbda52d099c7b4b095a0a
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  3 04:38:25 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Dec  7 01:45:44 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a32db681

app-emulation/xen-tools: fix missing pixman issue

we need either enable USE=qemu, or system-qemu

Gentoo-Bug: 600234, 600500

Package-Manager: portage-2.3.2

 app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild | 6 +++---
 app-emulation/xen-tools/xen-tools-4.7.1-r3.ebuild | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild
index 481f901..924cc74 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild
@@ -63,13 +63,13 @@ SLOT="0/${MAJOR_V}"
 # Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
 # >=dev-lang/ocaml-4 stable
 # Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
 
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+REQUIRED_USE="
 	${PYTHON_REQUIRED_USE}
 	pygrub? ( python )
 	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
+	^^ ( qemu system-qemu )"
 
 COMMON_DEPEND="
 	dev-libs/lzo:2

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r3.ebuild
index c654c77..4fa0ce3 100644
--- a/app-emulation/xen-tools/xen-tools-4.7.1-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.7.1-r3.ebuild
@@ -63,13 +63,13 @@ SLOT="0/${MAJOR_V}"
 # Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
 # >=dev-lang/ocaml-4 stable
 # Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
 
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
+REQUIRED_USE="
 	${PYTHON_REQUIRED_USE}
 	pygrub? ( python )
 	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
+	^^ ( qemu system-qemu )"
 
 COMMON_DEPEND="
 	dev-libs/lzo:2


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-12-08  3:19 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-12-08  3:19 UTC (permalink / raw
  To: gentoo-commits

commit:     b92be671a0b97f0057549cf41b2b59f17c088a25
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  8 03:02:00 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Dec  8 03:19:55 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b92be671

app-emulation/xen-tools: remove hardcoded gcrypt support

for now, we let build script auto detect the settings
for future, we could introduce USE=gnutls,gcrypt,nettle
to better control this ..

Package-Manager: portage-2.3.3

 app-emulation/xen-tools/xen-tools-4.8.0.ebuild | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.8.0.ebuild b/app-emulation/xen-tools/xen-tools-4.8.0.ebuild
index 62fa2be..6a2c8dc 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.0.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.0.ebuild
@@ -146,10 +146,6 @@ pkg_setup() {
 	#bug 522642, disable compile tools/tests
 	export "CONFIG_TESTS=n"
 
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
 	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
 		if use x86 && use amd64; then
 			die "Confusion! Both x86 and amd64 are set in your use flags!"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-12-13 11:05 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-12-13 11:05 UTC (permalink / raw
  To: gentoo-commits

commit:     ff89f08143af4211e8bddf03dbd22800141cc269
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 13 11:05:01 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Tue Dec 13 11:05:01 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff89f081

app-emulation/xen-tools: amd64 stable wrt bug #602238

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild
index 924cc74..031fb5f 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=18
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-12-13 11:30 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2016-12-13 11:30 UTC (permalink / raw
  To: gentoo-commits

commit:     cf42cfe41450fc5ecad1efc9a5f43cc24cf4739b
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 13 11:30:31 2016 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Tue Dec 13 11:30:31 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf42cfe4

app-emulation/xen-tools: x86 stable wrt bug #602238

Package-Manager: portage-2.3.0
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild
index 031fb5f..6c16fa9 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=18
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-12-13 15:09 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-12-13 15:09 UTC (permalink / raw
  To: gentoo-commits

commit:     33d39173496f4f34f3330e617dfe217e43521770
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 13 10:10:14 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Dec 13 15:09:11 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33d39173

app-emulation/xen-tools: security bump, fix XSA-200

Gentoo-Bug: 601248

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-emulation/xen-tools/Manifest                  |   1 +
 app-emulation/xen-tools/xen-tools-4.6.4-r4.ebuild | 461 ++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.7.1-r4.ebuild | 460 +++++++++++++++++++++
 3 files changed, 922 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 148c47c..56c2b08 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -11,3 +11,4 @@ DIST xen-gentoo-patches-8.tar.xz 24732 SHA256 6e114f3d3bde31f8595a51bd67fafdbb56
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
 DIST xen-security-patches-17.tar.xz 9908 SHA256 9fc679ddea420e3aeb2f7ba4bacbb4c192b6c15d5e62b40def16cdb9e376a032 SHA512 4a5375caf5b928662b10c31ef5af2f9bd092b512d6fb1a0292b0389d3c7f5b062f7ed1401b6c5dbeb83d20418fd025bbca43e76d42c739c5a2809c6cfb59db16 WHIRLPOOL fdda75869ece47a180fce27b3d060b2dfe06861958443c55fe8de31f7c673382c468eccda0c40c87953abae57e12b2c3979a84515fb66ba190b6f7cffe57eb2d
 DIST xen-security-patches-18.tar.xz 2544 SHA256 99d7e0762d221f064d08ff4ca875b2270330a3924d5537b58505e72f8be0de04 SHA512 d2192a1f31557953118ad14e2ed2158577de529ea2cef9f63438f3bf570d979cea8b2f0244d8517a161878c6d8036173715228049102a85571e8dbc758eef3b9 WHIRLPOOL e67f77756fefa64b05c2621ab2e4bffaa349b8f6f7af2d0d7cade0516961e6789b4f6c30536bf681a86acbe907dcf29a08b0b573843fe07bcd7aa678ee7312b0
+DIST xen-security-patches-19.tar.xz 3336 SHA256 497a01fbd20fa45df19b41d337be0a87f4808101ac33cc9649461726abf43720 SHA512 d8a4a8ceeab9e2efedf880e7a2007b312a7f528cdb8fb1f748096621bbdc447ff8ee09b8fbe1aae657ccd7b2557e436cf60f6e70dcaef65e8959204e91f3ec57 WHIRLPOOL 26473bc9d7c2648f78f1fbf722e1ebcf42983d9d0e04d40f66eaad73c5a7ec232a397392dd5f66adb1258c571238a8faf0497ceb468674b93f7f86b91539f9b9

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4-r4.ebuild
new file mode 100644
index 00000000..08b3f83
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.6.4-r4.ebuild
@@ -0,0 +1,461 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=19
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=7
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=1
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( dev-lang/nasm )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_with system-qemu) \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use qemu || myconf+=" --with-system-qemu"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r4.ebuild
new file mode 100644
index 00000000..3d1f09d
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.7.1-r4.ebuild
@@ -0,0 +1,460 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=19
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=7
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=1
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( dev-lang/nasm )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-12-13 15:23 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-12-13 15:23 UTC (permalink / raw
  To: gentoo-commits

commit:     0cc03815fed648a29c194575d7aae1210a7cc55d
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 13 15:18:59 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Dec 13 15:18:59 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cc03815

app-emulation/xen-tools: security stable, XSA-200

Gentoo-Bug: 601248

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-emulation/xen-tools/xen-tools-4.6.4-r4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4-r4.ebuild
index 08b3f83..7ac147c 100644
--- a/app-emulation/xen-tools/xen-tools-4.6.4-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.6.4-r4.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=19
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-12-13 15:23 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-12-13 15:23 UTC (permalink / raw
  To: gentoo-commits

commit:     65d2bdc9965438393622e10a55ea65c5941b0ba5
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 13 15:23:03 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Dec 13 15:23:03 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65d2bdc9

app-emulation/xen-tools: cleanup, drop old vulnerables

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-emulation/xen-tools/Manifest                  |   2 -
 app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild | 458 ---------------------
 app-emulation/xen-tools/xen-tools-4.6.4-r2.ebuild | 461 ----------------------
 app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild | 461 ----------------------
 app-emulation/xen-tools/xen-tools-4.7.1-r2.ebuild | 460 ---------------------
 app-emulation/xen-tools/xen-tools-4.7.1-r3.ebuild | 460 ---------------------
 6 files changed, 2302 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 56c2b08..487e417 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -9,6 +9,4 @@ DIST xen-4.8.0.tar.gz 22499917 SHA256 1e15c713ab7ba3bfda8b4a285ed973529364fd1100
 DIST xen-gentoo-patches-7.tar.xz 24148 SHA256 859fb6b69125c0a1079b35a74bb004dce1b04827b05f056a746cc42c1b187557 SHA512 faf2b0ecd67d545366e2af7e7ecab5f808d02354d07f23cbffe1c3cb80dbb5f88cc4aa140d928ad269612e55c41740ff5bf2af3f0a1f16e375d404c3ffa712b1 WHIRLPOOL d75c35fa10dd1f1567a82c5d5cd7ddabc72def6d74ef7095b7bca9ce9adad2b6ff9c88b55bad7cdefe88da027e5c742f9b9dcafce457cf15f408ea35652546f6
 DIST xen-gentoo-patches-8.tar.xz 24732 SHA256 6e114f3d3bde31f8595a51bd67fafdbb56cbd60793bafad7061fcaaef67f36fb SHA512 05da32f8fca0a9a43d419c2edd01d0c4abe233c0a8cc02e18caf6490ae9938c4302e8e61f7c67339f5fddab412be69504e1f05de895b73ac8b540914745fefd9 WHIRLPOOL 43d5114f455d2465995e9a1bffe5fff1e722540994348d05a3bac5504a970ad6af447f783ddf271a183207c21e75a0b77b6aed0a8ec8c89446e99ec1b377bcbe
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
-DIST xen-security-patches-17.tar.xz 9908 SHA256 9fc679ddea420e3aeb2f7ba4bacbb4c192b6c15d5e62b40def16cdb9e376a032 SHA512 4a5375caf5b928662b10c31ef5af2f9bd092b512d6fb1a0292b0389d3c7f5b062f7ed1401b6c5dbeb83d20418fd025bbca43e76d42c739c5a2809c6cfb59db16 WHIRLPOOL fdda75869ece47a180fce27b3d060b2dfe06861958443c55fe8de31f7c673382c468eccda0c40c87953abae57e12b2c3979a84515fb66ba190b6f7cffe57eb2d
-DIST xen-security-patches-18.tar.xz 2544 SHA256 99d7e0762d221f064d08ff4ca875b2270330a3924d5537b58505e72f8be0de04 SHA512 d2192a1f31557953118ad14e2ed2158577de529ea2cef9f63438f3bf570d979cea8b2f0244d8517a161878c6d8036173715228049102a85571e8dbc758eef3b9 WHIRLPOOL e67f77756fefa64b05c2621ab2e4bffaa349b8f6f7af2d0d7cade0516961e6789b4f6c30536bf681a86acbe907dcf29a08b0b573843fe07bcd7aa678ee7312b0
 DIST xen-security-patches-19.tar.xz 3336 SHA256 497a01fbd20fa45df19b41d337be0a87f4808101ac33cc9649461726abf43720 SHA512 d8a4a8ceeab9e2efedf880e7a2007b312a7f528cdb8fb1f748096621bbdc447ff8ee09b8fbe1aae657ccd7b2557e436cf60f6e70dcaef65e8959204e91f3ec57 WHIRLPOOL 26473bc9d7c2648f78f1fbf722e1ebcf42983d9d0e04d40f66eaad73c5a7ec232a397392dd5f66adb1258c571238a8faf0497ceb468674b93f7f86b91539f9b9

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild
deleted file mode 100644
index bb16290..00000000
--- a/app-emulation/xen-tools/xen-tools-4.6.4-r1.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=
-	SECURITY_VER=17
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=7
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? ( $(python_gen_impl_dep sqlite) )
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4-r2.ebuild
deleted file mode 100644
index 72ddade..00000000
--- a/app-emulation/xen-tools/xen-tools-4.6.4-r2.ebuild
+++ /dev/null
@@ -1,461 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=17
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=7
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( dev-lang/nasm )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild
deleted file mode 100644
index 6c16fa9..00000000
--- a/app-emulation/xen-tools/xen-tools-4.6.4-r3.ebuild
+++ /dev/null
@@ -1,461 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=18
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=7
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( dev-lang/nasm )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r2.ebuild
deleted file mode 100644
index 09759be..00000000
--- a/app-emulation/xen-tools/xen-tools-4.7.1-r2.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=17
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=7
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="hvm? ( || ( qemu system-qemu ) )
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	qemu? ( !system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( dev-lang/nasm )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r3.ebuild
deleted file mode 100644
index 4fa0ce3..00000000
--- a/app-emulation/xen-tools/xen-tools-4.7.1-r3.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=18
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=7
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( dev-lang/nasm )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-12-26 19:10 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2016-12-26 19:10 UTC (permalink / raw
  To: gentoo-commits

commit:     22cfc30bfdf3c015462ffd2dbd0ac01351694fec
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 26 19:07:46 2016 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Dec 26 19:09:03 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22cfc30b

app-emulation/xen-tools: x86 stable (bug #601986)

Package-Manager: Portage-2.3.2, Repoman-2.3.1

 app-emulation/xen-tools/xen-tools-4.7.1-r4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r4.ebuild
index ff4e58b..234e197 100644
--- a/app-emulation/xen-tools/xen-tools-4.7.1-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.7.1-r4.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=19
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2016-12-28  9:06 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2016-12-28  9:06 UTC (permalink / raw
  To: gentoo-commits

commit:     30e5d31c81de5753919218076c00821c24fbbed1
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 28 09:04:48 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Dec 28 09:04:48 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30e5d31c

app-emulation/xen-tools: drop old vulnerables

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-emulation/xen-tools/Manifest                  |   3 -
 app-emulation/xen-tools/xen-tools-4.6.4-r4.ebuild | 461 ----------------------
 app-emulation/xen-tools/xen-tools-4.8.0.ebuild    | 456 ---------------------
 3 files changed, 920 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 9d74946..8a27775 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,13 +1,10 @@
 DIST ovmf-20151110.tar.bz2 27518370 SHA256 74199f6b5c6f756881323242742c396c52096db5f61700a4eb839343f9ab0604 SHA512 dda185af2fc0b9a8d5fc7e1e96db6aa31807782fe77d38491896164d125c30d2277db3d71a7dce7bbd569723b344b97dfebbc78ddddca0a095721f6b1ae3a1d3 WHIRLPOOL 145fb1c873cce96b81b269b44800987ca1b7350425b682fd5a5799648b0270c6c17bb337ad7e06650e6b66a9ac6eef8d9c9239f1478a687be4af187e60c3f3f5
 DIST seabios-1.10.0.tar.gz 588213 SHA256 8976fc4c1ebcda66ac96689762247dfc99115a5f7acb3a7d4e18d18ff5de12a9 SHA512 f1b83ce37b59070b488e19f98c95ca9f413cf4969663331b631c3ccb884c90b2db793d32a779ef05cead538c2fd123be4b73391ad2fa20c900a1f14237178d8c WHIRLPOOL 77718eac01a59f94c3fa81195925ae09c19e11f80f107b3387e910408d88d3ffc93eaca3b73d6a52b67514538c0e020b0f4078db8277a5ee6361fd0d3ada8598
 DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61 SHA512 798d222d5f5725a805cde9e6000b5ce714d0551fd4a3c2642cc6e77b2bdab1a9e239939a358a23bbe0e00112f5ad70696c87d20b90655463c835541fc04e1a00 WHIRLPOOL 9cda0ad502a59dd718c543b759ac3fcf5acb4adee70c3da9bfea95ab188415acf6425827de77f45421ec3be8fd9e0c37fb486e62828217ba3e83f88d942a3f4a
-DIST xen-4.6.4-upstream-patches-0.tar.xz 15280 SHA256 0f2d55e44e2c98fb7caf76997c05f44fe1efdbf7eaa971a4bf234ea3bc95e244 SHA512 26be1b03af1ac0d6a413b0ab8a30d59c733d6d5c4e29ce3b5b90818a1589cbb5c46a50b9ee42b273ef3b37df8ff403241d68e1e2221ce969054fb7e5f13516ab WHIRLPOOL 52420897c49cd1bcfd8896df45a1f9c8df6337cb68dd7a6ff962361e7ab2eab1e6d6699ae8236b105e6b700b5d5b6c8da302ff477ac6493a60a665e4225cff02
-DIST xen-4.6.4.tar.gz 19709274 SHA256 b795d5631a85fb68295361067195ecd00003656dacede4ec57533fce33ab5109 SHA512 e6278061a16829628030579e115a500970ff575eb6796189bfa1e2d7a8cbbf8aec2c2bd04c77cdc87226d6cc5eaee59d6c62cacb4e74b06e1f1379734b872938 WHIRLPOOL a982f7bbf2ba16781ac0f310ef27a32e9115596e91117609d22827bc1999facb12df4f33d1ba0b7015cbfae90a24302243d508e8c38ba45ea998341b76ba0567
 DIST xen-4.7.1-upstream-patches-0.tar.xz 16420 SHA256 cb4724fedadc408ec390f99e9928a44ec75e793fb55cb97793f09980855b6a32 SHA512 79e117c48c6cc3d5783c818218ac11ec494735ce89755b5e263a64c23fb1f0a425bc65b567a24ce2e348b6e3839b26133c7e2c36411e5cc7acb54b855149dfbe WHIRLPOOL 982165da62cbb28cd72d32662c366ca7dac91a511b356eb58bced4b4af5cbc0d94c7e280a2400e5d9c92938d2afee86abd7c688926c2b9cb191d4554be828844
 DIST xen-4.7.1.tar.gz 20706864 SHA256 e87f4b0575e78657ee23d31470a15ecf1ce8c3a92a771cda46bbcd4d0d671ffe SHA512 eb03244f5fa7b54402fcc1d38f1e69c0ea4536d5ab2f9859b41b5e94920ad9db20fb146e3c3d3635e9ca1d12e93ce0429e57f24bf53d4a2c4b69babc76ec724e WHIRLPOOL 5d7ba29ea58bdedb6a237f7cb1c0aacf361dc35ebb07ec8e55773e07b1f38c1b151615b526e14daeca7c2db235114bde0b6d124219e8818c6e529873b5151fec
 DIST xen-4.8.0.tar.gz 22499917 SHA256 1e15c713ab7ba3bfda8b4a285ed973529364fd1100e6dd5a61f29583dc667b04 SHA512 70b95553f9813573b12e52999a4df8701dec430f23c36a8dc70d25a46bb4bc9234e5b7feb74a04062af4c8d6b6bcfe947d90b2b172416206812e54bac9797454 WHIRLPOOL 1296c25a05e3ab81730a2587ea1c07c7c022f05cfefc580224185c8d5fc9853531031c1292f69eff944ae2752492c4b95f13e160be3c449a7626aeadf1a21102
 DIST xen-gentoo-patches-7.tar.xz 24148 SHA256 859fb6b69125c0a1079b35a74bb004dce1b04827b05f056a746cc42c1b187557 SHA512 faf2b0ecd67d545366e2af7e7ecab5f808d02354d07f23cbffe1c3cb80dbb5f88cc4aa140d928ad269612e55c41740ff5bf2af3f0a1f16e375d404c3ffa712b1 WHIRLPOOL d75c35fa10dd1f1567a82c5d5cd7ddabc72def6d74ef7095b7bca9ce9adad2b6ff9c88b55bad7cdefe88da027e5c742f9b9dcafce457cf15f408ea35652546f6
-DIST xen-gentoo-patches-8.tar.xz 24732 SHA256 6e114f3d3bde31f8595a51bd67fafdbb56cbd60793bafad7061fcaaef67f36fb SHA512 05da32f8fca0a9a43d419c2edd01d0c4abe233c0a8cc02e18caf6490ae9938c4302e8e61f7c67339f5fddab412be69504e1f05de895b73ac8b540914745fefd9 WHIRLPOOL 43d5114f455d2465995e9a1bffe5fff1e722540994348d05a3bac5504a970ad6af447f783ddf271a183207c21e75a0b77b6aed0a8ec8c89446e99ec1b377bcbe
 DIST xen-gentoo-patches-9.tar.xz 27456 SHA256 67c410d12ef4628a8c0a931e5868b425f2eb4b2f0e307304a75384cbe509734b SHA512 9a797be9dd2392c34b3f6561c2274e116b4f5b114f4520dbbd0b51818c774479ceabb45aa916f93c1a2bc49787f4ca6e6c83bc743baa6bdeef91d77276b20f36 WHIRLPOOL c41cde532726bb55acd05d558b35d575b229d2ee64eba7438f7b196df313f0e44154148c1e47bf6e8c810667b3b237bcfa410371b4bb6f097b981f6b2637ead3
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
 DIST xen-security-patches-19.tar.xz 3336 SHA256 497a01fbd20fa45df19b41d337be0a87f4808101ac33cc9649461726abf43720 SHA512 d8a4a8ceeab9e2efedf880e7a2007b312a7f528cdb8fb1f748096621bbdc447ff8ee09b8fbe1aae657ccd7b2557e436cf60f6e70dcaef65e8959204e91f3ec57 WHIRLPOOL 26473bc9d7c2648f78f1fbf722e1ebcf42983d9d0e04d40f66eaad73c5a7ec232a397392dd5f66adb1258c571238a8faf0497ceb468674b93f7f86b91539f9b9

diff --git a/app-emulation/xen-tools/xen-tools-4.6.4-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.6.4-r4.ebuild
deleted file mode 100644
index 7ac147c..00000000
--- a/app-emulation/xen-tools/xen-tools-4.6.4-r4.ebuild
+++ /dev/null
@@ -1,461 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=19
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=7
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( dev-lang/nasm )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_with system-qemu) \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use qemu || myconf+=" --with-system-qemu"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.8.0.ebuild b/app-emulation/xen-tools/xen-tools-4.8.0.ebuild
deleted file mode 100644
index 6a2c8dc..00000000
--- a/app-emulation/xen-tools/xen-tools-4.8.0.ebuild
+++ /dev/null
@@ -1,456 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=8
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( dev-lang/nasm )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-02-15  7:54 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-02-15  7:54 UTC (permalink / raw
  To: gentoo-commits

commit:     3e4e51017be9fb21ac2f84cd162c290d2cdfd28b
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 15 07:52:25 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Feb 15 07:54:10 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e4e5101

app-emulation/xen-tools: fix XSA-208

XSA-208: oob access in cirrus bitblt copy

Gentoo-Bug: 609160

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-emulation/xen-tools/Manifest                  |   1 +
 app-emulation/xen-tools/xen-tools-4.7.1-r6.ebuild | 460 ++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.8.0-r2.ebuild | 456 +++++++++++++++++++++
 3 files changed, 917 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 8a27775919..4fe2216e04 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -8,3 +8,4 @@ DIST xen-gentoo-patches-7.tar.xz 24148 SHA256 859fb6b69125c0a1079b35a74bb004dce1
 DIST xen-gentoo-patches-9.tar.xz 27456 SHA256 67c410d12ef4628a8c0a931e5868b425f2eb4b2f0e307304a75384cbe509734b SHA512 9a797be9dd2392c34b3f6561c2274e116b4f5b114f4520dbbd0b51818c774479ceabb45aa916f93c1a2bc49787f4ca6e6c83bc743baa6bdeef91d77276b20f36 WHIRLPOOL c41cde532726bb55acd05d558b35d575b229d2ee64eba7438f7b196df313f0e44154148c1e47bf6e8c810667b3b237bcfa410371b4bb6f097b981f6b2637ead3
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
 DIST xen-security-patches-19.tar.xz 3336 SHA256 497a01fbd20fa45df19b41d337be0a87f4808101ac33cc9649461726abf43720 SHA512 d8a4a8ceeab9e2efedf880e7a2007b312a7f528cdb8fb1f748096621bbdc447ff8ee09b8fbe1aae657ccd7b2557e436cf60f6e70dcaef65e8959204e91f3ec57 WHIRLPOOL 26473bc9d7c2648f78f1fbf722e1ebcf42983d9d0e04d40f66eaad73c5a7ec232a397392dd5f66adb1258c571238a8faf0497ceb468674b93f7f86b91539f9b9
+DIST xen-security-patches-21.tar.xz 6888 SHA256 76e43fb4c41a606cb1a5e56045dedff0ed3c94b535d89a736664965ee4a44699 SHA512 eb889d90630b6a7c4b9785bf8c2db1d83c7878cec3aa125601b38f75f70a965e52aa5003024feec40d35ee940975dfd766eeb806cdcff717991876d50ce0839b WHIRLPOOL 9039cc7410fbb0e36e1ab74d597c7b1075f92e43b9d22bcb198c0594a0802fca50f86a9fa4343cea83a68eacd6acb6fa0ef73fbd20c19a27f5e92c3f32711af8

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r6.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r6.ebuild
new file mode 100644
index 0000000000..20cf1af534
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.7.1-r6.ebuild
@@ -0,0 +1,460 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=21
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=9
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=2
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( dev-lang/nasm )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.8.0-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.8.0-r2.ebuild
new file mode 100644
index 0000000000..78c2c2e6f3
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.8.0-r2.ebuild
@@ -0,0 +1,456 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=21
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=9
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=1
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.10.0
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( dev-lang/nasm )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-02-16 17:16 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2017-02-16 17:16 UTC (permalink / raw
  To: gentoo-commits

commit:     7407b498648a32f359d5a7c4a5488cbb56334345
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 16 17:15:31 2017 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Feb 16 17:15:31 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7407b498

app-emulation/xen-tools: amd64 stable wrt bug #609160

Package-Manager: portage-2.3.3
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.7.1-r6.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r6.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r6.ebuild
index 20cf1af534..3ea89ad346 100644
--- a/app-emulation/xen-tools/xen-tools-4.7.1-r6.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.7.1-r6.ebuild
@@ -14,12 +14,12 @@ MAJOR_V="$(get_version_component_range 1-2)"
 
 if [[ $PV == *9999 ]]; then
 	inherit git-r3
-	KEYWORDS=""
+	KEYWORDS="amd64"
 	REPO="xen.git"
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=21
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-02-16 18:35 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-02-16 18:35 UTC (permalink / raw
  To: gentoo-commits

commit:     bcb13dc45e099840f43d7d5fbe7d21af60540088
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 16 18:34:35 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Feb 16 18:35:09 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcb13dc4

app-emulation/xen-tools: security cleanup

Gentoo-Bug: 609160

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-emulation/xen-tools/Manifest                  |   2 -
 app-emulation/xen-tools/xen-tools-4.7.1-r4.ebuild | 460 ----------------------
 app-emulation/xen-tools/xen-tools-4.7.1-r5.ebuild | 460 ----------------------
 app-emulation/xen-tools/xen-tools-4.8.0-r1.ebuild | 456 ---------------------
 4 files changed, 1378 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 4fe2216e04..6a15a234a9 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -4,8 +4,6 @@ DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a
 DIST xen-4.7.1-upstream-patches-0.tar.xz 16420 SHA256 cb4724fedadc408ec390f99e9928a44ec75e793fb55cb97793f09980855b6a32 SHA512 79e117c48c6cc3d5783c818218ac11ec494735ce89755b5e263a64c23fb1f0a425bc65b567a24ce2e348b6e3839b26133c7e2c36411e5cc7acb54b855149dfbe WHIRLPOOL 982165da62cbb28cd72d32662c366ca7dac91a511b356eb58bced4b4af5cbc0d94c7e280a2400e5d9c92938d2afee86abd7c688926c2b9cb191d4554be828844
 DIST xen-4.7.1.tar.gz 20706864 SHA256 e87f4b0575e78657ee23d31470a15ecf1ce8c3a92a771cda46bbcd4d0d671ffe SHA512 eb03244f5fa7b54402fcc1d38f1e69c0ea4536d5ab2f9859b41b5e94920ad9db20fb146e3c3d3635e9ca1d12e93ce0429e57f24bf53d4a2c4b69babc76ec724e WHIRLPOOL 5d7ba29ea58bdedb6a237f7cb1c0aacf361dc35ebb07ec8e55773e07b1f38c1b151615b526e14daeca7c2db235114bde0b6d124219e8818c6e529873b5151fec
 DIST xen-4.8.0.tar.gz 22499917 SHA256 1e15c713ab7ba3bfda8b4a285ed973529364fd1100e6dd5a61f29583dc667b04 SHA512 70b95553f9813573b12e52999a4df8701dec430f23c36a8dc70d25a46bb4bc9234e5b7feb74a04062af4c8d6b6bcfe947d90b2b172416206812e54bac9797454 WHIRLPOOL 1296c25a05e3ab81730a2587ea1c07c7c022f05cfefc580224185c8d5fc9853531031c1292f69eff944ae2752492c4b95f13e160be3c449a7626aeadf1a21102
-DIST xen-gentoo-patches-7.tar.xz 24148 SHA256 859fb6b69125c0a1079b35a74bb004dce1b04827b05f056a746cc42c1b187557 SHA512 faf2b0ecd67d545366e2af7e7ecab5f808d02354d07f23cbffe1c3cb80dbb5f88cc4aa140d928ad269612e55c41740ff5bf2af3f0a1f16e375d404c3ffa712b1 WHIRLPOOL d75c35fa10dd1f1567a82c5d5cd7ddabc72def6d74ef7095b7bca9ce9adad2b6ff9c88b55bad7cdefe88da027e5c742f9b9dcafce457cf15f408ea35652546f6
 DIST xen-gentoo-patches-9.tar.xz 27456 SHA256 67c410d12ef4628a8c0a931e5868b425f2eb4b2f0e307304a75384cbe509734b SHA512 9a797be9dd2392c34b3f6561c2274e116b4f5b114f4520dbbd0b51818c774479ceabb45aa916f93c1a2bc49787f4ca6e6c83bc743baa6bdeef91d77276b20f36 WHIRLPOOL c41cde532726bb55acd05d558b35d575b229d2ee64eba7438f7b196df313f0e44154148c1e47bf6e8c810667b3b237bcfa410371b4bb6f097b981f6b2637ead3
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
-DIST xen-security-patches-19.tar.xz 3336 SHA256 497a01fbd20fa45df19b41d337be0a87f4808101ac33cc9649461726abf43720 SHA512 d8a4a8ceeab9e2efedf880e7a2007b312a7f528cdb8fb1f748096621bbdc447ff8ee09b8fbe1aae657ccd7b2557e436cf60f6e70dcaef65e8959204e91f3ec57 WHIRLPOOL 26473bc9d7c2648f78f1fbf722e1ebcf42983d9d0e04d40f66eaad73c5a7ec232a397392dd5f66adb1258c571238a8faf0497ceb468674b93f7f86b91539f9b9
 DIST xen-security-patches-21.tar.xz 6888 SHA256 76e43fb4c41a606cb1a5e56045dedff0ed3c94b535d89a736664965ee4a44699 SHA512 eb889d90630b6a7c4b9785bf8c2db1d83c7878cec3aa125601b38f75f70a965e52aa5003024feec40d35ee940975dfd766eeb806cdcff717991876d50ce0839b WHIRLPOOL 9039cc7410fbb0e36e1ab74d597c7b1075f92e43b9d22bcb198c0594a0802fca50f86a9fa4343cea83a68eacd6acb6fa0ef73fbd20c19a27f5e92c3f32711af8

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r4.ebuild
deleted file mode 100644
index 234e197802..0000000000
--- a/app-emulation/xen-tools/xen-tools-4.7.1-r4.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=19
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=7
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( dev-lang/nasm )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r5.ebuild
deleted file mode 100644
index 38d0816621..0000000000
--- a/app-emulation/xen-tools/xen-tools-4.7.1-r5.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=19
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=9
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=2
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( dev-lang/nasm )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.8.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.8.0-r1.ebuild
deleted file mode 100644
index 13be2a8e4a..0000000000
--- a/app-emulation/xen-tools/xen-tools-4.8.0-r1.ebuild
+++ /dev/null
@@ -1,456 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=9
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( dev-lang/nasm )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-02-22  9:08 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-02-22  9:08 UTC (permalink / raw
  To: gentoo-commits

commit:     68032806896565d2cdc7338c02092c2ee1a5fc3b
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 22 09:07:11 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Feb 22 09:08:24 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68032806

app-emulation/xen-tools: fix XSA-209

cirrus_bitblt_cputovideo does not check if memory region is safe

Gentoo-Bug: 609120

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-emulation/xen-tools/Manifest                  |   1 +
 app-emulation/xen-tools/xen-tools-4.7.1-r7.ebuild | 460 ++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.8.0-r3.ebuild | 456 +++++++++++++++++++++
 3 files changed, 917 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 6a15a234a9..a907077345 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -7,3 +7,4 @@ DIST xen-4.8.0.tar.gz 22499917 SHA256 1e15c713ab7ba3bfda8b4a285ed973529364fd1100
 DIST xen-gentoo-patches-9.tar.xz 27456 SHA256 67c410d12ef4628a8c0a931e5868b425f2eb4b2f0e307304a75384cbe509734b SHA512 9a797be9dd2392c34b3f6561c2274e116b4f5b114f4520dbbd0b51818c774479ceabb45aa916f93c1a2bc49787f4ca6e6c83bc743baa6bdeef91d77276b20f36 WHIRLPOOL c41cde532726bb55acd05d558b35d575b229d2ee64eba7438f7b196df313f0e44154148c1e47bf6e8c810667b3b237bcfa410371b4bb6f097b981f6b2637ead3
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
 DIST xen-security-patches-21.tar.xz 6888 SHA256 76e43fb4c41a606cb1a5e56045dedff0ed3c94b535d89a736664965ee4a44699 SHA512 eb889d90630b6a7c4b9785bf8c2db1d83c7878cec3aa125601b38f75f70a965e52aa5003024feec40d35ee940975dfd766eeb806cdcff717991876d50ce0839b WHIRLPOOL 9039cc7410fbb0e36e1ab74d597c7b1075f92e43b9d22bcb198c0594a0802fca50f86a9fa4343cea83a68eacd6acb6fa0ef73fbd20c19a27f5e92c3f32711af8
+DIST xen-security-patches-22.tar.xz 7600 SHA256 2620473184148d1c05aa2317beac487bb7d56065b3a78b7c863f3cd290458519 SHA512 6bd2d0a355b03f6f36331814c00d65ab4547c9ac978b8c5317cb042e11a6eeb7ac588032259c8d9ef9be83939add95bb58d8e8b7f1b8d68dc4627c6808db5eb6 WHIRLPOOL c4f6edafb7e101b9a7e2b42a7626409926628a1f73df15c3357422f52ad3da201aba1b0b09e6203f42e9990902cf47455eb5c16f7b35cdd4dca4bcdbf0a9fb39

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r7.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r7.ebuild
new file mode 100644
index 0000000000..726e0e7094
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.7.1-r7.ebuild
@@ -0,0 +1,460 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS="amd64 x86"
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=22
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=9
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=2
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( dev-lang/nasm )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.8.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.8.0-r3.ebuild
new file mode 100644
index 0000000000..f87e05ba01
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.8.0-r3.ebuild
@@ -0,0 +1,456 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=22
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=9
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=1
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.10.0
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( dev-lang/nasm )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-02-23  4:11 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-02-23  4:11 UTC (permalink / raw
  To: gentoo-commits

commit:     65ebf8aa864d102816a5ffa6a00733a94157903f
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 23 03:10:26 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Feb 23 04:11:04 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65ebf8aa

app-emulation/xen-tools: fix XSA-209 patchset

pull another patch which need by XSA-209

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-emulation/xen-tools/Manifest                  |   1 +
 app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild | 460 ++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.8.0-r4.ebuild | 456 +++++++++++++++++++++
 3 files changed, 917 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index a907077345..46aa4333c9 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -8,3 +8,4 @@ DIST xen-gentoo-patches-9.tar.xz 27456 SHA256 67c410d12ef4628a8c0a931e5868b425f2
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
 DIST xen-security-patches-21.tar.xz 6888 SHA256 76e43fb4c41a606cb1a5e56045dedff0ed3c94b535d89a736664965ee4a44699 SHA512 eb889d90630b6a7c4b9785bf8c2db1d83c7878cec3aa125601b38f75f70a965e52aa5003024feec40d35ee940975dfd766eeb806cdcff717991876d50ce0839b WHIRLPOOL 9039cc7410fbb0e36e1ab74d597c7b1075f92e43b9d22bcb198c0594a0802fca50f86a9fa4343cea83a68eacd6acb6fa0ef73fbd20c19a27f5e92c3f32711af8
 DIST xen-security-patches-22.tar.xz 7600 SHA256 2620473184148d1c05aa2317beac487bb7d56065b3a78b7c863f3cd290458519 SHA512 6bd2d0a355b03f6f36331814c00d65ab4547c9ac978b8c5317cb042e11a6eeb7ac588032259c8d9ef9be83939add95bb58d8e8b7f1b8d68dc4627c6808db5eb6 WHIRLPOOL c4f6edafb7e101b9a7e2b42a7626409926628a1f73df15c3357422f52ad3da201aba1b0b09e6203f42e9990902cf47455eb5c16f7b35cdd4dca4bcdbf0a9fb39
+DIST xen-security-patches-23.tar.xz 8280 SHA256 caab81e99c4ec7128119141cb344ce60137c019ffc546ec76c25a7e505063f08 SHA512 921730acde0c6f9a4e62fc22805e76f9c2fe5459dd126a2bda2e9cbe615f52ccbcc0241021cf128b2e8dd870ba5fba8b193005142db01ecf55612b276ca8866b WHIRLPOOL 0634d8b97897de8878190537a727afbc0fdf7dd197d34f1bf443073fe5af2aacf3d93b36cd407ec21561871fa9eb0efc6615c34fae1368e7d7a1deef96c31e6b

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild
new file mode 100644
index 0000000000..6ceeb22ad9
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild
@@ -0,0 +1,460 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS="amd64 x86"
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=23
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=9
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=2
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.8.2
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( dev-lang/nasm )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if has_version dev-libs/libgcrypt:0; then
+		export "CONFIG_GCRYPT=y"
+	fi
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.8.0-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.8.0-r4.ebuild
new file mode 100644
index 0000000000..dd876e7ff2
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.8.0-r4.ebuild
@@ -0,0 +1,456 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=23
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=9
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=1
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.10.0
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="http://xen.org/"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	${PYTHON_DEPS}
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( dev-lang/nasm )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# use /var instead of /var/lib, consistat with previous ebuild
+	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
+		m4/paths.m4 configure tools/configure || die
+	# use /run instead of /var/run
+	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
+		m4/paths.m4 configure tools/configure || die
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# Bug #575868 converted to a sed statement, typo of one char
+	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
+
+	epatch_user
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "http://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-02-23  4:11 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-02-23  4:11 UTC (permalink / raw
  To: gentoo-commits

commit:     60f25d9bfdf49f08f43aa11149862d1f41e81795
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 23 04:10:25 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Feb 23 04:11:04 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60f25d9b

app-emulation/xen-tools: drop old

have problem with those security patch
was missing one patch for XSA-209

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-emulation/xen-tools/Manifest                  |   1 -
 app-emulation/xen-tools/xen-tools-4.7.1-r7.ebuild | 460 ----------------------
 app-emulation/xen-tools/xen-tools-4.8.0-r3.ebuild | 456 ---------------------
 3 files changed, 917 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 46aa4333c9..484ee1435b 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -7,5 +7,4 @@ DIST xen-4.8.0.tar.gz 22499917 SHA256 1e15c713ab7ba3bfda8b4a285ed973529364fd1100
 DIST xen-gentoo-patches-9.tar.xz 27456 SHA256 67c410d12ef4628a8c0a931e5868b425f2eb4b2f0e307304a75384cbe509734b SHA512 9a797be9dd2392c34b3f6561c2274e116b4f5b114f4520dbbd0b51818c774479ceabb45aa916f93c1a2bc49787f4ca6e6c83bc743baa6bdeef91d77276b20f36 WHIRLPOOL c41cde532726bb55acd05d558b35d575b229d2ee64eba7438f7b196df313f0e44154148c1e47bf6e8c810667b3b237bcfa410371b4bb6f097b981f6b2637ead3
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
 DIST xen-security-patches-21.tar.xz 6888 SHA256 76e43fb4c41a606cb1a5e56045dedff0ed3c94b535d89a736664965ee4a44699 SHA512 eb889d90630b6a7c4b9785bf8c2db1d83c7878cec3aa125601b38f75f70a965e52aa5003024feec40d35ee940975dfd766eeb806cdcff717991876d50ce0839b WHIRLPOOL 9039cc7410fbb0e36e1ab74d597c7b1075f92e43b9d22bcb198c0594a0802fca50f86a9fa4343cea83a68eacd6acb6fa0ef73fbd20c19a27f5e92c3f32711af8
-DIST xen-security-patches-22.tar.xz 7600 SHA256 2620473184148d1c05aa2317beac487bb7d56065b3a78b7c863f3cd290458519 SHA512 6bd2d0a355b03f6f36331814c00d65ab4547c9ac978b8c5317cb042e11a6eeb7ac588032259c8d9ef9be83939add95bb58d8e8b7f1b8d68dc4627c6808db5eb6 WHIRLPOOL c4f6edafb7e101b9a7e2b42a7626409926628a1f73df15c3357422f52ad3da201aba1b0b09e6203f42e9990902cf47455eb5c16f7b35cdd4dca4bcdbf0a9fb39
 DIST xen-security-patches-23.tar.xz 8280 SHA256 caab81e99c4ec7128119141cb344ce60137c019ffc546ec76c25a7e505063f08 SHA512 921730acde0c6f9a4e62fc22805e76f9c2fe5459dd126a2bda2e9cbe615f52ccbcc0241021cf128b2e8dd870ba5fba8b193005142db01ecf55612b276ca8866b WHIRLPOOL 0634d8b97897de8878190537a727afbc0fdf7dd197d34f1bf443073fe5af2aacf3d93b36cd407ec21561871fa9eb0efc6615c34fae1368e7d7a1deef96c31e6b

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r7.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r7.ebuild
deleted file mode 100644
index 726e0e7094..0000000000
--- a/app-emulation/xen-tools/xen-tools-4.7.1-r7.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS="amd64 x86"
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=22
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=9
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=2
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( dev-lang/nasm )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.8.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.8.0-r3.ebuild
deleted file mode 100644
index f87e05ba01..0000000000
--- a/app-emulation/xen-tools/xen-tools-4.8.0-r3.ebuild
+++ /dev/null
@@ -1,456 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=22
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=9
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( dev-lang/nasm )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-02-23 15:55 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2017-02-23 15:55 UTC (permalink / raw
  To: gentoo-commits

commit:     c9e61a97b32eb3afdfede6cd1db8a669cc53be1f
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 23 15:53:42 2017 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Feb 23 15:53:42 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9e61a97

app-emulation/xen-tools: amd64 stable wrt bug #609120

Package-Manager: portage-2.3.3
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild
index 6ceeb22ad9..df2599a420 100644
--- a/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=23
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-02-23 16:30 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2017-02-23 16:30 UTC (permalink / raw
  To: gentoo-commits

commit:     b5a6461e81b7b8060ef7e5855058232a643054d6
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 23 16:28:58 2017 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Feb 23 16:28:58 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5a6461e

app-emulation/xen-tools: x86 stable wrt bug #609120

Package-Manager: portage-2.3.3
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild
index df2599a420..740deea444 100644
--- a/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=23
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-02-24  9:35 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-02-24  9:35 UTC (permalink / raw
  To: gentoo-commits

commit:     bc0a1eaa2e7acd3d5c40e6cd894f5bc5069a081d
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 24 09:32:23 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Feb 24 09:35:16 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc0a1eaa

app-emulation/xen-tools: drop old vulnerables

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 app-emulation/xen-tools/Manifest                  |   1 -
 app-emulation/xen-tools/xen-tools-4.7.1-r6.ebuild | 460 ----------------------
 app-emulation/xen-tools/xen-tools-4.8.0-r2.ebuild | 456 ---------------------
 3 files changed, 917 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 484ee1435b..715560e77e 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,5 +6,4 @@ DIST xen-4.7.1.tar.gz 20706864 SHA256 e87f4b0575e78657ee23d31470a15ecf1ce8c3a92a
 DIST xen-4.8.0.tar.gz 22499917 SHA256 1e15c713ab7ba3bfda8b4a285ed973529364fd1100e6dd5a61f29583dc667b04 SHA512 70b95553f9813573b12e52999a4df8701dec430f23c36a8dc70d25a46bb4bc9234e5b7feb74a04062af4c8d6b6bcfe947d90b2b172416206812e54bac9797454 WHIRLPOOL 1296c25a05e3ab81730a2587ea1c07c7c022f05cfefc580224185c8d5fc9853531031c1292f69eff944ae2752492c4b95f13e160be3c449a7626aeadf1a21102
 DIST xen-gentoo-patches-9.tar.xz 27456 SHA256 67c410d12ef4628a8c0a931e5868b425f2eb4b2f0e307304a75384cbe509734b SHA512 9a797be9dd2392c34b3f6561c2274e116b4f5b114f4520dbbd0b51818c774479ceabb45aa916f93c1a2bc49787f4ca6e6c83bc743baa6bdeef91d77276b20f36 WHIRLPOOL c41cde532726bb55acd05d558b35d575b229d2ee64eba7438f7b196df313f0e44154148c1e47bf6e8c810667b3b237bcfa410371b4bb6f097b981f6b2637ead3
 DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
-DIST xen-security-patches-21.tar.xz 6888 SHA256 76e43fb4c41a606cb1a5e56045dedff0ed3c94b535d89a736664965ee4a44699 SHA512 eb889d90630b6a7c4b9785bf8c2db1d83c7878cec3aa125601b38f75f70a965e52aa5003024feec40d35ee940975dfd766eeb806cdcff717991876d50ce0839b WHIRLPOOL 9039cc7410fbb0e36e1ab74d597c7b1075f92e43b9d22bcb198c0594a0802fca50f86a9fa4343cea83a68eacd6acb6fa0ef73fbd20c19a27f5e92c3f32711af8
 DIST xen-security-patches-23.tar.xz 8280 SHA256 caab81e99c4ec7128119141cb344ce60137c019ffc546ec76c25a7e505063f08 SHA512 921730acde0c6f9a4e62fc22805e76f9c2fe5459dd126a2bda2e9cbe615f52ccbcc0241021cf128b2e8dd870ba5fba8b193005142db01ecf55612b276ca8866b WHIRLPOOL 0634d8b97897de8878190537a727afbc0fdf7dd197d34f1bf443073fe5af2aacf3d93b36cd407ec21561871fa9eb0efc6615c34fae1368e7d7a1deef96c31e6b

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r6.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r6.ebuild
deleted file mode 100644
index c7291470ef..0000000000
--- a/app-emulation/xen-tools/xen-tools-4.7.1-r6.ebuild
+++ /dev/null
@@ -1,460 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS="amd64 x86"
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=21
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=9
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=2
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.8.2
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( dev-lang/nasm )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if has_version dev-libs/libgcrypt:0; then
-		export "CONFIG_GCRYPT=y"
-	fi
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.8.0-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.8.0-r2.ebuild
deleted file mode 100644
index 78c2c2e6f3..0000000000
--- a/app-emulation/xen-tools/xen-tools-4.8.0-r2.ebuild
+++ /dev/null
@@ -1,456 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=21
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=9
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="http://xen.org/"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( dev-lang/nasm )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-doc/doxygen
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
-		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="usr/lib/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "http://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper.  File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-04-20  7:59 David Seifert
  0 siblings, 0 replies; 295+ messages in thread
From: David Seifert @ 2017-04-20  7:59 UTC (permalink / raw
  To: gentoo-commits

commit:     d17ef789637918530b58339dde3a7ee0744ecee6
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 20 07:09:02 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Apr 20 07:57:26 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d17ef789

app-emulation/xen-tools: [QA] Add missing python metadata variables

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.7.2.ebuild    | 2 +-
 app-emulation/xen-tools/xen-tools-4.8.0-r4.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.8.0-r5.ebuild | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild b/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild
index d678580af40..f546e064f27 100644
--- a/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.7.1-r8.ebuild
@@ -77,6 +77,7 @@ COMMON_DEPEND="
 	dev-libs/libaio
 	dev-libs/libgcrypt:0
 	sys-libs/zlib
+	${PYTHON_DEPS}
 "
 
 DEPEND="${COMMON_DEPEND}
@@ -84,7 +85,6 @@ DEPEND="${COMMON_DEPEND}
 	x86? ( sys-devel/dev86
 		sys-power/iasl )
 	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
 	api? ( dev-libs/libxml2
 		net-misc/curl )
 	ovmf? (

diff --git a/app-emulation/xen-tools/xen-tools-4.7.2.ebuild b/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
index 6e09f2935f8..36614705a62 100644
--- a/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
@@ -77,6 +77,7 @@ COMMON_DEPEND="
 	dev-libs/libaio
 	dev-libs/libgcrypt:0
 	sys-libs/zlib
+	${PYTHON_DEPS}
 "
 
 DEPEND="${COMMON_DEPEND}
@@ -84,7 +85,6 @@ DEPEND="${COMMON_DEPEND}
 	x86? ( sys-devel/dev86
 		sys-power/iasl )
 	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
 	api? ( dev-libs/libxml2
 		net-misc/curl )
 	ovmf? (

diff --git a/app-emulation/xen-tools/xen-tools-4.8.0-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.8.0-r4.ebuild
index f13dc589fed..c382ec19a8e 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.0-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.0-r4.ebuild
@@ -77,6 +77,7 @@ COMMON_DEPEND="
 	dev-libs/libaio
 	dev-libs/libgcrypt:0
 	sys-libs/zlib
+	${PYTHON_DEPS}
 "
 
 DEPEND="${COMMON_DEPEND}
@@ -84,7 +85,6 @@ DEPEND="${COMMON_DEPEND}
 	x86? ( sys-devel/dev86
 		sys-power/iasl )
 	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
 	api? ( dev-libs/libxml2
 		net-misc/curl )
 	ovmf? (

diff --git a/app-emulation/xen-tools/xen-tools-4.8.0-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.8.0-r5.ebuild
index 1c568bfa2df..e4f5a970597 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.0-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.0-r5.ebuild
@@ -77,6 +77,7 @@ COMMON_DEPEND="
 	dev-libs/libaio
 	dev-libs/libgcrypt:0
 	sys-libs/zlib
+	${PYTHON_DEPS}
 "
 
 DEPEND="${COMMON_DEPEND}
@@ -84,7 +85,6 @@ DEPEND="${COMMON_DEPEND}
 	x86? ( sys-devel/dev86
 		sys-power/iasl )
 	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	${PYTHON_DEPS}
 	api? ( dev-libs/libxml2
 		net-misc/curl )
 	ovmf? (


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-05-02  9:01 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-05-02  9:01 UTC (permalink / raw
  To: gentoo-commits

commit:     911800c0fe06e2c32394d04a19af828257914bd6
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Tue May  2 08:18:47 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue May  2 09:01:36 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=911800c0

app-emulation/xen-tools: check and emit failure message

'source' command may fail if the file not found

Gentoo-Bug: 616042
Package-Manager: Portage-2.3.5, Repoman-2.3.2

 app-emulation/xen-tools/xen-tools-4.7.2.ebuild | 4 ++--
 app-emulation/xen-tools/xen-tools-4.8.1.ebuild | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.7.2.ebuild b/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
index 36614705a62..91fb13495b8 100644
--- a/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
@@ -185,7 +185,7 @@ src_prepare() {
 		EPATCH_SUFFIX="patch"
 		EPATCH_FORCE="yes"
 
-		source "${WORKDIR}"/patches-security/${PV}.conf
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
 
 		for i in ${XEN_SECURITY_MAIN}; do
 			epatch "${WORKDIR}"/patches-security/xen/$i
@@ -215,7 +215,7 @@ src_prepare() {
 	# Gentoo's patchset
 	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
 		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
+		source "${FILESDIR}"/gentoo-patches.conf || die
 		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
 		for i in ${!_gpv}; do
 			EPATCH_SUFFIX="patch" \

diff --git a/app-emulation/xen-tools/xen-tools-4.8.1.ebuild b/app-emulation/xen-tools/xen-tools-4.8.1.ebuild
index 9133e5d6309..97abadec279 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.1.ebuild
@@ -181,7 +181,7 @@ src_prepare() {
 		EPATCH_SUFFIX="patch"
 		EPATCH_FORCE="yes"
 
-		source "${WORKDIR}"/patches-security/${PV}.conf
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
 
 		for i in ${XEN_SECURITY_MAIN}; do
 			epatch "${WORKDIR}"/patches-security/xen/$i
@@ -211,7 +211,7 @@ src_prepare() {
 	# Gentoo's patchset
 	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
 		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf
+		source "${FILESDIR}"/gentoo-patches.conf || die
 		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
 		for i in ${!_gpv}; do
 			EPATCH_SUFFIX="patch" \


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-05-02  9:01 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-05-02  9:01 UTC (permalink / raw
  To: gentoo-commits

commit:     19210f286efe1cfbc6fd71bbe06782b61f8ffa14
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Tue May  2 08:27:58 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue May  2 09:01:37 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19210f28

app-emulation/xen-tools: fix localstatedir path

The systemd /usr/lib64/systemd/system/var-lib-xenstored.mount file contains the line:
Where=/var/lib/lib/xenstored

This will trigger the systemd error message in the journal:
var-lib-xenstored.mount: Where= setting doesn't match unit name. Refusing.

Gentoo-Bug: 572304
Package-Manager: Portage-2.3.5, Repoman-2.3.2

 app-emulation/xen-tools/xen-tools-4.8.1.ebuild | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.8.1.ebuild b/app-emulation/xen-tools/xen-tools-4.8.1.ebuild
index 97abadec279..b0b687340db 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.1.ebuild
@@ -316,13 +316,6 @@ src_prepare() {
 		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
 	fi
 
-	# use /var instead of /var/lib, consistat with previous ebuild
-	sed -i -e   "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
-		m4/paths.m4 configure tools/configure || die
-	# use /run instead of /var/run
-	sed -i -e   "/XEN_RUN_DIR=/s/\$localstatedir//g" \
-		m4/paths.m4 configure tools/configure || die
-
 	# uncomment lines in xl.conf
 	sed -e 's:^#autoballoon=:autoballoon=:' \
 		-e 's:^#lockfile=:lockfile=:' \
@@ -339,6 +332,7 @@ src_configure() {
 	local myconf="--prefix=${PREFIX}/usr \
 		--libdir=${PREFIX}/usr/$(get_libdir) \
 		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
 		--disable-werror \
 		--disable-xen \
 		--enable-tools \


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-05-10  9:32 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2017-05-10  9:32 UTC (permalink / raw
  To: gentoo-commits

commit:     c6c64d6184f37f855e3e693acceaefd2dde1d594
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Wed May 10 09:31:51 2017 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Wed May 10 09:31:51 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6c64d61

app-emulation/xen-tools: amd64 stable wrt bug #615980

Package-Manager: Portage-2.3.5, Repoman-2.3.1
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.7.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.7.2.ebuild b/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
index 91fb13495b8..de9f8a63be8 100644
--- a/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
@@ -18,7 +18,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=25
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-05-10 15:44 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2017-05-10 15:44 UTC (permalink / raw
  To: gentoo-commits

commit:     4b0045b52e6e15e367942695453e1027a84abab0
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Wed May 10 15:43:47 2017 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Wed May 10 15:44:50 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b0045b5

app-emulation/xen-tools: x86 stable wrt bug #615980

Package-Manager: Portage-2.3.5, Repoman-2.3.1
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.7.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.7.2.ebuild b/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
index de9f8a63be8..230f4579eb7 100644
--- a/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
@@ -18,7 +18,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=25
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-06-20 13:15 Alexis Ballier
  0 siblings, 0 replies; 295+ messages in thread
From: Alexis Ballier @ 2017-06-20 13:15 UTC (permalink / raw
  To: gentoo-commits

commit:     236914e133efc32022be9bccc5b8701873f05527
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 20 12:44:10 2017 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Tue Jun 20 13:15:19 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=236914e1

app-emulation/xen-tools: arm64 does not need nasm either, fixes a repoman warning

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 app-emulation/xen-tools/xen-tools-4.7.2.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.8.1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.7.2.ebuild b/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
index 230f4579eb7..c4fa110e069 100644
--- a/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.7.2.ebuild
@@ -88,7 +88,7 @@ DEPEND="${COMMON_DEPEND}
 	api? ( dev-libs/libxml2
 		net-misc/curl )
 	ovmf? (
-		!arm? ( dev-lang/nasm )
+		!arm? ( !arm64? ( dev-lang/nasm ) )
 		$(python_gen_impl_dep sqlite)
 		)
 	!amd64? ( >=sys-apps/dtc-1.4.0 )

diff --git a/app-emulation/xen-tools/xen-tools-4.8.1.ebuild b/app-emulation/xen-tools/xen-tools-4.8.1.ebuild
index b0b687340db..0a1b8ac77b5 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.1.ebuild
@@ -88,7 +88,7 @@ DEPEND="${COMMON_DEPEND}
 	api? ( dev-libs/libxml2
 		net-misc/curl )
 	ovmf? (
-		!arm? ( dev-lang/nasm )
+		!arm? ( !arm64? ( dev-lang/nasm ) )
 		$(python_gen_impl_dep sqlite)
 		)
 	!amd64? ( >=sys-apps/dtc-1.4.0 )


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-07-31  9:01 Tobias Klausmann
  0 siblings, 0 replies; 295+ messages in thread
From: Tobias Klausmann @ 2017-07-31  9:01 UTC (permalink / raw
  To: gentoo-commits

commit:     cf93107d5b57df1412807eddcbaef9447c54cff8
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 31 09:00:54 2017 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Mon Jul 31 09:00:54 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf93107d

app-emulation/xen-tools-4.7.3-r0: amd64 stable

Gentoo-Bug: 624128

 app-emulation/xen-tools/xen-tools-4.7.3.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.7.3.ebuild b/app-emulation/xen-tools/xen-tools-4.7.3.ebuild
index 93100c8956a..9bca6b105ee 100644
--- a/app-emulation/xen-tools/xen-tools-4.7.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.7.3.ebuild
@@ -13,12 +13,12 @@ MAJOR_V="$(get_version_component_range 1-2)"
 
 if [[ $PV == *9999 ]]; then
 	inherit git-r3
-	KEYWORDS="~amd64 ~x86"
+	KEYWORDS="amd64 ~x86"
 	REPO="xen.git"
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-10-13  8:05 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-10-13  8:05 UTC (permalink / raw
  To: gentoo-commits

commit:     85940acb6a41e0269d8411f25c3c83a4960c286f
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 13 07:15:10 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Oct 13 08:04:28 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85940acb

app-emulation/xen-tools: fix security bugs

Gentoo-Bug: 631366, 629678

Fix: XSA-237,238,239,240,241,242,243,244

Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                  | 1 +
 app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index c3c3b0b7a95..807381cfa2d 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,6 +5,7 @@ DIST xen-4.7.2-upstream-patches-0.tar.xz 45944 SHA256 e7783bc9adc939167eaef91e96
 DIST xen-4.7.2.tar.gz 20714281 SHA256 61494a56d9251e2108080f95b0dc8e3d175f1ba4da34603fc07b91cfebf358d5 SHA512 8f447e7feffec81fea5b5a4098968b8b8cebc6989e7b6a845413317644d5d328d6f12181d09266366200878ab6a29ab34c7235c1af7b55463a3fdaea40ee1500 WHIRLPOOL 27f3fd88846724e03bf9bb53133046cb79139950c9162dd9c9a85798e169259f73dc2fe4212e750ce9a8fd1d0abd99f1f76108faceb7bf1934ce0495377ee756
 DIST xen-4.7.3.tar.gz 20722625 SHA256 5b5385b476e59e4cf31ecc6dd605df38814b83432b8e8d917f18c8edfdfb708f SHA512 df596bef7f0f0e7f35246fb025913721dae5aa91da27f1b47a49256e9faa8f7dcb80e8c4679345c19614093c02059b6ced54fc51e6900a372b0e76b4ad827126 WHIRLPOOL 9e88db149e216651711cd56830fba33d587de60d57d53fd3ab3db231319f74e4e88222bf1b2bb9b20fea68739bccd4b26304c73a0ae25aad6dbbac64681e3a62
 DIST xen-4.8.2-upstream-patches-0.tar.xz 7540 SHA256 d4bd4ce76097c49ebbad67a64814b9b41af0528b390ade15814cf0fb144e5e77 SHA512 34118ac114773cfc01a464de2a93b14905d3fb5edd62ae093f6cb40758f89c7fdc8449d0b7e9bfbaaee812b6f32b0c21860adeebb609376a22ce231e405b0837 WHIRLPOOL 0ff8c2fe3c349e6dc85e98644a813dd590c42bc78c6bbf98cdf77ed516e73fe5ca72a44935eae77f6ff9dcba8fef5d24c181d24b63b15bc470e7ed59098d5808
+DIST xen-4.8.2-upstream-patches-1.tar.xz 29608 SHA256 7b1833eede01b7c8ae607614afd35c66ff009518cca972e2653d5828fb632aa6 SHA512 3ea002c37a0e2189f1846548a4aa607c42041cf093ec9a57509692dabe5c0b718151d183f5714443403d5cf8d4ab010a8f3893207bebf81cb85793282c30b457 WHIRLPOOL 0659a56e419918cb091ff0d87bf69a03464d2a0a0b4c6bad87521e83c40b48e210582d5fab2d9686b22b4ba839041be6e8aa39ab306a86ce18461d99c36be439
 DIST xen-4.8.2.tar.gz 22522336 SHA256 cb1cc2f0985e3d8651215e5d24c1fcc3036994fa7cc495a5091a2c85ece2aff9 SHA512 7805531f73d23ecfff3439770e62d387f4254a444875670d53a0a739323e5d4d8f8fcc478f8936ee1ae8aff3e0229549e47c01c606365a8ce060dd5c503e87da WHIRLPOOL 8e54e79219f89640162673da471a02ee8a39bb884e2376a79a09226462903185b49a771fef51ceca54c4dd42a110ee1214db6dbf94235a156a17d6c597634c3d
 DIST xen-gentoo-patches-10.tar.xz 27876 SHA256 aa91759d25611afa2e851e190c8445b18e4262037fc06da886f2fa4a4c500b94 SHA512 2033f4cb671971c73841cfaa7eb46623c37778c5746b47302eee252c4af287ccbeb8d1884ffdf32cd97a38cd7785257d56f13ef20d4c03dc0fb1cb196dc04ece WHIRLPOOL e02cc3c6ffd701b2f04df111ab33b18f7fa09e292b94a34af4d806509a564b896a7b677ab64654523ee992f363d59bf6bd4c2cbeaea7330f368cf657bfa2d538
 DIST xen-gentoo-patches-9.tar.xz 27456 SHA256 67c410d12ef4628a8c0a931e5868b425f2eb4b2f0e307304a75384cbe509734b SHA512 9a797be9dd2392c34b3f6561c2274e116b4f5b114f4520dbbd0b51818c774479ceabb45aa916f93c1a2bc49787f4ca6e6c83bc743baa6bdeef91d77276b20f36 WHIRLPOOL c41cde532726bb55acd05d558b35d575b229d2ee64eba7438f7b196df313f0e44154148c1e47bf6e8c810667b3b237bcfa410371b4bb6f097b981f6b2637ead3

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
index f84e8a0eb92..2a5886ec70e 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
+	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball
 	GENTOO_VER=10


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-10-13  8:05 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-10-13  8:05 UTC (permalink / raw
  To: gentoo-commits

commit:     f9ba137de38bf2544a0c471fce4e339048287bbf
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu Oct 12 07:33:37 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Oct 13 08:04:28 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f9ba137d

app-emulation/xen-tools: improve ebuild, fix bugs

Gentoo-Bug: 602830, 632484

Package-Manager: Portage-2.3.11, Repoman-2.3.3

Closes: https://github.com/gentoo/gentoo/pull/5925
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild | 468 ++++++++++++++++++++++
 1 file changed, 468 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
new file mode 100644
index 00000000000..f84e8a0eb92
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
@@ -0,0 +1,468 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=10
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.10.0
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED%/}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-10-17  7:24 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-10-17  7:24 UTC (permalink / raw
  To: gentoo-commits

commit:     6b9ff912c8bc4db4d4cafe3d72e5803904391725
Author:     Tomas Mozes <tmozes <AT> sygic <DOT> com>
AuthorDate: Mon Oct 16 12:24:07 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Oct 17 07:24:30 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b9ff912

app-emulation/xen-tools: fix building with gcc 7

Gentoo-Bug: 626008

Closes: https://github.com/gentoo/gentoo/pull/5962
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
index 7d6fde136d8..ed261704df2 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
@@ -256,6 +256,11 @@ src_prepare() {
 
 	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
 
+	# Fix building with gcc 7, Bug #634338
+	# https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=f49fa658b53580cf2ad354d2bf1796766cc11222
+	sed -e 's/name\[60\]/name\[100\]/g' \
+		-i tools/misc/xenlockprof.c || die
+
 	# Fix texi2html build error with new texi2html, qemu.doc.html
 	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-10-17  7:24 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-10-17  7:24 UTC (permalink / raw
  To: gentoo-commits

commit:     dc6492d68d6b86c2e3a5b8e0115eee3bd150fc63
Author:     Tomas Mozes <tmozes <AT> sygic <DOT> com>
AuthorDate: Mon Oct 16 12:16:33 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Oct 17 07:24:25 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc6492d6

app-emulation/xen-tools: require pciutils for pci passthrough

Gentoo-Bug: 626008

Closes: https://github.com/gentoo/gentoo/pull/5962
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild | 469 ++++++++++++++++++++++
 1 file changed, 469 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
new file mode 100644
index 00000000000..7d6fde136d8
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
@@ -0,0 +1,469 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=1
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=10
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.10.0
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-doc/doxygen
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-tex/latex2html[png,gif]
+		media-gfx/graphviz
+		dev-tex/xcolor
+		media-gfx/transfig
+		dev-texlive/texlive-latexextra
+		virtual/latex-base
+		dev-tex/latexmk
+		dev-texlive/texlive-latex
+		dev-texlive/texlive-pictures
+		dev-texlive/texlive-latexrecommended
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	use doc && emake -C docs txt html
+	emake -C docs man-pages
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED%/}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+
+		dohtml -r docs/
+		docinto pdf
+		dodoc ${DOCS[@]}
+		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
+	fi
+
+	rm -rf "${D}"/usr/share/doc/xen/
+	doman docs/man?/*
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-10-17  7:24 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-10-17  7:24 UTC (permalink / raw
  To: gentoo-commits

commit:     c225f1b9c8379dd0c166a5a5acd471c0146b28b8
Author:     Tomas Mozes <tmozes <AT> sygic <DOT> com>
AuthorDate: Mon Oct 16 12:29:04 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Oct 17 07:24:31 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c225f1b9

app-emulation/xen-tools: improve documentation building

Closes: https://github.com/gentoo/gentoo/pull/5962
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild | 33 +++++++----------------
 1 file changed, 10 insertions(+), 23 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
index ed261704df2..235f97cb493 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
@@ -101,18 +101,10 @@ DEPEND="${COMMON_DEPEND}
 	dev-lang/perl
 	app-misc/pax-utils
 	doc? (
-		app-doc/doxygen
+		app-text/pandoc
 		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-tex/latex2html[png,gif]
-		media-gfx/graphviz
-		dev-tex/xcolor
-		media-gfx/transfig
 		dev-texlive/texlive-latexextra
-		virtual/latex-base
-		dev-tex/latexmk
-		dev-texlive/texlive-latex
-		dev-texlive/texlive-pictures
-		dev-texlive/texlive-latexrecommended
+		media-gfx/transfig
 	)
 	hvm? ( x11-proto/xproto
 		!net-libs/libiscsi )
@@ -383,8 +375,11 @@ src_compile() {
 
 	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
 
-	use doc && emake -C docs txt html
-	emake -C docs man-pages
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
 }
 
 src_install() {
@@ -408,17 +403,9 @@ src_install() {
 	# Remove RedHat-specific stuff
 	rm -rf "${D}"tmp || die
 
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-
-		dohtml -r docs/
-		docinto pdf
-		dodoc ${DOCS[@]}
-		[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
-	fi
-
-	rm -rf "${D}"/usr/share/doc/xen/
-	doman docs/man?/*
+	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+	use doc && dodoc -r docs/{pdf,txt}
+	dodoc ${DOCS[@]}
 
 	newconfd "${FILESDIR}"/xendomains.confd xendomains
 	newconfd "${FILESDIR}"/xenstored.confd xenstored


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-10-17  7:24 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-10-17  7:24 UTC (permalink / raw
  To: gentoo-commits

commit:     594f4b33b3083991a6da556f814e17fda9a4f1f9
Author:     Tomas Mozes <tmozes <AT> sygic <DOT> com>
AuthorDate: Mon Oct 16 12:30:49 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Oct 17 07:24:31 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=594f4b33

app-emulation/xen-tools: fix bashism

Closes: https://github.com/gentoo/gentoo/pull/5962
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
index 235f97cb493..1aac5f357a3 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
@@ -324,6 +324,10 @@ src_prepare() {
 	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
 		-i tools/hotplug/Linux/init.d/xencommons.in || die
 
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
 	# respect multilib, usr/lib/libcacard.so.0.0.0
 	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
 		-i tools/qemu-xen/configure || die


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-11-02 21:16 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2017-11-02 21:16 UTC (permalink / raw
  To: gentoo-commits

commit:     44794cd62f5c2d200046f3546d9eb80a1dc634a9
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Nov  2 20:58:33 2017 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Nov  2 21:13:12 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44794cd6

app-emulation/xen-tools: x86 stable (bug #631366)

Package-Manager: Portage-2.3.13, Repoman-2.3.4

 app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
index 3e35cd4c8ea..6e96925cfed 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
@@ -13,12 +13,12 @@ MAJOR_V="$(get_version_component_range 1-2)"
 
 if [[ $PV == *9999 ]]; then
 	inherit git-r3
-	KEYWORDS=""
+	KEYWORDS="x86"
 	REPO="xen.git"
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-11-03 10:08 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-11-03 10:08 UTC (permalink / raw
  To: gentoo-commits

commit:     fb2eba50033bc28a68c10f18c5393fc2a841c335
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  3 10:06:43 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Nov  3 10:07:40 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb2eba50

app-emulation/xen-tools: version bump

Package-Manager: Portage-2.3.10, Repoman-2.3.3

 app-emulation/xen-tools/Manifest                  |   1 +
 app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild | 467 ++++++++++++++++++++++
 2 files changed, 468 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 807381cfa2d..df0b1eb60af 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,6 +6,7 @@ DIST xen-4.7.2.tar.gz 20714281 SHA256 61494a56d9251e2108080f95b0dc8e3d175f1ba4da
 DIST xen-4.7.3.tar.gz 20722625 SHA256 5b5385b476e59e4cf31ecc6dd605df38814b83432b8e8d917f18c8edfdfb708f SHA512 df596bef7f0f0e7f35246fb025913721dae5aa91da27f1b47a49256e9faa8f7dcb80e8c4679345c19614093c02059b6ced54fc51e6900a372b0e76b4ad827126 WHIRLPOOL 9e88db149e216651711cd56830fba33d587de60d57d53fd3ab3db231319f74e4e88222bf1b2bb9b20fea68739bccd4b26304c73a0ae25aad6dbbac64681e3a62
 DIST xen-4.8.2-upstream-patches-0.tar.xz 7540 SHA256 d4bd4ce76097c49ebbad67a64814b9b41af0528b390ade15814cf0fb144e5e77 SHA512 34118ac114773cfc01a464de2a93b14905d3fb5edd62ae093f6cb40758f89c7fdc8449d0b7e9bfbaaee812b6f32b0c21860adeebb609376a22ce231e405b0837 WHIRLPOOL 0ff8c2fe3c349e6dc85e98644a813dd590c42bc78c6bbf98cdf77ed516e73fe5ca72a44935eae77f6ff9dcba8fef5d24c181d24b63b15bc470e7ed59098d5808
 DIST xen-4.8.2-upstream-patches-1.tar.xz 29608 SHA256 7b1833eede01b7c8ae607614afd35c66ff009518cca972e2653d5828fb632aa6 SHA512 3ea002c37a0e2189f1846548a4aa607c42041cf093ec9a57509692dabe5c0b718151d183f5714443403d5cf8d4ab010a8f3893207bebf81cb85793282c30b457 WHIRLPOOL 0659a56e419918cb091ff0d87bf69a03464d2a0a0b4c6bad87521e83c40b48e210582d5fab2d9686b22b4ba839041be6e8aa39ab306a86ce18461d99c36be439
+DIST xen-4.8.2-upstream-patches-2.tar.xz 38852 SHA256 12c1f1fd2adba22b923d2ee944e6e66794701393966f9e9e2079961e202f6d64 SHA512 536823eabf03e92585a8c5cde90ce502672dd1ec080b28b39411d6a778b899436a57bfb633f11c94d48d2f963848b7771e469f5ea53e84b580976f631f69cc5d WHIRLPOOL 5baf92709da895eccbe8b154c1d1cdf4c2f0faf5166ef2e4bbf32ca6899d8b88aa67ccd765a15a2f9a6d5200d4a1eb832775891d41c00a950855e5d1d4358e35
 DIST xen-4.8.2.tar.gz 22522336 SHA256 cb1cc2f0985e3d8651215e5d24c1fcc3036994fa7cc495a5091a2c85ece2aff9 SHA512 7805531f73d23ecfff3439770e62d387f4254a444875670d53a0a739323e5d4d8f8fcc478f8936ee1ae8aff3e0229549e47c01c606365a8ce060dd5c503e87da WHIRLPOOL 8e54e79219f89640162673da471a02ee8a39bb884e2376a79a09226462903185b49a771fef51ceca54c4dd42a110ee1214db6dbf94235a156a17d6c597634c3d
 DIST xen-gentoo-patches-10.tar.xz 27876 SHA256 aa91759d25611afa2e851e190c8445b18e4262037fc06da886f2fa4a4c500b94 SHA512 2033f4cb671971c73841cfaa7eb46623c37778c5746b47302eee252c4af287ccbeb8d1884ffdf32cd97a38cd7785257d56f13ef20d4c03dc0fb1cb196dc04ece WHIRLPOOL e02cc3c6ffd701b2f04df111ab33b18f7fa09e292b94a34af4d806509a564b896a7b677ab64654523ee992f363d59bf6bd4c2cbeaea7330f368cf657bfa2d538
 DIST xen-gentoo-patches-9.tar.xz 27456 SHA256 67c410d12ef4628a8c0a931e5868b425f2eb4b2f0e307304a75384cbe509734b SHA512 9a797be9dd2392c34b3f6561c2274e116b4f5b114f4520dbbd0b51818c774479ceabb45aa916f93c1a2bc49787f4ca6e6c83bc743baa6bdeef91d77276b20f36 WHIRLPOOL c41cde532726bb55acd05d558b35d575b229d2ee64eba7438f7b196df313f0e44154148c1e47bf6e8c810667b3b237bcfa410371b4bb6f097b981f6b2637ead3

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild
new file mode 100644
index 00000000000..431efbabe51
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild
@@ -0,0 +1,467 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=2
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=10
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=2
+
+	SEABIOS_VER=1.10.0
+	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
+	OVMF_PV=20151110
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-proto/xproto
+		!net-libs/libiscsi )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			epatch "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			epatch "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			epatch "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+				epatch "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			EPATCH_SUFFIX="patch" \
+			EPATCH_FORCE="yes" \
+			EPATCH_OPTS="-p1" \
+				epatch "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix building with gcc 7, Bug #634338
+	# https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=f49fa658b53580cf2ad354d2bf1796766cc11222
+	sed -e 's/name\[60\]/name\[100\]/g' \
+		-i tools/misc/xenlockprof.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	export VARTEXFONTS="${T}/fonts"
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED%/}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+	use doc && dodoc -r docs/{pdf,txt}
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-11-03 10:08 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-11-03 10:08 UTC (permalink / raw
  To: gentoo-commits

commit:     c6af6135988f0f8463a5c3746ebc00d4a26d6a1b
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Sat Oct 28 08:42:27 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Nov  3 10:07:39 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6af6135

app-emulation/xen-tools: add missing dep on app-text/ghostscript-gpl

Closes: https://github.com/gentoo/gentoo/pull/5977

Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
index 3de1759592f..d7c419329aa 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r2.ebuild
@@ -101,6 +101,7 @@ DEPEND="${COMMON_DEPEND}
 	dev-lang/perl
 	app-misc/pax-utils
 	doc? (
+		app-text/ghostscript-gpl
 		app-text/pandoc
 		dev-python/markdown[${PYTHON_USEDEP}]
 		dev-texlive/texlive-latexextra


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-11-03 18:05 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-11-03 18:05 UTC (permalink / raw
  To: gentoo-commits

commit:     dc88d886c6c286a4f13b62b6c00ca3e64119ba22
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  3 18:00:11 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Nov  3 18:05:43 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc88d886

app-emulation/xen-tools: arm64 stable

Gentoo-Bug: 631366
Package-Manager: Portage-2.3.10, Repoman-2.3.3

 app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild
index 431efbabe51..d82d2e22dd6 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild
@@ -18,7 +18,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-11-03 18:05 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-11-03 18:05 UTC (permalink / raw
  To: gentoo-commits

commit:     1d4c4f67dee8d92fbf314ef0108e85912c0a9c9c
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  3 18:04:05 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Nov  3 18:05:43 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1d4c4f67

app-emulation/xen-tools: x86 stable

Gentoo-Bug: 631366
Package-Manager: Portage-2.3.10, Repoman-2.3.3

 app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild
index d82d2e22dd6..c8bbd81561c 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild
@@ -18,7 +18,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-11-08 13:38 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2017-11-08 13:38 UTC (permalink / raw
  To: gentoo-commits

commit:     a6f9ebb5aba7af17ebddb048f5c867d8a703d58d
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  8 13:38:47 2017 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Wed Nov  8 13:38:47 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6f9ebb5

app-emulation/xen-tools: amd64 stable wrt bug #631366

Package-Manager: Portage-2.3.8, Repoman-2.3.3
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
index 6e96925cfed..9bd159abe83 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r1.ebuild
@@ -13,12 +13,12 @@ MAJOR_V="$(get_version_component_range 1-2)"
 
 if [[ $PV == *9999 ]]; then
 	inherit git-r3
-	KEYWORDS="x86"
+	KEYWORDS="amd64 x86"
 	REPO="xen.git"
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2017-12-05  2:24 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2017-12-05  2:24 UTC (permalink / raw
  To: gentoo-commits

commit:     111558ba21f63d5782a5509c0ed0d0a29bdbffd4
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  5 02:21:10 2017 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Dec  5 02:24:31 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=111558ba

app-emulation/xen-tools: obsolete epatch in EAPI=6

replace epatch with eapply

Package-Manager: Portage-2.3.16, Repoman-2.3.6

 app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild | 20 ++++++--------------
 app-emulation/xen-tools/xen-tools-4.9.1.ebuild    | 20 ++++++--------------
 2 files changed, 12 insertions(+), 28 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild
index c8bbd81561c..211478319ae 100644
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild
@@ -179,10 +179,7 @@ src_prepare() {
 	# Upstream's patchset
 	if [[ -n ${UPSTREAM_VER} ]]; then
 		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
+		eapply "${WORKDIR}"/patches-upstream
 	fi
 
 	# Security patchset
@@ -197,20 +194,20 @@ src_prepare() {
 		source "${WORKDIR}"/patches-security/${PV}.conf || die
 
 		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
+			eapply "${WORKDIR}"/patches-security/xen/$i
 		done
 
 		# apply qemu-xen/upstream patches
 		pushd "${S}"/tools/qemu-xen/ > /dev/null
 		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
 		done
 		popd > /dev/null
 
 		# apply qemu-traditional patches
 		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
 		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
+			eapply "${WORKDIR}"/patches-security/qemut/$i
 		done
 		popd > /dev/null
 	fi
@@ -227,9 +224,7 @@ src_prepare() {
 		source "${FILESDIR}"/gentoo-patches.conf || die
 		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
 		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
+			eapply "${WORKDIR}"/patches-gentoo/$i
 		done
 	fi
 
@@ -238,10 +233,7 @@ src_prepare() {
 		if [[ -n ${OVMF_VER} ]];then
 			einfo "Try to apply Ovmf patch set"
 			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
+			eapply "${WORKDIR}"/patches-ovmf
 			popd > /dev/null
 		fi
 		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die

diff --git a/app-emulation/xen-tools/xen-tools-4.9.1.ebuild b/app-emulation/xen-tools/xen-tools-4.9.1.ebuild
index e15cda8916a..665372875fa 100644
--- a/app-emulation/xen-tools/xen-tools-4.9.1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.9.1.ebuild
@@ -180,10 +180,7 @@ src_prepare() {
 	# Upstream's patchset
 	if [[ -n ${UPSTREAM_VER} ]]; then
 		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
+		eapply "${WORKDIR}"/patches-upstream
 	fi
 
 	# Security patchset
@@ -198,20 +195,20 @@ src_prepare() {
 		source "${WORKDIR}"/patches-security/${PV}.conf || die
 
 		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
+			eapply "${WORKDIR}"/patches-security/xen/$i
 		done
 
 		# apply qemu-xen/upstream patches
 		pushd "${S}"/tools/qemu-xen/ > /dev/null
 		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
 		done
 		popd > /dev/null
 
 		# apply qemu-traditional patches
 		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
 		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
+			eapply "${WORKDIR}"/patches-security/qemut/$i
 		done
 		popd > /dev/null
 	fi
@@ -228,9 +225,7 @@ src_prepare() {
 		source "${FILESDIR}"/gentoo-patches.conf || die
 		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
 		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
+			eapply "${WORKDIR}"/patches-gentoo/$i
 		done
 	fi
 
@@ -239,10 +234,7 @@ src_prepare() {
 		if [[ -n ${OVMF_VER} ]];then
 			einfo "Try to apply Ovmf patch set"
 			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
+			eapply "${WORKDIR}"/patches-ovmf
 			popd > /dev/null
 		fi
 		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-01-14 15:30 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2018-01-14 15:30 UTC (permalink / raw
  To: gentoo-commits

commit:     1c4480f39545dde28820515010e78df8024b22f1
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 14 15:30:09 2018 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sun Jan 14 15:30:09 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c4480f3

app-emulation/xen-tools: amd64 stable wrt bug #641566

Package-Manager: Portage-2.3.13, Repoman-2.3.3
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild
index 4f9eb745833..9db4ea3cf47 100644
--- a/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -13,12 +13,12 @@ MAJOR_V="$(get_version_component_range 1-2)"
 
 if [[ $PV == *9999 ]]; then
 	inherit git-r3
-	KEYWORDS=""
+	KEYWORDS="amd64"
 	REPO="xen.git"
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-01-14 16:23 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2018-01-14 16:23 UTC (permalink / raw
  To: gentoo-commits

commit:     fa801eb3217e4bd5d2bd1799e29c6e61a9d8e802
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 14 16:22:27 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jan 14 16:23:04 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa801eb3

app-emulation/xen-tools: x86 stable

Bug: https://bugs.gentoo.org/641566
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild
index 9db4ea3cf47..4c35903b2c5 100644
--- a/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild
@@ -13,12 +13,12 @@ MAJOR_V="$(get_version_component_range 1-2)"
 
 if [[ $PV == *9999 ]]; then
 	inherit git-r3
-	KEYWORDS="amd64"
+	KEYWORDS="amd64 x86"
 	REPO="xen.git"
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-04-09  0:03 Aaron Bauman
  0 siblings, 0 replies; 295+ messages in thread
From: Aaron Bauman @ 2018-04-09  0:03 UTC (permalink / raw
  To: gentoo-commits

commit:     bbd16795cbb370d7e003baa88ba6020a9898c176
Author:     Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  9 00:02:35 2018 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Mon Apr  9 00:02:51 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbd16795

app-emulation/xen-tools: drop vulnerable

Bug: https://bugs.gentoo.org/641566
Package-Manager: Portage-2.3.28, Repoman-2.3.9

 app-emulation/xen-tools/Manifest                  |   6 -
 app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild | 459 ---------------------
 app-emulation/xen-tools/xen-tools-4.9.0.ebuild    | 462 ----------------------
 app-emulation/xen-tools/xen-tools-4.9.1.ebuild    | 454 ---------------------
 4 files changed, 1381 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 06078d1f435..64bed02d102 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,16 +1,10 @@
-DIST ovmf-20151110.tar.bz2 27518370 BLAKE2B c4ba51e59ca3f597d75639a792b1f307a70dc6127917306e6ce182a76646435bec8006f7db9ac5c580e0ad79465a2b2902cffa90139d367c89d16e28280a978b SHA512 dda185af2fc0b9a8d5fc7e1e96db6aa31807782fe77d38491896164d125c30d2277db3d71a7dce7bbd569723b344b97dfebbc78ddddca0a095721f6b1ae3a1d3
 DIST ovmf-20170321.tar.xz 22141096 BLAKE2B 79e991c8f9deb297865c319e88b6e6d46b1d08067d3fd639c83f2a379670779ecc60c74c2671ea4eb4a6659fe08ac2d7d4ff337b010b42a908a50829a2d18eeb SHA512 f65dabde3df967224e2072817211786ee4fc3994ee31f8f9d6f67fd74e3479e1da459c720169dd81020cdc1777e4600e531bb124b4625c2ded42c6005bdc802a
 DIST seabios-1.10.0.tar.gz 588213 BLAKE2B 254eb4572a1dac06020a545820efb53a130a027aaab035cd916009b424475f89bd151f82f1bc5103c01c4657d09da3219d2fbcc7728add473011dcfc7bff7410 SHA512 f1b83ce37b59070b488e19f98c95ca9f413cf4969663331b631c3ccb884c90b2db793d32a779ef05cead538c2fd123be4b73391ad2fa20c900a1f14237178d8c
 DIST xen-4.10.0-upstream-patches-0.tar.xz 70884 BLAKE2B 9a27e7989486ba3ba59548de356384527cc5b78e63b6ed042506e6534e488272369f021cd2daa516820313c3fe18625a5864794ae0806e7018b8ad28b0a294b1 SHA512 e64bf1d30d24e922c60c3b518a4de7874b43cc695134b4cdd65f6d95ae9ae579c521fab13ca82409fde55e43815d072c3194997e2bda106204cbf329e93a0a00
 DIST xen-4.10.0.tar.gz 24618123 BLAKE2B 009faa980f9734525c137d525e626bfa3443c285aeb6b4af91bb2c32a2e98376ded0b1114b541d11e2d4353f4f588d58e8add5b1e0d7de2fe3399d4687c5bfae SHA512 5a37935c382f9cfe3641a35c3be0ba11689bca10c7d3c2401963513e3a834ee8d0c8a0ddcf3716dbf0a795aea1bab78caf19acf1272e5e054bf012cfa06a4690
-DIST xen-4.8.2-upstream-patches-2.tar.xz 38852 BLAKE2B cbc7bad4703fabd05b703c66268df0670e2ae97b77007895dceaf6465b12a2f9fbe3773c7735b307427ad18c61711b20beb7f3ae6b1f1b8b5efda2a847fec0ec SHA512 536823eabf03e92585a8c5cde90ce502672dd1ec080b28b39411d6a778b899436a57bfb633f11c94d48d2f963848b7771e469f5ea53e84b580976f631f69cc5d
-DIST xen-4.8.2.tar.gz 22522336 BLAKE2B 2c9da971622b4e52fe78fa029107bb1c5f945a63605406493df607c410c6f2a8c2cdb38b1eb30c1bc1c8bc6e5620efad977c3ba55e04c579c01d51f0104afcce SHA512 7805531f73d23ecfff3439770e62d387f4254a444875670d53a0a739323e5d4d8f8fcc478f8936ee1ae8aff3e0229549e47c01c606365a8ce060dd5c503e87da
-DIST xen-4.9.0-upstream-patches-0.tar.xz 58780 BLAKE2B 6d12a5a5bb7d2be7ca6bb8636648ee219c9526dd34086c929d8cd32d096d2454d6cb499d459b436f228fa49f42ef3a1f5fbe9b5c84557e4054565a9edc0daad6 SHA512 98c601d791661a306e3dce5befb37b80de8a71cdd1759f3da00b199d48e3b9468efd1332e26ae044ad616b41a02771ad07a1c96972103b7e0aa39b93fb556999
-DIST xen-4.9.0.tar.gz 23361741 BLAKE2B 1cfebb791ca5e51eda9b86a5d98e0883fab1554f5ac805fc065916fbbd3695e6b0f11ca75935a8f973735cc8dd83e38fe4a670d8489010be865be49d8fc1a341 SHA512 97f8075c49ef9ec0adbe95106c0cff4f9379578fd568777697565476c3fd948335d72ddcacf8be65fd9db219c0a35dcdc007f355f7e5874dd950fd4c0a0f966f
 DIST xen-4.9.1-upstream-patches-1.tar.xz 24592 BLAKE2B 774c5219d6c14d729358e790d880a1a31fb4cda741e54e71879bff164e79bafbd8492eb8bccb7becdf7a2f9605e71266bb4fc15848deff8f9028ed7f8844f915 SHA512 edbc7cad2f6f8a5c7e8aac8efd5454428aa25e0e13018438f78c7f401cfb9173345267e16c7a5dfa78066a952980b172976409a0c63162094b7f507058e712ed
 DIST xen-4.9.1-upstream-patches-2.tar.xz 84228 BLAKE2B 3b98cdb1202d4c9817dd1919b9dc5d4c06510d3be2c077b2e41334928bca07c65a9d8a421fc2a1ae3b806e69f7b61334f7c54d48952c98192ece4b5826539df8 SHA512 673520bff88fa401e1d1c7accc8d3650d4d74a9e52bc7195cfcb5335226c69ef0230e7db719fd97ce6df2f5198646ae0fbccc6f812d7e9ccd38a6eef359d287c
 DIST xen-4.9.1.tar.gz 23368303 BLAKE2B 4cfddb351c9a4aa08227138dc1afa921f3d1880048f897428226da38eff9470cd81ae9896f174583048dad0ba8d5c1426df58b029115ba1623366d1980630c0d SHA512 9d22f0aa5dcd01a1c105d17c14bce570cc597e884ddb9b4a46b80a72f647625b76ae5213cede423d0458c14e1906983595a9269bb6e6ff2e9e7e4dea840f4274
 DIST xen-gentoo-patches-10.tar.xz 27876 BLAKE2B 8efece8548a046b47c04e5b9354ca8bdff55affd6c6bc67315ac7536778fbaa183d346e0ff83e365030df2433bddf845188a1c3fb8feaea2e93d5ba0dd1c779a SHA512 2033f4cb671971c73841cfaa7eb46623c37778c5746b47302eee252c4af287ccbeb8d1884ffdf32cd97a38cd7785257d56f13ef20d4c03dc0fb1cb196dc04ece
 DIST xen-gentoo-patches-12.tar.xz 28188 BLAKE2B 75f565d52e75d4f68d7a1be88a79e7cefe82350ca1f4852ecdb79137549d73ef1ffb665bac998956a6f180cde6faeb9a11ec1f5442c8ae53c7cbd869318ef315 SHA512 4e1ebbd244670d3a4171fd93eda7eb14deae3e3ad45b3a85c015696ff0a86b69156f24ee428d6c92b7be426938997cec2fab031ecb5b03ad26a38451523882de
-DIST xen-ovmf-patches-2.tar.xz 4344 BLAKE2B 1514c89dcba05c84281e9d46ec5c3e9e946ea777dcbe64d1d7689298e187aac2c9a5febf407d79bdb3ebe47563972ea66e0f5204590c5abc98df9cf24549b92d SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3
 DIST xen-ovmf-patches-3.tar.xz 4208 BLAKE2B 0df8f85667a33c91cbfd86c59aec2ae65eca892b45d66eed76f793a52e2748989bc2785861f8bfdf94235ef7a6c0be6572c6e6cce9695469e40f0facd0ce3947 SHA512 abe001053ca702138bbcdd6bea14e2daae5c785f862d6a15001ca894c8ed8617f0c5dc439c6f54a41433b988acf57c71911af1db074aa76732c39d98622a3b5b

diff --git a/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild
deleted file mode 100644
index 211478319ae..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.8.2-r3.ebuild
+++ /dev/null
@@ -1,459 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=2
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=10
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix building with gcc 7, Bug #634338
-	# https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=f49fa658b53580cf2ad354d2bf1796766cc11222
-	sed -e 's/name\[60\]/name\[100\]/g' \
-		-i tools/misc/xenlockprof.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	export VARTEXFONTS="${T}/fonts"
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-	use doc && dodoc -r docs/{pdf,txt}
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.9.0.ebuild b/app-emulation/xen-tools/xen-tools-4.9.0.ebuild
deleted file mode 100644
index e51036af94b..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.9.0.ebuild
+++ /dev/null
@@ -1,462 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=10
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			epatch "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			epatch "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-				epatch "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			EPATCH_SUFFIX="patch" \
-			EPATCH_FORCE="yes" \
-			EPATCH_OPTS="-p1" \
-				epatch "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-	use doc && dodoc -r docs/{pdf,txt}
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.9.1.ebuild b/app-emulation/xen-tools/xen-tools-4.9.1.ebuild
deleted file mode 100644
index 665372875fa..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.9.1.ebuild
+++ /dev/null
@@ -1,454 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=10
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=2
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
-	OVMF_PV=20151110
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-proto/xproto
-		!net-libs/libiscsi )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-	use doc && dodoc -r docs/{pdf,txt}
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-04-23  4:43 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2018-04-23  4:43 UTC (permalink / raw
  To: gentoo-commits

commit:     0728f33380c615b065dc5d8d039e12f56f4b2ae2
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 23 04:42:48 2018 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Mon Apr 23 04:43:16 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0728f333

app-emulation/xen-tools: add xen-diag patch

add xen-diag patch which lost in the version bump

Reported-by: Tomas Mozes <hydrapolic <AT> gmail.com>
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 app-emulation/xen-tools/Manifest                                        | 2 +-
 .../xen-tools/{xen-tools-4.9.2.ebuild => xen-tools-4.9.2-r1.ebuild}     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index e55a8b1b51e..4b9da11660a 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,7 +5,7 @@ DIST xen-4.10.0.tar.gz 24618123 BLAKE2B 009faa980f9734525c137d525e626bfa3443c285
 DIST xen-4.9.1-upstream-patches-1.tar.xz 24592 BLAKE2B 774c5219d6c14d729358e790d880a1a31fb4cda741e54e71879bff164e79bafbd8492eb8bccb7becdf7a2f9605e71266bb4fc15848deff8f9028ed7f8844f915 SHA512 edbc7cad2f6f8a5c7e8aac8efd5454428aa25e0e13018438f78c7f401cfb9173345267e16c7a5dfa78066a952980b172976409a0c63162094b7f507058e712ed
 DIST xen-4.9.1-upstream-patches-2.tar.xz 84228 BLAKE2B 3b98cdb1202d4c9817dd1919b9dc5d4c06510d3be2c077b2e41334928bca07c65a9d8a421fc2a1ae3b806e69f7b61334f7c54d48952c98192ece4b5826539df8 SHA512 673520bff88fa401e1d1c7accc8d3650d4d74a9e52bc7195cfcb5335226c69ef0230e7db719fd97ce6df2f5198646ae0fbccc6f812d7e9ccd38a6eef359d287c
 DIST xen-4.9.1.tar.gz 23368303 BLAKE2B 4cfddb351c9a4aa08227138dc1afa921f3d1880048f897428226da38eff9470cd81ae9896f174583048dad0ba8d5c1426df58b029115ba1623366d1980630c0d SHA512 9d22f0aa5dcd01a1c105d17c14bce570cc597e884ddb9b4a46b80a72f647625b76ae5213cede423d0458c14e1906983595a9269bb6e6ff2e9e7e4dea840f4274
-DIST xen-4.9.2-upstream-patches-1.tar.xz 13812 BLAKE2B fe8bf636dea9fbd21c9fc432817dc8e21ffb78bf70279b86babb6963a0dbebc17493eb6c016ee1093ef36e66693df25e8aeb35a568260f2e62a97a787b3c70bb SHA512 d75ea99531a10279736f89057857c257955800df6fe42bd742babfd5a9e527a2cb0d4dc5505b41df5b9db82246a8414f14b7084997ee798ffab657a3991b17ae
+DIST xen-4.9.2-upstream-patches-2.tar.xz 16100 BLAKE2B 469b5ab7c5514a4974ba6370136d3b0b8da66a137e57ea2d8ba4341582ecc65e9131340cfc854b2e4991de778802726479176bf3a54a59660cef7337c31958e5 SHA512 900ed3a63986ad6add07fa4f2c2596c48f7e9aac18d0876229c3a0b076a6417488e0d7bd1bdbe9886e6900bbece35c378b7f8735778b4bdfa115a9662d43108b
 DIST xen-4.9.2.tar.gz 23392753 BLAKE2B 5f96f0e5062eff8ac2971eef85ea2bae0e94e7542151237937a1cf7e74690bb0ce1c952e830d2fc13b3277f70b9ed1de511afe4f780ad7b3be0c58742ece39b2 SHA512 e06aec25439abcc548c174ba8e271c23031ea704bcc2480905140aa68490064fbb1c58d9c4174f6617b4f7bbcddfda284317df6f480a6e5b5b5a2c71fbe0ac93
 DIST xen-gentoo-patches-10.tar.xz 27876 BLAKE2B 8efece8548a046b47c04e5b9354ca8bdff55affd6c6bc67315ac7536778fbaa183d346e0ff83e365030df2433bddf845188a1c3fb8feaea2e93d5ba0dd1c779a SHA512 2033f4cb671971c73841cfaa7eb46623c37778c5746b47302eee252c4af287ccbeb8d1884ffdf32cd97a38cd7785257d56f13ef20d4c03dc0fb1cb196dc04ece
 DIST xen-gentoo-patches-12.tar.xz 28188 BLAKE2B 75f565d52e75d4f68d7a1be88a79e7cefe82350ca1f4852ecdb79137549d73ef1ffb665bac998956a6f180cde6faeb9a11ec1f5442c8ae53c7cbd869318ef315 SHA512 4e1ebbd244670d3a4171fd93eda7eb14deae3e3ad45b3a85c015696ff0a86b69156f24ee428d6c92b7be426938997cec2fab031ecb5b03ad26a38451523882de

diff --git a/app-emulation/xen-tools/xen-tools-4.9.2.ebuild b/app-emulation/xen-tools/xen-tools-4.9.2-r1.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.9.2.ebuild
rename to app-emulation/xen-tools/xen-tools-4.9.2-r1.ebuild
index c6b392e429f..a66fad4f58f 100644
--- a/app-emulation/xen-tools/xen-tools-4.9.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.9.2-r1.ebuild
@@ -19,7 +19,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=1
+	UPSTREAM_VER=2
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball
 	GENTOO_VER=12


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-04-26 21:07 Mikle Kolyada
  0 siblings, 0 replies; 295+ messages in thread
From: Mikle Kolyada @ 2018-04-26 21:07 UTC (permalink / raw
  To: gentoo-commits

commit:     6fc093ea515b15e29b442e15b0c6f439b3b3905d
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 26 21:06:34 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Thu Apr 26 21:06:34 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fc093ea

app-emulation/xen-tools: amd64 stable wrt bug #643350

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-emulation/xen-tools/xen-tools-4.9.2-r1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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
index a66fad4f58f..e7a533511e1 100644
--- a/app-emulation/xen-tools/xen-tools-4.9.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.9.2-r1.ebuild
@@ -13,12 +13,12 @@ MAJOR_V="$(get_version_component_range 1-2)"
 
 if [[ $PV == *9999 ]]; then
 	inherit git-r3
-	KEYWORDS=""
+	KEYWORDS="amd64"
 	REPO="xen.git"
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-07-17 11:07 Mikle Kolyada
  0 siblings, 0 replies; 295+ messages in thread
From: Mikle Kolyada @ 2018-07-17 11:07 UTC (permalink / raw
  To: gentoo-commits

commit:     c445a546e4ea5b124e303bb76b624afad6de21ab
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Jul 13 16:53:36 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Tue Jul 17 11:06:56 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c445a546

app-emulation/xen-tools: bump to 4.11.0

Closes: https://bugs.gentoo.org/660832
Package-Manager: Portage-2.3.42, Repoman-2.3.9

 app-emulation/xen-tools/Manifest                |   1 +
 app-emulation/xen-tools/xen-tools-4.11.0.ebuild | 458 ++++++++++++++++++++++++
 2 files changed, 459 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index d396263b6ee..b222c7ff81f 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -4,6 +4,7 @@ DIST xen-4.10.0-upstream-patches-0.tar.xz 70884 BLAKE2B 9a27e7989486ba3ba59548de
 DIST xen-4.10.0.tar.gz 24618123 BLAKE2B 009faa980f9734525c137d525e626bfa3443c285aeb6b4af91bb2c32a2e98376ded0b1114b541d11e2d4353f4f588d58e8add5b1e0d7de2fe3399d4687c5bfae SHA512 5a37935c382f9cfe3641a35c3be0ba11689bca10c7d3c2401963513e3a834ee8d0c8a0ddcf3716dbf0a795aea1bab78caf19acf1272e5e054bf012cfa06a4690
 DIST xen-4.10.1-upstream-patches-0.tar.xz 69120 BLAKE2B 5d81e58eeb4e6de48a8534352df2c07f8825600bec9d0714735c2262dd13b937f2ef55a91d70273dcdd9621c477ced4662d76a16f557930c8b86e117fd49bb67 SHA512 094139d9173324bc43c4caedaf6453ebd0a86fc7ce9499690e4dacdadfde8efeaf6b70e652d6e1e27845c507f70c3a7b5d93c4c677bcd6a2ba56cf3742df4476
 DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff65a18e194286a3fc372d4a45f6682cd636b7ac5b4fa0125e54ed51f8876a411d498cf75791718fd088c4a6d2 SHA512 236c02bee69e33644703ed26d323d4c491a91fc05bd0ee0990a7368579f7c82f5bb4510845bf80348fd923024d7d60d521f593dfd0365d971dc592f8ef10fbea
+DIST xen-4.11.0.tar.gz 25131533 BLAKE2B 892639b8bcd9b9956104e4d5137ffd88e17f92d965fa967b4af8d74a4fddcc21c6971c53026e0fb5ce833ab2c25c68f827abcac0b7b1dcebc21dca645c465573 SHA512 33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a
 DIST xen-4.9.1-upstream-patches-1.tar.xz 24592 BLAKE2B 774c5219d6c14d729358e790d880a1a31fb4cda741e54e71879bff164e79bafbd8492eb8bccb7becdf7a2f9605e71266bb4fc15848deff8f9028ed7f8844f915 SHA512 edbc7cad2f6f8a5c7e8aac8efd5454428aa25e0e13018438f78c7f401cfb9173345267e16c7a5dfa78066a952980b172976409a0c63162094b7f507058e712ed
 DIST xen-4.9.1-upstream-patches-2.tar.xz 84228 BLAKE2B 3b98cdb1202d4c9817dd1919b9dc5d4c06510d3be2c077b2e41334928bca07c65a9d8a421fc2a1ae3b806e69f7b61334f7c54d48952c98192ece4b5826539df8 SHA512 673520bff88fa401e1d1c7accc8d3650d4d74a9e52bc7195cfcb5335226c69ef0230e7db719fd97ce6df2f5198646ae0fbccc6f812d7e9ccd38a6eef359d287c
 DIST xen-4.9.1.tar.gz 23368303 BLAKE2B 4cfddb351c9a4aa08227138dc1afa921f3d1880048f897428226da38eff9470cd81ae9896f174583048dad0ba8d5c1426df58b029115ba1623366d1980630c0d SHA512 9d22f0aa5dcd01a1c105d17c14bce570cc597e884ddb9b4a46b80a72f647625b76ae5213cede423d0458c14e1906983595a9269bb6e6ff2e9e7e4dea840f4274

diff --git a/app-emulation/xen-tools/xen-tools-4.11.0.ebuild b/app-emulation/xen-tools/xen-tools-4.11.0.ebuild
new file mode 100644
index 00000000000..c9cc42133fb
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.11.0.ebuild
@@ -0,0 +1,458 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=13
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=3
+
+	SEABIOS_VER=1.10.0
+	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
+	OVMF_PV=20170321
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-4.11
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED%/}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+	use doc && dodoc -r docs/{pdf,txt}
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-08-14  1:20 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2018-08-14  1:20 UTC (permalink / raw
  To: gentoo-commits

commit:     b9c5f8b0bef53e0c3aeec17849a390fce96e6418
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Jul 18 05:12:22 2018 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Tue Aug 14 01:20:31 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9c5f8b0

app-emulation/xen-tools: drop old

Closes: https://github.com/gentoo/gentoo/pull/9269
Package-Manager: Portage-2.3.43, Repoman-2.3.10

Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   2 -
 app-emulation/xen-tools/xen-tools-4.10.1.ebuild | 457 -----------------------
 app-emulation/xen-tools/xen-tools-4.11.0.ebuild | 458 ------------------------
 3 files changed, 917 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 262b05abd76..f40d01bf859 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -2,7 +2,6 @@ DIST ovmf-20170321.tar.xz 22141096 BLAKE2B 79e991c8f9deb297865c319e88b6e6d46b1d0
 DIST seabios-1.10.0.tar.gz 588213 BLAKE2B 254eb4572a1dac06020a545820efb53a130a027aaab035cd916009b424475f89bd151f82f1bc5103c01c4657d09da3219d2fbcc7728add473011dcfc7bff7410 SHA512 f1b83ce37b59070b488e19f98c95ca9f413cf4969663331b631c3ccb884c90b2db793d32a779ef05cead538c2fd123be4b73391ad2fa20c900a1f14237178d8c
 DIST xen-4.10.0-upstream-patches-0.tar.xz 70884 BLAKE2B 9a27e7989486ba3ba59548de356384527cc5b78e63b6ed042506e6534e488272369f021cd2daa516820313c3fe18625a5864794ae0806e7018b8ad28b0a294b1 SHA512 e64bf1d30d24e922c60c3b518a4de7874b43cc695134b4cdd65f6d95ae9ae579c521fab13ca82409fde55e43815d072c3194997e2bda106204cbf329e93a0a00
 DIST xen-4.10.0.tar.gz 24618123 BLAKE2B 009faa980f9734525c137d525e626bfa3443c285aeb6b4af91bb2c32a2e98376ded0b1114b541d11e2d4353f4f588d58e8add5b1e0d7de2fe3399d4687c5bfae SHA512 5a37935c382f9cfe3641a35c3be0ba11689bca10c7d3c2401963513e3a834ee8d0c8a0ddcf3716dbf0a795aea1bab78caf19acf1272e5e054bf012cfa06a4690
-DIST xen-4.10.1-upstream-patches-0.tar.xz 69172 BLAKE2B 6da6f3938b5c20692bf7a7f79c21a1f0ed4fa010c8d99a95a2d3a19923f59aad677a3f23ceedf751921105f682ae2e6deb9539802e03c01be267dfc30d53b17e SHA512 b0086c15f811706a0993b92d253d736041b8d7bc4effd082bf092e0d4d372a8b1580f499d225eb0d1a449e14845885bdd749e3df9609c657de6ff8d389c2eb45
 DIST xen-4.10.1-upstream-patches-1.tar.xz 85048 BLAKE2B d00f01980e1c889b2f6899970999b93a7ddbaa03f88219d576bfbe4ccfe0ef3f75afad1538065045833430baa16b64d8dd7eb42af6ad7c3ef948601b941c51bc SHA512 ede74a53faf82712d6ee0cf2a995bb78b7079481e47e829243632fac40069194671e6b9b765e535aa533f618cdcd7715f540e81acd947a42f7b8cbb693a3df82
 DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff65a18e194286a3fc372d4a45f6682cd636b7ac5b4fa0125e54ed51f8876a411d498cf75791718fd088c4a6d2 SHA512 236c02bee69e33644703ed26d323d4c491a91fc05bd0ee0990a7368579f7c82f5bb4510845bf80348fd923024d7d60d521f593dfd0365d971dc592f8ef10fbea
 DIST xen-4.11.0-upstream-patches-0.tar.xz 21720 BLAKE2B 92c2ef90ca6af5032e9181d8edbe2b91a4117cc402f5abdff208aa76ee76b56ce75f576c56220d2ebf6d1a21957c10f7c45a2c88d2c77aa8b17fa9a0a99e5b57 SHA512 6ea0ee376251b20b7fa9b6334bca462f115d8a9929e31ae269ae9591b433b46e4e9076a2d2e39ec5f868d5d74739ad7b0ba0d9244e599da5255ccca0babd669e
@@ -14,6 +13,5 @@ DIST xen-4.9.2-upstream-patches-2.tar.xz 16100 BLAKE2B 469b5ab7c5514a4974ba63701
 DIST xen-4.9.2.tar.gz 23392753 BLAKE2B 5f96f0e5062eff8ac2971eef85ea2bae0e94e7542151237937a1cf7e74690bb0ce1c952e830d2fc13b3277f70b9ed1de511afe4f780ad7b3be0c58742ece39b2 SHA512 e06aec25439abcc548c174ba8e271c23031ea704bcc2480905140aa68490064fbb1c58d9c4174f6617b4f7bbcddfda284317df6f480a6e5b5b5a2c71fbe0ac93
 DIST xen-gentoo-patches-10.tar.xz 27876 BLAKE2B 8efece8548a046b47c04e5b9354ca8bdff55affd6c6bc67315ac7536778fbaa183d346e0ff83e365030df2433bddf845188a1c3fb8feaea2e93d5ba0dd1c779a SHA512 2033f4cb671971c73841cfaa7eb46623c37778c5746b47302eee252c4af287ccbeb8d1884ffdf32cd97a38cd7785257d56f13ef20d4c03dc0fb1cb196dc04ece
 DIST xen-gentoo-patches-12.tar.xz 28188 BLAKE2B 75f565d52e75d4f68d7a1be88a79e7cefe82350ca1f4852ecdb79137549d73ef1ffb665bac998956a6f180cde6faeb9a11ec1f5442c8ae53c7cbd869318ef315 SHA512 4e1ebbd244670d3a4171fd93eda7eb14deae3e3ad45b3a85c015696ff0a86b69156f24ee428d6c92b7be426938997cec2fab031ecb5b03ad26a38451523882de
-DIST xen-gentoo-patches-13.tar.xz 30276 BLAKE2B 4e83011d90e30693e0d08848a8caddac1a4e283d33a257e37be0276cd662d7491d9db71d345a52f62bd57be80e7e707bf4ffa0ba8231702e4fc0765801884c7d SHA512 8211e325667c706fd22d82421aa4d0265c1ed49980911747f97014a24bb7d2e663a14eba1017101fab07a19de3a820c55e4b1cc9c16dbb0c001f33cf82ff26b3
 DIST xen-gentoo-patches-14.tar.xz 36244 BLAKE2B 94b751df0ae9a49d1c52ec5fa835d4a040ccb6a4a0f63ef6ef628191163ce7dbd47d4e3b2dbb1cf6cf6c8b368bea4267ff989754482c4794209a80eae9313c25 SHA512 8a23aeddbcf80c049da36e3ef9d797c16996b45be21b56f46f3c9c3833a7c1028fd9ed56fc8053faeb78db21076608de2eb32908e1ae1285f4f200ace40c8c2d
 DIST xen-ovmf-patches-3.tar.xz 4208 BLAKE2B 0df8f85667a33c91cbfd86c59aec2ae65eca892b45d66eed76f793a52e2748989bc2785861f8bfdf94235ef7a6c0be6572c6e6cce9695469e40f0facd0ce3947 SHA512 abe001053ca702138bbcdd6bea14e2daae5c785f862d6a15001ca894c8ed8617f0c5dc439c6f54a41433b988acf57c71911af1db074aa76732c39d98622a3b5b

diff --git a/app-emulation/xen-tools/xen-tools-4.10.1.ebuild b/app-emulation/xen-tools/xen-tools-4.10.1.ebuild
deleted file mode 100644
index 864242ce664..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.10.1.ebuild
+++ /dev/null
@@ -1,457 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=13
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=3
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
-	OVMF_PV=20170321
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto
-		!net-libs/libiscsi )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-	use doc && dodoc -r docs/{pdf,txt}
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.11.0.ebuild b/app-emulation/xen-tools/xen-tools-4.11.0.ebuild
deleted file mode 100644
index c9cc42133fb..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.11.0.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=13
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=3
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
-	OVMF_PV=20170321
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-	use doc && dodoc -r docs/{pdf,txt}
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-09-09 20:41 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2018-09-09 20:41 UTC (permalink / raw
  To: gentoo-commits

commit:     8fa6c0bf65a3abecd2cb5f7f8100354b5feacb29
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Sun Sep  9 18:37:39 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Sep  9 20:40:54 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fa6c0bf

app-emulation/xen-tools: bump to 4.10.1-r2

Package-Manager: Portage-2.3.48, Repoman-2.3.10

 app-emulation/xen-tools/Manifest                   |   1 +
 app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild | 457 +++++++++++++++++++++
 2 files changed, 458 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index f40d01bf859..46f76bdac0d 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -3,6 +3,7 @@ DIST seabios-1.10.0.tar.gz 588213 BLAKE2B 254eb4572a1dac06020a545820efb53a130a02
 DIST xen-4.10.0-upstream-patches-0.tar.xz 70884 BLAKE2B 9a27e7989486ba3ba59548de356384527cc5b78e63b6ed042506e6534e488272369f021cd2daa516820313c3fe18625a5864794ae0806e7018b8ad28b0a294b1 SHA512 e64bf1d30d24e922c60c3b518a4de7874b43cc695134b4cdd65f6d95ae9ae579c521fab13ca82409fde55e43815d072c3194997e2bda106204cbf329e93a0a00
 DIST xen-4.10.0.tar.gz 24618123 BLAKE2B 009faa980f9734525c137d525e626bfa3443c285aeb6b4af91bb2c32a2e98376ded0b1114b541d11e2d4353f4f588d58e8add5b1e0d7de2fe3399d4687c5bfae SHA512 5a37935c382f9cfe3641a35c3be0ba11689bca10c7d3c2401963513e3a834ee8d0c8a0ddcf3716dbf0a795aea1bab78caf19acf1272e5e054bf012cfa06a4690
 DIST xen-4.10.1-upstream-patches-1.tar.xz 85048 BLAKE2B d00f01980e1c889b2f6899970999b93a7ddbaa03f88219d576bfbe4ccfe0ef3f75afad1538065045833430baa16b64d8dd7eb42af6ad7c3ef948601b941c51bc SHA512 ede74a53faf82712d6ee0cf2a995bb78b7079481e47e829243632fac40069194671e6b9b765e535aa533f618cdcd7715f540e81acd947a42f7b8cbb693a3df82
+DIST xen-4.10.1-upstream-patches-2.tar.xz 117588 BLAKE2B ddcd58964117652b50f3524d89089e2e9b14a8399fb5bd2db5d12827035ab94cedbfd5d65134d8953e4062a50e0e8a9b320e9c34008db8fd364456f47fd9cd26 SHA512 49ee8497af3753f3d611bf12c65fb7a79abb018862f1af096e9dde3ddfe8780bb95fc3da338c8d5f16a5d6d233d606d4cf8025a3d0e2897bf2668a1d5b27b198
 DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff65a18e194286a3fc372d4a45f6682cd636b7ac5b4fa0125e54ed51f8876a411d498cf75791718fd088c4a6d2 SHA512 236c02bee69e33644703ed26d323d4c491a91fc05bd0ee0990a7368579f7c82f5bb4510845bf80348fd923024d7d60d521f593dfd0365d971dc592f8ef10fbea
 DIST xen-4.11.0-upstream-patches-0.tar.xz 21720 BLAKE2B 92c2ef90ca6af5032e9181d8edbe2b91a4117cc402f5abdff208aa76ee76b56ce75f576c56220d2ebf6d1a21957c10f7c45a2c88d2c77aa8b17fa9a0a99e5b57 SHA512 6ea0ee376251b20b7fa9b6334bca462f115d8a9929e31ae269ae9591b433b46e4e9076a2d2e39ec5f868d5d74739ad7b0ba0d9244e599da5255ccca0babd669e
 DIST xen-4.11.0.tar.gz 25131533 BLAKE2B 892639b8bcd9b9956104e4d5137ffd88e17f92d965fa967b4af8d74a4fddcc21c6971c53026e0fb5ce833ab2c25c68f827abcac0b7b1dcebc21dca645c465573 SHA512 33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a

diff --git a/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild
new file mode 100644
index 00000000000..7ebef38e274
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild
@@ -0,0 +1,457 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(get_version_component_range 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	KEYWORDS=""
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=2
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=14
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=3
+
+	SEABIOS_VER=1.10.0
+	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
+	OVMF_PV=20170321
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-4.11
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto
+		!net-libs/libiscsi )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED%/}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+	use doc && dodoc -r docs/{pdf,txt}
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-09-10  9:36 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2018-09-10  9:36 UTC (permalink / raw
  To: gentoo-commits

commit:     ae0f390c4594132a14d6428ca9e526c79b1e4da6
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 10 09:35:09 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Sep 10 09:35:09 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae0f390c

app-emulation/xen-tools: security cleanup (bug #643350)

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 app-emulation/xen-tools/Manifest                  |   4 -
 app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild | 454 ---------------------
 app-emulation/xen-tools/xen-tools-4.9.1-r2.ebuild | 455 ----------------------
 3 files changed, 913 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 46f76bdac0d..8c3ab18fc4f 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -7,12 +7,8 @@ DIST xen-4.10.1-upstream-patches-2.tar.xz 117588 BLAKE2B ddcd58964117652b50f3524
 DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff65a18e194286a3fc372d4a45f6682cd636b7ac5b4fa0125e54ed51f8876a411d498cf75791718fd088c4a6d2 SHA512 236c02bee69e33644703ed26d323d4c491a91fc05bd0ee0990a7368579f7c82f5bb4510845bf80348fd923024d7d60d521f593dfd0365d971dc592f8ef10fbea
 DIST xen-4.11.0-upstream-patches-0.tar.xz 21720 BLAKE2B 92c2ef90ca6af5032e9181d8edbe2b91a4117cc402f5abdff208aa76ee76b56ce75f576c56220d2ebf6d1a21957c10f7c45a2c88d2c77aa8b17fa9a0a99e5b57 SHA512 6ea0ee376251b20b7fa9b6334bca462f115d8a9929e31ae269ae9591b433b46e4e9076a2d2e39ec5f868d5d74739ad7b0ba0d9244e599da5255ccca0babd669e
 DIST xen-4.11.0.tar.gz 25131533 BLAKE2B 892639b8bcd9b9956104e4d5137ffd88e17f92d965fa967b4af8d74a4fddcc21c6971c53026e0fb5ce833ab2c25c68f827abcac0b7b1dcebc21dca645c465573 SHA512 33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a
-DIST xen-4.9.1-upstream-patches-1.tar.xz 24592 BLAKE2B 774c5219d6c14d729358e790d880a1a31fb4cda741e54e71879bff164e79bafbd8492eb8bccb7becdf7a2f9605e71266bb4fc15848deff8f9028ed7f8844f915 SHA512 edbc7cad2f6f8a5c7e8aac8efd5454428aa25e0e13018438f78c7f401cfb9173345267e16c7a5dfa78066a952980b172976409a0c63162094b7f507058e712ed
-DIST xen-4.9.1-upstream-patches-2.tar.xz 84228 BLAKE2B 3b98cdb1202d4c9817dd1919b9dc5d4c06510d3be2c077b2e41334928bca07c65a9d8a421fc2a1ae3b806e69f7b61334f7c54d48952c98192ece4b5826539df8 SHA512 673520bff88fa401e1d1c7accc8d3650d4d74a9e52bc7195cfcb5335226c69ef0230e7db719fd97ce6df2f5198646ae0fbccc6f812d7e9ccd38a6eef359d287c
-DIST xen-4.9.1.tar.gz 23368303 BLAKE2B 4cfddb351c9a4aa08227138dc1afa921f3d1880048f897428226da38eff9470cd81ae9896f174583048dad0ba8d5c1426df58b029115ba1623366d1980630c0d SHA512 9d22f0aa5dcd01a1c105d17c14bce570cc597e884ddb9b4a46b80a72f647625b76ae5213cede423d0458c14e1906983595a9269bb6e6ff2e9e7e4dea840f4274
 DIST xen-4.9.2-upstream-patches-2.tar.xz 16100 BLAKE2B 469b5ab7c5514a4974ba6370136d3b0b8da66a137e57ea2d8ba4341582ecc65e9131340cfc854b2e4991de778802726479176bf3a54a59660cef7337c31958e5 SHA512 900ed3a63986ad6add07fa4f2c2596c48f7e9aac18d0876229c3a0b076a6417488e0d7bd1bdbe9886e6900bbece35c378b7f8735778b4bdfa115a9662d43108b
 DIST xen-4.9.2.tar.gz 23392753 BLAKE2B 5f96f0e5062eff8ac2971eef85ea2bae0e94e7542151237937a1cf7e74690bb0ce1c952e830d2fc13b3277f70b9ed1de511afe4f780ad7b3be0c58742ece39b2 SHA512 e06aec25439abcc548c174ba8e271c23031ea704bcc2480905140aa68490064fbb1c58d9c4174f6617b4f7bbcddfda284317df6f480a6e5b5b5a2c71fbe0ac93
-DIST xen-gentoo-patches-10.tar.xz 27876 BLAKE2B 8efece8548a046b47c04e5b9354ca8bdff55affd6c6bc67315ac7536778fbaa183d346e0ff83e365030df2433bddf845188a1c3fb8feaea2e93d5ba0dd1c779a SHA512 2033f4cb671971c73841cfaa7eb46623c37778c5746b47302eee252c4af287ccbeb8d1884ffdf32cd97a38cd7785257d56f13ef20d4c03dc0fb1cb196dc04ece
 DIST xen-gentoo-patches-12.tar.xz 28188 BLAKE2B 75f565d52e75d4f68d7a1be88a79e7cefe82350ca1f4852ecdb79137549d73ef1ffb665bac998956a6f180cde6faeb9a11ec1f5442c8ae53c7cbd869318ef315 SHA512 4e1ebbd244670d3a4171fd93eda7eb14deae3e3ad45b3a85c015696ff0a86b69156f24ee428d6c92b7be426938997cec2fab031ecb5b03ad26a38451523882de
 DIST xen-gentoo-patches-14.tar.xz 36244 BLAKE2B 94b751df0ae9a49d1c52ec5fa835d4a040ccb6a4a0f63ef6ef628191163ce7dbd47d4e3b2dbb1cf6cf6c8b368bea4267ff989754482c4794209a80eae9313c25 SHA512 8a23aeddbcf80c049da36e3ef9d797c16996b45be21b56f46f3c9c3833a7c1028fd9ed56fc8053faeb78db21076608de2eb32908e1ae1285f4f200ace40c8c2d
 DIST xen-ovmf-patches-3.tar.xz 4208 BLAKE2B 0df8f85667a33c91cbfd86c59aec2ae65eca892b45d66eed76f793a52e2748989bc2785861f8bfdf94235ef7a6c0be6572c6e6cce9695469e40f0facd0ce3947 SHA512 abe001053ca702138bbcdd6bea14e2daae5c785f862d6a15001ca894c8ed8617f0c5dc439c6f54a41433b988acf57c71911af1db074aa76732c39d98622a3b5b

diff --git a/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild
deleted file mode 100644
index f18cfce1271..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.9.1-r1.ebuild
+++ /dev/null
@@ -1,454 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS="amd64 x86"
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=1
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=10
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=3
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
-	OVMF_PV=20170321
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto
-		!net-libs/libiscsi )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-	use doc && dodoc -r docs/{pdf,txt}
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.9.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.9.1-r2.ebuild
deleted file mode 100644
index 191c3222dbe..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.9.1-r2.ebuild
+++ /dev/null
@@ -1,455 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=2
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=12
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	# xen-tools ovmf's patches
-	OVMF_VER=3
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
-	OVMF_PV=20170321
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto
-		!net-libs/libiscsi )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-	use doc && dodoc -r docs/{pdf,txt}
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-09-10 10:11 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2018-09-10 10:11 UTC (permalink / raw
  To: gentoo-commits

commit:     c2403c575d982652bcf63673de810343349dd13b
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 10 10:06:53 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Sep 10 10:08:16 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2403c57

app-emulation/xen-tools: x86 stable (bug #643350)

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 app-emulation/xen-tools/xen-tools-4.10.0.ebuild    | 1 -
 app-emulation/xen-tools/xen-tools-4.10.1-r1.ebuild | 1 -
 app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild | 1 -
 app-emulation/xen-tools/xen-tools-4.11.0-r1.ebuild | 1 -
 app-emulation/xen-tools/xen-tools-4.9.2-r1.ebuild  | 3 +--
 5 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.10.0.ebuild b/app-emulation/xen-tools/xen-tools-4.10.0.ebuild
index 1d2b4deba3b..2180656b679 100644
--- a/app-emulation/xen-tools/xen-tools-4.10.0.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.10.0.ebuild
@@ -13,7 +13,6 @@ MAJOR_V="$(get_version_component_range 1-2)"
 
 if [[ $PV == *9999 ]]; then
 	inherit git-r3
-	KEYWORDS=""
 	REPO="xen.git"
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"

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
index 08c0fed5392..3c9506c4f34 100644
--- a/app-emulation/xen-tools/xen-tools-4.10.1-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.10.1-r1.ebuild
@@ -13,7 +13,6 @@ MAJOR_V="$(get_version_component_range 1-2)"
 
 if [[ $PV == *9999 ]]; then
 	inherit git-r3
-	KEYWORDS=""
 	REPO="xen.git"
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"

diff --git a/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild
index 7ebef38e274..adacfc22b1c 100644
--- a/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild
@@ -13,7 +13,6 @@ MAJOR_V="$(get_version_component_range 1-2)"
 
 if [[ $PV == *9999 ]]; then
 	inherit git-r3
-	KEYWORDS=""
 	REPO="xen.git"
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"

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
index 79949e14e11..6f927ec809a 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.0-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.0-r1.ebuild
@@ -13,7 +13,6 @@ MAJOR_V="$(get_version_component_range 1-2)"
 
 if [[ $PV == *9999 ]]; then
 	inherit git-r3
-	KEYWORDS=""
 	REPO="xen.git"
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"

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
index 723cc4fdf1d..d8eb34ba9c5 100644
--- a/app-emulation/xen-tools/xen-tools-4.9.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.9.2-r1.ebuild
@@ -13,12 +13,11 @@ MAJOR_V="$(get_version_component_range 1-2)"
 
 if [[ $PV == *9999 ]]; then
 	inherit git-r3
-	KEYWORDS="amd64"
 	REPO="xen.git"
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-09-10 11:09 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2018-09-10 11:09 UTC (permalink / raw
  To: gentoo-commits

commit:     3f8971358d3427edd2b3052d967f06ef40be0313
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Mon Sep 10 10:49:45 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Sep 10 11:09:44 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f897135

app-emulation/xen-tools: bump to 4.11.0-r2

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 app-emulation/xen-tools/Manifest                   |   1 +
 app-emulation/xen-tools/xen-tools-4.11.0-r2.ebuild | 457 +++++++++++++++++++++
 2 files changed, 458 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 8c3ab18fc4f..5c1582c8e13 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,6 +6,7 @@ DIST xen-4.10.1-upstream-patches-1.tar.xz 85048 BLAKE2B d00f01980e1c889b2f689997
 DIST xen-4.10.1-upstream-patches-2.tar.xz 117588 BLAKE2B ddcd58964117652b50f3524d89089e2e9b14a8399fb5bd2db5d12827035ab94cedbfd5d65134d8953e4062a50e0e8a9b320e9c34008db8fd364456f47fd9cd26 SHA512 49ee8497af3753f3d611bf12c65fb7a79abb018862f1af096e9dde3ddfe8780bb95fc3da338c8d5f16a5d6d233d606d4cf8025a3d0e2897bf2668a1d5b27b198
 DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff65a18e194286a3fc372d4a45f6682cd636b7ac5b4fa0125e54ed51f8876a411d498cf75791718fd088c4a6d2 SHA512 236c02bee69e33644703ed26d323d4c491a91fc05bd0ee0990a7368579f7c82f5bb4510845bf80348fd923024d7d60d521f593dfd0365d971dc592f8ef10fbea
 DIST xen-4.11.0-upstream-patches-0.tar.xz 21720 BLAKE2B 92c2ef90ca6af5032e9181d8edbe2b91a4117cc402f5abdff208aa76ee76b56ce75f576c56220d2ebf6d1a21957c10f7c45a2c88d2c77aa8b17fa9a0a99e5b57 SHA512 6ea0ee376251b20b7fa9b6334bca462f115d8a9929e31ae269ae9591b433b46e4e9076a2d2e39ec5f868d5d74739ad7b0ba0d9244e599da5255ccca0babd669e
+DIST xen-4.11.0-upstream-patches-1.tar.xz 56664 BLAKE2B 27579f4e628bb0d3fdd59f7e133e9134d4ca175842dfdae3a3f765b133254239ae3bca94d75dd655735b5bcbd67f9b8d444dd227028642e6e459e57ed8a20341 SHA512 e90b8e7fa9433e93b1620a776833a6d3578babebe5d73dcaae11186f473945a2270046932ab314a9c6049d3b460a655456f487a5b59730fe88a4f08d482c47a1
 DIST xen-4.11.0.tar.gz 25131533 BLAKE2B 892639b8bcd9b9956104e4d5137ffd88e17f92d965fa967b4af8d74a4fddcc21c6971c53026e0fb5ce833ab2c25c68f827abcac0b7b1dcebc21dca645c465573 SHA512 33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a
 DIST xen-4.9.2-upstream-patches-2.tar.xz 16100 BLAKE2B 469b5ab7c5514a4974ba6370136d3b0b8da66a137e57ea2d8ba4341582ecc65e9131340cfc854b2e4991de778802726479176bf3a54a59660cef7337c31958e5 SHA512 900ed3a63986ad6add07fa4f2c2596c48f7e9aac18d0876229c3a0b076a6417488e0d7bd1bdbe9886e6900bbece35c378b7f8735778b4bdfa115a9662d43108b
 DIST xen-4.9.2.tar.gz 23392753 BLAKE2B 5f96f0e5062eff8ac2971eef85ea2bae0e94e7542151237937a1cf7e74690bb0ce1c952e830d2fc13b3277f70b9ed1de511afe4f780ad7b3be0c58742ece39b2 SHA512 e06aec25439abcc548c174ba8e271c23031ea704bcc2480905140aa68490064fbb1c58d9c4174f6617b4f7bbcddfda284317df6f480a6e5b5b5a2c71fbe0ac93

diff --git a/app-emulation/xen-tools/xen-tools-4.11.0-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.11.0-r2.ebuild
new file mode 100644
index 00000000000..1448504cac9
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.11.0-r2.ebuild
@@ -0,0 +1,457 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+MAJOR_V="$(ver_cut 1-2)"
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=1
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=14
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=3
+
+	SEABIOS_VER=1.10.0
+	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
+	OVMF_PV=20170321
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/${MAJOR_V}"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-4.11
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		 -i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED%/}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+	use doc && dodoc -r docs/{pdf,txt}
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-09-18  7:24 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2018-09-18  7:24 UTC (permalink / raw
  To: gentoo-commits

commit:     d09e472fcf5604828a57cdca5854c9ccdd95776b
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 18 07:23:56 2018 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Tue Sep 18 07:23:56 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d09e472f

app-emulation/xen-tools: amd64 stable wrt bug #655188

Package-Manager: Portage-2.3.40, Repoman-2.3.9
RepoMan-Options: --include-arches="amd64"

 app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild
index adacfc22b1c..7eda6fb5ce2 100644
--- a/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild
@@ -17,7 +17,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-09-19 17:35 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2018-09-19 17:35 UTC (permalink / raw
  To: gentoo-commits

commit:     e211a21de4bbd73a1d304e0e245c89021b4cf0c7
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 19 17:28:48 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Sep 19 17:34:54 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e211a21d

app-emulation/xen-tools: x86 stable (bug #655188)

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild
index 7eda6fb5ce2..57728136499 100644
--- a/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild
@@ -17,7 +17,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-11-10 20:57 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2018-11-10 20:57 UTC (permalink / raw
  To: gentoo-commits

commit:     19cb63a0a2d260cd089ad83ce74fe123235c21f8
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Nov  9 12:08:13 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Nov 10 20:56:56 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19cb63a0

app-emulation/xen-tools: drop old

Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   1 -
 app-emulation/xen-tools/xen-tools-4.10.2.ebuild    | 455 --------------------
 app-emulation/xen-tools/xen-tools-4.11.0-r2.ebuild | 457 ---------------------
 3 files changed, 913 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 4d115b2b45c..98358f5622a 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -4,7 +4,6 @@ DIST xen-4.10.1-upstream-patches-2.tar.xz 117588 BLAKE2B ddcd58964117652b50f3524
 DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff65a18e194286a3fc372d4a45f6682cd636b7ac5b4fa0125e54ed51f8876a411d498cf75791718fd088c4a6d2 SHA512 236c02bee69e33644703ed26d323d4c491a91fc05bd0ee0990a7368579f7c82f5bb4510845bf80348fd923024d7d60d521f593dfd0365d971dc592f8ef10fbea
 DIST xen-4.10.2-upstream-patches-1.tar.xz 31768 BLAKE2B 9205e5fa011426ae3eeaa19694d14ca233805be1e60326d53ec319de1fa28e3b30e7949d7d694ccc8f0e5ea77df580bb6cf22652ae1fd023fdc49b2d37dbce0a SHA512 38c2286d8c1e39d42c266c76d97b5321ca5fb931ebe33ff01c5210fdda4d64ccb39eb6463e756c5178ab7d1c8433a56668abf1dabf4b5b5e85823817d927cd33
 DIST xen-4.10.2.tar.gz 24697204 BLAKE2B b331d3ad8d7842446f7d2da5dd31560f636aa1408dd3cc8798dff35b868ef5a609d17e97ef4355e1e5aa825a5abc74103796f9a8015037f0a564ffcebd825722 SHA512 2e301b4d6eb106fcb52203bc1208c8fd1fc7bb5d795166c0f86e4085227050301f7daa6f21db440c47bc2ca2c7f87d9b96753cfdf3fa724e0416b5679b84c163
-DIST xen-4.11.0-upstream-patches-1.tar.xz 56664 BLAKE2B 27579f4e628bb0d3fdd59f7e133e9134d4ca175842dfdae3a3f765b133254239ae3bca94d75dd655735b5bcbd67f9b8d444dd227028642e6e459e57ed8a20341 SHA512 e90b8e7fa9433e93b1620a776833a6d3578babebe5d73dcaae11186f473945a2270046932ab314a9c6049d3b460a655456f487a5b59730fe88a4f08d482c47a1
 DIST xen-4.11.0-upstream-patches-2.tar.xz 83788 BLAKE2B 3f612492827a1408a3ba058c64b8b9562f7415d19f15241257b7b6754aed472e37538bfed2a017c6664b276f43a1e9c5f87b60454b2eaa0613c84edeb035a28d SHA512 cddc270f2fddbf75f33b45496f5db4586b5463d65fa3604e9df48c116231f088551213c2a021f2b0ad329f7290b36bfdd577cda506c359311c65e897cdf50bd1
 DIST xen-4.11.0.tar.gz 25131533 BLAKE2B 892639b8bcd9b9956104e4d5137ffd88e17f92d965fa967b4af8d74a4fddcc21c6971c53026e0fb5ce833ab2c25c68f827abcac0b7b1dcebc21dca645c465573 SHA512 33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a
 DIST xen-gentoo-patches-14.tar.xz 36244 BLAKE2B 94b751df0ae9a49d1c52ec5fa835d4a040ccb6a4a0f63ef6ef628191163ce7dbd47d4e3b2dbb1cf6cf6c8b368bea4267ff989754482c4794209a80eae9313c25 SHA512 8a23aeddbcf80c049da36e3ef9d797c16996b45be21b56f46f3c9c3833a7c1028fd9ed56fc8053faeb78db21076608de2eb32908e1ae1285f4f200ace40c8c2d

diff --git a/app-emulation/xen-tools/xen-tools-4.10.2.ebuild b/app-emulation/xen-tools/xen-tools-4.10.2.ebuild
deleted file mode 100644
index 4d7ed2a93e2..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.10.2.ebuild
+++ /dev/null
@@ -1,455 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=14
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=3
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
-	OVMF_PV=20170321
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto
-		!net-libs/libiscsi )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-	use doc && dodoc -r docs/{pdf,txt}
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.11.0-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.11.0-r2.ebuild
deleted file mode 100644
index 1448504cac9..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.11.0-r2.ebuild
+++ /dev/null
@@ -1,457 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(ver_cut 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=1
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=14
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=3
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
-	OVMF_PV=20170321
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-	use doc && dodoc -r docs/{pdf,txt}
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-11-10 20:57 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2018-11-10 20:57 UTC (permalink / raw
  To: gentoo-commits

commit:     2cfba23d1571d51d88c47a76e605cd404f345d33
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Nov  9 11:59:37 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Nov 10 20:56:50 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2cfba23d

app-emulation/xen-tools: bump to 4.10.2-r1

Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   1 +
 app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild | 456 +++++++++++++++++++++
 2 files changed, 457 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 1b0e99aa996..fe8748f09ef 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -2,6 +2,7 @@ DIST ovmf-20170321.tar.xz 22141096 BLAKE2B 79e991c8f9deb297865c319e88b6e6d46b1d0
 DIST seabios-1.10.0.tar.gz 588213 BLAKE2B 254eb4572a1dac06020a545820efb53a130a027aaab035cd916009b424475f89bd151f82f1bc5103c01c4657d09da3219d2fbcc7728add473011dcfc7bff7410 SHA512 f1b83ce37b59070b488e19f98c95ca9f413cf4969663331b631c3ccb884c90b2db793d32a779ef05cead538c2fd123be4b73391ad2fa20c900a1f14237178d8c
 DIST xen-4.10.1-upstream-patches-2.tar.xz 117588 BLAKE2B ddcd58964117652b50f3524d89089e2e9b14a8399fb5bd2db5d12827035ab94cedbfd5d65134d8953e4062a50e0e8a9b320e9c34008db8fd364456f47fd9cd26 SHA512 49ee8497af3753f3d611bf12c65fb7a79abb018862f1af096e9dde3ddfe8780bb95fc3da338c8d5f16a5d6d233d606d4cf8025a3d0e2897bf2668a1d5b27b198
 DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff65a18e194286a3fc372d4a45f6682cd636b7ac5b4fa0125e54ed51f8876a411d498cf75791718fd088c4a6d2 SHA512 236c02bee69e33644703ed26d323d4c491a91fc05bd0ee0990a7368579f7c82f5bb4510845bf80348fd923024d7d60d521f593dfd0365d971dc592f8ef10fbea
+DIST xen-4.10.2-upstream-patches-1.tar.xz 31768 BLAKE2B 9205e5fa011426ae3eeaa19694d14ca233805be1e60326d53ec319de1fa28e3b30e7949d7d694ccc8f0e5ea77df580bb6cf22652ae1fd023fdc49b2d37dbce0a SHA512 38c2286d8c1e39d42c266c76d97b5321ca5fb931ebe33ff01c5210fdda4d64ccb39eb6463e756c5178ab7d1c8433a56668abf1dabf4b5b5e85823817d927cd33
 DIST xen-4.10.2.tar.gz 24697204 BLAKE2B b331d3ad8d7842446f7d2da5dd31560f636aa1408dd3cc8798dff35b868ef5a609d17e97ef4355e1e5aa825a5abc74103796f9a8015037f0a564ffcebd825722 SHA512 2e301b4d6eb106fcb52203bc1208c8fd1fc7bb5d795166c0f86e4085227050301f7daa6f21db440c47bc2ca2c7f87d9b96753cfdf3fa724e0416b5679b84c163
 DIST xen-4.11.0-upstream-patches-1.tar.xz 56664 BLAKE2B 27579f4e628bb0d3fdd59f7e133e9134d4ca175842dfdae3a3f765b133254239ae3bca94d75dd655735b5bcbd67f9b8d444dd227028642e6e459e57ed8a20341 SHA512 e90b8e7fa9433e93b1620a776833a6d3578babebe5d73dcaae11186f473945a2270046932ab314a9c6049d3b460a655456f487a5b59730fe88a4f08d482c47a1
 DIST xen-4.11.0.tar.gz 25131533 BLAKE2B 892639b8bcd9b9956104e4d5137ffd88e17f92d965fa967b4af8d74a4fddcc21c6971c53026e0fb5ce833ab2c25c68f827abcac0b7b1dcebc21dca645c465573 SHA512 33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a

diff --git a/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild
new file mode 100644
index 00000000000..527e0a6a8e6
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild
@@ -0,0 +1,456 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=1
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=14
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=3
+
+	SEABIOS_VER=1.10.0
+	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
+	OVMF_PV=20170321
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-4.11
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto
+		!net-libs/libiscsi )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED%/}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+	use doc && dodoc -r docs/{pdf,txt}
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-11-10 20:57 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2018-11-10 20:57 UTC (permalink / raw
  To: gentoo-commits

commit:     7091f5dad799be80fcd94c829a69a6c614a0abfa
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Nov  9 12:04:56 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Nov 10 20:56:53 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7091f5da

app-emulation/xen-tools: bump to 4.11.0-r3

Closes: https://bugs.gentoo.org/669570
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   1 +
 app-emulation/xen-tools/xen-tools-4.11.0-r3.ebuild | 457 +++++++++++++++++++++
 2 files changed, 458 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index fe8748f09ef..4d115b2b45c 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,6 +5,7 @@ DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff
 DIST xen-4.10.2-upstream-patches-1.tar.xz 31768 BLAKE2B 9205e5fa011426ae3eeaa19694d14ca233805be1e60326d53ec319de1fa28e3b30e7949d7d694ccc8f0e5ea77df580bb6cf22652ae1fd023fdc49b2d37dbce0a SHA512 38c2286d8c1e39d42c266c76d97b5321ca5fb931ebe33ff01c5210fdda4d64ccb39eb6463e756c5178ab7d1c8433a56668abf1dabf4b5b5e85823817d927cd33
 DIST xen-4.10.2.tar.gz 24697204 BLAKE2B b331d3ad8d7842446f7d2da5dd31560f636aa1408dd3cc8798dff35b868ef5a609d17e97ef4355e1e5aa825a5abc74103796f9a8015037f0a564ffcebd825722 SHA512 2e301b4d6eb106fcb52203bc1208c8fd1fc7bb5d795166c0f86e4085227050301f7daa6f21db440c47bc2ca2c7f87d9b96753cfdf3fa724e0416b5679b84c163
 DIST xen-4.11.0-upstream-patches-1.tar.xz 56664 BLAKE2B 27579f4e628bb0d3fdd59f7e133e9134d4ca175842dfdae3a3f765b133254239ae3bca94d75dd655735b5bcbd67f9b8d444dd227028642e6e459e57ed8a20341 SHA512 e90b8e7fa9433e93b1620a776833a6d3578babebe5d73dcaae11186f473945a2270046932ab314a9c6049d3b460a655456f487a5b59730fe88a4f08d482c47a1
+DIST xen-4.11.0-upstream-patches-2.tar.xz 83788 BLAKE2B 3f612492827a1408a3ba058c64b8b9562f7415d19f15241257b7b6754aed472e37538bfed2a017c6664b276f43a1e9c5f87b60454b2eaa0613c84edeb035a28d SHA512 cddc270f2fddbf75f33b45496f5db4586b5463d65fa3604e9df48c116231f088551213c2a021f2b0ad329f7290b36bfdd577cda506c359311c65e897cdf50bd1
 DIST xen-4.11.0.tar.gz 25131533 BLAKE2B 892639b8bcd9b9956104e4d5137ffd88e17f92d965fa967b4af8d74a4fddcc21c6971c53026e0fb5ce833ab2c25c68f827abcac0b7b1dcebc21dca645c465573 SHA512 33d431c194f10d5ee767558404a1f80a66b3df019012b0bbd587fcbc9524e1bba7ea04269020ce891fe9d211d2f81c63bf78abedcdbe1595aee26251c803a50a
 DIST xen-gentoo-patches-14.tar.xz 36244 BLAKE2B 94b751df0ae9a49d1c52ec5fa835d4a040ccb6a4a0f63ef6ef628191163ce7dbd47d4e3b2dbb1cf6cf6c8b368bea4267ff989754482c4794209a80eae9313c25 SHA512 8a23aeddbcf80c049da36e3ef9d797c16996b45be21b56f46f3c9c3833a7c1028fd9ed56fc8053faeb78db21076608de2eb32908e1ae1285f4f200ace40c8c2d
 DIST xen-ovmf-patches-3.tar.xz 4208 BLAKE2B 0df8f85667a33c91cbfd86c59aec2ae65eca892b45d66eed76f793a52e2748989bc2785861f8bfdf94235ef7a6c0be6572c6e6cce9695469e40f0facd0ce3947 SHA512 abe001053ca702138bbcdd6bea14e2daae5c785f862d6a15001ca894c8ed8617f0c5dc439c6f54a41433b988acf57c71911af1db074aa76732c39d98622a3b5b

diff --git a/app-emulation/xen-tools/xen-tools-4.11.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.11.0-r3.ebuild
new file mode 100644
index 00000000000..bf025094b12
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.11.0-r3.ebuild
@@ -0,0 +1,457 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=2
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=14
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=3
+
+	SEABIOS_VER=1.10.0
+	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
+	OVMF_PV=20170321
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-4.11
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED%/}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+	use doc && dodoc -r docs/{pdf,txt}
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-11-11 10:55 Mikle Kolyada
  0 siblings, 0 replies; 295+ messages in thread
From: Mikle Kolyada @ 2018-11-11 10:55 UTC (permalink / raw
  To: gentoo-commits

commit:     6e9157f2651373dfa26d04e8f69415834724de18
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 11 10:54:50 2018 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sun Nov 11 10:55:49 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e9157f2

app-emulation/xen-tools: amd64 stable wrt bug #670858

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild
index 527e0a6a8e6..8f04a9b2b25 100644
--- a/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-11-12  1:14 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2018-11-12  1:14 UTC (permalink / raw
  To: gentoo-commits

commit:     7356f8ab9f5e828ae06b5e373833dc106e8adb9e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 12 01:08:04 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Nov 12 01:13:22 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7356f8ab

app-emulation/xen-tools: x86 stable (bug #670858)

Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild
index 8f04a9b2b25..6c5b027ed61 100644
--- a/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.10.2-r1.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2018-11-21 22:55 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2018-11-21 22:55 UTC (permalink / raw
  To: gentoo-commits

commit:     325af4306c612b55ef4ece5c924f310abfe2a515
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Nov 21 05:36:44 2018 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Nov 22 07:03:20 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=325af430

app-emulation/xen-tools: drop old

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 -
 app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild | 456 ---------------------
 2 files changed, 458 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 98358f5622a..6e41ea982de 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,7 +1,5 @@
 DIST ovmf-20170321.tar.xz 22141096 BLAKE2B 79e991c8f9deb297865c319e88b6e6d46b1d08067d3fd639c83f2a379670779ecc60c74c2671ea4eb4a6659fe08ac2d7d4ff337b010b42a908a50829a2d18eeb SHA512 f65dabde3df967224e2072817211786ee4fc3994ee31f8f9d6f67fd74e3479e1da459c720169dd81020cdc1777e4600e531bb124b4625c2ded42c6005bdc802a
 DIST seabios-1.10.0.tar.gz 588213 BLAKE2B 254eb4572a1dac06020a545820efb53a130a027aaab035cd916009b424475f89bd151f82f1bc5103c01c4657d09da3219d2fbcc7728add473011dcfc7bff7410 SHA512 f1b83ce37b59070b488e19f98c95ca9f413cf4969663331b631c3ccb884c90b2db793d32a779ef05cead538c2fd123be4b73391ad2fa20c900a1f14237178d8c
-DIST xen-4.10.1-upstream-patches-2.tar.xz 117588 BLAKE2B ddcd58964117652b50f3524d89089e2e9b14a8399fb5bd2db5d12827035ab94cedbfd5d65134d8953e4062a50e0e8a9b320e9c34008db8fd364456f47fd9cd26 SHA512 49ee8497af3753f3d611bf12c65fb7a79abb018862f1af096e9dde3ddfe8780bb95fc3da338c8d5f16a5d6d233d606d4cf8025a3d0e2897bf2668a1d5b27b198
-DIST xen-4.10.1.tar.gz 24674240 BLAKE2B f9a7e0c637db865ab32ad6b6185ab96022903aff65a18e194286a3fc372d4a45f6682cd636b7ac5b4fa0125e54ed51f8876a411d498cf75791718fd088c4a6d2 SHA512 236c02bee69e33644703ed26d323d4c491a91fc05bd0ee0990a7368579f7c82f5bb4510845bf80348fd923024d7d60d521f593dfd0365d971dc592f8ef10fbea
 DIST xen-4.10.2-upstream-patches-1.tar.xz 31768 BLAKE2B 9205e5fa011426ae3eeaa19694d14ca233805be1e60326d53ec319de1fa28e3b30e7949d7d694ccc8f0e5ea77df580bb6cf22652ae1fd023fdc49b2d37dbce0a SHA512 38c2286d8c1e39d42c266c76d97b5321ca5fb931ebe33ff01c5210fdda4d64ccb39eb6463e756c5178ab7d1c8433a56668abf1dabf4b5b5e85823817d927cd33
 DIST xen-4.10.2.tar.gz 24697204 BLAKE2B b331d3ad8d7842446f7d2da5dd31560f636aa1408dd3cc8798dff35b868ef5a609d17e97ef4355e1e5aa825a5abc74103796f9a8015037f0a564ffcebd825722 SHA512 2e301b4d6eb106fcb52203bc1208c8fd1fc7bb5d795166c0f86e4085227050301f7daa6f21db440c47bc2ca2c7f87d9b96753cfdf3fa724e0416b5679b84c163
 DIST xen-4.11.0-upstream-patches-2.tar.xz 83788 BLAKE2B 3f612492827a1408a3ba058c64b8b9562f7415d19f15241257b7b6754aed472e37538bfed2a017c6664b276f43a1e9c5f87b60454b2eaa0613c84edeb035a28d SHA512 cddc270f2fddbf75f33b45496f5db4586b5463d65fa3604e9df48c116231f088551213c2a021f2b0ad329f7290b36bfdd577cda506c359311c65e897cdf50bd1

diff --git a/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild
deleted file mode 100644
index 57728136499..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.10.1-r2.ebuild
+++ /dev/null
@@ -1,456 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 eutils flag-o-matic multilib python-single-r1 toolchain-funcs versionator
-
-MY_PV=${PV/_/-}
-MAJOR_V="$(get_version_component_range 1-2)"
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=2
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=14
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=3
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
-	OVMF_PV=20170321
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/${MAJOR_V}"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto
-		!net-libs/libiscsi )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		 -i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-	use doc && dodoc -r docs/{pdf,txt}
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-01-19  3:22 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2019-01-19  3:22 UTC (permalink / raw
  To: gentoo-commits

commit:     61c127049d82e2d11f8b9fbc54123c90619e0aed
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Jan  9 15:00:14 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Jan 19 01:57:14 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61c12704

app-emulation/xen-tools: disable capstone

Closes: https://bugs.gentoo.org/673474
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.11.1.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.11.1.ebuild b/app-emulation/xen-tools/xen-tools-4.11.1.ebuild
index 7974e45297c..fe149384f1b 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -334,6 +334,10 @@ src_prepare() {
 		-e 's:^#vif.default.script=:vif.default.script=:' \
 		-i tools/examples/xl.conf  || die
 
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
 	default
 }
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-02-16 13:59 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-02-16 13:59 UTC (permalink / raw
  To: gentoo-commits

commit:     58865b79483791b2808e7c58306b9326511d1dfc
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Feb 15 09:41:19 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sat Feb 16 13:59:02 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=58865b79

app-emulation/xen-tools: backport QA fixes

Closes: https://github.com/gentoo/gentoo/pull/11057

Package-Manager: Portage-2.3.60, Repoman-2.3.12
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.11.1.ebuild | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.11.1.ebuild b/app-emulation/xen-tools/xen-tools-4.11.1.ebuild
index fe149384f1b..2b0aeec7f83 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.1.ebuild
@@ -439,6 +439,11 @@ src_install() {
 	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
 	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
 		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
 }
 
 pkg_postinst() {
@@ -446,7 +451,7 @@ pkg_postinst() {
 	elog "https://wiki.gentoo.org/wiki/Xen"
 	elog "https://wiki.xen.org/wiki/Main_Page"
 	elog ""
-	elog "Recommended to utilise the xencommons script to config sytem At boot"
+	elog "Recommended to utilise the xencommons script to config system at boot"
 	elog "Add by use of rc-update on completion of the install"
 
 	if ! use hvm; then


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-03-07  6:00 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-03-07  6:00 UTC (permalink / raw
  To: gentoo-commits

commit:     a63594bca4c3fa0ea99d7ef43c783d7d7630cd5c
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  7 05:56:39 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Mar  7 06:00:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a63594bc

app-emulation/xen-tools: fix seabios checksum

Upstream changed download URL

Closes: https://bugs.gentoo.org/679488
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.12.0_rc2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.12.0_rc2.ebuild b/app-emulation/xen-tools/xen-tools-4.12.0_rc2.ebuild
index 6a0337a6455..444f4cf56d9 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.0_rc2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.0_rc2.ebuild
@@ -43,7 +43,7 @@ else
 		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
 
 	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
 	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
 	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
 		${OVMF_PATCHSET_URI} )


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-03-07 13:35 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-03-07 13:35 UTC (permalink / raw
  To: gentoo-commits

commit:     bce8a40d92df78b066741a9f1cfe3b8cf9966f65
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Mar  6 08:22:25 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Mar  7 13:34:55 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bce8a40d

app-emulation/xen-tools: bump to 4.11.1-r1

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   1 +
 app-emulation/xen-tools/xen-tools-4.11.1-r1.ebuild | 470 +++++++++++++++++++++
 2 files changed, 471 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index d1624c22988..246af469fc5 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,6 +5,7 @@ DIST xen-4.10.2-upstream-patches-1.tar.xz 31768 BLAKE2B 9205e5fa011426ae3eeaa196
 DIST xen-4.10.2.tar.gz 24697204 BLAKE2B b331d3ad8d7842446f7d2da5dd31560f636aa1408dd3cc8798dff35b868ef5a609d17e97ef4355e1e5aa825a5abc74103796f9a8015037f0a564ffcebd825722 SHA512 2e301b4d6eb106fcb52203bc1208c8fd1fc7bb5d795166c0f86e4085227050301f7daa6f21db440c47bc2ca2c7f87d9b96753cfdf3fa724e0416b5679b84c163
 DIST xen-4.10.3-upstream-patches-1.tar.xz 24064 BLAKE2B ec9339d00afd4057738a78165a82dbebbab73eb561984a049daff84dfb115c0550e67796bfa775d5e5a3a4576c4ea7db408d491fe745a68c412f93a04719c58d SHA512 b3761acdb7a581d172e1e2b1e09406c4748eda3e25c81c19bb53b38e005d27e10ac64109870b47ce72372dc7b7c63ec3eca6156389c174f28ab4ad1c2b9e5634
 DIST xen-4.10.3.tar.gz 24695778 BLAKE2B 50a9e31fb4cf587eeedb357fc710405a1cd4506174a38eb9b032a0cdd9b7f7343d98624ecb07cf605b1403664c7117cdc8f011290309caa18ca9604b4008b906 SHA512 030d23109ce4c0ebf50ade6841d5525a39032bcf8fd0599ccaa9502ff301c1f61f9c5f49233b41a5934a71228958febc1e529a9fc6822ba401a0c18c490ad412
+DIST xen-4.11.1-upstream-patches-0.tar.xz 45416 BLAKE2B 3990dbf338c2aebe1cd601d7caccc6919352cc1f937677d447c3d2626143710bdfda7f1977e2ad7112abff9cad6bb660bc1b0993ca74b2eff51da6d4f4365813 SHA512 ecbc13e607581a6f9b4e318145afaa92ce641bda6fb12585408f61bcf24fa9b245004ad22150e109db5d38fcea38e6bdaf6bb2d6eaaf8e5d5fa8816b5a19e456
 DIST xen-4.11.1.tar.gz 25152217 BLAKE2B a8dfbeb3d490787725c589e1ce82dcbbcd0be7fb4743b38daf3a8704dffda34d1faabb07d74e01d2fab1572ce0b730c21192469317545e8b3edb3fae1130ef8c SHA512 c1655c5decdaed95a2b9a99652318cfc72f6cfdae957cfe60d635f7787e8850f33e8fafc4c4b8d61fb579c9b9d93028a6382903e71808a0418b931e76d72a649
 DIST xen-4.12-rc2.tar.gz 26932109 BLAKE2B a774d0a8b70df6c373396ace1abf1fbed643473e31196b757c2272b692bcd9f96ad9b2c6ff054312d24d081b83a7893ca0ab90a5f7fedb5a7001aa9b06275338 SHA512 e492f618bfa81394c5adc092912490761edb17d2d34882c1848bad1faa9cbc317d7c771d39d6d5b48c461b79d596af4f8001bf34b64e8d632f7afa8dd41676f7
 DIST xen-gentoo-patches-14.tar.xz 36244 BLAKE2B 94b751df0ae9a49d1c52ec5fa835d4a040ccb6a4a0f63ef6ef628191163ce7dbd47d4e3b2dbb1cf6cf6c8b368bea4267ff989754482c4794209a80eae9313c25 SHA512 8a23aeddbcf80c049da36e3ef9d797c16996b45be21b56f46f3c9c3833a7c1028fd9ed56fc8053faeb78db21076608de2eb32908e1ae1285f4f200ace40c8c2d

diff --git a/app-emulation/xen-tools/xen-tools-4.11.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.11.1-r1.ebuild
new file mode 100644
index 00000000000..fa4b312cb48
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.11.1-r1.ebuild
@@ -0,0 +1,470 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=14
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=3
+
+	SEABIOS_VER=1.10.0
+	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
+	OVMF_PV=20170321
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-4.11
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED%/}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-03-07 13:35 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-03-07 13:35 UTC (permalink / raw
  To: gentoo-commits

commit:     9f34e77d4b6cf23d633c258faadd57d030f2949e
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Mar  6 08:21:22 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Mar  7 13:34:47 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f34e77d

app-emulation/xen-tools: bump to 4.10.3-r1

Bug: https://bugs.gentoo.org/678338
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   1 +
 app-emulation/xen-tools/xen-tools-4.10.3-r1.ebuild | 464 +++++++++++++++++++++
 2 files changed, 465 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index c3975bc935a..d1624c22988 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -3,6 +3,7 @@ DIST seabios-1.10.0.tar.gz 588213 BLAKE2B 254eb4572a1dac06020a545820efb53a130a02
 DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27
 DIST xen-4.10.2-upstream-patches-1.tar.xz 31768 BLAKE2B 9205e5fa011426ae3eeaa19694d14ca233805be1e60326d53ec319de1fa28e3b30e7949d7d694ccc8f0e5ea77df580bb6cf22652ae1fd023fdc49b2d37dbce0a SHA512 38c2286d8c1e39d42c266c76d97b5321ca5fb931ebe33ff01c5210fdda4d64ccb39eb6463e756c5178ab7d1c8433a56668abf1dabf4b5b5e85823817d927cd33
 DIST xen-4.10.2.tar.gz 24697204 BLAKE2B b331d3ad8d7842446f7d2da5dd31560f636aa1408dd3cc8798dff35b868ef5a609d17e97ef4355e1e5aa825a5abc74103796f9a8015037f0a564ffcebd825722 SHA512 2e301b4d6eb106fcb52203bc1208c8fd1fc7bb5d795166c0f86e4085227050301f7daa6f21db440c47bc2ca2c7f87d9b96753cfdf3fa724e0416b5679b84c163
+DIST xen-4.10.3-upstream-patches-1.tar.xz 24064 BLAKE2B ec9339d00afd4057738a78165a82dbebbab73eb561984a049daff84dfb115c0550e67796bfa775d5e5a3a4576c4ea7db408d491fe745a68c412f93a04719c58d SHA512 b3761acdb7a581d172e1e2b1e09406c4748eda3e25c81c19bb53b38e005d27e10ac64109870b47ce72372dc7b7c63ec3eca6156389c174f28ab4ad1c2b9e5634
 DIST xen-4.10.3.tar.gz 24695778 BLAKE2B 50a9e31fb4cf587eeedb357fc710405a1cd4506174a38eb9b032a0cdd9b7f7343d98624ecb07cf605b1403664c7117cdc8f011290309caa18ca9604b4008b906 SHA512 030d23109ce4c0ebf50ade6841d5525a39032bcf8fd0599ccaa9502ff301c1f61f9c5f49233b41a5934a71228958febc1e529a9fc6822ba401a0c18c490ad412
 DIST xen-4.11.1.tar.gz 25152217 BLAKE2B a8dfbeb3d490787725c589e1ce82dcbbcd0be7fb4743b38daf3a8704dffda34d1faabb07d74e01d2fab1572ce0b730c21192469317545e8b3edb3fae1130ef8c SHA512 c1655c5decdaed95a2b9a99652318cfc72f6cfdae957cfe60d635f7787e8850f33e8fafc4c4b8d61fb579c9b9d93028a6382903e71808a0418b931e76d72a649
 DIST xen-4.12-rc2.tar.gz 26932109 BLAKE2B a774d0a8b70df6c373396ace1abf1fbed643473e31196b757c2272b692bcd9f96ad9b2c6ff054312d24d081b83a7893ca0ab90a5f7fedb5a7001aa9b06275338 SHA512 e492f618bfa81394c5adc092912490761edb17d2d34882c1848bad1faa9cbc317d7c771d39d6d5b48c461b79d596af4f8001bf34b64e8d632f7afa8dd41676f7

diff --git a/app-emulation/xen-tools/xen-tools-4.10.3-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.10.3-r1.ebuild
new file mode 100644
index 00000000000..828d947f1e0
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.10.3-r1.ebuild
@@ -0,0 +1,464 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=1
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=14
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=3
+
+	SEABIOS_VER=1.10.0
+	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
+	OVMF_PV=20170321
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
+	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	pygrub? ( python )
+	ovmf? ( hvm )
+	^^ ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-4.11
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		system-seabios? ( sys-firmware/seabios )
+		sys-firmware/ipxe
+		sys-devel/dev86
+		sys-power/iasl )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# if the user *really* wants to use their own custom-cflags, let them
+	if use custom-cflags; then
+		einfo "User wants their own CFLAGS - removing defaults"
+
+		# try and remove all the default cflags
+		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
+			-exec sed \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+				-i {} + || die "failed to re-set custom-cflags"
+	else
+		unset CFLAGS
+		unset LDFLAGS
+		unset ASFLAGS
+		unset CPPFLAGS
+	fi
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable pam) \
+		$(use_enable api xenapi) \
+		$(use_enable ovmf) \
+		$(use_enable ocaml ocamltools) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED%/}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-03-08 12:39 Mikle Kolyada
  0 siblings, 0 replies; 295+ messages in thread
From: Mikle Kolyada @ 2019-03-08 12:39 UTC (permalink / raw
  To: gentoo-commits

commit:     c968c02d93ac8a1f16044904c448a07298e096e6
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  8 12:38:46 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Fri Mar  8 12:38:46 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c968c02d

app-emulation/xen-tools: amd64 stable wrt bug #679580

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
RepoMan-Options: --include-arches="amd64"

 app-emulation/xen-tools/xen-tools-4.10.3-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.10.3-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.10.3-r1.ebuild
index 828d947f1e0..2f949b56d4c 100644
--- a/app-emulation/xen-tools/xen-tools-4.10.3-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.10.3-r1.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-03-15 22:49 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2019-03-15 22:49 UTC (permalink / raw
  To: gentoo-commits

commit:     a3618daa909f84c5c9963566b91941953a19c5a4
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu Mar 14 05:02:36 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Mar 15 22:49:14 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3618daa

app-emulation/xen-tools: drop old

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 -
 .../xen-tools/xen-tools-4.12.0_rc4.ebuild          | 472 ---------------------
 2 files changed, 474 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index e9e943ca04e..9233cee6df2 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -7,9 +7,7 @@ DIST xen-4.10.3-upstream-patches-1.tar.xz 24064 BLAKE2B ec9339d00afd4057738a7816
 DIST xen-4.10.3.tar.gz 24695778 BLAKE2B 50a9e31fb4cf587eeedb357fc710405a1cd4506174a38eb9b032a0cdd9b7f7343d98624ecb07cf605b1403664c7117cdc8f011290309caa18ca9604b4008b906 SHA512 030d23109ce4c0ebf50ade6841d5525a39032bcf8fd0599ccaa9502ff301c1f61f9c5f49233b41a5934a71228958febc1e529a9fc6822ba401a0c18c490ad412
 DIST xen-4.11.1-upstream-patches-0.tar.xz 45416 BLAKE2B 3990dbf338c2aebe1cd601d7caccc6919352cc1f937677d447c3d2626143710bdfda7f1977e2ad7112abff9cad6bb660bc1b0993ca74b2eff51da6d4f4365813 SHA512 ecbc13e607581a6f9b4e318145afaa92ce641bda6fb12585408f61bcf24fa9b245004ad22150e109db5d38fcea38e6bdaf6bb2d6eaaf8e5d5fa8816b5a19e456
 DIST xen-4.11.1.tar.gz 25152217 BLAKE2B a8dfbeb3d490787725c589e1ce82dcbbcd0be7fb4743b38daf3a8704dffda34d1faabb07d74e01d2fab1572ce0b730c21192469317545e8b3edb3fae1130ef8c SHA512 c1655c5decdaed95a2b9a99652318cfc72f6cfdae957cfe60d635f7787e8850f33e8fafc4c4b8d61fb579c9b9d93028a6382903e71808a0418b931e76d72a649
-DIST xen-4.12.0-rc4.tar.gz 26954470 BLAKE2B 355582acac6f1600ee4da05eb1e0b9cb11b6d3e47c0fe5b3a9247ae2441e9abb5358040acbd9421c58aa6379660cbda93b82a391b5452001666db43db67b39ce SHA512 71207638f768f5bcc05988f74cdbe26bacf707e3a8da8dadce89d2e33617f0c0f244c98855f21b8916df6c7646f1039de2685ac6f5e6e33994d662b06b81833b
 DIST xen-4.12.0-rc5.tar.gz 26514850 BLAKE2B 41985dc33175bee8bddc4da0ec3b4da9f8cf3ebe580406011db47a27a8740566c1ace6e906d3385f73fee9b6cd572b0f3292381ac72a696fc15d020eb982ad02 SHA512 3d7fb254503c412a3c37782f7c75d093a1d43553dc110338d8dc00df0c6be4c8825cebf7f0519731e49263cef38d07ef48c18f073926d7eaf30abe64b13c52cb
 DIST xen-gentoo-patches-14.tar.xz 36244 BLAKE2B 94b751df0ae9a49d1c52ec5fa835d4a040ccb6a4a0f63ef6ef628191163ce7dbd47d4e3b2dbb1cf6cf6c8b368bea4267ff989754482c4794209a80eae9313c25 SHA512 8a23aeddbcf80c049da36e3ef9d797c16996b45be21b56f46f3c9c3833a7c1028fd9ed56fc8053faeb78db21076608de2eb32908e1ae1285f4f200ace40c8c2d
-DIST xen-gentoo-patches-15.tar.xz 36508 BLAKE2B 10b89597159916781f02e1d0f285317f7319cb26562c4e94f9a755637e31f26dd7e00fe250ceaa71ca140191c2fb76e6c889942dd2f33e0347d65b66734060c8 SHA512 60ba45d95a7f0fa34532395491de221998cf1c7d1aec6cacb8fdc163d31a79ef57a32ef9f2495a5ae10b5d4c9bc5bd43ce6c965ceb5d13291c462501bd419681
 DIST xen-gentoo-patches-16.tar.xz 36980 BLAKE2B a59fcb221a915e39fbbc463fa8b1ca1ef00007654936cc17f64853d91737478a6f78480a3e459b07b8c3ddcc81ab9400beb9ea3906750ba69864d1b97db349d2 SHA512 7727e5c7f4ef997eea830618bc26b26f3a99539a1c702264132401e41a328b384346a06b6721f18e3056fc91a2d2d2bf6320e0ae3c79432c7458a24a0d269c56
 DIST xen-ovmf-patches-3.tar.xz 4208 BLAKE2B 0df8f85667a33c91cbfd86c59aec2ae65eca892b45d66eed76f793a52e2748989bc2785861f8bfdf94235ef7a6c0be6572c6e6cce9695469e40f0facd0ce3947 SHA512 abe001053ca702138bbcdd6bea14e2daae5c785f862d6a15001ca894c8ed8617f0c5dc439c6f54a41433b988acf57c71911af1db074aa76732c39d98622a3b5b

diff --git a/app-emulation/xen-tools/xen-tools-4.12.0_rc4.ebuild b/app-emulation/xen-tools/xen-tools-4.12.0_rc4.ebuild
deleted file mode 100644
index 57bdbc739ef..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.12.0_rc4.ebuild
+++ /dev/null
@@ -1,472 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	#KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	KEYWORDS=""
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=15
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=3
-
-	SEABIOS_VER=1.12.0
-	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
-	OVMF_PV=20170321
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		--with-system-ipxe=${PREFIX}/usr/share/ipxe \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-03-17 23:03 Mikle Kolyada
  0 siblings, 0 replies; 295+ messages in thread
From: Mikle Kolyada @ 2019-03-17 23:03 UTC (permalink / raw
  To: gentoo-commits

commit:     ed6f9aab0f6bd28533462f0db6150c086353cdfc
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 17 23:03:14 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sun Mar 17 23:03:40 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed6f9aab

app-emulation/xen-tools: amd64 stable wrt bug #679580

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11
RepoMan-Options: --include-arches="amd64"

 app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
index 0f2b9bdd5db..f0965d4e365 100644
--- a/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-03-27 23:44 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2019-03-27 23:44 UTC (permalink / raw
  To: gentoo-commits

commit:     a274522270ebac3743854ca7ce583a1cad156b33
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 27 23:42:49 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Mar 27 23:42:49 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a2745222

app-emulation/xen-tools: x86 stable (bug #679580)

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
index f0965d4e365..f58f83d8863 100644
--- a/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-04-03  4:55 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-04-03  4:55 UTC (permalink / raw
  To: gentoo-commits

commit:     88194809fe5a4bbda95418c09274d0644e01a602
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Mar 29 11:28:57 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Apr  3 04:55:29 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88194809

app-emulation/xen-tools: disable sys-cluster/glusterfs automagic

Closes: https://bugs.gentoo.org/682006
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild | 4 ++++
 app-emulation/xen-tools/xen-tools-4.11.1-r2.ebuild | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
index f58f83d8863..e5f5d717210 100644
--- a/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
@@ -332,6 +332,10 @@ src_prepare() {
 		-e 's:^#vif.default.script=:vif.default.script=:' \
 		-i tools/examples/xl.conf  || die
 
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
 	default
 }
 

diff --git a/app-emulation/xen-tools/xen-tools-4.11.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.11.1-r2.ebuild
index c6d51462da3..bfa221f47fb 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.1-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.1-r2.ebuild
@@ -338,6 +338,10 @@ src_prepare() {
 	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
 		-i tools/Makefile || die
 
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
 	default
 }
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-04-03  7:07 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-04-03  7:07 UTC (permalink / raw
  To: gentoo-commits

commit:     f3293308e21a0894ccdf8ef84f019cdd28e029b9
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Apr  3 04:02:58 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Apr  3 07:07:30 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3293308

app-emulation/xen-tools: update edk2/seabios

Bug: https://bugs.gentoo.org/680284
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                      |  2 ++
 ...ls-4.11.1-r2.ebuild => xen-tools-4.11.1-r3.ebuild} | 19 +++++++++----------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 7c6b2177429..e92f3a49114 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,6 +1,8 @@
+DIST edk2-ef529e6ab7c31290a33045bb1f1837447cc0eb56.tar.gz 38714813 BLAKE2B 1c0670c6447aa7d2610e59481324eafe3dbf54cc0480c855380372cf5b95469de4182b569d1c4429df71ceb9be014cb414e070a808609d185b488519955b8677 SHA512 8eb88006500d9d6982e5565bdb71bf47dfe2b9669e107f48b6b237d7efbbfb54b9fd81841421c347e5c0ca45ef9c08f0b95983c8b922c2e1072b0e42b8ede92c
 DIST ovmf-20170321.tar.xz 22141096 BLAKE2B 79e991c8f9deb297865c319e88b6e6d46b1d08067d3fd639c83f2a379670779ecc60c74c2671ea4eb4a6659fe08ac2d7d4ff337b010b42a908a50829a2d18eeb SHA512 f65dabde3df967224e2072817211786ee4fc3994ee31f8f9d6f67fd74e3479e1da459c720169dd81020cdc1777e4600e531bb124b4625c2ded42c6005bdc802a
 DIST seabios-1.10.0.tar.gz 588213 BLAKE2B 254eb4572a1dac06020a545820efb53a130a027aaab035cd916009b424475f89bd151f82f1bc5103c01c4657d09da3219d2fbcc7728add473011dcfc7bff7410 SHA512 f1b83ce37b59070b488e19f98c95ca9f413cf4969663331b631c3ccb884c90b2db793d32a779ef05cead538c2fd123be4b73391ad2fa20c900a1f14237178d8c
 DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27
+DIST seabios-rel-1.11.1.tar.gz 604125 BLAKE2B df2b7322f5169fb74e7f5dd3f680e7d8ad3e6f93e8b1376d15bbda8865458648a0d6086011a8a6549e7ad1794844878736441e70067580c0eb416e20ee038d95 SHA512 69622460475b54ba77a10509dae0ef46d9c733c6c8527ab56a4f2298534dcf1f7722eb501df873ab612222e5867e334c2831cc4c95dd23771aee10740acf0273
 DIST xen-4.10.3-upstream-patches-1.tar.xz 24064 BLAKE2B ec9339d00afd4057738a78165a82dbebbab73eb561984a049daff84dfb115c0550e67796bfa775d5e5a3a4576c4ea7db408d491fe745a68c412f93a04719c58d SHA512 b3761acdb7a581d172e1e2b1e09406c4748eda3e25c81c19bb53b38e005d27e10ac64109870b47ce72372dc7b7c63ec3eca6156389c174f28ab4ad1c2b9e5634
 DIST xen-4.10.3.tar.gz 24695778 BLAKE2B 50a9e31fb4cf587eeedb357fc710405a1cd4506174a38eb9b032a0cdd9b7f7343d98624ecb07cf605b1403664c7117cdc8f011290309caa18ca9604b4008b906 SHA512 030d23109ce4c0ebf50ade6841d5525a39032bcf8fd0599ccaa9502ff301c1f61f9c5f49233b41a5934a71228958febc1e529a9fc6822ba401a0c18c490ad412
 DIST xen-4.11.1-upstream-patches-0.tar.xz 45416 BLAKE2B 3990dbf338c2aebe1cd601d7caccc6919352cc1f937677d447c3d2626143710bdfda7f1977e2ad7112abff9cad6bb660bc1b0993ca74b2eff51da6d4f4365813 SHA512 ecbc13e607581a6f9b4e318145afaa92ce641bda6fb12585408f61bcf24fa9b245004ad22150e109db5d38fcea38e6bdaf6bb2d6eaaf8e5d5fa8816b5a19e456

diff --git a/app-emulation/xen-tools/xen-tools-4.11.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.11.1-r3.ebuild
similarity index 96%
rename from app-emulation/xen-tools/xen-tools-4.11.1-r2.ebuild
rename to app-emulation/xen-tools/xen-tools-4.11.1-r3.ebuild
index bfa221f47fb..04a72b80ad3 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.1-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.1-r3.ebuild
@@ -24,11 +24,10 @@ else
 	# xen-tools's gentoo patches version which apply to this specific ebuild
 	GENTOO_GPV=0
 	# xen-tools ovmf's patches
-	OVMF_VER=3
+	OVMF_VER=
 
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
-	OVMF_PV=20170321
+	SEABIOS_VER=1.11.1
+	EDK2_COMMIT=ef529e6ab7c31290a33045bb1f1837447cc0eb56
 
 	[[ -n ${UPSTREAM_VER} ]] && \
 		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
@@ -42,9 +41,8 @@ else
 		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
 
 	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
+	https://git.seabios.org/cgit/seabios.git/snapshot/seabios-rel-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
 		${OVMF_PATCHSET_URI} )
 	${UPSTREAM_PATCHSET_URI}
 	${SECURITY_PATCHSET_URI}
@@ -216,7 +214,7 @@ src_prepare() {
 	fi
 
 	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
 	pushd tools/firmware/ > /dev/null
 	ln -s seabios-dir-remote seabios-dir || die
 	popd > /dev/null
@@ -235,11 +233,12 @@ src_prepare() {
 	if use ovmf; then
 		if [[ -n ${OVMF_VER} ]];then
 			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			pushd "${WORKDIR}"/edk2-*/ > /dev/null
 			eapply "${WORKDIR}"/patches-ovmf
 			popd > /dev/null
 		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
 	fi
 
 	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-04-04  4:55 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-04-04  4:55 UTC (permalink / raw
  To: gentoo-commits

commit:     0887e98f46b36f78df9ef8b2c827455ad86f7800
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  4 04:54:34 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Apr  4 04:55:45 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0887e98f

app-emulation/xen-tools: bump edk2/seabios for 4.12.0

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.12.0.ebuild | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.12.0.ebuild b/app-emulation/xen-tools/xen-tools-4.12.0.ebuild
index 6b2195b87b8..f68edb0a8dd 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.0.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.0.ebuild
@@ -24,11 +24,10 @@ else
 	# xen-tools's gentoo patches version which apply to this specific ebuild
 	GENTOO_GPV=0
 	# xen-tools ovmf's patches
-	OVMF_VER=3
+	OVMF_VER=
 
 	SEABIOS_VER=1.12.0
-	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
-	OVMF_PV=20170321
+	EDK2_COMMIT=ef529e6ab7c31290a33045bb1f1837447cc0eb56
 
 	[[ -n ${UPSTREAM_VER} ]] && \
 		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
@@ -43,8 +42,7 @@ else
 
 	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
 	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
 		${OVMF_PATCHSET_URI} )
 	${UPSTREAM_PATCHSET_URI}
 	${SECURITY_PATCHSET_URI}
@@ -236,11 +234,12 @@ src_prepare() {
 	if use ovmf; then
 		if [[ -n ${OVMF_VER} ]];then
 			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
+			pushd "${WORKDIR}"/edk2-*/ > /dev/null
 			eapply "${WORKDIR}"/patches-ovmf
 			popd > /dev/null
 		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
 	fi
 
 	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-04-17 13:10 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-04-17 13:10 UTC (permalink / raw
  To: gentoo-commits

commit:     bc86a7c330fdcb74227f327b0c0dbfd498c5ff28
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue Apr 16 13:33:15 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed Apr 17 13:10:27 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc86a7c3

app-emulation/xen-tools: various improvments

Add upstream patches, fix REQUIRED_USE for qemu, sort
options.

Closes: https://github.com/gentoo/gentoo/pull/11708

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |  2 +-
 ...4.11.1-r3.ebuild => xen-tools-4.11.1-r4.ebuild} | 22 +++++++++++-----------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index a7a4b99ecae..ed94b37b0c5 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,7 +6,7 @@ DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96e
 DIST seabios-rel-1.11.1.tar.gz 604125 BLAKE2B df2b7322f5169fb74e7f5dd3f680e7d8ad3e6f93e8b1376d15bbda8865458648a0d6086011a8a6549e7ad1794844878736441e70067580c0eb416e20ee038d95 SHA512 69622460475b54ba77a10509dae0ef46d9c733c6c8527ab56a4f2298534dcf1f7722eb501df873ab612222e5867e334c2831cc4c95dd23771aee10740acf0273
 DIST xen-4.10.3-upstream-patches-1.tar.xz 24064 BLAKE2B ec9339d00afd4057738a78165a82dbebbab73eb561984a049daff84dfb115c0550e67796bfa775d5e5a3a4576c4ea7db408d491fe745a68c412f93a04719c58d SHA512 b3761acdb7a581d172e1e2b1e09406c4748eda3e25c81c19bb53b38e005d27e10ac64109870b47ce72372dc7b7c63ec3eca6156389c174f28ab4ad1c2b9e5634
 DIST xen-4.10.3.tar.gz 24695778 BLAKE2B 50a9e31fb4cf587eeedb357fc710405a1cd4506174a38eb9b032a0cdd9b7f7343d98624ecb07cf605b1403664c7117cdc8f011290309caa18ca9604b4008b906 SHA512 030d23109ce4c0ebf50ade6841d5525a39032bcf8fd0599ccaa9502ff301c1f61f9c5f49233b41a5934a71228958febc1e529a9fc6822ba401a0c18c490ad412
-DIST xen-4.11.1-upstream-patches-0.tar.xz 45416 BLAKE2B 3990dbf338c2aebe1cd601d7caccc6919352cc1f937677d447c3d2626143710bdfda7f1977e2ad7112abff9cad6bb660bc1b0993ca74b2eff51da6d4f4365813 SHA512 ecbc13e607581a6f9b4e318145afaa92ce641bda6fb12585408f61bcf24fa9b245004ad22150e109db5d38fcea38e6bdaf6bb2d6eaaf8e5d5fa8816b5a19e456
+DIST xen-4.11.1-upstream-patches-1.tar.xz 60048 BLAKE2B 60d5960183433776c881696e9b50f800c2724c9815b3ebb6eb994d108ab4b3de92cf8d7ec79c86958e8811b19550f802c26326351d49f35391cfeb3e6a1d5e76 SHA512 788245219ed374b80423f01754abae457b36de098a0d568828af02142b55692e2df78eceb8cb2a11fc20e9ee59c2cebfea8ec1de0a9d6dc64f327a88cf6bf918
 DIST xen-4.11.1.tar.gz 25152217 BLAKE2B a8dfbeb3d490787725c589e1ce82dcbbcd0be7fb4743b38daf3a8704dffda34d1faabb07d74e01d2fab1572ce0b730c21192469317545e8b3edb3fae1130ef8c SHA512 c1655c5decdaed95a2b9a99652318cfc72f6cfdae957cfe60d635f7787e8850f33e8fafc4c4b8d61fb579c9b9d93028a6382903e71808a0418b931e76d72a649
 DIST xen-4.12.0.tar.gz 26949697 BLAKE2B 9175cc9054e4a2b5c34df89a4efd667f86b4861bef9c3310bf431d041f710a7cb265b4d34a76ab18a17a3121392942d2e5d76c5044eb9b957d4255af889fe69a SHA512 0ce366dcac607c9b592c5e9c0f40652eef743913b246bed4b0c380b8d59ac23a6adcd05befec37fc799a61476f47df76d4911cbf1da6ceb51441c546bf2464de
 DIST xen-gentoo-patches-16.tar.xz 36980 BLAKE2B a59fcb221a915e39fbbc463fa8b1ca1ef00007654936cc17f64853d91737478a6f78480a3e459b07b8c3ddcc81ab9400beb9ea3906750ba69864d1b97db349d2 SHA512 7727e5c7f4ef997eea830618bc26b26f3a99539a1c702264132401e41a328b384346a06b6721f18e3056fc91a2d2d2bf6320e0ae3c79432c7458a24a0d269c56

diff --git a/app-emulation/xen-tools/xen-tools-4.11.1-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.11.1-r4.ebuild
similarity index 97%
rename from app-emulation/xen-tools/xen-tools-4.11.1-r3.ebuild
rename to app-emulation/xen-tools/xen-tools-4.11.1-r4.ebuild
index 04a72b80ad3..b197b31b8ed 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.1-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.1-r4.ebuild
@@ -17,10 +17,10 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
+	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball
-	GENTOO_VER=16
+	GENTOO_VER=17
 	# xen-tools's gentoo patches version which apply to this specific ebuild
 	GENTOO_GPV=0
 	# xen-tools ovmf's patches
@@ -60,13 +60,13 @@ SLOT="0/$(ver_cut 1-2)"
 # Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
 # >=dev-lang/ocaml-4 stable
 # Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
+IUSE="api custom-cflags debug doc flask +hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
 
 REQUIRED_USE="
 	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
 	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
+	pygrub? ( python )
+	?? ( qemu system-qemu )"
 
 COMMON_DEPEND="
 	sys-apps/pciutils
@@ -93,10 +93,10 @@ DEPEND="${COMMON_DEPEND}
 		)
 	!amd64? ( >=sys-apps/dtc-1.4.0 )
 	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
 		sys-devel/dev86
-		sys-power/iasl )
+		sys-firmware/ipxe[qemu]
+		sys-power/iasl
+		system-seabios? ( sys-firmware/seabios ) )
 	dev-lang/perl
 	app-misc/pax-utils
 	doc? (
@@ -246,7 +246,7 @@ src_prepare() {
 	# Fix texi2html build error with new texi2html, qemu.doc.html
 	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
 
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
 	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
 		-i tools/firmware/Makefile || die
 
@@ -353,10 +353,10 @@ src_configure() {
 		--disable-xen \
 		--enable-tools \
 		--enable-docs \
-		$(use_enable pam) \
 		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
+		$(use_enable pam) \
 		$(use_enable ocaml ocamltools) \
+		$(use_enable ovmf) \
 		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
 		"
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-05-17  8:48 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-05-17  8:48 UTC (permalink / raw
  To: gentoo-commits

commit:     4144cab6501222bf9d95e151ffd7c742ddea91c1
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed May 15 20:09:14 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri May 17 08:48:40 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4144cab6

app-emulation/xen-tools: add upstream patches

Closes: https://github.com/gentoo/gentoo/pull/12008

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                                        | 1 +
 .../{xen-tools-4.12.0-r1.ebuild => xen-tools-4.12.0-r2.ebuild}          | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 6d149ae59f3..773a5c59100 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -8,6 +8,7 @@ DIST xen-4.10.3-upstream-patches-1.tar.xz 24064 BLAKE2B ec9339d00afd4057738a7816
 DIST xen-4.10.3.tar.gz 24695778 BLAKE2B 50a9e31fb4cf587eeedb357fc710405a1cd4506174a38eb9b032a0cdd9b7f7343d98624ecb07cf605b1403664c7117cdc8f011290309caa18ca9604b4008b906 SHA512 030d23109ce4c0ebf50ade6841d5525a39032bcf8fd0599ccaa9502ff301c1f61f9c5f49233b41a5934a71228958febc1e529a9fc6822ba401a0c18c490ad412
 DIST xen-4.11.1-upstream-patches-2.tar.xz 78292 BLAKE2B 762c0b33500503854d3195af752a4510090b22a7212abb6bd72a74fd55b64ffc622db5d3b18ff5c2f1b804002537a82bdf5036ec23acf15c8b8e3f0ed8c722fb SHA512 4850ab53de811dc7a5499f603584624c7879f41cbacc223cbfd5fdf0042d39ba0195aa51356215d26136dab536f1b713274d21e3d265b62ca06fdab0aa923a77
 DIST xen-4.11.1.tar.gz 25152217 BLAKE2B a8dfbeb3d490787725c589e1ce82dcbbcd0be7fb4743b38daf3a8704dffda34d1faabb07d74e01d2fab1572ce0b730c21192469317545e8b3edb3fae1130ef8c SHA512 c1655c5decdaed95a2b9a99652318cfc72f6cfdae957cfe60d635f7787e8850f33e8fafc4c4b8d61fb579c9b9d93028a6382903e71808a0418b931e76d72a649
+DIST xen-4.12.0-upstream-patches-0.tar.xz 32864 BLAKE2B 994ca1f9fdd89f25e225348870ec97257795644f0314437f8d2927b77ce5b53de6b9e043636cc2c9e4f8fda4ff7b7c26917f2912f2a287c57bc00606846fb617 SHA512 6f7ab80cac0afd8bcd88109cd052e29f9b028b0c363a4e1f1e845f4fdbb3d7782dffd1f20dd80f2923c507625abe9648d7fbe7d52c6fd565ab550c9c5a416eeb
 DIST xen-4.12.0.tar.gz 26949697 BLAKE2B 9175cc9054e4a2b5c34df89a4efd667f86b4861bef9c3310bf431d041f710a7cb265b4d34a76ab18a17a3121392942d2e5d76c5044eb9b957d4255af889fe69a SHA512 0ce366dcac607c9b592c5e9c0f40652eef743913b246bed4b0c380b8d59ac23a6adcd05befec37fc799a61476f47df76d4911cbf1da6ceb51441c546bf2464de
 DIST xen-gentoo-patches-16.tar.xz 36980 BLAKE2B a59fcb221a915e39fbbc463fa8b1ca1ef00007654936cc17f64853d91737478a6f78480a3e459b07b8c3ddcc81ab9400beb9ea3906750ba69864d1b97db349d2 SHA512 7727e5c7f4ef997eea830618bc26b26f3a99539a1c702264132401e41a328b384346a06b6721f18e3056fc91a2d2d2bf6320e0ae3c79432c7458a24a0d269c56
 DIST xen-gentoo-patches-17.tar.xz 15688 BLAKE2B d5e3bdb15e182c5f0c21adfa5cb5b88e3453e5035659823e3322074646c3ea89b55bf54d0ec6c54966d9739544d156de365a60acf928b799b68978be3380a002 SHA512 f1000ca36166fa21d4b18fb9ecf36f55b1450c312622fbe38545f78aabc150e2d6cce4bd58472c41bd9be8945940a0bc953ba7e470cd5095cf2e7d8a87769b2b

diff --git a/app-emulation/xen-tools/xen-tools-4.12.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.12.0-r2.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.12.0-r1.ebuild
rename to app-emulation/xen-tools/xen-tools-4.12.0-r2.ebuild
index 3084ea4bee9..ea900713a63 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.0-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.0-r2.ebuild
@@ -17,7 +17,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
+	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball
 	GENTOO_VER=17


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-05-17  8:48 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-05-17  8:48 UTC (permalink / raw
  To: gentoo-commits

commit:     02e6b3cf1814f270a5400f5598fb46061ded70cb
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed May 15 20:08:32 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri May 17 08:48:40 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=02e6b3cf

app-emulation/xen-tools: add upstream patches

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                                        | 2 +-
 .../{xen-tools-4.11.1-r4.ebuild => xen-tools-4.11.1-r5.ebuild}          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index ed94b37b0c5..6d149ae59f3 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,7 +6,7 @@ DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96e
 DIST seabios-rel-1.11.1.tar.gz 604125 BLAKE2B df2b7322f5169fb74e7f5dd3f680e7d8ad3e6f93e8b1376d15bbda8865458648a0d6086011a8a6549e7ad1794844878736441e70067580c0eb416e20ee038d95 SHA512 69622460475b54ba77a10509dae0ef46d9c733c6c8527ab56a4f2298534dcf1f7722eb501df873ab612222e5867e334c2831cc4c95dd23771aee10740acf0273
 DIST xen-4.10.3-upstream-patches-1.tar.xz 24064 BLAKE2B ec9339d00afd4057738a78165a82dbebbab73eb561984a049daff84dfb115c0550e67796bfa775d5e5a3a4576c4ea7db408d491fe745a68c412f93a04719c58d SHA512 b3761acdb7a581d172e1e2b1e09406c4748eda3e25c81c19bb53b38e005d27e10ac64109870b47ce72372dc7b7c63ec3eca6156389c174f28ab4ad1c2b9e5634
 DIST xen-4.10.3.tar.gz 24695778 BLAKE2B 50a9e31fb4cf587eeedb357fc710405a1cd4506174a38eb9b032a0cdd9b7f7343d98624ecb07cf605b1403664c7117cdc8f011290309caa18ca9604b4008b906 SHA512 030d23109ce4c0ebf50ade6841d5525a39032bcf8fd0599ccaa9502ff301c1f61f9c5f49233b41a5934a71228958febc1e529a9fc6822ba401a0c18c490ad412
-DIST xen-4.11.1-upstream-patches-1.tar.xz 60048 BLAKE2B 60d5960183433776c881696e9b50f800c2724c9815b3ebb6eb994d108ab4b3de92cf8d7ec79c86958e8811b19550f802c26326351d49f35391cfeb3e6a1d5e76 SHA512 788245219ed374b80423f01754abae457b36de098a0d568828af02142b55692e2df78eceb8cb2a11fc20e9ee59c2cebfea8ec1de0a9d6dc64f327a88cf6bf918
+DIST xen-4.11.1-upstream-patches-2.tar.xz 78292 BLAKE2B 762c0b33500503854d3195af752a4510090b22a7212abb6bd72a74fd55b64ffc622db5d3b18ff5c2f1b804002537a82bdf5036ec23acf15c8b8e3f0ed8c722fb SHA512 4850ab53de811dc7a5499f603584624c7879f41cbacc223cbfd5fdf0042d39ba0195aa51356215d26136dab536f1b713274d21e3d265b62ca06fdab0aa923a77
 DIST xen-4.11.1.tar.gz 25152217 BLAKE2B a8dfbeb3d490787725c589e1ce82dcbbcd0be7fb4743b38daf3a8704dffda34d1faabb07d74e01d2fab1572ce0b730c21192469317545e8b3edb3fae1130ef8c SHA512 c1655c5decdaed95a2b9a99652318cfc72f6cfdae957cfe60d635f7787e8850f33e8fafc4c4b8d61fb579c9b9d93028a6382903e71808a0418b931e76d72a649
 DIST xen-4.12.0.tar.gz 26949697 BLAKE2B 9175cc9054e4a2b5c34df89a4efd667f86b4861bef9c3310bf431d041f710a7cb265b4d34a76ab18a17a3121392942d2e5d76c5044eb9b957d4255af889fe69a SHA512 0ce366dcac607c9b592c5e9c0f40652eef743913b246bed4b0c380b8d59ac23a6adcd05befec37fc799a61476f47df76d4911cbf1da6ceb51441c546bf2464de
 DIST xen-gentoo-patches-16.tar.xz 36980 BLAKE2B a59fcb221a915e39fbbc463fa8b1ca1ef00007654936cc17f64853d91737478a6f78480a3e459b07b8c3ddcc81ab9400beb9ea3906750ba69864d1b97db349d2 SHA512 7727e5c7f4ef997eea830618bc26b26f3a99539a1c702264132401e41a328b384346a06b6721f18e3056fc91a2d2d2bf6320e0ae3c79432c7458a24a0d269c56

diff --git a/app-emulation/xen-tools/xen-tools-4.11.1-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.11.1-r4.ebuild
rename to app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
index b197b31b8ed..afb37d50630 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.1-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
@@ -17,7 +17,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=1
+	UPSTREAM_VER=2
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball
 	GENTOO_VER=17


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-05-22  2:35 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-05-22  2:35 UTC (permalink / raw
  To: gentoo-commits

commit:     50508c2fed59ef3bf0301387276146f936197ca3
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Sat May 18 20:14:12 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Wed May 22 02:14:35 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50508c2f

app-emulation/xen-tools: fix ipxe building with gcc9

Closes: https://bugs.gentoo.org/685694
Closes: https://github.com/gentoo/gentoo/pull/12045

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                                     | 1 +
 .../{xen-tools-4.12.0-r2.ebuild => xen-tools-4.12.0-r3.ebuild}       | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 773a5c59100..7835f463009 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -12,4 +12,5 @@ DIST xen-4.12.0-upstream-patches-0.tar.xz 32864 BLAKE2B 994ca1f9fdd89f25e2253488
 DIST xen-4.12.0.tar.gz 26949697 BLAKE2B 9175cc9054e4a2b5c34df89a4efd667f86b4861bef9c3310bf431d041f710a7cb265b4d34a76ab18a17a3121392942d2e5d76c5044eb9b957d4255af889fe69a SHA512 0ce366dcac607c9b592c5e9c0f40652eef743913b246bed4b0c380b8d59ac23a6adcd05befec37fc799a61476f47df76d4911cbf1da6ceb51441c546bf2464de
 DIST xen-gentoo-patches-16.tar.xz 36980 BLAKE2B a59fcb221a915e39fbbc463fa8b1ca1ef00007654936cc17f64853d91737478a6f78480a3e459b07b8c3ddcc81ab9400beb9ea3906750ba69864d1b97db349d2 SHA512 7727e5c7f4ef997eea830618bc26b26f3a99539a1c702264132401e41a328b384346a06b6721f18e3056fc91a2d2d2bf6320e0ae3c79432c7458a24a0d269c56
 DIST xen-gentoo-patches-17.tar.xz 15688 BLAKE2B d5e3bdb15e182c5f0c21adfa5cb5b88e3453e5035659823e3322074646c3ea89b55bf54d0ec6c54966d9739544d156de365a60acf928b799b68978be3380a002 SHA512 f1000ca36166fa21d4b18fb9ecf36f55b1450c312622fbe38545f78aabc150e2d6cce4bd58472c41bd9be8945940a0bc953ba7e470cd5095cf2e7d8a87769b2b
+DIST xen-gentoo-patches-18.tar.xz 16840 BLAKE2B 7243b363c78250ae1928d75813cfd6035a87ca03f1605cbe02233e009a19105a0712711d622eef8606f3e7e1a5db5203342e56a1b00496d5ce37ddc4ffb9e4ea SHA512 328d7b1a57ab6bf9c7200b934aeb241f6d4fecccc600130d1c80460540212eb658cb74ae0502c008e040fdb2d95db20c2a3d71a8e73fd1361070d70adeab6e30
 DIST xen-ovmf-patches-3.tar.xz 4208 BLAKE2B 0df8f85667a33c91cbfd86c59aec2ae65eca892b45d66eed76f793a52e2748989bc2785861f8bfdf94235ef7a6c0be6572c6e6cce9695469e40f0facd0ce3947 SHA512 abe001053ca702138bbcdd6bea14e2daae5c785f862d6a15001ca894c8ed8617f0c5dc439c6f54a41433b988acf57c71911af1db074aa76732c39d98622a3b5b

diff --git a/app-emulation/xen-tools/xen-tools-4.12.0-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild
similarity index 98%
rename from app-emulation/xen-tools/xen-tools-4.12.0-r2.ebuild
rename to app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild
index ea900713a63..ccd98499ae3 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.0-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild
@@ -20,7 +20,7 @@ else
 	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball
-	GENTOO_VER=17
+	GENTOO_VER=18
 	# xen-tools's gentoo patches version which apply to this specific ebuild
 	GENTOO_GPV=0
 	# xen-tools ovmf's patches
@@ -250,6 +250,9 @@ src_prepare() {
 	# ipxe
 	if use ipxe; then
 		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
+		cp "${WORKDIR}/patches-gentoo/${PN}-4.12.0-ipxe-gcc9.patch" \
+			tools/firmware/etherboot/patches/ipxe-gcc9.patch || die
+		echo "ipxe-gcc9.patch" >> tools/firmware/etherboot/patches/series || die
 	fi
 
 	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-06-20 18:04 Mikle Kolyada
  0 siblings, 0 replies; 295+ messages in thread
From: Mikle Kolyada @ 2019-06-20 18:04 UTC (permalink / raw
  To: gentoo-commits

commit:     e745410c19464b7b50e75881324052e9bad7ac48
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 20 18:03:57 2019 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Thu Jun 20 18:04:18 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e745410c

app-emulation/xen-tools: amd64 stable wrt bug #683694

Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
Package-Manager: Portage-2.3.66, Repoman-2.3.11
RepoMan-Options: --include-arches="amd64"

 app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
index afb37d50630..60ad3cc9964 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-07-07 21:15 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2019-07-07 21:15 UTC (permalink / raw
  To: gentoo-commits

commit:     aaef400d346bf02c11b445811300c97c763f8ec3
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  7 21:15:11 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jul  7 21:15:28 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aaef400d

app-emulation/xen-tools: add missing dependency on sys-firmware/ipxe[qemu]

Closes: https://bugs.gentoo.org/689428
Package-Manager: Portage-2.3.68, Repoman-2.3.16
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild | 1 +
 app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild | 1 +
 2 files changed, 2 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
index 60ad3cc9964..d1cc3ea8ec2 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
@@ -83,6 +83,7 @@ DEPEND="${COMMON_DEPEND}
 	>=sys-kernel/linux-headers-4.11
 	dev-python/lxml[${PYTHON_USEDEP}]
 	x86? ( sys-devel/dev86
+		sys-firmware/ipxe[qemu]
 		sys-power/iasl )
 	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
 	api? ( dev-libs/libxml2

diff --git a/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild
index ccd98499ae3..b0d104e17f7 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild
@@ -89,6 +89,7 @@ DEPEND="${COMMON_DEPEND}
 	>=sys-kernel/linux-headers-4.11
 	dev-python/lxml[${PYTHON_USEDEP}]
 	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
 		sys-power/iasl )
 	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
 	api? ( dev-libs/libxml2


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-07-08 12:10 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2019-07-08 12:10 UTC (permalink / raw
  To: gentoo-commits

commit:     20422cbd28ef2bb0870cac390f993e64c0521b61
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  8 12:09:17 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Jul  8 12:10:14 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20422cbd

app-emulation/xen-tools: x86 stable (bug #683694)

Package-Manager: Portage-2.3.68, Repoman-2.3.16
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
index d1cc3ea8ec2..d481f3025a9 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-08-11 11:20 David Seifert
  0 siblings, 0 replies; 295+ messages in thread
From: David Seifert @ 2019-08-11 11:20 UTC (permalink / raw
  To: gentoo-commits

commit:     2398a745cd7718a31de0bb3afb0408b3723ebe3e
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 11 11:19:09 2019 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Aug 11 11:19:09 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2398a745

app-emulation/xen-tools: [QA] Fix missing trailing slash

Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild | 4 ++--
 app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild | 4 ++--
 app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
index e5f5d717210..dc0192b621e 100644
--- a/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
@@ -398,7 +398,7 @@ src_install() {
 	python_fix_shebang "${D}"
 
 	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
+	rm -rf "${D}"/tmp || die
 
 	if use doc; then
 		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
@@ -428,7 +428,7 @@ src_install() {
 
 	# For -static-libs wrt Bug 384355
 	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
 	fi
 
 	# for xendomains

diff --git a/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
index d481f3025a9..0dd08b6ae28 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
@@ -404,7 +404,7 @@ src_install() {
 	python_fix_shebang "${D}"
 
 	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
+	rm -rf "${D}"/tmp || die
 
 	if use doc; then
 		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
@@ -434,7 +434,7 @@ src_install() {
 
 	# For -static-libs wrt Bug 384355
 	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
 	fi
 
 	# for xendomains

diff --git a/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild
index b0d104e17f7..a0b3c419501 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild
@@ -421,7 +421,7 @@ src_install() {
 	python_fix_shebang "${D}"
 
 	# Remove RedHat-specific stuff
-	rm -rf "${D}"tmp || die
+	rm -rf "${D}"/tmp || die
 
 	if use doc; then
 		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
@@ -451,7 +451,7 @@ src_install() {
 
 	# For -static-libs wrt Bug 384355
 	if ! use static-libs; then
-		rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
 	fi
 
 	# for xendomains


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-08-11 14:44 David Seifert
  0 siblings, 0 replies; 295+ messages in thread
From: David Seifert @ 2019-08-11 14:44 UTC (permalink / raw
  To: gentoo-commits

commit:     013faf0e8b540c477d407b9cb98eadeca75fc9cf
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 11 14:43:56 2019 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Aug 11 14:43:56 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=013faf0e

app-emulation/xen-tools: [QA] Fix missing trailing slash

Package-Manager: Portage-2.3.71, Repoman-2.3.17
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild | 4 ++--
 app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild | 4 ++--
 app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
index dc0192b621e..11abf9ebb62 100644
--- a/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
@@ -392,7 +392,7 @@ src_install() {
 		XEN_PYTHON_NATIVE_INSTALL=y install-tools
 
 	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
+	rm -rv "${ED}/var/run" || die
 
 	# Fix the remaining Python shebangs.
 	python_fix_shebang "${D}"
@@ -428,7 +428,7 @@ src_install() {
 
 	# For -static-libs wrt Bug 384355
 	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
 	fi
 
 	# for xendomains

diff --git a/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
index 0dd08b6ae28..aa27319fb10 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
@@ -398,7 +398,7 @@ src_install() {
 		XEN_PYTHON_NATIVE_INSTALL=y install-tools
 
 	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
+	rm -rv "${ED}/var/run" || die
 
 	# Fix the remaining Python shebangs.
 	python_fix_shebang "${D}"
@@ -434,7 +434,7 @@ src_install() {
 
 	# For -static-libs wrt Bug 384355
 	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
 	fi
 
 	# for xendomains

diff --git a/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild
index a0b3c419501..8a13631173e 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.0-r3.ebuild
@@ -415,7 +415,7 @@ src_install() {
 		XEN_PYTHON_NATIVE_INSTALL=y install-tools
 
 	# Created at runtime
-	rm -rv "${ED%/}/var/run" || die
+	rm -rv "${ED}/var/run" || die
 
 	# Fix the remaining Python shebangs.
 	python_fix_shebang "${D}"
@@ -451,7 +451,7 @@ src_install() {
 
 	# For -static-libs wrt Bug 384355
 	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
 	fi
 
 	# for xendomains


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-10-23 12:30 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2019-10-23 12:30 UTC (permalink / raw
  To: gentoo-commits

commit:     2cc8483c08d1a8bb523c4e0aca4f8a34bd52b3fd
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 23 12:29:40 2019 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Wed Oct 23 12:29:40 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2cc8483c

app-emulation/xen-tools: amd64 stable wrt bug #690974

Package-Manager: Portage-2.3.76, Repoman-2.3.16
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.11.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.11.2.ebuild b/app-emulation/xen-tools/xen-tools-4.11.2.ebuild
index 409d2a25694..5777eafffd3 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.2.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-10-23 12:45 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2019-10-23 12:45 UTC (permalink / raw
  To: gentoo-commits

commit:     62c6e30e8e29654378dc20fab42b4faef3c6efb6
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 23 12:45:05 2019 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Wed Oct 23 12:45:05 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62c6e30e

app-emulation/xen-tools: x86 stable wrt bug #690974

Package-Manager: Portage-2.3.76, Repoman-2.3.16
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.11.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.11.2.ebuild b/app-emulation/xen-tools/xen-tools-4.11.2.ebuild
index 5777eafffd3..b1beaa8102e 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.2.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-10-24  3:07 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-10-24  3:07 UTC (permalink / raw
  To: gentoo-commits

commit:     5945ba52919b01a1c3765de9b1970fcddd9e9e0a
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 24 03:03:54 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Oct 24 03:06:44 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5945ba52

app-emulation/xen-tools: drop old

Bug: https://bugs.gentoo.org/686024
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   9 -
 app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild | 468 --------------------
 app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild | 474 ---------------------
 3 files changed, 951 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index e545dae8abd..94ce282b68f 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,19 +1,10 @@
 DIST edk2-ef529e6ab7c31290a33045bb1f1837447cc0eb56.tar.gz 38714813 BLAKE2B 1c0670c6447aa7d2610e59481324eafe3dbf54cc0480c855380372cf5b95469de4182b569d1c4429df71ceb9be014cb414e070a808609d185b488519955b8677 SHA512 8eb88006500d9d6982e5565bdb71bf47dfe2b9669e107f48b6b237d7efbbfb54b9fd81841421c347e5c0ca45ef9c08f0b95983c8b922c2e1072b0e42b8ede92c
 DIST ipxe-git-d2063b7693e0e35db97b2264aa987eb6341ae779.tar.gz 3792227 BLAKE2B 720ac29ab3187d7abaec33823dda967caab7eea9631123a7619d2f83d3ad6c7bb47db01665a4c54548fe367866606936d36690a06ecf42323b9bd0ef00e41569 SHA512 2b4ae8e65cd678dbb376f24001294eb54aead8d66456e06fc270dec178d90b282c1eb19731234d8b458054e49c5b8b8c4a89345c63ed0a4dafaf205e642b00b7
-DIST ovmf-20170321.tar.xz 22141096 BLAKE2B 79e991c8f9deb297865c319e88b6e6d46b1d08067d3fd639c83f2a379670779ecc60c74c2671ea4eb4a6659fe08ac2d7d4ff337b010b42a908a50829a2d18eeb SHA512 f65dabde3df967224e2072817211786ee4fc3994ee31f8f9d6f67fd74e3479e1da459c720169dd81020cdc1777e4600e531bb124b4625c2ded42c6005bdc802a
-DIST seabios-1.10.0.tar.gz 588213 BLAKE2B 254eb4572a1dac06020a545820efb53a130a027aaab035cd916009b424475f89bd151f82f1bc5103c01c4657d09da3219d2fbcc7728add473011dcfc7bff7410 SHA512 f1b83ce37b59070b488e19f98c95ca9f413cf4969663331b631c3ccb884c90b2db793d32a779ef05cead538c2fd123be4b73391ad2fa20c900a1f14237178d8c
 DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27
 DIST seabios-rel-1.11.1.tar.gz 604125 BLAKE2B df2b7322f5169fb74e7f5dd3f680e7d8ad3e6f93e8b1376d15bbda8865458648a0d6086011a8a6549e7ad1794844878736441e70067580c0eb416e20ee038d95 SHA512 69622460475b54ba77a10509dae0ef46d9c733c6c8527ab56a4f2298534dcf1f7722eb501df873ab612222e5867e334c2831cc4c95dd23771aee10740acf0273
-DIST xen-4.10.3-upstream-patches-1.tar.xz 24064 BLAKE2B ec9339d00afd4057738a78165a82dbebbab73eb561984a049daff84dfb115c0550e67796bfa775d5e5a3a4576c4ea7db408d491fe745a68c412f93a04719c58d SHA512 b3761acdb7a581d172e1e2b1e09406c4748eda3e25c81c19bb53b38e005d27e10ac64109870b47ce72372dc7b7c63ec3eca6156389c174f28ab4ad1c2b9e5634
-DIST xen-4.10.3.tar.gz 24695778 BLAKE2B 50a9e31fb4cf587eeedb357fc710405a1cd4506174a38eb9b032a0cdd9b7f7343d98624ecb07cf605b1403664c7117cdc8f011290309caa18ca9604b4008b906 SHA512 030d23109ce4c0ebf50ade6841d5525a39032bcf8fd0599ccaa9502ff301c1f61f9c5f49233b41a5934a71228958febc1e529a9fc6822ba401a0c18c490ad412
-DIST xen-4.11.1-upstream-patches-2.tar.xz 78292 BLAKE2B 762c0b33500503854d3195af752a4510090b22a7212abb6bd72a74fd55b64ffc622db5d3b18ff5c2f1b804002537a82bdf5036ec23acf15c8b8e3f0ed8c722fb SHA512 4850ab53de811dc7a5499f603584624c7879f41cbacc223cbfd5fdf0042d39ba0195aa51356215d26136dab536f1b713274d21e3d265b62ca06fdab0aa923a77
-DIST xen-4.11.1.tar.gz 25152217 BLAKE2B a8dfbeb3d490787725c589e1ce82dcbbcd0be7fb4743b38daf3a8704dffda34d1faabb07d74e01d2fab1572ce0b730c21192469317545e8b3edb3fae1130ef8c SHA512 c1655c5decdaed95a2b9a99652318cfc72f6cfdae957cfe60d635f7787e8850f33e8fafc4c4b8d61fb579c9b9d93028a6382903e71808a0418b931e76d72a649
 DIST xen-4.11.2-upstream-patches-0.tar.xz 11532 BLAKE2B e36509d6256ac4018f20711baba77619a7c3a684d81e25a94cffba9c9f53ec9e0efdcefcd6a7ffa26b49fd3d4e0dfc2126f1ea620f0bd35ea83188b4587e5b38 SHA512 4a97d1e56cb3e5152372f0c0b99f8838194b2e03ed1255e87611d8bb28af9c9199fe123d3542f5ba9b3f652c29a519b5e4255b8925c0c8dfbd588f83ed8806d9
 DIST xen-4.11.2.tar.gz 25164925 BLAKE2B 11adea16d93235af5807e6e3784e0fc36ce34f274a85d1976a5c8ad36a323437216b0cf6bb6cb13b00e1e838e319a9f8f4b9c417870eef9ed660f22274d81310 SHA512 48d3d926d35eb56c79c06d0abc6e6be2564fadb43367cc7f46881c669a75016707672179c2cca1c4cfb14af2cefd46e2e7f99470cddf7df2886d8435a2de814e
 DIST xen-4.12.0-upstream-patches-0.tar.xz 32864 BLAKE2B 994ca1f9fdd89f25e225348870ec97257795644f0314437f8d2927b77ce5b53de6b9e043636cc2c9e4f8fda4ff7b7c26917f2912f2a287c57bc00606846fb617 SHA512 6f7ab80cac0afd8bcd88109cd052e29f9b028b0c363a4e1f1e845f4fdbb3d7782dffd1f20dd80f2923c507625abe9648d7fbe7d52c6fd565ab550c9c5a416eeb
 DIST xen-4.12.0.tar.gz 26949697 BLAKE2B 9175cc9054e4a2b5c34df89a4efd667f86b4861bef9c3310bf431d041f710a7cb265b4d34a76ab18a17a3121392942d2e5d76c5044eb9b957d4255af889fe69a SHA512 0ce366dcac607c9b592c5e9c0f40652eef743913b246bed4b0c380b8d59ac23a6adcd05befec37fc799a61476f47df76d4911cbf1da6ceb51441c546bf2464de
-DIST xen-gentoo-patches-16.tar.xz 36980 BLAKE2B a59fcb221a915e39fbbc463fa8b1ca1ef00007654936cc17f64853d91737478a6f78480a3e459b07b8c3ddcc81ab9400beb9ea3906750ba69864d1b97db349d2 SHA512 7727e5c7f4ef997eea830618bc26b26f3a99539a1c702264132401e41a328b384346a06b6721f18e3056fc91a2d2d2bf6320e0ae3c79432c7458a24a0d269c56
-DIST xen-gentoo-patches-17.tar.xz 15688 BLAKE2B d5e3bdb15e182c5f0c21adfa5cb5b88e3453e5035659823e3322074646c3ea89b55bf54d0ec6c54966d9739544d156de365a60acf928b799b68978be3380a002 SHA512 f1000ca36166fa21d4b18fb9ecf36f55b1450c312622fbe38545f78aabc150e2d6cce4bd58472c41bd9be8945940a0bc953ba7e470cd5095cf2e7d8a87769b2b
 DIST xen-gentoo-patches-18.tar.xz 16840 BLAKE2B 7243b363c78250ae1928d75813cfd6035a87ca03f1605cbe02233e009a19105a0712711d622eef8606f3e7e1a5db5203342e56a1b00496d5ce37ddc4ffb9e4ea SHA512 328d7b1a57ab6bf9c7200b934aeb241f6d4fecccc600130d1c80460540212eb658cb74ae0502c008e040fdb2d95db20c2a3d71a8e73fd1361070d70adeab6e30
 DIST xen-gentoo-patches-19.tar.xz 17460 BLAKE2B 6f25c4c9bb438ba0ceded75d04ba6c05ca74e6319d14cf744ea23ecbed2e8283c3c00275a4609b583402d352216520a10197fd4ab9e056eac1c841b0f79bc6b8 SHA512 586e88eea0f2dcc5bae0eb4691cc1d722a8b1a7ca849fd8992d72c0990b2832b3e78738c936e8e46bc9623aa1c8e8afa341a22608479629ea012474d5ff6b69a
-DIST xen-ovmf-patches-3.tar.xz 4208 BLAKE2B 0df8f85667a33c91cbfd86c59aec2ae65eca892b45d66eed76f793a52e2748989bc2785861f8bfdf94235ef7a6c0be6572c6e6cce9695469e40f0facd0ce3947 SHA512 abe001053ca702138bbcdd6bea14e2daae5c785f862d6a15001ca894c8ed8617f0c5dc439c6f54a41433b988acf57c71911af1db074aa76732c39d98622a3b5b

diff --git a/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
deleted file mode 100644
index 11abf9ebb62..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.10.3-r2.ebuild
+++ /dev/null
@@ -1,468 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=1
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=16
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=1
-	# xen-tools ovmf's patches
-	OVMF_VER=3
-
-	SEABIOS_VER=1.10.0
-	# OVMF upstream 5920a9d16b1ab887c2858224316a98e961d71b05
-	OVMF_PV=20170321
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
-	https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.xz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	pygrub? ( python )
-	ovmf? ( hvm )
-	^^ ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		system-seabios? ( sys-firmware/seabios )
-		sys-firmware/ipxe
-		sys-devel/dev86
-		sys-power/iasl )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/ovmf-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api   || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable pam) \
-		$(use_enable api xenapi) \
-		$(use_enable ovmf) \
-		$(use_enable ocaml ocamltools) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild b/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
deleted file mode 100644
index aa27319fb10..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.11.1-r5.ebuild
+++ /dev/null
@@ -1,474 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=2
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=17
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER=1.11.1
-	EDK2_COMMIT=ef529e6ab7c31290a33045bb1f1837447cc0eb56
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://git.seabios.org/cgit/seabios.git/snapshot/seabios-rel-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask +hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ovmf? ( hvm )
-	pygrub? ( python )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-firmware/ipxe[qemu]
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		sys-devel/dev86
-		sys-firmware/ipxe[qemu]
-		sys-power/iasl
-		system-seabios? ( sys-firmware/seabios ) )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable pam) \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-10-24  3:07 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-10-24  3:07 UTC (permalink / raw
  To: gentoo-commits

commit:     e8789b54d18ed62a34c1bd0eb9760b2ff665855a
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 24 02:19:49 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Oct 24 03:06:34 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8789b54

app-emulation/xen-tools: add Tomáš Mózes as proxy-maintainer

Tomáš Mózes is an active XEN user and help maintaining
XEN packages in Gentoo Linux, he contributed a lot!

I'm quite happy to add him as the proxy-maintainer.

Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/metadata.xml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
index 3d5273174a3..0e42a47368f 100644
--- a/app-emulation/xen-tools/metadata.xml
+++ b/app-emulation/xen-tools/metadata.xml
@@ -1,6 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
+	<maintainer type="person">
+		<email>hydrapolic@gmail.com</email>
+		<name>Tomáš Mózes</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
 	<maintainer type="project">
 		<email>xen@gentoo.org</email>
 		<name>Gentoo Xen Project</name>


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-10-27  7:44 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-10-27  7:44 UTC (permalink / raw
  To: gentoo-commits

commit:     f591cf837fbd5a6c1d42e39e2573e3d5a62ec319
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Oct 25 15:17:08 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sun Oct 27 07:42:23 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f591cf83

app-emulation/xen-tools: drop keywords

keep 4.11 stable, 4.12 testing and 4.13 RC version un-keyworded for
hardcore testers. Re-add keywords after 4.13 is final

Closes: https://github.com/gentoo/gentoo/pull/13432
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.0_rc1.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.0_rc1.ebuild b/app-emulation/xen-tools/xen-tools-4.13.0_rc1.ebuild
index 69d555fabf0..d0908764bb5 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.0_rc1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.0_rc1.ebuild
@@ -16,7 +16,8 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	#KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS=""
 	UPSTREAM_VER=
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-10-31 21:48 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2019-10-31 21:48 UTC (permalink / raw
  To: gentoo-commits

commit:     72a5b4f422c810fa2f1402011586a56fd38d37c2
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu Oct 31 19:40:48 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Oct 31 21:48:17 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72a5b4f4

app-emulation/xen-tools: bump to 4.12.1-r1

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                                      | 2 +-
 .../xen-tools/{xen-tools-4.12.1.ebuild => xen-tools-4.12.1-r1.ebuild} | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index f0ec2ef4d9d..2c657925f7f 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,7 +6,7 @@ DIST seabios-rel-1.11.1.tar.gz 604125 BLAKE2B df2b7322f5169fb74e7f5dd3f680e7d8ad
 DIST xen-4.11.2-upstream-patches-0.tar.xz 11532 BLAKE2B e36509d6256ac4018f20711baba77619a7c3a684d81e25a94cffba9c9f53ec9e0efdcefcd6a7ffa26b49fd3d4e0dfc2126f1ea620f0bd35ea83188b4587e5b38 SHA512 4a97d1e56cb3e5152372f0c0b99f8838194b2e03ed1255e87611d8bb28af9c9199fe123d3542f5ba9b3f652c29a519b5e4255b8925c0c8dfbd588f83ed8806d9
 DIST xen-4.11.2-upstream-patches-1.tar.xz 77556 BLAKE2B f95af370f8a99a27bfc762e661364da6f1ef1b08dd5a6b81a5421d32bcad820097a694c5656e174cec7ed53ff140f80d63f57ac31867edf12e68ef4d87ea8b44 SHA512 f41f2ff20648eed76918c865958d42b99d2743188514c63e27797c80e9169f7f5843ac48195e38d269d02edcb9889f042b992b85773ca61c267282e41ea8dae6
 DIST xen-4.11.2.tar.gz 25164925 BLAKE2B 11adea16d93235af5807e6e3784e0fc36ce34f274a85d1976a5c8ad36a323437216b0cf6bb6cb13b00e1e838e319a9f8f4b9c417870eef9ed660f22274d81310 SHA512 48d3d926d35eb56c79c06d0abc6e6be2564fadb43367cc7f46881c669a75016707672179c2cca1c4cfb14af2cefd46e2e7f99470cddf7df2886d8435a2de814e
-DIST xen-4.12.1-upstream-patches-0.tar.xz 18520 BLAKE2B b7a3f51e7629d2cabf9a8363291a7178b4f9a3eed7907271939a21e8058900d4497405c7d06df4ec71a558d68998456ca3c79d431dee2ec39fe21a9280fc2d4b SHA512 f15192505803de6cc1f1eb04b653f186ac7b08afa9575ee0b57f793f77cc08b10945c1b849183763a5b40d6ee6a80eab37d97219f3fff7a76397088cb6854b08
+DIST xen-4.12.1-upstream-patches-1.tar.xz 62920 BLAKE2B a7f070e4b48c04fa26b75ccbd46aa1172df306060ae180f29f5ea61a5f0b4c2e854a5d1127ed42c05b21977a0e43b36b7e137c1758496b242f48626c5a00e22b SHA512 d7094b86f297a4b1da7007d73752ca8478a26c675ec5d93ade4599935cd51ebd80220a4ea7223d878e0d2c2209336577d196017c463abe9e47ff20914ffa5021
 DIST xen-4.12.1.tar.gz 26970584 BLAKE2B ceab2af3d36b72d838d7b4f58f6855c97cf05282a4ea3c82eda29b8945ee20563845b7be02884bf0a061a633fb2b3016a2f7396ce34d9b3d93f90d6ee6d449ed SHA512 be15d3af6b109771aaf59b3621e4e1560b7d9a963d9b7f6a1f6f4a1c907fd97434b060c15f75849b44fbda33f26eb51b030d14d068c6ad5103ad240fe7a98f40
 DIST xen-4.13.0-rc1.tar.gz 38984903 BLAKE2B c8fa19a2cff2de67712e5976670ecbbeff1528b987cdd7523a7f8c8952b889255af4e21c50c68537ffff9273153dfc619582f8072f6f356e20f38dae1e331fb6 SHA512 392d1f77faec4d9868aff928a2eb2918e8cef576a92f7a853d3bbd1ba609bad6abcd4d675f7c618e7bf630feea4c8da081c31926c281a17c8f6b41c3ea9fd607
 DIST xen-gentoo-patches-18.tar.xz 16840 BLAKE2B 7243b363c78250ae1928d75813cfd6035a87ca03f1605cbe02233e009a19105a0712711d622eef8606f3e7e1a5db5203342e56a1b00496d5ce37ddc4ffb9e4ea SHA512 328d7b1a57ab6bf9c7200b934aeb241f6d4fecccc600130d1c80460540212eb658cb74ae0502c008e040fdb2d95db20c2a3d71a8e73fd1361070d70adeab6e30

diff --git a/app-emulation/xen-tools/xen-tools-4.12.1.ebuild b/app-emulation/xen-tools/xen-tools-4.12.1-r1.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.12.1.ebuild
rename to app-emulation/xen-tools/xen-tools-4.12.1-r1.ebuild
index d420678a069..83c7552e06e 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.1-r1.ebuild
@@ -17,7 +17,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
+	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball
 	GENTOO_VER=18
@@ -407,7 +407,7 @@ src_install() {
 	python_fix_shebang "${D}"
 
 	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
+	rm -rf "${D}/tmp" || die
 
 	if use doc; then
 		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-10-31 21:48 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2019-10-31 21:48 UTC (permalink / raw
  To: gentoo-commits

commit:     cb82bc2cc4b181820e46373bee86059d43cb264c
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu Oct 31 19:37:51 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Oct 31 21:48:12 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb82bc2c

app-emulation/xen-tools: bump to 4.11.2-r1

Bug: https://bugs.gentoo.org/699048
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   1 +
 app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild | 460 +++++++++++++++++++++
 2 files changed, 461 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 8b872b4ad6f..f0ec2ef4d9d 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -4,6 +4,7 @@ DIST ipxe-git-d2063b7693e0e35db97b2264aa987eb6341ae779.tar.gz 3792227 BLAKE2B 72
 DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27
 DIST seabios-rel-1.11.1.tar.gz 604125 BLAKE2B df2b7322f5169fb74e7f5dd3f680e7d8ad3e6f93e8b1376d15bbda8865458648a0d6086011a8a6549e7ad1794844878736441e70067580c0eb416e20ee038d95 SHA512 69622460475b54ba77a10509dae0ef46d9c733c6c8527ab56a4f2298534dcf1f7722eb501df873ab612222e5867e334c2831cc4c95dd23771aee10740acf0273
 DIST xen-4.11.2-upstream-patches-0.tar.xz 11532 BLAKE2B e36509d6256ac4018f20711baba77619a7c3a684d81e25a94cffba9c9f53ec9e0efdcefcd6a7ffa26b49fd3d4e0dfc2126f1ea620f0bd35ea83188b4587e5b38 SHA512 4a97d1e56cb3e5152372f0c0b99f8838194b2e03ed1255e87611d8bb28af9c9199fe123d3542f5ba9b3f652c29a519b5e4255b8925c0c8dfbd588f83ed8806d9
+DIST xen-4.11.2-upstream-patches-1.tar.xz 77556 BLAKE2B f95af370f8a99a27bfc762e661364da6f1ef1b08dd5a6b81a5421d32bcad820097a694c5656e174cec7ed53ff140f80d63f57ac31867edf12e68ef4d87ea8b44 SHA512 f41f2ff20648eed76918c865958d42b99d2743188514c63e27797c80e9169f7f5843ac48195e38d269d02edcb9889f042b992b85773ca61c267282e41ea8dae6
 DIST xen-4.11.2.tar.gz 25164925 BLAKE2B 11adea16d93235af5807e6e3784e0fc36ce34f274a85d1976a5c8ad36a323437216b0cf6bb6cb13b00e1e838e319a9f8f4b9c417870eef9ed660f22274d81310 SHA512 48d3d926d35eb56c79c06d0abc6e6be2564fadb43367cc7f46881c669a75016707672179c2cca1c4cfb14af2cefd46e2e7f99470cddf7df2886d8435a2de814e
 DIST xen-4.12.1-upstream-patches-0.tar.xz 18520 BLAKE2B b7a3f51e7629d2cabf9a8363291a7178b4f9a3eed7907271939a21e8058900d4497405c7d06df4ec71a558d68998456ca3c79d431dee2ec39fe21a9280fc2d4b SHA512 f15192505803de6cc1f1eb04b653f186ac7b08afa9575ee0b57f793f77cc08b10945c1b849183763a5b40d6ee6a80eab37d97219f3fff7a76397088cb6854b08
 DIST xen-4.12.1.tar.gz 26970584 BLAKE2B ceab2af3d36b72d838d7b4f58f6855c97cf05282a4ea3c82eda29b8945ee20563845b7be02884bf0a061a633fb2b3016a2f7396ce34d9b3d93f90d6ee6d449ed SHA512 be15d3af6b109771aaf59b3621e4e1560b7d9a963d9b7f6a1f6f4a1c907fd97434b060c15f75849b44fbda33f26eb51b030d14d068c6ad5103ad240fe7a98f40

diff --git a/app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild
new file mode 100644
index 00000000000..11c24dede0c
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild
@@ -0,0 +1,460 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=1
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=19
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=
+
+	SEABIOS_VER=1.11.1
+	EDK2_COMMIT=ef529e6ab7c31290a33045bb1f1837447cc0eb56
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	https://git.seabios.org/cgit/seabios.git/snapshot/seabios-rel-${SEABIOS_VER}.tar.gz
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README docs/README.xen-bugtool )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc flask +hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ovmf? ( hvm )
+	pygrub? ( python )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-4.11
+	dev-python/lxml[${PYTHON_USEDEP}]
+	x86? ( sys-devel/dev86
+		sys-firmware/ipxe[qemu]
+		sys-power/iasl )
+	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-devel/bin86
+		sys-devel/dev86
+		sys-firmware/ipxe[qemu]
+		sys-power/iasl
+		system-seabios? ( sys-firmware/seabios ) )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		dev-python/markdown[${PYTHON_USEDEP}]
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? ( media-libs/libsdl[X] )
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/edk2-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable api xenapi) \
+		$(use_enable pam) \
+		$(use_enable ocaml ocamltools) \
+		$(use_enable ovmf) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}/tmp" || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-11-01 23:51 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2019-11-01 23:51 UTC (permalink / raw
  To: gentoo-commits

commit:     8a8309ef0fdf50729fa5ebdebc16fe8ef8ebe8ef
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Nov  1 23:50:26 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Nov  1 23:51:12 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a8309ef

app-emulation/xen-tools: x86 stable (bug #699048)

Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild
index 11c24dede0c..91b8fff3371 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-11-02  8:42 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2019-11-02  8:42 UTC (permalink / raw
  To: gentoo-commits

commit:     d3972640d166062d8db84093170fef1ed7a0c2c0
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  2 08:41:35 2019 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sat Nov  2 08:41:35 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3972640

app-emulation/xen-tools: amd64 stable wrt bug #699048

Package-Manager: Portage-2.3.76, Repoman-2.3.16
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild
index 91b8fff3371..ac40bea35e0 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.2-r1.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-11-04 11:51 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2019-11-04 11:51 UTC (permalink / raw
  To: gentoo-commits

commit:     1a5cd9426e3c9905668a834f73165af7598c8a38
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Mon Nov  4 08:51:48 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Mon Nov  4 11:50:58 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a5cd942

app-emulation/xen-tools: drop vulnerable

Closes: https://github.com/gentoo/gentoo/pull/13543
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   1 -
 app-emulation/xen-tools/xen-tools-4.11.2.ebuild | 474 ------------------------
 2 files changed, 475 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 2c657925f7f..d5becb4f196 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -3,7 +3,6 @@ DIST ipxe-git-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz 3810726 BLAKE2B b9
 DIST ipxe-git-d2063b7693e0e35db97b2264aa987eb6341ae779.tar.gz 3792227 BLAKE2B 720ac29ab3187d7abaec33823dda967caab7eea9631123a7619d2f83d3ad6c7bb47db01665a4c54548fe367866606936d36690a06ecf42323b9bd0ef00e41569 SHA512 2b4ae8e65cd678dbb376f24001294eb54aead8d66456e06fc270dec178d90b282c1eb19731234d8b458054e49c5b8b8c4a89345c63ed0a4dafaf205e642b00b7
 DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27
 DIST seabios-rel-1.11.1.tar.gz 604125 BLAKE2B df2b7322f5169fb74e7f5dd3f680e7d8ad3e6f93e8b1376d15bbda8865458648a0d6086011a8a6549e7ad1794844878736441e70067580c0eb416e20ee038d95 SHA512 69622460475b54ba77a10509dae0ef46d9c733c6c8527ab56a4f2298534dcf1f7722eb501df873ab612222e5867e334c2831cc4c95dd23771aee10740acf0273
-DIST xen-4.11.2-upstream-patches-0.tar.xz 11532 BLAKE2B e36509d6256ac4018f20711baba77619a7c3a684d81e25a94cffba9c9f53ec9e0efdcefcd6a7ffa26b49fd3d4e0dfc2126f1ea620f0bd35ea83188b4587e5b38 SHA512 4a97d1e56cb3e5152372f0c0b99f8838194b2e03ed1255e87611d8bb28af9c9199fe123d3542f5ba9b3f652c29a519b5e4255b8925c0c8dfbd588f83ed8806d9
 DIST xen-4.11.2-upstream-patches-1.tar.xz 77556 BLAKE2B f95af370f8a99a27bfc762e661364da6f1ef1b08dd5a6b81a5421d32bcad820097a694c5656e174cec7ed53ff140f80d63f57ac31867edf12e68ef4d87ea8b44 SHA512 f41f2ff20648eed76918c865958d42b99d2743188514c63e27797c80e9169f7f5843ac48195e38d269d02edcb9889f042b992b85773ca61c267282e41ea8dae6
 DIST xen-4.11.2.tar.gz 25164925 BLAKE2B 11adea16d93235af5807e6e3784e0fc36ce34f274a85d1976a5c8ad36a323437216b0cf6bb6cb13b00e1e838e319a9f8f4b9c417870eef9ed660f22274d81310 SHA512 48d3d926d35eb56c79c06d0abc6e6be2564fadb43367cc7f46881c669a75016707672179c2cca1c4cfb14af2cefd46e2e7f99470cddf7df2886d8435a2de814e
 DIST xen-4.12.1-upstream-patches-1.tar.xz 62920 BLAKE2B a7f070e4b48c04fa26b75ccbd46aa1172df306060ae180f29f5ea61a5f0b4c2e854a5d1127ed42c05b21977a0e43b36b7e137c1758496b242f48626c5a00e22b SHA512 d7094b86f297a4b1da7007d73752ca8478a26c675ec5d93ade4599935cd51ebd80220a4ea7223d878e0d2c2209336577d196017c463abe9e47ff20914ffa5021

diff --git a/app-emulation/xen-tools/xen-tools-4.11.2.ebuild b/app-emulation/xen-tools/xen-tools-4.11.2.ebuild
deleted file mode 100644
index b1beaa8102e..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.11.2.ebuild
+++ /dev/null
@@ -1,474 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=19
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER=1.11.1
-	EDK2_COMMIT=ef529e6ab7c31290a33045bb1f1837447cc0eb56
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://git.seabios.org/cgit/seabios.git/snapshot/seabios-rel-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api custom-cflags debug doc flask +hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ovmf? ( hvm )
-	pygrub? ( python )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
-	x86? ( sys-devel/dev86
-		sys-firmware/ipxe[qemu]
-		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		sys-devel/dev86
-		sys-firmware/ipxe[qemu]
-		sys-power/iasl
-		system-seabios? ( sys-firmware/seabios ) )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# if the user *really* wants to use their own custom-cflags, let them
-	if use custom-cflags; then
-		einfo "User wants their own CFLAGS - removing defaults"
-
-		# try and remove all the default cflags
-		find "${S}" \( -name Makefile -o -name Rules.mk -o -name Config.mk \) \
-			-exec sed \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
-				-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
-				-i {} + || die "failed to re-set custom-cflags"
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-		unset CPPFLAGS
-	fi
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable pam) \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}/tmp" || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-12-13 14:37 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2019-12-13 14:37 UTC (permalink / raw
  To: gentoo-commits

commit:     eb7b776e551f1ebebc94662810124655ba68dad4
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 13 14:37:18 2019 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Dec 13 14:37:18 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb7b776e

app-emulation/xen-tools: x86 stable wrt bug #702644

Package-Manager: Portage-2.3.79, Repoman-2.3.16
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.11.3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.11.3.ebuild b/app-emulation/xen-tools/xen-tools-4.11.3.ebuild
index e730734169d..50a5ef2ff48 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.3.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2019-12-15 13:43 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2019-12-15 13:43 UTC (permalink / raw
  To: gentoo-commits

commit:     695a6e5761553e02b07a8d199dc760f243f65023
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 15 13:39:55 2019 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sun Dec 15 13:39:55 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=695a6e57

app-emulation/xen-tools: amd64 stable wrt bug #702644

Package-Manager: Portage-2.3.79, Repoman-2.3.16
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.11.3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.11.3.ebuild b/app-emulation/xen-tools/xen-tools-4.11.3.ebuild
index 50a5ef2ff48..a089de2905e 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.3.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-02-09 16:11 Michał Górny
  0 siblings, 0 replies; 295+ messages in thread
From: Michał Górny @ 2020-02-09 16:11 UTC (permalink / raw
  To: gentoo-commits

commit:     4071e16cf23353fff5f26798dd167e801626590a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Feb  7 09:05:00 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Feb  9 16:10:37 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4071e16c

app-emulation/xen-tools: Switch to PYTHON_MULTI_USEDEP API

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../{xen-tools-4.11.3.ebuild => xen-tools-4.11.3-r1.ebuild}  | 12 ++++++++----
 ...xen-tools-4.12.1-r1.ebuild => xen-tools-4.12.1-r2.ebuild} | 12 ++++++++----
 app-emulation/xen-tools/xen-tools-4.13.0.ebuild              | 12 ++++++++----
 3 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.11.3.ebuild b/app-emulation/xen-tools/xen-tools-4.11.3-r1.ebuild
similarity index 98%
rename from app-emulation/xen-tools/xen-tools-4.11.3.ebuild
rename to app-emulation/xen-tools/xen-tools-4.11.3-r1.ebuild
index a089de2905e..72913356f07 100644
--- a/app-emulation/xen-tools/xen-tools-4.11.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.11.3-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -81,11 +81,13 @@ COMMON_DEPEND="
 
 DEPEND="${COMMON_DEPEND}
 	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
+		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
+	')
 	x86? ( sys-devel/dev86
 		sys-firmware/ipxe[qemu]
 		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
 	api? ( dev-libs/libxml2
 		net-misc/curl )
 	ovmf? (
@@ -103,7 +105,9 @@ DEPEND="${COMMON_DEPEND}
 	doc? (
 		app-text/ghostscript-gpl
 		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
+		')
 		dev-texlive/texlive-latexextra
 		media-gfx/transfig
 	)

diff --git a/app-emulation/xen-tools/xen-tools-4.12.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.12.1-r2.ebuild
similarity index 98%
rename from app-emulation/xen-tools/xen-tools-4.12.1-r1.ebuild
rename to app-emulation/xen-tools/xen-tools-4.12.1-r2.ebuild
index 83c7552e06e..86248c171f5 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.1-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -87,11 +87,13 @@ COMMON_DEPEND="
 
 DEPEND="${COMMON_DEPEND}
 	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
+		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
+	')
 	x86? ( sys-devel/dev86
 		system-ipxe? ( sys-firmware/ipxe[qemu] )
 		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
 	api? ( dev-libs/libxml2
 		net-misc/curl )
 	ovmf? (
@@ -108,7 +110,9 @@ DEPEND="${COMMON_DEPEND}
 	doc? (
 		app-text/ghostscript-gpl
 		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
+		')
 		dev-texlive/texlive-latexextra
 		media-gfx/transfig
 	)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.0.ebuild b/app-emulation/xen-tools/xen-tools-4.13.0.ebuild
index 0b4a116929c..47d3fb3608e 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.0.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -91,11 +91,13 @@ COMMON_DEPEND="
 
 DEPEND="${COMMON_DEPEND}
 	>=sys-kernel/linux-headers-4.11
-	dev-python/lxml[${PYTHON_USEDEP}]
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
+		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
+	')
 	x86? ( sys-devel/dev86
 		system-ipxe? ( sys-firmware/ipxe[qemu] )
 		sys-power/iasl )
-	pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
 	api? ( dev-libs/libxml2
 		net-misc/curl )
 
@@ -113,7 +115,9 @@ DEPEND="${COMMON_DEPEND}
 	doc? (
 		app-text/ghostscript-gpl
 		app-text/pandoc
-		dev-python/markdown[${PYTHON_USEDEP}]
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
+		')
 		dev-texlive/texlive-latexextra
 		media-gfx/transfig
 	)


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-02-29 14:44 Mikle Kolyada
  0 siblings, 0 replies; 295+ messages in thread
From: Mikle Kolyada @ 2020-02-29 14:44 UTC (permalink / raw
  To: gentoo-commits

commit:     2051862c9aa64cd375ff70ba8d0de2271891f71f
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 29 14:41:08 2020 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Sat Feb 29 14:43:55 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2051862c

app-emulation/xen-tools: Drop pam use description

Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 app-emulation/xen-tools/metadata.xml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
index 0e42a47368f..dd590bd080f 100644
--- a/app-emulation/xen-tools/metadata.xml
+++ b/app-emulation/xen-tools/metadata.xml
@@ -20,7 +20,6 @@
 		<flag name="ipxe">Enable ipxe support</flag>
 		<flag name="ocaml">Enable support for the ocaml language</flag>
 		<flag name="ovmf">Enable support to boot UEFI guest vm, needed by hvm</flag>
-		<flag name="pam">Enable pam support</flag>
 		<flag name="pygrub">Install the pygrub boot loader</flag>
 		<flag name="qemu">Enable IOEMU support via the use of qemu-dm</flag>
 		<flag name="qemu-traditional">Build the old qemu traditional device model (useful only if you cannot change to the new device model e.g. Windows VMs)</flag>


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-03-01 23:59 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2020-03-01 23:59 UTC (permalink / raw
  To: gentoo-commits

commit:     f2968e3cb149ce916cea00b4dea94b933916c447
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Feb 19 05:15:13 2020 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Sun Mar  1 23:56:46 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2968e3c

app-emulation/xen-tools: add upstream patches

Closes: https://bugs.gentoo.org/703476
Closes: https://github.com/gentoo/gentoo/pull/14094
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                                   | 1 +
 .../{xen-tools-4.13.0.ebuild => xen-tools-4.13.0-r1.ebuild}        | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 29dd314e587..e3ddaed5155 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -11,6 +11,7 @@ DIST xen-4.11.3-upstream-patches-0.tar.xz 3692 BLAKE2B f1fb200020b6e8767cb4b900e
 DIST xen-4.11.3.tar.gz 25180826 BLAKE2B 56041bcef9adec754ee21032cf849745c6011224463f73b763ea186b37460f8456cb1f10614cb51ee4d2d77f03cba311f025e8999687888d15ac59cc122cd172 SHA512 2204e490e9fc357a05983a9bf4e7345e1d364fe00400ce473988dcb9ca7d4e2b921fe10f095cbbc64248130a92d22c6f0d154dcae250a57a7f915df32e3dc436
 DIST xen-4.12.2-upstream-patches-0.tar.xz 3976 BLAKE2B 4527b5699b13e1b5bed9b82b67c7a3ddfbe39dc69f63b3bb1fda81cb315c6d78a34441219b8d4ae3d95ae2bc52ef0779410b65813212fa07867061fcb2b599ac SHA512 462de147b0474ca8e051219b41b088f25eb4be3962cde399403be5fbcfd4747054f84bf8c732ba8d86c1ba1980c518b67cd8e4f342e4120dd8bf6594d185a92e
 DIST xen-4.12.2.tar.gz 26985135 BLAKE2B 530821011a6dd0ac0a99fb135ff5311eb8e975c3791818093b5e250eed7854d153de6d4340197f9b949c0ad2c3d7b2b7180deb42bc71748ff70ff6fad195269d SHA512 7d9e7921271830c9eadf1bb8eca1aec20d343ad7475b0dc3165ef6d681759e7cb70739f8d9f85622a23aef960988820e822267fb198b12ee3dd657ad6164069f
+DIST xen-4.13.0-upstream-patches-0.tar.xz 11156 BLAKE2B e704a3fc1a9213a79208cf60b9972f5480214c0f050fce15245e225b67a34f90ca46e77a74c286d7aef90718295ec6968c2671b72f1994a4372bc191681d38f8 SHA512 594194021d0786016e8e214d477892c1ea721e1964729a15ab6928c3cb14b986cbc628d1522ccbf9d53fe568f680acb056d2ff2a37e64261d183589accea4983
 DIST xen-4.13.0.tar.gz 39005191 BLAKE2B cd85bfe549e20447afb8ec6b2ab33ea1893f45392c08737730d7898706748ebb96b2e842b2ff3e4af8c5d8a705e6d25a2bfb8acf0d7cc771805d0cc97757a949 SHA512 5b2ded9a2fe3f7ddf40eed1fa9858baead06233a01eb6099cc45b3c78b6c3823acfe7b731910733e87125dfa49d08c53f74c215fb1b320a92b44b87a0a105225
 DIST xen-gentoo-patches-18.tar.xz 16840 BLAKE2B 7243b363c78250ae1928d75813cfd6035a87ca03f1605cbe02233e009a19105a0712711d622eef8606f3e7e1a5db5203342e56a1b00496d5ce37ddc4ffb9e4ea SHA512 328d7b1a57ab6bf9c7200b934aeb241f6d4fecccc600130d1c80460540212eb658cb74ae0502c008e040fdb2d95db20c2a3d71a8e73fd1361070d70adeab6e30
 DIST xen-gentoo-patches-19.tar.xz 17460 BLAKE2B 6f25c4c9bb438ba0ceded75d04ba6c05ca74e6319d14cf744ea23ecbed2e8283c3c00275a4609b583402d352216520a10197fd4ab9e056eac1c841b0f79bc6b8 SHA512 586e88eea0f2dcc5bae0eb4691cc1d722a8b1a7ca849fd8992d72c0990b2832b3e78738c936e8e46bc9623aa1c8e8afa341a22608479629ea012474d5ff6b69a

diff --git a/app-emulation/xen-tools/xen-tools-4.13.0.ebuild b/app-emulation/xen-tools/xen-tools-4.13.0-r1.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.13.0.ebuild
rename to app-emulation/xen-tools/xen-tools-4.13.0-r1.ebuild
index 47d3fb3608e..2d8777128e7 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.0.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.0-r1.ebuild
@@ -17,7 +17,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
+	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball
 	GENTOO_VER=18
@@ -125,7 +125,10 @@ DEPEND="${COMMON_DEPEND}
 	qemu? (
 		app-arch/snappy:=
 		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
 	)
 	system-qemu? ( app-emulation/qemu[xen] )
 	ocaml? ( dev-ml/findlib


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-03-12 16:21 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2020-03-12 16:21 UTC (permalink / raw
  To: gentoo-commits

commit:     34e89514f50715c19dbe7abd27ea9b943d8cb913
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 12 16:21:18 2020 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Mar 12 16:21:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34e89514

app-emulation/xen-tools: amd64 stable wrt bug #712208

Package-Manager: Portage-2.3.89, Repoman-2.3.20
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild
index 065ff3b6173..d2331824ba3 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-03-12 16:26 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2020-03-12 16:26 UTC (permalink / raw
  To: gentoo-commits

commit:     359a00e6c822c5b286d7b45e0e21856bc1100660
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 12 16:26:12 2020 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Thu Mar 12 16:26:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=359a00e6

app-emulation/xen-tools: x86 stable wrt bug #712208

Package-Manager: Portage-2.3.89, Repoman-2.3.20
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild
index d2331824ba3..13c5867def9 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.2-r1.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-03-13 15:10 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2020-03-13 15:10 UTC (permalink / raw
  To: gentoo-commits

commit:     c245bbb3f304bdd05a91357869b5ef5c8803846c
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 13 15:06:15 2020 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Mar 13 15:08:27 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c245bbb3

app-emulation/xen-tools: drop old vulnerable version

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   4 -
 app-emulation/xen-tools/xen-tools-4.11.3-r1.ebuild | 464 ---------------------
 2 files changed, 468 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 4036c50a647..33a75f083db 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,12 +6,8 @@ DIST ipxe-git-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz 3810726 BLAKE2B b9
 DIST ipxe-git-d2063b7693e0e35db97b2264aa987eb6341ae779.tar.gz 3792227 BLAKE2B 720ac29ab3187d7abaec33823dda967caab7eea9631123a7619d2f83d3ad6c7bb47db01665a4c54548fe367866606936d36690a06ecf42323b9bd0ef00e41569 SHA512 2b4ae8e65cd678dbb376f24001294eb54aead8d66456e06fc270dec178d90b282c1eb19731234d8b458054e49c5b8b8c4a89345c63ed0a4dafaf205e642b00b7
 DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27
 DIST seabios-1.12.1.tar.gz 613450 BLAKE2B cb926b650c41a9962db407945cb5b6558079b061bd61f32ea56aedf0d37a00d10ad4434acbe717ffbc0dd1d1c0767304af8e640a53b0fc3784969dfa1590f681 SHA512 58755ce842adcb99c0f2f3ebbf9ec6d4a5072753966ab46805a96db1570847b109a90e6e03d61f9088ef877ca8ba96a8006777dc38ec434fce6b487f6c1f91d0
-DIST seabios-rel-1.11.1.tar.gz 604125 BLAKE2B df2b7322f5169fb74e7f5dd3f680e7d8ad3e6f93e8b1376d15bbda8865458648a0d6086011a8a6549e7ad1794844878736441e70067580c0eb416e20ee038d95 SHA512 69622460475b54ba77a10509dae0ef46d9c733c6c8527ab56a4f2298534dcf1f7722eb501df873ab612222e5867e334c2831cc4c95dd23771aee10740acf0273
-DIST xen-4.11.3-upstream-patches-0.tar.xz 3692 BLAKE2B f1fb200020b6e8767cb4b900e3468edbebbd61c8147a13d2102e425f8c5f0016b95a1f51fb26bd3560c97b73bbd2935d117ce08f92744fd02a97658cd0168ff8 SHA512 ebb64219b62e418276056eae6c47561366c0a22afaa8750a56a252e84b84c4644189a22788cf176d7d2ca5ceb84d307afa884f373f54db693f0182d951353ab2
-DIST xen-4.11.3.tar.gz 25180826 BLAKE2B 56041bcef9adec754ee21032cf849745c6011224463f73b763ea186b37460f8456cb1f10614cb51ee4d2d77f03cba311f025e8999687888d15ac59cc122cd172 SHA512 2204e490e9fc357a05983a9bf4e7345e1d364fe00400ce473988dcb9ca7d4e2b921fe10f095cbbc64248130a92d22c6f0d154dcae250a57a7f915df32e3dc436
 DIST xen-4.12.2-upstream-patches-0.tar.xz 3976 BLAKE2B 4527b5699b13e1b5bed9b82b67c7a3ddfbe39dc69f63b3bb1fda81cb315c6d78a34441219b8d4ae3d95ae2bc52ef0779410b65813212fa07867061fcb2b599ac SHA512 462de147b0474ca8e051219b41b088f25eb4be3962cde399403be5fbcfd4747054f84bf8c732ba8d86c1ba1980c518b67cd8e4f342e4120dd8bf6594d185a92e
 DIST xen-4.12.2.tar.gz 26985135 BLAKE2B 530821011a6dd0ac0a99fb135ff5311eb8e975c3791818093b5e250eed7854d153de6d4340197f9b949c0ad2c3d7b2b7180deb42bc71748ff70ff6fad195269d SHA512 7d9e7921271830c9eadf1bb8eca1aec20d343ad7475b0dc3165ef6d681759e7cb70739f8d9f85622a23aef960988820e822267fb198b12ee3dd657ad6164069f
 DIST xen-4.13.0-upstream-patches-0.tar.xz 11156 BLAKE2B e704a3fc1a9213a79208cf60b9972f5480214c0f050fce15245e225b67a34f90ca46e77a74c286d7aef90718295ec6968c2671b72f1994a4372bc191681d38f8 SHA512 594194021d0786016e8e214d477892c1ea721e1964729a15ab6928c3cb14b986cbc628d1522ccbf9d53fe568f680acb056d2ff2a37e64261d183589accea4983
 DIST xen-4.13.0.tar.gz 39005191 BLAKE2B cd85bfe549e20447afb8ec6b2ab33ea1893f45392c08737730d7898706748ebb96b2e842b2ff3e4af8c5d8a705e6d25a2bfb8acf0d7cc771805d0cc97757a949 SHA512 5b2ded9a2fe3f7ddf40eed1fa9858baead06233a01eb6099cc45b3c78b6c3823acfe7b731910733e87125dfa49d08c53f74c215fb1b320a92b44b87a0a105225
-DIST xen-gentoo-patches-19.tar.xz 17460 BLAKE2B 6f25c4c9bb438ba0ceded75d04ba6c05ca74e6319d14cf744ea23ecbed2e8283c3c00275a4609b583402d352216520a10197fd4ab9e056eac1c841b0f79bc6b8 SHA512 586e88eea0f2dcc5bae0eb4691cc1d722a8b1a7ca849fd8992d72c0990b2832b3e78738c936e8e46bc9623aa1c8e8afa341a22608479629ea012474d5ff6b69a
 DIST xen-gentoo-patches-20.tar.xz 17376 BLAKE2B 909795f611a089ab1eee86db5f034cec963c831873b3088f0682cdb7ec5284e75a4d49a5a1c93ee7a7e7ba3a899648b38928a1c7b726e019c2a90b66e31fee4a SHA512 d06b846ccb8c488f7155437cdf220533fc2d23ad13b0a2bd4d69d68938c4858fdb961c9e59f57c5228368b4e60dbbdf81ec15b77ecb0639bbf475333f8bf4b97

diff --git a/app-emulation/xen-tools/xen-tools-4.11.3-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.11.3-r1.ebuild
deleted file mode 100644
index 72913356f07..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.11.3-r1.ebuild
+++ /dev/null
@@ -1,464 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=19
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER=1.11.1
-	EDK2_COMMIT=ef529e6ab7c31290a33045bb1f1837447cc0eb56
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://git.seabios.org/cgit/seabios.git/snapshot/seabios-rel-${SEABIOS_VER}.tar.gz
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README docs/README.xen-bugtool )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc flask +hvm ocaml ovmf +pam pygrub python +qemu +qemu-traditional screen sdl static-libs system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ovmf? ( hvm )
-	pygrub? ( python )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		sys-firmware/ipxe[qemu]
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-devel/bin86
-		sys-devel/dev86
-		sys-firmware/ipxe[qemu]
-		sys-power/iasl
-		system-seabios? ( sys-firmware/seabios ) )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? ( media-libs/libsdl[X] )
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable pam) \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}/tmp" || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-04-30 14:46 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2020-04-30 14:46 UTC (permalink / raw
  To: gentoo-commits

commit:     e3c13ed8b725f306c5ea2a015e39593f74d4db3a
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue Apr 28 11:48:33 2020 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Apr 30 14:42:34 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3c13ed8

app-emulation/xen-tools: add python3.{7,8} support

Closes: https://github.com/gentoo/gentoo/pull/15554
Bug: https://bugs.gentoo.org/718216
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.0-r2.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.0-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.13.0-r2.ebuild
index 2da36941e35..3643831cebe 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.0-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.0-r2.ebuild
@@ -3,8 +3,8 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_6 )
-PYTHON_REQ_USE='ncurses,xml,threads'
+PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
 
 inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-06-11  9:54 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2020-06-11  9:54 UTC (permalink / raw
  To: gentoo-commits

commit:     5586ee32df49fe1150b7c73b0bb79ec5e162f8df
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Jun 10 11:53:44 2020 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Jun 11 09:53:54 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5586ee32

app-emulation/xen-tools: add security patches XSA-320 / CVE-2020-0543

Closes: https://github.com/gentoo/gentoo/pull/16163
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                                        | 2 ++
 .../xen-tools/{xen-tools-4.12.3.ebuild => xen-tools-4.12.3-r1.ebuild}   | 2 +-
 .../xen-tools/{xen-tools-4.13.1.ebuild => xen-tools-4.13.1-r1.ebuild}   | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index c5b611426ca..6bbfb5aca01 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -8,7 +8,9 @@ DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96e
 DIST seabios-1.12.1.tar.gz 613450 BLAKE2B cb926b650c41a9962db407945cb5b6558079b061bd61f32ea56aedf0d37a00d10ad4434acbe717ffbc0dd1d1c0767304af8e640a53b0fc3784969dfa1590f681 SHA512 58755ce842adcb99c0f2f3ebbf9ec6d4a5072753966ab46805a96db1570847b109a90e6e03d61f9088ef877ca8ba96a8006777dc38ec434fce6b487f6c1f91d0
 DIST xen-4.12.2-upstream-patches-0.tar.xz 3976 BLAKE2B 4527b5699b13e1b5bed9b82b67c7a3ddfbe39dc69f63b3bb1fda81cb315c6d78a34441219b8d4ae3d95ae2bc52ef0779410b65813212fa07867061fcb2b599ac SHA512 462de147b0474ca8e051219b41b088f25eb4be3962cde399403be5fbcfd4747054f84bf8c732ba8d86c1ba1980c518b67cd8e4f342e4120dd8bf6594d185a92e
 DIST xen-4.12.2.tar.gz 26985135 BLAKE2B 530821011a6dd0ac0a99fb135ff5311eb8e975c3791818093b5e250eed7854d153de6d4340197f9b949c0ad2c3d7b2b7180deb42bc71748ff70ff6fad195269d SHA512 7d9e7921271830c9eadf1bb8eca1aec20d343ad7475b0dc3165ef6d681759e7cb70739f8d9f85622a23aef960988820e822267fb198b12ee3dd657ad6164069f
+DIST xen-4.12.3-upstream-patches-0.tar.xz 7236 BLAKE2B d795e2be6f1edb31f1d794912328c4d3673eb800464d99c5ae867d189d0ea2b4cbac0c8bcda7790ae40742f6bf79308eb624b4f67d1c7f12cc64be6d8c920b84 SHA512 de5723d4fd547845ca9a876f8535e720f7bd790e48dbf1d92397d60a285ef88a31cad276b1a01a4fa8946cefb15d69c8a3a00da5113b6e5e2655b871be076adf
 DIST xen-4.12.3.tar.gz 26985230 BLAKE2B 403de519a552f1cd49e5a85b63f48df1b7a47ff8381385860b67df32af0b33be1c13c92ca2234e4479b7f415e711e0f46c396c3f62dfb5b2465d2991723cf6ef SHA512 7bbf4e752477f18143ac9a62fb633b1fbe115a1a9b03d0132f33dfca025bc9b76d9c2e9b66a3e407d14aff161b940b1a82e3e3ca43213798e9dd38b6970194e0
+DIST xen-4.13.1-upstream-patches-0.tar.xz 7156 BLAKE2B 246b30cd8bc0ee8853a4e85ae0140d0ae52e69f3e4220bd97af8564491cf8285a7a592cd1392467a30acf6947733c8af355c110a44cb565927fb4f0bb7867113 SHA512 9059de696cb984c1891b5a87d1832562aa34b6568a21867c6744b603180f2b628905c81031f3c7c24867122d07432906750e0cfc6ca2fdacd31b82d35488455f
 DIST xen-4.13.1.tar.gz 39024612 BLAKE2B efff138699fac2c14fad2e0dfd4535ebd744577df3dddccc2a589b81a76f24fc81c75e295f4cd33ca2e820929417b22d714504b576cb0737a563037bd56b6a95 SHA512 b56d20704155d98d803496cba83eb928e0f986a750831cd5600fc88d0ae772fe1456571654375054043d2da8daca255cc98385ebf08b1b1a75ecf7f4b7a0ee90
 DIST xen-gentoo-patches-20.tar.xz 17376 BLAKE2B 909795f611a089ab1eee86db5f034cec963c831873b3088f0682cdb7ec5284e75a4d49a5a1c93ee7a7e7ba3a899648b38928a1c7b726e019c2a90b66e31fee4a SHA512 d06b846ccb8c488f7155437cdf220533fc2d23ad13b0a2bd4d69d68938c4858fdb961c9e59f57c5228368b4e60dbbdf81ec15b77ecb0639bbf475333f8bf4b97
 DIST xen-gentoo-patches-21.tar.xz 18280 BLAKE2B 95446da72fc16cb82e4e51df8796c64db05a30894a351a98dbd6700ce354c34956ca09a1af98125a4e56c337936e8fae296d806519b8afa23a82b078aa0db8f1 SHA512 3cffac162606a09b10b47dca604f167897e6ac8d153411d3464ef29a7a4d46ac5b92340884cb21279cb2d053b131f1ea5cb2111e3e9a21b3298b5ab3320ee34d

diff --git a/app-emulation/xen-tools/xen-tools-4.12.3.ebuild b/app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.12.3.ebuild
rename to app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild
index 0ce6e2b9c13..b84dec279ce 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild
@@ -17,7 +17,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
+	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball
 	GENTOO_VER=21

diff --git a/app-emulation/xen-tools/xen-tools-4.13.1.ebuild b/app-emulation/xen-tools/xen-tools-4.13.1-r1.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.13.1.ebuild
rename to app-emulation/xen-tools/xen-tools-4.13.1-r1.ebuild
index 74f229da76f..0d79a70f529 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.1-r1.ebuild
@@ -17,7 +17,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
+	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball
 	GENTOO_VER=21


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-06-12  7:51 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2020-06-12  7:51 UTC (permalink / raw
  To: gentoo-commits

commit:     82b1a02ed0f2a54bb9f7534a59edf3d6a9138e0f
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 12 07:51:06 2020 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Jun 12 07:51:06 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82b1a02e

app-emulation/xen-tools: amd64 stable wrt bug #727904

Package-Manager: Portage-2.3.99, Repoman-2.3.22
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild
index b84dec279ce..31f77a142ba 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-06-12  7:55 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2020-06-12  7:55 UTC (permalink / raw
  To: gentoo-commits

commit:     88ca1b96a7a819d97cc7df5fd588f52139a26eb5
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 12 07:55:34 2020 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Jun 12 07:55:34 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88ca1b96

app-emulation/xen-tools: x86 stable wrt bug #727904

Package-Manager: Portage-2.3.99, Repoman-2.3.22
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild
index 31f77a142ba..7fdf0386744 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-07-09 13:47 Yixun Lan
  0 siblings, 0 replies; 295+ messages in thread
From: Yixun Lan @ 2020-07-09 13:47 UTC (permalink / raw
  To: gentoo-commits

commit:     9bef3fea65ada379ef861c573c886f9c2e23761b
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Jul  8 08:33:45 2020 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Jul  9 13:45:14 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bef3fea

app-emulation/xen-tools: add security patches

Bug: https://bugs.gentoo.org/731658
Closes: https://github.com/gentoo/gentoo/pull/16637
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 +
 app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild | 500 ++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.13.1-r2.ebuild | 505 +++++++++++++++++++++
 3 files changed, 1007 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index ad90d77923b..64ba495296e 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -10,8 +10,10 @@ DIST seabios-1.13.0.tar.gz 620952 BLAKE2B 460a7dd2b2775b981bbd890ed0a50fe905794c
 DIST xen-4.12.2-upstream-patches-0.tar.xz 3976 BLAKE2B 4527b5699b13e1b5bed9b82b67c7a3ddfbe39dc69f63b3bb1fda81cb315c6d78a34441219b8d4ae3d95ae2bc52ef0779410b65813212fa07867061fcb2b599ac SHA512 462de147b0474ca8e051219b41b088f25eb4be3962cde399403be5fbcfd4747054f84bf8c732ba8d86c1ba1980c518b67cd8e4f342e4120dd8bf6594d185a92e
 DIST xen-4.12.2.tar.gz 26985135 BLAKE2B 530821011a6dd0ac0a99fb135ff5311eb8e975c3791818093b5e250eed7854d153de6d4340197f9b949c0ad2c3d7b2b7180deb42bc71748ff70ff6fad195269d SHA512 7d9e7921271830c9eadf1bb8eca1aec20d343ad7475b0dc3165ef6d681759e7cb70739f8d9f85622a23aef960988820e822267fb198b12ee3dd657ad6164069f
 DIST xen-4.12.3-upstream-patches-0.tar.xz 7236 BLAKE2B d795e2be6f1edb31f1d794912328c4d3673eb800464d99c5ae867d189d0ea2b4cbac0c8bcda7790ae40742f6bf79308eb624b4f67d1c7f12cc64be6d8c920b84 SHA512 de5723d4fd547845ca9a876f8535e720f7bd790e48dbf1d92397d60a285ef88a31cad276b1a01a4fa8946cefb15d69c8a3a00da5113b6e5e2655b871be076adf
+DIST xen-4.12.3-upstream-patches-1.tar.xz 39052 BLAKE2B dbe18a8d67009be9597ea8f0cd45850ed0e437119095c414796efff2810e884a3d7c062a7e5e12e93d8991cbbab50c0095d7ae1c937129f8f9490aa5f31ca6f8 SHA512 1383b1c0e3d4918b6b43c9cdff5284e259385136aad479814ea1d50b25017a0466a6a0044321585f38f4c8fb30f5af91a45f666a6d7fce6e60a4dfdb346a421b
 DIST xen-4.12.3.tar.gz 26985230 BLAKE2B 403de519a552f1cd49e5a85b63f48df1b7a47ff8381385860b67df32af0b33be1c13c92ca2234e4479b7f415e711e0f46c396c3f62dfb5b2465d2991723cf6ef SHA512 7bbf4e752477f18143ac9a62fb633b1fbe115a1a9b03d0132f33dfca025bc9b76d9c2e9b66a3e407d14aff161b940b1a82e3e3ca43213798e9dd38b6970194e0
 DIST xen-4.13.1-upstream-patches-0.tar.xz 7156 BLAKE2B 246b30cd8bc0ee8853a4e85ae0140d0ae52e69f3e4220bd97af8564491cf8285a7a592cd1392467a30acf6947733c8af355c110a44cb565927fb4f0bb7867113 SHA512 9059de696cb984c1891b5a87d1832562aa34b6568a21867c6744b603180f2b628905c81031f3c7c24867122d07432906750e0cfc6ca2fdacd31b82d35488455f
+DIST xen-4.13.1-upstream-patches-1.tar.xz 46892 BLAKE2B 8ccfe1d6b3589e262fa04526d5238694e324fef3b514daebdffcb74cecfc2700e37f810faf868ec198c99ed3a9af2c351656c31798c5791bfd6816552d78fd7a SHA512 2d9708c4b558c5986afd1caea56f69ac8b11d69371fd4afae0e9c3480a0b863c99ebe2d3b857d623d41924437db7f7e44fefc7bae892cd05d7605243ae8140d5
 DIST xen-4.13.1.tar.gz 39024612 BLAKE2B efff138699fac2c14fad2e0dfd4535ebd744577df3dddccc2a589b81a76f24fc81c75e295f4cd33ca2e820929417b22d714504b576cb0737a563037bd56b6a95 SHA512 b56d20704155d98d803496cba83eb928e0f986a750831cd5600fc88d0ae772fe1456571654375054043d2da8daca255cc98385ebf08b1b1a75ecf7f4b7a0ee90
 DIST xen-4.14.0-rc3.tar.gz 39943460 BLAKE2B 12356947738cfc7b43d0fa1bcbc8912f87fa5f0368b02b2bd8cc1d2681edc2f26d8edce50991e5fab65aa40f32ce263a2ded80f8ae827f182ea5a0f63274ddc2 SHA512 c6771003f2f66334c9181faeb01cb3283fcbfda78064cfde3a14ae9dca2454c35766d78df23dc480a9daba1edb7fd31db9ebfc3a4f57dd2b07852dd486e859ed
 DIST xen-gentoo-patches-20.tar.xz 17376 BLAKE2B 909795f611a089ab1eee86db5f034cec963c831873b3088f0682cdb7ec5284e75a4d49a5a1c93ee7a7e7ba3a899648b38928a1c7b726e019c2a90b66e31fee4a SHA512 d06b846ccb8c488f7155437cdf220533fc2d23ad13b0a2bd4d69d68938c4858fdb961c9e59f57c5228368b4e60dbbdf81ec15b77ecb0639bbf475333f8bf4b97

diff --git a/app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild
new file mode 100644
index 00000000000..b7a05e003bc
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild
@@ -0,0 +1,500 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=1
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=21
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=
+
+	SEABIOS_VER=1.12.0
+	EDK2_COMMIT=ef529e6ab7c31290a33045bb1f1837447cc0eb56
+	IPXE_COMMIT=d2063b7693e0e35db97b2264aa987eb6341ae779
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-4.11
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
+		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )
+	python? ( dev-lang/swig )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/edk2-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
+
+		# gcc 9
+		cp "${WORKDIR}/patches-gentoo/${PN}-4.12.0-ipxe-gcc9.patch" \
+			tools/firmware/etherboot/patches/ipxe-gcc9.patch || die
+		echo "ipxe-gcc9.patch" >> tools/firmware/etherboot/patches/series || die
+
+		# gcc 10
+		cp "${WORKDIR}/patches-gentoo/xen-tools-4.13.0-ipxe-gcc10.patch" \
+			tools/firmware/etherboot/patches/ipxe-gcc10.patch || die
+		echo ipxe-gcc10.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable api xenapi) \
+		$(use_enable ipxe) \
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
+		$(use_enable ocaml ocamltools) \
+		$(use_enable ovmf) \
+		$(use_enable pam) \
+		$(use_enable rombios) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.13.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.13.1-r2.ebuild
new file mode 100644
index 00000000000..e47034afe45
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.13.1-r2.ebuild
@@ -0,0 +1,505 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=1
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=21
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=
+
+	SEABIOS_VER="1.12.1"
+	EDK2_COMMIT="20d2e5a125e34fc8501026613a71549b2a1a3e54"
+	EDK2_OPENSSL_VERSION="1_1_1b"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	IPXE_COMMIT="1dd56dbd11082fb622c2ed21cfaced4f47d798a6"
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	https://github.com/qemu/seabios/archive/rel-${SEABIOS_VER}.tar.gz -> seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-4.11
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
+		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/edk2-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
+
+		# gcc 10
+		cp "${WORKDIR}/patches-gentoo/xen-tools-4.13.0-ipxe-gcc10.patch" tools/firmware/etherboot/patches/ipxe-gcc10.patch || die
+		echo ipxe-gcc10.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable api xenapi) \
+		$(use_enable ipxe) \
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
+		$(use_enable ocaml ocamltools) \
+		$(use_enable ovmf) \
+		$(use_enable pam) \
+		$(use_enable rombios) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-07-17  7:21 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2020-07-17  7:21 UTC (permalink / raw
  To: gentoo-commits

commit:     53d69ee0d182759ad5e7d4ca6ce180a14220509b
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 17 07:19:07 2020 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Jul 17 07:19:07 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53d69ee0

app-emulation/xen-tools: amd64 stable wrt bug #731658

Package-Manager: Portage-2.3.99, Repoman-2.3.22
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild
index b7a05e003bc..297dd7d0bc5 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-07-17  7:44 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2020-07-17  7:44 UTC (permalink / raw
  To: gentoo-commits

commit:     7ddd345f525941f959643d600c14b7f3de234728
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 17 07:42:52 2020 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Jul 17 07:42:52 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ddd345f

app-emulation/xen-tools: x86 stable wrt bug #731658

Package-Manager: Portage-2.3.99, Repoman-2.3.22
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild
index 297dd7d0bc5..7cf2012da51 100644
--- a/app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.3-r2.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-07-26 16:22 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2020-07-26 16:22 UTC (permalink / raw
  To: gentoo-commits

commit:     db898ef93ef7b61ff52da93aa04a7e9bbddaec45
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Jul 24 15:51:31 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Jul 26 16:22:19 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db898ef9

app-emulation/xen-tools: drop old

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16801
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   1 -
 app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild | 500 ---------------------
 2 files changed, 501 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 80a0134ce8e..ae0221770b6 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -7,7 +7,6 @@ DIST ipxe-git-d2063b7693e0e35db97b2264aa987eb6341ae779.tar.gz 3792227 BLAKE2B 72
 DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27
 DIST seabios-1.12.1.tar.gz 613450 BLAKE2B cb926b650c41a9962db407945cb5b6558079b061bd61f32ea56aedf0d37a00d10ad4434acbe717ffbc0dd1d1c0767304af8e640a53b0fc3784969dfa1590f681 SHA512 58755ce842adcb99c0f2f3ebbf9ec6d4a5072753966ab46805a96db1570847b109a90e6e03d61f9088ef877ca8ba96a8006777dc38ec434fce6b487f6c1f91d0
 DIST seabios-1.13.0.tar.gz 620952 BLAKE2B 460a7dd2b2775b981bbd890ed0a50fe905794c68b0b895799667dd1378bb84125712330c2f6945112709d42cfb7b01196c7fff99051e44b6211d47d19531cfae SHA512 7f158badf7deecc2998eab2a08f3615dfe5a7c0a51323f7b4568a4d1280935bc32bb466c8226d87d2ca7e13f9f117ff0092befcc0699bc31c5018e84754e8393
-DIST xen-4.12.3-upstream-patches-0.tar.xz 7236 BLAKE2B d795e2be6f1edb31f1d794912328c4d3673eb800464d99c5ae867d189d0ea2b4cbac0c8bcda7790ae40742f6bf79308eb624b4f67d1c7f12cc64be6d8c920b84 SHA512 de5723d4fd547845ca9a876f8535e720f7bd790e48dbf1d92397d60a285ef88a31cad276b1a01a4fa8946cefb15d69c8a3a00da5113b6e5e2655b871be076adf
 DIST xen-4.12.3-upstream-patches-1.tar.xz 39052 BLAKE2B dbe18a8d67009be9597ea8f0cd45850ed0e437119095c414796efff2810e884a3d7c062a7e5e12e93d8991cbbab50c0095d7ae1c937129f8f9490aa5f31ca6f8 SHA512 1383b1c0e3d4918b6b43c9cdff5284e259385136aad479814ea1d50b25017a0466a6a0044321585f38f4c8fb30f5af91a45f666a6d7fce6e60a4dfdb346a421b
 DIST xen-4.12.3.tar.gz 26985230 BLAKE2B 403de519a552f1cd49e5a85b63f48df1b7a47ff8381385860b67df32af0b33be1c13c92ca2234e4479b7f415e711e0f46c396c3f62dfb5b2465d2991723cf6ef SHA512 7bbf4e752477f18143ac9a62fb633b1fbe115a1a9b03d0132f33dfca025bc9b76d9c2e9b66a3e407d14aff161b940b1a82e3e3ca43213798e9dd38b6970194e0
 DIST xen-4.13.1-upstream-patches-1.tar.xz 46892 BLAKE2B 8ccfe1d6b3589e262fa04526d5238694e324fef3b514daebdffcb74cecfc2700e37f810faf868ec198c99ed3a9af2c351656c31798c5791bfd6816552d78fd7a SHA512 2d9708c4b558c5986afd1caea56f69ac8b11d69371fd4afae0e9c3480a0b863c99ebe2d3b857d623d41924437db7f7e44fefc7bae892cd05d7605243ae8140d5

diff --git a/app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild
deleted file mode 100644
index 7fdf0386744..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.12.3-r1.ebuild
+++ /dev/null
@@ -1,500 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE='ncurses,xml,threads'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=21
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER=1.12.0
-	EDK2_COMMIT=ef529e6ab7c31290a33045bb1f1837447cc0eb56
-	IPXE_COMMIT=d2063b7693e0e35db97b2264aa987eb6341ae779
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )
-	python? ( dev-lang/swig )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
-
-		# gcc 9
-		cp "${WORKDIR}/patches-gentoo/${PN}-4.12.0-ipxe-gcc9.patch" \
-			tools/firmware/etherboot/patches/ipxe-gcc9.patch || die
-		echo "ipxe-gcc9.patch" >> tools/firmware/etherboot/patches/series || die
-
-		# gcc 10
-		cp "${WORKDIR}/patches-gentoo/xen-tools-4.13.0-ipxe-gcc10.patch" \
-			tools/firmware/etherboot/patches/ipxe-gcc10.patch || die
-		echo ipxe-gcc10.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-09-12 18:39 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2020-09-12 18:39 UTC (permalink / raw
  To: gentoo-commits

commit:     c8e9934490fa854d278ff7f97d5308aeeb30b391
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Sep  2 10:56:35 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Sep 12 18:32:15 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8e99344

app-emulation/xen-tools: add upstream and security patches

Bug: https://bugs.gentoo.org/738040
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |  5 ++-
 ...4.13.1-r2.ebuild => xen-tools-4.12.3-r3.ebuild} | 42 ++++++++++------------
 ...4.13.1-r2.ebuild => xen-tools-4.13.1-r3.ebuild} |  7 ++--
 ...ls-4.14.0.ebuild => xen-tools-4.14.0-r1.ebuild} |  7 ++--
 4 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index ae0221770b6..f149a5865eb 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -8,9 +8,12 @@ DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96e
 DIST seabios-1.12.1.tar.gz 613450 BLAKE2B cb926b650c41a9962db407945cb5b6558079b061bd61f32ea56aedf0d37a00d10ad4434acbe717ffbc0dd1d1c0767304af8e640a53b0fc3784969dfa1590f681 SHA512 58755ce842adcb99c0f2f3ebbf9ec6d4a5072753966ab46805a96db1570847b109a90e6e03d61f9088ef877ca8ba96a8006777dc38ec434fce6b487f6c1f91d0
 DIST seabios-1.13.0.tar.gz 620952 BLAKE2B 460a7dd2b2775b981bbd890ed0a50fe905794c68b0b895799667dd1378bb84125712330c2f6945112709d42cfb7b01196c7fff99051e44b6211d47d19531cfae SHA512 7f158badf7deecc2998eab2a08f3615dfe5a7c0a51323f7b4568a4d1280935bc32bb466c8226d87d2ca7e13f9f117ff0092befcc0699bc31c5018e84754e8393
 DIST xen-4.12.3-upstream-patches-1.tar.xz 39052 BLAKE2B dbe18a8d67009be9597ea8f0cd45850ed0e437119095c414796efff2810e884a3d7c062a7e5e12e93d8991cbbab50c0095d7ae1c937129f8f9490aa5f31ca6f8 SHA512 1383b1c0e3d4918b6b43c9cdff5284e259385136aad479814ea1d50b25017a0466a6a0044321585f38f4c8fb30f5af91a45f666a6d7fce6e60a4dfdb346a421b
+DIST xen-4.12.3-upstream-patches-2.tar.xz 45272 BLAKE2B 0bdcd69a3c8832271d7e0491719feebed5330233303d9c5a78913bcc20e76a3c2b9c4f30f4e3d8c648f113df0157350709ad5939bf2ca53363eee7732ae8aacb SHA512 ac7fdb2a1d731ba2903ff31c9a3ae90506cdbc36289ef5c11254aa85f33a8d160d6d9136e37bbd526e88e881118b4ca8a594c2934561bda4afa0ff8cf99b54e1
 DIST xen-4.12.3.tar.gz 26985230 BLAKE2B 403de519a552f1cd49e5a85b63f48df1b7a47ff8381385860b67df32af0b33be1c13c92ca2234e4479b7f415e711e0f46c396c3f62dfb5b2465d2991723cf6ef SHA512 7bbf4e752477f18143ac9a62fb633b1fbe115a1a9b03d0132f33dfca025bc9b76d9c2e9b66a3e407d14aff161b940b1a82e3e3ca43213798e9dd38b6970194e0
-DIST xen-4.13.1-upstream-patches-1.tar.xz 46892 BLAKE2B 8ccfe1d6b3589e262fa04526d5238694e324fef3b514daebdffcb74cecfc2700e37f810faf868ec198c99ed3a9af2c351656c31798c5791bfd6816552d78fd7a SHA512 2d9708c4b558c5986afd1caea56f69ac8b11d69371fd4afae0e9c3480a0b863c99ebe2d3b857d623d41924437db7f7e44fefc7bae892cd05d7605243ae8140d5
+DIST xen-4.13.1-upstream-patches-2.tar.xz 53744 BLAKE2B 769b5b8022f7db66f677d8107c6473606376718bffeac7eba09c4270f4005811f472fb9ed2a2804260e0486228edbadfcf8f81bf1dae6d68df37da213d281390 SHA512 b07c865b96c6f48b9d0b4e4c2f3ec19f4dc44884f4024e440a3e537f594f9f5edd6edf805bdefc82e5f1f2520f35f940b64c158972cbf5bfdc8fb2ca7a1b0ac1
 DIST xen-4.13.1.tar.gz 39024612 BLAKE2B efff138699fac2c14fad2e0dfd4535ebd744577df3dddccc2a589b81a76f24fc81c75e295f4cd33ca2e820929417b22d714504b576cb0737a563037bd56b6a95 SHA512 b56d20704155d98d803496cba83eb928e0f986a750831cd5600fc88d0ae772fe1456571654375054043d2da8daca255cc98385ebf08b1b1a75ecf7f4b7a0ee90
+DIST xen-4.14.0-upstream-patches-0.tar.xz 6872 BLAKE2B 958ad668362c9c02af39f2a02cde2baa9b9fc8853116c390f43a77bb17c649bfc6a4b51db5cbe564a8c3c440ce736603e44b97f45c50a7836c9a43bfb0d2255a SHA512 a30d9708e64e1405f837b14c1e5a0e28fcb9e7a177c822570e25d0ed118a9c58c380f4ed64a40bf970a9389baf9848e52f7d161efe922b883ee990c8029e7e1f
 DIST xen-4.14.0.tar.gz 39950576 BLAKE2B db4c3e79cfdfb10260d0d14d9d28e8c8bd9bf23f42aee743acf8f560bf4cdb96a425c0df887c70f9755f62680be24bfbe0149e52a4cb843ae83090cd9d6afc71 SHA512 ebce47a2f754955d8517123d69f62006634d97620fbbe3784869a0667466e586a249f57ffaf7846d5bcb45d69377cde43354c82c233fbb5407e55653b9a33ac0
 DIST xen-gentoo-patches-21.tar.xz 18280 BLAKE2B 95446da72fc16cb82e4e51df8796c64db05a30894a351a98dbd6700ce354c34956ca09a1af98125a4e56c337936e8fae296d806519b8afa23a82b078aa0db8f1 SHA512 3cffac162606a09b10b47dca604f167897e6ac8d153411d3464ef29a7a4d46ac5b92340884cb21279cb2d053b131f1ea5cb2111e3e9a21b3298b5ab3320ee34d
 DIST xen-gentoo-patches-22.tar.xz 18764 BLAKE2B e0da49b39fbc6b689db47e40a4fbb4f6568644fe192b114cce01b0406cba4bf23339ad1bf39b972f895df004916827b6e774f97fc079aeb8ac436763efda5fc3 SHA512 5b7959af4ed30edd2526698ab60a86353e35d9dc48dc941b6df7659a7c4904260461e0decbd8d788542bd69384736f2175861d4943c3738618d20788b19ea9b1
+DIST xen-security-patches-28.tar.xz 1580 BLAKE2B c304894801b37259508582fc6947e26c0b8665e982d91de86c16efd5eaecd6c9bb19570534642d39e81175fe58baccf576990a481f40f8848692d3465ad17a85 SHA512 b442b5568e76e0f2a5cfc91063515b96347f8b30f6101a81536b78edecc400861fd99281e1994bc6626bff28ece3df8f8306575c8abbb2cddaf3a6d3542c0b2f

diff --git a/app-emulation/xen-tools/xen-tools-4.13.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.12.3-r3.ebuild
similarity index 91%
copy from app-emulation/xen-tools/xen-tools-4.13.1-r2.ebuild
copy to app-emulation/xen-tools/xen-tools-4.12.3-r3.ebuild
index e47034afe45..78129b81663 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.1-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.12.3-r3.ebuild
@@ -3,8 +3,8 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{6,7,8} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='ncurses,xml,threads'
 
 inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
 
@@ -17,8 +17,8 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=1
-	SECURITY_VER=
+	UPSTREAM_VER=2
+	SECURITY_VER=28
 	# xen-tools's gentoo patches tarball
 	GENTOO_VER=21
 	# xen-tools's gentoo patches version which apply to this specific ebuild
@@ -26,17 +26,16 @@ else
 	# xen-tools ovmf's patches
 	OVMF_VER=
 
-	SEABIOS_VER="1.12.1"
-	EDK2_COMMIT="20d2e5a125e34fc8501026613a71549b2a1a3e54"
-	EDK2_OPENSSL_VERSION="1_1_1b"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	IPXE_COMMIT="1dd56dbd11082fb622c2ed21cfaced4f47d798a6"
+	SEABIOS_VER=1.12.0
+	EDK2_COMMIT=ef529e6ab7c31290a33045bb1f1837447cc0eb56
+	IPXE_COMMIT=d2063b7693e0e35db97b2264aa987eb6341ae779
 
 	[[ -n ${UPSTREAM_VER} ]] && \
 		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
 		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
 	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
 	[[ -n ${GENTOO_VER} ]] && \
 		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
 		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
@@ -44,11 +43,9 @@ else
 		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
 
 	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://github.com/qemu/seabios/archive/rel-${SEABIOS_VER}.tar.gz -> seabios-${SEABIOS_VER}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
 	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
 	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
 		${OVMF_PATCHSET_URI} )
 	${UPSTREAM_PATCHSET_URI}
 	${SECURITY_PATCHSET_URI}
@@ -100,7 +97,6 @@ DEPEND="${COMMON_DEPEND}
 		sys-power/iasl )
 	api? ( dev-libs/libxml2
 		net-misc/curl )
-
 	ovmf? (
 		!arm? ( !arm64? ( dev-lang/nasm ) )
 		$(python_gen_impl_dep sqlite)
@@ -133,7 +129,7 @@ DEPEND="${COMMON_DEPEND}
 	system-qemu? ( app-emulation/qemu[xen] )
 	ocaml? ( dev-ml/findlib
 		>=dev-lang/ocaml-4 )
-	python? ( >=dev-lang/swig-4.0.0 )"
+	python? ( dev-lang/swig )"
 
 RDEPEND="${COMMON_DEPEND}
 	sys-apps/iproute2[-minimal]
@@ -153,10 +149,8 @@ QA_WX_LOAD="
 "
 
 QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
 	usr/libexec/xen/bin/ivshmem-client
 	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
 	usr/libexec/xen/bin/qemu-img
 	usr/libexec/xen/bin/qemu-io
 	usr/libexec/xen/bin/qemu-keymap
@@ -236,7 +230,7 @@ src_prepare() {
 	fi
 
 	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
 	pushd tools/firmware/ > /dev/null
 	ln -s seabios-dir-remote seabios-dir || die
 	popd > /dev/null
@@ -260,10 +254,6 @@ src_prepare() {
 			popd > /dev/null
 		fi
 		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
 		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
 	fi
 
@@ -271,8 +261,14 @@ src_prepare() {
 	if use ipxe; then
 		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
 
+		# gcc 9
+		cp "${WORKDIR}/patches-gentoo/${PN}-4.12.0-ipxe-gcc9.patch" \
+			tools/firmware/etherboot/patches/ipxe-gcc9.patch || die
+		echo "ipxe-gcc9.patch" >> tools/firmware/etherboot/patches/series || die
+
 		# gcc 10
-		cp "${WORKDIR}/patches-gentoo/xen-tools-4.13.0-ipxe-gcc10.patch" tools/firmware/etherboot/patches/ipxe-gcc10.patch || die
+		cp "${WORKDIR}/patches-gentoo/xen-tools-4.13.0-ipxe-gcc10.patch" \
+			tools/firmware/etherboot/patches/ipxe-gcc10.patch || die
 		echo ipxe-gcc10.patch >> tools/firmware/etherboot/patches/series || die
 	fi
 

diff --git a/app-emulation/xen-tools/xen-tools-4.13.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.13.1-r3.ebuild
similarity index 98%
rename from app-emulation/xen-tools/xen-tools-4.13.1-r2.ebuild
rename to app-emulation/xen-tools/xen-tools-4.13.1-r3.ebuild
index e47034afe45..c0e4d5d7a6e 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.1-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.1-r3.ebuild
@@ -17,8 +17,8 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=1
-	SECURITY_VER=
+	UPSTREAM_VER=2
+	SECURITY_VER=28
 	# xen-tools's gentoo patches tarball
 	GENTOO_VER=21
 	# xen-tools's gentoo patches version which apply to this specific ebuild
@@ -36,7 +36,8 @@ else
 		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
 		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
 	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
 	[[ -n ${GENTOO_VER} ]] && \
 		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
 		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"

diff --git a/app-emulation/xen-tools/xen-tools-4.14.0.ebuild b/app-emulation/xen-tools/xen-tools-4.14.0-r1.ebuild
similarity index 98%
rename from app-emulation/xen-tools/xen-tools-4.14.0.ebuild
rename to app-emulation/xen-tools/xen-tools-4.14.0-r1.ebuild
index 6446bb397cf..7cf7cb407e7 100644
--- a/app-emulation/xen-tools/xen-tools-4.14.0.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.14.0-r1.ebuild
@@ -17,8 +17,8 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
+	UPSTREAM_VER=0
+	SECURITY_VER=28
 	# xen-tools's gentoo patches tarball
 	GENTOO_VER=22
 	# xen-tools's gentoo patches version which apply to this specific ebuild
@@ -36,7 +36,8 @@ else
 		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
 		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
 	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
 	[[ -n ${GENTOO_VER} ]] && \
 		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
 		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-09-15 17:22 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2020-09-15 17:22 UTC (permalink / raw
  To: gentoo-commits

commit:     47df9a34ea13fdc84837ecdb110700ce462a6b78
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 15 17:22:28 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue Sep 15 17:22:43 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47df9a34

app-emulation/xen-tools: x86 stable (bug #738040)

Package-Manager: Portage-3.0.6, Repoman-3.0.1
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.1-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.1-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.13.1-r3.ebuild
index c0e4d5d7a6e..530eb19a142 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.1-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.1-r3.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=28
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-09-18 15:05 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2020-09-18 15:05 UTC (permalink / raw
  To: gentoo-commits

commit:     ace973723a8ee31865f5238bc1ddd7072ad6f615
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 18 15:05:04 2020 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Sep 18 15:05:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ace97372

app-emulation/xen-tools: amd64 stable wrt bug #738040

Package-Manager: Portage-2.3.103, Repoman-2.3.23
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.1-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.1-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.13.1-r3.ebuild
index 530eb19a142..939b9bae6f6 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.1-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.1-r3.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=28
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-09-29 20:01 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2020-09-29 20:01 UTC (permalink / raw
  To: gentoo-commits

commit:     624e7297911faa220e0657b95d92afa07e471d6b
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue Sep 22 20:02:30 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep 29 20:01:29 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=624e7297

app-emulation/xen-tools: add upstream and security patches, drop old

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                            |  3 ++-
 ...en-tools-4.14.0-r1.ebuild => xen-tools-4.13.1-r4.ebuild} | 13 ++++---------
 ...en-tools-4.14.0-r1.ebuild => xen-tools-4.14.0-r2.ebuild} |  2 +-
 3 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index d92f49c9655..d697a2518d4 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,8 +5,9 @@ DIST ipxe-git-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz 3810726 BLAKE2B b9
 DIST seabios-1.12.1.tar.gz 613450 BLAKE2B cb926b650c41a9962db407945cb5b6558079b061bd61f32ea56aedf0d37a00d10ad4434acbe717ffbc0dd1d1c0767304af8e640a53b0fc3784969dfa1590f681 SHA512 58755ce842adcb99c0f2f3ebbf9ec6d4a5072753966ab46805a96db1570847b109a90e6e03d61f9088ef877ca8ba96a8006777dc38ec434fce6b487f6c1f91d0
 DIST seabios-1.13.0.tar.gz 620952 BLAKE2B 460a7dd2b2775b981bbd890ed0a50fe905794c68b0b895799667dd1378bb84125712330c2f6945112709d42cfb7b01196c7fff99051e44b6211d47d19531cfae SHA512 7f158badf7deecc2998eab2a08f3615dfe5a7c0a51323f7b4568a4d1280935bc32bb466c8226d87d2ca7e13f9f117ff0092befcc0699bc31c5018e84754e8393
 DIST xen-4.13.1-upstream-patches-2.tar.xz 53744 BLAKE2B 769b5b8022f7db66f677d8107c6473606376718bffeac7eba09c4270f4005811f472fb9ed2a2804260e0486228edbadfcf8f81bf1dae6d68df37da213d281390 SHA512 b07c865b96c6f48b9d0b4e4c2f3ec19f4dc44884f4024e440a3e537f594f9f5edd6edf805bdefc82e5f1f2520f35f940b64c158972cbf5bfdc8fb2ca7a1b0ac1
+DIST xen-4.13.1-upstream-patches-3.tar.xz 87056 BLAKE2B 01d7133b8f7e3c9a42b9771dcb7739777f79f229941114cce70ba2897dd52bf53f08de35602a0b40a120fc155c274dbf91e107856f4afdae2c4f7b4bc0a67cdd SHA512 d67e9ddfbf27dc5a23a77679b1b2524a49c2aec3ff9eb3472f9e075893d87401f8e99707b0652744eb4af7a3ed9a815c3925de49995bcd7c82d97c13a69b5309
 DIST xen-4.13.1.tar.gz 39024612 BLAKE2B efff138699fac2c14fad2e0dfd4535ebd744577df3dddccc2a589b81a76f24fc81c75e295f4cd33ca2e820929417b22d714504b576cb0737a563037bd56b6a95 SHA512 b56d20704155d98d803496cba83eb928e0f986a750831cd5600fc88d0ae772fe1456571654375054043d2da8daca255cc98385ebf08b1b1a75ecf7f4b7a0ee90
-DIST xen-4.14.0-upstream-patches-0.tar.xz 6872 BLAKE2B 958ad668362c9c02af39f2a02cde2baa9b9fc8853116c390f43a77bb17c649bfc6a4b51db5cbe564a8c3c440ce736603e44b97f45c50a7836c9a43bfb0d2255a SHA512 a30d9708e64e1405f837b14c1e5a0e28fcb9e7a177c822570e25d0ed118a9c58c380f4ed64a40bf970a9389baf9848e52f7d161efe922b883ee990c8029e7e1f
+DIST xen-4.14.0-upstream-patches-1.tar.xz 45360 BLAKE2B 0f72a2cc3d18557b86a2a83f97e4141be46a20e3ba59ccc881a34a4408988eba9827e3b927bc07aba9678123d783303e7d47d789e57323a7f6691d718c019dc8 SHA512 3d5093e4367d27e7f6e8d4cc31841a5c80cc3fb870d6cb32131d064e16cbb559e9a783c70eec1ce13c960b3e2a8d5e23e18d26b936bc418b434df3bb801d3e4f
 DIST xen-4.14.0.tar.gz 39950576 BLAKE2B db4c3e79cfdfb10260d0d14d9d28e8c8bd9bf23f42aee743acf8f560bf4cdb96a425c0df887c70f9755f62680be24bfbe0149e52a4cb843ae83090cd9d6afc71 SHA512 ebce47a2f754955d8517123d69f62006634d97620fbbe3784869a0667466e586a249f57ffaf7846d5bcb45d69377cde43354c82c233fbb5407e55653b9a33ac0
 DIST xen-gentoo-patches-21.tar.xz 18280 BLAKE2B 95446da72fc16cb82e4e51df8796c64db05a30894a351a98dbd6700ce354c34956ca09a1af98125a4e56c337936e8fae296d806519b8afa23a82b078aa0db8f1 SHA512 3cffac162606a09b10b47dca604f167897e6ac8d153411d3464ef29a7a4d46ac5b92340884cb21279cb2d053b131f1ea5cb2111e3e9a21b3298b5ab3320ee34d
 DIST xen-gentoo-patches-22.tar.xz 18764 BLAKE2B e0da49b39fbc6b689db47e40a4fbb4f6568644fe192b114cce01b0406cba4bf23339ad1bf39b972f895df004916827b6e774f97fc079aeb8ac436763efda5fc3 SHA512 5b7959af4ed30edd2526698ab60a86353e35d9dc48dc941b6df7659a7c4904260461e0decbd8d788542bd69384736f2175861d4943c3738618d20788b19ea9b1

diff --git a/app-emulation/xen-tools/xen-tools-4.14.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.13.1-r4.ebuild
similarity index 98%
copy from app-emulation/xen-tools/xen-tools-4.14.0-r1.ebuild
copy to app-emulation/xen-tools/xen-tools-4.13.1-r4.ebuild
index 7cf7cb407e7..75da75730f9 100644
--- a/app-emulation/xen-tools/xen-tools-4.14.0-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.1-r4.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{6..9} )
+PYTHON_COMPAT=( python3_{6,7,8} )
 PYTHON_REQ_USE='ncurses,xml,threads(+)'
 
 inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
@@ -17,16 +17,16 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
+	UPSTREAM_VER=3
 	SECURITY_VER=28
 	# xen-tools's gentoo patches tarball
-	GENTOO_VER=22
+	GENTOO_VER=21
 	# xen-tools's gentoo patches version which apply to this specific ebuild
 	GENTOO_GPV=0
 	# xen-tools ovmf's patches
 	OVMF_VER=
 
-	SEABIOS_VER="1.13.0"
+	SEABIOS_VER="1.12.1"
 	EDK2_COMMIT="20d2e5a125e34fc8501026613a71549b2a1a3e54"
 	EDK2_OPENSSL_VERSION="1_1_1b"
 	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
@@ -277,11 +277,6 @@ src_prepare() {
 		echo ipxe-gcc10.patch >> tools/firmware/etherboot/patches/series || die
 	fi
 
-	# gcc 10
-	# libxlu_pci.c:32:18: error: 'func' may be used uninitialized in this function
-	sed -e '/CFLAGS/s/Werror/Wno-error/g' \
-		-i tools/libxl/Makefile || die
-
 	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
 
 	# Fix texi2html build error with new texi2html, qemu.doc.html

diff --git a/app-emulation/xen-tools/xen-tools-4.14.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.14.0-r2.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.14.0-r1.ebuild
rename to app-emulation/xen-tools/xen-tools-4.14.0-r2.ebuild
index 7cf7cb407e7..6e50b8d46e3 100644
--- a/app-emulation/xen-tools/xen-tools-4.14.0-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.14.0-r2.ebuild
@@ -17,7 +17,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
+	UPSTREAM_VER=1
 	SECURITY_VER=28
 	# xen-tools's gentoo patches tarball
 	GENTOO_VER=22


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-10-09  8:31 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2020-10-09  8:31 UTC (permalink / raw
  To: gentoo-commits

commit:     4b223895d6abe71dadaf71e2c5457c8a597d00b8
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  9 08:30:11 2020 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Fri Oct  9 08:30:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b223895

app-emulation/xen-tools: amd64 stable wrt bug #744202

Package-Manager: Portage-2.3.103, Repoman-2.3.23
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.1-r4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.1-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.13.1-r4.ebuild
index 0ae21dfdfea..db9aab75f88 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.1-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.1-r4.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=3
 	SECURITY_VER=28
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-11-10 18:48 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2020-11-10 18:48 UTC (permalink / raw
  To: gentoo-commits

commit:     76bccdd5181e4846092c815ed6843bbba6167707
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 10 18:46:07 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 10 18:46:07 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76bccdd5

app-emulation/xen-tools: Stabilize 4.13.2 x86, #753692

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.2.ebuild b/app-emulation/xen-tools/xen-tools-4.13.2.ebuild
index 77b62fd4baf..fb44a410b4a 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.2.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=
 	SECURITY_VER=29
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-11-11  0:47 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2020-11-11  0:47 UTC (permalink / raw
  To: gentoo-commits

commit:     f36cd15ccd596f2b02816d7647514ede5a16dfdd
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 11 00:46:44 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 11 00:46:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f36cd15c

app-emulation/xen-tools: Stabilize 4.13.2 amd64, #753692

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.2.ebuild b/app-emulation/xen-tools/xen-tools-4.13.2.ebuild
index fb44a410b4a..18d7ec7c9d4 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.2.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=
 	SECURITY_VER=29
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-11-12 14:03 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2020-11-12 14:03 UTC (permalink / raw
  To: gentoo-commits

commit:     f97ef605b433f7ecae7d675d7c28f677efcc7ef1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 12 14:03:00 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Nov 12 14:03:00 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f97ef605

app-emulation/xen-tools: Stabilize 4.13.2-r1 amd64, #754105

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.2-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.13.2-r1.ebuild
index 9fa2b645afc..4fe1835b502 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.2-r1.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=29
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-11-12 16:06 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2020-11-12 16:06 UTC (permalink / raw
  To: gentoo-commits

commit:     e5b936cc4e5e7c5e57852f47f565bfa8f983655f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 12 16:06:04 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Nov 12 16:06:04 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5b936cc

app-emulation/xen-tools: Stabilize 4.13.2-r1 x86, #754105

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.2-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.13.2-r1.ebuild
index 4fe1835b502..b3c82b224ca 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.2-r1.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=29
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-11-18 17:34 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2020-11-18 17:34 UTC (permalink / raw
  To: gentoo-commits

commit:     87b103803b415b868ec83635498cda517b5720b1
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Mon Nov 16 20:32:04 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Wed Nov 18 17:34:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87b10380

app-emulation/xen-tools: always depend on x11-libs/pixman

Closes: https://bugs.gentoo.org/734794
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/18287
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../{xen-tools-4.14.0-r3.ebuild => xen-tools-4.14.0-r4.ebuild}      | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.14.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.14.0-r4.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.14.0-r3.ebuild
rename to app-emulation/xen-tools/xen-tools-4.14.0-r4.ebuild
index dec7829740e..55976ee7f22 100644
--- a/app-emulation/xen-tools/xen-tools-4.14.0-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.14.0-r4.ebuild
@@ -93,7 +93,10 @@ COMMON_DEPEND="
 "
 
 DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	dev-lang/perl
 	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
 	$(python_gen_cond_dep '
 		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
 		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
@@ -113,8 +116,6 @@ DEPEND="${COMMON_DEPEND}
 		system-seabios? ( sys-firmware/seabios )
 		system-ipxe? ( sys-firmware/ipxe[qemu] )
 		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	dev-lang/perl
-	app-misc/pax-utils
 	doc? (
 		app-text/ghostscript-gpl
 		app-text/pandoc
@@ -127,7 +128,6 @@ DEPEND="${COMMON_DEPEND}
 	hvm? ( x11-base/xorg-proto )
 	qemu? (
 		app-arch/snappy:=
-		x11-libs/pixman
 		sdl? (
 			media-libs/libsdl[X]
 			media-libs/libsdl2[X]


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-11-27 16:55 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2020-11-27 16:55 UTC (permalink / raw
  To: gentoo-commits

commit:     6baf51f8fd462f4a9852e3a06be188a1a20454dc
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Nov 27 10:25:00 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Nov 27 16:55:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6baf51f8

app-emulation/xen-tools: drop old

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/18425
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   4 -
 app-emulation/xen-tools/xen-tools-4.13.1-r4.ebuild | 506 ---------------------
 app-emulation/xen-tools/xen-tools-4.13.2.ebuild    | 506 ---------------------
 3 files changed, 1016 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 47ebae23498..85ea218d9be 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,14 +1,10 @@
-DIST OpenSSL_1_1_1b.tar.gz 8384386 BLAKE2B f720ee2bb1ba9a104334cc39988942b5f18e9df54ec114969983e013d1d5e766e2605237281dfbd7218523b0f64ed465238d2da995791c4a789cb5e20b2d9be3 SHA512 f09f07226c1ea7d903d65572f6c63e1dd8afbbe4789438572ccae3c31445c30cf353dbf2e7637ab9d1042a2dc221cacdbed6167e881c1a1ad40163f751a33b28
 DIST OpenSSL_1_1_1g.tar.gz 9975550 BLAKE2B 22efa4ffe5d56a861bc4e2e1bc9a558e79265a3789acd9ca65d0a1162a1808a089a92a234e88c951f2a3cdabd3b1908ac7fe6d5f2b5fe554f229a22c11ab185b SHA512 bc8d24d7fc93542a8d77e13a57768de242ef679ef4db93c1b6b981a15a60646a5c5d869d066248448f3eb1ab2012e3ddc80bf301f486c0574d469a3f7db7b8d4
 DIST berkeley-softfloat-b64af41c3276f97f0e181920400ee056b9c88037.tar.gz 148741 BLAKE2B 72014022926b636147e202d74c42df2ce9cfed00b91c275d5b2e0afbc5c68765445cbe7ac6389d7c2512bd1d45b0e16e999936552d09bbc733ab66c92968bd31 SHA512 8420c29faa7ff57e06d6758b03e81ca0630c59946bc031e8611f1449e23634cf901b502161f2c1423c0cff949b5481445e36a3aa53dc885b61ca2c673b3ba567
 DIST brotli-666c3280cc11dc433c303d79a83d4ffbdd12cc8d.tar.gz 23855739 BLAKE2B 7406ec5b29ac66afbcd7c1376bb3208f298d19b6592b2869c52173aa64947d58bd443f9a61c67deaf046be910a0e31c0b843e5508e97e0e1f5e7bce100d86904 SHA512 df8e90562c4fd7f0e787949df6bc4f5a165b39bd333f442d27874fe65640fbba268f9350d7113e6761a5acceb66d78e75f1a296e5a89b94574edf28109cdc812
 DIST edk2-06dc822d045c2bb42e497487935485302486e151.tar.gz 13192042 BLAKE2B 81afa7fd5f6f14fff35baa3c6c64583fa21c7b793ed847a3362fd05a926bb4402db911f9f78f4ffd76a6de9b815171dfa245ae41afac3b022cd108597e8c1ac3 SHA512 a032a1496db7ddc32a7d6d1a7d5fe4122ab43b13547ec019855166d785f162268ad82ceb3c41efafe1687e73fc72599ee6852741652451e1cb329fd655c69b6c
-DIST edk2-20d2e5a125e34fc8501026613a71549b2a1a3e54.tar.gz 14567879 BLAKE2B 381d47674afcc7b611edee91531694a70e6799c2b351d81632777fb382a8cce968e44a1f3e17c4852db28e81624e2ec1ebb98ed121c2a6cc3f2982939eb546a5 SHA512 1a4b4d8eacd495e705fea924b16640d6814fba7ec25a3153222eb981d43b0fd9b16b54baf8feecf99cd89b10f7735ff4b075660453d0fc2722fe4608353c8aeb
 DIST ipxe-git-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz 3810726 BLAKE2B b95266ec7fcee5c27065ba999b023ded9eb42a3690555e626911493f1dc995927fa67071bdc6432b3995df82134f8c49ea0d72eaf407f455dd1e2675d5b8d844 SHA512 8120696ba6d79fd9189664deed9b0489825d8d1edf7b931023b3979b7b9f82248e5b808c4517036cd40a85442ddf51a8dcad3b05d7f3c3cc6650654d53da4050
 DIST seabios-1.12.1.tar.gz 613450 BLAKE2B cb926b650c41a9962db407945cb5b6558079b061bd61f32ea56aedf0d37a00d10ad4434acbe717ffbc0dd1d1c0767304af8e640a53b0fc3784969dfa1590f681 SHA512 58755ce842adcb99c0f2f3ebbf9ec6d4a5072753966ab46805a96db1570847b109a90e6e03d61f9088ef877ca8ba96a8006777dc38ec434fce6b487f6c1f91d0
 DIST seabios-1.13.0.tar.gz 620952 BLAKE2B 460a7dd2b2775b981bbd890ed0a50fe905794c68b0b895799667dd1378bb84125712330c2f6945112709d42cfb7b01196c7fff99051e44b6211d47d19531cfae SHA512 7f158badf7deecc2998eab2a08f3615dfe5a7c0a51323f7b4568a4d1280935bc32bb466c8226d87d2ca7e13f9f117ff0092befcc0699bc31c5018e84754e8393
-DIST xen-4.13.1-upstream-patches-3.tar.xz 87056 BLAKE2B 01d7133b8f7e3c9a42b9771dcb7739777f79f229941114cce70ba2897dd52bf53f08de35602a0b40a120fc155c274dbf91e107856f4afdae2c4f7b4bc0a67cdd SHA512 d67e9ddfbf27dc5a23a77679b1b2524a49c2aec3ff9eb3472f9e075893d87401f8e99707b0652744eb4af7a3ed9a815c3925de49995bcd7c82d97c13a69b5309
-DIST xen-4.13.1.tar.gz 39024612 BLAKE2B efff138699fac2c14fad2e0dfd4535ebd744577df3dddccc2a589b81a76f24fc81c75e295f4cd33ca2e820929417b22d714504b576cb0737a563037bd56b6a95 SHA512 b56d20704155d98d803496cba83eb928e0f986a750831cd5600fc88d0ae772fe1456571654375054043d2da8daca255cc98385ebf08b1b1a75ecf7f4b7a0ee90
 DIST xen-4.13.2-upstream-patches-0.tar.xz 15404 BLAKE2B e4f679e4281e4edfe4f1e7722c19a973461b9a6423828f17719dfd766a73ef61a74b1cd87f375e2b0c2ec9cbed7b6a0f12c4a9982bbc325cdbba4c70a7145248 SHA512 122fe404f9c19567016e43208ddd08bdac56e7f264853d6cbe0929650fc4ada7175cc24c0e4fbf088acab77127eb76454948b98cbc731e35a12e1b068a5fd793
 DIST xen-4.13.2.tar.gz 39037826 BLAKE2B ad2b7c3003ca29e5e60a85c581f706ef87d99eadf939ed36ebe8f6698582f7a29dbdaf502039b60a0afe7ad4ae6ce89713e69dc8b8a7d5abe65063da7f1baa5b SHA512 cd3092281c97e9421e303aa288aac04dcccd5536ba7c0ff4d51fbf3d07b5ffacfe3456ba06f5cf63577dafbf8cf3a5d9825ceb5e9ef8ca1427900cc3e57b50a3
 DIST xen-4.14.0-upstream-patches-4.tar.xz 79204 BLAKE2B 54d3ba5eac263d78c052cdf2b7958662dc29f689f03d03692c20c881a6b520bf08c86cf830a2727c2a2249c256aa0d06dea75496c8ee6699361c86c3f91bbd83 SHA512 c18b43a16e225cd1c50fe975fa1daf414e8e5fd47e4d3c9e2c655001ae59ab6fed5d332e5f34acc4f01b3c9d42bd425a86e084a4eb22c360257689aab3fe6825

diff --git a/app-emulation/xen-tools/xen-tools-4.13.1-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.13.1-r4.ebuild
deleted file mode 100644
index db9aab75f88..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.13.1-r4.ebuild
+++ /dev/null
@@ -1,506 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=3
-	SECURITY_VER=28
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=21
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.12.1"
-	EDK2_COMMIT="20d2e5a125e34fc8501026613a71549b2a1a3e54"
-	EDK2_OPENSSL_VERSION="1_1_1b"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	IPXE_COMMIT="1dd56dbd11082fb622c2ed21cfaced4f47d798a6"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://github.com/qemu/seabios/archive/rel-${SEABIOS_VER}.tar.gz -> seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
-
-		# gcc 10
-		cp "${WORKDIR}/patches-gentoo/xen-tools-4.13.0-ipxe-gcc10.patch" tools/firmware/etherboot/patches/ipxe-gcc10.patch || die
-		echo ipxe-gcc10.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.13.2.ebuild b/app-emulation/xen-tools/xen-tools-4.13.2.ebuild
deleted file mode 100644
index 18d7ec7c9d4..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.13.2.ebuild
+++ /dev/null
@@ -1,506 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7,8} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=
-	SECURITY_VER=29
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=21
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.12.1"
-	EDK2_COMMIT="20d2e5a125e34fc8501026613a71549b2a1a3e54"
-	EDK2_OPENSSL_VERSION="1_1_1b"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	IPXE_COMMIT="1dd56dbd11082fb622c2ed21cfaced4f47d798a6"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://github.com/qemu/seabios/archive/rel-${SEABIOS_VER}.tar.gz -> seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	>=sys-kernel/linux-headers-4.11
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	dev-lang/perl
-	app-misc/pax-utils
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		x11-libs/pixman
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
-
-		# gcc 10
-		cp "${WORKDIR}/patches-gentoo/xen-tools-4.13.0-ipxe-gcc10.patch" tools/firmware/etherboot/patches/ipxe-gcc10.patch || die
-		echo ipxe-gcc10.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-12-20 19:21 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2020-12-20 19:21 UTC (permalink / raw
  To: gentoo-commits

commit:     09d60234c436864445bc65437835e295860bb419
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Dec 16 09:23:36 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Dec 20 19:20:59 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09d60234

app-emulation/xen-tools: add security patches, drop vulnerable

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/18676
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                         |  3 ++-
 ...tools-4.14.0-r4.ebuild => xen-tools-4.13.2-r2.ebuild} | 16 ++++++++--------
 ...tools-4.14.0-r4.ebuild => xen-tools-4.14.0-r5.ebuild} |  2 +-
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 85ea218d9be..b744ad2e191 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,8 +6,9 @@ DIST ipxe-git-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz 3810726 BLAKE2B b9
 DIST seabios-1.12.1.tar.gz 613450 BLAKE2B cb926b650c41a9962db407945cb5b6558079b061bd61f32ea56aedf0d37a00d10ad4434acbe717ffbc0dd1d1c0767304af8e640a53b0fc3784969dfa1590f681 SHA512 58755ce842adcb99c0f2f3ebbf9ec6d4a5072753966ab46805a96db1570847b109a90e6e03d61f9088ef877ca8ba96a8006777dc38ec434fce6b487f6c1f91d0
 DIST seabios-1.13.0.tar.gz 620952 BLAKE2B 460a7dd2b2775b981bbd890ed0a50fe905794c68b0b895799667dd1378bb84125712330c2f6945112709d42cfb7b01196c7fff99051e44b6211d47d19531cfae SHA512 7f158badf7deecc2998eab2a08f3615dfe5a7c0a51323f7b4568a4d1280935bc32bb466c8226d87d2ca7e13f9f117ff0092befcc0699bc31c5018e84754e8393
 DIST xen-4.13.2-upstream-patches-0.tar.xz 15404 BLAKE2B e4f679e4281e4edfe4f1e7722c19a973461b9a6423828f17719dfd766a73ef61a74b1cd87f375e2b0c2ec9cbed7b6a0f12c4a9982bbc325cdbba4c70a7145248 SHA512 122fe404f9c19567016e43208ddd08bdac56e7f264853d6cbe0929650fc4ada7175cc24c0e4fbf088acab77127eb76454948b98cbc731e35a12e1b068a5fd793
+DIST xen-4.13.2-upstream-patches-2.tar.xz 58992 BLAKE2B 535d67ae6a30e23feb975172a9e4abd6d7feb6c8c969aa243fdf672ed6580fe46bf57ea5530eab70457e22af9163f95061fdf97d10faa3be9f4c92033187c950 SHA512 6b6cdf72d13c0e595be65e3107c0f68299e932b74d4a1c4d59bfe3be8b76840c47f6adeaddd0efac71d5158cee8d778a0be863eea8f032cb9acf4191f629d8ae
 DIST xen-4.13.2.tar.gz 39037826 BLAKE2B ad2b7c3003ca29e5e60a85c581f706ef87d99eadf939ed36ebe8f6698582f7a29dbdaf502039b60a0afe7ad4ae6ce89713e69dc8b8a7d5abe65063da7f1baa5b SHA512 cd3092281c97e9421e303aa288aac04dcccd5536ba7c0ff4d51fbf3d07b5ffacfe3456ba06f5cf63577dafbf8cf3a5d9825ceb5e9ef8ca1427900cc3e57b50a3
-DIST xen-4.14.0-upstream-patches-4.tar.xz 79204 BLAKE2B 54d3ba5eac263d78c052cdf2b7958662dc29f689f03d03692c20c881a6b520bf08c86cf830a2727c2a2249c256aa0d06dea75496c8ee6699361c86c3f91bbd83 SHA512 c18b43a16e225cd1c50fe975fa1daf414e8e5fd47e4d3c9e2c655001ae59ab6fed5d332e5f34acc4f01b3c9d42bd425a86e084a4eb22c360257689aab3fe6825
+DIST xen-4.14.0-upstream-patches-6.tar.xz 119116 BLAKE2B e3a0f807182d32754c6ae2000324237117cfa66c4a43c27b583b6aef69a3889949779751b71a87b2538f679fb481e8a723433950c689f28a8c2e96278c1b0ddb SHA512 03b1fdc08e74756001fbb0de4e21297456f63615e6f63b8f360f8270ef85b0d50c3872be41cc26529ed0d91d82ffda2af53882b7c5233113f223a4ec813a0d5b
 DIST xen-4.14.0.tar.gz 39950576 BLAKE2B db4c3e79cfdfb10260d0d14d9d28e8c8bd9bf23f42aee743acf8f560bf4cdb96a425c0df887c70f9755f62680be24bfbe0149e52a4cb843ae83090cd9d6afc71 SHA512 ebce47a2f754955d8517123d69f62006634d97620fbbe3784869a0667466e586a249f57ffaf7846d5bcb45d69377cde43354c82c233fbb5407e55653b9a33ac0
 DIST xen-gentoo-patches-21.tar.xz 18280 BLAKE2B 95446da72fc16cb82e4e51df8796c64db05a30894a351a98dbd6700ce354c34956ca09a1af98125a4e56c337936e8fae296d806519b8afa23a82b078aa0db8f1 SHA512 3cffac162606a09b10b47dca604f167897e6ac8d153411d3464ef29a7a4d46ac5b92340884cb21279cb2d053b131f1ea5cb2111e3e9a21b3298b5ab3320ee34d
 DIST xen-gentoo-patches-22.tar.xz 18764 BLAKE2B e0da49b39fbc6b689db47e40a4fbb4f6568644fe192b114cce01b0406cba4bf23339ad1bf39b972f895df004916827b6e774f97fc079aeb8ac436763efda5fc3 SHA512 5b7959af4ed30edd2526698ab60a86353e35d9dc48dc941b6df7659a7c4904260461e0decbd8d788542bd69384736f2175861d4943c3738618d20788b19ea9b1

diff --git a/app-emulation/xen-tools/xen-tools-4.14.0-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild
similarity index 99%
copy from app-emulation/xen-tools/xen-tools-4.14.0-r4.ebuild
copy to app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild
index 55976ee7f22..9ed77248190 100644
--- a/app-emulation/xen-tools/xen-tools-4.14.0-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild
@@ -17,16 +17,16 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=4
-	SECURITY_VER=28
+	UPSTREAM_VER=2
+	SECURITY_VER=29
 	# xen-tools's gentoo patches tarball
-	GENTOO_VER=22
+	GENTOO_VER=21
 	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
+	GENTOO_GPV=1
 	# xen-tools ovmf's patches
 	OVMF_VER=
 
-	SEABIOS_VER="1.13.0"
+	SEABIOS_VER="1.12.1"
 	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
 	EDK2_OPENSSL_VERSION="1_1_1g"
 	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
@@ -93,10 +93,7 @@ COMMON_DEPEND="
 "
 
 DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	dev-lang/perl
 	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
 	$(python_gen_cond_dep '
 		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
 		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
@@ -116,6 +113,8 @@ DEPEND="${COMMON_DEPEND}
 		system-seabios? ( sys-firmware/seabios )
 		system-ipxe? ( sys-firmware/ipxe[qemu] )
 		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	dev-lang/perl
+	app-misc/pax-utils
 	doc? (
 		app-text/ghostscript-gpl
 		app-text/pandoc
@@ -128,6 +127,7 @@ DEPEND="${COMMON_DEPEND}
 	hvm? ( x11-base/xorg-proto )
 	qemu? (
 		app-arch/snappy:=
+		x11-libs/pixman
 		sdl? (
 			media-libs/libsdl[X]
 			media-libs/libsdl2[X]

diff --git a/app-emulation/xen-tools/xen-tools-4.14.0-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.14.0-r5.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.14.0-r4.ebuild
rename to app-emulation/xen-tools/xen-tools-4.14.0-r5.ebuild
index 55976ee7f22..c23e528f38a 100644
--- a/app-emulation/xen-tools/xen-tools-4.14.0-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.14.0-r5.ebuild
@@ -17,7 +17,7 @@ if [[ $PV == *9999 ]]; then
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=4
+	UPSTREAM_VER=6
 	SECURITY_VER=28
 	# xen-tools's gentoo patches tarball
 	GENTOO_VER=22


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-12-21 17:48 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2020-12-21 17:48 UTC (permalink / raw
  To: gentoo-commits

commit:     57bb148965e6a1518854f2caece3ad1e5c38f57e
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 21 17:48:29 2020 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Dec 21 17:48:29 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57bb1489

app-emulation/xen-tools: x86 stable (bug #760144)

Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild
index 9ed77248190..e3c1b889238 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=29
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2020-12-21 18:26 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2020-12-21 18:26 UTC (permalink / raw
  To: gentoo-commits

commit:     f877109b8ed2f42317c8ba99e67dc2d2b3dd9b46
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 21 18:26:21 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Dec 21 18:26:21 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f877109b

app-emulation/xen-tools: Stabilize 4.13.2-r2 amd64, #760144

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild
index e3c1b889238..118a8d6f670 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.2-r2.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=29
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-01-17  4:10 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2021-01-17  4:10 UTC (permalink / raw
  To: gentoo-commits

commit:     cc8eaca4352d0b9a004a406181e368c8c8e73903
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 17 03:28:27 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan 17 04:10:20 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc8eaca4

app-emulation/xen-tools: fix ProbableGlobalUse (ocaml)

The description here isn't adding anything, so let's drop it.

Package-Manager: Portage-3.0.12.0.2-prefix, Repoman-3.0.2
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/metadata.xml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
index dd590bd080f..71d5db7e3eb 100644
--- a/app-emulation/xen-tools/metadata.xml
+++ b/app-emulation/xen-tools/metadata.xml
@@ -18,7 +18,6 @@
 		<flag name="flask">Enable the Flask XSM module from NSA</flag>
 		<flag name="hvm">Enable support for hardware based virtualization (VT-x,AMD-v)</flag>
 		<flag name="ipxe">Enable ipxe support</flag>
-		<flag name="ocaml">Enable support for the ocaml language</flag>
 		<flag name="ovmf">Enable support to boot UEFI guest vm, needed by hvm</flag>
 		<flag name="pygrub">Install the pygrub boot loader</flag>
 		<flag name="qemu">Enable IOEMU support via the use of qemu-dm</flag>


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-03-22 15:33 Joonas Niilola
  0 siblings, 0 replies; 295+ messages in thread
From: Joonas Niilola @ 2021-03-22 15:33 UTC (permalink / raw
  To: gentoo-commits

commit:     449f0a8c92139e959bb63fe47e29bcdb915b8b8c
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Mar 19 12:15:38 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Mar 22 15:33:05 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=449f0a8c

app-emulation/xen-tools: add upstream patches

Fixes XSA-368

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/20004
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 +
 app-emulation/xen-tools/xen-tools-4.13.2-r3.ebuild | 512 +++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.14.1-r1.ebuild | 512 +++++++++++++++++++++
 3 files changed, 1026 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 77f3f1a3fb1..f84dc7bd230 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,7 +6,9 @@ DIST ipxe-git-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz 3810726 BLAKE2B b9
 DIST seabios-1.12.1.tar.gz 613450 BLAKE2B cb926b650c41a9962db407945cb5b6558079b061bd61f32ea56aedf0d37a00d10ad4434acbe717ffbc0dd1d1c0767304af8e640a53b0fc3784969dfa1590f681 SHA512 58755ce842adcb99c0f2f3ebbf9ec6d4a5072753966ab46805a96db1570847b109a90e6e03d61f9088ef877ca8ba96a8006777dc38ec434fce6b487f6c1f91d0
 DIST seabios-1.13.0.tar.gz 620952 BLAKE2B 460a7dd2b2775b981bbd890ed0a50fe905794c68b0b895799667dd1378bb84125712330c2f6945112709d42cfb7b01196c7fff99051e44b6211d47d19531cfae SHA512 7f158badf7deecc2998eab2a08f3615dfe5a7c0a51323f7b4568a4d1280935bc32bb466c8226d87d2ca7e13f9f117ff0092befcc0699bc31c5018e84754e8393
 DIST xen-4.13.2-upstream-patches-2.tar.xz 58992 BLAKE2B 535d67ae6a30e23feb975172a9e4abd6d7feb6c8c969aa243fdf672ed6580fe46bf57ea5530eab70457e22af9163f95061fdf97d10faa3be9f4c92033187c950 SHA512 6b6cdf72d13c0e595be65e3107c0f68299e932b74d4a1c4d59bfe3be8b76840c47f6adeaddd0efac71d5158cee8d778a0be863eea8f032cb9acf4191f629d8ae
+DIST xen-4.13.2-upstream-patches-6.tar.xz 80980 BLAKE2B a20643c4f89f197e4001c0181249bc1a22b60874bc077ba2abee716b8e64bbbea0885a64632f3120960425a741328ceba1b44dc10a7a24039b328e1ded28f752 SHA512 0b097dfb04404ec6c609d35d924b3d2306c5f2de0501aa0b8e007e0af9a4ef394fae2d736435401bf8bd1fd661171c71ba712585bdb195649e3350ef9f953115
 DIST xen-4.13.2.tar.gz 39037826 BLAKE2B ad2b7c3003ca29e5e60a85c581f706ef87d99eadf939ed36ebe8f6698582f7a29dbdaf502039b60a0afe7ad4ae6ce89713e69dc8b8a7d5abe65063da7f1baa5b SHA512 cd3092281c97e9421e303aa288aac04dcccd5536ba7c0ff4d51fbf3d07b5ffacfe3456ba06f5cf63577dafbf8cf3a5d9825ceb5e9ef8ca1427900cc3e57b50a3
+DIST xen-4.14.1-upstream-patches-3.tar.xz 27864 BLAKE2B 69a67e863a30c0079f7955dd5306f69890a4f6db91d4cf2d1806a2bbd8afad88db7789c7eda8da0ff2a945da04916ff4ab5eaa9e529a417112ae01e31151d0dc SHA512 19e5ef39616fffbff20b2f658d61e50e21741fe3c5c4ca89f67e72a1606b3a593f93e9090fb0b5c76c1c801f931c237d2be6329bd174fa911d66b81ad4a332dd
 DIST xen-4.14.1.tar.gz 39970115 BLAKE2B 21e5838b2b4d78420dcaaae2b8fc98ac876230217e6a3764aa643920150b8cef96025663e6a2fc423ab15f7f470b62547e91ce1be0337fc78f00c148c7ff40ab SHA512 c75cbec82793435f5a7026626ffdb2e9a2166b42d2be4b2f1194240e0312458124f0ebd53eeb02ce7330c22afe402a28a96b32f8af66e41e9416fe94535724c9
 DIST xen-gentoo-patches-21.tar.xz 18280 BLAKE2B 95446da72fc16cb82e4e51df8796c64db05a30894a351a98dbd6700ce354c34956ca09a1af98125a4e56c337936e8fae296d806519b8afa23a82b078aa0db8f1 SHA512 3cffac162606a09b10b47dca604f167897e6ac8d153411d3464ef29a7a4d46ac5b92340884cb21279cb2d053b131f1ea5cb2111e3e9a21b3298b5ab3320ee34d
 DIST xen-gentoo-patches-22.tar.xz 18764 BLAKE2B e0da49b39fbc6b689db47e40a4fbb4f6568644fe192b114cce01b0406cba4bf23339ad1bf39b972f895df004916827b6e774f97fc079aeb8ac436763efda5fc3 SHA512 5b7959af4ed30edd2526698ab60a86353e35d9dc48dc941b6df7659a7c4904260461e0decbd8d788542bd69384736f2175861d4943c3738618d20788b19ea9b1

diff --git a/app-emulation/xen-tools/xen-tools-4.13.2-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.13.2-r3.ebuild
new file mode 100644
index 00000000000..7159688a1ac
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.13.2-r3.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=6
+	SECURITY_VER=29
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=21
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=1
+	# xen-tools ovmf's patches
+	OVMF_VER=
+
+	SEABIOS_VER="1.12.1"
+	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
+	EDK2_OPENSSL_VERSION="1_1_1g"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="1dd56dbd11082fb622c2ed21cfaced4f47d798a6"
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	https://github.com/qemu/seabios/archive/rel-${SEABIOS_VER}.tar.gz -> seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-4.11
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
+		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/edk2-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
+
+		# gcc 10
+		cp "${WORKDIR}/patches-gentoo/xen-tools-4.13.0-ipxe-gcc10.patch" tools/firmware/etherboot/patches/ipxe-gcc10.patch || die
+		echo ipxe-gcc10.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable api xenapi) \
+		$(use_enable ipxe) \
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
+		$(use_enable ocaml ocamltools) \
+		$(use_enable ovmf) \
+		$(use_enable pam) \
+		$(use_enable rombios) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.14.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.14.1-r1.ebuild
new file mode 100644
index 00000000000..0e0c29c4bf2
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.14.1-r1.ebuild
@@ -0,0 +1,512 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=3
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=22
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=
+
+	SEABIOS_VER="1.13.0"
+	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
+	EDK2_OPENSSL_VERSION="1_1_1g"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="1dd56dbd11082fb622c2ed21cfaced4f47d798a6"
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	https://github.com/qemu/seabios/archive/rel-${SEABIOS_VER}.tar.gz -> seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	dev-lang/perl
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
+		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/edk2-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
+
+		# gcc 10
+		cp "${WORKDIR}/patches-gentoo/xen-tools-4.13.0-ipxe-gcc10.patch" tools/firmware/etherboot/patches/ipxe-gcc10.patch || die
+		echo ipxe-gcc10.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable api xenapi) \
+		$(use_enable ipxe) \
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
+		$(use_enable ocaml ocamltools) \
+		$(use_enable ovmf) \
+		$(use_enable pam) \
+		$(use_enable rombios) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-03-30 13:03 Joonas Niilola
  0 siblings, 0 replies; 295+ messages in thread
From: Joonas Niilola @ 2021-03-30 13:03 UTC (permalink / raw
  To: gentoo-commits

commit:     ba365f2b582cd4f12f650e30281e47b7de9a50ce
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Mar 24 15:31:41 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Mar 30 13:03:04 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba365f2b

app-emulation/xen-tools: remove png/jpeg automagic

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/20104
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.2-r4.ebuild | 520 +++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.14.1-r2.ebuild | 520 +++++++++++++++++++++
 2 files changed, 1040 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.2-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.13.2-r4.ebuild
new file mode 100644
index 00000000000..50f18d15c45
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.13.2-r4.ebuild
@@ -0,0 +1,520 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=6
+	SECURITY_VER=29
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=21
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=1
+	# xen-tools ovmf's patches
+	OVMF_VER=
+
+	SEABIOS_VER="1.12.1"
+	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
+	EDK2_OPENSSL_VERSION="1_1_1g"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="1dd56dbd11082fb622c2ed21cfaced4f47d798a6"
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	https://github.com/qemu/seabios/archive/rel-${SEABIOS_VER}.tar.gz -> seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	>=sys-kernel/linux-headers-4.11
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
+		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	dev-lang/perl
+	app-misc/pax-utils
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		x11-libs/pixman
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/edk2-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
+
+		# gcc 10
+		cp "${WORKDIR}/patches-gentoo/xen-tools-4.13.0-ipxe-gcc10.patch" tools/firmware/etherboot/patches/ipxe-gcc10.patch || die
+		echo ipxe-gcc10.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable api xenapi) \
+		$(use_enable ipxe) \
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
+		$(use_enable ocaml ocamltools) \
+		$(use_enable ovmf) \
+		$(use_enable pam) \
+		$(use_enable rombios) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.14.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.14.1-r2.ebuild
new file mode 100644
index 00000000000..5db1d2c80b5
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.14.1-r2.ebuild
@@ -0,0 +1,520 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ $PV == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=3
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=22
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=
+
+	SEABIOS_VER="1.13.0"
+	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
+	EDK2_OPENSSL_VERSION="1_1_1g"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="1dd56dbd11082fb622c2ed21cfaced4f47d798a6"
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	https://github.com/qemu/seabios/archive/rel-${SEABIOS_VER}.tar.gz -> seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	dev-lang/perl
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
+		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/edk2-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
+
+		# gcc 10
+		cp "${WORKDIR}/patches-gentoo/xen-tools-4.13.0-ipxe-gcc10.patch" tools/firmware/etherboot/patches/ipxe-gcc10.patch || die
+		echo ipxe-gcc10.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable api xenapi) \
+		$(use_enable ipxe) \
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
+		$(use_enable ocaml ocamltools) \
+		$(use_enable ovmf) \
+		$(use_enable pam) \
+		$(use_enable rombios) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-04-18  1:41 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2021-04-18  1:41 UTC (permalink / raw
  To: gentoo-commits

commit:     f3bd75bec3dd5d5c1ab7edd84482835e1a46ed6c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 18 01:41:07 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 18 01:41:07 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3bd75be

app-emulation/xen-tools: Stabilize 4.13.3 x86, #783456

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.3.ebuild b/app-emulation/xen-tools/xen-tools-4.13.3.ebuild
index f7a1cd02db8..c413f4c4d87 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.3.ebuild
@@ -16,7 +16,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-04-18  1:44 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2021-04-18  1:44 UTC (permalink / raw
  To: gentoo-commits

commit:     92134527e8b1ad80957794bd78b8fe832a5d7744
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 18 01:44:02 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 18 01:44:02 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92134527

app-emulation/xen-tools: Stabilize 4.13.3 amd64, #783456

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.3.ebuild b/app-emulation/xen-tools/xen-tools-4.13.3.ebuild
index c413f4c4d87..37bd7fd1281 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.3.ebuild
@@ -16,7 +16,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-05-11 20:13 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2021-05-11 20:13 UTC (permalink / raw
  To: gentoo-commits

commit:     5871ab0ecdb76ffde3576f46bfcf02e7908d5f81
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Tue May 11 20:12:48 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue May 11 20:13:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5871ab0e

app-emulation/xen-tools: use same SRC_URI for seabios like sys-firmware/seabios

Thus we had to downgrade seabios-1.12.1 to 1.12.0 for xen-4.13.

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                                      | 2 +-
 .../xen-tools/{xen-tools-4.13.3.ebuild => xen-tools-4.13.3-r1.ebuild} | 4 ++--
 app-emulation/xen-tools/xen-tools-4.14.2.ebuild                       | 2 +-
 app-emulation/xen-tools/xen-tools-4.15.0.ebuild                       | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 226f4de1694..41c35f702a0 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -4,7 +4,7 @@ DIST brotli-666c3280cc11dc433c303d79a83d4ffbdd12cc8d.tar.gz 23855739 BLAKE2B 740
 DIST edk2-06dc822d045c2bb42e497487935485302486e151.tar.gz 13192042 BLAKE2B 81afa7fd5f6f14fff35baa3c6c64583fa21c7b793ed847a3362fd05a926bb4402db911f9f78f4ffd76a6de9b815171dfa245ae41afac3b022cd108597e8c1ac3 SHA512 a032a1496db7ddc32a7d6d1a7d5fe4122ab43b13547ec019855166d785f162268ad82ceb3c41efafe1687e73fc72599ee6852741652451e1cb329fd655c69b6c
 DIST ipxe-git-1dd56dbd11082fb622c2ed21cfaced4f47d798a6.tar.gz 3810726 BLAKE2B b95266ec7fcee5c27065ba999b023ded9eb42a3690555e626911493f1dc995927fa67071bdc6432b3995df82134f8c49ea0d72eaf407f455dd1e2675d5b8d844 SHA512 8120696ba6d79fd9189664deed9b0489825d8d1edf7b931023b3979b7b9f82248e5b808c4517036cd40a85442ddf51a8dcad3b05d7f3c3cc6650654d53da4050
 DIST ipxe-git-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz 3931642 BLAKE2B bf0b5d9ea1d44803bc5c4aa0bf9188636e292b226ab759f32e3c2bfa3f80dd3f546526b9a11c1f67193793ede5309bfa67bdce80aba62ccca54597dc6e7e4ba4 SHA512 0a63f83c9135d05c6bfe7c4d12da3ff76271e35305a4d5654bd5aefa9ee59f5363546c65820c42133deb0fb5a0a0bcaa9b1c48396f9f996acea0d492a5f03f33
-DIST seabios-1.12.1.tar.gz 613450 BLAKE2B cb926b650c41a9962db407945cb5b6558079b061bd61f32ea56aedf0d37a00d10ad4434acbe717ffbc0dd1d1c0767304af8e640a53b0fc3784969dfa1590f681 SHA512 58755ce842adcb99c0f2f3ebbf9ec6d4a5072753966ab46805a96db1570847b109a90e6e03d61f9088ef877ca8ba96a8006777dc38ec434fce6b487f6c1f91d0
+DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27
 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
 DIST xen-4.13.3.tar.gz 39044539 BLAKE2B 5d0e57c76e12e1b86b78bbf561e947d70b9569a24412617a640346d2358b141a2741e7a3be454df52d198ad63e58b1519288de62330417c70e72445703f3fac2 SHA512 622127d824b9c49b57282a887fb404e0bad05ff60bccade82e4e0e9b5ad975ff9aa1fba83392e6d8379e9a15340e8ae9785c0913eb11027816e4600432eea6b6
 DIST xen-4.14.2.tar.gz 39973157 BLAKE2B db5d3570f79e0fd97872f5e5dd57a4eb39e005728387bfef3b51fabe1c693cfd8108d09b1026f5a5a7eb79de71be6f4af36d252f7e0b35a65a1567b7949e3e29 SHA512 83c9333b70dbee3e29c6bf08e5ad030676e6c4a32b976f3f5e6a8f8d0dd9e4898bac88dd8e1c9d2ad3509cebb5d212e1745f9392a469d7afeb841d79801ccf39

diff --git a/app-emulation/xen-tools/xen-tools-4.13.3.ebuild b/app-emulation/xen-tools/xen-tools-4.13.3-r1.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.13.3.ebuild
rename to app-emulation/xen-tools/xen-tools-4.13.3-r1.ebuild
index 37bd7fd1281..0f16bbc10d4 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.3-r1.ebuild
@@ -26,7 +26,7 @@ else
 	# xen-tools ovmf's patches
 	OVMF_VER=
 
-	SEABIOS_VER="1.12.1"
+	SEABIOS_VER="1.12.0"
 	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
 	EDK2_OPENSSL_VERSION="1_1_1g"
 	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
@@ -46,7 +46,7 @@ else
 		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
 
 	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://github.com/qemu/seabios/archive/rel-${SEABIOS_VER}.tar.gz -> seabios-${SEABIOS_VER}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
 	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
 	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
 		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz

diff --git a/app-emulation/xen-tools/xen-tools-4.14.2.ebuild b/app-emulation/xen-tools/xen-tools-4.14.2.ebuild
index b32eb638612..112aaab069f 100644
--- a/app-emulation/xen-tools/xen-tools-4.14.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.14.2.ebuild
@@ -46,7 +46,7 @@ else
 		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
 
 	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://github.com/qemu/seabios/archive/rel-${SEABIOS_VER}.tar.gz -> seabios-${SEABIOS_VER}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
 	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
 	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
 		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz

diff --git a/app-emulation/xen-tools/xen-tools-4.15.0.ebuild b/app-emulation/xen-tools/xen-tools-4.15.0.ebuild
index adfdaba5b5c..c19f2eb37ad 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.0.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.0.ebuild
@@ -46,7 +46,7 @@ else
 		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
 
 	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://github.com/qemu/seabios/archive/rel-${SEABIOS_VER}.tar.gz -> seabios-${SEABIOS_VER}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
 	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
 	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
 		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-05-13  0:34 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2021-05-13  0:34 UTC (permalink / raw
  To: gentoo-commits

commit:     a0b342515c1a0fb570d871be7da7ffc1f5f8a685
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu May 13 00:33:35 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu May 13 00:33:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0b34251

app-emulation/xen-tools: adjust seabios SRC name

Fixes: 5871ab0e ("app-emulation/xen-tools: use same SRC_URI for seabios like sys-firmware/seabios")
Closes: https://bugs.gentoo.org/789648
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.13.3-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.13.3-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.13.3-r1.ebuild
index 0f16bbc10d4..56e600d9a96 100644
--- a/app-emulation/xen-tools/xen-tools-4.13.3-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.13.3-r1.ebuild
@@ -239,7 +239,7 @@ src_prepare() {
 	fi
 
 	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-rel-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
 	pushd tools/firmware/ > /dev/null
 	ln -s seabios-dir-remote seabios-dir || die
 	popd > /dev/null


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-06-11 12:53 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2021-06-11 12:53 UTC (permalink / raw
  To: gentoo-commits

commit:     0917d6724141de60252c3eca91f6a17f0ca3945a
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Jun  9 07:20:05 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Jun 11 12:49:01 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0917d672

app-emulation/xen-tools: drop vulnerable

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/21168
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   1 -
 app-emulation/xen-tools/xen-tools-4.14.2.ebuild | 525 -----------------------
 app-emulation/xen-tools/xen-tools-4.15.0.ebuild | 532 ------------------------
 3 files changed, 1058 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 7361faa508b..8b92236e06b 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -9,7 +9,6 @@ DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c
 DIST xen-4.13.3.tar.gz 39044539 BLAKE2B 5d0e57c76e12e1b86b78bbf561e947d70b9569a24412617a640346d2358b141a2741e7a3be454df52d198ad63e58b1519288de62330417c70e72445703f3fac2 SHA512 622127d824b9c49b57282a887fb404e0bad05ff60bccade82e4e0e9b5ad975ff9aa1fba83392e6d8379e9a15340e8ae9785c0913eb11027816e4600432eea6b6
 DIST xen-4.14.2-upstream-patches-0.tar.xz 23304 BLAKE2B 954e0a49e5c3ec122aefe52afe328f440b8a4c8db966e0fa91e0b6d6cb3c0462b75fb99b3e7392811bd2e680cd7945e8a4d68317245fd42fdf0ad6cab33fbc68 SHA512 64d243f0c8acfec87812e4d78e3d8b24a86315824853f4f3b17122b7119425d180650695bc12e1a30f5b30c6ef684be7c08b2bc677ca2f0668d0335d92e2bf78
 DIST xen-4.14.2.tar.gz 39973157 BLAKE2B db5d3570f79e0fd97872f5e5dd57a4eb39e005728387bfef3b51fabe1c693cfd8108d09b1026f5a5a7eb79de71be6f4af36d252f7e0b35a65a1567b7949e3e29 SHA512 83c9333b70dbee3e29c6bf08e5ad030676e6c4a32b976f3f5e6a8f8d0dd9e4898bac88dd8e1c9d2ad3509cebb5d212e1745f9392a469d7afeb841d79801ccf39
-DIST xen-4.15.0-upstream-patches-0.tar.xz 15744 BLAKE2B e2abb68524a7c190db8d91beb79731aea5290e82f54fb21218739dab666f6f5ea85c203575ec248b46830f1862408d50d3ceea1104fcd9325babfccf3574c515 SHA512 f1a2800d15a61f08eda4d6bafaead95a9d72cc9e4d90a19278d89c696b7e2d5d6353b28dba7ed0eb0c9aeb8604d3697db6a8f4ac38047e2510279d88181752f9
 DIST xen-4.15.0-upstream-patches-1.tar.xz 35180 BLAKE2B eb3b2a44b717a04daa4a2f158040cce78b42cba5a72c437d7b2f8f1237b808f6f13c2140d82e95056818db6c0eb706ebd7dead822a6a4e689e5d5e7c83523fdb SHA512 a7cfe2dbc82b15c48fa781a77b3ca1622fc2feac3874bf17cf56e82be46e9817913f94992e0e1a1cd2be2e719d4abb9a15744c8a1017e30c0d5c01d7db64dbb5
 DIST xen-4.15.0.tar.gz 40785399 BLAKE2B 8b0530f5516c39656506f4bb705952da0555a8ab7f47323473b171caeb7692f3107e9d94f13171d40576600064589eed35f4d210af02db4cc4706dd4fc202100 SHA512 93683b8a97387ca5f003c635a11d163e61c87dbdc9a03081f9155fe87b49f1dfa74ce243fcd5e04dc009353a36e2375b786f1ebde828b5951a094cd64197b4c7
 DIST xen-gentoo-patches-21.tar.xz 18280 BLAKE2B 95446da72fc16cb82e4e51df8796c64db05a30894a351a98dbd6700ce354c34956ca09a1af98125a4e56c337936e8fae296d806519b8afa23a82b078aa0db8f1 SHA512 3cffac162606a09b10b47dca604f167897e6ac8d153411d3464ef29a7a4d46ac5b92340884cb21279cb2d053b131f1ea5cb2111e3e9a21b3298b5ab3320ee34d

diff --git a/app-emulation/xen-tools/xen-tools-4.14.2.ebuild b/app-emulation/xen-tools/xen-tools-4.14.2.ebuild
deleted file mode 100644
index 112aaab069f..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.14.2.ebuild
+++ /dev/null
@@ -1,525 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=23
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
-	EDK2_OPENSSL_VERSION="1_1_1g"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	dev-lang/perl
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${WORKDIR}/patches-gentoo/xen-tools-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-golang \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.15.0.ebuild b/app-emulation/xen-tools/xen-tools-4.15.0.ebuild
deleted file mode 100644
index c19f2eb37ad..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.15.0.ebuild
+++ /dev/null
@@ -1,532 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=23
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
-	EDK2_OPENSSL_VERSION="1_1_1g"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	dev-lang/perl
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${WORKDIR}/patches-gentoo/${P}-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-golang \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	# Currently broken
-	#use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	# Currently broken
-	#if use python; then
-		#python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		#python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	#fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-06-11 12:53 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2021-06-11 12:53 UTC (permalink / raw
  To: gentoo-commits

commit:     d0af1e15c58c107b46bbdb82f5b390c0fbac01c0
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Jun  9 07:15:53 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Jun 11 12:49:00 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0af1e15

app-emulation/xen-tools: add upstream security patches

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   1 +
 app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild | 525 +++++++++++++++++++++
 2 files changed, 526 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 41c35f702a0..92df906498e 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -7,6 +7,7 @@ DIST ipxe-git-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz 3931642 BLAKE2B bf
 DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27
 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
 DIST xen-4.13.3.tar.gz 39044539 BLAKE2B 5d0e57c76e12e1b86b78bbf561e947d70b9569a24412617a640346d2358b141a2741e7a3be454df52d198ad63e58b1519288de62330417c70e72445703f3fac2 SHA512 622127d824b9c49b57282a887fb404e0bad05ff60bccade82e4e0e9b5ad975ff9aa1fba83392e6d8379e9a15340e8ae9785c0913eb11027816e4600432eea6b6
+DIST xen-4.14.2-upstream-patches-0.tar.xz 23304 BLAKE2B 954e0a49e5c3ec122aefe52afe328f440b8a4c8db966e0fa91e0b6d6cb3c0462b75fb99b3e7392811bd2e680cd7945e8a4d68317245fd42fdf0ad6cab33fbc68 SHA512 64d243f0c8acfec87812e4d78e3d8b24a86315824853f4f3b17122b7119425d180650695bc12e1a30f5b30c6ef684be7c08b2bc677ca2f0668d0335d92e2bf78
 DIST xen-4.14.2.tar.gz 39973157 BLAKE2B db5d3570f79e0fd97872f5e5dd57a4eb39e005728387bfef3b51fabe1c693cfd8108d09b1026f5a5a7eb79de71be6f4af36d252f7e0b35a65a1567b7949e3e29 SHA512 83c9333b70dbee3e29c6bf08e5ad030676e6c4a32b976f3f5e6a8f8d0dd9e4898bac88dd8e1c9d2ad3509cebb5d212e1745f9392a469d7afeb841d79801ccf39
 DIST xen-4.15.0-upstream-patches-0.tar.xz 15744 BLAKE2B e2abb68524a7c190db8d91beb79731aea5290e82f54fb21218739dab666f6f5ea85c203575ec248b46830f1862408d50d3ceea1104fcd9325babfccf3574c515 SHA512 f1a2800d15a61f08eda4d6bafaead95a9d72cc9e4d90a19278d89c696b7e2d5d6353b28dba7ed0eb0c9aeb8604d3697db6a8f4ac38047e2510279d88181752f9
 DIST xen-4.15.0.tar.gz 40785399 BLAKE2B 8b0530f5516c39656506f4bb705952da0555a8ab7f47323473b171caeb7692f3107e9d94f13171d40576600064589eed35f4d210af02db4cc4706dd4fc202100 SHA512 93683b8a97387ca5f003c635a11d163e61c87dbdc9a03081f9155fe87b49f1dfa74ce243fcd5e04dc009353a36e2375b786f1ebde828b5951a094cd64197b4c7

diff --git a/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild
new file mode 100644
index 00000000000..6499239c8c1
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild
@@ -0,0 +1,525 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=23
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=
+
+	SEABIOS_VER="1.14.0"
+	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
+	EDK2_OPENSSL_VERSION="1_1_1g"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	dev-lang/perl
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
+		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/edk2-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${WORKDIR}/patches-gentoo/xen-tools-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-golang \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable api xenapi) \
+		$(use_enable ipxe) \
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
+		$(use_enable ocaml ocamltools) \
+		$(use_enable ovmf) \
+		$(use_enable pam) \
+		$(use_enable rombios) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-06-11 12:53 Thomas Deutschmann
  0 siblings, 0 replies; 295+ messages in thread
From: Thomas Deutschmann @ 2021-06-11 12:53 UTC (permalink / raw
  To: gentoo-commits

commit:     316ef08bd466a967a2b16f46d2815a0669949288
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Jun  9 07:17:08 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Jun 11 12:49:01 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=316ef08b

app-emulation/xen-tools: add upstream security patches

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   1 +
 app-emulation/xen-tools/xen-tools-4.15.0-r1.ebuild | 532 +++++++++++++++++++++
 2 files changed, 533 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 92df906498e..7361faa508b 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -10,6 +10,7 @@ DIST xen-4.13.3.tar.gz 39044539 BLAKE2B 5d0e57c76e12e1b86b78bbf561e947d70b9569a2
 DIST xen-4.14.2-upstream-patches-0.tar.xz 23304 BLAKE2B 954e0a49e5c3ec122aefe52afe328f440b8a4c8db966e0fa91e0b6d6cb3c0462b75fb99b3e7392811bd2e680cd7945e8a4d68317245fd42fdf0ad6cab33fbc68 SHA512 64d243f0c8acfec87812e4d78e3d8b24a86315824853f4f3b17122b7119425d180650695bc12e1a30f5b30c6ef684be7c08b2bc677ca2f0668d0335d92e2bf78
 DIST xen-4.14.2.tar.gz 39973157 BLAKE2B db5d3570f79e0fd97872f5e5dd57a4eb39e005728387bfef3b51fabe1c693cfd8108d09b1026f5a5a7eb79de71be6f4af36d252f7e0b35a65a1567b7949e3e29 SHA512 83c9333b70dbee3e29c6bf08e5ad030676e6c4a32b976f3f5e6a8f8d0dd9e4898bac88dd8e1c9d2ad3509cebb5d212e1745f9392a469d7afeb841d79801ccf39
 DIST xen-4.15.0-upstream-patches-0.tar.xz 15744 BLAKE2B e2abb68524a7c190db8d91beb79731aea5290e82f54fb21218739dab666f6f5ea85c203575ec248b46830f1862408d50d3ceea1104fcd9325babfccf3574c515 SHA512 f1a2800d15a61f08eda4d6bafaead95a9d72cc9e4d90a19278d89c696b7e2d5d6353b28dba7ed0eb0c9aeb8604d3697db6a8f4ac38047e2510279d88181752f9
+DIST xen-4.15.0-upstream-patches-1.tar.xz 35180 BLAKE2B eb3b2a44b717a04daa4a2f158040cce78b42cba5a72c437d7b2f8f1237b808f6f13c2140d82e95056818db6c0eb706ebd7dead822a6a4e689e5d5e7c83523fdb SHA512 a7cfe2dbc82b15c48fa781a77b3ca1622fc2feac3874bf17cf56e82be46e9817913f94992e0e1a1cd2be2e719d4abb9a15744c8a1017e30c0d5c01d7db64dbb5
 DIST xen-4.15.0.tar.gz 40785399 BLAKE2B 8b0530f5516c39656506f4bb705952da0555a8ab7f47323473b171caeb7692f3107e9d94f13171d40576600064589eed35f4d210af02db4cc4706dd4fc202100 SHA512 93683b8a97387ca5f003c635a11d163e61c87dbdc9a03081f9155fe87b49f1dfa74ce243fcd5e04dc009353a36e2375b786f1ebde828b5951a094cd64197b4c7
 DIST xen-gentoo-patches-21.tar.xz 18280 BLAKE2B 95446da72fc16cb82e4e51df8796c64db05a30894a351a98dbd6700ce354c34956ca09a1af98125a4e56c337936e8fae296d806519b8afa23a82b078aa0db8f1 SHA512 3cffac162606a09b10b47dca604f167897e6ac8d153411d3464ef29a7a4d46ac5b92340884cb21279cb2d053b131f1ea5cb2111e3e9a21b3298b5ab3320ee34d
 DIST xen-gentoo-patches-23.tar.xz 20536 BLAKE2B 0064f79f8794a21ab13047a4ee296e37efa616e16ca6cd65b31fdafeb458fd9b80f0443758343c8328b1901d7169618346becfe75f16dcaeff08fc975f1d08d5 SHA512 09248e17ff7865feb2a505169d62ee5c8c60bd672fa8c4c7c4e3a2e4af58bfad0379d37b395bab3e3393af8d53d882f56749dfeb560edeea6b7ab56c902a3c49

diff --git a/app-emulation/xen-tools/xen-tools-4.15.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.0-r1.ebuild
new file mode 100644
index 00000000000..c062f81eb41
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.15.0-r1.ebuild
@@ -0,0 +1,532 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=1
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=23
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=
+
+	SEABIOS_VER="1.14.0"
+	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
+	EDK2_OPENSSL_VERSION="1_1_1g"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	dev-lang/perl
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_MULTI_USEDEP}]
+		pam? ( dev-python/pypam[${PYTHON_MULTI_USEDEP}] )
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_MULTI_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		>=dev-lang/ocaml-4 )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/edk2-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${WORKDIR}/patches-gentoo/${P}-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-golang \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable api xenapi) \
+		$(use_enable ipxe) \
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
+		$(use_enable ocaml ocamltools) \
+		$(use_enable ovmf) \
+		$(use_enable pam) \
+		$(use_enable rombios) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	# Currently broken
+	#use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	# Currently broken
+	#if use python; then
+		#python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		#python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	#fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-06-12 14:00 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2021-06-12 14:00 UTC (permalink / raw
  To: gentoo-commits

commit:     d7c39726d5b4ab7a2f8563e249d1d81406fbedd4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 12 13:59:29 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 12 13:59:29 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7c39726

app-emulation/xen-tools: Stabilize 4.14.2-r1 amd64, #795054

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild
index 6499239c8c1..b68bca23556 100644
--- a/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild
@@ -16,7 +16,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-06-12 14:00 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2021-06-12 14:00 UTC (permalink / raw
  To: gentoo-commits

commit:     b8bb3000a1dcacaad2e603879d16b28c4f416afa
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 12 13:59:54 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jun 12 13:59:54 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b8bb3000

app-emulation/xen-tools: Stabilize 4.14.2-r1 x86, #795054

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild
index b68bca23556..7831e54c9fd 100644
--- a/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild
@@ -16,7 +16,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=0
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-09-21  6:35 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2021-09-21  6:35 UTC (permalink / raw
  To: gentoo-commits

commit:     2af3972ff8342917a07e8c408efa62bd9e986d12
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 21 06:35:06 2021 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Tue Sep 21 06:35:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2af3972f

app-emulation/xen-tools: amd64 stable wrt bug #813861

Package-Manager: Portage-3.0.20, Repoman-3.0.3
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.14.3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.14.3.ebuild b/app-emulation/xen-tools/xen-tools-4.14.3.ebuild
index 9e6332bf358..724c2981817 100644
--- a/app-emulation/xen-tools/xen-tools-4.14.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.14.3.ebuild
@@ -16,7 +16,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 	UPSTREAM_VER=
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-09-22  6:58 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2021-09-22  6:58 UTC (permalink / raw
  To: gentoo-commits

commit:     f16413995953a3bc79eab4cdb0f42df0f100df01
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 22 06:57:14 2021 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Wed Sep 22 06:57:14 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1641399

app-emulation/xen-tools: x86 stable wrt bug #813861

Package-Manager: Portage-3.0.20, Repoman-3.0.3
RepoMan-Options: --include-arches="x86"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.14.3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.14.3.ebuild b/app-emulation/xen-tools/xen-tools-4.14.3.ebuild
index 724c2981817..550d43d8b60 100644
--- a/app-emulation/xen-tools/xen-tools-4.14.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.14.3.ebuild
@@ -16,7 +16,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-10-20  9:59 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2021-10-20  9:59 UTC (permalink / raw
  To: gentoo-commits

commit:     bc35f179dbd396d37e86d7dfaacbbe37b85cc4bd
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue Oct 12 06:47:59 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 20 09:59:25 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc35f179

app-emulation/xen-tools: drop old

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   4 -
 app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild | 525 --------------------
 app-emulation/xen-tools/xen-tools-4.15.0-r2.ebuild | 532 --------------------
 app-emulation/xen-tools/xen-tools-4.15.1.ebuild    | 540 ---------------------
 4 files changed, 1601 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 20fa1bbabfd..d7ffa4f1fbb 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,10 +6,6 @@ DIST edk2-06dc822d045c2bb42e497487935485302486e151.tar.gz 13192042 BLAKE2B 81afa
 DIST edk2-a3741780fe3535e19e02efa869a7cac481891129.tar.gz 12886279 BLAKE2B 2054bb84375b9840b31276f86786ea764368da200087e45c0528f2ca6b17aa9078a05e406bafa41c25cd65971ff007dfa19ffe91f9a5a2ab6c845bc6f62df3de SHA512 ca0543fefeb1fdc8d0d9841de309ce40fe88220463569a77f56d3fe3184fd4a57ce00b3c96c0861a51b7dbf5f4a9f9946b960a636593682f380c861f2606d190
 DIST ipxe-git-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz 3931642 BLAKE2B bf0b5d9ea1d44803bc5c4aa0bf9188636e292b226ab759f32e3c2bfa3f80dd3f546526b9a11c1f67193793ede5309bfa67bdce80aba62ccca54597dc6e7e4ba4 SHA512 0a63f83c9135d05c6bfe7c4d12da3ff76271e35305a4d5654bd5aefa9ee59f5363546c65820c42133deb0fb5a0a0bcaa9b1c48396f9f996acea0d492a5f03f33
 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
-DIST xen-4.14.2-upstream-patches-0.tar.xz 23304 BLAKE2B 954e0a49e5c3ec122aefe52afe328f440b8a4c8db966e0fa91e0b6d6cb3c0462b75fb99b3e7392811bd2e680cd7945e8a4d68317245fd42fdf0ad6cab33fbc68 SHA512 64d243f0c8acfec87812e4d78e3d8b24a86315824853f4f3b17122b7119425d180650695bc12e1a30f5b30c6ef684be7c08b2bc677ca2f0668d0335d92e2bf78
-DIST xen-4.14.2.tar.gz 39973157 BLAKE2B db5d3570f79e0fd97872f5e5dd57a4eb39e005728387bfef3b51fabe1c693cfd8108d09b1026f5a5a7eb79de71be6f4af36d252f7e0b35a65a1567b7949e3e29 SHA512 83c9333b70dbee3e29c6bf08e5ad030676e6c4a32b976f3f5e6a8f8d0dd9e4898bac88dd8e1c9d2ad3509cebb5d212e1745f9392a469d7afeb841d79801ccf39
 DIST xen-4.14.3.tar.gz 39982036 BLAKE2B 927fd2937f451567238702430cea3a6e5d2db70d5eef10f029bb1d6d030681573c851eb8076c8bad89c97c115f81a19ac8e46e78ca3f0e642565f7300c264ca1 SHA512 b462fcc1549f6e57f7f2a4fd10ce1e957a25a6a7c0319672b62699468f6c4330b9cd0cf2b0231b5cce94f4bb142a957eb8aa58aa0ffb5c85b37211d6b34ccf16
-DIST xen-4.15.0-upstream-patches-1.tar.xz 35180 BLAKE2B eb3b2a44b717a04daa4a2f158040cce78b42cba5a72c437d7b2f8f1237b808f6f13c2140d82e95056818db6c0eb706ebd7dead822a6a4e689e5d5e7c83523fdb SHA512 a7cfe2dbc82b15c48fa781a77b3ca1622fc2feac3874bf17cf56e82be46e9817913f94992e0e1a1cd2be2e719d4abb9a15744c8a1017e30c0d5c01d7db64dbb5
-DIST xen-4.15.0.tar.gz 40785399 BLAKE2B 8b0530f5516c39656506f4bb705952da0555a8ab7f47323473b171caeb7692f3107e9d94f13171d40576600064589eed35f4d210af02db4cc4706dd4fc202100 SHA512 93683b8a97387ca5f003c635a11d163e61c87dbdc9a03081f9155fe87b49f1dfa74ce243fcd5e04dc009353a36e2375b786f1ebde828b5951a094cd64197b4c7
 DIST xen-4.15.1.tar.gz 40800852 BLAKE2B 39475ea33f029fb0e84b82b4a2b13fd613bab01e3ef6c241dfede3d190ee9be53c99b62121d37d83b1e078764b3e4d88d1dfb99be1b5623691e56519850c6798 SHA512 8d3cbdf708f46477e32ee7cbd16a490c82efa855cecd84ee712b8680df4d69c987ba9ab00ff3851f627b98a8ebbc5dab71f92f142ed958ee2bc538bc792cd4b9
 DIST xen-gentoo-patches-23.tar.xz 20536 BLAKE2B 0064f79f8794a21ab13047a4ee296e37efa616e16ca6cd65b31fdafeb458fd9b80f0443758343c8328b1901d7169618346becfe75f16dcaeff08fc975f1d08d5 SHA512 09248e17ff7865feb2a505169d62ee5c8c60bd672fa8c4c7c4e3a2e4af58bfad0379d37b395bab3e3393af8d53d882f56749dfeb560edeea6b7ab56c902a3c49

diff --git a/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild
deleted file mode 100644
index c2b251d44cd..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.14.2-r1.ebuild
+++ /dev/null
@@ -1,525 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=23
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
-	EDK2_OPENSSL_VERSION="1_1_1g"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	dev-lang/perl
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${WORKDIR}/patches-gentoo/xen-tools-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-golang \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.15.0-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.15.0-r2.ebuild
deleted file mode 100644
index fd9eb3bf75c..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.15.0-r2.ebuild
+++ /dev/null
@@ -1,532 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=1
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=23
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
-	EDK2_OPENSSL_VERSION="1_1_1g"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc flask +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	dev-lang/perl
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		>=dev-lang/ocaml-4 )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-PATCHES=( "${FILESDIR}/${P}-fix-xenstat-python-bindings.patch" )
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${WORKDIR}/patches-gentoo/${P}-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-golang \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.15.1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.1.ebuild
deleted file mode 100644
index 45c217b88f1..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.15.1.ebuild
+++ /dev/null
@@ -1,540 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=23
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
-	EDK2_OPENSSL_VERSION="1_1_1g"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-PATCHES=( "${FILESDIR}/${PN}-4.15.0-fix-xenstat-python-bindings.patch" )
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${WORKDIR}/patches-gentoo/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-golang \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-10-20  9:59 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2021-10-20  9:59 UTC (permalink / raw
  To: gentoo-commits

commit:     f1ef5cc35666c52d39b992e8743806e5c75adba8
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue Oct 12 09:23:04 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 20 09:59:27 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1ef5cc3

app-emulation/xen-tools: drop unused flask use flag

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/22562
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/metadata.xml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
index 16f1b5da5c7..fb98e4a0183 100644
--- a/app-emulation/xen-tools/metadata.xml
+++ b/app-emulation/xen-tools/metadata.xml
@@ -15,7 +15,6 @@
 	</maintainer>
 	<use>
 		<flag name="api">Build the C libxenapi bindings</flag>
-		<flag name="flask">Enable the Flask XSM module from NSA</flag>
 		<flag name="hvm">Enable support for hardware based virtualization (VT-x,AMD-v)</flag>
 		<flag name="ipxe">Enable ipxe support</flag>
 		<flag name="ovmf">Enable support to boot UEFI guest vm, needed by hvm</flag>


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2021-10-21  4:20 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2021-10-21  4:20 UTC (permalink / raw
  To: gentoo-commits

commit:     23193fac82f2300d9d565d08594ac6d7ee7c4689
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Oct 20 12:41:43 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Oct 21 04:19:53 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23193fac

app-emulation/xen-tools: drop old

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/22645
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.1-r1.ebuild | 553 ---------------------
 1 file changed, 553 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.1-r1.ebuild
deleted file mode 100644
index 14a3eb3c222..00000000000
--- a/app-emulation/xen-tools/xen-tools-4.15.1-r1.ebuild
+++ /dev/null
@@ -1,553 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=23
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="a3741780fe3535e19e02efa869a7cac481891129"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-PATCHES=( "${FILESDIR}/${PN}-4.15.0-fix-xenstat-python-bindings.patch" )
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-edk2-python3.9.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${WORKDIR}/patches-gentoo/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-golang \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-01-08 18:03 Jakov Smolić
  0 siblings, 0 replies; 295+ messages in thread
From: Jakov Smolić @ 2022-01-08 18:03 UTC (permalink / raw
  To: gentoo-commits

commit:     eb8fc579c619b302ec92a29f5ba36dde5b585053
Author:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Sat Jan  8 18:02:04 2022 +0000
Commit:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Sat Jan  8 18:02:04 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb8fc579

app-emulation/xen-tools: Stabilize 4.15.1-r2 x86, #830799

Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild
index 1bd53de373b8..09fbb10d3318 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -16,7 +16,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-01-09  1:10 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2022-01-09  1:10 UTC (permalink / raw
  To: gentoo-commits

commit:     4fdde7fe6efe6b86df596d770e4afb135d766d04
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  9 01:09:23 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jan  9 01:09:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fdde7fe

app-emulation/xen-tools: Stabilize 4.15.1-r2 amd64, #830799

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild
index 09fbb10d3318..04d25574dae1 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild
@@ -16,7 +16,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=1
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-02-18  3:06 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2022-02-18  3:06 UTC (permalink / raw
  To: gentoo-commits

commit:     66d94c953f04e1bf6abd39d29e506a205d69f29f
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Jan 28 08:25:02 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 18 02:52:41 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66d94c95

app-emulation/xen-tools: drop old

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/23993
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   3 -
 app-emulation/xen-tools/xen-tools-4.14.3.ebuild | 533 ------------------------
 2 files changed, 536 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 371887eb4836..34f961248c85 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,14 +1,11 @@
-DIST OpenSSL_1_1_1g.tar.gz 9975550 BLAKE2B 22efa4ffe5d56a861bc4e2e1bc9a558e79265a3789acd9ca65d0a1162a1808a089a92a234e88c951f2a3cdabd3b1908ac7fe6d5f2b5fe554f229a22c11ab185b SHA512 bc8d24d7fc93542a8d77e13a57768de242ef679ef4db93c1b6b981a15a60646a5c5d869d066248448f3eb1ab2012e3ddc80bf301f486c0574d469a3f7db7b8d4
 DIST OpenSSL_1_1_1j.tar.gz 9994760 BLAKE2B 749886716739dcb909bd79b29cf714640b64039917f64f6cfc4bee9861e797380d0df9ff11d7f6bb084508b322cb0db4ef7a2f871ee304548ec919d387cdb2c5 SHA512 f94ef129514e69b70f800a599ae726eff6a2fac0dfa8e42982973d1328f6fac6b1da1124e1a7b8aa3d579b720ecf9c71a8bae45db6b1630c052b0c3a22b9360e
 DIST berkeley-softfloat-b64af41c3276f97f0e181920400ee056b9c88037.tar.gz 148741 BLAKE2B 72014022926b636147e202d74c42df2ce9cfed00b91c275d5b2e0afbc5c68765445cbe7ac6389d7c2512bd1d45b0e16e999936552d09bbc733ab66c92968bd31 SHA512 8420c29faa7ff57e06d6758b03e81ca0630c59946bc031e8611f1449e23634cf901b502161f2c1423c0cff949b5481445e36a3aa53dc885b61ca2c673b3ba567
 DIST brotli-666c3280cc11dc433c303d79a83d4ffbdd12cc8d.tar.gz 23855739 BLAKE2B 7406ec5b29ac66afbcd7c1376bb3208f298d19b6592b2869c52173aa64947d58bd443f9a61c67deaf046be910a0e31c0b843e5508e97e0e1f5e7bce100d86904 SHA512 df8e90562c4fd7f0e787949df6bc4f5a165b39bd333f442d27874fe65640fbba268f9350d7113e6761a5acceb66d78e75f1a296e5a89b94574edf28109cdc812
-DIST edk2-06dc822d045c2bb42e497487935485302486e151.tar.gz 13192042 BLAKE2B 81afa7fd5f6f14fff35baa3c6c64583fa21c7b793ed847a3362fd05a926bb4402db911f9f78f4ffd76a6de9b815171dfa245ae41afac3b022cd108597e8c1ac3 SHA512 a032a1496db7ddc32a7d6d1a7d5fe4122ab43b13547ec019855166d785f162268ad82ceb3c41efafe1687e73fc72599ee6852741652451e1cb329fd655c69b6c
 DIST edk2-7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5.tar.gz 13998677 BLAKE2B 3614ceb69e295a6afb37c7905d0aec3534d8daf3d9f22137c1b722da6dc764a3669d99af03f96155d45feb5058a6f725acf37d1048186fecff4232d64f96e97c SHA512 a1933d815b947fd4f13c96970a6dc36c3048e3ddf27c897684104b0129cf58331e46d3147062ae1fb8973f08cd373c319788dd850ac5e45da385eed8368571a4
 DIST edk2-a3741780fe3535e19e02efa869a7cac481891129.tar.gz 12886279 BLAKE2B 2054bb84375b9840b31276f86786ea764368da200087e45c0528f2ca6b17aa9078a05e406bafa41c25cd65971ff007dfa19ffe91f9a5a2ab6c845bc6f62df3de SHA512 ca0543fefeb1fdc8d0d9841de309ce40fe88220463569a77f56d3fe3184fd4a57ce00b3c96c0861a51b7dbf5f4a9f9946b960a636593682f380c861f2606d190
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
 DIST ipxe-git-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz 3931642 BLAKE2B bf0b5d9ea1d44803bc5c4aa0bf9188636e292b226ab759f32e3c2bfa3f80dd3f546526b9a11c1f67193793ede5309bfa67bdce80aba62ccca54597dc6e7e4ba4 SHA512 0a63f83c9135d05c6bfe7c4d12da3ff76271e35305a4d5654bd5aefa9ee59f5363546c65820c42133deb0fb5a0a0bcaa9b1c48396f9f996acea0d492a5f03f33
 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
-DIST xen-4.14.3.tar.gz 39982036 BLAKE2B 927fd2937f451567238702430cea3a6e5d2db70d5eef10f029bb1d6d030681573c851eb8076c8bad89c97c115f81a19ac8e46e78ca3f0e642565f7300c264ca1 SHA512 b462fcc1549f6e57f7f2a4fd10ce1e957a25a6a7c0319672b62699468f6c4330b9cd0cf2b0231b5cce94f4bb142a957eb8aa58aa0ffb5c85b37211d6b34ccf16
 DIST xen-4.15.1-upstream-patches-1.tar.xz 15476 BLAKE2B 9f0cf8f3dd993e32939ff1ee35244224bd3d16fbd345500ff01e51eb5828d3e44bddc539462c39d8c37b6497d4bf8887261a8df5d31b17b413b0c21f7faf3a84 SHA512 aac3f91c3c753aa8430abad055252cba5dbdfd9e548f219df1452388ef2f82b65c428755363aa0645824431e812f3b799af4f9468669e42a0f5b6b8874397c75
 DIST xen-4.15.1.tar.gz 40800852 BLAKE2B 39475ea33f029fb0e84b82b4a2b13fd613bab01e3ef6c241dfede3d190ee9be53c99b62121d37d83b1e078764b3e4d88d1dfb99be1b5623691e56519850c6798 SHA512 8d3cbdf708f46477e32ee7cbd16a490c82efa855cecd84ee712b8680df4d69c987ba9ab00ff3851f627b98a8ebbc5dab71f92f142ed958ee2bc538bc792cd4b9
 DIST xen-4.16.0.tar.gz 44982322 BLAKE2B 7e16a93b3f1131e2b10307fabc10641a9c5983173155b9a35eaf6ff317b6a747bccf6b8c87c06686830acc2c4bd3e19e5867eb443eabac9a1e4ee59124dfa87f SHA512 2869ed90d1779c9754d7f2397f5fc67a655304d9c32953ac20655ef96cb154521d8fce9f23915ac0c91f984dc54f72c67e5e619e2da318b5997748f44cf21b87

diff --git a/app-emulation/xen-tools/xen-tools-4.14.3.ebuild b/app-emulation/xen-tools/xen-tools-4.14.3.ebuild
deleted file mode 100644
index 550d43d8b601..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.14.3.ebuild
+++ /dev/null
@@ -1,533 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=23
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="06dc822d045c2bb42e497487935485302486e151"
-	EDK2_OPENSSL_VERSION="1_1_1g"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${WORKDIR}/patches-gentoo/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-	sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-golang \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/xenstat/libxenstat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-04-14  5:54 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-04-14  5:54 UTC (permalink / raw
  To: gentoo-commits

commit:     30d20e45eb93ad46041b3fb7738c42d94c39007d
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Sun Apr 10 05:14:11 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Apr 14 05:53:27 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30d20e45

app-emulation/xen-tools: add upstream patches

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 +
 app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild | 556 ++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild | 558 +++++++++++++++++++++
 3 files changed, 1116 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 4ab68d105403..7cfaeea51f7e 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -9,7 +9,9 @@ DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c
 DIST xen-4.15.1-upstream-patches-1.tar.xz 15476 BLAKE2B 9f0cf8f3dd993e32939ff1ee35244224bd3d16fbd345500ff01e51eb5828d3e44bddc539462c39d8c37b6497d4bf8887261a8df5d31b17b413b0c21f7faf3a84 SHA512 aac3f91c3c753aa8430abad055252cba5dbdfd9e548f219df1452388ef2f82b65c428755363aa0645824431e812f3b799af4f9468669e42a0f5b6b8874397c75
 DIST xen-4.15.1.tar.gz 40800852 BLAKE2B 39475ea33f029fb0e84b82b4a2b13fd613bab01e3ef6c241dfede3d190ee9be53c99b62121d37d83b1e078764b3e4d88d1dfb99be1b5623691e56519850c6798 SHA512 8d3cbdf708f46477e32ee7cbd16a490c82efa855cecd84ee712b8680df4d69c987ba9ab00ff3851f627b98a8ebbc5dab71f92f142ed958ee2bc538bc792cd4b9
 DIST xen-4.15.2-upstream-patches-0.tar.xz 33368 BLAKE2B f22c0e9ce6b859a2741f09c0c52479e8acb38440b631882850993fcfcdc445c28fbeac4353df6bac1b2be89e39a99bae1a920796d505f888e3701a98f17ed29d SHA512 10a996cd87404ff6536119deeedfe67143c02475c4ca2d7f741e087197aaffa10c5831aad1f9ee2f9070461dd8cdc7af4851fbafb634a2f65235603d6fb0848f
+DIST xen-4.15.2-upstream-patches-2.tar.xz 93208 BLAKE2B 5b01953ba93551830e533cf7e9e8675a44ed6c2ad3da152e0b5feeb3782b9bc3a1a0a7c0a84ac1de8ed7146fcf364db7604ea269ee243438df34c91b4b6acc5b SHA512 c2f585223d3d9e08d08b295c0f35e4856e4801d214cf0a1f925585c28a7a25cb3b82a5f5e7d41d35b2c746d5a307cd5b5a369d5342f35681e227d8ce91e741c2
 DIST xen-4.15.2.tar.gz 40773378 BLAKE2B 7c3e3bb066505f9838cd7c56d85debc64e5ed32cf4d4edf699ff843db49bee916e6eb46d07e5cd9021c2644bba0628a2aa567f60ace26c6d7ee5922643e04104 SHA512 1cbf988fa8ed38b7ad724978958092ca0e5506e38c709c7d1af196fb8cb8ec0197a79867782761ef230b268624b3d7a0d5d0cd186f37d25f495085c71bf70d54
+DIST xen-4.16.0-upstream-patches-2.tar.xz 111668 BLAKE2B e8bbedb7cc50f7a6cb1a3869f0165cce3d02c33f04b935384e770aa5206e6aa6cb51329c5d69375391a8781ba23f20c35e06406d5164720d253b405a77f5aee9 SHA512 6b6770117e81ae407e3ded0e366b14f3fa2411cc93a95187db27548c3dd17a1f85e60fc3971b008693297ad97aa0c5fa7b4d88e01d67a972f39e51bf0a2cf39d
 DIST xen-4.16.0.tar.gz 44982322 BLAKE2B 7e16a93b3f1131e2b10307fabc10641a9c5983173155b9a35eaf6ff317b6a747bccf6b8c87c06686830acc2c4bd3e19e5867eb443eabac9a1e4ee59124dfa87f SHA512 2869ed90d1779c9754d7f2397f5fc67a655304d9c32953ac20655ef96cb154521d8fce9f23915ac0c91f984dc54f72c67e5e619e2da318b5997748f44cf21b87
 DIST xen-gentoo-patches-23.tar.xz 20536 BLAKE2B 0064f79f8794a21ab13047a4ee296e37efa616e16ca6cd65b31fdafeb458fd9b80f0443758343c8328b1901d7169618346becfe75f16dcaeff08fc975f1d08d5 SHA512 09248e17ff7865feb2a505169d62ee5c8c60bd672fa8c4c7c4e3a2e4af58bfad0379d37b395bab3e3393af8d53d882f56749dfeb560edeea6b7ab56c902a3c49
 DIST xen-gentoo-patches-24.tar.xz 20952 BLAKE2B 292ea384f007a9615ca840068c45cd0e37a63a59e596c9c87a278a0136805327c85f5e5576eac751e40bda616559e413b396d313d43f2d36d904f09a41b0d302 SHA512 26b7344cea40ef44d1eaec330465071c96ee27a5b0ca91f787fc80c6801abed47cab9050a40ef80f20471a7cd9ee0dc7aaa46b16e5af7d0e50643ccc7d3a828b

diff --git a/app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild
new file mode 100644
index 000000000000..802b8f8d55f5
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild
@@ -0,0 +1,556 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=2
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=23
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=
+
+	SEABIOS_VER="1.14.0"
+	EDK2_COMMIT="a3741780fe3535e19e02efa869a7cac481891129"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+		pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+PATCHES=( "${FILESDIR}/${PN}-4.15.0-fix-xenstat-python-bindings.patch" )
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/edk2-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-edk2-python3.9.patch"
+		popd > /dev/null
+	fi
+
+	# Fix building with ocaml 4.12 #818100
+	eapply "${FILESDIR}/${PN}-4.15.1-ocaml-4.12.patch"
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${WORKDIR}/patches-gentoo/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-golang \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable api xenapi) \
+		$(use_enable ipxe) \
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
+		$(use_enable ocaml ocamltools) \
+		$(use_enable ovmf) \
+		$(use_enable pam) \
+		$(use_enable rombios) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild
new file mode 100644
index 000000000000..72e135b35878
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild
@@ -0,0 +1,558 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	UPSTREAM_VER=2
+	SECURITY_VER=
+	# xen-tools's gentoo patches tarball
+	GENTOO_VER=24
+	# xen-tools's gentoo patches version which apply to this specific ebuild
+	GENTOO_GPV=0
+	# xen-tools ovmf's patches
+	OVMF_VER=
+
+	SEABIOS_VER="1.14.0"
+	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	[[ -n ${OVMF_VER} ]] && \
+		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
+
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+		${OVMF_PATCHSET_URI} )
+	${UPSTREAM_PATCHSET_URI}
+	${SECURITY_PATCHSET_URI}
+	${GENTOO_PATCHSET_URI}"
+
+	S="${WORKDIR}/xen-${MY_PV}"
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://www.xenproject.org"
+DOCS=( README )
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	sys-apps/pciutils
+	dev-libs/lzo:2
+	dev-libs/glib:2
+	dev-libs/yajl
+	dev-libs/libaio
+	dev-libs/libgcrypt:0
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+		pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	local i
+
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		einfo "Try to apply Xen Upstream patch set"
+		eapply "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		EPATCH_SUFFIX="patch"
+		EPATCH_FORCE="yes"
+
+		source "${WORKDIR}"/patches-security/${PV}.conf || die
+
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+
+		# apply qemu-xen/upstream patches
+		pushd "${S}"/tools/qemu-xen/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUU}; do
+			eapply "${WORKDIR}"/patches-security/qemuu/$i
+		done
+		popd > /dev/null
+
+		# apply qemu-traditional patches
+		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
+		for i in ${XEN_SECURITY_QEMUT}; do
+			eapply "${WORKDIR}"/patches-security/qemut/$i
+		done
+		popd > /dev/null
+	fi
+
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
+		einfo "Try to apply Gentoo specific patch set"
+		source "${FILESDIR}"/gentoo-patches.conf || die
+		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
+		for i in ${!_gpv}; do
+			eapply "${WORKDIR}"/patches-gentoo/$i
+		done
+	fi
+
+	# Ovmf's patchset
+	if use ovmf; then
+		if [[ -n ${OVMF_VER} ]];then
+			einfo "Try to apply Ovmf patch set"
+			pushd "${WORKDIR}"/edk2-*/ > /dev/null
+			eapply "${WORKDIR}"/patches-ovmf
+			popd > /dev/null
+		fi
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${WORKDIR}/patches-gentoo/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
+	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
+		-i tools/firmware/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
+		-i Config.mk || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	default
+}
+
+src_configure() {
+	local myconf="--prefix=${PREFIX}/usr \
+		--libdir=${PREFIX}/usr/$(get_libdir) \
+		--libexecdir=${PREFIX}/usr/libexec \
+		--localstatedir=${EPREFIX}/var \
+		--disable-golang \
+		--disable-werror \
+		--disable-xen \
+		--enable-tools \
+		--enable-docs \
+		$(use_enable api xenapi) \
+		$(use_enable ipxe) \
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
+		$(use_enable ocaml ocamltools) \
+		$(use_enable ovmf) \
+		$(use_enable pam) \
+		$(use_enable rombios) \
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
+		"
+
+	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
+	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
+	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-04-14  5:54 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-04-14  5:54 UTC (permalink / raw
  To: gentoo-commits

commit:     86bfdea949a16062c421eaeef3931a19687db734
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Sun Apr 10 05:24:21 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Apr 14 05:53:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86bfdea9

app-emulation/xen-tools: drop old

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/24969
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.0.ebuild | 558 ------------------------
 1 file changed, 558 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0.ebuild
deleted file mode 100644
index 358a84ca6d7c..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.0.ebuild
+++ /dev/null
@@ -1,558 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=24
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${WORKDIR}/patches-gentoo/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-golang \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-04-17 14:04 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-04-17 14:04 UTC (permalink / raw
  To: gentoo-commits

commit:     e344edc51afe402105fdef10b9feb48e9b738af8
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 13:16:30 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 14:03:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e344edc5

app-emulation/xen-tools: convert myconf to array, drop effectles sed

Also removes the unecessary --prefix argument, which econf does by
default since a few EAPIs.

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild | 54 +++++++++-------------
 1 file changed, 23 insertions(+), 31 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild
index 72e135b35878..b788301f56fb 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild
@@ -318,10 +318,6 @@ src_prepare() {
 	# Fix texi2html build error with new texi2html, qemu.doc.html
 	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
 
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
 	# Drop .config, fixes to gcc-4.6
 	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
 
@@ -363,10 +359,6 @@ src_prepare() {
 		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
 	fi
 
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-
 	# xencommons, Bug #492332, sed lighter weight than patching
 	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
 		-i tools/hotplug/Linux/init.d/xencommons.in || die
@@ -418,30 +410,30 @@ src_prepare() {
 }
 
 src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-golang \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
+	local myconf=(
+		--libdir=${PREFIX}/usr/$(get_libdir)
+		--libexecdir=${PREFIX}/usr/libexec
+		--localstatedir=${EPREFIX}/var
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable pam)
+		$(use_enable rombios)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
 	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
+	econf ${myconf[@]}
 }
 
 src_compile() {


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-04-17 22:16 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-04-17 22:16 UTC (permalink / raw
  To: gentoo-commits

commit:     9118f7b507ff604a6d7ef142f9bb9890fd67baf2
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 22:13:39 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 22:16:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9118f7b5

app-emulation/xen-tools: reinstate fix for bash completion

This sed was dropped with 4.16, probably because it could not be used
verbatim from the 4.15 ebuilds. This reinstates the fix with a slightly
modified sed expression and while adjusting the path to
config/Paths.mk.in (was Config.mk).

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 .../{xen-tools-4.16.0-r1.ebuild => xen-tools-4.16.0-r2.ebuild}        | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r2.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild
rename to app-emulation/xen-tools/xen-tools-4.16.0-r2.ebuild
index 43eb6b355c52..280ccd68b1e4 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.0-r2.ebuild
@@ -359,6 +359,10 @@ src_prepare() {
 		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
 	fi
 
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
 	# xencommons, Bug #492332, sed lighter weight than patching
 	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
 		-i tools/hotplug/Linux/init.d/xencommons.in || die


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-04-17 22:16 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-04-17 22:16 UTC (permalink / raw
  To: gentoo-commits

commit:     4ce769c4ec4ddb9d19db45ca3f260d7234f07da4
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 21:51:17 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 21:52:07 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ce769c4

app-emulation/xen-tools: add 'systemd' use flag

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild
index b788301f56fb..04dce9e80ff1 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild
@@ -69,7 +69,7 @@ SLOT="0/$(ver_cut 1-2)"
 # Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
 # >=dev-lang/ocaml-4 stable
 # Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
+IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd"
 
 REQUIRED_USE="
 	${PYTHON_REQUIRED_USE}
@@ -426,6 +426,7 @@ src_configure() {
 		$(use_enable ovmf)
 		$(use_enable pam)
 		$(use_enable rombios)
+		$(use_enable systemd)
 		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
 	)
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-04-17 22:16 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-04-17 22:16 UTC (permalink / raw
  To: gentoo-commits

commit:     40271ac0da82a550716886cc11c4613668fdd8d5
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 21:53:26 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 21:53:26 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40271ac0

app-emulation/xen-tools: update HOMEPAGE

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.15.2.ebuild    | 2 +-
 app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild
index 04d25574dae1..746c16ee9f20 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild
@@ -61,7 +61,7 @@ else
 fi
 
 DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
+HOMEPAGE="https://xenproject.org"
 DOCS=( README )
 
 LICENSE="GPL-2"

diff --git a/app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild
index 802b8f8d55f5..2f6e74c4eca4 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild
@@ -61,7 +61,7 @@ else
 fi
 
 DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
+HOMEPAGE="https://xenproject.org"
 DOCS=( README )
 
 LICENSE="GPL-2"

diff --git a/app-emulation/xen-tools/xen-tools-4.15.2.ebuild b/app-emulation/xen-tools/xen-tools-4.15.2.ebuild
index e15386a8efc6..7d7d59cc6873 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.2.ebuild
@@ -61,7 +61,7 @@ else
 fi
 
 DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
+HOMEPAGE="https://xenproject.org"
 DOCS=( README )
 
 LICENSE="GPL-2"

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild
index 04dce9e80ff1..43eb6b355c52 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.0-r1.ebuild
@@ -61,7 +61,7 @@ else
 fi
 
 DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://www.xenproject.org"
+HOMEPAGE="https://xenproject.org"
 DOCS=( README )
 
 LICENSE="GPL-2"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-04-18  9:20 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-04-18  9:20 UTC (permalink / raw
  To: gentoo-commits

commit:     b142798f91d0af259097ad22ff78cc556a550a52
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 18 08:34:51 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 08:34:51 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b142798f

app-emulation/xen-tools: use https where possible

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
index 26109c86637a..719878f42f8b 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
@@ -47,7 +47,7 @@ else
 
 	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
 	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
 	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
 		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
 		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-04-18  9:20 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-04-18  9:20 UTC (permalink / raw
  To: gentoo-commits

commit:     8fb164911f73c39dbbc267ddf0cbb557b0f1970a
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 18 08:40:10 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 09:19:41 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fb16491

app-emulation/xen-tools: improve configure arguments

Use EPREFIX and properly quote the arguments.

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
index 719878f42f8b..750d5d2e6c4f 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
@@ -420,9 +420,9 @@ src_prepare() {
 
 src_configure() {
 	local myconf=(
-		--libdir=${PREFIX}/usr/$(get_libdir)
-		--libexecdir=${PREFIX}/usr/libexec
-		--localstatedir=${EPREFIX}/var
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
 		--disable-golang
 		--disable-werror
 		--disable-xen


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-04-18  9:20 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-04-18  9:20 UTC (permalink / raw
  To: gentoo-commits

commit:     2b2172d6c02b5d4391504a8d9f99aaff197ce4f4
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 18 08:32:46 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 08:34:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b2172d6

app-emulation/xen-tools: fix dependencies

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 ...-tools-4.16.0-r2.ebuild => xen-tools-4.16.0-r3.ebuild} | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
similarity index 97%
rename from app-emulation/xen-tools/xen-tools-4.16.0-r2.ebuild
rename to app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
index 280ccd68b1e4..26109c86637a 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.0-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
@@ -69,7 +69,7 @@ SLOT="0/$(ver_cut 1-2)"
 # Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
 # >=dev-lang/ocaml-4 stable
 # Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd"
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
 
 REQUIRED_USE="
 	${PYTHON_REQUIRED_USE}
@@ -82,12 +82,17 @@ REQUIRED_USE="
 	?? ( qemu system-qemu )"
 
 COMMON_DEPEND="
-	sys-apps/pciutils
+	lzma? ( app-arch/xz-utils )
+	qemu? ( dev-libs/glib:2 )
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
 	dev-libs/lzo:2
-	dev-libs/glib:2
 	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
 	sys-libs/zlib
 	${PYTHON_DEPS}
 "


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-04-22  7:05 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-04-22  7:05 UTC (permalink / raw
  To: gentoo-commits

commit:     d16a0fb4d049ecad13f64179257bf5cc4c8b06ed
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 22 07:05:09 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Apr 22 07:05:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d16a0fb4

app-emulation/xen-tools: remove -Werror

Closes: https://bugs.gentoo.org/839891
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
index 750d5d2e6c4f..5d286bc55afe 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
@@ -415,6 +415,10 @@ src_prepare() {
 	sed -e 's/$(ABI_DUMPER) /echo /g' \
 		-i tools/libs/libs.mk || die
 
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		 -exec sed -i "s/-Werror //g" {} + || die
+
 	default
 }
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-05-03 18:41 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2022-05-03 18:41 UTC (permalink / raw
  To: gentoo-commits

commit:     0828d17d30acd44d5843198fa4b5a935a2c6d897
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue May  3 18:33:31 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May  3 18:41:17 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0828d17d

app-emulation/xen-tools: replace dev-python/pypam with sys-libs/pam

It was discovered that pypam is no longer needed for xen-tools. Upstream
is dead anyway.

Qemu-xen checks for pam, so we add a dep on sys-libs/pam for USE=qemu.

Bug: https://bugs.gentoo.org/833297
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/25302
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild |  5 ++---
 app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild | 11 ++++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild
index 2f6e74c4eca4..2314461098b0 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild
@@ -69,7 +69,7 @@ SLOT="0/$(ver_cut 1-2)"
 # Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
 # >=dev-lang/ocaml-4 stable
 # Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
+IUSE="api debug doc +hvm +ipxe ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
 
 REQUIRED_USE="
 	${PYTHON_REQUIRED_USE}
@@ -82,6 +82,7 @@ REQUIRED_USE="
 	?? ( qemu system-qemu )"
 
 COMMON_DEPEND="
+	qemu? ( sys-libs/pam )
 	sys-apps/pciutils
 	dev-libs/lzo:2
 	dev-libs/glib:2
@@ -107,7 +108,6 @@ DEPEND="${COMMON_DEPEND}
 	x11-libs/pixman
 	$(python_gen_cond_dep '
 		dev-python/lxml[${PYTHON_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
 	')
 	x86? ( sys-devel/dev86
 		system-ipxe? ( sys-firmware/ipxe[qemu] )
@@ -430,7 +430,6 @@ src_configure() {
 		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
 		$(use_enable ocaml ocamltools) \
 		$(use_enable ovmf) \
-		$(use_enable pam) \
 		$(use_enable rombios) \
 		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
 		"

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
index 5d286bc55afe..d47a25185322 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
@@ -69,7 +69,7 @@ SLOT="0/$(ver_cut 1-2)"
 # Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
 # >=dev-lang/ocaml-4 stable
 # Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
 
 REQUIRED_USE="
 	${PYTHON_REQUIRED_USE}
@@ -83,7 +83,10 @@ REQUIRED_USE="
 
 COMMON_DEPEND="
 	lzma? ( app-arch/xz-utils )
-	qemu? ( dev-libs/glib:2 )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
 	zstd? ( app-arch/zstd )
 	app-arch/bzip2
 	app-arch/zstd
@@ -112,7 +115,6 @@ DEPEND="${COMMON_DEPEND}
 	x11-libs/pixman
 	$(python_gen_cond_dep '
 		dev-python/lxml[${PYTHON_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
 	')
 	x86? ( sys-devel/dev86
 		system-ipxe? ( sys-firmware/ipxe[qemu] )
@@ -417,7 +419,7 @@ src_prepare() {
 
 	# Remove -Werror
 	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i "s/-Werror //g" {} + || die
+		-exec sed -i "s/-Werror //g" {} + || die
 
 	default
 }
@@ -437,7 +439,6 @@ src_configure() {
 		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
 		$(use_enable ocaml ocamltools)
 		$(use_enable ovmf)
-		$(use_enable pam)
 		$(use_enable rombios)
 		$(use_enable systemd)
 		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-05-03 18:41 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2022-05-03 18:41 UTC (permalink / raw
  To: gentoo-commits

commit:     c126eecda5c3ec8a0da9543d6ea0ccada8deb512
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue May  3 18:24:21 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May  3 18:41:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c126eecd

app-emulation/xen-tools: drop vulnerable

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   1 -
 app-emulation/xen-tools/xen-tools-4.15.2.ebuild | 556 ------------------------
 2 files changed, 557 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 7cfaeea51f7e..72cf0c8a54af 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -8,7 +8,6 @@ DIST ipxe-git-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz 3931642 BLAKE2B bf
 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
 DIST xen-4.15.1-upstream-patches-1.tar.xz 15476 BLAKE2B 9f0cf8f3dd993e32939ff1ee35244224bd3d16fbd345500ff01e51eb5828d3e44bddc539462c39d8c37b6497d4bf8887261a8df5d31b17b413b0c21f7faf3a84 SHA512 aac3f91c3c753aa8430abad055252cba5dbdfd9e548f219df1452388ef2f82b65c428755363aa0645824431e812f3b799af4f9468669e42a0f5b6b8874397c75
 DIST xen-4.15.1.tar.gz 40800852 BLAKE2B 39475ea33f029fb0e84b82b4a2b13fd613bab01e3ef6c241dfede3d190ee9be53c99b62121d37d83b1e078764b3e4d88d1dfb99be1b5623691e56519850c6798 SHA512 8d3cbdf708f46477e32ee7cbd16a490c82efa855cecd84ee712b8680df4d69c987ba9ab00ff3851f627b98a8ebbc5dab71f92f142ed958ee2bc538bc792cd4b9
-DIST xen-4.15.2-upstream-patches-0.tar.xz 33368 BLAKE2B f22c0e9ce6b859a2741f09c0c52479e8acb38440b631882850993fcfcdc445c28fbeac4353df6bac1b2be89e39a99bae1a920796d505f888e3701a98f17ed29d SHA512 10a996cd87404ff6536119deeedfe67143c02475c4ca2d7f741e087197aaffa10c5831aad1f9ee2f9070461dd8cdc7af4851fbafb634a2f65235603d6fb0848f
 DIST xen-4.15.2-upstream-patches-2.tar.xz 93208 BLAKE2B 5b01953ba93551830e533cf7e9e8675a44ed6c2ad3da152e0b5feeb3782b9bc3a1a0a7c0a84ac1de8ed7146fcf364db7604ea269ee243438df34c91b4b6acc5b SHA512 c2f585223d3d9e08d08b295c0f35e4856e4801d214cf0a1f925585c28a7a25cb3b82a5f5e7d41d35b2c746d5a307cd5b5a369d5342f35681e227d8ce91e741c2
 DIST xen-4.15.2.tar.gz 40773378 BLAKE2B 7c3e3bb066505f9838cd7c56d85debc64e5ed32cf4d4edf699ff843db49bee916e6eb46d07e5cd9021c2644bba0628a2aa567f60ace26c6d7ee5922643e04104 SHA512 1cbf988fa8ed38b7ad724978958092ca0e5506e38c709c7d1af196fb8cb8ec0197a79867782761ef230b268624b3d7a0d5d0cd186f37d25f495085c71bf70d54
 DIST xen-4.16.0-upstream-patches-2.tar.xz 111668 BLAKE2B e8bbedb7cc50f7a6cb1a3869f0165cce3d02c33f04b935384e770aa5206e6aa6cb51329c5d69375391a8781ba23f20c35e06406d5164720d253b405a77f5aee9 SHA512 6b6770117e81ae407e3ded0e366b14f3fa2411cc93a95187db27548c3dd17a1f85e60fc3971b008693297ad97aa0c5fa7b4d88e01d67a972f39e51bf0a2cf39d

diff --git a/app-emulation/xen-tools/xen-tools-4.15.2.ebuild b/app-emulation/xen-tools/xen-tools-4.15.2.ebuild
deleted file mode 100644
index 7d7d59cc6873..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.15.2.ebuild
+++ /dev/null
@@ -1,556 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=23
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="a3741780fe3535e19e02efa869a7cac481891129"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-PATCHES=( "${FILESDIR}/${PN}-4.15.0-fix-xenstat-python-bindings.patch" )
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-edk2-python3.9.patch"
-		popd > /dev/null
-	fi
-
-	# Fix building with ocaml 4.12 #818100
-	eapply "${FILESDIR}/${PN}-4.15.1-ocaml-4.12.patch"
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${WORKDIR}/patches-gentoo/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-golang \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-05-03 18:42 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2022-05-03 18:42 UTC (permalink / raw
  To: gentoo-commits

commit:     f855812266e565d2eb56b0f57565d56467a437dc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue May  3 18:42:08 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May  3 18:42:20 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8558122

app-emulation/xen-tools: revbump for dropping pypam

Fixes: 0828d17d30acd44d5843198fa4b5a935a2c6d897
Bug: https://bugs.gentoo.org/833297
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../xen-tools/{xen-tools-4.15.2-r1.ebuild => xen-tools-4.15.2-r2.ebuild}  | 0
 .../xen-tools/{xen-tools-4.16.0-r3.ebuild => xen-tools-4.16.0-r4.ebuild}  | 0
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild
similarity index 100%
rename from app-emulation/xen-tools/xen-tools-4.15.2-r1.ebuild
rename to app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild
similarity index 100%
rename from app-emulation/xen-tools/xen-tools-4.16.0-r3.ebuild
rename to app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild


^ permalink raw reply	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-05-04  0:16 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2022-05-04  0:16 UTC (permalink / raw
  To: gentoo-commits

commit:     32447ec30f3da6917599db35e9a553481014216d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed May  4 00:16:12 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May  4 00:16:12 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32447ec3

app-emulation/xen-tools: Stabilize 4.15.2-r2 x86, #835402

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild
index 2314461098b0..d9a695941450 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild
@@ -16,7 +16,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-05-04  2:48 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2022-05-04  2:48 UTC (permalink / raw
  To: gentoo-commits

commit:     2293da8582180df7717d18eba9a766cab30f5fef
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed May  4 02:48:36 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed May  4 02:48:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2293da85

app-emulation/xen-tools: Stabilize 4.15.2-r2 amd64, #835402

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild
index d9a695941450..39425cd356e6 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild
@@ -16,7 +16,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 	UPSTREAM_VER=2
 	SECURITY_VER=
 	# xen-tools's gentoo patches tarball


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-05-06  9:51 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-05-06  9:51 UTC (permalink / raw
  To: gentoo-commits

commit:     a90481b9de052aff6c1b0366e792fe0664099afd
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu May  5 20:42:38 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri May  6 09:50:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a90481b9

app-emulation/xen-tools: drop vulnerable

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/25338
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 -
 app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild | 556 ---------------------
 2 files changed, 558 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 72cf0c8a54af..07a4ccafb98e 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,8 +6,6 @@ DIST edk2-a3741780fe3535e19e02efa869a7cac481891129.tar.gz 12886279 BLAKE2B 2054b
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
 DIST ipxe-git-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz 3931642 BLAKE2B bf0b5d9ea1d44803bc5c4aa0bf9188636e292b226ab759f32e3c2bfa3f80dd3f546526b9a11c1f67193793ede5309bfa67bdce80aba62ccca54597dc6e7e4ba4 SHA512 0a63f83c9135d05c6bfe7c4d12da3ff76271e35305a4d5654bd5aefa9ee59f5363546c65820c42133deb0fb5a0a0bcaa9b1c48396f9f996acea0d492a5f03f33
 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
-DIST xen-4.15.1-upstream-patches-1.tar.xz 15476 BLAKE2B 9f0cf8f3dd993e32939ff1ee35244224bd3d16fbd345500ff01e51eb5828d3e44bddc539462c39d8c37b6497d4bf8887261a8df5d31b17b413b0c21f7faf3a84 SHA512 aac3f91c3c753aa8430abad055252cba5dbdfd9e548f219df1452388ef2f82b65c428755363aa0645824431e812f3b799af4f9468669e42a0f5b6b8874397c75
-DIST xen-4.15.1.tar.gz 40800852 BLAKE2B 39475ea33f029fb0e84b82b4a2b13fd613bab01e3ef6c241dfede3d190ee9be53c99b62121d37d83b1e078764b3e4d88d1dfb99be1b5623691e56519850c6798 SHA512 8d3cbdf708f46477e32ee7cbd16a490c82efa855cecd84ee712b8680df4d69c987ba9ab00ff3851f627b98a8ebbc5dab71f92f142ed958ee2bc538bc792cd4b9
 DIST xen-4.15.2-upstream-patches-2.tar.xz 93208 BLAKE2B 5b01953ba93551830e533cf7e9e8675a44ed6c2ad3da152e0b5feeb3782b9bc3a1a0a7c0a84ac1de8ed7146fcf364db7604ea269ee243438df34c91b4b6acc5b SHA512 c2f585223d3d9e08d08b295c0f35e4856e4801d214cf0a1f925585c28a7a25cb3b82a5f5e7d41d35b2c746d5a307cd5b5a369d5342f35681e227d8ce91e741c2
 DIST xen-4.15.2.tar.gz 40773378 BLAKE2B 7c3e3bb066505f9838cd7c56d85debc64e5ed32cf4d4edf699ff843db49bee916e6eb46d07e5cd9021c2644bba0628a2aa567f60ace26c6d7ee5922643e04104 SHA512 1cbf988fa8ed38b7ad724978958092ca0e5506e38c709c7d1af196fb8cb8ec0197a79867782761ef230b268624b3d7a0d5d0cd186f37d25f495085c71bf70d54
 DIST xen-4.16.0-upstream-patches-2.tar.xz 111668 BLAKE2B e8bbedb7cc50f7a6cb1a3869f0165cce3d02c33f04b935384e770aa5206e6aa6cb51329c5d69375391a8781ba23f20c35e06406d5164720d253b405a77f5aee9 SHA512 6b6770117e81ae407e3ded0e366b14f3fa2411cc93a95187db27548c3dd17a1f85e60fc3971b008693297ad97aa0c5fa7b4d88e01d67a972f39e51bf0a2cf39d

diff --git a/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild
deleted file mode 100644
index 746c16ee9f20..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.15.1-r2.ebuild
+++ /dev/null
@@ -1,556 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=1
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=23
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="a3741780fe3535e19e02efa869a7cac481891129"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe ocaml ovmf +pam pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-		pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-PATCHES=( "${FILESDIR}/${PN}-4.15.0-fix-xenstat-python-bindings.patch" )
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-edk2-python3.9.patch"
-		popd > /dev/null
-	fi
-
-	# Fix building with ocaml 4.12 #818100
-	eapply "${FILESDIR}/${PN}-4.15.1-ocaml-4.12.patch"
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${WORKDIR}/patches-gentoo/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-golang \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable pam) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-05-08 12:03 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-05-08 12:03 UTC (permalink / raw
  To: gentoo-commits

commit:     137c6d0032d7734a0a884d82812b8d2e7fa48be2
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sun May  8 12:02:25 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun May  8 12:03:20 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=137c6d00

app-emulation/xen-tools: remove more -Werror arguments

Closes: https://bugs.gentoo.org/843269
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild
index d47a25185322..60c3e719f0c0 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild
@@ -419,7 +419,11 @@ src_prepare() {
 
 	# Remove -Werror
 	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i "s/-Werror //g" {} + || die
+		 -exec sed -i \
+		 -e 's/-Werror //g' \
+		 -e '/^CFLAGS *+= -Werror$/d' \
+		 -e 's/, "-Werror"//' \
+		 {} + || die
 
 	default
 }


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-07-05 16:23 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-07-05 16:23 UTC (permalink / raw
  To: gentoo-commits

commit:     b48c2d2662337ed28190d32ad3898686959dccd5
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Mon Jul  4 10:22:01 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Jul  5 16:20:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b48c2d26

app-emulation/xen-tools: add 4.16.1, 4.16.2_pre1

This introduces a new approach to handle Xen patching and versioning. SECURITY_VER and
OVMF_VER where dropped as those have not been used in a while. We now
consume the upstream patches from a repository called
xen-upstream-patches, which will ultimately be hosted by Gentoo
infra (e.g. available under gitweb.gentoo.org). The Gentoo patchset now
lives in a repository called xen-gentoo-patches, which will also be
hosted on Gentoo infra.

Furthermore we now follow upstreams versioning scheme. Previously we
would sell Xen 4.16.2-pre, which is from the staging-4.16 branch
containing security fixes, as Xen 4.16.1. To avoid confusion, we will
label the Xen versions as such, and Xen 4.16.1 will what is tagged
upstream as RELEASE-4.16.1 (+ the few Gentoo specific patches).

Closes: https://bugs.gentoo.org/845099
Bug: https://bugs.gentoo.org/850802
Closes: https://github.com/gentoo/gentoo/pull/25839
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   3 +
 app-emulation/xen-tools/xen-tools-4.16.1.ebuild    | 526 +++++++++++++++++++++
 .../xen-tools/xen-tools-4.16.2_pre1.ebuild         | 526 +++++++++++++++++++++
 3 files changed, 1055 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 07a4ccafb98e..a6c87e26bb87 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -10,5 +10,8 @@ DIST xen-4.15.2-upstream-patches-2.tar.xz 93208 BLAKE2B 5b01953ba93551830e533cf7
 DIST xen-4.15.2.tar.gz 40773378 BLAKE2B 7c3e3bb066505f9838cd7c56d85debc64e5ed32cf4d4edf699ff843db49bee916e6eb46d07e5cd9021c2644bba0628a2aa567f60ace26c6d7ee5922643e04104 SHA512 1cbf988fa8ed38b7ad724978958092ca0e5506e38c709c7d1af196fb8cb8ec0197a79867782761ef230b268624b3d7a0d5d0cd186f37d25f495085c71bf70d54
 DIST xen-4.16.0-upstream-patches-2.tar.xz 111668 BLAKE2B e8bbedb7cc50f7a6cb1a3869f0165cce3d02c33f04b935384e770aa5206e6aa6cb51329c5d69375391a8781ba23f20c35e06406d5164720d253b405a77f5aee9 SHA512 6b6770117e81ae407e3ded0e366b14f3fa2411cc93a95187db27548c3dd17a1f85e60fc3971b008693297ad97aa0c5fa7b4d88e01d67a972f39e51bf0a2cf39d
 DIST xen-4.16.0.tar.gz 44982322 BLAKE2B 7e16a93b3f1131e2b10307fabc10641a9c5983173155b9a35eaf6ff317b6a747bccf6b8c87c06686830acc2c4bd3e19e5867eb443eabac9a1e4ee59124dfa87f SHA512 2869ed90d1779c9754d7f2397f5fc67a655304d9c32953ac20655ef96cb154521d8fce9f23915ac0c91f984dc54f72c67e5e619e2da318b5997748f44cf21b87
+DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a
 DIST xen-gentoo-patches-23.tar.xz 20536 BLAKE2B 0064f79f8794a21ab13047a4ee296e37efa616e16ca6cd65b31fdafeb458fd9b80f0443758343c8328b1901d7169618346becfe75f16dcaeff08fc975f1d08d5 SHA512 09248e17ff7865feb2a505169d62ee5c8c60bd672fa8c4c7c4e3a2e4af58bfad0379d37b395bab3e3393af8d53d882f56749dfeb560edeea6b7ab56c902a3c49
 DIST xen-gentoo-patches-24.tar.xz 20952 BLAKE2B 292ea384f007a9615ca840068c45cd0e37a63a59e596c9c87a278a0136805327c85f5e5576eac751e40bda616559e413b396d313d43f2d36d904f09a41b0d302 SHA512 26b7344cea40ef44d1eaec330465071c96ee27a5b0ca91f787fc80c6801abed47cab9050a40ef80f20471a7cd9ee0dc7aaa46b16e5af7d0e50643ccc7d3a828b
+DIST xen-gentoo-patches-4.16.1-gentoo-patchset-0.tar.gz 5289 BLAKE2B 4946056ee631ec0fa4d29f1cd643f66b491ef3ea049755d10d7b8e189f02816b990e53bffbeeeae0a61fb4e20aa877f5903a8aadfb26d0c78566a0e9fde540c7 SHA512 59d4101879bd18e828349db3814a9082b85c5ba8203ce98e5082491a9ede9c832a02ac7e4d7a0a51a52e38b72e5cce1eea6a09d6c5202e96bfe2aa4d47e12e65
+DIST xen-upstream-patches-4.16.2-pre-patchset-0.tar.gz 46026 BLAKE2B 57bca21962c9a451316f486f5db94e9c1b98b5e029a15dbd702007d573fe02571e648866c9ddbc293e53ceb5de92122b13d21e28c8879d918129134725c9ff91 SHA512 f665640fc686dfc5f718531601f66e3f30c4c8c7cb78293b6a615fe9f53a3763f2c864642a19336bb077d432b776ab1c9fa39e6fa5857ca3360e4d1b1ce63f50

diff --git a/app-emulation/xen-tools/xen-tools-4.16.1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.1.ebuild
new file mode 100644
index 000000000000..dc73508d5fc5
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.16.1.ebuild
@@ -0,0 +1,526 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.14.0"
+	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_PRE_PATCHSET_NUM=
+	XEN_GENTOO_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://github.com/Flowdalic/xen-upstream-patches/archive/refs/tags/${XEN_UPSTREAM_PATCHES_TAG}.tar.gz -> ${XEN_UPSTREAM_PATCHES_NAME}.tar.gz"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_BASE_PV})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://github.com/Flowdalic/xen-gentoo-patches/archive/refs/tags/${XEN_GENTOO_PATCHES_TAG}.tar.gz -> ${XEN_GENTOO_PATCHES_NAME}.tar.gz"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		 -exec sed -i \
+		 -e 's/-Werror //g' \
+		 -e '/^CFLAGS *+= -Werror$/d' \
+		 -e 's/, "-Werror"//' \
+		 {} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.16.2_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.2_pre1.ebuild
new file mode 100644
index 000000000000..8e3c152ee863
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.16.2_pre1.ebuild
@@ -0,0 +1,526 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.14.0"
+	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_GENTOO_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.16.1
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://github.com/Flowdalic/xen-upstream-patches/archive/refs/tags/${XEN_UPSTREAM_PATCHES_TAG}.tar.gz -> ${XEN_UPSTREAM_PATCHES_NAME}.tar.gz"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_BASE_PV})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://github.com/Flowdalic/xen-gentoo-patches/archive/refs/tags/${XEN_GENTOO_PATCHES_TAG}.tar.gz -> ${XEN_GENTOO_PATCHES_NAME}.tar.gz"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		 -exec sed -i \
+		 -e 's/-Werror //g' \
+		 -e '/^CFLAGS *+= -Werror$/d' \
+		 -e 's/, "-Werror"//' \
+		 {} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-07-05 16:25 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-07-05 16:25 UTC (permalink / raw
  To: gentoo-commits

commit:     13a0a916863718b17302a9d0f744f9154a3afeaf
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  5 16:25:31 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Jul  5 16:25:31 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13a0a916

app-emulation/xen-tools: drop 4.16.0-r4

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   3 -
 app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild | 569 ---------------------
 2 files changed, 572 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 7fe60a3ccfdc..448d9c3a557e 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -9,10 +9,7 @@ DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c
 DIST xen-4.15.2-upstream-patches-2.tar.xz 93208 BLAKE2B 5b01953ba93551830e533cf7e9e8675a44ed6c2ad3da152e0b5feeb3782b9bc3a1a0a7c0a84ac1de8ed7146fcf364db7604ea269ee243438df34c91b4b6acc5b SHA512 c2f585223d3d9e08d08b295c0f35e4856e4801d214cf0a1f925585c28a7a25cb3b82a5f5e7d41d35b2c746d5a307cd5b5a369d5342f35681e227d8ce91e741c2
 DIST xen-4.15.2.tar.gz 40773378 BLAKE2B 7c3e3bb066505f9838cd7c56d85debc64e5ed32cf4d4edf699ff843db49bee916e6eb46d07e5cd9021c2644bba0628a2aa567f60ace26c6d7ee5922643e04104 SHA512 1cbf988fa8ed38b7ad724978958092ca0e5506e38c709c7d1af196fb8cb8ec0197a79867782761ef230b268624b3d7a0d5d0cd186f37d25f495085c71bf70d54
 DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3
-DIST xen-4.16.0-upstream-patches-2.tar.xz 111668 BLAKE2B e8bbedb7cc50f7a6cb1a3869f0165cce3d02c33f04b935384e770aa5206e6aa6cb51329c5d69375391a8781ba23f20c35e06406d5164720d253b405a77f5aee9 SHA512 6b6770117e81ae407e3ded0e366b14f3fa2411cc93a95187db27548c3dd17a1f85e60fc3971b008693297ad97aa0c5fa7b4d88e01d67a972f39e51bf0a2cf39d
-DIST xen-4.16.0.tar.gz 44982322 BLAKE2B 7e16a93b3f1131e2b10307fabc10641a9c5983173155b9a35eaf6ff317b6a747bccf6b8c87c06686830acc2c4bd3e19e5867eb443eabac9a1e4ee59124dfa87f SHA512 2869ed90d1779c9754d7f2397f5fc67a655304d9c32953ac20655ef96cb154521d8fce9f23915ac0c91f984dc54f72c67e5e619e2da318b5997748f44cf21b87
 DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a
 DIST xen-gentoo-patches-23.tar.xz 20536 BLAKE2B 0064f79f8794a21ab13047a4ee296e37efa616e16ca6cd65b31fdafeb458fd9b80f0443758343c8328b1901d7169618346becfe75f16dcaeff08fc975f1d08d5 SHA512 09248e17ff7865feb2a505169d62ee5c8c60bd672fa8c4c7c4e3a2e4af58bfad0379d37b395bab3e3393af8d53d882f56749dfeb560edeea6b7ab56c902a3c49
-DIST xen-gentoo-patches-24.tar.xz 20952 BLAKE2B 292ea384f007a9615ca840068c45cd0e37a63a59e596c9c87a278a0136805327c85f5e5576eac751e40bda616559e413b396d313d43f2d36d904f09a41b0d302 SHA512 26b7344cea40ef44d1eaec330465071c96ee27a5b0ca91f787fc80c6801abed47cab9050a40ef80f20471a7cd9ee0dc7aaa46b16e5af7d0e50643ccc7d3a828b
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-0.tar.gz 5289 BLAKE2B 4946056ee631ec0fa4d29f1cd643f66b491ef3ea049755d10d7b8e189f02816b990e53bffbeeeae0a61fb4e20aa877f5903a8aadfb26d0c78566a0e9fde540c7 SHA512 59d4101879bd18e828349db3814a9082b85c5ba8203ce98e5082491a9ede9c832a02ac7e4d7a0a51a52e38b72e5cce1eea6a09d6c5202e96bfe2aa4d47e12e65
 DIST xen-upstream-patches-4.16.2-pre-patchset-0.tar.gz 46026 BLAKE2B 57bca21962c9a451316f486f5db94e9c1b98b5e029a15dbd702007d573fe02571e648866c9ddbc293e53ceb5de92122b13d21e28c8879d918129134725c9ff91 SHA512 f665640fc686dfc5f718531601f66e3f30c4c8c7cb78293b6a615fe9f53a3763f2c864642a19336bb077d432b776ab1c9fa39e6fa5857ca3360e4d1b1ce63f50

diff --git a/app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild b/app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild
deleted file mode 100644
index 60c3e719f0c0..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.0-r4.ebuild
+++ /dev/null
@@ -1,569 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-	UPSTREAM_VER=2
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=24
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${WORKDIR}/patches-gentoo/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i \
-		 -e 's/-Werror //g' \
-		 -e '/^CFLAGS *+= -Werror$/d' \
-		 -e 's/, "-Werror"//' \
-		 {} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-07-06 18:55 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-07-06 18:55 UTC (permalink / raw
  To: gentoo-commits

commit:     fdb300ad461c96e6f555b2dec4edab4d962b85fc
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  6 17:02:22 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Jul  6 18:48:59 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fdb300ad

app-emulation/xen-tools: fix qemu-bridge-helper build error

Also use the tarballs from gitweb.gentoo.org.

Thanks to Tomáš Mózes for reporting the issue.

Closes: https://bugs.gentoo.org/856697
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |  1 +
 app-emulation/xen-tools/xen-tools-4.15.3.ebuild | 24 +++++++++++++-----------
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 448d9c3a557e..90f6dde9ad79 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -11,5 +11,6 @@ DIST xen-4.15.2.tar.gz 40773378 BLAKE2B 7c3e3bb066505f9838cd7c56d85debc64e5ed32c
 DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3
 DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a
 DIST xen-gentoo-patches-23.tar.xz 20536 BLAKE2B 0064f79f8794a21ab13047a4ee296e37efa616e16ca6cd65b31fdafeb458fd9b80f0443758343c8328b1901d7169618346becfe75f16dcaeff08fc975f1d08d5 SHA512 09248e17ff7865feb2a505169d62ee5c8c60bd672fa8c4c7c4e3a2e4af58bfad0379d37b395bab3e3393af8d53d882f56749dfeb560edeea6b7ab56c902a3c49
+DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-0.tar.gz 5289 BLAKE2B 4946056ee631ec0fa4d29f1cd643f66b491ef3ea049755d10d7b8e189f02816b990e53bffbeeeae0a61fb4e20aa877f5903a8aadfb26d0c78566a0e9fde540c7 SHA512 59d4101879bd18e828349db3814a9082b85c5ba8203ce98e5082491a9ede9c832a02ac7e4d7a0a51a52e38b72e5cce1eea6a09d6c5202e96bfe2aa4d47e12e65
 DIST xen-upstream-patches-4.16.2-pre-patchset-0.tar.gz 46026 BLAKE2B 57bca21962c9a451316f486f5db94e9c1b98b5e029a15dbd702007d573fe02571e648866c9ddbc293e53ceb5de92122b13d21e28c8879d918129134725c9ff91 SHA512 f665640fc686dfc5f718531601f66e3f30c4c8c7cb78293b6a615fe9f53a3763f2c864642a19336bb077d432b776ab1c9fa39e6fa5857ca3360e4d1b1ce63f50

diff --git a/app-emulation/xen-tools/xen-tools-4.15.3.ebuild b/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
index 0a779bde587e..60ce532a0998 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
@@ -24,7 +24,7 @@ else
 	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
 
 	XEN_PRE_PATCHSET_NUM=
-	XEN_GENTOO_PATCHSET_NUM=0
+	XEN_GENTOO_PATCHSET_NUM=2
 	XEN_PRE_VERSION_BASE=
 
 	XEN_BASE_PV="${PV}"
@@ -46,13 +46,13 @@ else
 	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
 		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
 		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://github.com/Flowdalic/xen-upstream-patches/archive/refs/tags/${XEN_UPSTREAM_PATCHES_TAG}.tar.gz -> ${XEN_UPSTREAM_PATCHES_NAME}.tar.gz"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
 		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
 	fi
 	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="4.16.1-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_TAG="${PV}-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
 		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://github.com/Flowdalic/xen-gentoo-patches/archive/refs/tags/${XEN_GENTOO_PATCHES_TAG}.tar.gz -> ${XEN_GENTOO_PATCHES_NAME}.tar.gz"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
 		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
 	fi
 fi
@@ -236,16 +236,18 @@ src_prepare() {
 	fi
 
 	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		rm "${XEN_GENTOO_PATCHES_DIR}"/xen-tools-4.16.0-qemu-bridge.patch || die
-		sed -i 's/qemu-bridge-helper/xen-bridge-helper/' \
-			tools/qemu-xen/include/net/net.h \
-			tools/qemu-xen/meson.build \
-			tools/qemu-xen/qemu-bridge-helper.c \
-			tools/qemu-xen/qemu-options.hx
-
 		eapply "${XEN_GENTOO_PATCHES_DIR}"
 	fi
 
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/Makefile \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+
 	if use ovmf; then
 		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
 		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-07-07  6:56 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-07-07  6:56 UTC (permalink / raw
  To: gentoo-commits

commit:     66b06eccaf32f646e34c984463800b2d7e6b10a7
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  7 06:54:21 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Jul  7 06:56:01 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66b06ecc

app-emulation/xen-tools: gitweb as patch source, bump gentoo-patches

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                     |  3 ++-
 app-emulation/xen-tools/xen-tools-4.16.2_pre1.ebuild | 18 +++++++++++++-----
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 90f6dde9ad79..bfa4bb3f3f57 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -13,4 +13,5 @@ DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b
 DIST xen-gentoo-patches-23.tar.xz 20536 BLAKE2B 0064f79f8794a21ab13047a4ee296e37efa616e16ca6cd65b31fdafeb458fd9b80f0443758343c8328b1901d7169618346becfe75f16dcaeff08fc975f1d08d5 SHA512 09248e17ff7865feb2a505169d62ee5c8c60bd672fa8c4c7c4e3a2e4af58bfad0379d37b395bab3e3393af8d53d882f56749dfeb560edeea6b7ab56c902a3c49
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-0.tar.gz 5289 BLAKE2B 4946056ee631ec0fa4d29f1cd643f66b491ef3ea049755d10d7b8e189f02816b990e53bffbeeeae0a61fb4e20aa877f5903a8aadfb26d0c78566a0e9fde540c7 SHA512 59d4101879bd18e828349db3814a9082b85c5ba8203ce98e5082491a9ede9c832a02ac7e4d7a0a51a52e38b72e5cce1eea6a09d6c5202e96bfe2aa4d47e12e65
-DIST xen-upstream-patches-4.16.2-pre-patchset-0.tar.gz 46026 BLAKE2B 57bca21962c9a451316f486f5db94e9c1b98b5e029a15dbd702007d573fe02571e648866c9ddbc293e53ceb5de92122b13d21e28c8879d918129134725c9ff91 SHA512 f665640fc686dfc5f718531601f66e3f30c4c8c7cb78293b6a615fe9f53a3763f2c864642a19336bb077d432b776ab1c9fa39e6fa5857ca3360e4d1b1ce63f50
+DIST xen-gentoo-patches-4.16.1-gentoo-patchset-1.tar.bz2 4351 BLAKE2B 1ba306fbc4a55aa1fea71139f7a900c8c363cf948f34a2aabd1ff6f8a68f2e632154ea0e0289580c84328b372c4f8cfdb2879bc63ae3ec163bfb29487783a758 SHA512 8d8198fbf8d9d4b46a83cf46c965448cb47b30438518a70c9b552c7cd1b23616e50f615206ddb18603e8482d19b25ccb611904c404d445898928ecf88051b70d
+DIST xen-upstream-patches-4.16.2-pre-patchset-0.tar.bz2 40645 BLAKE2B 198beb134604b221bc81fb4d32daec074a7c088c7f9bf99c2a9e98bdab2d8bf7e10c0fea9106d039de255fb209a8ac2955d1e724325a5016e6ecbdd94fbb9584 SHA512 d849418fb215a5bb9ea31ea03de6fbb8b1834d9a8e9face0bd3f20ab7bbd3a17cb13e9b3b653a3a5f06fad609b01dbcaa16f7377ead015a9d97cb8f960d0de49

diff --git a/app-emulation/xen-tools/xen-tools-4.16.2_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.2_pre1.ebuild
index 8e3c152ee863..1aa03defc2a3 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.2_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.2_pre1.ebuild
@@ -24,7 +24,7 @@ else
 	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
 
 	XEN_PRE_PATCHSET_NUM=0
-	XEN_GENTOO_PATCHSET_NUM=0
+	XEN_GENTOO_PATCHSET_NUM=1
 	XEN_PRE_VERSION_BASE=4.16.1
 
 	XEN_BASE_PV="${PV}"
@@ -46,13 +46,13 @@ else
 	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
 		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
 		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://github.com/Flowdalic/xen-upstream-patches/archive/refs/tags/${XEN_UPSTREAM_PATCHES_TAG}.tar.gz -> ${XEN_UPSTREAM_PATCHES_NAME}.tar.gz"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
 		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
 	fi
 	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
 		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_BASE_PV})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
 		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://github.com/Flowdalic/xen-gentoo-patches/archive/refs/tags/${XEN_GENTOO_PATCHES_TAG}.tar.gz -> ${XEN_GENTOO_PATCHES_NAME}.tar.gz"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
 		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
 	fi
 fi
@@ -241,6 +241,16 @@ src_prepare() {
 		eapply "${XEN_GENTOO_PATCHES_DIR}"
 	fi
 
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
 	if use ovmf; then
 		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
 		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
@@ -272,8 +282,6 @@ src_prepare() {
 		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
 	fi
 
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
 	# Fix texi2html build error with new texi2html, qemu.doc.html
 	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-07-10  6:17 Agostino Sarubbo
  0 siblings, 0 replies; 295+ messages in thread
From: Agostino Sarubbo @ 2022-07-10  6:17 UTC (permalink / raw
  To: gentoo-commits

commit:     6865848b813ef1b2f0a4b052b59785c283113208
Author:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 10 06:16:56 2022 +0000
Commit:     Agostino Sarubbo <ago <AT> gentoo <DOT> org>
CommitDate: Sun Jul 10 06:16:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6865848b

app-emulation/xen-tools: amd64 stable wrt bug #857117

Package-Manager: Portage-3.0.30, Repoman-3.0.3
RepoMan-Options: --include-arches="amd64"
Signed-off-by: Agostino Sarubbo <ago <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.3.ebuild b/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
index 60ce532a0998..3c52b578af80 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 
 	SEABIOS_VER="1.14.0"
 	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-07-11  6:45 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-07-11  6:45 UTC (permalink / raw
  To: gentoo-commits

commit:     44cd2bcd4251add67376396126d7467f217804c5
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 11 06:44:13 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Jul 11 06:45:27 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44cd2bcd

app-emulation/xen-tools: drop 4.15.2-r2

Bug: https://bugs.gentoo.org/850802
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   5 -
 app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild | 555 ---------------------
 2 files changed, 560 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index bfa4bb3f3f57..df24bd7888e2 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -2,15 +2,10 @@ DIST OpenSSL_1_1_1j.tar.gz 9994760 BLAKE2B 749886716739dcb909bd79b29cf714640b640
 DIST berkeley-softfloat-b64af41c3276f97f0e181920400ee056b9c88037.tar.gz 148741 BLAKE2B 72014022926b636147e202d74c42df2ce9cfed00b91c275d5b2e0afbc5c68765445cbe7ac6389d7c2512bd1d45b0e16e999936552d09bbc733ab66c92968bd31 SHA512 8420c29faa7ff57e06d6758b03e81ca0630c59946bc031e8611f1449e23634cf901b502161f2c1423c0cff949b5481445e36a3aa53dc885b61ca2c673b3ba567
 DIST brotli-666c3280cc11dc433c303d79a83d4ffbdd12cc8d.tar.gz 23855739 BLAKE2B 7406ec5b29ac66afbcd7c1376bb3208f298d19b6592b2869c52173aa64947d58bd443f9a61c67deaf046be910a0e31c0b843e5508e97e0e1f5e7bce100d86904 SHA512 df8e90562c4fd7f0e787949df6bc4f5a165b39bd333f442d27874fe65640fbba268f9350d7113e6761a5acceb66d78e75f1a296e5a89b94574edf28109cdc812
 DIST edk2-7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5.tar.gz 13998677 BLAKE2B 3614ceb69e295a6afb37c7905d0aec3534d8daf3d9f22137c1b722da6dc764a3669d99af03f96155d45feb5058a6f725acf37d1048186fecff4232d64f96e97c SHA512 a1933d815b947fd4f13c96970a6dc36c3048e3ddf27c897684104b0129cf58331e46d3147062ae1fb8973f08cd373c319788dd850ac5e45da385eed8368571a4
-DIST edk2-a3741780fe3535e19e02efa869a7cac481891129.tar.gz 12886279 BLAKE2B 2054bb84375b9840b31276f86786ea764368da200087e45c0528f2ca6b17aa9078a05e406bafa41c25cd65971ff007dfa19ffe91f9a5a2ab6c845bc6f62df3de SHA512 ca0543fefeb1fdc8d0d9841de309ce40fe88220463569a77f56d3fe3184fd4a57ce00b3c96c0861a51b7dbf5f4a9f9946b960a636593682f380c861f2606d190
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
-DIST ipxe-git-988d2c13cdf0f0b4140685af35ced70ac5b3283c.tar.gz 3931642 BLAKE2B bf0b5d9ea1d44803bc5c4aa0bf9188636e292b226ab759f32e3c2bfa3f80dd3f546526b9a11c1f67193793ede5309bfa67bdce80aba62ccca54597dc6e7e4ba4 SHA512 0a63f83c9135d05c6bfe7c4d12da3ff76271e35305a4d5654bd5aefa9ee59f5363546c65820c42133deb0fb5a0a0bcaa9b1c48396f9f996acea0d492a5f03f33
 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
-DIST xen-4.15.2-upstream-patches-2.tar.xz 93208 BLAKE2B 5b01953ba93551830e533cf7e9e8675a44ed6c2ad3da152e0b5feeb3782b9bc3a1a0a7c0a84ac1de8ed7146fcf364db7604ea269ee243438df34c91b4b6acc5b SHA512 c2f585223d3d9e08d08b295c0f35e4856e4801d214cf0a1f925585c28a7a25cb3b82a5f5e7d41d35b2c746d5a307cd5b5a369d5342f35681e227d8ce91e741c2
-DIST xen-4.15.2.tar.gz 40773378 BLAKE2B 7c3e3bb066505f9838cd7c56d85debc64e5ed32cf4d4edf699ff843db49bee916e6eb46d07e5cd9021c2644bba0628a2aa567f60ace26c6d7ee5922643e04104 SHA512 1cbf988fa8ed38b7ad724978958092ca0e5506e38c709c7d1af196fb8cb8ec0197a79867782761ef230b268624b3d7a0d5d0cd186f37d25f495085c71bf70d54
 DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3
 DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a
-DIST xen-gentoo-patches-23.tar.xz 20536 BLAKE2B 0064f79f8794a21ab13047a4ee296e37efa616e16ca6cd65b31fdafeb458fd9b80f0443758343c8328b1901d7169618346becfe75f16dcaeff08fc975f1d08d5 SHA512 09248e17ff7865feb2a505169d62ee5c8c60bd672fa8c4c7c4e3a2e4af58bfad0379d37b395bab3e3393af8d53d882f56749dfeb560edeea6b7ab56c902a3c49
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-0.tar.gz 5289 BLAKE2B 4946056ee631ec0fa4d29f1cd643f66b491ef3ea049755d10d7b8e189f02816b990e53bffbeeeae0a61fb4e20aa877f5903a8aadfb26d0c78566a0e9fde540c7 SHA512 59d4101879bd18e828349db3814a9082b85c5ba8203ce98e5082491a9ede9c832a02ac7e4d7a0a51a52e38b72e5cce1eea6a09d6c5202e96bfe2aa4d47e12e65
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-1.tar.bz2 4351 BLAKE2B 1ba306fbc4a55aa1fea71139f7a900c8c363cf948f34a2aabd1ff6f8a68f2e632154ea0e0289580c84328b372c4f8cfdb2879bc63ae3ec163bfb29487783a758 SHA512 8d8198fbf8d9d4b46a83cf46c965448cb47b30438518a70c9b552c7cd1b23616e50f615206ddb18603e8482d19b25ccb611904c404d445898928ecf88051b70d

diff --git a/app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild b/app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild
deleted file mode 100644
index 39425cd356e6..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.15.2-r2.ebuild
+++ /dev/null
@@ -1,555 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-	UPSTREAM_VER=2
-	SECURITY_VER=
-	# xen-tools's gentoo patches tarball
-	GENTOO_VER=23
-	# xen-tools's gentoo patches version which apply to this specific ebuild
-	GENTOO_GPV=0
-	# xen-tools ovmf's patches
-	OVMF_VER=
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="a3741780fe3535e19e02efa869a7cac481891129"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="988d2c13cdf0f0b4140685af35ced70ac5b3283c"
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz
-		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${PN/-tools/}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	[[ -n ${OVMF_VER} ]] && \
-		OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
-
-	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( http://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-		${OVMF_PATCHSET_URI} )
-	${UPSTREAM_PATCHSET_URI}
-	${SECURITY_PATCHSET_URI}
-	${GENTOO_PATCHSET_URI}"
-
-	S="${WORKDIR}/xen-${MY_PV}"
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	qemu? ( sys-libs/pam )
-	sys-apps/pciutils
-	dev-libs/lzo:2
-	dev-libs/glib:2
-	dev-libs/yajl
-	dev-libs/libaio
-	dev-libs/libgcrypt:0
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-PATCHES=( "${FILESDIR}/${PN}-4.15.0-fix-xenstat-python-bindings.patch" )
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	local i
-
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		einfo "Try to apply Xen Upstream patch set"
-		eapply "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf || die
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			eapply "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		# apply qemu-xen/upstream patches
-		pushd "${S}"/tools/qemu-xen/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUU}; do
-			eapply "${WORKDIR}"/patches-security/qemuu/$i
-		done
-		popd > /dev/null
-
-		# apply qemu-traditional patches
-		pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
-		for i in ${XEN_SECURITY_QEMUT}; do
-			eapply "${WORKDIR}"/patches-security/qemut/$i
-		done
-		popd > /dev/null
-	fi
-
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
-		einfo "Try to apply Gentoo specific patch set"
-		source "${FILESDIR}"/gentoo-patches.conf || die
-		_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
-		for i in ${!_gpv}; do
-			eapply "${WORKDIR}"/patches-gentoo/$i
-		done
-	fi
-
-	# Ovmf's patchset
-	if use ovmf; then
-		if [[ -n ${OVMF_VER} ]];then
-			einfo "Try to apply Ovmf patch set"
-			pushd "${WORKDIR}"/edk2-*/ > /dev/null
-			eapply "${WORKDIR}"/patches-ovmf
-			popd > /dev/null
-		fi
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-edk2-python3.9.patch"
-		popd > /dev/null
-	fi
-
-	# Fix building with ocaml 4.12 #818100
-	eapply "${FILESDIR}/${PN}-4.15.1-ocaml-4.12.patch"
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/_ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${WORKDIR}/patches-gentoo/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
-	sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-		-i tools/firmware/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-		-i Config.mk || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	default
-}
-
-src_configure() {
-	local myconf="--prefix=${PREFIX}/usr \
-		--libdir=${PREFIX}/usr/$(get_libdir) \
-		--libexecdir=${PREFIX}/usr/libexec \
-		--localstatedir=${EPREFIX}/var \
-		--disable-golang \
-		--disable-werror \
-		--disable-xen \
-		--enable-tools \
-		--enable-docs \
-		$(use_enable api xenapi) \
-		$(use_enable ipxe) \
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '') \
-		$(use_enable ocaml ocamltools) \
-		$(use_enable ovmf) \
-		$(use_enable rombios) \
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
-		"
-
-	use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
-	use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
-	use amd64 && myconf+=" $(use_enable qemu-traditional)"
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-07-11  6:47 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-07-11  6:47 UTC (permalink / raw
  To: gentoo-commits

commit:     3f1e2ba62ae09ecf6339b5fce65958bb07d50a38
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 11 06:47:21 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Jul 11 06:47:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f1e2ba6

app-emulation/xen-tools: drop 4.16.1

Bug: https://bugs.gentoo.org/850802
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   1 -
 app-emulation/xen-tools/xen-tools-4.16.1.ebuild | 526 ------------------------
 2 files changed, 527 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index df24bd7888e2..4d84ff2cfeb6 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -7,6 +7,5 @@ DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c
 DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3
 DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
-DIST xen-gentoo-patches-4.16.1-gentoo-patchset-0.tar.gz 5289 BLAKE2B 4946056ee631ec0fa4d29f1cd643f66b491ef3ea049755d10d7b8e189f02816b990e53bffbeeeae0a61fb4e20aa877f5903a8aadfb26d0c78566a0e9fde540c7 SHA512 59d4101879bd18e828349db3814a9082b85c5ba8203ce98e5082491a9ede9c832a02ac7e4d7a0a51a52e38b72e5cce1eea6a09d6c5202e96bfe2aa4d47e12e65
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-1.tar.bz2 4351 BLAKE2B 1ba306fbc4a55aa1fea71139f7a900c8c363cf948f34a2aabd1ff6f8a68f2e632154ea0e0289580c84328b372c4f8cfdb2879bc63ae3ec163bfb29487783a758 SHA512 8d8198fbf8d9d4b46a83cf46c965448cb47b30438518a70c9b552c7cd1b23616e50f615206ddb18603e8482d19b25ccb611904c404d445898928ecf88051b70d
 DIST xen-upstream-patches-4.16.2-pre-patchset-0.tar.bz2 40645 BLAKE2B 198beb134604b221bc81fb4d32daec074a7c088c7f9bf99c2a9e98bdab2d8bf7e10c0fea9106d039de255fb209a8ac2955d1e724325a5016e6ecbdd94fbb9584 SHA512 d849418fb215a5bb9ea31ea03de6fbb8b1834d9a8e9face0bd3f20ab7bbd3a17cb13e9b3b653a3a5f06fad609b01dbcaa16f7377ead015a9d97cb8f960d0de49

diff --git a/app-emulation/xen-tools/xen-tools-4.16.1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.1.ebuild
deleted file mode 100644
index dc73508d5fc5..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.1.ebuild
+++ /dev/null
@@ -1,526 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_PRE_PATCHSET_NUM=
-	XEN_GENTOO_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://github.com/Flowdalic/xen-upstream-patches/archive/refs/tags/${XEN_UPSTREAM_PATCHES_TAG}.tar.gz -> ${XEN_UPSTREAM_PATCHES_NAME}.tar.gz"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_BASE_PV})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://github.com/Flowdalic/xen-gentoo-patches/archive/refs/tags/${XEN_GENTOO_PATCHES_TAG}.tar.gz -> ${XEN_GENTOO_PATCHES_NAME}.tar.gz"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i \
-		 -e 's/-Werror //g' \
-		 -e '/^CFLAGS *+= -Werror$/d' \
-		 -e 's/, "-Werror"//' \
-		 {} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-07-11  7:10 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-07-11  7:10 UTC (permalink / raw
  To: gentoo-commits

commit:     737b0f11253a11ee28de91d7f484c6e08fa34cd8
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 11 07:09:56 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Jul 11 07:10:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=737b0f11

app-emulation/xen-tools: stabilize 4.15.3 for x86

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.3.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.3.ebuild b/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
index 3c52b578af80..6c9c7c9fec49 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.14.0"
 	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-07-12 19:48 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-07-12 19:48 UTC (permalink / raw
  To: gentoo-commits

commit:     fa6759eb1adc37d570b0f33b0f6c9f628a21f907
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 12 19:38:01 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Jul 12 19:39:40 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa6759eb

app-emulation/xen-tools: add 4.16.2_pre2, drop 4.16.2_pre1

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                                        | 2 +-
 .../{xen-tools-4.16.2_pre1.ebuild => xen-tools-4.16.2_pre2.ebuild}      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 4d84ff2cfeb6..8e5779c878d9 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -8,4 +8,4 @@ DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b
 DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-1.tar.bz2 4351 BLAKE2B 1ba306fbc4a55aa1fea71139f7a900c8c363cf948f34a2aabd1ff6f8a68f2e632154ea0e0289580c84328b372c4f8cfdb2879bc63ae3ec163bfb29487783a758 SHA512 8d8198fbf8d9d4b46a83cf46c965448cb47b30438518a70c9b552c7cd1b23616e50f615206ddb18603e8482d19b25ccb611904c404d445898928ecf88051b70d
-DIST xen-upstream-patches-4.16.2-pre-patchset-0.tar.bz2 40645 BLAKE2B 198beb134604b221bc81fb4d32daec074a7c088c7f9bf99c2a9e98bdab2d8bf7e10c0fea9106d039de255fb209a8ac2955d1e724325a5016e6ecbdd94fbb9584 SHA512 d849418fb215a5bb9ea31ea03de6fbb8b1834d9a8e9face0bd3f20ab7bbd3a17cb13e9b3b653a3a5f06fad609b01dbcaa16f7377ead015a9d97cb8f960d0de49
+DIST xen-upstream-patches-4.16.2-pre-patchset-1.tar.bz2 56760 BLAKE2B 4c8030347f9e1ad3c2c4f440645656452daa1f087c34b8a3baba3cae1e7623a910e5727395e8c6f4a8573f3a37e58a318c485fa2f878c8e2f3240fb75cee0c03 SHA512 5e279845052addfbf7681ad5ccab9e692e4a1d69b73e51e1782e498f98217de77bfc4f5158307ee90164393edb023165e032b9f9f7123c0c614ee2336c021259

diff --git a/app-emulation/xen-tools/xen-tools-4.16.2_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.2_pre2.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.16.2_pre1.ebuild
rename to app-emulation/xen-tools/xen-tools-4.16.2_pre2.ebuild
index 1aa03defc2a3..84cc9ef221d0 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.2_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.2_pre2.ebuild
@@ -23,7 +23,7 @@ else
 	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
 	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
 
-	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_PATCHSET_NUM=1
 	XEN_GENTOO_PATCHSET_NUM=1
 	XEN_PRE_VERSION_BASE=4.16.1
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-07-13  7:08 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-07-13  7:08 UTC (permalink / raw
  To: gentoo-commits

commit:     9c74cd50bbcf288926c485765f2c6810ef93f139
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 13 06:57:20 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Jul 13 07:08:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c74cd50

app-emulation/xen-tools: set OBJDUMP

Closes: https://bugs.gentoo.org/728020
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.2_pre2.ebuild | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.2_pre2.ebuild b/app-emulation/xen-tools/xen-tools-4.16.2_pre2.ebuild
index 84cc9ef221d0..d41e907ed14d 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.2_pre2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.2_pre2.ebuild
@@ -429,7 +429,16 @@ src_compile() {
 		local -x NO_WERROR=1
 	fi
 
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
 
 	if use doc; then
 		emake -C docs build


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-07-13  7:31 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-07-13  7:31 UTC (permalink / raw
  To: gentoo-commits

commit:     8931f8e3007f0f4711c4670ee439293f7e65f1f6
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 13 07:31:23 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Jul 13 07:31:50 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8931f8e3

app-emulation/xen-tools: use readme.gentoo-r1 eclass

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 ...pre2.ebuild => xen-tools-4.16.2_pre2-r1.ebuild} | 42 +++++++++++-----------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.2_pre2.ebuild b/app-emulation/xen-tools/xen-tools-4.16.2_pre2-r1.ebuild
similarity index 94%
rename from app-emulation/xen-tools/xen-tools-4.16.2_pre2.ebuild
rename to app-emulation/xen-tools/xen-tools-4.16.2_pre2-r1.ebuild
index d41e907ed14d..9c83ef861b78 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.2_pre2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.2_pre2-r1.ebuild
@@ -6,7 +6,7 @@ EAPI=7
 PYTHON_COMPAT=( python3_{8..10} )
 PYTHON_REQ_USE='ncurses,xml,threads(+)'
 
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
 
 if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
@@ -517,27 +517,27 @@ src_install() {
 	fi
 
 	python_optimize
-}
 
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
+	local -x DISABLE_AUTOFORMATTING=true
+	local -x DOC_CONTENTS="Official Xen Guide and the offical wiki page:
+- https://wiki.gentoo.org/wiki/Xen
+- https://wiki.xen.org/wiki/Main_Page
 
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
 
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
+If you use OpenRC:
+It is recommended to utilise the xencommons script to configure the system at
+boot time.
+
+
+If you use QEMU:
+The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source
+build of qemu.  This allows for app-emulation/qemu to be emerged concurrently
+with the qemu capable xen.  It is up to the user to distinguish between and utilise
+the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise
+"
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
 }


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-07-14  8:36 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-07-14  8:36 UTC (permalink / raw
  To: gentoo-commits

commit:     1b88c5ab2624ff9c863c68950f453eb80e4377cf
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 14 06:56:36 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Jul 14 08:24:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b88c5ab

app-emulation/xen-tools: add 4.15.4_pre

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   1 +
 .../xen-tools/xen-tools-4.15.4_pre.ebuild          | 532 +++++++++++++++++++++
 2 files changed, 533 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 8e5779c878d9..efd956877f10 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -8,4 +8,5 @@ DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b
 DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-1.tar.bz2 4351 BLAKE2B 1ba306fbc4a55aa1fea71139f7a900c8c363cf948f34a2aabd1ff6f8a68f2e632154ea0e0289580c84328b372c4f8cfdb2879bc63ae3ec163bfb29487783a758 SHA512 8d8198fbf8d9d4b46a83cf46c965448cb47b30438518a70c9b552c7cd1b23616e50f615206ddb18603e8482d19b25ccb611904c404d445898928ecf88051b70d
+DIST xen-upstream-patches-4.15.4-pre-patchset-0.1.tar.bz2 28980 BLAKE2B 5bdabed3bce4306fe5f656a965d1e537608c03b4706dc801a0b0b9649d001b875b1a2543c68c6b459483991570f0fbf2490a97ea1776761c9f61e9876f240fdf SHA512 4f6bbf0dab57ad58292f32fab55294b2eedd0442be7f62341a2df922a1d21880fe33cc29956ccbbb8b4aee4c10b38d4aa090e4db9496d6e0f5256e60999cad7d
 DIST xen-upstream-patches-4.16.2-pre-patchset-1.tar.bz2 56760 BLAKE2B 4c8030347f9e1ad3c2c4f440645656452daa1f087c34b8a3baba3cae1e7623a910e5727395e8c6f4a8573f3a37e58a318c485fa2f878c8e2f3240fb75cee0c03 SHA512 5e279845052addfbf7681ad5ccab9e692e4a1d69b73e51e1782e498f98217de77bfc4f5158307ee90164393edb023165e032b9f9f7123c0c614ee2336c021259

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4_pre.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4_pre.ebuild
new file mode 100644
index 000000000000..6e8b7325cf79
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.15.4_pre.ebuild
@@ -0,0 +1,532 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
+
+	SEABIOS_VER="1.14.0"
+	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_PRE_PATCHSET_NUM=0.1
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_PRE_VERSION_BASE=4.15.3
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_BASE_PV})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	app-arch/bzip2
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/Makefile \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		 -exec sed -i \
+		 -e 's/-Werror //g' \
+		 -e '/^CFLAGS *+= -Werror$/d' \
+		 -e 's/, "-Werror"//' \
+		 {} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-07-16 11:15 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-07-16 11:15 UTC (permalink / raw
  To: gentoo-commits

commit:     d9bad56b475dfb14b2004189ff4db16623704873
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 16 11:08:53 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sat Jul 16 11:08:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9bad56b

app-emulation/xen-tools: move patches from FILESDIR to xen-gentoo-patches

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                        | 2 +-
 app-emulation/xen-tools/xen-tools-4.16.2_pre2-r1.ebuild | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index efd956877f10..b542efa7a0c0 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -7,6 +7,6 @@ DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c
 DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3
 DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
-DIST xen-gentoo-patches-4.16.1-gentoo-patchset-1.tar.bz2 4351 BLAKE2B 1ba306fbc4a55aa1fea71139f7a900c8c363cf948f34a2aabd1ff6f8a68f2e632154ea0e0289580c84328b372c4f8cfdb2879bc63ae3ec163bfb29487783a758 SHA512 8d8198fbf8d9d4b46a83cf46c965448cb47b30438518a70c9b552c7cd1b23616e50f615206ddb18603e8482d19b25ccb611904c404d445898928ecf88051b70d
+DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-upstream-patches-4.15.4-pre-patchset-0.1.tar.bz2 28980 BLAKE2B 5bdabed3bce4306fe5f656a965d1e537608c03b4706dc801a0b0b9649d001b875b1a2543c68c6b459483991570f0fbf2490a97ea1776761c9f61e9876f240fdf SHA512 4f6bbf0dab57ad58292f32fab55294b2eedd0442be7f62341a2df922a1d21880fe33cc29956ccbbb8b4aee4c10b38d4aa090e4db9496d6e0f5256e60999cad7d
 DIST xen-upstream-patches-4.16.2-pre-patchset-1.tar.bz2 56760 BLAKE2B 4c8030347f9e1ad3c2c4f440645656452daa1f087c34b8a3baba3cae1e7623a910e5727395e8c6f4a8573f3a37e58a318c485fa2f878c8e2f3240fb75cee0c03 SHA512 5e279845052addfbf7681ad5ccab9e692e4a1d69b73e51e1782e498f98217de77bfc4f5158307ee90164393edb023165e032b9f9f7123c0c614ee2336c021259

diff --git a/app-emulation/xen-tools/xen-tools-4.16.2_pre2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.2_pre2-r1.ebuild
index 87a3b970d5b0..bea81cf832c0 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.2_pre2-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.2_pre2-r1.ebuild
@@ -24,7 +24,7 @@ else
 	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
 
 	XEN_PRE_PATCHSET_NUM=1
-	XEN_GENTOO_PATCHSET_NUM=1
+	XEN_GENTOO_PATCHSET_NUM=2
 	XEN_PRE_VERSION_BASE=4.16.1
 
 	XEN_BASE_PV="${PV}"
@@ -265,11 +265,11 @@ src_prepare() {
 
 		# Bug #816987
 		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
 		popd > /dev/null
 
 		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
 		popd > /dev/null
 	fi
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-09-02  9:41 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-09-02  9:41 UTC (permalink / raw
  To: gentoo-commits

commit:     9b45b841df2577387b2f16c36c473c5b51cd185e
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  2 09:40:27 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Sep  2 09:41:19 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b45b841

app-emulation/xen-tools: add 4.16.2

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   1 +
 app-emulation/xen-tools/xen-tools-4.16.2.ebuild | 527 ++++++++++++++++++++++++
 2 files changed, 528 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index b542efa7a0c0..1fd894a3b434 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,6 +6,7 @@ DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8
 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
 DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3
 DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a
+DIST xen-4.16.2.tar.gz 44995249 BLAKE2B a221d1e4578ab6eb3250754b3b0f36fb30133c1c83246532ebb9648c3d025b3f5132227371b5d3dd82099594f4ee738227480528ee944b8de6231d9c89892d15 SHA512 b6cd036c1073798dffa167ca14c954fbdfb4c0ef99662f7c435e7e5de687d1bde8856ff6bd030d0d2e661bd17ab631551f01b2cc728cad7e70b59aaa6e692783
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-upstream-patches-4.15.4-pre-patchset-0.1.tar.bz2 28980 BLAKE2B 5bdabed3bce4306fe5f656a965d1e537608c03b4706dc801a0b0b9649d001b875b1a2543c68c6b459483991570f0fbf2490a97ea1776761c9f61e9876f240fdf SHA512 4f6bbf0dab57ad58292f32fab55294b2eedd0442be7f62341a2df922a1d21880fe33cc29956ccbbb8b4aee4c10b38d4aa090e4db9496d6e0f5256e60999cad7d

diff --git a/app-emulation/xen-tools/xen-tools-4.16.2.ebuild b/app-emulation/xen-tools/xen-tools-4.16.2.ebuild
new file mode 100644
index 000000000000..f913c45d4312
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.16.2.ebuild
@@ -0,0 +1,527 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE='ncurses,xml,threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.14.0"
+	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.16.1
+	XEN_PRE_PATCHSET_NUM=
+	XEN_PRE_VERSION_BASE=
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		 -exec sed -i \
+		 -e 's/-Werror //g' \
+		 -e '/^CFLAGS *+= -Werror$/d' \
+		 -e 's/, "-Werror"//' \
+		 {} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-09-02 13:46 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-09-02 13:46 UTC (permalink / raw
  To: gentoo-commits

commit:     351637d41f9f41ddcf98cc9c65619290114e9900
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  2 13:46:30 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Sep  2 13:46:47 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=351637d4

app-emulation/xen-tools: enable py3.11

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.2.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.2.ebuild b/app-emulation/xen-tools/xen-tools-4.16.2.ebuild
index f913c45d4312..d11d5925ee1d 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.2.ebuild
@@ -3,8 +3,8 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
+PYTHON_COMPAT=( python3_{8..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
 
 inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-09-03 13:09 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-09-03 13:09 UTC (permalink / raw
  To: gentoo-commits

commit:     ba2abdf84cd3043b356ff41708bc29cc5ad92b7a
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  3 13:09:28 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sat Sep  3 13:09:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba2abdf8

app-emulation/xen-tools: drop 4.16.2_pre2-r1

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 -
 .../xen-tools/xen-tools-4.16.2_pre2-r1.ebuild      | 526 ---------------------
 2 files changed, 528 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 1fd894a3b434..ee8f2b2f20fe 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,9 +5,7 @@ DIST edk2-7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5.tar.gz 13998677 BLAKE2B 3614c
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
 DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3
-DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a
 DIST xen-4.16.2.tar.gz 44995249 BLAKE2B a221d1e4578ab6eb3250754b3b0f36fb30133c1c83246532ebb9648c3d025b3f5132227371b5d3dd82099594f4ee738227480528ee944b8de6231d9c89892d15 SHA512 b6cd036c1073798dffa167ca14c954fbdfb4c0ef99662f7c435e7e5de687d1bde8856ff6bd030d0d2e661bd17ab631551f01b2cc728cad7e70b59aaa6e692783
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-upstream-patches-4.15.4-pre-patchset-0.1.tar.bz2 28980 BLAKE2B 5bdabed3bce4306fe5f656a965d1e537608c03b4706dc801a0b0b9649d001b875b1a2543c68c6b459483991570f0fbf2490a97ea1776761c9f61e9876f240fdf SHA512 4f6bbf0dab57ad58292f32fab55294b2eedd0442be7f62341a2df922a1d21880fe33cc29956ccbbb8b4aee4c10b38d4aa090e4db9496d6e0f5256e60999cad7d
-DIST xen-upstream-patches-4.16.2-pre-patchset-1.tar.bz2 56760 BLAKE2B 4c8030347f9e1ad3c2c4f440645656452daa1f087c34b8a3baba3cae1e7623a910e5727395e8c6f4a8573f3a37e58a318c485fa2f878c8e2f3240fb75cee0c03 SHA512 5e279845052addfbf7681ad5ccab9e692e4a1d69b73e51e1782e498f98217de77bfc4f5158307ee90164393edb023165e032b9f9f7123c0c614ee2336c021259

diff --git a/app-emulation/xen-tools/xen-tools-4.16.2_pre2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.2_pre2-r1.ebuild
deleted file mode 100644
index bea81cf832c0..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.2_pre2-r1.ebuild
+++ /dev/null
@@ -1,526 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_PRE_PATCHSET_NUM=1
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_PRE_VERSION_BASE=4.16.1
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_BASE_PV})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i \
-		 -e 's/-Werror //g' \
-		 -e '/^CFLAGS *+= -Werror$/d' \
-		 -e 's/, "-Werror"//' \
-		 {} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-09-05  7:09 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-09-05  7:09 UTC (permalink / raw
  To: gentoo-commits

commit:     0ae57ecef0b2bbdefe21299a7c0b38544b2f5bab
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Sep  4 19:43:02 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Sep  5 07:09:38 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ae57ece

app-emulation/xen-tools: Update PYTHON_REQ_USE to xml(+)

Update PYTHON_REQ_USE to specify "xml(+)", as Python 3.11 no longer
features the "xml" flag.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.3.ebuild     | 2 +-
 app-emulation/xen-tools/xen-tools-4.15.4_pre.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.3.ebuild b/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
index 6c9c7c9fec49..51f8fe6fefe4 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
@@ -4,7 +4,7 @@
 EAPI=7
 
 PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
 
 inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
 

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4_pre.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4_pre.ebuild
index 6e8b7325cf79..222cfab5381e 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.4_pre.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.4_pre.ebuild
@@ -4,7 +4,7 @@
 EAPI=7
 
 PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE='ncurses,xml,threads(+)'
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
 
 inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-10-19  8:51 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-10-19  8:51 UTC (permalink / raw
  To: gentoo-commits

commit:     5df40f922253100393309611781cfeaf3fd9c588
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 19 08:50:55 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Oct 19 08:50:55 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5df40f92

app-emulation/xen-tools: add 4.15.4_pre1, drop 4.15.4_pre

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                                        | 2 +-
 .../{xen-tools-4.15.4_pre.ebuild => xen-tools-4.15.4_pre1.ebuild}       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index ee8f2b2f20fe..90f69ed22f82 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -8,4 +8,4 @@ DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b
 DIST xen-4.16.2.tar.gz 44995249 BLAKE2B a221d1e4578ab6eb3250754b3b0f36fb30133c1c83246532ebb9648c3d025b3f5132227371b5d3dd82099594f4ee738227480528ee944b8de6231d9c89892d15 SHA512 b6cd036c1073798dffa167ca14c954fbdfb4c0ef99662f7c435e7e5de687d1bde8856ff6bd030d0d2e661bd17ab631551f01b2cc728cad7e70b59aaa6e692783
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
-DIST xen-upstream-patches-4.15.4-pre-patchset-0.1.tar.bz2 28980 BLAKE2B 5bdabed3bce4306fe5f656a965d1e537608c03b4706dc801a0b0b9649d001b875b1a2543c68c6b459483991570f0fbf2490a97ea1776761c9f61e9876f240fdf SHA512 4f6bbf0dab57ad58292f32fab55294b2eedd0442be7f62341a2df922a1d21880fe33cc29956ccbbb8b4aee4c10b38d4aa090e4db9496d6e0f5256e60999cad7d
+DIST xen-upstream-patches-4.15.4-pre-patchset-1.tar.bz2 68066 BLAKE2B ee6aac9aa8988423fd1594fa09c54678ee8d089abfff27913fdbe4f60c1f2a038e06cca5d03924595036bd9ca9be8a7f61ed5d7662e6534b05a45da24c88babd SHA512 65c7c900ca91f7444cdc03fa0902e8d58d68cd755cfa2d16cf1df76b657328e374fec0da3ceb734aefa10cfa874a46de5f731c3827ab4f815b4eabc305ed497f

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4_pre.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4_pre1.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.15.4_pre.ebuild
rename to app-emulation/xen-tools/xen-tools-4.15.4_pre1.ebuild
index 222cfab5381e..fe5976e6e978 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.4_pre.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.4_pre1.ebuild
@@ -23,7 +23,7 @@ else
 	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
 	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
 
-	XEN_PRE_PATCHSET_NUM=0.1
+	XEN_PRE_PATCHSET_NUM=1
 	XEN_GENTOO_PATCHSET_NUM=2
 	XEN_PRE_VERSION_BASE=4.15.3
 


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-10-19  9:16 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-10-19  9:16 UTC (permalink / raw
  To: gentoo-commits

commit:     d3526698d60cd2cfa6b7a9d755bc498db024d1fa
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 19 09:07:41 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Oct 19 09:15:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3526698

app-emulation/xen-tools: add 4.16.3_pre

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   1 +
 .../xen-tools/xen-tools-4.16.3_pre.ebuild          | 527 +++++++++++++++++++++
 2 files changed, 528 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 90f69ed22f82..191746e63842 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -9,3 +9,4 @@ DIST xen-4.16.2.tar.gz 44995249 BLAKE2B a221d1e4578ab6eb3250754b3b0f36fb30133c1c
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-upstream-patches-4.15.4-pre-patchset-1.tar.bz2 68066 BLAKE2B ee6aac9aa8988423fd1594fa09c54678ee8d089abfff27913fdbe4f60c1f2a038e06cca5d03924595036bd9ca9be8a7f61ed5d7662e6534b05a45da24c88babd SHA512 65c7c900ca91f7444cdc03fa0902e8d58d68cd755cfa2d16cf1df76b657328e374fec0da3ceb734aefa10cfa874a46de5f731c3827ab4f815b4eabc305ed497f
+DIST xen-upstream-patches-4.16.3-pre-patchset-0.tar.bz2 36580 BLAKE2B 7a16b452fda7cf00321c70c239f30fbff72204d5b021aba23e1e08b2d8dee0f1180a18301b5935f4d35dc54533e2e253f047681b837de187a2a174191a168c3c SHA512 5e7328c8cd7ce98cdff47033a76705395419c1322d5212206aa1255d19aeb2fd3d097e71d39137ab97aeab0b9f991e1660b92a6ddb08f02c9407ceaa24aa9ec0

diff --git a/app-emulation/xen-tools/xen-tools-4.16.3_pre.ebuild b/app-emulation/xen-tools/xen-tools-4.16.3_pre.ebuild
new file mode 100644
index 000000000000..dbd4537cca0f
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.16.3_pre.ebuild
@@ -0,0 +1,527 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.14.0"
+	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.16.1
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.16.2
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		 -exec sed -i \
+		 -e 's/-Werror //g' \
+		 -e '/^CFLAGS *+= -Werror$/d' \
+		 -e 's/, "-Werror"//' \
+		 {} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-10-25 17:55 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2022-10-25 17:55 UTC (permalink / raw
  To: gentoo-commits

commit:     e80f97e7d6120de402ff44c0f40be0cf047f97c2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 25 17:54:39 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct 25 17:54:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e80f97e7

app-emulation/xen-tools: Stabilize 4.15.4_pre1 amd64, #877875

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.4_pre1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4_pre1.ebuild
index fe5976e6e978..f80af4173dba 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.4_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.4_pre1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.14.0"
 	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-10-26 14:27 John Helmert III
  0 siblings, 0 replies; 295+ messages in thread
From: John Helmert III @ 2022-10-26 14:27 UTC (permalink / raw
  To: gentoo-commits

commit:     56dd0a00b1d3cfc1fbd79fc94e9512a105e01691
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Oct 26 05:08:05 2022 +0000
Commit:     John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Wed Oct 26 14:26:18 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56dd0a00

app-emulation/xen-tools: drop vulnerable

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/27952
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.3.ebuild | 532 ------------------------
 app-emulation/xen-tools/xen-tools-4.16.2.ebuild | 527 -----------------------
 2 files changed, 1059 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.3.ebuild b/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
deleted file mode 100644
index 51f8fe6fefe4..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.15.3.ebuild
+++ /dev/null
@@ -1,532 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_PRE_PATCHSET_NUM=
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_PRE_VERSION_BASE=
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="${PV}-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	app-arch/bzip2
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/Makefile \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i \
-		 -e 's/-Werror //g' \
-		 -e '/^CFLAGS *+= -Werror$/d' \
-		 -e 's/, "-Werror"//' \
-		 {} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.16.2.ebuild b/app-emulation/xen-tools/xen-tools-4.16.2.ebuild
deleted file mode 100644
index d11d5925ee1d..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.2.ebuild
+++ /dev/null
@@ -1,527 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.16.1
-	XEN_PRE_PATCHSET_NUM=
-	XEN_PRE_VERSION_BASE=
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i \
-		 -e 's/-Werror //g' \
-		 -e '/^CFLAGS *+= -Werror$/d' \
-		 -e 's/, "-Werror"//' \
-		 {} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-11-09  9:37 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-11-09  9:37 UTC (permalink / raw
  To: gentoo-commits

commit:     fd0fe9a2abbcbcfb12825a2714a177fd8bc0925e
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  9 09:15:56 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Nov  9 09:37:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd0fe9a2

app-emulation/xen-tools: add 4.16.3_pre1

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 .../xen-tools/xen-tools-4.16.3_pre1.ebuild         | 527 +++++++++++++++++++++
 1 file changed, 527 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.3_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.3_pre1.ebuild
new file mode 100644
index 000000000000..dbd4537cca0f
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.16.3_pre1.ebuild
@@ -0,0 +1,527 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.14.0"
+	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.16.1
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.16.2
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		 -exec sed -i \
+		 -e 's/-Werror //g' \
+		 -e '/^CFLAGS *+= -Werror$/d' \
+		 -e 's/, "-Werror"//' \
+		 {} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-11-09  9:37 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-11-09  9:37 UTC (permalink / raw
  To: gentoo-commits

commit:     3d19399cda33c58c763478cf0d957fe065072039
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  9 09:15:20 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Nov  9 09:37:13 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3d19399c

app-emulation/xen-tools: add 4.15.4_pre2

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 .../xen-tools/xen-tools-4.15.4_pre2.ebuild         | 532 +++++++++++++++++++++
 1 file changed, 532 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4_pre2.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4_pre2.ebuild
new file mode 100644
index 000000000000..967bfbbe9a94
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.15.4_pre2.ebuild
@@ -0,0 +1,532 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.14.0"
+	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_PRE_PATCHSET_NUM=1
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_PRE_VERSION_BASE=4.15.3
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_BASE_PV})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	app-arch/bzip2
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/Makefile \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		 -exec sed -i \
+		 -e 's/-Werror //g' \
+		 -e '/^CFLAGS *+= -Werror$/d' \
+		 -e 's/, "-Werror"//' \
+		 {} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-12-07 17:05 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2022-12-07 17:05 UTC (permalink / raw
  To: gentoo-commits

commit:     9e03e872252c6507aa47e1966dc2106e802160b5
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  7 17:02:48 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Dec  7 17:03:48 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e03e872

app-emulation/xen-tools: add 4.15.4

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   1 +
 app-emulation/xen-tools/xen-tools-4.15.4.ebuild | 536 ++++++++++++++++++++++++
 2 files changed, 537 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 191746e63842..63e4081294ac 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,6 +5,7 @@ DIST edk2-7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5.tar.gz 13998677 BLAKE2B 3614c
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
 DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3
+DIST xen-4.15.4.tar.gz 40820669 BLAKE2B 22edaf817851856c777d02b5211be932c1731bf50fb582545f948c7e8f871937f7c94636496a480642fa7ed8222e12dda091a06638c75b9ee935f3ff9bc2aea0 SHA512 fa6a4991c0699025af163ed117f8d0523c0a482102464615025eb3575d755ffacec5df394e3fe01871cde6028678f654d99f8e3c2533b138765971a2a7994cb8
 DIST xen-4.16.2.tar.gz 44995249 BLAKE2B a221d1e4578ab6eb3250754b3b0f36fb30133c1c83246532ebb9648c3d025b3f5132227371b5d3dd82099594f4ee738227480528ee944b8de6231d9c89892d15 SHA512 b6cd036c1073798dffa167ca14c954fbdfb4c0ef99662f7c435e7e5de687d1bde8856ff6bd030d0d2e661bd17ab631551f01b2cc728cad7e70b59aaa6e692783
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4.ebuild
new file mode 100644
index 000000000000..2e0320c285c5
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.15.4.ebuild
@@ -0,0 +1,536 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.14.0"
+	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_PRE_PATCHSET_NUM=
+	XEN_GENTOO_PATCHSET_BASE=4.15.3
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_PRE_VERSION_BASE=
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+	if [[ -z "${XEN_GENTOO_PATCHSET_BASE}" ]]; then
+		XEN_GENTOO_PATCHSET_BASE="${XEN_BASE_PV}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	app-arch/bzip2
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? ( sys-firmware/seabios )
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/Makefile \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		 -exec sed -i \
+		 -e 's/-Werror //g' \
+		 -e '/^CFLAGS *+= -Werror$/d' \
+		 -e 's/, "-Werror"//' \
+		 {} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-12-16  4:30 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2022-12-16  4:30 UTC (permalink / raw
  To: gentoo-commits

commit:     511492f511c932c2e54ff2883d1919613c986be4
Author:     John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 15 17:52:52 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 16 04:29:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=511492f5

app-emulation/xen-tools: depend on either seabios or seabios-bin

Closes: https://bugs.gentoo.org/885855
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/28675
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../{xen-tools-4.15.4.ebuild => xen-tools-4.15.4-r1.ebuild}        | 7 ++++++-
 ...en-tools-4.15.4_pre1.ebuild => xen-tools-4.15.4_pre1-r1.ebuild} | 7 ++++++-
 ...en-tools-4.15.4_pre2.ebuild => xen-tools-4.15.4_pre2-r1.ebuild} | 7 ++++++-
 ...xen-tools-4.16.3_pre1.ebuild => xen-tools-4.16.3_pre-r1.ebuild} | 7 ++++++-
 ...xen-tools-4.16.3_pre.ebuild => xen-tools-4.16.3_pre1-r1.ebuild} | 7 ++++++-
 5 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.15.4.ebuild
rename to app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
index 2e0320c285c5..e0602f589a17 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
@@ -129,7 +129,12 @@ DEPEND="${COMMON_DEPEND}
 		)
 	!amd64? ( >=sys-apps/dtc-1.4.0 )
 	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
 		system-ipxe? ( sys-firmware/ipxe[qemu] )
 		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
 	arm64? ( sys-power/iasl

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4_pre1-r1.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.15.4_pre1.ebuild
rename to app-emulation/xen-tools/xen-tools-4.15.4_pre1-r1.ebuild
index f80af4173dba..15a12c8d3fd2 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.4_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.4_pre1-r1.ebuild
@@ -125,7 +125,12 @@ DEPEND="${COMMON_DEPEND}
 		)
 	!amd64? ( >=sys-apps/dtc-1.4.0 )
 	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
 		system-ipxe? ( sys-firmware/ipxe[qemu] )
 		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
 	arm64? ( sys-power/iasl

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4_pre2.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4_pre2-r1.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.15.4_pre2.ebuild
rename to app-emulation/xen-tools/xen-tools-4.15.4_pre2-r1.ebuild
index 967bfbbe9a94..745618a4d830 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.4_pre2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.4_pre2-r1.ebuild
@@ -125,7 +125,12 @@ DEPEND="${COMMON_DEPEND}
 		)
 	!amd64? ( >=sys-apps/dtc-1.4.0 )
 	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
 		system-ipxe? ( sys-firmware/ipxe[qemu] )
 		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
 	arm64? ( sys-power/iasl

diff --git a/app-emulation/xen-tools/xen-tools-4.16.3_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.3_pre-r1.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.16.3_pre1.ebuild
rename to app-emulation/xen-tools/xen-tools-4.16.3_pre-r1.ebuild
index dbd4537cca0f..24c5331e9873 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.3_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.3_pre-r1.ebuild
@@ -128,7 +128,12 @@ DEPEND="${COMMON_DEPEND}
 		)
 	!amd64? ( >=sys-apps/dtc-1.4.0 )
 	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
 		system-ipxe? ( sys-firmware/ipxe[qemu] )
 		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
 	arm64? ( sys-power/iasl

diff --git a/app-emulation/xen-tools/xen-tools-4.16.3_pre.ebuild b/app-emulation/xen-tools/xen-tools-4.16.3_pre1-r1.ebuild
similarity index 99%
rename from app-emulation/xen-tools/xen-tools-4.16.3_pre.ebuild
rename to app-emulation/xen-tools/xen-tools-4.16.3_pre1-r1.ebuild
index dbd4537cca0f..24c5331e9873 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.3_pre.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.3_pre1-r1.ebuild
@@ -128,7 +128,12 @@ DEPEND="${COMMON_DEPEND}
 		)
 	!amd64? ( >=sys-apps/dtc-1.4.0 )
 	amd64? ( sys-power/iasl
-		system-seabios? ( sys-firmware/seabios )
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
 		system-ipxe? ( sys-firmware/ipxe[qemu] )
 		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
 	arm64? ( sys-power/iasl


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-12-17 16:55 Arthur Zamarin
  0 siblings, 0 replies; 295+ messages in thread
From: Arthur Zamarin @ 2022-12-17 16:55 UTC (permalink / raw
  To: gentoo-commits

commit:     fd28c64c5228038ffefe8a5cd77780d395b179ec
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 17 16:55:25 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 17 16:55:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd28c64c

app-emulation/xen-tools: Stabilize 4.15.4-r1 x86, #886471

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
index e0602f589a17..1d4732020c2a 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.14.0"
 	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2022-12-17 16:55 Arthur Zamarin
  0 siblings, 0 replies; 295+ messages in thread
From: Arthur Zamarin @ 2022-12-17 16:55 UTC (permalink / raw
  To: gentoo-commits

commit:     c168ca6a2e85f1e7f12be5b24d54c34e726f8592
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 17 16:55:26 2022 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Dec 17 16:55:26 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c168ca6a

app-emulation/xen-tools: Stabilize 4.15.4-r1 amd64, #886471

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
index 1d4732020c2a..fe4262757a6c 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.14.0"
 	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-01-25 16:24 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2023-01-25 16:24 UTC (permalink / raw
  To: gentoo-commits

commit:     eb1ac78c6c95863fc7c5e589836fabbbda4907a0
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Jan 25 16:01:26 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Jan 25 16:24:13 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb1ac78c

app-emulation/xen-tools: drop vulnerable

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29268
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   4 -
 .../xen-tools/xen-tools-4.15.4_pre1-r1.ebuild      | 537 ---------------------
 .../xen-tools/xen-tools-4.15.4_pre2-r1.ebuild      | 537 ---------------------
 .../xen-tools/xen-tools-4.16.3_pre-r1.ebuild       | 532 --------------------
 .../xen-tools/xen-tools-4.16.3_pre1-r1.ebuild      | 532 --------------------
 5 files changed, 2142 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index d783cadf74e9..a19fd3da527d 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -4,11 +4,7 @@ DIST brotli-666c3280cc11dc433c303d79a83d4ffbdd12cc8d.tar.gz 23855739 BLAKE2B 740
 DIST edk2-7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5.tar.gz 13998677 BLAKE2B 3614ceb69e295a6afb37c7905d0aec3534d8daf3d9f22137c1b722da6dc764a3669d99af03f96155d45feb5058a6f725acf37d1048186fecff4232d64f96e97c SHA512 a1933d815b947fd4f13c96970a6dc36c3048e3ddf27c897684104b0129cf58331e46d3147062ae1fb8973f08cd373c319788dd850ac5e45da385eed8368571a4
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
-DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3
 DIST xen-4.15.4.tar.gz 40820669 BLAKE2B 22edaf817851856c777d02b5211be932c1731bf50fb582545f948c7e8f871937f7c94636496a480642fa7ed8222e12dda091a06638c75b9ee935f3ff9bc2aea0 SHA512 fa6a4991c0699025af163ed117f8d0523c0a482102464615025eb3575d755ffacec5df394e3fe01871cde6028678f654d99f8e3c2533b138765971a2a7994cb8
-DIST xen-4.16.2.tar.gz 44995249 BLAKE2B a221d1e4578ab6eb3250754b3b0f36fb30133c1c83246532ebb9648c3d025b3f5132227371b5d3dd82099594f4ee738227480528ee944b8de6231d9c89892d15 SHA512 b6cd036c1073798dffa167ca14c954fbdfb4c0ef99662f7c435e7e5de687d1bde8856ff6bd030d0d2e661bd17ab631551f01b2cc728cad7e70b59aaa6e692783
 DIST xen-4.16.3.tar.gz 45003057 BLAKE2B 6092cff33bffed1b6133daf8d3ce53c57204297e66df6ac58266b2da8d5585df62ae718cc8afaad36ebe6dabdce65b9979b0d13b88e60f2b23c01be21ae4db8e SHA512 b8cbd6f95681de5f824ada2d3cbe0653a38514a18df0dafcf811fb255219c7abec96f46217bdb0c83e1119f685da9a6af7194eeaa94f1cc3c892702782133b4f
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
-DIST xen-upstream-patches-4.15.4-pre-patchset-1.tar.bz2 68066 BLAKE2B ee6aac9aa8988423fd1594fa09c54678ee8d089abfff27913fdbe4f60c1f2a038e06cca5d03924595036bd9ca9be8a7f61ed5d7662e6534b05a45da24c88babd SHA512 65c7c900ca91f7444cdc03fa0902e8d58d68cd755cfa2d16cf1df76b657328e374fec0da3ceb734aefa10cfa874a46de5f731c3827ab4f815b4eabc305ed497f
-DIST xen-upstream-patches-4.16.3-pre-patchset-0.tar.bz2 36580 BLAKE2B 7a16b452fda7cf00321c70c239f30fbff72204d5b021aba23e1e08b2d8dee0f1180a18301b5935f4d35dc54533e2e253f047681b837de187a2a174191a168c3c SHA512 5e7328c8cd7ce98cdff47033a76705395419c1322d5212206aa1255d19aeb2fd3d097e71d39137ab97aeab0b9f991e1660b92a6ddb08f02c9407ceaa24aa9ec0

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4_pre1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4_pre1-r1.ebuild
deleted file mode 100644
index 35a35feb2aa0..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.15.4_pre1-r1.ebuild
+++ /dev/null
@@ -1,537 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..10} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_PRE_PATCHSET_NUM=1
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_PRE_VERSION_BASE=4.15.3
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_BASE_PV})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	app-arch/bzip2
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/Makefile \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i \
-		 -e 's/-Werror //g' \
-		 -e '/^CFLAGS *+= -Werror$/d' \
-		 -e 's/, "-Werror"//' \
-		 {} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4_pre2-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4_pre2-r1.ebuild
deleted file mode 100644
index 5c8edbd149e5..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.15.4_pre2-r1.ebuild
+++ /dev/null
@@ -1,537 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..10} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_PRE_PATCHSET_NUM=1
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_PRE_VERSION_BASE=4.15.3
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_BASE_PV})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	app-arch/bzip2
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/Makefile \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i \
-		 -e 's/-Werror //g' \
-		 -e '/^CFLAGS *+= -Werror$/d' \
-		 -e 's/, "-Werror"//' \
-		 {} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.16.3_pre-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.3_pre-r1.ebuild
deleted file mode 100644
index 4fba06c3cfd3..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.3_pre-r1.ebuild
+++ /dev/null
@@ -1,532 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.16.1
-	XEN_PRE_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=4.16.2
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i \
-		 -e 's/-Werror //g' \
-		 -e '/^CFLAGS *+= -Werror$/d' \
-		 -e 's/, "-Werror"//' \
-		 {} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.16.3_pre1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.3_pre1-r1.ebuild
deleted file mode 100644
index 4fba06c3cfd3..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.3_pre1-r1.ebuild
+++ /dev/null
@@ -1,532 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.16.1
-	XEN_PRE_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=4.16.2
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i \
-		 -e 's/-Werror //g' \
-		 -e '/^CFLAGS *+= -Werror$/d' \
-		 -e 's/, "-Werror"//' \
-		 {} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-01-25 16:24 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2023-01-25 16:24 UTC (permalink / raw
  To: gentoo-commits

commit:     d9db6a2eb77b259333c89f61c80e7008348a69f7
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Jan 25 15:56:03 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Jan 25 16:24:12 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9db6a2e

app-emulation/xen-tools: add 4.16.3

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   1 +
 app-emulation/xen-tools/xen-tools-4.16.3.ebuild | 532 ++++++++++++++++++++++++
 2 files changed, 533 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 63e4081294ac..d783cadf74e9 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -7,6 +7,7 @@ DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c
 DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3
 DIST xen-4.15.4.tar.gz 40820669 BLAKE2B 22edaf817851856c777d02b5211be932c1731bf50fb582545f948c7e8f871937f7c94636496a480642fa7ed8222e12dda091a06638c75b9ee935f3ff9bc2aea0 SHA512 fa6a4991c0699025af163ed117f8d0523c0a482102464615025eb3575d755ffacec5df394e3fe01871cde6028678f654d99f8e3c2533b138765971a2a7994cb8
 DIST xen-4.16.2.tar.gz 44995249 BLAKE2B a221d1e4578ab6eb3250754b3b0f36fb30133c1c83246532ebb9648c3d025b3f5132227371b5d3dd82099594f4ee738227480528ee944b8de6231d9c89892d15 SHA512 b6cd036c1073798dffa167ca14c954fbdfb4c0ef99662f7c435e7e5de687d1bde8856ff6bd030d0d2e661bd17ab631551f01b2cc728cad7e70b59aaa6e692783
+DIST xen-4.16.3.tar.gz 45003057 BLAKE2B 6092cff33bffed1b6133daf8d3ce53c57204297e66df6ac58266b2da8d5585df62ae718cc8afaad36ebe6dabdce65b9979b0d13b88e60f2b23c01be21ae4db8e SHA512 b8cbd6f95681de5f824ada2d3cbe0653a38514a18df0dafcf811fb255219c7abec96f46217bdb0c83e1119f685da9a6af7194eeaa94f1cc3c892702782133b4f
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-upstream-patches-4.15.4-pre-patchset-1.tar.bz2 68066 BLAKE2B ee6aac9aa8988423fd1594fa09c54678ee8d089abfff27913fdbe4f60c1f2a038e06cca5d03924595036bd9ca9be8a7f61ed5d7662e6534b05a45da24c88babd SHA512 65c7c900ca91f7444cdc03fa0902e8d58d68cd755cfa2d16cf1df76b657328e374fec0da3ceb734aefa10cfa874a46de5f731c3827ab4f815b4eabc305ed497f

diff --git a/app-emulation/xen-tools/xen-tools-4.16.3.ebuild b/app-emulation/xen-tools/xen-tools-4.16.3.ebuild
new file mode 100644
index 000000000000..5cb850086cd6
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.16.3.ebuild
@@ -0,0 +1,532 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.14.0"
+	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.16.1
+	XEN_PRE_PATCHSET_NUM=
+	XEN_PRE_VERSION_BASE=
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		 -exec sed -i \
+		 -e 's/-Werror //g' \
+		 -e '/^CFLAGS *+= -Werror$/d' \
+		 -e 's/, "-Werror"//' \
+		 {} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-02-04 22:50 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2023-02-04 22:50 UTC (permalink / raw
  To: gentoo-commits

commit:     45d17d73acc6a72e23e33720c20f00a0b071b906
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb  4 21:36:57 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb  4 22:49:34 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45d17d73

app-emulation/xen-tools: add github upstream metadata

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/metadata.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
index fb98e4a01835..b2bd29a7270d 100644
--- a/app-emulation/xen-tools/metadata.xml
+++ b/app-emulation/xen-tools/metadata.xml
@@ -27,4 +27,7 @@
 		<flag name="system-qemu">Using <pkg>app-emulation/qemu</pkg> instead of the bundled one</flag>
 		<flag name="system-seabios">Using <pkg>sys-firmware/seabios</pkg> instead of the bundled one</flag>
 	</use>
+	<upstream>
+		<remote-id type="github">xen-tools/xen-tools</remote-id>
+	</upstream>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-02-11  2:36 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2023-02-11  2:36 UTC (permalink / raw
  To: gentoo-commits

commit:     e12c1b0d77407712d204e780b796c1c5365812df
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 11 02:22:14 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 11 02:36:48 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e12c1b0d

Revert "app-emulation/xen-tools: add github upstream metadata"

This reverts commit 45d17d73acc6a72e23e33720c20f00a0b071b906.

It's not the same xen-tools. I'd taken a brief look and assumed
the code was buried, but it's not.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/metadata.xml | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/app-emulation/xen-tools/metadata.xml b/app-emulation/xen-tools/metadata.xml
index b2bd29a7270d..fb98e4a01835 100644
--- a/app-emulation/xen-tools/metadata.xml
+++ b/app-emulation/xen-tools/metadata.xml
@@ -27,7 +27,4 @@
 		<flag name="system-qemu">Using <pkg>app-emulation/qemu</pkg> instead of the bundled one</flag>
 		<flag name="system-seabios">Using <pkg>sys-firmware/seabios</pkg> instead of the bundled one</flag>
 	</use>
-	<upstream>
-		<remote-id type="github">xen-tools/xen-tools</remote-id>
-	</upstream>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-04-17  8:32 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2023-04-17  8:32 UTC (permalink / raw
  To: gentoo-commits

commit:     3dec50197211678506c555e5ee8c05eb73ec3c7f
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Apr 14 16:42:46 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Apr 17 08:12:49 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3dec5019

app-emulation/xen-tools: add upstream patches

Bug: https://bugs.gentoo.org/903624
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   3 +
 .../xen-tools/xen-tools-4.15.5_pre1.ebuild         | 541 +++++++++++++++++++++
 .../xen-tools/xen-tools-4.16.4_pre1.ebuild         | 532 ++++++++++++++++++++
 3 files changed, 1076 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index a19fd3da527d..387a72786d8b 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -4,7 +4,10 @@ DIST brotli-666c3280cc11dc433c303d79a83d4ffbdd12cc8d.tar.gz 23855739 BLAKE2B 740
 DIST edk2-7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5.tar.gz 13998677 BLAKE2B 3614ceb69e295a6afb37c7905d0aec3534d8daf3d9f22137c1b722da6dc764a3669d99af03f96155d45feb5058a6f725acf37d1048186fecff4232d64f96e97c SHA512 a1933d815b947fd4f13c96970a6dc36c3048e3ddf27c897684104b0129cf58331e46d3147062ae1fb8973f08cd373c319788dd850ac5e45da385eed8368571a4
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
+DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
 DIST xen-4.15.4.tar.gz 40820669 BLAKE2B 22edaf817851856c777d02b5211be932c1731bf50fb582545f948c7e8f871937f7c94636496a480642fa7ed8222e12dda091a06638c75b9ee935f3ff9bc2aea0 SHA512 fa6a4991c0699025af163ed117f8d0523c0a482102464615025eb3575d755ffacec5df394e3fe01871cde6028678f654d99f8e3c2533b138765971a2a7994cb8
 DIST xen-4.16.3.tar.gz 45003057 BLAKE2B 6092cff33bffed1b6133daf8d3ce53c57204297e66df6ac58266b2da8d5585df62ae718cc8afaad36ebe6dabdce65b9979b0d13b88e60f2b23c01be21ae4db8e SHA512 b8cbd6f95681de5f824ada2d3cbe0653a38514a18df0dafcf811fb255219c7abec96f46217bdb0c83e1119f685da9a6af7194eeaa94f1cc3c892702782133b4f
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
+DIST xen-upstream-patches-4.15.5-pre-patchset-0.tar.bz2 21880 BLAKE2B 89ef7b8cc56ca5a4738ce665aaa3461b61c554088b1b727e34ea417beb43f9b8eae403bae50449c0c96e79ff4b71edf9b6808071b1ca8f0b3878bf1cb9697c6e SHA512 0752d699168e3c2ba13a0ad886dd1d1f9affefc5e7fed9980b2a634012508f405c2accfcd7e92f79016bb869d2d0b09139266a952cc203bea37870fc7d910e51
+DIST xen-upstream-patches-4.16.4-pre-patchset-0.tar.bz2 60151 BLAKE2B 5c8a8f772ba6be5f776b3270b9f1e64df35c2be7b4e238262eb4ec6b4859576b3ecb448880e1e05ad53dbdaa71643e678978151b10d0d47c901ab3e3518b7eb0 SHA512 b33a9b2f602f18165e048ef6a339bc5bf3f800fb1f2449e2e1a6090774ce3ef07b1d7ea8e9e6449fae7b91afcc1a6e281c1bb218a56bca74ba7f12b491fab186

diff --git a/app-emulation/xen-tools/xen-tools-4.15.5_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.5_pre1.ebuild
new file mode 100644
index 000000000000..394a30374346
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.15.5_pre1.ebuild
@@ -0,0 +1,541 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.15.3
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.15.4
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+	if [[ -z "${XEN_GENTOO_PATCHSET_BASE}" ]]; then
+		XEN_GENTOO_PATCHSET_BASE="${XEN_BASE_PV}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	app-arch/bzip2
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/Makefile \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		 -exec sed -i \
+		 -e 's/-Werror //g' \
+		 -e '/^CFLAGS *+= -Werror$/d' \
+		 -e 's/, "-Werror"//' \
+		 {} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the offical wiki page:"
+	elog "https://wiki.gentoo.org/wiki/Xen"
+	elog "https://wiki.xen.org/wiki/Main_Page"
+	elog ""
+	elog "Recommended to utilise the xencommons script to config system at boot"
+	elog "Add by use of rc-update on completion of the install"
+
+	if ! use hvm; then
+		echo
+		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
+		elog "support enable the hvm use flag."
+		elog "An x86 or amd64 system is required to build HVM support."
+	fi
+
+	if use qemu; then
+		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
+		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
+		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
+		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
+	fi
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild
new file mode 100644
index 000000000000..00ad2555a8f4
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild
@@ -0,0 +1,532 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.16.1
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.16.3
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		 -exec sed -i \
+		 -e 's/-Werror //g' \
+		 -e '/^CFLAGS *+= -Werror$/d' \
+		 -e 's/, "-Werror"//' \
+		 {} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-04-17  8:32 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2023-04-17  8:32 UTC (permalink / raw
  To: gentoo-commits

commit:     1fbaf28e83b6afa528675e9e8ceb32086bce53ce
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Apr 14 18:57:49 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Apr 17 08:12:51 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fbaf28e

app-emulation/xen-tools: add 4.17.1_pre1

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   3 +
 .../xen-tools/xen-tools-4.17.1_pre1.ebuild         | 533 +++++++++++++++++++++
 2 files changed, 536 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 387a72786d8b..ba263e641129 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -7,7 +7,10 @@ DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
 DIST xen-4.15.4.tar.gz 40820669 BLAKE2B 22edaf817851856c777d02b5211be932c1731bf50fb582545f948c7e8f871937f7c94636496a480642fa7ed8222e12dda091a06638c75b9ee935f3ff9bc2aea0 SHA512 fa6a4991c0699025af163ed117f8d0523c0a482102464615025eb3575d755ffacec5df394e3fe01871cde6028678f654d99f8e3c2533b138765971a2a7994cb8
 DIST xen-4.16.3.tar.gz 45003057 BLAKE2B 6092cff33bffed1b6133daf8d3ce53c57204297e66df6ac58266b2da8d5585df62ae718cc8afaad36ebe6dabdce65b9979b0d13b88e60f2b23c01be21ae4db8e SHA512 b8cbd6f95681de5f824ada2d3cbe0653a38514a18df0dafcf811fb255219c7abec96f46217bdb0c83e1119f685da9a6af7194eeaa94f1cc3c892702782133b4f
+DIST xen-4.17.0.tar.gz 46484553 BLAKE2B a4665fb557eb264566179bc5b2678d44f694ef5b20bb7dc58c8a7e6fcdf0145f25a462cfe2ad35be67a4a5ca4579c03eb092954915953e2ab98ae90b4ea983f0 SHA512 8aa7c3025c81127a4f653411bc1cbe8fc27b767a2f96a2a454329a6773cb74d714ecc1ff011a8e7169c6b83b2cc5cb39c39798bd6b1178df75ce9ff00f5a1011
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
+DIST xen-gentoo-patches-4.17.0-gentoo-patchset-0.tar.bz2 4474 BLAKE2B aa367a4ccf96a61c04c52e415d7143ca946323d7d50d6ab16ad7a917279ad4b1aac802e35e7e306c3a244317db713e913dc8d6343717b2307ccd049adb956a0d SHA512 debba71b17be7b1bb9a70f01782c12c3c053cc2fb1f4ad95829356ee365878aad68430055d4b8c648ef1ff54cb9e3e7c03d40d14c560d51f8ac4fce2b8f82190
 DIST xen-upstream-patches-4.15.5-pre-patchset-0.tar.bz2 21880 BLAKE2B 89ef7b8cc56ca5a4738ce665aaa3461b61c554088b1b727e34ea417beb43f9b8eae403bae50449c0c96e79ff4b71edf9b6808071b1ca8f0b3878bf1cb9697c6e SHA512 0752d699168e3c2ba13a0ad886dd1d1f9affefc5e7fed9980b2a634012508f405c2accfcd7e92f79016bb869d2d0b09139266a952cc203bea37870fc7d910e51
 DIST xen-upstream-patches-4.16.4-pre-patchset-0.tar.bz2 60151 BLAKE2B 5c8a8f772ba6be5f776b3270b9f1e64df35c2be7b4e238262eb4ec6b4859576b3ecb448880e1e05ad53dbdaa71643e678978151b10d0d47c901ab3e3518b7eb0 SHA512 b33a9b2f602f18165e048ef6a339bc5bf3f800fb1f2449e2e1a6090774ce3ef07b1d7ea8e9e6449fae7b91afcc1a6e281c1bb218a56bca74ba7f12b491fab186
+DIST xen-upstream-patches-4.17.1-pre-patchset-0.tar.bz2 87023 BLAKE2B 4b6c66c20aecde5a696ee6879b1a9e9b365eba3a2e55c7b13153adb4c100081242a5f4498e17597697ac96a75685d88536309accb8dcebee45b31c9b35a3d7d8 SHA512 9da15f7726f2813a6dc701dbf67c1aa52a574c8049238c6d18d68bc0c0c80db98b925cd1cb7ec5627ff8b3489847608a185353cda6e599e6e5bffe75339b18a7

diff --git a/app-emulation/xen-tools/xen-tools-4.17.1_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.1_pre1.ebuild
new file mode 100644
index 000000000000..0ad9e03de6f4
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.17.1_pre1.ebuild
@@ -0,0 +1,533 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
+	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=0
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.17.0
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+
+		# Bug #816987
+		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+
+		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
+			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
+		popd > /dev/null
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-04-17 20:13 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2023-04-17 20:13 UTC (permalink / raw
  To: gentoo-commits

commit:     ea4756f3ce459de565329a5adf544e6190a6ea04
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 17 20:12:31 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr 17 20:12:31 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea4756f3

app-emulation/xen-tools: Stabilize 4.15.5_pre1 x86, #904469

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.5_pre1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.5_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.5_pre1.ebuild
index 394a30374346..ac8457f95c7a 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.5_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.5_pre1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-04-17 20:13 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2023-04-17 20:13 UTC (permalink / raw
  To: gentoo-commits

commit:     04abc8a0f887664e41fc31929ed39c30630eef8c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 17 20:12:35 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Apr 17 20:12:35 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04abc8a0

app-emulation/xen-tools: Stabilize 4.15.5_pre1 amd64, #904469

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.5_pre1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.5_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.5_pre1.ebuild
index ac8457f95c7a..75003ae0412f 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.5_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.5_pre1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-04-19  6:07 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2023-04-19  6:07 UTC (permalink / raw
  To: gentoo-commits

commit:     3ac65c3cafe4259c50ec0c05a7ce755af950dc1d
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue Apr 18 15:07:03 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Apr 19 06:06:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ac65c3c

app-emulation/xen-tools: use latest ovmf snapshot

Closes: https://github.com/gentoo/gentoo/pull/30642
Closes: https://bugs.gentoo.org/892872
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |  3 +++
 .../xen-tools/xen-tools-4.16.4_pre1.ebuild         | 25 +++++++---------------
 .../xen-tools/xen-tools-4.17.1_pre1.ebuild         | 15 +++----------
 3 files changed, 14 insertions(+), 29 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index ba263e641129..b39785c51919 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,7 +1,10 @@
 DIST OpenSSL_1_1_1j.tar.gz 9994760 BLAKE2B 749886716739dcb909bd79b29cf714640b64039917f64f6cfc4bee9861e797380d0df9ff11d7f6bb084508b322cb0db4ef7a2f871ee304548ec919d387cdb2c5 SHA512 f94ef129514e69b70f800a599ae726eff6a2fac0dfa8e42982973d1328f6fac6b1da1124e1a7b8aa3d579b720ecf9c71a8bae45db6b1630c052b0c3a22b9360e
+DIST OpenSSL_1_1_1t.tar.gz 10061233 BLAKE2B aef89c338644230305bcc75dbc13d6799a04ed8c712b6aed07a782703031e977c3e300924f26e5854d0b89ecf39d2d516a50838167754e8f63322fba51de9478 SHA512 f28a323fd78be0b16ae6db9a8f163e64c74410e12ddd1a9836dfdda34c264112184f4e22583c84b6fa56716e5aaac9cb860cb183bd3d0cb064091eea1e21815e
 DIST berkeley-softfloat-b64af41c3276f97f0e181920400ee056b9c88037.tar.gz 148741 BLAKE2B 72014022926b636147e202d74c42df2ce9cfed00b91c275d5b2e0afbc5c68765445cbe7ac6389d7c2512bd1d45b0e16e999936552d09bbc733ab66c92968bd31 SHA512 8420c29faa7ff57e06d6758b03e81ca0630c59946bc031e8611f1449e23634cf901b502161f2c1423c0cff949b5481445e36a3aa53dc885b61ca2c673b3ba567
 DIST brotli-666c3280cc11dc433c303d79a83d4ffbdd12cc8d.tar.gz 23855739 BLAKE2B 7406ec5b29ac66afbcd7c1376bb3208f298d19b6592b2869c52173aa64947d58bd443f9a61c67deaf046be910a0e31c0b843e5508e97e0e1f5e7bce100d86904 SHA512 df8e90562c4fd7f0e787949df6bc4f5a165b39bd333f442d27874fe65640fbba268f9350d7113e6761a5acceb66d78e75f1a296e5a89b94574edf28109cdc812
+DIST brotli-f4153a09f87cbb9c826d8fc12c74642bb2d879ea.tar.gz 512229 BLAKE2B cd86cc2cc7eefad24f87cda8006409bf764922b5f23ccfb951e7a41214b12004ce532b11f94f5fb858b3bf71f9abf8ef17ba219fa96bd5be23b51873afad0fd5 SHA512 7f48e794e738b31c2005e7cef6d8c0cc0d543f1cd8c137ae8ba14602cac2873de6299a3f32ad52be869f513e7548341353ed049609daef1063975694d9a9b80b
 DIST edk2-7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5.tar.gz 13998677 BLAKE2B 3614ceb69e295a6afb37c7905d0aec3534d8daf3d9f22137c1b722da6dc764a3669d99af03f96155d45feb5058a6f725acf37d1048186fecff4232d64f96e97c SHA512 a1933d815b947fd4f13c96970a6dc36c3048e3ddf27c897684104b0129cf58331e46d3147062ae1fb8973f08cd373c319788dd850ac5e45da385eed8368571a4
+DIST edk2-b16284e2a0011489f6e16dfcc6af7623c3cbaf0b.tar.gz 15245558 BLAKE2B 33876c08040fa876b4e3741fe859d113654013c948fa8a8b391955226e6215bbbe26fc484e56ba5b399d2c4e4d198900f2de42eccfbac6901e01cd73a80e803b SHA512 7d71ec3d98c652b86194607dbcab767160c708991f49f69eda1f5d844ced0c4842e849d19bf99ea09b1db523b91ced1e5552a4ddcea32b94b9db6b8f6f5c5931
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f

diff --git a/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild
index 00ad2555a8f4..2d77d2480d06 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild
@@ -17,10 +17,10 @@ else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
 
 	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
 	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
 	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
 
 	XEN_GENTOO_PATCHSET_NUM=2
@@ -268,15 +268,6 @@ src_prepare() {
 		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
 		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
 		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
 	fi
 
 	# ipxe
@@ -385,11 +376,11 @@ src_prepare() {
 
 	# Remove -Werror
 	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i \
-		 -e 's/-Werror //g' \
-		 -e '/^CFLAGS *+= -Werror$/d' \
-		 -e 's/, "-Werror"//' \
-		 {} + || die
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
 
 	default
 }

diff --git a/app-emulation/xen-tools/xen-tools-4.17.1_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.1_pre1.ebuild
index 0ad9e03de6f4..2c7afcb524d9 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.1_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.1_pre1.ebuild
@@ -17,10 +17,10 @@ else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
 
 	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
 	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
 	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
 
 	XEN_GENTOO_PATCHSET_NUM=0
@@ -268,15 +268,6 @@ src_prepare() {
 		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
 		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
 		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
 	fi
 
 	# ipxe


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-05-01 17:14 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2023-05-01 17:14 UTC (permalink / raw
  To: gentoo-commits

commit:     4e3e6cb50fda2fd343fe8db77c6ca9c6e5ced010
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon May  1 17:14:09 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon May  1 17:14:09 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e3e6cb5

app-emulation/xen-tools: Stabilize 4.16.4_pre1 x86, #904633

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild
index 2d77d2480d06..f4ae19280df3 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-05-16  7:33 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2023-05-16  7:33 UTC (permalink / raw
  To: gentoo-commits

commit:     aeac4a459b837fed1e4aadb4e0d71b0d311dff53
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue May  2 22:24:27 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue May 16 07:33:50 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aeac4a45

app-emulation/xen-tools: add 4.16.4/4.17.1

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   2 +
 app-emulation/xen-tools/xen-tools-4.16.4.ebuild | 523 +++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.17.1.ebuild | 524 ++++++++++++++++++++++++
 3 files changed, 1049 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index b39785c51919..80f63c3ac66f 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -10,7 +10,9 @@ DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
 DIST xen-4.15.4.tar.gz 40820669 BLAKE2B 22edaf817851856c777d02b5211be932c1731bf50fb582545f948c7e8f871937f7c94636496a480642fa7ed8222e12dda091a06638c75b9ee935f3ff9bc2aea0 SHA512 fa6a4991c0699025af163ed117f8d0523c0a482102464615025eb3575d755ffacec5df394e3fe01871cde6028678f654d99f8e3c2533b138765971a2a7994cb8
 DIST xen-4.16.3.tar.gz 45003057 BLAKE2B 6092cff33bffed1b6133daf8d3ce53c57204297e66df6ac58266b2da8d5585df62ae718cc8afaad36ebe6dabdce65b9979b0d13b88e60f2b23c01be21ae4db8e SHA512 b8cbd6f95681de5f824ada2d3cbe0653a38514a18df0dafcf811fb255219c7abec96f46217bdb0c83e1119f685da9a6af7194eeaa94f1cc3c892702782133b4f
+DIST xen-4.16.4.tar.gz 45008515 BLAKE2B 6637cbebe76e48ca6d2ea885b9c52244efe2fa8188c1649f6a5444fd980a8bfcff5508c8496b89b8a31ba1c4e06f47047b7289513cf22fb86d2b76a77b3cfd21 SHA512 1b5a167a9f5537b5311ef1cb56e0e6ffda0e4e569ef0534e47b4f4a528067bda46fb58b2a01abc02e8c38b2b70207fb201a5d4d10274fba70135eaa8e318e055
 DIST xen-4.17.0.tar.gz 46484553 BLAKE2B a4665fb557eb264566179bc5b2678d44f694ef5b20bb7dc58c8a7e6fcdf0145f25a462cfe2ad35be67a4a5ca4579c03eb092954915953e2ab98ae90b4ea983f0 SHA512 8aa7c3025c81127a4f653411bc1cbe8fc27b767a2f96a2a454329a6773cb74d714ecc1ff011a8e7169c6b83b2cc5cb39c39798bd6b1178df75ce9ff00f5a1011
+DIST xen-4.17.1.tar.gz 46487600 BLAKE2B 56fefc4e6f859129f3faae28f7060b5228f25b1b9d4496e127c51f44e0c97508adaba77da2b8532e578bb8e4ea421a0d56aa1c4d1b9985e85294b210179410a4 SHA512 bd98c5a2d75a0368ef312274b8e47f27db7f6b79302fd0c8b4975185e63640f98d9302e2834344acc1e97133e19f3993359dfab85aea5928008debada78c5f7a
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-0.tar.bz2 4474 BLAKE2B aa367a4ccf96a61c04c52e415d7143ca946323d7d50d6ab16ad7a917279ad4b1aac802e35e7e306c3a244317db713e913dc8d6343717b2307ccd049adb956a0d SHA512 debba71b17be7b1bb9a70f01782c12c3c053cc2fb1f4ad95829356ee365878aad68430055d4b8c648ef1ff54cb9e3e7c03d40d14c560d51f8ac4fce2b8f82190

diff --git a/app-emulation/xen-tools/xen-tools-4.16.4.ebuild b/app-emulation/xen-tools/xen-tools-4.16.4.ebuild
new file mode 100644
index 000000000000..578e95053175
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.16.4.ebuild
@@ -0,0 +1,523 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.16.1
+	XEN_PRE_PATCHSET_NUM=
+	XEN_PRE_VERSION_BASE=
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.17.1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.1.ebuild
new file mode 100644
index 000000000000..c1abdbc8c7f5
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.17.1.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=0
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=
+	XEN_PRE_VERSION_BASE=
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		app-text/pandoc
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-05-16  9:30 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2023-05-16  9:30 UTC (permalink / raw
  To: gentoo-commits

commit:     714ad5748eb654598e3d6b1672a8cab1b1fccd23
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Tue May 16 09:30:34 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue May 16 09:30:34 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=714ad574

app-emulation/xen-tools: drop 4.16.3, 4.17.1_pre1

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 -
 app-emulation/xen-tools/xen-tools-4.16.3.ebuild    | 532 ---------------------
 .../xen-tools/xen-tools-4.17.1_pre1.ebuild         | 524 --------------------
 3 files changed, 1058 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 80f63c3ac66f..929e2c131204 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -11,11 +11,9 @@ DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490
 DIST xen-4.15.4.tar.gz 40820669 BLAKE2B 22edaf817851856c777d02b5211be932c1731bf50fb582545f948c7e8f871937f7c94636496a480642fa7ed8222e12dda091a06638c75b9ee935f3ff9bc2aea0 SHA512 fa6a4991c0699025af163ed117f8d0523c0a482102464615025eb3575d755ffacec5df394e3fe01871cde6028678f654d99f8e3c2533b138765971a2a7994cb8
 DIST xen-4.16.3.tar.gz 45003057 BLAKE2B 6092cff33bffed1b6133daf8d3ce53c57204297e66df6ac58266b2da8d5585df62ae718cc8afaad36ebe6dabdce65b9979b0d13b88e60f2b23c01be21ae4db8e SHA512 b8cbd6f95681de5f824ada2d3cbe0653a38514a18df0dafcf811fb255219c7abec96f46217bdb0c83e1119f685da9a6af7194eeaa94f1cc3c892702782133b4f
 DIST xen-4.16.4.tar.gz 45008515 BLAKE2B 6637cbebe76e48ca6d2ea885b9c52244efe2fa8188c1649f6a5444fd980a8bfcff5508c8496b89b8a31ba1c4e06f47047b7289513cf22fb86d2b76a77b3cfd21 SHA512 1b5a167a9f5537b5311ef1cb56e0e6ffda0e4e569ef0534e47b4f4a528067bda46fb58b2a01abc02e8c38b2b70207fb201a5d4d10274fba70135eaa8e318e055
-DIST xen-4.17.0.tar.gz 46484553 BLAKE2B a4665fb557eb264566179bc5b2678d44f694ef5b20bb7dc58c8a7e6fcdf0145f25a462cfe2ad35be67a4a5ca4579c03eb092954915953e2ab98ae90b4ea983f0 SHA512 8aa7c3025c81127a4f653411bc1cbe8fc27b767a2f96a2a454329a6773cb74d714ecc1ff011a8e7169c6b83b2cc5cb39c39798bd6b1178df75ce9ff00f5a1011
 DIST xen-4.17.1.tar.gz 46487600 BLAKE2B 56fefc4e6f859129f3faae28f7060b5228f25b1b9d4496e127c51f44e0c97508adaba77da2b8532e578bb8e4ea421a0d56aa1c4d1b9985e85294b210179410a4 SHA512 bd98c5a2d75a0368ef312274b8e47f27db7f6b79302fd0c8b4975185e63640f98d9302e2834344acc1e97133e19f3993359dfab85aea5928008debada78c5f7a
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-0.tar.bz2 4474 BLAKE2B aa367a4ccf96a61c04c52e415d7143ca946323d7d50d6ab16ad7a917279ad4b1aac802e35e7e306c3a244317db713e913dc8d6343717b2307ccd049adb956a0d SHA512 debba71b17be7b1bb9a70f01782c12c3c053cc2fb1f4ad95829356ee365878aad68430055d4b8c648ef1ff54cb9e3e7c03d40d14c560d51f8ac4fce2b8f82190
 DIST xen-upstream-patches-4.15.5-pre-patchset-0.tar.bz2 21880 BLAKE2B 89ef7b8cc56ca5a4738ce665aaa3461b61c554088b1b727e34ea417beb43f9b8eae403bae50449c0c96e79ff4b71edf9b6808071b1ca8f0b3878bf1cb9697c6e SHA512 0752d699168e3c2ba13a0ad886dd1d1f9affefc5e7fed9980b2a634012508f405c2accfcd7e92f79016bb869d2d0b09139266a952cc203bea37870fc7d910e51
 DIST xen-upstream-patches-4.16.4-pre-patchset-0.tar.bz2 60151 BLAKE2B 5c8a8f772ba6be5f776b3270b9f1e64df35c2be7b4e238262eb4ec6b4859576b3ecb448880e1e05ad53dbdaa71643e678978151b10d0d47c901ab3e3518b7eb0 SHA512 b33a9b2f602f18165e048ef6a339bc5bf3f800fb1f2449e2e1a6090774ce3ef07b1d7ea8e9e6449fae7b91afcc1a6e281c1bb218a56bca74ba7f12b491fab186
-DIST xen-upstream-patches-4.17.1-pre-patchset-0.tar.bz2 87023 BLAKE2B 4b6c66c20aecde5a696ee6879b1a9e9b365eba3a2e55c7b13153adb4c100081242a5f4498e17597697ac96a75685d88536309accb8dcebee45b31c9b35a3d7d8 SHA512 9da15f7726f2813a6dc701dbf67c1aa52a574c8049238c6d18d68bc0c0c80db98b925cd1cb7ec5627ff8b3489847608a185353cda6e599e6e5bffe75339b18a7

diff --git a/app-emulation/xen-tools/xen-tools-4.16.3.ebuild b/app-emulation/xen-tools/xen-tools-4.16.3.ebuild
deleted file mode 100644
index 5cb850086cd6..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.3.ebuild
+++ /dev/null
@@ -1,532 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.16.1
-	XEN_PRE_PATCHSET_NUM=
-	XEN_PRE_VERSION_BASE=
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${XEN_GENTOO_PATCHES_DIR}/ovmf/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i \
-		 -e 's/-Werror //g' \
-		 -e '/^CFLAGS *+= -Werror$/d' \
-		 -e 's/, "-Werror"//' \
-		 {} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.17.1_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.1_pre1.ebuild
deleted file mode 100644
index 2c7afcb524d9..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.17.1_pre1.ebuild
+++ /dev/null
@@ -1,524 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=0
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=4.17.0
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		app-text/pandoc
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-06-08 22:35 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2023-06-08 22:35 UTC (permalink / raw
  To: gentoo-commits

commit:     876fc5e653862aea1e0b89e1cda3fc8589f7f050
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  8 22:34:07 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun  8 22:34:34 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=876fc5e6

app-emulation/xen-tools: use virtual/pandoc

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild      | 2 +-
 app-emulation/xen-tools/xen-tools-4.15.5_pre1-r1.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.16.4-r1.ebuild      | 2 +-
 app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild    | 2 +-
 app-emulation/xen-tools/xen-tools-4.17.1-r1.ebuild      | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
index c40da5ee539a..212121cd053c 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
@@ -141,12 +141,12 @@ DEPEND="${COMMON_DEPEND}
 		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
 	doc? (
 		app-text/ghostscript-gpl
-		app-text/pandoc
 		$(python_gen_cond_dep '
 			dev-python/markdown[${PYTHON_USEDEP}]
 		')
 		dev-texlive/texlive-latexextra
 		media-gfx/transfig
+		virtual/pandoc
 	)
 	hvm? ( x11-base/xorg-proto )
 	qemu? (

diff --git a/app-emulation/xen-tools/xen-tools-4.15.5_pre1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.5_pre1-r1.ebuild
index b4d296686754..d58ac007f7e4 100644
--- a/app-emulation/xen-tools/xen-tools-4.15.5_pre1-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.15.5_pre1-r1.ebuild
@@ -141,12 +141,12 @@ DEPEND="${COMMON_DEPEND}
 		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
 	doc? (
 		app-text/ghostscript-gpl
-		app-text/pandoc
 		$(python_gen_cond_dep '
 			dev-python/markdown[${PYTHON_USEDEP}]
 		')
 		dev-texlive/texlive-latexextra
 		media-gfx/transfig
+		virtual/pandoc
 	)
 	hvm? ( x11-base/xorg-proto )
 	qemu? (

diff --git a/app-emulation/xen-tools/xen-tools-4.16.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.4-r1.ebuild
index fbeaed9743e8..32cc545f43f0 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.4-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.4-r1.ebuild
@@ -140,12 +140,12 @@ DEPEND="${COMMON_DEPEND}
 		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
 	doc? (
 		app-text/ghostscript-gpl
-		app-text/pandoc
 		$(python_gen_cond_dep '
 			dev-python/markdown[${PYTHON_USEDEP}]
 		')
 		dev-texlive/texlive-latexextra
 		media-gfx/transfig
+		virtual/pandoc
 	)
 	hvm? ( x11-base/xorg-proto )
 	qemu? (

diff --git a/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild
index 008ef2d3e4b0..fe02ab612336 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild
@@ -140,12 +140,12 @@ DEPEND="${COMMON_DEPEND}
 		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
 	doc? (
 		app-text/ghostscript-gpl
-		app-text/pandoc
 		$(python_gen_cond_dep '
 			dev-python/markdown[${PYTHON_USEDEP}]
 		')
 		dev-texlive/texlive-latexextra
 		media-gfx/transfig
+		virtual/pandoc
 	)
 	hvm? ( x11-base/xorg-proto )
 	qemu? (

diff --git a/app-emulation/xen-tools/xen-tools-4.17.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.1-r1.ebuild
index d324baad0b3a..ce1a09f0f545 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.1-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.1-r1.ebuild
@@ -140,12 +140,12 @@ DEPEND="${COMMON_DEPEND}
 		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
 	doc? (
 		app-text/ghostscript-gpl
-		app-text/pandoc
 		$(python_gen_cond_dep '
 			dev-python/markdown[${PYTHON_USEDEP}]
 		')
 		dev-texlive/texlive-latexextra
 		media-gfx/transfig
+		virtual/pandoc
 	)
 	hvm? ( x11-base/xorg-proto )
 	qemu? (


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-09-03  9:40 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2023-09-03  9:40 UTC (permalink / raw
  To: gentoo-commits

commit:     57d9fc80e54f20202236af15a221af4fafb9684c
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Aug 18 11:38:42 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Sep  3 09:18:54 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57d9fc80

app-emulation/xen-tools: add 4.16.5/4.17.2

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   2 +
 app-emulation/xen-tools/xen-tools-4.16.5.ebuild | 523 +++++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.17.2.ebuild | 524 ++++++++++++++++++++++++
 3 files changed, 1049 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 929e2c131204..c16c4157d06c 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -11,7 +11,9 @@ DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490
 DIST xen-4.15.4.tar.gz 40820669 BLAKE2B 22edaf817851856c777d02b5211be932c1731bf50fb582545f948c7e8f871937f7c94636496a480642fa7ed8222e12dda091a06638c75b9ee935f3ff9bc2aea0 SHA512 fa6a4991c0699025af163ed117f8d0523c0a482102464615025eb3575d755ffacec5df394e3fe01871cde6028678f654d99f8e3c2533b138765971a2a7994cb8
 DIST xen-4.16.3.tar.gz 45003057 BLAKE2B 6092cff33bffed1b6133daf8d3ce53c57204297e66df6ac58266b2da8d5585df62ae718cc8afaad36ebe6dabdce65b9979b0d13b88e60f2b23c01be21ae4db8e SHA512 b8cbd6f95681de5f824ada2d3cbe0653a38514a18df0dafcf811fb255219c7abec96f46217bdb0c83e1119f685da9a6af7194eeaa94f1cc3c892702782133b4f
 DIST xen-4.16.4.tar.gz 45008515 BLAKE2B 6637cbebe76e48ca6d2ea885b9c52244efe2fa8188c1649f6a5444fd980a8bfcff5508c8496b89b8a31ba1c4e06f47047b7289513cf22fb86d2b76a77b3cfd21 SHA512 1b5a167a9f5537b5311ef1cb56e0e6ffda0e4e569ef0534e47b4f4a528067bda46fb58b2a01abc02e8c38b2b70207fb201a5d4d10274fba70135eaa8e318e055
+DIST xen-4.16.5.tar.gz 45023770 BLAKE2B 1371bd4cdf7431c16a575d4f911cec7be25a6358bbc47648aa542c6dcb27b733a8de63f9226a9290096a84df4d602186fcfdf6d255c43140d8e9373323fa53e9 SHA512 2f370787b72b2cd9d81c0b5f138133e676d2b9c8c76e31e6439649d7145242a6b7be0d51a7ff4f4197a99e3f6b24ac50e63d2fa49368da440d3f555e70c4ebd3
 DIST xen-4.17.1.tar.gz 46487600 BLAKE2B 56fefc4e6f859129f3faae28f7060b5228f25b1b9d4496e127c51f44e0c97508adaba77da2b8532e578bb8e4ea421a0d56aa1c4d1b9985e85294b210179410a4 SHA512 bd98c5a2d75a0368ef312274b8e47f27db7f6b79302fd0c8b4975185e63640f98d9302e2834344acc1e97133e19f3993359dfab85aea5928008debada78c5f7a
+DIST xen-4.17.2.tar.gz 46498038 BLAKE2B 44bb7b39dddb1dbd266a31f6e67f49e981946b78a83580ec068e02687780695d33868781b563dfb77db8ad3ffdc6fe7431ca8243650d9a08823312c430cfa5cd SHA512 0bc475483676e4aa27735695f9a8d2821059e7a55984adb8a29badb5c09a4e7cf8ea29cbc9691be616cc0d7a5ee6b6dacc59ba29c2b16e0919ebdf7dfc54201a
 DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-0.tar.bz2 4474 BLAKE2B aa367a4ccf96a61c04c52e415d7143ca946323d7d50d6ab16ad7a917279ad4b1aac802e35e7e306c3a244317db713e913dc8d6343717b2307ccd049adb956a0d SHA512 debba71b17be7b1bb9a70f01782c12c3c053cc2fb1f4ad95829356ee365878aad68430055d4b8c648ef1ff54cb9e3e7c03d40d14c560d51f8ac4fce2b8f82190

diff --git a/app-emulation/xen-tools/xen-tools-4.16.5.ebuild b/app-emulation/xen-tools/xen-tools-4.16.5.ebuild
new file mode 100644
index 000000000000..90dec7792faf
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.16.5.ebuild
@@ -0,0 +1,523 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.16.1
+	XEN_PRE_PATCHSET_NUM=
+	XEN_PRE_VERSION_BASE=
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.17.2.ebuild b/app-emulation/xen-tools/xen-tools-4.17.2.ebuild
new file mode 100644
index 000000000000..a16599b7c05f
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.17.2.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=0
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=
+	XEN_PRE_VERSION_BASE=
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-09-03  9:40 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2023-09-03  9:40 UTC (permalink / raw
  To: gentoo-commits

commit:     b7a4b22ededc8cb4b4215b9b0d443c7f98c1ce78
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Aug 18 11:41:24 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Sep  3 09:19:08 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7a4b22e

app-emulation/xen-tools: drop vulnerable

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32372
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   8 -
 app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild | 541 --------------------
 .../xen-tools/xen-tools-4.15.5_pre1-r1.ebuild      | 545 ---------------------
 app-emulation/xen-tools/xen-tools-4.17.1-r1.ebuild | 528 --------------------
 4 files changed, 1622 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index c16c4157d06c..cfec8e312350 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -1,21 +1,13 @@
-DIST OpenSSL_1_1_1j.tar.gz 9994760 BLAKE2B 749886716739dcb909bd79b29cf714640b64039917f64f6cfc4bee9861e797380d0df9ff11d7f6bb084508b322cb0db4ef7a2f871ee304548ec919d387cdb2c5 SHA512 f94ef129514e69b70f800a599ae726eff6a2fac0dfa8e42982973d1328f6fac6b1da1124e1a7b8aa3d579b720ecf9c71a8bae45db6b1630c052b0c3a22b9360e
 DIST OpenSSL_1_1_1t.tar.gz 10061233 BLAKE2B aef89c338644230305bcc75dbc13d6799a04ed8c712b6aed07a782703031e977c3e300924f26e5854d0b89ecf39d2d516a50838167754e8f63322fba51de9478 SHA512 f28a323fd78be0b16ae6db9a8f163e64c74410e12ddd1a9836dfdda34c264112184f4e22583c84b6fa56716e5aaac9cb860cb183bd3d0cb064091eea1e21815e
 DIST berkeley-softfloat-b64af41c3276f97f0e181920400ee056b9c88037.tar.gz 148741 BLAKE2B 72014022926b636147e202d74c42df2ce9cfed00b91c275d5b2e0afbc5c68765445cbe7ac6389d7c2512bd1d45b0e16e999936552d09bbc733ab66c92968bd31 SHA512 8420c29faa7ff57e06d6758b03e81ca0630c59946bc031e8611f1449e23634cf901b502161f2c1423c0cff949b5481445e36a3aa53dc885b61ca2c673b3ba567
-DIST brotli-666c3280cc11dc433c303d79a83d4ffbdd12cc8d.tar.gz 23855739 BLAKE2B 7406ec5b29ac66afbcd7c1376bb3208f298d19b6592b2869c52173aa64947d58bd443f9a61c67deaf046be910a0e31c0b843e5508e97e0e1f5e7bce100d86904 SHA512 df8e90562c4fd7f0e787949df6bc4f5a165b39bd333f442d27874fe65640fbba268f9350d7113e6761a5acceb66d78e75f1a296e5a89b94574edf28109cdc812
 DIST brotli-f4153a09f87cbb9c826d8fc12c74642bb2d879ea.tar.gz 512229 BLAKE2B cd86cc2cc7eefad24f87cda8006409bf764922b5f23ccfb951e7a41214b12004ce532b11f94f5fb858b3bf71f9abf8ef17ba219fa96bd5be23b51873afad0fd5 SHA512 7f48e794e738b31c2005e7cef6d8c0cc0d543f1cd8c137ae8ba14602cac2873de6299a3f32ad52be869f513e7548341353ed049609daef1063975694d9a9b80b
-DIST edk2-7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5.tar.gz 13998677 BLAKE2B 3614ceb69e295a6afb37c7905d0aec3534d8daf3d9f22137c1b722da6dc764a3669d99af03f96155d45feb5058a6f725acf37d1048186fecff4232d64f96e97c SHA512 a1933d815b947fd4f13c96970a6dc36c3048e3ddf27c897684104b0129cf58331e46d3147062ae1fb8973f08cd373c319788dd850ac5e45da385eed8368571a4
 DIST edk2-b16284e2a0011489f6e16dfcc6af7623c3cbaf0b.tar.gz 15245558 BLAKE2B 33876c08040fa876b4e3741fe859d113654013c948fa8a8b391955226e6215bbbe26fc484e56ba5b399d2c4e4d198900f2de42eccfbac6901e01cd73a80e803b SHA512 7d71ec3d98c652b86194607dbcab767160c708991f49f69eda1f5d844ced0c4842e849d19bf99ea09b1db523b91ced1e5552a4ddcea32b94b9db6b8f6f5c5931
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
-DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
-DIST xen-4.15.4.tar.gz 40820669 BLAKE2B 22edaf817851856c777d02b5211be932c1731bf50fb582545f948c7e8f871937f7c94636496a480642fa7ed8222e12dda091a06638c75b9ee935f3ff9bc2aea0 SHA512 fa6a4991c0699025af163ed117f8d0523c0a482102464615025eb3575d755ffacec5df394e3fe01871cde6028678f654d99f8e3c2533b138765971a2a7994cb8
 DIST xen-4.16.3.tar.gz 45003057 BLAKE2B 6092cff33bffed1b6133daf8d3ce53c57204297e66df6ac58266b2da8d5585df62ae718cc8afaad36ebe6dabdce65b9979b0d13b88e60f2b23c01be21ae4db8e SHA512 b8cbd6f95681de5f824ada2d3cbe0653a38514a18df0dafcf811fb255219c7abec96f46217bdb0c83e1119f685da9a6af7194eeaa94f1cc3c892702782133b4f
 DIST xen-4.16.4.tar.gz 45008515 BLAKE2B 6637cbebe76e48ca6d2ea885b9c52244efe2fa8188c1649f6a5444fd980a8bfcff5508c8496b89b8a31ba1c4e06f47047b7289513cf22fb86d2b76a77b3cfd21 SHA512 1b5a167a9f5537b5311ef1cb56e0e6ffda0e4e569ef0534e47b4f4a528067bda46fb58b2a01abc02e8c38b2b70207fb201a5d4d10274fba70135eaa8e318e055
 DIST xen-4.16.5.tar.gz 45023770 BLAKE2B 1371bd4cdf7431c16a575d4f911cec7be25a6358bbc47648aa542c6dcb27b733a8de63f9226a9290096a84df4d602186fcfdf6d255c43140d8e9373323fa53e9 SHA512 2f370787b72b2cd9d81c0b5f138133e676d2b9c8c76e31e6439649d7145242a6b7be0d51a7ff4f4197a99e3f6b24ac50e63d2fa49368da440d3f555e70c4ebd3
-DIST xen-4.17.1.tar.gz 46487600 BLAKE2B 56fefc4e6f859129f3faae28f7060b5228f25b1b9d4496e127c51f44e0c97508adaba77da2b8532e578bb8e4ea421a0d56aa1c4d1b9985e85294b210179410a4 SHA512 bd98c5a2d75a0368ef312274b8e47f27db7f6b79302fd0c8b4975185e63640f98d9302e2834344acc1e97133e19f3993359dfab85aea5928008debada78c5f7a
 DIST xen-4.17.2.tar.gz 46498038 BLAKE2B 44bb7b39dddb1dbd266a31f6e67f49e981946b78a83580ec068e02687780695d33868781b563dfb77db8ad3ffdc6fe7431ca8243650d9a08823312c430cfa5cd SHA512 0bc475483676e4aa27735695f9a8d2821059e7a55984adb8a29badb5c09a4e7cf8ea29cbc9691be616cc0d7a5ee6b6dacc59ba29c2b16e0919ebdf7dfc54201a
-DIST xen-gentoo-patches-4.15.3-gentoo-patchset-2.tar.bz2 4681 BLAKE2B 59fe5c2d5f3b975f281778ee96f8771debde7ae738636fc8294e7e2578dffc40938d8c48e4e94f0341762b2ba8e1b6769f71b7783322fb3b2a0a187bbf2b5104 SHA512 8540aa3631277fb652f90c53f6f5b4e9d119a7ed267dec96d7aecca4eac2c465ec3be32b0b82057e79f858cc8115bfdfbf2af5c4879a0be3f98ed68cbe64fdae
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-0.tar.bz2 4474 BLAKE2B aa367a4ccf96a61c04c52e415d7143ca946323d7d50d6ab16ad7a917279ad4b1aac802e35e7e306c3a244317db713e913dc8d6343717b2307ccd049adb956a0d SHA512 debba71b17be7b1bb9a70f01782c12c3c053cc2fb1f4ad95829356ee365878aad68430055d4b8c648ef1ff54cb9e3e7c03d40d14c560d51f8ac4fce2b8f82190
-DIST xen-upstream-patches-4.15.5-pre-patchset-0.tar.bz2 21880 BLAKE2B 89ef7b8cc56ca5a4738ce665aaa3461b61c554088b1b727e34ea417beb43f9b8eae403bae50449c0c96e79ff4b71edf9b6808071b1ca8f0b3878bf1cb9697c6e SHA512 0752d699168e3c2ba13a0ad886dd1d1f9affefc5e7fed9980b2a634012508f405c2accfcd7e92f79016bb869d2d0b09139266a952cc203bea37870fc7d910e51
 DIST xen-upstream-patches-4.16.4-pre-patchset-0.tar.bz2 60151 BLAKE2B 5c8a8f772ba6be5f776b3270b9f1e64df35c2be7b4e238262eb4ec6b4859576b3ecb448880e1e05ad53dbdaa71643e678978151b10d0d47c901ab3e3518b7eb0 SHA512 b33a9b2f602f18165e048ef6a339bc5bf3f800fb1f2449e2e1a6090774ce3ef07b1d7ea8e9e6449fae7b91afcc1a6e281c1bb218a56bca74ba7f12b491fab186

diff --git a/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
deleted file mode 100644
index 212121cd053c..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.15.4-r1.ebuild
+++ /dev/null
@@ -1,541 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..10} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.14.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_PRE_PATCHSET_NUM=
-	XEN_GENTOO_PATCHSET_BASE=4.15.3
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_PRE_VERSION_BASE=
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-	if [[ -z "${XEN_GENTOO_PATCHSET_BASE}" ]]; then
-		XEN_GENTOO_PATCHSET_BASE="${XEN_BASE_PV}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	app-arch/bzip2
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/Makefile \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i \
-		 -e 's/-Werror //g' \
-		 -e '/^CFLAGS *+= -Werror$/d' \
-		 -e 's/, "-Werror"//' \
-		 {} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.15.5_pre1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.15.5_pre1-r1.ebuild
deleted file mode 100644
index d58ac007f7e4..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.15.5_pre1-r1.ebuild
+++ /dev/null
@@ -1,545 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..10} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="7b4a99be8a39c12d3a7fc4b8db9f0eab4ac688d5"
-	EDK2_OPENSSL_VERSION="1_1_1j"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="666c3280cc11dc433c303d79a83d4ffbdd12cc8d"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.15.3
-	XEN_PRE_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=4.15.4
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-	if [[ -z "${XEN_GENTOO_PATCHSET_BASE}" ]]; then
-		XEN_GENTOO_PATCHSET_BASE="${XEN_BASE_PV}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	app-arch/bzip2
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-PATCHES=(
-	"${FILESDIR}/xen-tools-m4-ptyfuncs.m4-tools-configure-add-linux-headers-for.patch"
-)
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/Makefile \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-
-		# Bug #816987
-		pushd tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-
-		pushd tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli > /dev/null
-			eapply "${FILESDIR}/${PN}-4.15.1-brotli-gcc11.patch"
-		popd > /dev/null
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		 -exec sed -i \
-		 -e 's/-Werror //g' \
-		 -e '/^CFLAGS *+= -Werror$/d' \
-		 -e 's/, "-Werror"//' \
-		 {} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the offical wiki page:"
-	elog "https://wiki.gentoo.org/wiki/Xen"
-	elog "https://wiki.xen.org/wiki/Main_Page"
-	elog ""
-	elog "Recommended to utilise the xencommons script to config system at boot"
-	elog "Add by use of rc-update on completion of the install"
-
-	if ! use hvm; then
-		echo
-		elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
-		elog "support enable the hvm use flag."
-		elog "An x86 or amd64 system is required to build HVM support."
-	fi
-
-	if use qemu; then
-		elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
-		elog "build of qemu.  This allows for app-emulation/qemu to be emerged concurrently"
-		elog "with the qemu capable xen.  It is up to the user to distinguish between and utilise"
-		elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
-	fi
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.17.1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.1-r1.ebuild
deleted file mode 100644
index ce1a09f0f545..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.17.1-r1.ebuild
+++ /dev/null
@@ -1,528 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=0
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=
-	XEN_PRE_VERSION_BASE=
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-PATCHES=(
-	"${FILESDIR}/xen-tools-m4-ptyfuncs.m4-tools-configure-add-linux-headers-for.patch"
-)
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-09-05 10:01 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2023-09-05 10:01 UTC (permalink / raw
  To: gentoo-commits

commit:     fed08bd1a1904553b441bf9d51a605e892164c45
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  5 10:01:14 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep  5 10:01:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fed08bd1

app-emulation/xen-tools: Stabilize 4.16.5 x86, #913672

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.5.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.5.ebuild b/app-emulation/xen-tools/xen-tools-4.16.5.ebuild
index 90dec7792faf..8e3d0f4efce6 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.5.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-09-05 10:01 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2023-09-05 10:01 UTC (permalink / raw
  To: gentoo-commits

commit:     1c1d211b583a5e6da159684cc56270830760aa4c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  5 10:01:16 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep  5 10:01:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c1d211b

app-emulation/xen-tools: Stabilize 4.16.5 amd64, #913672

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.5.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.5.ebuild b/app-emulation/xen-tools/xen-tools-4.16.5.ebuild
index 8e3d0f4efce6..a66f03394cc6 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.5.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.5.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-09-09 18:01 Arthur Zamarin
  0 siblings, 0 replies; 295+ messages in thread
From: Arthur Zamarin @ 2023-09-09 18:01 UTC (permalink / raw
  To: gentoo-commits

commit:     9e52a8d180a81cb6e249a3dd3452e288b73e1e70
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Sep  6 14:38:39 2023 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sat Sep  9 17:56:18 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e52a8d1

app-emulation/xen-tools: drop vulnerable

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32655
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   3 -
 app-emulation/xen-tools/xen-tools-4.16.4-r1.ebuild | 527 ---------------------
 .../xen-tools/xen-tools-4.16.4_pre1.ebuild         | 523 --------------------
 3 files changed, 1053 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index cfec8e312350..baf1017a2a25 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -4,10 +4,7 @@ DIST brotli-f4153a09f87cbb9c826d8fc12c74642bb2d879ea.tar.gz 512229 BLAKE2B cd86c
 DIST edk2-b16284e2a0011489f6e16dfcc6af7623c3cbaf0b.tar.gz 15245558 BLAKE2B 33876c08040fa876b4e3741fe859d113654013c948fa8a8b391955226e6215bbbe26fc484e56ba5b399d2c4e4d198900f2de42eccfbac6901e01cd73a80e803b SHA512 7d71ec3d98c652b86194607dbcab767160c708991f49f69eda1f5d844ced0c4842e849d19bf99ea09b1db523b91ced1e5552a4ddcea32b94b9db6b8f6f5c5931
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
-DIST xen-4.16.3.tar.gz 45003057 BLAKE2B 6092cff33bffed1b6133daf8d3ce53c57204297e66df6ac58266b2da8d5585df62ae718cc8afaad36ebe6dabdce65b9979b0d13b88e60f2b23c01be21ae4db8e SHA512 b8cbd6f95681de5f824ada2d3cbe0653a38514a18df0dafcf811fb255219c7abec96f46217bdb0c83e1119f685da9a6af7194eeaa94f1cc3c892702782133b4f
-DIST xen-4.16.4.tar.gz 45008515 BLAKE2B 6637cbebe76e48ca6d2ea885b9c52244efe2fa8188c1649f6a5444fd980a8bfcff5508c8496b89b8a31ba1c4e06f47047b7289513cf22fb86d2b76a77b3cfd21 SHA512 1b5a167a9f5537b5311ef1cb56e0e6ffda0e4e569ef0534e47b4f4a528067bda46fb58b2a01abc02e8c38b2b70207fb201a5d4d10274fba70135eaa8e318e055
 DIST xen-4.16.5.tar.gz 45023770 BLAKE2B 1371bd4cdf7431c16a575d4f911cec7be25a6358bbc47648aa542c6dcb27b733a8de63f9226a9290096a84df4d602186fcfdf6d255c43140d8e9373323fa53e9 SHA512 2f370787b72b2cd9d81c0b5f138133e676d2b9c8c76e31e6439649d7145242a6b7be0d51a7ff4f4197a99e3f6b24ac50e63d2fa49368da440d3f555e70c4ebd3
 DIST xen-4.17.2.tar.gz 46498038 BLAKE2B 44bb7b39dddb1dbd266a31f6e67f49e981946b78a83580ec068e02687780695d33868781b563dfb77db8ad3ffdc6fe7431ca8243650d9a08823312c430cfa5cd SHA512 0bc475483676e4aa27735695f9a8d2821059e7a55984adb8a29badb5c09a4e7cf8ea29cbc9691be616cc0d7a5ee6b6dacc59ba29c2b16e0919ebdf7dfc54201a
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-0.tar.bz2 4474 BLAKE2B aa367a4ccf96a61c04c52e415d7143ca946323d7d50d6ab16ad7a917279ad4b1aac802e35e7e306c3a244317db713e913dc8d6343717b2307ccd049adb956a0d SHA512 debba71b17be7b1bb9a70f01782c12c3c053cc2fb1f4ad95829356ee365878aad68430055d4b8c648ef1ff54cb9e3e7c03d40d14c560d51f8ac4fce2b8f82190
-DIST xen-upstream-patches-4.16.4-pre-patchset-0.tar.bz2 60151 BLAKE2B 5c8a8f772ba6be5f776b3270b9f1e64df35c2be7b4e238262eb4ec6b4859576b3ecb448880e1e05ad53dbdaa71643e678978151b10d0d47c901ab3e3518b7eb0 SHA512 b33a9b2f602f18165e048ef6a339bc5bf3f800fb1f2449e2e1a6090774ce3ef07b1d7ea8e9e6449fae7b91afcc1a6e281c1bb218a56bca74ba7f12b491fab186

diff --git a/app-emulation/xen-tools/xen-tools-4.16.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.4-r1.ebuild
deleted file mode 100644
index 32cc545f43f0..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.4-r1.ebuild
+++ /dev/null
@@ -1,527 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.16.1
-	XEN_PRE_PATCHSET_NUM=
-	XEN_PRE_VERSION_BASE=
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-PATCHES=(
-	"${FILESDIR}/xen-tools-m4-ptyfuncs.m4-tools-configure-add-linux-headers-for.patch"
-)
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild
deleted file mode 100644
index fe02ab612336..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.4_pre1.ebuild
+++ /dev/null
@@ -1,523 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.16.1
-	XEN_PRE_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=4.16.3
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-10-19  8:22 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2023-10-19  8:22 UTC (permalink / raw
  To: gentoo-commits

commit:     6591c4724536acaae488d00c8241eab711aad0c3
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Oct 18 19:20:03 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Oct 19 08:22:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6591c472

app-emulation/xen-tools: add upstream patches

Bug: https://bugs.gentoo.org/915970
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 +
 .../xen-tools/xen-tools-4.16.6_pre1.ebuild         | 523 ++++++++++++++++++++
 .../xen-tools/xen-tools-4.17.3_pre1.ebuild         | 524 +++++++++++++++++++++
 3 files changed, 1049 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index baf1017a2a25..dbd71761c2be 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -8,3 +8,5 @@ DIST xen-4.16.5.tar.gz 45023770 BLAKE2B 1371bd4cdf7431c16a575d4f911cec7be25a6358
 DIST xen-4.17.2.tar.gz 46498038 BLAKE2B 44bb7b39dddb1dbd266a31f6e67f49e981946b78a83580ec068e02687780695d33868781b563dfb77db8ad3ffdc6fe7431ca8243650d9a08823312c430cfa5cd SHA512 0bc475483676e4aa27735695f9a8d2821059e7a55984adb8a29badb5c09a4e7cf8ea29cbc9691be616cc0d7a5ee6b6dacc59ba29c2b16e0919ebdf7dfc54201a
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-0.tar.bz2 4474 BLAKE2B aa367a4ccf96a61c04c52e415d7143ca946323d7d50d6ab16ad7a917279ad4b1aac802e35e7e306c3a244317db713e913dc8d6343717b2307ccd049adb956a0d SHA512 debba71b17be7b1bb9a70f01782c12c3c053cc2fb1f4ad95829356ee365878aad68430055d4b8c648ef1ff54cb9e3e7c03d40d14c560d51f8ac4fce2b8f82190
+DIST xen-upstream-patches-4.16.6-pre-patchset-0.tar.bz2 41361 BLAKE2B cf3498d1679fd36265f7d0f95f193a90c50d10d6f8a1df8895131c6b006aa1ba1236588b2cbead0fc7cd95ca74ea9bd24986f169889c1032e6bc4a87a8438404 SHA512 8e3cc0ff8f739ff687e5dcceacd58254d37bff6705993698a1fbfac0ccb2e67b7733c73029ff985b1f91dbdf29e247e96a50c1f2166d0b24df863db6915768ae
+DIST xen-upstream-patches-4.17.3-pre-patchset-0.tar.bz2 65870 BLAKE2B 9019ed4131157df83053873ce1978dfdaa21304bfd69a059e8869e4cd31e01128dbccf2b6a8f54b4c724dfa8d455cad0e55de555971e80a6cd56f143f2d618d3 SHA512 094172bb1c822fa6159792d517bdfdf9777f297be5acee99746a6b310db2c509f98001a280d798d931d4fa17983e8165297ad96489327368c035f8284efd382d

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild
new file mode 100644
index 000000000000..e9ab035b66a6
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild
@@ -0,0 +1,523 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.16.1
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.16.5
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild
new file mode 100644
index 000000000000..0be6ca58a14e
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=0
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.17.2
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		media-gfx/transfig
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-10-19  8:22 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2023-10-19  8:22 UTC (permalink / raw
  To: gentoo-commits

commit:     bc692164d128dc432f123a5476ba596936d867d6
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 19 08:21:54 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Oct 19 08:22:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc692164

app-emulation/xen-tools: bump gentoo patchset

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                     | 1 +
 app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index dbd71761c2be..d5c8e1579925 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -8,5 +8,6 @@ DIST xen-4.16.5.tar.gz 45023770 BLAKE2B 1371bd4cdf7431c16a575d4f911cec7be25a6358
 DIST xen-4.17.2.tar.gz 46498038 BLAKE2B 44bb7b39dddb1dbd266a31f6e67f49e981946b78a83580ec068e02687780695d33868781b563dfb77db8ad3ffdc6fe7431ca8243650d9a08823312c430cfa5cd SHA512 0bc475483676e4aa27735695f9a8d2821059e7a55984adb8a29badb5c09a4e7cf8ea29cbc9691be616cc0d7a5ee6b6dacc59ba29c2b16e0919ebdf7dfc54201a
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-0.tar.bz2 4474 BLAKE2B aa367a4ccf96a61c04c52e415d7143ca946323d7d50d6ab16ad7a917279ad4b1aac802e35e7e306c3a244317db713e913dc8d6343717b2307ccd049adb956a0d SHA512 debba71b17be7b1bb9a70f01782c12c3c053cc2fb1f4ad95829356ee365878aad68430055d4b8c648ef1ff54cb9e3e7c03d40d14c560d51f8ac4fce2b8f82190
+DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
 DIST xen-upstream-patches-4.16.6-pre-patchset-0.tar.bz2 41361 BLAKE2B cf3498d1679fd36265f7d0f95f193a90c50d10d6f8a1df8895131c6b006aa1ba1236588b2cbead0fc7cd95ca74ea9bd24986f169889c1032e6bc4a87a8438404 SHA512 8e3cc0ff8f739ff687e5dcceacd58254d37bff6705993698a1fbfac0ccb2e67b7733c73029ff985b1f91dbdf29e247e96a50c1f2166d0b24df863db6915768ae
 DIST xen-upstream-patches-4.17.3-pre-patchset-0.tar.bz2 65870 BLAKE2B 9019ed4131157df83053873ce1978dfdaa21304bfd69a059e8869e4cd31e01128dbccf2b6a8f54b4c724dfa8d455cad0e55de555971e80a6cd56f143f2d618d3 SHA512 094172bb1c822fa6159792d517bdfdf9777f297be5acee99746a6b310db2c509f98001a280d798d931d4fa17983e8165297ad96489327368c035f8284efd382d

diff --git a/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild
index 0be6ca58a14e..1595416057a4 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild
@@ -23,7 +23,7 @@ else
 	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
 	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
 
-	XEN_GENTOO_PATCHSET_NUM=0
+	XEN_GENTOO_PATCHSET_NUM=2
 	XEN_GENTOO_PATCHSET_BASE=4.17.0
 	XEN_PRE_PATCHSET_NUM=0
 	XEN_PRE_VERSION_BASE=4.17.2


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-10-20 16:54 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2023-10-20 16:54 UTC (permalink / raw
  To: gentoo-commits

commit:     0ca74f9f3f99823793540e79729b571c95ed9520
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 20 16:54:40 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 20 16:54:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ca74f9f

app-emulation/xen-tools: Stabilize 4.16.6_pre1 amd64, #916048

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild
index 23e27dafd6a9..75a33794a4b1 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-10-20 16:54 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2023-10-20 16:54 UTC (permalink / raw
  To: gentoo-commits

commit:     029b79fac3a0874bc9dcd06416fd29ef9e8941c7
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 20 16:54:38 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Oct 20 16:54:38 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=029b79fa

app-emulation/xen-tools: Stabilize 4.16.6_pre1 x86, #916048

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild
index e9ab035b66a6..23e27dafd6a9 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-10-25 18:47 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2023-10-25 18:47 UTC (permalink / raw
  To: gentoo-commits

commit:     01036aad726225a67fd683c809aa36bae64e874a
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Oct 25 15:40:41 2023 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Oct 25 18:46:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01036aad

app-emulation/xen-tools: drop vulnerable

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33508
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   1 -
 app-emulation/xen-tools/xen-tools-4.16.5.ebuild | 523 -----------------------
 app-emulation/xen-tools/xen-tools-4.17.2.ebuild | 524 ------------------------
 3 files changed, 1048 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index d5c8e1579925..d4be20e0a778 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -7,7 +7,6 @@ DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490
 DIST xen-4.16.5.tar.gz 45023770 BLAKE2B 1371bd4cdf7431c16a575d4f911cec7be25a6358bbc47648aa542c6dcb27b733a8de63f9226a9290096a84df4d602186fcfdf6d255c43140d8e9373323fa53e9 SHA512 2f370787b72b2cd9d81c0b5f138133e676d2b9c8c76e31e6439649d7145242a6b7be0d51a7ff4f4197a99e3f6b24ac50e63d2fa49368da440d3f555e70c4ebd3
 DIST xen-4.17.2.tar.gz 46498038 BLAKE2B 44bb7b39dddb1dbd266a31f6e67f49e981946b78a83580ec068e02687780695d33868781b563dfb77db8ad3ffdc6fe7431ca8243650d9a08823312c430cfa5cd SHA512 0bc475483676e4aa27735695f9a8d2821059e7a55984adb8a29badb5c09a4e7cf8ea29cbc9691be616cc0d7a5ee6b6dacc59ba29c2b16e0919ebdf7dfc54201a
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
-DIST xen-gentoo-patches-4.17.0-gentoo-patchset-0.tar.bz2 4474 BLAKE2B aa367a4ccf96a61c04c52e415d7143ca946323d7d50d6ab16ad7a917279ad4b1aac802e35e7e306c3a244317db713e913dc8d6343717b2307ccd049adb956a0d SHA512 debba71b17be7b1bb9a70f01782c12c3c053cc2fb1f4ad95829356ee365878aad68430055d4b8c648ef1ff54cb9e3e7c03d40d14c560d51f8ac4fce2b8f82190
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
 DIST xen-upstream-patches-4.16.6-pre-patchset-0.tar.bz2 41361 BLAKE2B cf3498d1679fd36265f7d0f95f193a90c50d10d6f8a1df8895131c6b006aa1ba1236588b2cbead0fc7cd95ca74ea9bd24986f169889c1032e6bc4a87a8438404 SHA512 8e3cc0ff8f739ff687e5dcceacd58254d37bff6705993698a1fbfac0ccb2e67b7733c73029ff985b1f91dbdf29e247e96a50c1f2166d0b24df863db6915768ae
 DIST xen-upstream-patches-4.17.3-pre-patchset-0.tar.bz2 65870 BLAKE2B 9019ed4131157df83053873ce1978dfdaa21304bfd69a059e8869e4cd31e01128dbccf2b6a8f54b4c724dfa8d455cad0e55de555971e80a6cd56f143f2d618d3 SHA512 094172bb1c822fa6159792d517bdfdf9777f297be5acee99746a6b310db2c509f98001a280d798d931d4fa17983e8165297ad96489327368c035f8284efd382d

diff --git a/app-emulation/xen-tools/xen-tools-4.16.5.ebuild b/app-emulation/xen-tools/xen-tools-4.16.5.ebuild
deleted file mode 100644
index a66f03394cc6..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.5.ebuild
+++ /dev/null
@@ -1,523 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.16.1
-	XEN_PRE_PATCHSET_NUM=
-	XEN_PRE_VERSION_BASE=
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.17.2.ebuild b/app-emulation/xen-tools/xen-tools-4.17.2.ebuild
deleted file mode 100644
index a16599b7c05f..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.17.2.ebuild
+++ /dev/null
@@ -1,524 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{9..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=0
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=
-	XEN_PRE_VERSION_BASE=
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-util/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	sys-devel/bison
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-11-13  7:34 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2023-11-13  7:34 UTC (permalink / raw
  To: gentoo-commits

commit:     5cdd0cfcb70b6977ae355a6f9e3fe7e2c4d42043
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 13 07:34:05 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Nov 13 07:34:05 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5cdd0cfc

app-emulation/xen-tools: migrate to fig2dev

Closes: https://bugs.gentoo.org/917246
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../xen-tools/xen-tools-4.16.6_pre1-r1.ebuild      | 523 ++++++++++++++++++++
 .../xen-tools/xen-tools-4.17.3_pre1-r1.ebuild      | 524 +++++++++++++++++++++
 2 files changed, 1047 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild
new file mode 100644
index 000000000000..d9c987cdcdc4
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild
@@ -0,0 +1,523 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.16.1
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.16.5
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.17.3_pre1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.3_pre1-r1.ebuild
new file mode 100644
index 000000000000..c299cc6ad3ae
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.17.3_pre1-r1.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.17.2
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	sys-devel/bison
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-12-16  8:06 Joonas Niilola
  0 siblings, 0 replies; 295+ messages in thread
From: Joonas Niilola @ 2023-12-16  8:06 UTC (permalink / raw
  To: gentoo-commits

commit:     c234929819cb1251e866c98a39d132fe8d3fb31c
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 16 08:06:14 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Dec 16 08:06:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2349298

app-emulation/xen-tools: Stabilize 4.16.6_pre1-r1 x86, #917280

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild
index d9c987cdcdc4..7eff83ad0644 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2023-12-16  9:28 Joonas Niilola
  0 siblings, 0 replies; 295+ messages in thread
From: Joonas Niilola @ 2023-12-16  9:28 UTC (permalink / raw
  To: gentoo-commits

commit:     8f5e0c50ebed06b49c2fd47f93ed868cc24f0008
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 16 09:28:05 2023 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Dec 16 09:28:31 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f5e0c50

app-emulation/xen-tools: Stabilize 4.16.6_pre1-r1 amd64, #917280

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild
index 7eff83ad0644..0a6543fab49c 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-01-09  8:53 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-01-09  8:53 UTC (permalink / raw
  To: gentoo-commits

commit:     46fd9fd93dbd750fae0620343659d964e86590e3
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Mon Jan  8 16:32:02 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Tue Jan  9 08:52:42 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46fd9fd9

app-emulation/xen-tools: add upstream patches

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 +
 .../xen-tools/xen-tools-4.16.6_pre2.ebuild         | 523 ++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.17.3.ebuild    | 524 +++++++++++++++++++++
 3 files changed, 1049 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index d4be20e0a778..18814250ea74 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,7 +6,9 @@ DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
 DIST xen-4.16.5.tar.gz 45023770 BLAKE2B 1371bd4cdf7431c16a575d4f911cec7be25a6358bbc47648aa542c6dcb27b733a8de63f9226a9290096a84df4d602186fcfdf6d255c43140d8e9373323fa53e9 SHA512 2f370787b72b2cd9d81c0b5f138133e676d2b9c8c76e31e6439649d7145242a6b7be0d51a7ff4f4197a99e3f6b24ac50e63d2fa49368da440d3f555e70c4ebd3
 DIST xen-4.17.2.tar.gz 46498038 BLAKE2B 44bb7b39dddb1dbd266a31f6e67f49e981946b78a83580ec068e02687780695d33868781b563dfb77db8ad3ffdc6fe7431ca8243650d9a08823312c430cfa5cd SHA512 0bc475483676e4aa27735695f9a8d2821059e7a55984adb8a29badb5c09a4e7cf8ea29cbc9691be616cc0d7a5ee6b6dacc59ba29c2b16e0919ebdf7dfc54201a
+DIST xen-4.17.3.tar.gz 46505735 BLAKE2B f7a783d951d3e31391aca2b779b9d11440dc28b0756739f7733cd7d2f160de54a018c00dce5d2a6c55a6494c2151a31a64bbeddefbed34eff179463f2e762d93 SHA512 56ead90af00b4c1aa452b5edba980a2873e4c76e8c518220a88089a2771cd76fe2478e15a41abf5d247e4bc5af8415d53614dff7eb028ced80701c1a1263f91f
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
 DIST xen-upstream-patches-4.16.6-pre-patchset-0.tar.bz2 41361 BLAKE2B cf3498d1679fd36265f7d0f95f193a90c50d10d6f8a1df8895131c6b006aa1ba1236588b2cbead0fc7cd95ca74ea9bd24986f169889c1032e6bc4a87a8438404 SHA512 8e3cc0ff8f739ff687e5dcceacd58254d37bff6705993698a1fbfac0ccb2e67b7733c73029ff985b1f91dbdf29e247e96a50c1f2166d0b24df863db6915768ae
+DIST xen-upstream-patches-4.16.6-pre-patchset-1.tar.bz2 44167 BLAKE2B 6a11faf689b2875fe6845646cbc71541ff0ce02fed00f2fd0ccabdee4b71be96a5bfaa66a0a6de068a9b6534d5c0df2751f78ccd0755f1bcaef333d8337135dc SHA512 40721e0f4e11408c3687e8e77d850f6f0a02d0af0abe422d11478fe080c158ffee5408ed273d82c8c39a33dd0a97ab962f133a927e3a205fa84e9fe3911a57f1
 DIST xen-upstream-patches-4.17.3-pre-patchset-0.tar.bz2 65870 BLAKE2B 9019ed4131157df83053873ce1978dfdaa21304bfd69a059e8869e4cd31e01128dbccf2b6a8f54b4c724dfa8d455cad0e55de555971e80a6cd56f143f2d618d3 SHA512 094172bb1c822fa6159792d517bdfdf9777f297be5acee99746a6b310db2c509f98001a280d798d931d4fa17983e8165297ad96489327368c035f8284efd382d

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild
new file mode 100644
index 000000000000..4590afcc9f81
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild
@@ -0,0 +1,523 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.16.1
+	XEN_PRE_PATCHSET_NUM=1
+	XEN_PRE_VERSION_BASE=4.16.5
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.17.3.ebuild b/app-emulation/xen-tools/xen-tools-4.17.3.ebuild
new file mode 100644
index 000000000000..28a9d84ccd64
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.17.3.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=
+	XEN_PRE_VERSION_BASE=
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-util/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-01-13 18:34 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2024-01-13 18:34 UTC (permalink / raw
  To: gentoo-commits

commit:     080c6ee32a7e721e47b2b44549eca03cf781b142
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 13 18:33:52 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 13 18:33:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=080c6ee3

app-emulation/xen-tools: Stabilize 4.16.6_pre2 x86, #922051

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild
index 4590afcc9f81..a3931c7d1006 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-01-13 20:45 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2024-01-13 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     e1ac0e75c93529aab8ba13afa42417976762ac57
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 13 20:44:43 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 13 20:44:43 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1ac0e75

app-emulation/xen-tools: Stabilize 4.16.6_pre2 amd64, #922051

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild
index a9e949602709..822fde9ed658 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-01-13 20:46 Conrad Kostecki
  0 siblings, 0 replies; 295+ messages in thread
From: Conrad Kostecki @ 2024-01-13 20:46 UTC (permalink / raw
  To: gentoo-commits

commit:     5eff8d80515a004dd4bdd49784a42cfedd38d06d
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Sat Jan 13 15:19:22 2024 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sat Jan 13 20:45:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5eff8d80

app-emulation/xen-tools: use https for git clone

git:// is unencrypted and could be used by an attacker (mitm) to insert malicious code, see also [1].
git:// runs on port 9418 which is also less likely open behind a firewall.

[1] git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/34784
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild    | 2 +-
 app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild    | 2 +-
 app-emulation/xen-tools/xen-tools-4.17.3.ebuild         | 2 +-
 app-emulation/xen-tools/xen-tools-4.17.3_pre1-r1.ebuild | 2 +-
 app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild    | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild
index 91c6b780c701..cedb095dc513 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild
@@ -11,7 +11,7 @@ inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-
 if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
 	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="amd64 ~arm ~arm64 x86"

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild
index 57a548e015b7..a09f8d115021 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild
@@ -11,7 +11,7 @@ inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-
 if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
 	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="amd64 ~arm ~arm64 x86"

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild
index 822fde9ed658..d865eb635bd5 100644
--- a/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild
@@ -11,7 +11,7 @@ inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-
 if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
 	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="amd64 ~arm ~arm64 x86"

diff --git a/app-emulation/xen-tools/xen-tools-4.17.3.ebuild b/app-emulation/xen-tools/xen-tools-4.17.3.ebuild
index e91552b8c15f..bf5e61f700a4 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.3.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.3.ebuild
@@ -11,7 +11,7 @@ inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-
 if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
 	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"

diff --git a/app-emulation/xen-tools/xen-tools-4.17.3_pre1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.3_pre1-r1.ebuild
index 4da473ff8968..57925301b457 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.3_pre1-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.3_pre1-r1.ebuild
@@ -11,7 +11,7 @@ inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-
 if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
 	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"

diff --git a/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild
index 8bd7aee22216..44e234064fb0 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild
@@ -11,7 +11,7 @@ inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-
 if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
 	REPO="xen.git"
-	EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
 	KEYWORDS="~amd64 ~arm ~arm64 ~x86"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-03-28 11:21 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-03-28 11:21 UTC (permalink / raw
  To: gentoo-commits

commit:     3be9c0ed6b834250ba3f2346e4ca0199ced56f1a
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Sat Feb  3 18:40:56 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Mar 28 11:21:12 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3be9c0ed

app-emulation/xen-tools: drop versions

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/35170
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   3 -
 .../xen-tools/xen-tools-4.16.6_pre1-r1.ebuild      | 523 --------------------
 .../xen-tools/xen-tools-4.16.6_pre1.ebuild         | 523 --------------------
 .../xen-tools/xen-tools-4.17.3_pre1-r1.ebuild      | 524 ---------------------
 .../xen-tools/xen-tools-4.17.3_pre1.ebuild         | 524 ---------------------
 5 files changed, 2097 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index d5e8dd7b1b04..38b922e9b3b6 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,11 +5,8 @@ DIST edk2-b16284e2a0011489f6e16dfcc6af7623c3cbaf0b.tar.gz 15245558 BLAKE2B 33876
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
 DIST xen-4.16.5.tar.gz 45023770 BLAKE2B 1371bd4cdf7431c16a575d4f911cec7be25a6358bbc47648aa542c6dcb27b733a8de63f9226a9290096a84df4d602186fcfdf6d255c43140d8e9373323fa53e9 SHA512 2f370787b72b2cd9d81c0b5f138133e676d2b9c8c76e31e6439649d7145242a6b7be0d51a7ff4f4197a99e3f6b24ac50e63d2fa49368da440d3f555e70c4ebd3
-DIST xen-4.17.2.tar.gz 46498038 BLAKE2B 44bb7b39dddb1dbd266a31f6e67f49e981946b78a83580ec068e02687780695d33868781b563dfb77db8ad3ffdc6fe7431ca8243650d9a08823312c430cfa5cd SHA512 0bc475483676e4aa27735695f9a8d2821059e7a55984adb8a29badb5c09a4e7cf8ea29cbc9691be616cc0d7a5ee6b6dacc59ba29c2b16e0919ebdf7dfc54201a
 DIST xen-4.17.3.tar.gz 46505735 BLAKE2B f7a783d951d3e31391aca2b779b9d11440dc28b0756739f7733cd7d2f160de54a018c00dce5d2a6c55a6494c2151a31a64bbeddefbed34eff179463f2e762d93 SHA512 56ead90af00b4c1aa452b5edba980a2873e4c76e8c518220a88089a2771cd76fe2478e15a41abf5d247e4bc5af8415d53614dff7eb028ced80701c1a1263f91f
 DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
-DIST xen-upstream-patches-4.16.6-pre-patchset-0.tar.bz2 41361 BLAKE2B cf3498d1679fd36265f7d0f95f193a90c50d10d6f8a1df8895131c6b006aa1ba1236588b2cbead0fc7cd95ca74ea9bd24986f169889c1032e6bc4a87a8438404 SHA512 8e3cc0ff8f739ff687e5dcceacd58254d37bff6705993698a1fbfac0ccb2e67b7733c73029ff985b1f91dbdf29e247e96a50c1f2166d0b24df863db6915768ae
 DIST xen-upstream-patches-4.16.6-pre-patchset-1.tar.bz2 44167 BLAKE2B 6a11faf689b2875fe6845646cbc71541ff0ce02fed00f2fd0ccabdee4b71be96a5bfaa66a0a6de068a9b6534d5c0df2751f78ccd0755f1bcaef333d8337135dc SHA512 40721e0f4e11408c3687e8e77d850f6f0a02d0af0abe422d11478fe080c158ffee5408ed273d82c8c39a33dd0a97ab962f133a927e3a205fa84e9fe3911a57f1
-DIST xen-upstream-patches-4.17.3-pre-patchset-0.tar.bz2 65870 BLAKE2B 9019ed4131157df83053873ce1978dfdaa21304bfd69a059e8869e4cd31e01128dbccf2b6a8f54b4c724dfa8d455cad0e55de555971e80a6cd56f143f2d618d3 SHA512 094172bb1c822fa6159792d517bdfdf9777f297be5acee99746a6b310db2c509f98001a280d798d931d4fa17983e8165297ad96489327368c035f8284efd382d
 DIST xen-upstream-patches-4.17.4-pre-patchset-0.tar.bz2 17570 BLAKE2B 5ae7ceb1feef758166dc6d569da30cfa8867b3755d41a4d2834ad73630ee3beea5696b79a175a7c2680db59e50b802ef2a9ee5a3cedff74f3d9cbfac064b25f1 SHA512 6001c4889ae5bdb592f8d7801762e43db13223e6552e916978b8ce85eb78c3fcd885c24d58f3db688244ccf50646c8d41a2e20c47d3b85fefb29d1c0ed37dd99

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild
deleted file mode 100644
index cedb095dc513..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.6_pre1-r1.ebuild
+++ /dev/null
@@ -1,523 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{10..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.16.1
-	XEN_PRE_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=4.16.5
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		>=media-gfx/fig2dev-3.2.9-r1
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild
deleted file mode 100644
index a09f8d115021..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.6_pre1.ebuild
+++ /dev/null
@@ -1,523 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{10..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.16.1
-	XEN_PRE_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=4.16.5
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.17.3_pre1-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.3_pre1-r1.ebuild
deleted file mode 100644
index 57925301b457..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.17.3_pre1-r1.ebuild
+++ /dev/null
@@ -1,524 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{10..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=4.17.2
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		>=media-gfx/fig2dev-3.2.9-r1
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild
deleted file mode 100644
index 44e234064fb0..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.17.3_pre1.ebuild
+++ /dev/null
@@ -1,524 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{10..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=4.17.2
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		media-gfx/transfig
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-03-28 11:21 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-03-28 11:21 UTC (permalink / raw
  To: gentoo-commits

commit:     59a177115c32b95d710f2dbc19cd056dbb6246f1
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Sat Feb  3 18:36:16 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Mar 28 11:21:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59a17711

app-emulation/xen-tools: add 4.17.4_pre1

Fixes XSA-449, XSA-450

Bug: https://bugs.gentoo.org/923741
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   1 +
 .../xen-tools/xen-tools-4.17.4_pre1.ebuild         | 524 +++++++++++++++++++++
 2 files changed, 525 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 18814250ea74..d5e8dd7b1b04 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -12,3 +12,4 @@ DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce42675
 DIST xen-upstream-patches-4.16.6-pre-patchset-0.tar.bz2 41361 BLAKE2B cf3498d1679fd36265f7d0f95f193a90c50d10d6f8a1df8895131c6b006aa1ba1236588b2cbead0fc7cd95ca74ea9bd24986f169889c1032e6bc4a87a8438404 SHA512 8e3cc0ff8f739ff687e5dcceacd58254d37bff6705993698a1fbfac0ccb2e67b7733c73029ff985b1f91dbdf29e247e96a50c1f2166d0b24df863db6915768ae
 DIST xen-upstream-patches-4.16.6-pre-patchset-1.tar.bz2 44167 BLAKE2B 6a11faf689b2875fe6845646cbc71541ff0ce02fed00f2fd0ccabdee4b71be96a5bfaa66a0a6de068a9b6534d5c0df2751f78ccd0755f1bcaef333d8337135dc SHA512 40721e0f4e11408c3687e8e77d850f6f0a02d0af0abe422d11478fe080c158ffee5408ed273d82c8c39a33dd0a97ab962f133a927e3a205fa84e9fe3911a57f1
 DIST xen-upstream-patches-4.17.3-pre-patchset-0.tar.bz2 65870 BLAKE2B 9019ed4131157df83053873ce1978dfdaa21304bfd69a059e8869e4cd31e01128dbccf2b6a8f54b4c724dfa8d455cad0e55de555971e80a6cd56f143f2d618d3 SHA512 094172bb1c822fa6159792d517bdfdf9777f297be5acee99746a6b310db2c509f98001a280d798d931d4fa17983e8165297ad96489327368c035f8284efd382d
+DIST xen-upstream-patches-4.17.4-pre-patchset-0.tar.bz2 17570 BLAKE2B 5ae7ceb1feef758166dc6d569da30cfa8867b3755d41a4d2834ad73630ee3beea5696b79a175a7c2680db59e50b802ef2a9ee5a3cedff74f3d9cbfac064b25f1 SHA512 6001c4889ae5bdb592f8d7801762e43db13223e6552e916978b8ce85eb78c3fcd885c24d58f3db688244ccf50646c8d41a2e20c47d3b85fefb29d1c0ed37dd99

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild
new file mode 100644
index 000000000000..8fadbbf335fd
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.17.3
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-build/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-03-28 16:44 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2024-03-28 16:44 UTC (permalink / raw
  To: gentoo-commits

commit:     6782d74b9fd2c16dd034c9ddddd63eed9fba67ba
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 28 16:43:55 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 28 16:43:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6782d74b

app-emulation/xen-tools: Stabilize 4.17.4_pre1 x86, #928053

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild
index 8fadbbf335fd..cc9374257fc9 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-03-28 17:18 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2024-03-28 17:18 UTC (permalink / raw
  To: gentoo-commits

commit:     123d12432bb7f530cbb64306e79dc77bf761fcd4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 28 17:18:35 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 28 17:18:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=123d1243

app-emulation/xen-tools: Stabilize 4.17.4_pre1 amd64, #928053

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild
index cc9374257fc9..15732418896d 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-04-05 15:59 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-04-05 15:59 UTC (permalink / raw
  To: gentoo-commits

commit:     c12cea4a6ddfbad3a990e594ce72f8cfa034b168
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Apr  5 07:55:53 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Apr  5 15:59:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c12cea4a

app-emulation/xen-tools: add 4.17.4_pre2

Fixes XSA-451, XSA-452, XSA-453

Bug: https://bugs.gentoo.org/928620
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 +
 .../xen-tools/xen-tools-4.17.4_pre2.ebuild         | 524 +++++++++++++++++++++
 2 files changed, 526 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 38b922e9b3b6..5c23f32bbce3 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -2,6 +2,7 @@ DIST OpenSSL_1_1_1t.tar.gz 10061233 BLAKE2B aef89c338644230305bcc75dbc13d6799a04
 DIST berkeley-softfloat-b64af41c3276f97f0e181920400ee056b9c88037.tar.gz 148741 BLAKE2B 72014022926b636147e202d74c42df2ce9cfed00b91c275d5b2e0afbc5c68765445cbe7ac6389d7c2512bd1d45b0e16e999936552d09bbc733ab66c92968bd31 SHA512 8420c29faa7ff57e06d6758b03e81ca0630c59946bc031e8611f1449e23634cf901b502161f2c1423c0cff949b5481445e36a3aa53dc885b61ca2c673b3ba567
 DIST brotli-f4153a09f87cbb9c826d8fc12c74642bb2d879ea.tar.gz 512229 BLAKE2B cd86cc2cc7eefad24f87cda8006409bf764922b5f23ccfb951e7a41214b12004ce532b11f94f5fb858b3bf71f9abf8ef17ba219fa96bd5be23b51873afad0fd5 SHA512 7f48e794e738b31c2005e7cef6d8c0cc0d543f1cd8c137ae8ba14602cac2873de6299a3f32ad52be869f513e7548341353ed049609daef1063975694d9a9b80b
 DIST edk2-b16284e2a0011489f6e16dfcc6af7623c3cbaf0b.tar.gz 15245558 BLAKE2B 33876c08040fa876b4e3741fe859d113654013c948fa8a8b391955226e6215bbbe26fc484e56ba5b399d2c4e4d198900f2de42eccfbac6901e01cd73a80e803b SHA512 7d71ec3d98c652b86194607dbcab767160c708991f49f69eda1f5d844ced0c4842e849d19bf99ea09b1db523b91ced1e5552a4ddcea32b94b9db6b8f6f5c5931
+DIST ipxe-git-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz 4074878 BLAKE2B d335d1e69bf736c53622e34e5ebeea77e294637f39bd5e2704f13b8e334b684130c259bd48b832050eebfabfc898f9786979a4c00903145fdb347a497b399f31 SHA512 e27644cbb030c43e2841058003bedea6deb979ba71591f967e01312527ed869bb863f9a03fc7b5a266752433d30164929ea1b935953a245600ad713c9fb25cb5
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
 DIST xen-4.16.5.tar.gz 45023770 BLAKE2B 1371bd4cdf7431c16a575d4f911cec7be25a6358bbc47648aa542c6dcb27b733a8de63f9226a9290096a84df4d602186fcfdf6d255c43140d8e9373323fa53e9 SHA512 2f370787b72b2cd9d81c0b5f138133e676d2b9c8c76e31e6439649d7145242a6b7be0d51a7ff4f4197a99e3f6b24ac50e63d2fa49368da440d3f555e70c4ebd3
@@ -10,3 +11,4 @@ DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa12
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
 DIST xen-upstream-patches-4.16.6-pre-patchset-1.tar.bz2 44167 BLAKE2B 6a11faf689b2875fe6845646cbc71541ff0ce02fed00f2fd0ccabdee4b71be96a5bfaa66a0a6de068a9b6534d5c0df2751f78ccd0755f1bcaef333d8337135dc SHA512 40721e0f4e11408c3687e8e77d850f6f0a02d0af0abe422d11478fe080c158ffee5408ed273d82c8c39a33dd0a97ab962f133a927e3a205fa84e9fe3911a57f1
 DIST xen-upstream-patches-4.17.4-pre-patchset-0.tar.bz2 17570 BLAKE2B 5ae7ceb1feef758166dc6d569da30cfa8867b3755d41a4d2834ad73630ee3beea5696b79a175a7c2680db59e50b802ef2a9ee5a3cedff74f3d9cbfac064b25f1 SHA512 6001c4889ae5bdb592f8d7801762e43db13223e6552e916978b8ce85eb78c3fcd885c24d58f3db688244ccf50646c8d41a2e20c47d3b85fefb29d1c0ed37dd99
+DIST xen-upstream-patches-4.17.4-pre-patchset-1.tar.bz2 77410 BLAKE2B 1c00d613f9d12d81a284455d9099c031ba3ea7066508c75ad6f7e13330a09e2eb4e74bf5bc54fed9c4f90e18856cc01ff0e4ab4721d36388519eb40f99be42d8 SHA512 7a56cb0ac9b59043ffbc891819cbe54c9efe411e2e67eebc212a3b519ca60a37a377dd21b0ba851d6828cf268781983b082c6fecee0f0156501b5c447050789a

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild
new file mode 100644
index 000000000000..19446ebe163f
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=1
+	XEN_PRE_VERSION_BASE=4.17.3
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-build/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-04-05 15:59 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-04-05 15:59 UTC (permalink / raw
  To: gentoo-commits

commit:     bb06f7878c3f925c09cc67bf3a42e472908174a8
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Apr  5 07:59:16 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Apr  5 15:59:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb06f787

app-emulation/xen-tools: drop 4.16.6_pre2, 4.17.3

Bug: https://bugs.gentoo.org/923741
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36114
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   3 -
 .../xen-tools/xen-tools-4.16.6_pre2.ebuild         | 523 --------------------
 app-emulation/xen-tools/xen-tools-4.17.3.ebuild    | 524 ---------------------
 3 files changed, 1050 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 5c23f32bbce3..b710a12d6d23 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,10 +5,7 @@ DIST edk2-b16284e2a0011489f6e16dfcc6af7623c3cbaf0b.tar.gz 15245558 BLAKE2B 33876
 DIST ipxe-git-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz 4074878 BLAKE2B d335d1e69bf736c53622e34e5ebeea77e294637f39bd5e2704f13b8e334b684130c259bd48b832050eebfabfc898f9786979a4c00903145fdb347a497b399f31 SHA512 e27644cbb030c43e2841058003bedea6deb979ba71591f967e01312527ed869bb863f9a03fc7b5a266752433d30164929ea1b935953a245600ad713c9fb25cb5
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
-DIST xen-4.16.5.tar.gz 45023770 BLAKE2B 1371bd4cdf7431c16a575d4f911cec7be25a6358bbc47648aa542c6dcb27b733a8de63f9226a9290096a84df4d602186fcfdf6d255c43140d8e9373323fa53e9 SHA512 2f370787b72b2cd9d81c0b5f138133e676d2b9c8c76e31e6439649d7145242a6b7be0d51a7ff4f4197a99e3f6b24ac50e63d2fa49368da440d3f555e70c4ebd3
 DIST xen-4.17.3.tar.gz 46505735 BLAKE2B f7a783d951d3e31391aca2b779b9d11440dc28b0756739f7733cd7d2f160de54a018c00dce5d2a6c55a6494c2151a31a64bbeddefbed34eff179463f2e762d93 SHA512 56ead90af00b4c1aa452b5edba980a2873e4c76e8c518220a88089a2771cd76fe2478e15a41abf5d247e4bc5af8415d53614dff7eb028ced80701c1a1263f91f
-DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
-DIST xen-upstream-patches-4.16.6-pre-patchset-1.tar.bz2 44167 BLAKE2B 6a11faf689b2875fe6845646cbc71541ff0ce02fed00f2fd0ccabdee4b71be96a5bfaa66a0a6de068a9b6534d5c0df2751f78ccd0755f1bcaef333d8337135dc SHA512 40721e0f4e11408c3687e8e77d850f6f0a02d0af0abe422d11478fe080c158ffee5408ed273d82c8c39a33dd0a97ab962f133a927e3a205fa84e9fe3911a57f1
 DIST xen-upstream-patches-4.17.4-pre-patchset-0.tar.bz2 17570 BLAKE2B 5ae7ceb1feef758166dc6d569da30cfa8867b3755d41a4d2834ad73630ee3beea5696b79a175a7c2680db59e50b802ef2a9ee5a3cedff74f3d9cbfac064b25f1 SHA512 6001c4889ae5bdb592f8d7801762e43db13223e6552e916978b8ce85eb78c3fcd885c24d58f3db688244ccf50646c8d41a2e20c47d3b85fefb29d1c0ed37dd99
 DIST xen-upstream-patches-4.17.4-pre-patchset-1.tar.bz2 77410 BLAKE2B 1c00d613f9d12d81a284455d9099c031ba3ea7066508c75ad6f7e13330a09e2eb4e74bf5bc54fed9c4f90e18856cc01ff0e4ab4721d36388519eb40f99be42d8 SHA512 7a56cb0ac9b59043ffbc891819cbe54c9efe411e2e67eebc212a3b519ca60a37a377dd21b0ba851d6828cf268781983b082c6fecee0f0156501b5c447050789a

diff --git a/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild b/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild
deleted file mode 100644
index d865eb635bd5..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.16.6_pre2.ebuild
+++ /dev/null
@@ -1,523 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{10..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.16.1
-	XEN_PRE_PATCHSET_NUM=1
-	XEN_PRE_VERSION_BASE=4.16.5
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		>=media-gfx/fig2dev-3.2.9-r1
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.17.3.ebuild b/app-emulation/xen-tools/xen-tools-4.17.3.ebuild
deleted file mode 100644
index bf5e61f700a4..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.17.3.ebuild
+++ /dev/null
@@ -1,524 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{10..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=
-	XEN_PRE_VERSION_BASE=
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		>=media-gfx/fig2dev-3.2.9-r1
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-04-06  5:58 Joonas Niilola
  0 siblings, 0 replies; 295+ messages in thread
From: Joonas Niilola @ 2024-04-06  5:58 UTC (permalink / raw
  To: gentoo-commits

commit:     8cee71244fc8460c06bf7701e42029d01290184a
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  6 05:58:08 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Apr  6 05:58:35 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cee7124

app-emulation/xen-tools: Stabilize 4.17.4_pre2 x86, #928665

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild
index 19446ebe163f..05ec3e6d8580 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-04-06  6:05 Joonas Niilola
  0 siblings, 0 replies; 295+ messages in thread
From: Joonas Niilola @ 2024-04-06  6:05 UTC (permalink / raw
  To: gentoo-commits

commit:     1fcf7468829ecf567c1c8ae1386382d1e6e2d628
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Sat Apr  6 06:05:38 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Apr  6 06:05:38 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fcf7468

app-emulation/xen-tools: Stabilize 4.17.4_pre2 amd64, #928665

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild
index 05ec3e6d8580..e283301b0bd5 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-04-10  6:43 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-04-10  6:43 UTC (permalink / raw
  To: gentoo-commits

commit:     1e5000c464b61a113d50b316772a6d72ca30f106
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Apr 10 06:25:54 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Apr 10 06:43:18 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e5000c4

app-emulation/xen-tools: drop 4.17.4_pre1

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36187
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 -
 .../xen-tools/xen-tools-4.17.4_pre1.ebuild         | 524 ---------------------
 2 files changed, 526 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 4374b4d87df7..f5c6218ff757 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -3,10 +3,8 @@ DIST berkeley-softfloat-b64af41c3276f97f0e181920400ee056b9c88037.tar.gz 148741 B
 DIST brotli-f4153a09f87cbb9c826d8fc12c74642bb2d879ea.tar.gz 512229 BLAKE2B cd86cc2cc7eefad24f87cda8006409bf764922b5f23ccfb951e7a41214b12004ce532b11f94f5fb858b3bf71f9abf8ef17ba219fa96bd5be23b51873afad0fd5 SHA512 7f48e794e738b31c2005e7cef6d8c0cc0d543f1cd8c137ae8ba14602cac2873de6299a3f32ad52be869f513e7548341353ed049609daef1063975694d9a9b80b
 DIST edk2-b16284e2a0011489f6e16dfcc6af7623c3cbaf0b.tar.gz 15245558 BLAKE2B 33876c08040fa876b4e3741fe859d113654013c948fa8a8b391955226e6215bbbe26fc484e56ba5b399d2c4e4d198900f2de42eccfbac6901e01cd73a80e803b SHA512 7d71ec3d98c652b86194607dbcab767160c708991f49f69eda1f5d844ced0c4842e849d19bf99ea09b1db523b91ced1e5552a4ddcea32b94b9db6b8f6f5c5931
 DIST ipxe-git-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz 4074878 BLAKE2B d335d1e69bf736c53622e34e5ebeea77e294637f39bd5e2704f13b8e334b684130c259bd48b832050eebfabfc898f9786979a4c00903145fdb347a497b399f31 SHA512 e27644cbb030c43e2841058003bedea6deb979ba71591f967e01312527ed869bb863f9a03fc7b5a266752433d30164929ea1b935953a245600ad713c9fb25cb5
-DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
 DIST xen-4.17.3.tar.gz 46505735 BLAKE2B f7a783d951d3e31391aca2b779b9d11440dc28b0756739f7733cd7d2f160de54a018c00dce5d2a6c55a6494c2151a31a64bbeddefbed34eff179463f2e762d93 SHA512 56ead90af00b4c1aa452b5edba980a2873e4c76e8c518220a88089a2771cd76fe2478e15a41abf5d247e4bc5af8415d53614dff7eb028ced80701c1a1263f91f
 DIST xen-4.17.4.tar.gz 46527369 BLAKE2B 2fcd1248d75157b6455727b29ecc3a4e5941eb187d645b35b6cf48a23fdfae11e810c55a1a7c0396c6a23dc977f22b8fd06ee9b91a1edc3a7ba8561023e07cfc SHA512 50dc2efd26e48131afdbc8efb1ca90154a84fe5fba5a6bc81d9801a3c13aebea91c8211872b5c69ce2773644f2c935c31cc56584a05b10b81e8728282d89eb84
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
-DIST xen-upstream-patches-4.17.4-pre-patchset-0.tar.bz2 17570 BLAKE2B 5ae7ceb1feef758166dc6d569da30cfa8867b3755d41a4d2834ad73630ee3beea5696b79a175a7c2680db59e50b802ef2a9ee5a3cedff74f3d9cbfac064b25f1 SHA512 6001c4889ae5bdb592f8d7801762e43db13223e6552e916978b8ce85eb78c3fcd885c24d58f3db688244ccf50646c8d41a2e20c47d3b85fefb29d1c0ed37dd99
 DIST xen-upstream-patches-4.17.4-pre-patchset-1.tar.bz2 77410 BLAKE2B 1c00d613f9d12d81a284455d9099c031ba3ea7066508c75ad6f7e13330a09e2eb4e74bf5bc54fed9c4f90e18856cc01ff0e4ab4721d36388519eb40f99be42d8 SHA512 7a56cb0ac9b59043ffbc891819cbe54c9efe411e2e67eebc212a3b519ca60a37a377dd21b0ba851d6828cf268781983b082c6fecee0f0156501b5c447050789a

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild
deleted file mode 100644
index 15732418896d..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.17.4_pre1.ebuild
+++ /dev/null
@@ -1,524 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{10..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="3c040ad387099483102708bb1839110bc788cefb"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=4.17.3
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		>=media-gfx/fig2dev-3.2.9-r1
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-04-10  6:43 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-04-10  6:43 UTC (permalink / raw
  To: gentoo-commits

commit:     d7ce4f82dd1b7feb09f791b626796954fff357f2
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Apr 10 06:22:23 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Apr 10 06:43:17 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7ce4f82

app-emulation/xen-tools: add 4.17.4

Fixes XSA-454, XSA-455

Bug: https://bugs.gentoo.org/929038
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   1 +
 app-emulation/xen-tools/xen-tools-4.17.4.ebuild | 524 ++++++++++++++++++++++++
 2 files changed, 525 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index b710a12d6d23..4374b4d87df7 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,6 +6,7 @@ DIST ipxe-git-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz 4074878 BLAKE2B d3
 DIST ipxe-git-3c040ad387099483102708bb1839110bc788cefb.tar.gz 3962725 BLAKE2B a8084abaf93a4ab06ba170427a66dab08e68ba1288f42ea744e2cbc66d6bd2294bee82f6d0994260d2cd60daf6a6068e40eb74fdeba2bccaa432d090d81fd9db SHA512 4ac1d07ce879a3a8c6c260380258c37f5e4ecddc880b27fb59afc38fbf3718e81b04a4dda2b58fe7a438a23175e00b6179fc067acbc4a75e33d93c4b85ff5d68
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
 DIST xen-4.17.3.tar.gz 46505735 BLAKE2B f7a783d951d3e31391aca2b779b9d11440dc28b0756739f7733cd7d2f160de54a018c00dce5d2a6c55a6494c2151a31a64bbeddefbed34eff179463f2e762d93 SHA512 56ead90af00b4c1aa452b5edba980a2873e4c76e8c518220a88089a2771cd76fe2478e15a41abf5d247e4bc5af8415d53614dff7eb028ced80701c1a1263f91f
+DIST xen-4.17.4.tar.gz 46527369 BLAKE2B 2fcd1248d75157b6455727b29ecc3a4e5941eb187d645b35b6cf48a23fdfae11e810c55a1a7c0396c6a23dc977f22b8fd06ee9b91a1edc3a7ba8561023e07cfc SHA512 50dc2efd26e48131afdbc8efb1ca90154a84fe5fba5a6bc81d9801a3c13aebea91c8211872b5c69ce2773644f2c935c31cc56584a05b10b81e8728282d89eb84
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
 DIST xen-upstream-patches-4.17.4-pre-patchset-0.tar.bz2 17570 BLAKE2B 5ae7ceb1feef758166dc6d569da30cfa8867b3755d41a4d2834ad73630ee3beea5696b79a175a7c2680db59e50b802ef2a9ee5a3cedff74f3d9cbfac064b25f1 SHA512 6001c4889ae5bdb592f8d7801762e43db13223e6552e916978b8ce85eb78c3fcd885c24d58f3db688244ccf50646c8d41a2e20c47d3b85fefb29d1c0ed37dd99
 DIST xen-upstream-patches-4.17.4-pre-patchset-1.tar.bz2 77410 BLAKE2B 1c00d613f9d12d81a284455d9099c031ba3ea7066508c75ad6f7e13330a09e2eb4e74bf5bc54fed9c4f90e18856cc01ff0e4ab4721d36388519eb40f99be42d8 SHA512 7a56cb0ac9b59043ffbc891819cbe54c9efe411e2e67eebc212a3b519ca60a37a377dd21b0ba851d6828cf268781983b082c6fecee0f0156501b5c447050789a

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4.ebuild
new file mode 100644
index 000000000000..c62a890bde7f
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.17.4.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=
+	XEN_PRE_VERSION_BASE=
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-build/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-04-11  3:35 Joonas Niilola
  0 siblings, 0 replies; 295+ messages in thread
From: Joonas Niilola @ 2024-04-11  3:35 UTC (permalink / raw
  To: gentoo-commits

commit:     85c6fbfc5c04ee629581dba3168d99cffc78dd04
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 11 03:21:31 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Apr 11 03:21:31 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85c6fbfc

app-emulation/xen-tools: Stabilize 4.17.4 x86, #929053

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.17.4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4.ebuild
index c62a890bde7f..4605f10f5cd3 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.4.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-04-11  3:38 Joonas Niilola
  0 siblings, 0 replies; 295+ messages in thread
From: Joonas Niilola @ 2024-04-11  3:38 UTC (permalink / raw
  To: gentoo-commits

commit:     99653117ecffb2692f5fbd0664bc5153e3f9cd2c
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 11 03:37:56 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Apr 11 03:37:56 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99653117

app-emulation/xen-tools: Stabilize 4.17.4 amd64, #929053

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.17.4.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4.ebuild
index 4605f10f5cd3..c4bcc325110c 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.4.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.4.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-05-29  8:32 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-05-29  8:32 UTC (permalink / raw
  To: gentoo-commits

commit:     8242d1d0262fb5244f1835d0294dd5f5d1f0cd86
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue May 28 16:37:39 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed May 29 08:31:34 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8242d1d0

app-emulation/xen-tools: drop 4.17.4_pre2

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 -
 .../xen-tools/xen-tools-4.17.4_pre2.ebuild         | 524 ---------------------
 2 files changed, 526 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index f5c6218ff757..7eb2a3721711 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -4,7 +4,5 @@ DIST brotli-f4153a09f87cbb9c826d8fc12c74642bb2d879ea.tar.gz 512229 BLAKE2B cd86c
 DIST edk2-b16284e2a0011489f6e16dfcc6af7623c3cbaf0b.tar.gz 15245558 BLAKE2B 33876c08040fa876b4e3741fe859d113654013c948fa8a8b391955226e6215bbbe26fc484e56ba5b399d2c4e4d198900f2de42eccfbac6901e01cd73a80e803b SHA512 7d71ec3d98c652b86194607dbcab767160c708991f49f69eda1f5d844ced0c4842e849d19bf99ea09b1db523b91ced1e5552a4ddcea32b94b9db6b8f6f5c5931
 DIST ipxe-git-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz 4074878 BLAKE2B d335d1e69bf736c53622e34e5ebeea77e294637f39bd5e2704f13b8e334b684130c259bd48b832050eebfabfc898f9786979a4c00903145fdb347a497b399f31 SHA512 e27644cbb030c43e2841058003bedea6deb979ba71591f967e01312527ed869bb863f9a03fc7b5a266752433d30164929ea1b935953a245600ad713c9fb25cb5
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
-DIST xen-4.17.3.tar.gz 46505735 BLAKE2B f7a783d951d3e31391aca2b779b9d11440dc28b0756739f7733cd7d2f160de54a018c00dce5d2a6c55a6494c2151a31a64bbeddefbed34eff179463f2e762d93 SHA512 56ead90af00b4c1aa452b5edba980a2873e4c76e8c518220a88089a2771cd76fe2478e15a41abf5d247e4bc5af8415d53614dff7eb028ced80701c1a1263f91f
 DIST xen-4.17.4.tar.gz 46527369 BLAKE2B 2fcd1248d75157b6455727b29ecc3a4e5941eb187d645b35b6cf48a23fdfae11e810c55a1a7c0396c6a23dc977f22b8fd06ee9b91a1edc3a7ba8561023e07cfc SHA512 50dc2efd26e48131afdbc8efb1ca90154a84fe5fba5a6bc81d9801a3c13aebea91c8211872b5c69ce2773644f2c935c31cc56584a05b10b81e8728282d89eb84
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
-DIST xen-upstream-patches-4.17.4-pre-patchset-1.tar.bz2 77410 BLAKE2B 1c00d613f9d12d81a284455d9099c031ba3ea7066508c75ad6f7e13330a09e2eb4e74bf5bc54fed9c4f90e18856cc01ff0e4ab4721d36388519eb40f99be42d8 SHA512 7a56cb0ac9b59043ffbc891819cbe54c9efe411e2e67eebc212a3b519ca60a37a377dd21b0ba851d6828cf268781983b082c6fecee0f0156501b5c447050789a

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild
deleted file mode 100644
index e283301b0bd5..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.17.4_pre2.ebuild
+++ /dev/null
@@ -1,524 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{10..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=1
-	XEN_PRE_VERSION_BASE=4.17.3
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		>=media-gfx/fig2dev-3.2.9-r1
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-05-29  8:32 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-05-29  8:32 UTC (permalink / raw
  To: gentoo-commits

commit:     a8e923d244038e433e5a761cc431b0d73cf6e2eb
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Tue May 28 16:36:46 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed May 29 08:31:33 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8e923d2

app-emulation/xen-tools: enable py3.12

Bug: https://bugs.gentoo.org/929317
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild | 524 +++++++++++++++++++++
 1 file changed, 524 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild
new file mode 100644
index 000000000000..54f349124863
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild
@@ -0,0 +1,524 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=
+	XEN_PRE_VERSION_BASE=
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-build/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Created at runtime
+	rm -rv "${ED}/var/run" || die
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-06-04 18:23 Arthur Zamarin
  0 siblings, 0 replies; 295+ messages in thread
From: Arthur Zamarin @ 2024-06-04 18:23 UTC (permalink / raw
  To: gentoo-commits

commit:     88cfa5035837102a9c4983725273126402503c37
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  4 18:23:27 2024 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Tue Jun  4 18:23:27 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88cfa503

app-emulation/xen-tools: Stabilize 4.17.4-r1 amd64, #933449

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild
index 54f349124863..b7ab3179dc43 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 ~x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-06-12 19:48 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2024-06-12 19:48 UTC (permalink / raw
  To: gentoo-commits

commit:     c0b3519434a3da9fb9b7630014adc4afc43bac94
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 12 19:47:52 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jun 12 19:47:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0b35194

app-emulation/xen-tools: Stabilize 4.17.4-r1 x86, #933449

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild
index b7ab3179dc43..4b88e126ae7a 100644
--- a/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-08-02  8:02 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-08-02  8:02 UTC (permalink / raw
  To: gentoo-commits

commit:     3b45e9e7d7ba8731f4a567677f22463648b52b6b
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu Aug  1 15:40:09 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Aug  2 08:00:52 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b45e9e7

app-emulation/xen-tools: drop 4.17.4

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/37916
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.17.4.ebuild | 524 ------------------------
 1 file changed, 524 deletions(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4.ebuild
deleted file mode 100644
index c4bcc325110c..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.17.4.ebuild
+++ /dev/null
@@ -1,524 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..11} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=
-	XEN_PRE_VERSION_BASE=
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		>=media-gfx/fig2dev-3.2.9-r1
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-08-02  8:02 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-08-02  8:02 UTC (permalink / raw
  To: gentoo-commits

commit:     b75e3dbdca6f94d4a0919a7c9294f0e641b78804
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu Aug  1 15:39:03 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Aug  2 08:00:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b75e3dbd

app-emulation/xen-tools: add 4.18.3_pre0, 4.19.0

Closes: https://bugs.gentoo.org/921932
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   3 +
 .../xen-tools/xen-tools-4.18.3_pre0.ebuild         | 525 +++++++++++++++++++++
 app-emulation/xen-tools/xen-tools-4.19.0.ebuild    | 525 +++++++++++++++++++++
 3 files changed, 1053 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 7eb2a3721711..12ec074c5386 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,4 +5,7 @@ DIST edk2-b16284e2a0011489f6e16dfcc6af7623c3cbaf0b.tar.gz 15245558 BLAKE2B 33876
 DIST ipxe-git-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz 4074878 BLAKE2B d335d1e69bf736c53622e34e5ebeea77e294637f39bd5e2704f13b8e334b684130c259bd48b832050eebfabfc898f9786979a4c00903145fdb347a497b399f31 SHA512 e27644cbb030c43e2841058003bedea6deb979ba71591f967e01312527ed869bb863f9a03fc7b5a266752433d30164929ea1b935953a245600ad713c9fb25cb5
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
 DIST xen-4.17.4.tar.gz 46527369 BLAKE2B 2fcd1248d75157b6455727b29ecc3a4e5941eb187d645b35b6cf48a23fdfae11e810c55a1a7c0396c6a23dc977f22b8fd06ee9b91a1edc3a7ba8561023e07cfc SHA512 50dc2efd26e48131afdbc8efb1ca90154a84fe5fba5a6bc81d9801a3c13aebea91c8211872b5c69ce2773644f2c935c31cc56584a05b10b81e8728282d89eb84
+DIST xen-4.18.2.tar.gz 51911271 BLAKE2B 0b58a74d867f42e7820a1050587c11ec9099aca74875fc9e4657e1eba239afed3e23fe3dba047f1e5f6d8cab4d2fd7f0eaf6b809c7549d73e8c102add7864c46 SHA512 c5feb450155883b5d2e7f43b05a64e7215b661b7d2f438d8f5a0896bd57283379ee11ca8e2e7a1d8787813cc6f1a260253fcb8688ed7d61a2bfb636db1626941
+DIST xen-4.19.0.tar.gz 52011199 BLAKE2B bc6502bf5b68ab130f1d64e20e8a6d8ca656240545f0a4f5fe500413504c7610352bd7577f0e7e9d9354745afaf39d3edd3ad775718e20d14181dd2dca28ec0a SHA512 bc0b4257cab66b0f9d4a1fe72e07f4980398b2934989c02ffe488b465eca3443caa0ded903871480aba6e36212921f335b68d67f202f22548c31899225f2d657
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
+DIST xen-upstream-patches-4.18.3-pre-patchset-0.tar.bz2 51452 BLAKE2B 166d13eb16b5225fe5d8b96d9a7ba547b8d94b2989a15b641d53821e484d45bec8ed123180c8c7c5666da87f8a4368ad2a27284431561ae323453b4054c72d80 SHA512 bf434740567ac964babdc625c2cc13d9c2bcc79f8360f8f4dc8658fb191c60418a24cbea331d2a69fcadf4b30620f662e883695c379c87b4f8de17bfec51108c

diff --git a/app-emulation/xen-tools/xen-tools-4.18.3_pre0.ebuild b/app-emulation/xen-tools/xen-tools-4.18.3_pre0.ebuild
new file mode 100644
index 000000000000..b753f3e725c6
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.18.3_pre0.ebuild
@@ -0,0 +1,525 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.18.2
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-build/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# disable header check (Bug #921932)
+	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
+		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.19.0.ebuild b/app-emulation/xen-tools/xen-tools-4.19.0.ebuild
new file mode 100644
index 000000000000..3341733ab7a4
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.19.0.ebuild
@@ -0,0 +1,525 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=
+	XEN_PRE_VERSION_BASE=
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-build/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# disable header check (Bug #921932)
+	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
+		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-10-14  7:16 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-10-14  7:16 UTC (permalink / raw
  To: gentoo-commits

commit:     36094c05a32a47da10f2568711622e9f36ff6106
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Oct  9 11:59:10 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Oct 14 07:13:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36094c05

app-emulation/xen-tools: drop 4.18.3_pre0, 4.19.0

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 -
 .../xen-tools/xen-tools-4.18.3_pre0.ebuild         | 525 ---------------------
 app-emulation/xen-tools/xen-tools-4.19.0.ebuild    | 525 ---------------------
 3 files changed, 1052 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index c4b4b5bfc95a..cd1d4ef24257 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,10 +5,8 @@ DIST edk2-b16284e2a0011489f6e16dfcc6af7623c3cbaf0b.tar.gz 15245558 BLAKE2B 33876
 DIST ipxe-git-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz 4074878 BLAKE2B d335d1e69bf736c53622e34e5ebeea77e294637f39bd5e2704f13b8e334b684130c259bd48b832050eebfabfc898f9786979a4c00903145fdb347a497b399f31 SHA512 e27644cbb030c43e2841058003bedea6deb979ba71591f967e01312527ed869bb863f9a03fc7b5a266752433d30164929ea1b935953a245600ad713c9fb25cb5
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
 DIST xen-4.17.4.tar.gz 46527369 BLAKE2B 2fcd1248d75157b6455727b29ecc3a4e5941eb187d645b35b6cf48a23fdfae11e810c55a1a7c0396c6a23dc977f22b8fd06ee9b91a1edc3a7ba8561023e07cfc SHA512 50dc2efd26e48131afdbc8efb1ca90154a84fe5fba5a6bc81d9801a3c13aebea91c8211872b5c69ce2773644f2c935c31cc56584a05b10b81e8728282d89eb84
-DIST xen-4.18.2.tar.gz 51911271 BLAKE2B 0b58a74d867f42e7820a1050587c11ec9099aca74875fc9e4657e1eba239afed3e23fe3dba047f1e5f6d8cab4d2fd7f0eaf6b809c7549d73e8c102add7864c46 SHA512 c5feb450155883b5d2e7f43b05a64e7215b661b7d2f438d8f5a0896bd57283379ee11ca8e2e7a1d8787813cc6f1a260253fcb8688ed7d61a2bfb636db1626941
 DIST xen-4.18.3.tar.gz 51911584 BLAKE2B 01bc915ea88c6a80608bb4f9c37ec75cd4abcc785b99d33eb9de3c32b65c884d47d6c7431d388e73699012b9edd6c44bdc051233726a4239f333e35eba35d72f SHA512 cb71b362ea0b78ba324cd0f9b7003f93936cc61fd22df4791d178f80d396aacf4f42f5d95209ec599f42548df47ea46b04f8baddb4bd78f7fb06e2681b57f3f8
 DIST xen-4.19.0.tar.gz 52011199 BLAKE2B bc6502bf5b68ab130f1d64e20e8a6d8ca656240545f0a4f5fe500413504c7610352bd7577f0e7e9d9354745afaf39d3edd3ad775718e20d14181dd2dca28ec0a SHA512 bc0b4257cab66b0f9d4a1fe72e07f4980398b2934989c02ffe488b465eca3443caa0ded903871480aba6e36212921f335b68d67f202f22548c31899225f2d657
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
-DIST xen-upstream-patches-4.18.3-pre-patchset-0.tar.bz2 51452 BLAKE2B 166d13eb16b5225fe5d8b96d9a7ba547b8d94b2989a15b641d53821e484d45bec8ed123180c8c7c5666da87f8a4368ad2a27284431561ae323453b4054c72d80 SHA512 bf434740567ac964babdc625c2cc13d9c2bcc79f8360f8f4dc8658fb191c60418a24cbea331d2a69fcadf4b30620f662e883695c379c87b4f8de17bfec51108c
 DIST xen-upstream-patches-4.18.4-pre-patchset-0.tar.bz2 30806 BLAKE2B 29654a8bbf5515ba51b278cc62222bc741ddab59976655e4b5df02fe75277d20686e4f4cda7a38997fab86a179fa511fc6c2b9c830080a4af80a24215c0e6e71 SHA512 b188c5111714eb1775ee7ad91ed443c03cdb6342c2e26ad5e2f4724f82220191695ecb0b616c8dc3956c07560d0d4056eb1cfdd1143a7b138c4a8669ac24c945
 DIST xen-upstream-patches-4.19.1-pre-patchset-0.tar.bz2 39681 BLAKE2B cdec8853ee6b7f6ccac332bd6dcb65294f282e14c6085d4a3c4f90fa6c96850acc5bd0e4cb27ef71d7145e6bdc780ba0223c6e2ba13bea77b9f3803f32954918 SHA512 7ecf5380211cebab5bed3276caa23d9b3fffa0dabfbcb46c1900e35883e8af21773a9c7bcc0a6b584ac3ba61e7cb49eed2bc5492e2571268929e59dde5856170

diff --git a/app-emulation/xen-tools/xen-tools-4.18.3_pre0.ebuild b/app-emulation/xen-tools/xen-tools-4.18.3_pre0.ebuild
deleted file mode 100644
index b753f3e725c6..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.18.3_pre0.ebuild
+++ /dev/null
@@ -1,525 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=4.18.2
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		>=media-gfx/fig2dev-3.2.9-r1
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# disable header check (Bug #921932)
-	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
-		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.19.0.ebuild b/app-emulation/xen-tools/xen-tools-4.19.0.ebuild
deleted file mode 100644
index 3341733ab7a4..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.19.0.ebuild
+++ /dev/null
@@ -1,525 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=
-	XEN_PRE_VERSION_BASE=
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		>=media-gfx/fig2dev-3.2.9-r1
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# disable header check (Bug #921932)
-	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
-		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-10-14  7:16 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-10-14  7:16 UTC (permalink / raw
  To: gentoo-commits

commit:     12f88d31cbf7b661e8fdaf819a1963b53ab81980
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed Oct  9 11:58:47 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Mon Oct 14 07:13:58 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12f88d31

app-emulation/xen-tools: add 4.18.4_pre0, 4.19.1_pre0

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   3 +
 .../xen-tools/xen-tools-4.18.4_pre0.ebuild         | 525 +++++++++++++++++++++
 .../xen-tools/xen-tools-4.19.1_pre0.ebuild         | 525 +++++++++++++++++++++
 3 files changed, 1053 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 12ec074c5386..c4b4b5bfc95a 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,6 +6,9 @@ DIST ipxe-git-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz 4074878 BLAKE2B d3
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
 DIST xen-4.17.4.tar.gz 46527369 BLAKE2B 2fcd1248d75157b6455727b29ecc3a4e5941eb187d645b35b6cf48a23fdfae11e810c55a1a7c0396c6a23dc977f22b8fd06ee9b91a1edc3a7ba8561023e07cfc SHA512 50dc2efd26e48131afdbc8efb1ca90154a84fe5fba5a6bc81d9801a3c13aebea91c8211872b5c69ce2773644f2c935c31cc56584a05b10b81e8728282d89eb84
 DIST xen-4.18.2.tar.gz 51911271 BLAKE2B 0b58a74d867f42e7820a1050587c11ec9099aca74875fc9e4657e1eba239afed3e23fe3dba047f1e5f6d8cab4d2fd7f0eaf6b809c7549d73e8c102add7864c46 SHA512 c5feb450155883b5d2e7f43b05a64e7215b661b7d2f438d8f5a0896bd57283379ee11ca8e2e7a1d8787813cc6f1a260253fcb8688ed7d61a2bfb636db1626941
+DIST xen-4.18.3.tar.gz 51911584 BLAKE2B 01bc915ea88c6a80608bb4f9c37ec75cd4abcc785b99d33eb9de3c32b65c884d47d6c7431d388e73699012b9edd6c44bdc051233726a4239f333e35eba35d72f SHA512 cb71b362ea0b78ba324cd0f9b7003f93936cc61fd22df4791d178f80d396aacf4f42f5d95209ec599f42548df47ea46b04f8baddb4bd78f7fb06e2681b57f3f8
 DIST xen-4.19.0.tar.gz 52011199 BLAKE2B bc6502bf5b68ab130f1d64e20e8a6d8ca656240545f0a4f5fe500413504c7610352bd7577f0e7e9d9354745afaf39d3edd3ad775718e20d14181dd2dca28ec0a SHA512 bc0b4257cab66b0f9d4a1fe72e07f4980398b2934989c02ffe488b465eca3443caa0ded903871480aba6e36212921f335b68d67f202f22548c31899225f2d657
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
 DIST xen-upstream-patches-4.18.3-pre-patchset-0.tar.bz2 51452 BLAKE2B 166d13eb16b5225fe5d8b96d9a7ba547b8d94b2989a15b641d53821e484d45bec8ed123180c8c7c5666da87f8a4368ad2a27284431561ae323453b4054c72d80 SHA512 bf434740567ac964babdc625c2cc13d9c2bcc79f8360f8f4dc8658fb191c60418a24cbea331d2a69fcadf4b30620f662e883695c379c87b4f8de17bfec51108c
+DIST xen-upstream-patches-4.18.4-pre-patchset-0.tar.bz2 30806 BLAKE2B 29654a8bbf5515ba51b278cc62222bc741ddab59976655e4b5df02fe75277d20686e4f4cda7a38997fab86a179fa511fc6c2b9c830080a4af80a24215c0e6e71 SHA512 b188c5111714eb1775ee7ad91ed443c03cdb6342c2e26ad5e2f4724f82220191695ecb0b616c8dc3956c07560d0d4056eb1cfdd1143a7b138c4a8669ac24c945
+DIST xen-upstream-patches-4.19.1-pre-patchset-0.tar.bz2 39681 BLAKE2B cdec8853ee6b7f6ccac332bd6dcb65294f282e14c6085d4a3c4f90fa6c96850acc5bd0e4cb27ef71d7145e6bdc780ba0223c6e2ba13bea77b9f3803f32954918 SHA512 7ecf5380211cebab5bed3276caa23d9b3fffa0dabfbcb46c1900e35883e8af21773a9c7bcc0a6b584ac3ba61e7cb49eed2bc5492e2571268929e59dde5856170

diff --git a/app-emulation/xen-tools/xen-tools-4.18.4_pre0.ebuild b/app-emulation/xen-tools/xen-tools-4.18.4_pre0.ebuild
new file mode 100644
index 000000000000..3d4030726084
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.18.4_pre0.ebuild
@@ -0,0 +1,525 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.18.3
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-build/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# disable header check (Bug #921932)
+	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
+		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.19.1_pre0.ebuild b/app-emulation/xen-tools/xen-tools-4.19.1_pre0.ebuild
new file mode 100644
index 000000000000..58bea1ca86bc
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.19.1_pre0.ebuild
@@ -0,0 +1,525 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.19.0
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-build/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# disable header check (Bug #921932)
+	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
+		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-10-14 17:50 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2024-10-14 17:50 UTC (permalink / raw
  To: gentoo-commits

commit:     f83ab9674474d33a36d4c39c21c0ee43535675c8
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 14 17:49:48 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 14 17:49:48 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f83ab967

app-emulation/xen-tools: Stabilize 4.18.4_pre0 x86, #941511

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.18.4_pre0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.18.4_pre0.ebuild b/app-emulation/xen-tools/xen-tools-4.18.4_pre0.ebuild
index 3d4030726084..ec9eb553884c 100644
--- a/app-emulation/xen-tools/xen-tools-4.18.4_pre0.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.18.4_pre0.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+	KEYWORDS="~amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-10-14 17:50 Sam James
  0 siblings, 0 replies; 295+ messages in thread
From: Sam James @ 2024-10-14 17:50 UTC (permalink / raw
  To: gentoo-commits

commit:     f45816fe1f7ad17098c6cd6f369abde75a7270d3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 14 17:49:50 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 14 17:49:50 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f45816fe

app-emulation/xen-tools: Stabilize 4.18.4_pre0 amd64, #941511

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.18.4_pre0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.18.4_pre0.ebuild b/app-emulation/xen-tools/xen-tools-4.18.4_pre0.ebuild
index ec9eb553884c..1ef6d3e68c50 100644
--- a/app-emulation/xen-tools/xen-tools-4.18.4_pre0.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.18.4_pre0.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-11-21 10:57 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-11-21 10:57 UTC (permalink / raw
  To: gentoo-commits

commit:     4535332f9f452fbe4685f7111bc525395c23ccca
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu Oct 17 14:53:57 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Nov 21 10:56:34 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4535332f

app-emulation/xen-tools: drop 4.17.4-r1, 4.19.1_pre0

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   1 -
 app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild | 524 --------------------
 .../xen-tools/xen-tools-4.19.1_pre0.ebuild         | 525 ---------------------
 3 files changed, 1050 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index cd1d4ef24257..06506471f42c 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -4,7 +4,6 @@ DIST brotli-f4153a09f87cbb9c826d8fc12c74642bb2d879ea.tar.gz 512229 BLAKE2B cd86c
 DIST edk2-b16284e2a0011489f6e16dfcc6af7623c3cbaf0b.tar.gz 15245558 BLAKE2B 33876c08040fa876b4e3741fe859d113654013c948fa8a8b391955226e6215bbbe26fc484e56ba5b399d2c4e4d198900f2de42eccfbac6901e01cd73a80e803b SHA512 7d71ec3d98c652b86194607dbcab767160c708991f49f69eda1f5d844ced0c4842e849d19bf99ea09b1db523b91ced1e5552a4ddcea32b94b9db6b8f6f5c5931
 DIST ipxe-git-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz 4074878 BLAKE2B d335d1e69bf736c53622e34e5ebeea77e294637f39bd5e2704f13b8e334b684130c259bd48b832050eebfabfc898f9786979a4c00903145fdb347a497b399f31 SHA512 e27644cbb030c43e2841058003bedea6deb979ba71591f967e01312527ed869bb863f9a03fc7b5a266752433d30164929ea1b935953a245600ad713c9fb25cb5
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
-DIST xen-4.17.4.tar.gz 46527369 BLAKE2B 2fcd1248d75157b6455727b29ecc3a4e5941eb187d645b35b6cf48a23fdfae11e810c55a1a7c0396c6a23dc977f22b8fd06ee9b91a1edc3a7ba8561023e07cfc SHA512 50dc2efd26e48131afdbc8efb1ca90154a84fe5fba5a6bc81d9801a3c13aebea91c8211872b5c69ce2773644f2c935c31cc56584a05b10b81e8728282d89eb84
 DIST xen-4.18.3.tar.gz 51911584 BLAKE2B 01bc915ea88c6a80608bb4f9c37ec75cd4abcc785b99d33eb9de3c32b65c884d47d6c7431d388e73699012b9edd6c44bdc051233726a4239f333e35eba35d72f SHA512 cb71b362ea0b78ba324cd0f9b7003f93936cc61fd22df4791d178f80d396aacf4f42f5d95209ec599f42548df47ea46b04f8baddb4bd78f7fb06e2681b57f3f8
 DIST xen-4.19.0.tar.gz 52011199 BLAKE2B bc6502bf5b68ab130f1d64e20e8a6d8ca656240545f0a4f5fe500413504c7610352bd7577f0e7e9d9354745afaf39d3edd3ad775718e20d14181dd2dca28ec0a SHA512 bc0b4257cab66b0f9d4a1fe72e07f4980398b2934989c02ffe488b465eca3443caa0ded903871480aba6e36212921f335b68d67f202f22548c31899225f2d657
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450

diff --git a/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild
deleted file mode 100644
index 4b88e126ae7a..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.17.4-r1.ebuild
+++ /dev/null
@@ -1,524 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=
-	XEN_PRE_VERSION_BASE=
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		>=media-gfx/fig2dev-3.2.9-r1
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Created at runtime
-	rm -rv "${ED}/var/run" || die
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.19.1_pre0.ebuild b/app-emulation/xen-tools/xen-tools-4.19.1_pre0.ebuild
deleted file mode 100644
index 58bea1ca86bc..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.19.1_pre0.ebuild
+++ /dev/null
@@ -1,525 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=4.19.0
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		>=media-gfx/fig2dev-3.2.9-r1
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# disable header check (Bug #921932)
-	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
-		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-11-21 10:57 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-11-21 10:57 UTC (permalink / raw
  To: gentoo-commits

commit:     e35ac7157a7d48b96c211ec8cc80b4879adef6ca
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu Oct 17 14:53:11 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Thu Nov 21 10:56:33 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e35ac715

app-emulation/xen-tools: drop gettext automagic

Closes: https://bugs.gentoo.org/937219
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 .../xen-tools/xen-tools-4.18.4_pre0-r1.ebuild      | 529 +++++++++++++++++++++
 .../xen-tools/xen-tools-4.19.1_pre0-r1.ebuild      | 529 +++++++++++++++++++++
 2 files changed, 1058 insertions(+)

diff --git a/app-emulation/xen-tools/xen-tools-4.18.4_pre0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.18.4_pre0-r1.ebuild
new file mode 100644
index 000000000000..9bb0a9a2cbd7
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.18.4_pre0-r1.ebuild
@@ -0,0 +1,529 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="amd64 ~arm ~arm64 x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.18.3
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-build/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable gettext (Bug #937219)
+	sed -e "s:\$\$source/configure:\0 --disable-gettext:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# disable header check (Bug #921932)
+	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
+		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.19.1_pre0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.19.1_pre0-r1.ebuild
new file mode 100644
index 000000000000..ab2e6bbf30a7
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.19.1_pre0-r1.ebuild
@@ -0,0 +1,529 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=0
+	XEN_PRE_VERSION_BASE=4.19.0
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-build/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable gettext (Bug #937219)
+	sed -e "s:\$\$source/configure:\0 --disable-gettext:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# disable header check (Bug #921932)
+	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
+		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-11-29 12:06 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-11-29 12:06 UTC (permalink / raw
  To: gentoo-commits

commit:     b5c035c8612add7d982fd29bc0ddd6ce39a547ec
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Nov 22 16:31:21 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Fri Nov 29 12:05:36 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5c035c8

app-emulation/xen-tools: add 4.18.4_pre1, 4.19.1_pre1

Bug: https://bugs.gentoo.org/944489
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   2 +
 .../xen-tools/xen-tools-4.18.4_pre1.ebuild         | 529 +++++++++++++++++++++
 .../xen-tools/xen-tools-4.19.1_pre1.ebuild         | 529 +++++++++++++++++++++
 3 files changed, 1060 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 06506471f42c..568c0392a4e9 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -8,4 +8,6 @@ DIST xen-4.18.3.tar.gz 51911584 BLAKE2B 01bc915ea88c6a80608bb4f9c37ec75cd4abcc78
 DIST xen-4.19.0.tar.gz 52011199 BLAKE2B bc6502bf5b68ab130f1d64e20e8a6d8ca656240545f0a4f5fe500413504c7610352bd7577f0e7e9d9354745afaf39d3edd3ad775718e20d14181dd2dca28ec0a SHA512 bc0b4257cab66b0f9d4a1fe72e07f4980398b2934989c02ffe488b465eca3443caa0ded903871480aba6e36212921f335b68d67f202f22548c31899225f2d657
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
 DIST xen-upstream-patches-4.18.4-pre-patchset-0.tar.bz2 30806 BLAKE2B 29654a8bbf5515ba51b278cc62222bc741ddab59976655e4b5df02fe75277d20686e4f4cda7a38997fab86a179fa511fc6c2b9c830080a4af80a24215c0e6e71 SHA512 b188c5111714eb1775ee7ad91ed443c03cdb6342c2e26ad5e2f4724f82220191695ecb0b616c8dc3956c07560d0d4056eb1cfdd1143a7b138c4a8669ac24c945
+DIST xen-upstream-patches-4.18.4-pre-patchset-1.tar.bz2 55216 BLAKE2B 9cc25750cc48db6efbc349278a89cfc3880326ad4556d5dad28a016bbf270435acff606d545420d44a3143ab1f540156c6997ad676d36b3ec3d5e85a63fb495c SHA512 3752998f804c7e1e5dc327a1a84dafbdac6c06eefa404766fc94089521d836a5fecd2f760e229200d4b6267af88f55b119505336be4d57e9fd74457b122f896f
 DIST xen-upstream-patches-4.19.1-pre-patchset-0.tar.bz2 39681 BLAKE2B cdec8853ee6b7f6ccac332bd6dcb65294f282e14c6085d4a3c4f90fa6c96850acc5bd0e4cb27ef71d7145e6bdc780ba0223c6e2ba13bea77b9f3803f32954918 SHA512 7ecf5380211cebab5bed3276caa23d9b3fffa0dabfbcb46c1900e35883e8af21773a9c7bcc0a6b584ac3ba61e7cb49eed2bc5492e2571268929e59dde5856170
+DIST xen-upstream-patches-4.19.1-pre-patchset-1.tar.bz2 77344 BLAKE2B 8f201a0aee7f0dda2d06f2a476de213d835b94e55ff0c5ddbcae539db49dc51993bf424a68fcc70e67469394590e6d2256107efd9cfc578c9a09f5c55750c828 SHA512 a8ebf31d5805d238298b77ff086270b7077f38786249237601eba716b62ad63b4b8f13158ed6c3ca126f78d7bf991a55ffce85fd8826d59061410a5bc24bb883

diff --git a/app-emulation/xen-tools/xen-tools-4.18.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.18.4_pre1.ebuild
new file mode 100644
index 000000000000..59abdfb47d72
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.18.4_pre1.ebuild
@@ -0,0 +1,529 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=1
+	XEN_PRE_VERSION_BASE=4.18.3
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-build/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable gettext (Bug #937219)
+	sed -e "s:\$\$source/configure:\0 --disable-gettext:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# disable header check (Bug #921932)
+	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
+		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}

diff --git a/app-emulation/xen-tools/xen-tools-4.19.1_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.19.1_pre1.ebuild
new file mode 100644
index 000000000000..51362e2df46d
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.19.1_pre1.ebuild
@@ -0,0 +1,529 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=1
+	XEN_PRE_VERSION_BASE=4.19.0
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-build/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable gettext (Bug #937219)
+	sed -e "s:\$\$source/configure:\0 --disable-gettext:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# disable header check (Bug #921932)
+	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
+		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-12-03 10:51 Joonas Niilola
  0 siblings, 0 replies; 295+ messages in thread
From: Joonas Niilola @ 2024-12-03 10:51 UTC (permalink / raw
  To: gentoo-commits

commit:     a35188a985705db53a194eda76f3c070c8d7ddcf
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  3 10:49:44 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Dec  3 10:49:44 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a35188a9

app-emulation/xen-tools: Stabilize 4.18.4_pre1 amd64, #945367

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-emulation/xen-tools/xen-tools-4.18.4_pre1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-emulation/xen-tools/xen-tools-4.18.4_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.18.4_pre1.ebuild
index c35afc556ce7..81da2098293f 100644
--- a/app-emulation/xen-tools/xen-tools-4.18.4_pre1.ebuild
+++ b/app-emulation/xen-tools/xen-tools-4.18.4_pre1.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == *9999 ]]; then
 	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
 	S="${WORKDIR}/${REPO}"
 else
-	KEYWORDS="~amd64 ~arm ~arm64 x86"
+	KEYWORDS="amd64 ~arm ~arm64 x86"
 
 	SEABIOS_VER="1.16.0"
 	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-12-07 13:51 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-12-07 13:51 UTC (permalink / raw
  To: gentoo-commits

commit:     2fea206379000044249798d62331228cb64adca7
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Dec  6 13:13:06 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sat Dec  7 13:49:26 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fea2063

app-emulation/xen-tools: add 4.19.1

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                |   1 +
 app-emulation/xen-tools/xen-tools-4.19.1.ebuild | 529 ++++++++++++++++++++++++
 2 files changed, 530 insertions(+)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index bd59c0212ace..8b003955e16b 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -6,6 +6,7 @@ DIST ipxe-git-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz 4074878 BLAKE2B d3
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
 DIST xen-4.18.3.tar.gz 51911584 BLAKE2B 01bc915ea88c6a80608bb4f9c37ec75cd4abcc785b99d33eb9de3c32b65c884d47d6c7431d388e73699012b9edd6c44bdc051233726a4239f333e35eba35d72f SHA512 cb71b362ea0b78ba324cd0f9b7003f93936cc61fd22df4791d178f80d396aacf4f42f5d95209ec599f42548df47ea46b04f8baddb4bd78f7fb06e2681b57f3f8
 DIST xen-4.19.0.tar.gz 52011199 BLAKE2B bc6502bf5b68ab130f1d64e20e8a6d8ca656240545f0a4f5fe500413504c7610352bd7577f0e7e9d9354745afaf39d3edd3ad775718e20d14181dd2dca28ec0a SHA512 bc0b4257cab66b0f9d4a1fe72e07f4980398b2934989c02ffe488b465eca3443caa0ded903871480aba6e36212921f335b68d67f202f22548c31899225f2d657
+DIST xen-4.19.1.tar.gz 51991715 BLAKE2B 1e16c15c98b0e02ee55129cde3f41b314a4eaaff9956f5fa6cea7d9391c51e103b7d62f647e628634ed63bc3ac41bb93a65ec4e26aa39fb2f174f9aef161cd90 SHA512 6971d07d4eafd40186f35cf6de235badbdf0e1640974693b8fbd415876c46634094178a6157e6dfdc16af885c70ff3b7a72be35a88dcc63daf36e6eb08f9b17b
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
 DIST xen-upstream-patches-4.18.4-pre-patchset-0.tar.bz2 30806 BLAKE2B 29654a8bbf5515ba51b278cc62222bc741ddab59976655e4b5df02fe75277d20686e4f4cda7a38997fab86a179fa511fc6c2b9c830080a4af80a24215c0e6e71 SHA512 b188c5111714eb1775ee7ad91ed443c03cdb6342c2e26ad5e2f4724f82220191695ecb0b616c8dc3956c07560d0d4056eb1cfdd1143a7b138c4a8669ac24c945
 DIST xen-upstream-patches-4.18.4-pre-patchset-1.tar.bz2 55216 BLAKE2B 9cc25750cc48db6efbc349278a89cfc3880326ad4556d5dad28a016bbf270435acff606d545420d44a3143ab1f540156c6997ad676d36b3ec3d5e85a63fb495c SHA512 3752998f804c7e1e5dc327a1a84dafbdac6c06eefa404766fc94089521d836a5fecd2f760e229200d4b6267af88f55b119505336be4d57e9fd74457b122f896f

diff --git a/app-emulation/xen-tools/xen-tools-4.19.1.ebuild b/app-emulation/xen-tools/xen-tools-4.19.1.ebuild
new file mode 100644
index 000000000000..34dff1b52cd3
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-4.19.1.ebuild
@@ -0,0 +1,529 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
+
+inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	REPO="xen.git"
+	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
+	S="${WORKDIR}/${REPO}"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+	SEABIOS_VER="1.16.0"
+	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
+	EDK2_OPENSSL_VERSION="1_1_1t"
+	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
+	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
+	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
+
+	XEN_GENTOO_PATCHSET_NUM=2
+	XEN_GENTOO_PATCHSET_BASE=4.17.0
+	XEN_PRE_PATCHSET_NUM=
+	XEN_PRE_VERSION_BASE=
+
+	XEN_BASE_PV="${PV}"
+	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
+		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
+	fi
+
+	SRC_URI="
+	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
+	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
+	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
+	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
+		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
+		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
+		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
+	)
+	"
+
+	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
+		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
+		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
+		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
+	fi
+	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
+		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
+		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
+		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
+		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
+	fi
+fi
+
+DESCRIPTION="Xen tools including QEMU and xl"
+HOMEPAGE="https://xenproject.org"
+DOCS=( README )
+
+S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
+# >=dev-lang/ocaml-4 stable
+# Masked in profiles/eapi-5-files instead
+IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
+
+REQUIRED_USE="
+	${PYTHON_REQUIRED_USE}
+	ipxe? ( rombios )
+	ovmf? ( hvm )
+	pygrub? ( python )
+	rombios? ( hvm )
+	system-ipxe? ( rombios )
+	?? ( ipxe system-ipxe )
+	?? ( qemu system-qemu )"
+
+COMMON_DEPEND="
+	lzma? ( app-arch/xz-utils )
+	qemu? (
+		dev-libs/glib:2
+		sys-libs/pam
+	)
+	zstd? ( app-arch/zstd )
+	app-arch/bzip2
+	app-arch/zstd
+	dev-libs/libnl:3
+	dev-libs/lzo:2
+	dev-libs/yajl
+	sys-apps/util-linux
+	sys-fs/e2fsprogs
+	sys-libs/ncurses
+	sys-libs/zlib
+	${PYTHON_DEPS}
+"
+
+RDEPEND="${COMMON_DEPEND}
+	sys-apps/iproute2[-minimal]
+	net-misc/bridge-utils
+	screen? (
+		app-misc/screen
+		app-admin/logrotate
+	)
+	selinux? ( sec-policy/selinux-xen )"
+
+DEPEND="${COMMON_DEPEND}
+	app-misc/pax-utils
+	>=sys-kernel/linux-headers-4.11
+	x11-libs/pixman
+	$(python_gen_cond_dep '
+		dev-python/lxml[${PYTHON_USEDEP}]
+	')
+	x86? ( sys-devel/dev86
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		sys-power/iasl )
+	api? ( dev-libs/libxml2
+		net-misc/curl )
+
+	ovmf? (
+		!arm? ( !arm64? ( dev-lang/nasm ) )
+		$(python_gen_impl_dep sqlite)
+		)
+	!amd64? ( >=sys-apps/dtc-1.4.0 )
+	amd64? ( sys-power/iasl
+		system-seabios? (
+			|| (
+				sys-firmware/seabios
+				sys-firmware/seabios-bin
+			)
+		)
+		system-ipxe? ( sys-firmware/ipxe[qemu] )
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	arm64? ( sys-power/iasl
+		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
+	doc? (
+		app-text/ghostscript-gpl
+		$(python_gen_cond_dep '
+			dev-python/markdown[${PYTHON_USEDEP}]
+		')
+		dev-texlive/texlive-latexextra
+		>=media-gfx/fig2dev-3.2.9-r1
+		virtual/pandoc
+	)
+	hvm? ( x11-base/xorg-proto )
+	qemu? (
+		app-arch/snappy:=
+		dev-build/meson
+		sdl? (
+			media-libs/libsdl[X]
+			media-libs/libsdl2[X]
+		)
+	)
+	system-qemu? ( app-emulation/qemu[xen] )
+	ocaml? ( dev-ml/findlib
+		dev-lang/ocaml[ocamlopt] )
+	python? ( >=dev-lang/swig-4.0.0 )"
+
+BDEPEND="dev-lang/perl
+	app-alternatives/yacc
+	sys-devel/gettext"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="
+	usr/libexec/xen/boot/hvmloader
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+QA_EXECSTACK="
+	usr/share/qemu-xen/qemu/hppa-firmware.img
+"
+
+QA_PREBUILT="
+	usr/libexec/xen/bin/elf2dmp
+	usr/libexec/xen/bin/ivshmem-client
+	usr/libexec/xen/bin/ivshmem-server
+	usr/libexec/xen/bin/qemu-edid
+	usr/libexec/xen/bin/qemu-img
+	usr/libexec/xen/bin/qemu-io
+	usr/libexec/xen/bin/qemu-keymap
+	usr/libexec/xen/bin/qemu-nbd
+	usr/libexec/xen/bin/qemu-pr-helper
+	usr/libexec/xen/bin/qemu-storage-daemon
+	usr/libexec/xen/bin/qemu-system-i386
+	usr/libexec/xen/bin/virtfs-proxy-helper
+	usr/libexec/xen/boot/ovmf.bin
+	usr/libexec/xen/boot/xen-shim
+	usr/libexec/xen/libexec/qemu-pr-helper
+	usr/libexec/xen/libexec/virtfs-proxy-helper
+	usr/libexec/xen/libexec/virtiofsd
+	usr/libexec/xen/libexec/xen-bridge-helper
+	usr/share/qemu-xen/qemu/s390-ccw.img
+	usr/share/qemu-xen/qemu/s390-netboot.img
+	usr/share/qemu-xen/qemu/u-boot.e500
+"
+
+RESTRICT="test"
+
+pkg_setup() {
+	python_setup
+	export "CONFIG_LOMOUNT=y"
+
+	#bug 522642, disable compile tools/tests
+	export "CONFIG_TESTS=n"
+
+	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+		if use x86 && use amd64; then
+			die "Confusion! Both x86 and amd64 are set in your use flags!"
+		elif use x86; then
+			export XEN_TARGET_ARCH="x86_32"
+		elif use amd64 ; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
+	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
+	pushd tools/firmware/ > /dev/null
+	ln -s seabios-dir-remote seabios-dir || die
+	popd > /dev/null
+
+	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
+		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
+	fi
+
+	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
+		eapply "${XEN_GENTOO_PATCHES_DIR}"
+	fi
+
+	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
+	# collisions with app-emulation/qemu.
+	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
+		tools/qemu-xen/include/net/net.h \
+		tools/qemu-xen/meson.build \
+		tools/qemu-xen/qemu-bridge-helper.c \
+		tools/qemu-xen/qemu-options.hx \
+		|| die
+	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
+
+	if use ovmf; then
+		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
+		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
+		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
+		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
+		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
+	fi
+
+	# ipxe
+	if use ipxe; then
+		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
+
+		# gcc 11
+		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
+		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
+	fi
+
+	# Fix texi2html build error with new texi2html, qemu.doc.html
+	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
+
+	# Drop .config, fixes to gcc-4.6
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	# drop flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+	unset CPPFLAGS
+
+	if ! use pygrub; then
+		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
+	fi
+
+	if ! use python; then
+		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
+	fi
+
+	if ! use hvm; then
+		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
+	# Bug 351648
+	elif ! use x86 && ! has x86 $(get_all_abis); then
+		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
+		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
+		export CPATH="${WORKDIR}"/extra-headers
+	fi
+
+	if use qemu; then
+		if use sdl; then
+			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
+				tools/Makefile || die
+		else
+			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
+				tools/qemu-xen-traditional/xen-setup || die
+			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
+				tools/Makefile || die
+		fi
+	else
+		# Don't bother with qemu, only needed for fully virtualised guests
+		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
+	fi
+
+	# Reset bash completion dir; Bug 472438
+	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
+		-i config/Paths.mk.in || die
+
+	# xencommons, Bug #492332, sed lighter weight than patching
+	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
+		-i tools/hotplug/Linux/init.d/xencommons.in || die
+
+	# fix bashishm
+	sed -e '/Usage/s/\$//g' \
+		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
+
+	# respect multilib, usr/lib/libcacard.so.0.0.0
+	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
+		-i tools/qemu-xen/configure || die
+
+	#bug 518136, don't build 32bit exactuable for nomultilib profile
+	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
+		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
+	fi
+
+	# uncomment lines in xl.conf
+	sed -e 's:^#autoballoon=:autoballoon=:' \
+		-e 's:^#lockfile=:lockfile=:' \
+		-e 's:^#vif.default.script=:vif.default.script=:' \
+		-i tools/examples/xl.conf  || die
+
+	# disable capstone (Bug #673474)
+	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
+		-i tools/Makefile || die
+
+	# disable glusterfs
+	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
+		-i tools/Makefile || die
+
+	# disable jpeg automagic
+	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
+		-i tools/Makefile || die
+
+	# disable png automagic
+	sed -e "s:\$\$source/configure:\0 --disable-png:" \
+		-i tools/Makefile || die
+
+	# disable docker (Bug #732970)
+	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
+		-i tools/Makefile || die
+
+	# disable gettext (Bug #937219)
+	sed -e "s:\$\$source/configure:\0 --disable-gettext:" \
+		-i tools/Makefile || die
+
+	# disable abi-dumper (Bug #791172)
+	sed -e 's/$(ABI_DUMPER) /echo /g' \
+		-i tools/libs/libs.mk || die
+
+	# disable header check (Bug #921932)
+	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
+		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
+
+	# Remove -Werror
+	find . -type f \( -name Makefile -o -name "*.mk" \) \
+		-exec sed -i \
+		-e 's/-Werror //g' \
+		-e '/^CFLAGS *+= -Werror$/d' \
+		-e 's/, "-Werror"//' \
+		{} + || die
+
+	default
+}
+
+src_configure() {
+	local myconf=(
+		--libdir="${EPREFIX}/usr/$(get_libdir)"
+		--libexecdir="${EPREFIX}/usr/libexec"
+		--localstatedir="${EPREFIX}/var"
+		--disable-golang
+		--disable-pvshim
+		--disable-werror
+		--disable-xen
+		--enable-tools
+		--enable-docs
+		$(use_enable api xenapi)
+		$(use_enable ipxe)
+		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
+		$(use_enable ocaml ocamltools)
+		$(use_enable ovmf)
+		$(use_enable rombios)
+		$(use_enable systemd)
+		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
+	)
+
+	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
+	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
+	use amd64 && myconf+=( $(use_enable qemu-traditional) )
+	tc-ld-disable-gold # Bug 669570
+	econf ${myconf[@]}
+}
+
+src_compile() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
+
+	if test-flag-CC -fno-strict-overflow; then
+		append-flags -fno-strict-overflow
+	fi
+
+	# bug #845099
+	if use ipxe; then
+		local -x NO_WERROR=1
+	fi
+
+	emake \
+		HOSTCC="$(tc-getBUILD_CC)" \
+		HOSTCXX="$(tc-getBUILD_CXX)" \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		LD="$(tc-getLD)" \
+		AR="$(tc-getAR)" \
+		OBJDUMP="$(tc-getOBJDUMP)" \
+		RANLIB="$(tc-getRANLIB)" \
+		build-tools ${myopt}
+
+	if use doc; then
+		emake -C docs build
+	else
+		emake -C docs man-pages
+	fi
+}
+
+src_install() {
+	# Override auto-detection in the build system, bug #382573
+	export INITD_DIR=/tmp/init.d
+	export CONFIG_LEAF_DIR=../tmp/default
+
+	# Let the build system compile installed Python modules.
+	local PYTHONDONTWRITEBYTECODE
+	export PYTHONDONTWRITEBYTECODE
+
+	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
+		XEN_PYTHON_NATIVE_INSTALL=y install-tools
+
+	# Fix the remaining Python shebangs.
+	python_fix_shebang "${D}"
+
+	# Remove RedHat-specific stuff
+	rm -rf "${D}"/tmp || die
+
+	if use doc; then
+		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
+		dodoc -r docs/{pdf,txt}
+	else
+		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
+	fi
+	dodoc ${DOCS[@]}
+
+	newconfd "${FILESDIR}"/xendomains.confd xendomains
+	newconfd "${FILESDIR}"/xenstored.confd xenstored
+	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
+	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
+	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
+	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
+	newinitd "${FILESDIR}"/xencommons.initd xencommons
+	newconfd "${FILESDIR}"/xencommons.confd xencommons
+	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
+	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
+	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
+
+	if use screen; then
+		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
+		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
+		keepdir /var/log/xen-consoles
+	fi
+
+	# For -static-libs wrt Bug 384355
+	if ! use static-libs; then
+		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
+	fi
+
+	# for xendomains
+	keepdir /etc/xen/auto
+
+	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
+	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
+		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
+
+	keepdir /var/lib/xen/dump
+	keepdir /var/lib/xen/xenpaging
+	keepdir /var/lib/xenstored
+	keepdir /var/log/xen
+
+	if use python; then
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
+		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
+	fi
+
+	python_optimize
+
+	readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/
@ 2024-12-07 13:51 Florian Schmaus
  0 siblings, 0 replies; 295+ messages in thread
From: Florian Schmaus @ 2024-12-07 13:51 UTC (permalink / raw
  To: gentoo-commits

commit:     3fc03502dd7aa48e87246d5c0eb4b465ab5cbddd
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Dec  6 13:14:18 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sat Dec  7 13:49:28 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fc03502

app-emulation/xen-tools: drop 4.18.4_pre0-r1, 4.19.1_pre1

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/39611
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen-tools/Manifest                   |   3 -
 .../xen-tools/xen-tools-4.18.4_pre0-r1.ebuild      | 529 ---------------------
 .../xen-tools/xen-tools-4.19.1_pre1.ebuild         | 529 ---------------------
 3 files changed, 1061 deletions(-)

diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
index 8b003955e16b..89c7e1cfaae0 100644
--- a/app-emulation/xen-tools/Manifest
+++ b/app-emulation/xen-tools/Manifest
@@ -5,9 +5,6 @@ DIST edk2-b16284e2a0011489f6e16dfcc6af7623c3cbaf0b.tar.gz 15245558 BLAKE2B 33876
 DIST ipxe-git-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz 4074878 BLAKE2B d335d1e69bf736c53622e34e5ebeea77e294637f39bd5e2704f13b8e334b684130c259bd48b832050eebfabfc898f9786979a4c00903145fdb347a497b399f31 SHA512 e27644cbb030c43e2841058003bedea6deb979ba71591f967e01312527ed869bb863f9a03fc7b5a266752433d30164929ea1b935953a245600ad713c9fb25cb5
 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
 DIST xen-4.18.3.tar.gz 51911584 BLAKE2B 01bc915ea88c6a80608bb4f9c37ec75cd4abcc785b99d33eb9de3c32b65c884d47d6c7431d388e73699012b9edd6c44bdc051233726a4239f333e35eba35d72f SHA512 cb71b362ea0b78ba324cd0f9b7003f93936cc61fd22df4791d178f80d396aacf4f42f5d95209ec599f42548df47ea46b04f8baddb4bd78f7fb06e2681b57f3f8
-DIST xen-4.19.0.tar.gz 52011199 BLAKE2B bc6502bf5b68ab130f1d64e20e8a6d8ca656240545f0a4f5fe500413504c7610352bd7577f0e7e9d9354745afaf39d3edd3ad775718e20d14181dd2dca28ec0a SHA512 bc0b4257cab66b0f9d4a1fe72e07f4980398b2934989c02ffe488b465eca3443caa0ded903871480aba6e36212921f335b68d67f202f22548c31899225f2d657
 DIST xen-4.19.1.tar.gz 51991715 BLAKE2B 1e16c15c98b0e02ee55129cde3f41b314a4eaaff9956f5fa6cea7d9391c51e103b7d62f647e628634ed63bc3ac41bb93a65ec4e26aa39fb2f174f9aef161cd90 SHA512 6971d07d4eafd40186f35cf6de235badbdf0e1640974693b8fbd415876c46634094178a6157e6dfdc16af885c70ff3b7a72be35a88dcc63daf36e6eb08f9b17b
 DIST xen-gentoo-patches-4.17.0-gentoo-patchset-2.tar.bz2 4001 BLAKE2B 7afce426759952e202a1dd819fe0a23108072bf9552ba14a0bd787a96ffe5e7a36f37e03dad8db9c46f5731acbc122c258eef6d517816aad9c8db1ca64700d19 SHA512 bcb1479f9ff5e194a4e452da9d0479febc2bcd465b4be69bb8f30e2e6b858fb77a71216dcb3e74dfb65e7ca6513742c294cd6b5eaa5ce82d0b122a00f1cbc450
-DIST xen-upstream-patches-4.18.4-pre-patchset-0.tar.bz2 30806 BLAKE2B 29654a8bbf5515ba51b278cc62222bc741ddab59976655e4b5df02fe75277d20686e4f4cda7a38997fab86a179fa511fc6c2b9c830080a4af80a24215c0e6e71 SHA512 b188c5111714eb1775ee7ad91ed443c03cdb6342c2e26ad5e2f4724f82220191695ecb0b616c8dc3956c07560d0d4056eb1cfdd1143a7b138c4a8669ac24c945
 DIST xen-upstream-patches-4.18.4-pre-patchset-1.tar.bz2 55216 BLAKE2B 9cc25750cc48db6efbc349278a89cfc3880326ad4556d5dad28a016bbf270435acff606d545420d44a3143ab1f540156c6997ad676d36b3ec3d5e85a63fb495c SHA512 3752998f804c7e1e5dc327a1a84dafbdac6c06eefa404766fc94089521d836a5fecd2f760e229200d4b6267af88f55b119505336be4d57e9fd74457b122f896f
-DIST xen-upstream-patches-4.19.1-pre-patchset-1.tar.bz2 77344 BLAKE2B 8f201a0aee7f0dda2d06f2a476de213d835b94e55ff0c5ddbcae539db49dc51993bf424a68fcc70e67469394590e6d2256107efd9cfc578c9a09f5c55750c828 SHA512 a8ebf31d5805d238298b77ff086270b7077f38786249237601eba716b62ad63b4b8f13158ed6c3ca126f78d7bf991a55ffce85fd8826d59061410a5bc24bb883

diff --git a/app-emulation/xen-tools/xen-tools-4.18.4_pre0-r1.ebuild b/app-emulation/xen-tools/xen-tools-4.18.4_pre0-r1.ebuild
deleted file mode 100644
index 9bb0a9a2cbd7..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.18.4_pre0-r1.ebuild
+++ /dev/null
@@ -1,529 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="amd64 ~arm ~arm64 x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=0
-	XEN_PRE_VERSION_BASE=4.18.3
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		>=media-gfx/fig2dev-3.2.9-r1
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable gettext (Bug #937219)
-	sed -e "s:\$\$source/configure:\0 --disable-gettext:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# disable header check (Bug #921932)
-	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
-		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}

diff --git a/app-emulation/xen-tools/xen-tools-4.19.1_pre1.ebuild b/app-emulation/xen-tools/xen-tools-4.19.1_pre1.ebuild
deleted file mode 100644
index 51362e2df46d..000000000000
--- a/app-emulation/xen-tools/xen-tools-4.19.1_pre1.ebuild
+++ /dev/null
@@ -1,529 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-PYTHON_REQ_USE='ncurses,xml(+),threads(+)'
-
-inherit bash-completion-r1 flag-o-matic multilib python-single-r1 readme.gentoo-r1 toolchain-funcs
-
-if [[ ${PV} == *9999 ]]; then
-	inherit git-r3
-	REPO="xen.git"
-	EGIT_REPO_URI="https://xenbits.xen.org/git-http/${REPO}"
-	S="${WORKDIR}/${REPO}"
-else
-	KEYWORDS="~amd64 ~arm ~arm64 ~x86"
-
-	SEABIOS_VER="1.16.0"
-	EDK2_COMMIT="b16284e2a0011489f6e16dfcc6af7623c3cbaf0b"
-	EDK2_OPENSSL_VERSION="1_1_1t"
-	EDK2_SOFTFLOAT_COMMIT="b64af41c3276f97f0e181920400ee056b9c88037"
-	EDK2_BROTLI_COMMIT="f4153a09f87cbb9c826d8fc12c74642bb2d879ea"
-	IPXE_COMMIT="1d1cf74a5e58811822bee4b3da3cff7282fcdfca"
-
-	XEN_GENTOO_PATCHSET_NUM=2
-	XEN_GENTOO_PATCHSET_BASE=4.17.0
-	XEN_PRE_PATCHSET_NUM=1
-	XEN_PRE_VERSION_BASE=4.19.0
-
-	XEN_BASE_PV="${PV}"
-	if [[ -n "${XEN_PRE_VERSION_BASE}" ]]; then
-		XEN_BASE_PV="${XEN_PRE_VERSION_BASE}"
-	fi
-
-	SRC_URI="
-	https://downloads.xenproject.org/release/xen/${XEN_BASE_PV}/xen-${XEN_BASE_PV}.tar.gz
-	https://www.seabios.org/downloads/seabios-${SEABIOS_VER}.tar.gz
-	ipxe? ( https://xenbits.xen.org/xen-extfiles/ipxe-git-${IPXE_COMMIT}.tar.gz )
-	ovmf? ( https://github.com/tianocore/edk2/archive/${EDK2_COMMIT}.tar.gz -> edk2-${EDK2_COMMIT}.tar.gz
-		https://github.com/openssl/openssl/archive/OpenSSL_${EDK2_OPENSSL_VERSION}.tar.gz
-		https://github.com/ucb-bar/berkeley-softfloat-3/archive/${EDK2_SOFTFLOAT_COMMIT}.tar.gz -> berkeley-softfloat-${EDK2_SOFTFLOAT_COMMIT}.tar.gz
-		https://github.com/google/brotli/archive/${EDK2_BROTLI_COMMIT}.tar.gz -> brotli-${EDK2_BROTLI_COMMIT}.tar.gz
-	)
-	"
-
-	if [[ -n "${XEN_PRE_PATCHSET_NUM}" ]]; then
-		XEN_UPSTREAM_PATCHES_TAG="$(ver_cut 1-3)-pre-patchset-${XEN_PRE_PATCHSET_NUM}"
-		XEN_UPSTREAM_PATCHES_NAME="xen-upstream-patches-${XEN_UPSTREAM_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-upstream-patches.git/snapshot/${XEN_UPSTREAM_PATCHES_NAME}.tar.bz2"
-		XEN_UPSTREAM_PATCHES_DIR="${WORKDIR}/${XEN_UPSTREAM_PATCHES_NAME}"
-	fi
-	if [[ -n "${XEN_GENTOO_PATCHSET_NUM}" ]]; then
-		XEN_GENTOO_PATCHES_TAG="$(ver_cut 1-3 ${XEN_GENTOO_PATCHSET_BASE})-gentoo-patchset-${XEN_GENTOO_PATCHSET_NUM}"
-		XEN_GENTOO_PATCHES_NAME="xen-gentoo-patches-${XEN_GENTOO_PATCHES_TAG}"
-		SRC_URI+=" https://gitweb.gentoo.org/proj/xen-gentoo-patches.git/snapshot/${XEN_GENTOO_PATCHES_NAME}.tar.bz2"
-		XEN_GENTOO_PATCHES_DIR="${WORKDIR}/${XEN_GENTOO_PATCHES_NAME}"
-	fi
-fi
-
-DESCRIPTION="Xen tools including QEMU and xl"
-HOMEPAGE="https://xenproject.org"
-DOCS=( README )
-
-S="${WORKDIR}/xen-$(ver_cut 1-3 ${XEN_BASE_PV})"
-
-LICENSE="GPL-2"
-SLOT="0/$(ver_cut 1-2)"
-# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
-# >=dev-lang/ocaml-4 stable
-# Masked in profiles/eapi-5-files instead
-IUSE="api debug doc +hvm +ipxe lzma ocaml ovmf pygrub python +qemu +qemu-traditional +rombios screen selinux sdl static-libs system-ipxe system-qemu system-seabios systemd zstd"
-
-REQUIRED_USE="
-	${PYTHON_REQUIRED_USE}
-	ipxe? ( rombios )
-	ovmf? ( hvm )
-	pygrub? ( python )
-	rombios? ( hvm )
-	system-ipxe? ( rombios )
-	?? ( ipxe system-ipxe )
-	?? ( qemu system-qemu )"
-
-COMMON_DEPEND="
-	lzma? ( app-arch/xz-utils )
-	qemu? (
-		dev-libs/glib:2
-		sys-libs/pam
-	)
-	zstd? ( app-arch/zstd )
-	app-arch/bzip2
-	app-arch/zstd
-	dev-libs/libnl:3
-	dev-libs/lzo:2
-	dev-libs/yajl
-	sys-apps/util-linux
-	sys-fs/e2fsprogs
-	sys-libs/ncurses
-	sys-libs/zlib
-	${PYTHON_DEPS}
-"
-
-RDEPEND="${COMMON_DEPEND}
-	sys-apps/iproute2[-minimal]
-	net-misc/bridge-utils
-	screen? (
-		app-misc/screen
-		app-admin/logrotate
-	)
-	selinux? ( sec-policy/selinux-xen )"
-
-DEPEND="${COMMON_DEPEND}
-	app-misc/pax-utils
-	>=sys-kernel/linux-headers-4.11
-	x11-libs/pixman
-	$(python_gen_cond_dep '
-		dev-python/lxml[${PYTHON_USEDEP}]
-	')
-	x86? ( sys-devel/dev86
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		sys-power/iasl )
-	api? ( dev-libs/libxml2
-		net-misc/curl )
-
-	ovmf? (
-		!arm? ( !arm64? ( dev-lang/nasm ) )
-		$(python_gen_impl_dep sqlite)
-		)
-	!amd64? ( >=sys-apps/dtc-1.4.0 )
-	amd64? ( sys-power/iasl
-		system-seabios? (
-			|| (
-				sys-firmware/seabios
-				sys-firmware/seabios-bin
-			)
-		)
-		system-ipxe? ( sys-firmware/ipxe[qemu] )
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	arm64? ( sys-power/iasl
-		rombios? ( sys-devel/bin86 sys-devel/dev86 ) )
-	doc? (
-		app-text/ghostscript-gpl
-		$(python_gen_cond_dep '
-			dev-python/markdown[${PYTHON_USEDEP}]
-		')
-		dev-texlive/texlive-latexextra
-		>=media-gfx/fig2dev-3.2.9-r1
-		virtual/pandoc
-	)
-	hvm? ( x11-base/xorg-proto )
-	qemu? (
-		app-arch/snappy:=
-		dev-build/meson
-		sdl? (
-			media-libs/libsdl[X]
-			media-libs/libsdl2[X]
-		)
-	)
-	system-qemu? ( app-emulation/qemu[xen] )
-	ocaml? ( dev-ml/findlib
-		dev-lang/ocaml[ocamlopt] )
-	python? ( >=dev-lang/swig-4.0.0 )"
-
-BDEPEND="dev-lang/perl
-	app-alternatives/yacc
-	sys-devel/gettext"
-
-# hvmloader is used to bootstrap a fully virtualized kernel
-# Approved by QA team in bug #144032
-QA_WX_LOAD="
-	usr/libexec/xen/boot/hvmloader
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-	usr/share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.elf
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-QA_EXECSTACK="
-	usr/share/qemu-xen/qemu/hppa-firmware.img
-"
-
-QA_PREBUILT="
-	usr/libexec/xen/bin/elf2dmp
-	usr/libexec/xen/bin/ivshmem-client
-	usr/libexec/xen/bin/ivshmem-server
-	usr/libexec/xen/bin/qemu-edid
-	usr/libexec/xen/bin/qemu-img
-	usr/libexec/xen/bin/qemu-io
-	usr/libexec/xen/bin/qemu-keymap
-	usr/libexec/xen/bin/qemu-nbd
-	usr/libexec/xen/bin/qemu-pr-helper
-	usr/libexec/xen/bin/qemu-storage-daemon
-	usr/libexec/xen/bin/qemu-system-i386
-	usr/libexec/xen/bin/virtfs-proxy-helper
-	usr/libexec/xen/boot/ovmf.bin
-	usr/libexec/xen/boot/xen-shim
-	usr/libexec/xen/libexec/qemu-pr-helper
-	usr/libexec/xen/libexec/virtfs-proxy-helper
-	usr/libexec/xen/libexec/virtiofsd
-	usr/libexec/xen/libexec/xen-bridge-helper
-	usr/share/qemu-xen/qemu/s390-ccw.img
-	usr/share/qemu-xen/qemu/s390-netboot.img
-	usr/share/qemu-xen/qemu/u-boot.e500
-"
-
-RESTRICT="test"
-
-pkg_setup() {
-	python_setup
-	export "CONFIG_LOMOUNT=y"
-
-	#bug 522642, disable compile tools/tests
-	export "CONFIG_TESTS=n"
-
-	if [[ -z ${XEN_TARGET_ARCH} ]] ; then
-		if use x86 && use amd64; then
-			die "Confusion! Both x86 and amd64 are set in your use flags!"
-		elif use x86; then
-			export XEN_TARGET_ARCH="x86_32"
-		elif use amd64 ; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-}
-
-src_prepare() {
-	# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
-	mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
-	pushd tools/firmware/ > /dev/null
-	ln -s seabios-dir-remote seabios-dir || die
-	popd > /dev/null
-
-	if [[ -v XEN_UPSTREAM_PATCHES_DIR ]]; then
-		eapply "${XEN_UPSTREAM_PATCHES_DIR}"
-	fi
-
-	if [[ -v XEN_GENTOO_PATCHES_DIR ]]; then
-		eapply "${XEN_GENTOO_PATCHES_DIR}"
-	fi
-
-	# Rename qemu-bridge-helper to xen-bridge-helper to avoid file
-	# collisions with app-emulation/qemu.
-	sed -i 's/qemu-bridge-helper/xen-bridge-helper/g' \
-		tools/qemu-xen/include/net/net.h \
-		tools/qemu-xen/meson.build \
-		tools/qemu-xen/qemu-bridge-helper.c \
-		tools/qemu-xen/qemu-options.hx \
-		|| die
-	mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
-
-	if use ovmf; then
-		mv ../edk2-${EDK2_COMMIT} tools/firmware/ovmf-dir-remote || die
-		rm -r tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		rm -r tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		rm -r tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		rm -r tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		mv ../openssl-OpenSSL_${EDK2_OPENSSL_VERSION} tools/firmware/ovmf-dir-remote/CryptoPkg/Library/OpensslLib/openssl || die
-		mv ../berkeley-softfloat-3-${EDK2_SOFTFLOAT_COMMIT} tools/firmware/ovmf-dir-remote/ArmPkg/Library/ArmSoftFloatLib/berkeley-softfloat-3 || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/BaseTools/Source/C/BrotliCompress/brotli || die
-		cp -r ../brotli-${EDK2_BROTLI_COMMIT} tools/firmware/ovmf-dir-remote/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli || die
-		cp tools/firmware/ovmf-makefile tools/firmware/ovmf-dir-remote/Makefile || die
-	fi
-
-	# ipxe
-	if use ipxe; then
-		cp "${DISTDIR}/ipxe-git-${IPXE_COMMIT}.tar.gz" tools/firmware/etherboot/ipxe.tar.gz || die
-
-		# gcc 11
-		cp "${XEN_GENTOO_PATCHES_DIR}/ipxe/${PN}-4.15.0-ipxe-gcc11.patch" tools/firmware/etherboot/patches/ipxe-gcc11.patch || die
-		echo ipxe-gcc11.patch >> tools/firmware/etherboot/patches/series || die
-	fi
-
-	# Fix texi2html build error with new texi2html, qemu.doc.html
-	sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
-
-	# Drop .config, fixes to gcc-4.6
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	# drop flags
-	unset CFLAGS
-	unset LDFLAGS
-	unset ASFLAGS
-	unset CPPFLAGS
-
-	if ! use pygrub; then
-		sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
-	fi
-
-	if ! use python; then
-		sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
-	fi
-
-	if ! use hvm; then
-		sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
-	# Bug 351648
-	elif ! use x86 && ! has x86 $(get_all_abis); then
-		mkdir -p "${WORKDIR}"/extra-headers/gnu || die
-		touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
-		export CPATH="${WORKDIR}"/extra-headers
-	fi
-
-	if use qemu; then
-		if use sdl; then
-			sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
-				tools/Makefile || die
-		else
-			sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
-				tools/qemu-xen-traditional/xen-setup || die
-			sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
-				tools/Makefile || die
-		fi
-	else
-		# Don't bother with qemu, only needed for fully virtualised guests
-		sed -i '/SUBDIRS-$(CONFIG_QEMU_XEN)/s/^/#/g' tools/Makefile || die
-	fi
-
-	# Reset bash completion dir; Bug 472438
-	sed -e "s;^BASH_COMPLETION_DIR      :=.*;BASH_COMPLETION_DIR := $(get_bashcompdir);" \
-		-i config/Paths.mk.in || die
-
-	# xencommons, Bug #492332, sed lighter weight than patching
-	sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-		-i tools/hotplug/Linux/init.d/xencommons.in || die
-
-	# fix bashishm
-	sed -e '/Usage/s/\$//g' \
-		-i tools/hotplug/Linux/init.d/xendriverdomain.in || die
-
-	# respect multilib, usr/lib/libcacard.so.0.0.0
-	sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-		-i tools/qemu-xen/configure || die
-
-	#bug 518136, don't build 32bit exactuable for nomultilib profile
-	if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
-		sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
-	fi
-
-	# uncomment lines in xl.conf
-	sed -e 's:^#autoballoon=:autoballoon=:' \
-		-e 's:^#lockfile=:lockfile=:' \
-		-e 's:^#vif.default.script=:vif.default.script=:' \
-		-i tools/examples/xl.conf  || die
-
-	# disable capstone (Bug #673474)
-	sed -e "s:\$\$source/configure:\0 --disable-capstone:" \
-		-i tools/Makefile || die
-
-	# disable glusterfs
-	sed -e "s:\$\$source/configure:\0 --disable-glusterfs:" \
-		-i tools/Makefile || die
-
-	# disable jpeg automagic
-	sed -e "s:\$\$source/configure:\0 --disable-vnc-jpeg:" \
-		-i tools/Makefile || die
-
-	# disable png automagic
-	sed -e "s:\$\$source/configure:\0 --disable-png:" \
-		-i tools/Makefile || die
-
-	# disable docker (Bug #732970)
-	sed -e "s:\$\$source/configure:\0 --disable-containers:" \
-		-i tools/Makefile || die
-
-	# disable gettext (Bug #937219)
-	sed -e "s:\$\$source/configure:\0 --disable-gettext:" \
-		-i tools/Makefile || die
-
-	# disable abi-dumper (Bug #791172)
-	sed -e 's/$(ABI_DUMPER) /echo /g' \
-		-i tools/libs/libs.mk || die
-
-	# disable header check (Bug #921932)
-	sed -e '/__XEN_INTERFACE_VERSION__/,+2d' \
-		-i tools/qemu-xen/include/hw/xen/xen_native.h || die
-
-	# Remove -Werror
-	find . -type f \( -name Makefile -o -name "*.mk" \) \
-		-exec sed -i \
-		-e 's/-Werror //g' \
-		-e '/^CFLAGS *+= -Werror$/d' \
-		-e 's/, "-Werror"//' \
-		{} + || die
-
-	default
-}
-
-src_configure() {
-	local myconf=(
-		--libdir="${EPREFIX}/usr/$(get_libdir)"
-		--libexecdir="${EPREFIX}/usr/libexec"
-		--localstatedir="${EPREFIX}/var"
-		--disable-golang
-		--disable-pvshim
-		--disable-werror
-		--disable-xen
-		--enable-tools
-		--enable-docs
-		$(use_enable api xenapi)
-		$(use_enable ipxe)
-		$(usex system-ipxe '--with-system-ipxe=/usr/share/ipxe' '')
-		$(use_enable ocaml ocamltools)
-		$(use_enable ovmf)
-		$(use_enable rombios)
-		$(use_enable systemd)
-		--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored')
-	)
-
-	use system-seabios && myconf+=( --with-system-seabios=/usr/share/seabios/bios.bin )
-	use system-qemu && myconf+=( --with-system-qemu=/usr/bin/qemu-system-x86_64 )
-	use amd64 && myconf+=( $(use_enable qemu-traditional) )
-	tc-ld-disable-gold # Bug 669570
-	econf ${myconf[@]}
-}
-
-src_compile() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-	use python && myopt="${myopt} XENSTAT_PYTHON_BINDINGS=y"
-
-	if test-flag-CC -fno-strict-overflow; then
-		append-flags -fno-strict-overflow
-	fi
-
-	# bug #845099
-	if use ipxe; then
-		local -x NO_WERROR=1
-	fi
-
-	emake \
-		HOSTCC="$(tc-getBUILD_CC)" \
-		HOSTCXX="$(tc-getBUILD_CXX)" \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		LD="$(tc-getLD)" \
-		AR="$(tc-getAR)" \
-		OBJDUMP="$(tc-getOBJDUMP)" \
-		RANLIB="$(tc-getRANLIB)" \
-		build-tools ${myopt}
-
-	if use doc; then
-		emake -C docs build
-	else
-		emake -C docs man-pages
-	fi
-}
-
-src_install() {
-	# Override auto-detection in the build system, bug #382573
-	export INITD_DIR=/tmp/init.d
-	export CONFIG_LEAF_DIR=../tmp/default
-
-	# Let the build system compile installed Python modules.
-	local PYTHONDONTWRITEBYTECODE
-	export PYTHONDONTWRITEBYTECODE
-
-	emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
-		XEN_PYTHON_NATIVE_INSTALL=y install-tools
-
-	# Fix the remaining Python shebangs.
-	python_fix_shebang "${D}"
-
-	# Remove RedHat-specific stuff
-	rm -rf "${D}"/tmp || die
-
-	if use doc; then
-		emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
-		dodoc -r docs/{pdf,txt}
-	else
-		emake -C docs DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-man-pages # Bug 668032
-	fi
-	dodoc ${DOCS[@]}
-
-	newconfd "${FILESDIR}"/xendomains.confd xendomains
-	newconfd "${FILESDIR}"/xenstored.confd xenstored
-	newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
-	newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
-	newinitd "${FILESDIR}"/xenstored.initd-r1 xenstored
-	newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
-	newinitd "${FILESDIR}"/xencommons.initd xencommons
-	newconfd "${FILESDIR}"/xencommons.confd xencommons
-	newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
-	newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
-	newinitd "${FILESDIR}"/xen-watchdog.initd xen-watchdog
-
-	if use screen; then
-		cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
-		cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
-		keepdir /var/log/xen-consoles
-	fi
-
-	# For -static-libs wrt Bug 384355
-	if ! use static-libs; then
-		rm -f "${D}"/usr/$(get_libdir)/*.a "${D}"/usr/$(get_libdir)/ocaml/*/*.a
-	fi
-
-	# for xendomains
-	keepdir /etc/xen/auto
-
-	# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
-	find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-		-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
-
-	keepdir /var/lib/xen/dump
-	keepdir /var/lib/xen/xenpaging
-	keepdir /var/lib/xenstored
-	keepdir /var/log/xen
-
-	if use python; then
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/xenstat.py"
-		python_domodule "${S}/tools/libs/stat/bindings/swig/python/_xenstat.so"
-	fi
-
-	python_optimize
-
-	readme.gentoo_create_doc
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-}


^ permalink raw reply related	[flat|nested] 295+ messages in thread

end of thread, other threads:[~2024-12-07 13:51 UTC | newest]

Thread overview: 295+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-06 18:55 [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-tools/ Florian Schmaus
  -- strict thread matches above, loose matches on Subject: below --
2024-12-07 13:51 Florian Schmaus
2024-12-07 13:51 Florian Schmaus
2024-12-03 10:51 Joonas Niilola
2024-11-29 12:06 Florian Schmaus
2024-11-21 10:57 Florian Schmaus
2024-11-21 10:57 Florian Schmaus
2024-10-14 17:50 Sam James
2024-10-14 17:50 Sam James
2024-10-14  7:16 Florian Schmaus
2024-10-14  7:16 Florian Schmaus
2024-08-02  8:02 Florian Schmaus
2024-08-02  8:02 Florian Schmaus
2024-06-12 19:48 Sam James
2024-06-04 18:23 Arthur Zamarin
2024-05-29  8:32 Florian Schmaus
2024-05-29  8:32 Florian Schmaus
2024-04-11  3:38 Joonas Niilola
2024-04-11  3:35 Joonas Niilola
2024-04-10  6:43 Florian Schmaus
2024-04-10  6:43 Florian Schmaus
2024-04-06  6:05 Joonas Niilola
2024-04-06  5:58 Joonas Niilola
2024-04-05 15:59 Florian Schmaus
2024-04-05 15:59 Florian Schmaus
2024-03-28 17:18 Sam James
2024-03-28 16:44 Sam James
2024-03-28 11:21 Florian Schmaus
2024-03-28 11:21 Florian Schmaus
2024-01-13 20:46 Conrad Kostecki
2024-01-13 20:45 Sam James
2024-01-13 18:34 Sam James
2024-01-09  8:53 Florian Schmaus
2023-12-16  9:28 Joonas Niilola
2023-12-16  8:06 Joonas Niilola
2023-11-13  7:34 Sam James
2023-10-25 18:47 Florian Schmaus
2023-10-20 16:54 Sam James
2023-10-20 16:54 Sam James
2023-10-19  8:22 Florian Schmaus
2023-10-19  8:22 Florian Schmaus
2023-09-09 18:01 Arthur Zamarin
2023-09-05 10:01 Sam James
2023-09-05 10:01 Sam James
2023-09-03  9:40 Florian Schmaus
2023-09-03  9:40 Florian Schmaus
2023-06-08 22:35 Sam James
2023-05-16  9:30 Florian Schmaus
2023-05-16  7:33 Florian Schmaus
2023-05-01 17:14 Sam James
2023-04-19  6:07 Sam James
2023-04-17 20:13 Sam James
2023-04-17 20:13 Sam James
2023-04-17  8:32 Florian Schmaus
2023-04-17  8:32 Florian Schmaus
2023-02-11  2:36 Sam James
2023-02-04 22:50 Sam James
2023-01-25 16:24 Florian Schmaus
2023-01-25 16:24 Florian Schmaus
2022-12-17 16:55 Arthur Zamarin
2022-12-17 16:55 Arthur Zamarin
2022-12-16  4:30 Sam James
2022-12-07 17:05 Florian Schmaus
2022-11-09  9:37 Florian Schmaus
2022-11-09  9:37 Florian Schmaus
2022-10-26 14:27 John Helmert III
2022-10-25 17:55 Sam James
2022-10-19  9:16 Florian Schmaus
2022-10-19  8:51 Florian Schmaus
2022-09-05  7:09 Florian Schmaus
2022-09-03 13:09 Florian Schmaus
2022-09-02 13:46 Florian Schmaus
2022-09-02  9:41 Florian Schmaus
2022-07-16 11:15 Florian Schmaus
2022-07-14  8:36 Florian Schmaus
2022-07-13  7:31 Florian Schmaus
2022-07-13  7:08 Florian Schmaus
2022-07-12 19:48 Florian Schmaus
2022-07-11  7:10 Florian Schmaus
2022-07-11  6:47 Florian Schmaus
2022-07-11  6:45 Florian Schmaus
2022-07-10  6:17 Agostino Sarubbo
2022-07-07  6:56 Florian Schmaus
2022-07-05 16:25 Florian Schmaus
2022-07-05 16:23 Florian Schmaus
2022-05-08 12:03 Florian Schmaus
2022-05-06  9:51 Florian Schmaus
2022-05-04  2:48 Sam James
2022-05-04  0:16 Sam James
2022-05-03 18:42 Sam James
2022-05-03 18:41 Sam James
2022-05-03 18:41 Sam James
2022-04-22  7:05 Florian Schmaus
2022-04-18  9:20 Florian Schmaus
2022-04-18  9:20 Florian Schmaus
2022-04-18  9:20 Florian Schmaus
2022-04-17 22:16 Florian Schmaus
2022-04-17 22:16 Florian Schmaus
2022-04-17 22:16 Florian Schmaus
2022-04-17 14:04 Florian Schmaus
2022-04-14  5:54 Florian Schmaus
2022-04-14  5:54 Florian Schmaus
2022-02-18  3:06 Sam James
2022-01-09  1:10 Sam James
2022-01-08 18:03 Jakov Smolić
2021-10-21  4:20 Sam James
2021-10-20  9:59 Sam James
2021-10-20  9:59 Sam James
2021-09-22  6:58 Agostino Sarubbo
2021-09-21  6:35 Agostino Sarubbo
2021-06-12 14:00 Sam James
2021-06-12 14:00 Sam James
2021-06-11 12:53 Thomas Deutschmann
2021-06-11 12:53 Thomas Deutschmann
2021-06-11 12:53 Thomas Deutschmann
2021-05-13  0:34 Thomas Deutschmann
2021-05-11 20:13 Thomas Deutschmann
2021-04-18  1:44 Sam James
2021-04-18  1:41 Sam James
2021-03-30 13:03 Joonas Niilola
2021-03-22 15:33 Joonas Niilola
2021-01-17  4:10 Sam James
2020-12-21 18:26 Sam James
2020-12-21 17:48 Thomas Deutschmann
2020-12-20 19:21 Thomas Deutschmann
2020-11-27 16:55 Thomas Deutschmann
2020-11-18 17:34 Thomas Deutschmann
2020-11-12 16:06 Sam James
2020-11-12 14:03 Sam James
2020-11-11  0:47 Sam James
2020-11-10 18:48 Sam James
2020-10-09  8:31 Agostino Sarubbo
2020-09-29 20:01 Sam James
2020-09-18 15:05 Agostino Sarubbo
2020-09-15 17:22 Thomas Deutschmann
2020-09-12 18:39 Thomas Deutschmann
2020-07-26 16:22 Thomas Deutschmann
2020-07-17  7:44 Agostino Sarubbo
2020-07-17  7:21 Agostino Sarubbo
2020-07-09 13:47 Yixun Lan
2020-06-12  7:55 Agostino Sarubbo
2020-06-12  7:51 Agostino Sarubbo
2020-06-11  9:54 Yixun Lan
2020-04-30 14:46 Yixun Lan
2020-03-13 15:10 Yixun Lan
2020-03-12 16:26 Agostino Sarubbo
2020-03-12 16:21 Agostino Sarubbo
2020-03-01 23:59 Yixun Lan
2020-02-29 14:44 Mikle Kolyada
2020-02-09 16:11 Michał Górny
2019-12-15 13:43 Agostino Sarubbo
2019-12-13 14:37 Agostino Sarubbo
2019-11-04 11:51 Yixun Lan
2019-11-02  8:42 Agostino Sarubbo
2019-11-01 23:51 Thomas Deutschmann
2019-10-31 21:48 Thomas Deutschmann
2019-10-31 21:48 Thomas Deutschmann
2019-10-27  7:44 Yixun Lan
2019-10-24  3:07 Yixun Lan
2019-10-24  3:07 Yixun Lan
2019-10-23 12:45 Agostino Sarubbo
2019-10-23 12:30 Agostino Sarubbo
2019-08-11 14:44 David Seifert
2019-08-11 11:20 David Seifert
2019-07-08 12:10 Thomas Deutschmann
2019-07-07 21:15 Thomas Deutschmann
2019-06-20 18:04 Mikle Kolyada
2019-05-22  2:35 Yixun Lan
2019-05-17  8:48 Yixun Lan
2019-05-17  8:48 Yixun Lan
2019-04-17 13:10 Yixun Lan
2019-04-04  4:55 Yixun Lan
2019-04-03  7:07 Yixun Lan
2019-04-03  4:55 Yixun Lan
2019-03-27 23:44 Thomas Deutschmann
2019-03-17 23:03 Mikle Kolyada
2019-03-15 22:49 Thomas Deutschmann
2019-03-08 12:39 Mikle Kolyada
2019-03-07 13:35 Yixun Lan
2019-03-07 13:35 Yixun Lan
2019-03-07  6:00 Yixun Lan
2019-02-16 13:59 Yixun Lan
2019-01-19  3:22 Thomas Deutschmann
2018-11-21 22:55 Yixun Lan
2018-11-12  1:14 Thomas Deutschmann
2018-11-11 10:55 Mikle Kolyada
2018-11-10 20:57 Thomas Deutschmann
2018-11-10 20:57 Thomas Deutschmann
2018-11-10 20:57 Thomas Deutschmann
2018-09-19 17:35 Thomas Deutschmann
2018-09-18  7:24 Agostino Sarubbo
2018-09-10 11:09 Thomas Deutschmann
2018-09-10 10:11 Thomas Deutschmann
2018-09-10  9:36 Thomas Deutschmann
2018-09-09 20:41 Thomas Deutschmann
2018-08-14  1:20 Yixun Lan
2018-07-17 11:07 Mikle Kolyada
2018-04-26 21:07 Mikle Kolyada
2018-04-23  4:43 Yixun Lan
2018-04-09  0:03 Aaron Bauman
2018-01-14 16:23 Thomas Deutschmann
2018-01-14 15:30 Agostino Sarubbo
2017-12-05  2:24 Yixun Lan
2017-11-08 13:38 Agostino Sarubbo
2017-11-03 18:05 Yixun Lan
2017-11-03 18:05 Yixun Lan
2017-11-03 10:08 Yixun Lan
2017-11-03 10:08 Yixun Lan
2017-11-02 21:16 Thomas Deutschmann
2017-10-17  7:24 Yixun Lan
2017-10-17  7:24 Yixun Lan
2017-10-17  7:24 Yixun Lan
2017-10-17  7:24 Yixun Lan
2017-10-13  8:05 Yixun Lan
2017-10-13  8:05 Yixun Lan
2017-07-31  9:01 Tobias Klausmann
2017-06-20 13:15 Alexis Ballier
2017-05-10 15:44 Agostino Sarubbo
2017-05-10  9:32 Agostino Sarubbo
2017-05-02  9:01 Yixun Lan
2017-05-02  9:01 Yixun Lan
2017-04-20  7:59 David Seifert
2017-02-24  9:35 Yixun Lan
2017-02-23 16:30 Agostino Sarubbo
2017-02-23 15:55 Agostino Sarubbo
2017-02-23  4:11 Yixun Lan
2017-02-23  4:11 Yixun Lan
2017-02-22  9:08 Yixun Lan
2017-02-16 18:35 Yixun Lan
2017-02-16 17:16 Agostino Sarubbo
2017-02-15  7:54 Yixun Lan
2016-12-28  9:06 Yixun Lan
2016-12-26 19:10 Thomas Deutschmann
2016-12-13 15:23 Yixun Lan
2016-12-13 15:23 Yixun Lan
2016-12-13 15:09 Yixun Lan
2016-12-13 11:30 Agostino Sarubbo
2016-12-13 11:05 Agostino Sarubbo
2016-12-08  3:19 Yixun Lan
2016-12-07  1:45 Yixun Lan
2016-11-28  4:13 Yixun Lan
2016-11-26 10:44 Agostino Sarubbo
2016-11-26 10:36 Agostino Sarubbo
2016-11-22 14:52 Yixun Lan
2016-11-22 12:41 Yixun Lan
2016-11-04 10:15 Yixun Lan
2016-11-04  8:24 Agostino Sarubbo
2016-11-04  8:21 Agostino Sarubbo
2016-10-05  9:48 Yixun Lan
2016-07-28 16:50 Yixun Lan
2016-07-28 14:56 Agostino Sarubbo
2016-07-28 14:51 Agostino Sarubbo
2016-07-27 18:28 Yixun Lan
2016-06-07  5:47 Yixun Lan
2016-05-20  4:41 Ian Delaney
2016-05-15  3:13 Ian Delaney
2016-05-15  3:13 Ian Delaney
2016-04-23 10:05 Ian Delaney
2016-04-14 12:07 Ian Delaney
2016-03-15 13:39 Ian Delaney
2016-03-15  8:13 Agostino Sarubbo
2016-03-15  8:11 Agostino Sarubbo
2016-02-19 16:08 Ian Delaney
2016-02-19  1:28 Yixun Lan
2016-02-18 20:57 Jason Donenfeld
2016-02-18  3:17 Yixun Lan
2016-02-16 16:19 Doug Goldstein
2016-02-15 15:55 Doug Goldstein
2016-01-22 10:01 Agostino Sarubbo
2016-01-22  9:31 Agostino Sarubbo
2016-01-21 14:16 Ian Delaney
2016-01-12 14:24 Ian Delaney
2016-01-07  2:33 Doug Goldstein
2016-01-06  4:42 Ian Delaney
2016-01-05 14:21 Agostino Sarubbo
2016-01-05 11:23 Agostino Sarubbo
2016-01-05  1:00 Ian Delaney
2015-12-31 14:52 Michał Górny
2015-12-23  2:21 Ian Delaney
2015-12-22  9:01 Agostino Sarubbo
2015-12-17 13:59 Ian Delaney
2015-12-09  7:06 Ian Delaney
2015-12-09  5:31 Ian Delaney
2015-12-09  5:31 Ian Delaney
2015-12-06 20:20 Doug Goldstein
2015-12-04  6:41 Doug Goldstein
2015-12-04  6:29 Doug Goldstein
2015-12-03 13:58 Ian Delaney
2015-12-03 13:13 Ian Delaney
2015-12-01  9:38 Agostino Sarubbo
2015-11-30 16:01 Ian Delaney
2015-11-29  7:57 Ian Delaney
2015-11-25  3:29 Yixun Lan
2015-11-10  8:56 Agostino Sarubbo
2015-11-10  8:50 Agostino Sarubbo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox