/[gentoo-x86]/app-emulation/xen/xen-3.1.1.ebuild
Gentoo

Contents of /app-emulation/xen/xen-3.1.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sat Nov 17 00:13:55 2007 UTC (10 years, 8 months ago) by marineam
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Bump to 3.1.2, clean out old versions
(Portage version: 2.1.3.9)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-3.1.1.ebuild,v 1.1 2007/10/15 18:33:40 marineam Exp $
4
5 inherit mount-boot flag-o-matic
6
7 DESCRIPTION="The Xen virtual machine monitor"
8 HOMEPAGE="http://www.xensource.com/xen/xen/"
9 #SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/src.tgz/xen-${PV}-src.tgz"
10 #S="${WORKDIR}/xen-${PV}-src"
11
12 # Temporary while we wait on the upstream tarball
13 SRC_URI="http://dev.gentoo.org/~marineam/files/xen/xen-${PV}.tgz"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE="debug custom-cflags pae"
19
20 RDEPEND="|| ( sys-boot/grub
21 sys-boot/grub-static )
22 >=sys-kernel/xen-sources-2.6.18"
23 PDEPEND="~app-emulation/xen-tools-${PV}"
24
25 RESTRICT="test"
26
27 # Approved by QA team in bug #144032
28 QA_WX_LOAD="boot/xen-syms-${PV}"
29
30 pkg_setup() {
31 if [[ -z ${XEN_TARGET_ARCH} ]]; then
32 if use x86 && use amd64; then
33 die "Confusion! Both x86 and amd64 are set in your use flags!"
34 elif use x86; then
35 export XEN_TARGET_ARCH="x86_32"
36 elif use amd64; then
37 export XEN_TARGET_ARCH="x86_64"
38 else
39 die "Unsupported architecture!"
40 fi
41 fi
42 }
43
44 src_unpack() {
45 unpack ${A}
46 # if the user *really* wants to use their own custom-cflags, let them
47 if use custom-cflags; then
48 einfo "User wants their own CFLAGS - removing defaults"
49 # try and remove all the default custom-cflags
50 find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
51 -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
52 -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
53 -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
54 -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
55 -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
56 -i {} \;
57 fi
58 }
59
60 src_compile() {
61 local myopt
62 use debug && myopt="${myopt} debug=y"
63 use pae && myopt="${myopt} pae=y"
64
65 if use custom-cflags; then
66 filter-flags -fPIE -fstack-protector
67 else
68 unset CFLAGS
69 fi
70
71 # Send raw LDFLAGS so that --as-needed works
72 emake LDFLAGS="$(raw-ldflags)" -C xen ${myopt} || die "compile failed"
73 }
74
75 src_install() {
76 local myopt
77 use debug && myopt="${myopt} debug=y"
78 use pae && myopt="${myopt} pae=y"
79
80 emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install || die "install failed"
81 }
82
83 pkg_postinst() {
84 elog "Official Xen Guide and the unoffical wiki page:"
85 elog " http://www.gentoo.org/doc/en/xen-guide.xml"
86 elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
87
88 echo
89 elog "Note: xen tools have been moved to app-emulation/xen-tools"
90
91 if use pae; then
92 echo
93 ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!"
94 fi
95 }

  ViewVC Help
Powered by ViewVC 1.1.20