--- /dev/null
+Only in xen-3.4.2/: cflags.sh
+diff -ur xen-3.4.2.orig//config/StdGNU.mk xen-3.4.2//config/StdGNU.mk
+--- xen-3.4.2.orig//config/StdGNU.mk 2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//config/StdGNU.mk 2011-09-26 02:18:14.630771549 +0800
+@@ -48,7 +48,7 @@
+ SHLIB_CFLAGS = -shared
+
+ ifneq ($(debug),y)
+-CFLAGS += -O2 -fomit-frame-pointer
++CFLAGS += -fomit-frame-pointer
+ else
+ # Less than -O1 produces bad code and large stack frames
+ CFLAGS += -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls
+diff -ur xen-3.4.2.orig//config/SunOS.mk xen-3.4.2//config/SunOS.mk
+--- xen-3.4.2.orig//config/SunOS.mk 2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//config/SunOS.mk 2011-09-26 02:18:14.640771549 +0800
+@@ -45,7 +45,7 @@
+ SHLIB_CFLAGS = -R $(SunOS_LIBDIR) -shared
+
+ ifneq ($(debug),y)
+-CFLAGS += -O2 -fno-omit-frame-pointer
++CFLAGS += -fno-omit-frame-pointer
+ else
+ # Less than -O1 produces bad code and large stack frames
+ CFLAGS += -O1 -fno-omit-frame-pointer
+diff -ur xen-3.4.2.orig//Config.mk xen-3.4.2//Config.mk
+--- xen-3.4.2.orig//Config.mk 2011-09-26 02:17:29.221771569 +0800
++++ xen-3.4.2//Config.mk 2011-09-26 02:18:14.686771549 +0800
+@@ -14,7 +14,7 @@
+
+ # Tools to run on system hosting the build
+ HOSTCC = gcc
+-HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
++HOSTCFLAGS = -Wall -Wstrict-prototypes -fomit-frame-pointer
+ HOSTCFLAGS += -fno-strict-aliasing
+
+ DISTDIR ?= $(XEN_ROOT)/dist
+diff -ur xen-3.4.2.orig//extras/mini-os/arch/ia64/arch.mk xen-3.4.2//extras/mini-os/arch/ia64/arch.mk
+--- xen-3.4.2.orig//extras/mini-os/arch/ia64/arch.mk 2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//extras/mini-os/arch/ia64/arch.mk 2011-09-26 02:18:14.689771549 +0800
+@@ -1,8 +1,8 @@
+
+ ARCH_CFLAGS := -mfixed-range=f2-f5,f12-f15,f32-f127 -mconstant-gp
+-ARCH_CFLAGS += -O2
++#ARCH_CFLAGS += -O2
+ ARCH_ASFLAGS := -x assembler-with-cpp
+-ARCH_ASFLAGS += -mfixed-range=f2-f5,f12-f15,f32-f127 -fomit-frame-pointer
++ARCH_ASFLAGS += -mfixed-range=f2-f5,f12-f15,f32-f127
+ ARCH_ASFLAGS += -fno-builtin -fno-common -fno-strict-aliasing -mconstant-gp
+
+ ARCH_LDFLAGS = -warn-common
+diff -ur xen-3.4.2.orig//stubdom/grub.patches/00cvs xen-3.4.2//stubdom/grub.patches/00cvs
+--- xen-3.4.2.orig//stubdom/grub.patches/00cvs 2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//stubdom/grub.patches/00cvs 2011-09-26 02:18:14.549771549 +0800
+@@ -223,8 +223,8 @@
+ +++ grub/configure.ac 2008-04-10 23:26:50.000000000 +0100
+ @@ -86,13 +86,13 @@ if test "x$ac_cv_prog_gcc" = xyes; then
+ fi
+- STAGE1_CFLAGS="-O2"
+- GRUB_CFLAGS="-O2"
++ STAGE1_CFLAGS=""
++ GRUB_CFLAGSS=""
+ - AC_CACHE_CHECK([whether optimization for size works], size_flag, [
+ + AC_CACHE_CHECK([whether optimization for size works], grub_cv_cc_Os, [
+ saved_CFLAGS=$CFLAGS
+@@ -237,7 +237,7 @@
+ + if test "x$grub_cv_cc_Os" = xyes; then
+ STAGE2_CFLAGS="-Os"
+ else
+- STAGE2_CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops"
++ STAGE2_CFLAGS=" -fno-strength-reduce -fno-unroll-loops"
+ @@ -100,16 +100,16 @@ if test "x$ac_cv_prog_gcc" = xyes; then
+ # OpenBSD has a GCC extension for protecting applications from
+ # stack smashing attacks, but GRUB doesn't want this feature.
+diff -ur xen-3.4.2.orig//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure xen-3.4.2//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure
+--- xen-3.4.2.orig//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure 2009-11-10 23:12:55.000000000 +0800
++++ xen-3.4.2//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver/configure 2011-09-26 02:24:37.261771380 +0800
+@@ -1849,7 +1849,7 @@
+ GCC=`test $ac_compiler_gnu = yes && echo yes`
+ ac_test_CFLAGS=${CFLAGS+set}
+ ac_save_CFLAGS=$CFLAGS
+-CFLAGS="-g"
++CFLAGS=""
+ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+ echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+ if test "${ac_cv_prog_cc_g+set}" = set; then
+@@ -1898,15 +1898,15 @@
+ CFLAGS=$ac_save_CFLAGS
+ elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+- CFLAGS="-g -O2"
++ CFLAGS=""
+ else
+- CFLAGS="-g"
++ CFLAGS=""
+ fi
+ else
+ if test "$GCC" = yes; then
+- CFLAGS="-O2"
++# CFLAGS="-O2"
+ else
+- CFLAGS=
++ CFLAGS=""
+ fi
+ fi
+ echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+Only in xen-3.4.2//tools/debugger/gdb/gdb-6.2.1-xen-sparse/gdb/gdbserver: configure~
+diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/configure xen-3.4.2//tools/ioemu-qemu-xen/configure
+--- xen-3.4.2.orig//tools/ioemu-qemu-xen/configure 2011-09-26 02:17:29.223771569 +0800
++++ xen-3.4.2//tools/ioemu-qemu-xen/configure 2011-09-26 02:22:14.583771444 +0800
+@@ -464,7 +464,7 @@
+
+
+ # default flags for all hosts
+-CFLAGS="$CFLAGS -O2 -g -fno-strict-aliasing"
++CFLAGS="$CFLAGS -g -fno-strict-aliasing"
+ CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
+ LDFLAGS="$LDFLAGS -g"
+ if test "$werror" = "yes" ; then
+diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/cris/Makefile xen-3.4.2//tools/ioemu-qemu-xen/tests/cris/Makefile
+--- xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/cris/Makefile 2009-11-05 19:44:56.000000000 +0800
++++ xen-3.4.2//tools/ioemu-qemu-xen/tests/cris/Makefile 2011-09-26 02:18:14.264771549 +0800
+@@ -12,7 +12,7 @@
+ OBJCOPY = $(CROSS)objcopy
+
+ # we rely on GCC inline:ing the stuff we tell it to in many places here.
+-CFLAGS = -Winline -Wall -g -O2 -static
++CFLAGS = -Winline -Wall -g -static
+ NOSTDFLAGS = -nostartfiles -nostdlib
+ ASFLAGS += -g -Wa,-I,$(SRC_PATH)/tests/cris/
+ LDLIBS =
+diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/hello-mips.c xen-3.4.2//tools/ioemu-qemu-xen/tests/hello-mips.c
+--- xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/hello-mips.c 2009-11-05 19:44:56.000000000 +0800
++++ xen-3.4.2//tools/ioemu-qemu-xen/tests/hello-mips.c 2011-09-26 02:18:14.669771549 +0800
+@@ -6,7 +6,7 @@
+ * http://www.linux.com/howtos/Assembly-HOWTO/mips.shtml
+ *
+ * mipsel-linux-gcc -nostdlib -mno-abicalls -fno-PIC -mabi=32 \
+-* -O2 -static -o hello-mips hello-mips.c
++* -static -o hello-mips hello-mips.c
+ *
+ */
+ #define __NR_SYSCALL_BASE 4000
+diff -ur xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/Makefile xen-3.4.2//tools/ioemu-qemu-xen/tests/Makefile
+--- xen-3.4.2.orig//tools/ioemu-qemu-xen/tests/Makefile 2009-11-05 19:44:56.000000000 +0800
++++ xen-3.4.2//tools/ioemu-qemu-xen/tests/Makefile 2011-09-26 02:18:14.262771549 +0800
+@@ -2,7 +2,7 @@
+ -include ../config-host.mak
+ VPATH=$(SRC_PATH)/tests
+
+-CFLAGS=-Wall -O2 -g -fno-strict-aliasing
++CFLAGS=-Wall -g -fno-strict-aliasing
+ #CFLAGS+=-msse2
+ LDFLAGS=
+
+@@ -52,7 +52,7 @@
+
+ .PHONY: test-mmap
+ test-mmap: test-mmap.c
+- $(CC) $(CFLAGS) -Wall -static -O2 $(LDFLAGS) -o $@ $<
++ $(CC) $(CFLAGS) -Wall -static $(LDFLAGS) -o $@ $<
+ -./test-mmap
+ -$(QEMU) ./test-mmap
+ -$(QEMU) -p 8192 ./test-mmap 8192
+@@ -88,17 +88,17 @@
+ arm-linux-ld -o $@ $<
+
+ hello-arm.o: hello-arm.c
+- arm-linux-gcc -Wall -g -O2 -c -o $@ $<
++ arm-linux-gcc -Wall -g -c -o $@ $<
+
+ test-arm-iwmmxt: test-arm-iwmmxt.s
+ cpp < $< | arm-linux-gnu-gcc -Wall -static -march=iwmmxt -mabi=aapcs -x assembler - -o $@
+
+ # MIPS test
+ hello-mips: hello-mips.c
+- mips-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
++ mips-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -o $@ $<
+
+ hello-mipsel: hello-mips.c
+- mipsel-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -O2 -o $@ $<
++ mipsel-linux-gnu-gcc -nostdlib -static -mno-abicalls -fno-PIC -mabi=32 -Wall -Wextra -g -o $@ $<
+
+ # testsuite for the CRIS port.
+ test-cris:
+diff -ur xen-3.4.2.orig//tools/libaio/src/Makefile xen-3.4.2//tools/libaio/src/Makefile
+--- xen-3.4.2.orig//tools/libaio/src/Makefile 2009-11-10 23:12:56.000000000 +0800
++++ xen-3.4.2//tools/libaio/src/Makefile 2011-09-26 02:18:14.288771549 +0800
+@@ -6,7 +6,7 @@
+ libdir=$(prefix)/lib
+
+ ARCH := $(shell uname -m | sed -e s/i.86/i386/)
+-CFLAGS = -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -O2 -fPIC
++CFLAGS = -nostdlib -nostartfiles -Wall -I. -g -fomit-frame-pointer -fPIC
+ SO_CFLAGS=-shared $(CFLAGS)
+ L_CFLAGS=$(CFLAGS)
+ LINK_FLAGS=
+diff -ur xen-3.4.2.orig//tools/libxen/Makefile.dist xen-3.4.2//tools/libxen/Makefile.dist
+--- xen-3.4.2.orig//tools/libxen/Makefile.dist 2011-09-26 02:17:29.223771569 +0800
++++ xen-3.4.2//tools/libxen/Makefile.dist 2011-09-26 02:18:14.553771549 +0800
+@@ -22,7 +22,7 @@
+ CFLAGS = -Iinclude \
+ $(shell xml2-config --cflags) \
+ $(shell curl-config --cflags) \
+- -W -Wall -Wmissing-prototypes -std=c99 -O2 -fPIC
++ -W -Wall -Wmissing-prototypes -std=c99 -fPIC
+
+ LDFLAGS = $(shell xml2-config --libs) \
+ $(shell curl-config --libs)
+diff -ur xen-3.4.2.orig//tools/vnet/vnet-module/Makefile-2.4 xen-3.4.2//tools/vnet/vnet-module/Makefile-2.4
+--- xen-3.4.2.orig//tools/vnet/vnet-module/Makefile-2.4 2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/vnet/vnet-module/Makefile-2.4 2011-09-26 02:18:14.659771549 +0800
+@@ -62,7 +62,7 @@
+ CFLAGS += -Wno-unused-parameter
+
+ CFLAGS += -g
+-CFLAGS += -O2
++#CFLAGS += -O2
+ CFLAGS += -fno-strict-aliasing
+ CFLAGS += -fno-common
+ #CFLAGS += -fomit-frame-pointer
+diff -ur xen-3.4.2.orig//extras/mini-os/minios.mk xen-3.4.2//extras/mini-os/minios.mk
+--- xen-3.4.2.orig//extras/mini-os/minios.mk 2011-09-26 02:29:41.869771248 +0800
++++ xen-3.4.2//extras/mini-os/minios.mk 2011-09-26 02:33:55.708771108 +0800
+@@ -23,7 +23,7 @@
+ DEF_CFLAGS += -DGNT_DEBUG
+ DEF_CFLAGS += -DGNTMAP_DEBUG
+ else
+-DEF_CFLAGS += -O3
++#DEF_CFLAGS += -O3
+ endif
+
+ # Make the headers define our internal stuff
+diff -ur xen-3.4.2.orig//tools/vnet/libxutil/Makefile xen-3.4.2//tools/vnet/libxutil/Makefile
+--- xen-3.4.2.orig//tools/vnet/libxutil/Makefile 2011-09-26 02:29:41.872771248 +0800
++++ xen-3.4.2//tools/vnet/libxutil/Makefile 2011-09-26 02:37:59.835771029 +0800
+@@ -26,7 +26,7 @@
+
+ $(call cc-option-add,CFLAGS,CC,-fgnu89-inline)
+ CFLAGS += -fno-strict-aliasing
+-CFLAGS += -O3
++#CFLAGS += -O3
+ #CFLAGS += -g
+
+ MAJOR := 3.0
+diff -ur xen-3.4.2.orig//tools/vnet/vnetd/Makefile xen-3.4.2//tools/vnet/vnetd/Makefile
+--- xen-3.4.2.orig//tools/vnet/vnetd/Makefile 2009-11-10 23:12:57.000000000 +0800
++++ xen-3.4.2//tools/vnet/vnetd/Makefile 2011-09-26 02:37:59.834771029 +0800
+@@ -44,7 +44,7 @@
+ CPPFLAGS += -D __ARCH_I386_ATOMIC__
+
+ #----------------------------------------------------------------------------
+-CFLAGS += -O3
++#CFLAGS += -O3
+ CFLAGS += $(INCLUDES) $(LIBS)
+
+ LDFLAGS += $(LIBS)
\ No newline at end of file
--- /dev/null
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-3.4.2-r4.ebuild,v 1.1 2011/09/25 19:45:22 chainsaw Exp $
+
+EAPI="3"
+
+inherit base flag-o-matic eutils multilib python toolchain-funcs
+
+# TPMEMUFILE=tpm_emulator-0.4.tar.gz
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.org/"
+SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
+# vtpm? ( mirror://berlios/tpm-emulator/${TPMEMUFILE} )"
+S="${WORKDIR}/xen-${PV}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc debug screen custom-cflags pygrub hvm api acm flask"
+
+CDEPEND="dev-lang/python[ncurses,threads]
+ sys-libs/zlib
+ hvm? ( media-libs/libsdl )
+ acm? ( dev-libs/libxml2 )
+ api? ( dev-libs/libxml2 net-misc/curl )"
+# vtpm? ( dev-libs/gmp dev-libs/openssl )
+
+DEPEND="${CDEPEND}
+ sys-devel/gettext
+ sys-devel/gcc
+ dev-lang/perl
+ dev-lang/python[ssl]
+ app-misc/pax-utils
+ doc? (
+ app-doc/doxygen
+ dev-tex/latex2html[png,gif]
+ dev-texlive/texlive-latexextra
+ media-gfx/transfig
+ media-gfx/graphviz
+ )
+ hvm? (
+ x11-proto/xproto
+ sys-devel/dev86
+ )"
+
+RDEPEND="${CDEPEND}
+ sys-apps/iproute2
+ net-misc/bridge-utils
+ dev-python/pyxml
+ screen? (
+ app-misc/screen
+ app-admin/logrotate
+ )
+ || ( sys-fs/udev sys-apps/hotplug )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.4.0-network-bridge-broadcast.patch"
+ "${FILESDIR}/${PN}-3.3.0-nostrip.patch"
+ "${FILESDIR}/${PN}-3.3.1-sandbox-fix.patch"
+ "${FILESDIR}/${P}-as-needed.patch"
+ "${FILESDIR}/${P}-fix-definitions.patch"
+ "${FILESDIR}/${P}-fix-include.patch"
+ "${FILESDIR}/${P}-werror-idiocy-v2.patch"
+)
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
+QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32
+ usr/share/xen/qemu/openbios-sparc64"
+
+pkg_setup() {
+ export "CONFIG_LOMOUNT=y"
+
+ if ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
+ eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
+ eerror "an amd64 multilib profile is required. Remove the hvm use flag"
+ eerror "to build xen-tools on your current profile."
+ die "USE=hvm is unsupported on this system."
+ 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 vtpm && export "VTPM_TOOLS=y"
+ use api && export "LIBXENAPI_BINDINGS=y"
+ use acm && export "ACM_SECURITY=y"
+ use flask && export "FLASK_ENABLE=y"
+}
+
+src_prepare() {
+ base_src_prepare
+
+ # use vtpm && cp "${DISTDIR}"/${TPMEMUFILE} tools/vtpm
+
+ # if the user *really* wants to use their own custom-cflags, let them
+ # Try and remove all the default custom-cflags
+ if use custom-cflags; then
+ epatch "${FILESDIR}/${P}-remove-default-cflags.patch"
+ fi
+
+ # Disable hvm support on systems that don't support x86_32 binaries.
+ if ! use hvm; then
+ chmod 644 tools/check/check_x11_devel
+ sed -i -e '/^CONFIG_IOEMU := y$/d' "${S}"/config/*.mk
+ sed -i -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' "${S}"/tools/Makefile
+ fi
+
+ if ! use pygrub; then
+ sed -i -e '/^SUBDIRS-$(PYTHON_TOOLS) += pygrub$/d' "${S}"/tools/Makefile
+ fi
+}
+
+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
+
+ emake CC=$(tc-getCC) -C tools ${myopt} || die "compile failed"
+
+ if use doc; then
+ sh ./docs/check_pkgs || die "package check failed"
+ emake docs || die "compiling docs failed"
+ emake dev-docs || die "make dev-docs failed"
+ fi
+
+ emake -C docs man-pages || die "make man-pages failed"
+}
+
+src_install() {
+ make DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools \
+ || die "install failed"
+
+ # Remove RedHat-specific stuff
+ rm -rf "${D}"/etc/sysconfig
+
+ dodoc README docs/README.xen-bugtool docs/ChangeLog
+ if use doc; then
+ emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs \
+ || die "install docs failed"
+
+ dohtml -r docs/api/
+ docinto pdf
+ dodoc docs/api/tools/python/latex/refman.pdf
+
+ [ -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?/*
+
+ newinitd "${FILESDIR}"/xend.initd-r1 xend \
+ || die "Couldn't install xen.initd"
+ newconfd "${FILESDIR}"/xendomains.confd xendomains \
+ || die "Couldn't install xendomains.confd"
+ newinitd "${FILESDIR}"/xendomains.initd-r1 xendomains \
+ || die "Couldn't install xendomains.initd"
+
+ if use screen; then
+ cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains
+ cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/
+ keepdir /var/log/xen-consoles
+ fi
+
+ # xend expects these to exist
+ keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
+
+ # for xendomains
+ keepdir /etc/xen/auto
+}
+
+pkg_postinst() {
+ elog "Official Xen Guide and the unoffical wiki page:"
+ elog " http://www.gentoo.org/doc/en/xen-guide.xml"
+ elog " http://en.gentoo-wiki.com/wiki/Xen/"
+
+ if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
+ echo
+ ewarn "xend may not work when python is built with stack smashing protection (ssp)."
+ ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
+ ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
+ fi
+
+ 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 multilib system is required to build HVM support."
+ echo
+ elog "The ioemu use flag has been removed and replaced with hvm."
+ 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
+
+ python_mod_optimize $(use pygrub && echo grub) xen
+}
+
+pkg_postrm() {
+ python_mod_cleanup $(use pygrub && echo grub) xen
+}