# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit mount-boot DESCRIPTION="The Xen virtual machine monitor" HOMEPAGE="http://xen.sourceforge.net/ http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html" SRC_URI="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/${P}-src.tgz mirror://sourceforge/xen/${P}-src.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="doc" RDEPEND="sys-apps/iproute2 net-misc/bridge-utils dev-lang/python >=dev-python/twisted-1.3.0 net-misc/curl sys-libs/zlib" DEPEND="${RDEPEND} >=sys-apps/portage-2.0.51 doc? ( dev-tex/latex2html media-gfx/transfig media-gfx/tgif )" src_unpack() { unpack ${A} cd ${WORKDIR} mv xen-2.0/ ${P} cd ${S} sed -i \ -e "/CFLAGS/s:-O3:${CFLAGS}:" \ tools/libx{c,util}/Makefile \ tools/misc/{miniterm,nsplitd}/Makefile \ tools/{misc,xentrace}/Makefile \ xen/arch/x86/Rules.mk || die "sed cflags" sed -i \ -e 's:usr/man:usr/share/man:g' \ tools/xentrace/Makefile || die "sed man" } src_compile() { emake xen || die "xen build" emake tools || die "tools build" if use doc ; then emake docs || die "docs build" fi } src_install() { make prefix=${D} -C xen install || die "xen install" make prefix=${D} -C tools install || die "tools install" if use doc ; then make prefix=${D} -C docs install || die "docs install" mv ${D}/usr/share/doc/xen ${D}/usr/share/doc/${PF} fi newinitd ${FILESDIR}/xend.rc xend newinitd ${FILESDIR}/xendomains.rc xendomains }