--- /usr/portage/app-emulation/xen/xen-3.0.1-r1.ebuild 2006-02-05 04:37:28.000000000 -0600 +++ xen-3.0.1-r1.ebuild 2006-02-28 13:52:10.000000000 -0600 @@ -14,7 +14,7 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~amd64" -IUSE="doc debug screen custom-cflags" +IUSE="doc debug screen custom-cflags pae" DEPEND="sys-apps/iproute2 net-misc/bridge-utils @@ -36,6 +36,9 @@ src_unpack() { unpack ${A} + + epatch ${FILESDIR}/gentoo-make.patch + # 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" @@ -60,13 +63,17 @@ myopt="${myopt} debug=y" fi + if use pae; then + myopt="${myopt} XEN_TARGET_X86_PAE=y" + fi + if ! use custom-cflags; then unset CFLAGS fi + filter-flags -fPIE -fstack-protector - make ${myopt} -C xen || die "compiling xen failed" - make ${myopt} -C tools || die "compiling tools failed" + make ${myopt} gentoo-build || die "compiling xen failed" if use doc; then sh ./docs/check_pkgs || die "package check failed" @@ -75,13 +82,17 @@ } src_install() { - make DESTDIR=${D} -C xen install || die "installing xen failed" + local myopt + + if use pae; then + myopt="${myopt} XEN_TARGET_X86_PAE=y" + fi - make DESTDIR=${D} XEN_PYTHON_NATIVE_INSTALL=1 -C tools install \ - || die "installing tools failed" + make DESTDIR=${D} XEN_PYTHON_NATIVE_INSTALL=1 ${myopt} gentoo-install \ + || die "installing xen failed" if use doc; then - make DESTDIR=${D} -C docs install \ + make DESTDIR=${D} ${myopt} -C docs install \ || die "installing docs failed" # Rename doc/xen to the Gentoo-style doc/xen-x.y mv ${D}/usr/share/doc/{${PN},${PF}}