diff options
Diffstat (limited to 'app-emulation/xen/xen-3.0.4_p1.ebuild')
-rw-r--r-- | app-emulation/xen/xen-3.0.4_p1.ebuild | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/app-emulation/xen/xen-3.0.4_p1.ebuild b/app-emulation/xen/xen-3.0.4_p1.ebuild index 1e2d91f..de6457f 100644 --- a/app-emulation/xen/xen-3.0.4_p1.ebuild +++ b/app-emulation/xen/xen-3.0.4_p1.ebuild @@ -13,13 +13,12 @@ S="${WORKDIR}/xen-${MY_PV}-src" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="debug custom-cflags pae hardened" +IUSE="debug custom-cflags pae" RDEPEND="|| ( sys-boot/grub sys-boot/grub-static ) - sys-kernel/xen-sources" -PDEPEND="~app-emulation/xen-tools-${PV} - >=sys-kernel/xen-sources-2.6.16.33" + >=sys-kernel/xen-sources-2.6.16.33" +PDEPEND="~app-emulation/xen-tools-${PV}" RESTRICT="test" @@ -38,7 +37,6 @@ pkg_setup() { fi } - src_unpack() { unpack ${A} # if the user *really* wants to use their own custom-cflags, let them @@ -53,10 +51,14 @@ src_unpack() { -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ -i {} \; fi - if use hardened; then - cd "${S}" - epatch "${FILESDIR}/${PN}"-3.0.2-nopiessp.patch - fi + + # xen tries to be smart and filter out CFLAGs not supported by gcc. + # It doesn't handle no* flags though, but flag-o-matic's test-flag-CC does. + for FLAG in -nopie -fno-stack-protector -fno-stack-protector-all; do + test-flag-CC ${FLAG} && HARDFLAGS="${HARDFLAGS} ${FLAG}" + done + sed -i "s/^CFLAGS-y.*__XEN__.*$/& ${HARDFLAGS}/" \ + "${S}"/xen/Rules.mk } src_compile() { @@ -76,21 +78,21 @@ src_compile() { src_install() { local myopt + use debug && myopt="${myopt} debug=y" use pae && myopt="${myopt} pae=y" make DESTDIR="${D}" ${myopt} install-xen || die "install failed" } pkg_postinst() { - einfo "Please visit the Xen and Gentoo wiki:" - einfo "http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo" + elog "Please visit the Xen and Gentoo wiki:" + elog "http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo" echo - einfo "Note: xen tools have been moved to app-emulation/xen-tools;" - einfo "you need to install that package to manage your domains." + elog "Note: xen tools have been moved to app-emulation/xen-tools" if use pae; then echo - einfo "This is a PAE build of Xen. It will *only* boot PAE kernels!" + ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!" fi } |