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

Contents of /app-emulation/xen/xen-3.3.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Tue Oct 27 22:14:43 2009 UTC (9 years, 1 month ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Removing old versions for #287936
(Portage version: 2.2_rc46/cvs/Linux x86_64)

1 # Copyright 1999-2009 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.3.1-r1.ebuild,v 1.2 2009/06/27 07:13:43 patrick Exp $
4
5 inherit mount-boot flag-o-matic toolchain-funcs
6
7 DESCRIPTION="The Xen virtual machine monitor"
8 HOMEPAGE="http://xen.org/"
9 SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="0"
13 KEYWORDS="~amd64 ~x86"
14 IUSE="debug custom-cflags pae acm flask xsm"
15
16 RDEPEND="|| ( sys-boot/grub
17 sys-boot/grub-static )
18 >=sys-kernel/xen-sources-2.6.18"
19 PDEPEND="~app-emulation/xen-tools-${PV}"
20
21 RESTRICT="test"
22
23 # Approved by QA team in bug #144032
24 QA_WX_LOAD="boot/xen-syms-${PV}"
25
26 pkg_setup() {
27 if [[ -z ${XEN_TARGET_ARCH} ]]; then
28 if use x86 && use amd64; then
29 die "Confusion! Both x86 and amd64 are set in your use flags!"
30 elif use x86; then
31 export XEN_TARGET_ARCH="x86_32"
32 elif use amd64; then
33 export XEN_TARGET_ARCH="x86_64"
34 else
35 die "Unsupported architecture!"
36 fi
37 fi
38
39 if use xsm ; then
40 export "XSM_ENABLE=y"
41 use acm && export "ACM_SECURITY=y"
42 if use flask ; then
43 ! use acm && export "FLASK_ENABLE=y"
44 use acm && ewarn "Both acm and flask XSM specified, defaulting to acm."
45 fi
46 elif use acm || use flask ; then
47 ewarn "acm and flask require USE=xsm to be set, dropping use flags"
48 fi
49 }
50
51 src_unpack() {
52 unpack ${A}
53 cd "${S}"
54
55 # Fix unexport $target in xen-setup
56 epatch "${FILESDIR}/"${PN}-3.3.0-unexported-target-fix.patch
57
58 # if the user *really* wants to use their own custom-cflags, let them
59 if use custom-cflags; then
60 einfo "User wants their own CFLAGS - removing defaults"
61 # try and remove all the default custom-cflags
62 find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
63 -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
64 -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
65 -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
66 -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
67 -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
68 -i {} \;
69 fi
70 }
71
72 src_compile() {
73 local myopt
74 use debug && myopt="${myopt} debug=y"
75 use pae && myopt="${myopt} pae=y"
76
77 if use custom-cflags; then
78 filter-flags -fPIE -fstack-protector
79 replace-flags -O3 -O2
80 else
81 unset CFLAGS
82 fi
83
84 # Send raw LDFLAGS so that --as-needed works
85 emake CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" -C xen ${myopt} || die "compile failed"
86 }
87
88 src_install() {
89 local myopt
90 use debug && myopt="${myopt} debug=y"
91 use pae && myopt="${myopt} pae=y"
92
93 emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install || die "install failed"
94 }
95
96 pkg_postinst() {
97 elog "Official Xen Guide and the unoffical wiki page:"
98 elog " http://www.gentoo.org/doc/en/xen-guide.xml"
99 elog " http://en.gentoo-wiki.com/wiki/Xen/"
100
101 if use pae; then
102 echo
103 ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!"
104 fi
105 }

  ViewVC Help
Powered by ViewVC 1.1.20