1 |
commit: 286e45121d0a7bc9f84690a559b796bf464a493a |
2 |
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Nov 28 18:30:15 2011 +0000 |
4 |
Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 28 18:30:15 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/virtualization.git;a=commit;h=286e4512 |
7 |
|
8 |
Also move xen-pvgrub here |
9 |
|
10 |
(Portage version: 2.2.0_alpha79/git/Linux x86_64, unsigned Manifest commit) |
11 |
|
12 |
--- |
13 |
app-emulation/xen-pvgrub/Manifest | 5 + |
14 |
app-emulation/xen-pvgrub/metadata.xml | 5 + |
15 |
app-emulation/xen-pvgrub/xen-pvgrub-9999.ebuild | 114 +++++++++++++++++++++++ |
16 |
3 files changed, 124 insertions(+), 0 deletions(-) |
17 |
|
18 |
diff --git a/app-emulation/xen-pvgrub/Manifest b/app-emulation/xen-pvgrub/Manifest |
19 |
new file mode 100644 |
20 |
index 0000000..f3a7038 |
21 |
--- /dev/null |
22 |
+++ b/app-emulation/xen-pvgrub/Manifest |
23 |
@@ -0,0 +1,5 @@ |
24 |
+DIST grub-0.97.tar.gz 971783 RMD160 7fb5674edf0c950bd38e94f85ff1e2909aa741f0 SHA1 2580626c4579bd99336d3af4482c346c95dac4fb SHA256 4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b |
25 |
+DIST lwip-1.3.0.tar.gz 398933 RMD160 72c63bf5e3b29e185c46a5fc116146ea902def83 SHA1 241f917ba9dffc614346472e3c5871217ad0a91c SHA256 772e4d550e07826665ed0528c071dd5404ef7dbe1825a38c8adbc2a00bca948f |
26 |
+DIST newlib-1.16.0.tar.gz 12024353 RMD160 fa40ff43e858da3093c9f3b5b203724b9b327696 SHA1 841edec33d19a9e549984982fb92445ee967e265 SHA256 db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07 |
27 |
+DIST pciutils-2.2.9.tar.bz2 212265 SHA256 f60ae61cfbd5da1d849d0beaa21f593c38dac9359f0b3ddc612f447408265b24 SHA512 2b3d98d027e46d8c08037366dde6f0781ca03c610ef2b380984639e4ef39899ed8d8b8e4cd9c9dc54df101279b95879bd66bfd4d04ad07fef41e847ea7ae32b5 WHIRLPOOL ce801947fcf7ba0b56710029f25e746d3e03a80699af9d3570efcd417b12b546264f286b2e78b1402cca766c08e35bdd0ff0a692ab4ad419295f00bcfe91130e |
28 |
+DIST zlib-1.2.3.tar.gz 496597 RMD160 89a57e336c24f7f6eebda3a1724e14b71187e117 SHA1 60faeaaf250642db5c0ea36cd6dcc9f99c8f3902 SHA256 1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e |
29 |
|
30 |
diff --git a/app-emulation/xen-pvgrub/metadata.xml b/app-emulation/xen-pvgrub/metadata.xml |
31 |
new file mode 100644 |
32 |
index 0000000..cc9d568 |
33 |
--- /dev/null |
34 |
+++ b/app-emulation/xen-pvgrub/metadata.xml |
35 |
@@ -0,0 +1,5 @@ |
36 |
+<?xml version="1.0" encoding="UTF-8"?> |
37 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
38 |
+<pkgmetadata> |
39 |
+<herd>xen</herd> |
40 |
+</pkgmetadata> |
41 |
|
42 |
diff --git a/app-emulation/xen-pvgrub/xen-pvgrub-9999.ebuild b/app-emulation/xen-pvgrub/xen-pvgrub-9999.ebuild |
43 |
new file mode 100644 |
44 |
index 0000000..c505281 |
45 |
--- /dev/null |
46 |
+++ b/app-emulation/xen-pvgrub/xen-pvgrub-9999.ebuild |
47 |
@@ -0,0 +1,114 @@ |
48 |
+# Copyright 1999-2011 Gentoo Foundation |
49 |
+# Distributed under the terms of the GNU General Public License v2 |
50 |
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-pvgrub/xen-pvgrub-9999.ebuild,v 1.4 2011/09/21 07:55:04 mgorny Exp $ |
51 |
+ |
52 |
+EAPI="2" |
53 |
+ |
54 |
+inherit flag-o-matic eutils multilib mercurial git-2 |
55 |
+ |
56 |
+DESCRIPTION="allows to boot Xen domU kernels from a menu.lst laying inside guest filesystem" |
57 |
+HOMEPAGE="http://xen.org/" |
58 |
+SRC_URI=" |
59 |
+ http://alpha.gnu.org/gnu/grub/grub-0.97.tar.gz |
60 |
+ http://downloads.sourceforge.net/project/libpng/zlib/1.2.3/zlib-1.2.3.tar.gz |
61 |
+ http://www.kernel.org/pub/software/utils/pciutils/pciutils-2.2.9.tar.bz2 |
62 |
+ http://download.savannah.gnu.org/releases/lwip/lwip-1.3.0.tar.gz |
63 |
+ ftp://sources.redhat.com/pub/newlib/newlib-1.16.0.tar.gz |
64 |
+ " |
65 |
+ |
66 |
+MERC_REPO="xen-unstable.hg" |
67 |
+GIT_REPO="qemu-xen-unstable.git" |
68 |
+ |
69 |
+EHG_REPO_URI="http://xenbits.xensource.com/${MERC_REPO}" |
70 |
+EGIT_REPO_URI="git://xenbits.xensource.com/${GIT_REPO}" |
71 |
+ |
72 |
+S="${WORKDIR}/${MERC_REPO}" |
73 |
+ |
74 |
+LICENSE="GPL-2" |
75 |
+SLOT="0" |
76 |
+KEYWORDS="" |
77 |
+IUSE="custom-cflags multilib" |
78 |
+ |
79 |
+DEPEND="sys-devel/gettext |
80 |
+ sys-devel/gcc" |
81 |
+ |
82 |
+RDEPEND=">=app-emulation/xen-${PV}" |
83 |
+ |
84 |
+pkg_setup() { |
85 |
+ # use emerge to fetch qemu/ioemu |
86 |
+ export "CONFIG_QEMU=${WORKDIR}/${GIT_REPO}" |
87 |
+} |
88 |
+ |
89 |
+src_unpack() { |
90 |
+ default_src_unpack |
91 |
+ |
92 |
+ # unpack xen |
93 |
+ mercurial_src_unpack |
94 |
+ |
95 |
+ local EGIT_COMMIT=$(sed -n -e "s/QEMU_TAG := \(.*\)/\1/p" "${S}"/Config.mk) |
96 |
+ |
97 |
+ # unpack ioemu repos |
98 |
+ local S=${WORKDIR}/${GIT_REPO} |
99 |
+ local EGIT_NOUNPACK=1 |
100 |
+ git-2_src_unpack |
101 |
+} |
102 |
+ |
103 |
+src_prepare() { |
104 |
+ # if the user *really* wants to use their own custom-cflags, let them |
105 |
+ if use custom-cflags; then |
106 |
+ einfo "User wants their own CFLAGS - removing defaults" |
107 |
+ # try and remove all the default custom-cflags |
108 |
+ find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \ |
109 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
110 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
111 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
112 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
113 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
114 |
+ -i {} \; |
115 |
+ fi |
116 |
+ |
117 |
+ sed -i \ |
118 |
+ -e 's/WGET=.*/WGET=cp -t . /' \ |
119 |
+ -e "s;\$(XEN_EXTFILES_URL);${DISTDIR};" \ |
120 |
+ -e 's/$(LD)/$(LD) LDFLAGS=/' \ |
121 |
+ -e 's;install-grub: pv-grub;install-grub:;' \ |
122 |
+ "${S}"/stubdom/Makefile || die |
123 |
+} |
124 |
+ |
125 |
+src_compile() { |
126 |
+ use custom-cflags || unset CFLAGS |
127 |
+ if test-flag-CC -fno-strict-overflow; then |
128 |
+ append-flags -fno-strict-overflow |
129 |
+ fi |
130 |
+ |
131 |
+ emake -C tools/include || die "prepare libelf headers failed" |
132 |
+ |
133 |
+ if use x86; then |
134 |
+ emake XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub || die "compile pv-grub_x86_32 failed" |
135 |
+ fi |
136 |
+ if use amd64; then |
137 |
+ emake XEN_TARGET_ARCH="x86_64" -C stubdom pv-grub || die "compile pv-grub_x86_64 failed" |
138 |
+ if use multilib; then |
139 |
+ multilib_toolchain_setup x86 |
140 |
+ emake XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub || die "compile pv-grub_x86_32 failed" |
141 |
+ fi |
142 |
+ fi |
143 |
+} |
144 |
+ |
145 |
+src_install() { |
146 |
+ if use x86; then |
147 |
+ emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub || die "install pv-grub_x86_32 failed" |
148 |
+ fi |
149 |
+ if use amd64; then |
150 |
+ emake XEN_TARGET_ARCH="x86_64" DESTDIR="${D}" -C stubdom install-grub || die "install pv-grub_x86_64 failed" |
151 |
+ if use multilib; then |
152 |
+ emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub || die "install pv-grub_x86_32 failed" |
153 |
+ fi |
154 |
+ fi |
155 |
+} |
156 |
+ |
157 |
+pkg_postinst() { |
158 |
+ elog "Official Xen Guide and the unoffical wiki page:" |
159 |
+ elog " http://www.gentoo.org/doc/en/xen-guide.xml" |
160 |
+ elog " http://en.gentoo-wiki.com/wiki/Xen/" |
161 |
+} |