diff options
Diffstat (limited to 'app-emulation/xen-pvgrub')
-rw-r--r-- | app-emulation/xen-pvgrub/Manifest | 5 | ||||
-rw-r--r-- | app-emulation/xen-pvgrub/metadata.xml | 5 | ||||
-rw-r--r-- | app-emulation/xen-pvgrub/xen-pvgrub-9999.ebuild | 114 |
3 files changed, 124 insertions, 0 deletions
diff --git a/app-emulation/xen-pvgrub/Manifest b/app-emulation/xen-pvgrub/Manifest new file mode 100644 index 0000000..f3a7038 --- /dev/null +++ b/app-emulation/xen-pvgrub/Manifest @@ -0,0 +1,5 @@ +DIST grub-0.97.tar.gz 971783 RMD160 7fb5674edf0c950bd38e94f85ff1e2909aa741f0 SHA1 2580626c4579bd99336d3af4482c346c95dac4fb SHA256 4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b +DIST lwip-1.3.0.tar.gz 398933 RMD160 72c63bf5e3b29e185c46a5fc116146ea902def83 SHA1 241f917ba9dffc614346472e3c5871217ad0a91c SHA256 772e4d550e07826665ed0528c071dd5404ef7dbe1825a38c8adbc2a00bca948f +DIST newlib-1.16.0.tar.gz 12024353 RMD160 fa40ff43e858da3093c9f3b5b203724b9b327696 SHA1 841edec33d19a9e549984982fb92445ee967e265 SHA256 db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07 +DIST pciutils-2.2.9.tar.bz2 212265 SHA256 f60ae61cfbd5da1d849d0beaa21f593c38dac9359f0b3ddc612f447408265b24 SHA512 2b3d98d027e46d8c08037366dde6f0781ca03c610ef2b380984639e4ef39899ed8d8b8e4cd9c9dc54df101279b95879bd66bfd4d04ad07fef41e847ea7ae32b5 WHIRLPOOL ce801947fcf7ba0b56710029f25e746d3e03a80699af9d3570efcd417b12b546264f286b2e78b1402cca766c08e35bdd0ff0a692ab4ad419295f00bcfe91130e +DIST zlib-1.2.3.tar.gz 496597 RMD160 89a57e336c24f7f6eebda3a1724e14b71187e117 SHA1 60faeaaf250642db5c0ea36cd6dcc9f99c8f3902 SHA256 1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e diff --git a/app-emulation/xen-pvgrub/metadata.xml b/app-emulation/xen-pvgrub/metadata.xml new file mode 100644 index 0000000..cc9d568 --- /dev/null +++ b/app-emulation/xen-pvgrub/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>xen</herd> +</pkgmetadata> diff --git a/app-emulation/xen-pvgrub/xen-pvgrub-9999.ebuild b/app-emulation/xen-pvgrub/xen-pvgrub-9999.ebuild new file mode 100644 index 0000000..c505281 --- /dev/null +++ b/app-emulation/xen-pvgrub/xen-pvgrub-9999.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-pvgrub/xen-pvgrub-9999.ebuild,v 1.4 2011/09/21 07:55:04 mgorny Exp $ + +EAPI="2" + +inherit flag-o-matic eutils multilib mercurial git-2 + +DESCRIPTION="allows to boot Xen domU kernels from a menu.lst laying inside guest filesystem" +HOMEPAGE="http://xen.org/" +SRC_URI=" + http://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz + http://downloads.sourceforge.net/project/libpng/zlib/1.2.3/zlib-1.2.3.tar.gz + http://www.kernel.org/pub/software/utils/pciutils/pciutils-2.2.9.tar.bz2 + http://download.savannah.gnu.org/releases/lwip/lwip-1.3.0.tar.gz + ftp://sources.redhat.com/pub/newlib/newlib-1.16.0.tar.gz + " + +MERC_REPO="xen-unstable.hg" +GIT_REPO="qemu-xen-unstable.git" + +EHG_REPO_URI="http://xenbits.xensource.com/${MERC_REPO}" +EGIT_REPO_URI="git://xenbits.xensource.com/${GIT_REPO}" + +S="${WORKDIR}/${MERC_REPO}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="custom-cflags multilib" + +DEPEND="sys-devel/gettext + sys-devel/gcc" + +RDEPEND=">=app-emulation/xen-${PV}" + +pkg_setup() { + # use emerge to fetch qemu/ioemu + export "CONFIG_QEMU=${WORKDIR}/${GIT_REPO}" +} + +src_unpack() { + default_src_unpack + + # unpack xen + mercurial_src_unpack + + local EGIT_COMMIT=$(sed -n -e "s/QEMU_TAG := \(.*\)/\1/p" "${S}"/Config.mk) + + # unpack ioemu repos + local S=${WORKDIR}/${GIT_REPO} + local EGIT_NOUNPACK=1 + git-2_src_unpack +} + +src_prepare() { + # 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 custom-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 {} \; + fi + + sed -i \ + -e 's/WGET=.*/WGET=cp -t . /' \ + -e "s;\$(XEN_EXTFILES_URL);${DISTDIR};" \ + -e 's/$(LD)/$(LD) LDFLAGS=/' \ + -e 's;install-grub: pv-grub;install-grub:;' \ + "${S}"/stubdom/Makefile || die +} + +src_compile() { + use custom-cflags || unset CFLAGS + if test-flag-CC -fno-strict-overflow; then + append-flags -fno-strict-overflow + fi + + emake -C tools/include || die "prepare libelf headers failed" + + if use x86; then + emake XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub || die "compile pv-grub_x86_32 failed" + fi + if use amd64; then + emake XEN_TARGET_ARCH="x86_64" -C stubdom pv-grub || die "compile pv-grub_x86_64 failed" + if use multilib; then + multilib_toolchain_setup x86 + emake XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub || die "compile pv-grub_x86_32 failed" + fi + fi +} + +src_install() { + if use x86; then + emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub || die "install pv-grub_x86_32 failed" + fi + if use amd64; then + emake XEN_TARGET_ARCH="x86_64" DESTDIR="${D}" -C stubdom install-grub || die "install pv-grub_x86_64 failed" + if use multilib; then + emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub || die "install pv-grub_x86_32 failed" + fi + fi +} + +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/" +} |