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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Sep 11 14:48:15 2011 UTC (7 years, 3 months ago) by alexxy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
[app-emulation/xen] Sync live ebuild with 4.1.1, drop acm since its deprecated upstream.  Input from Ian Delaney aka idell4

(Portage version: 2.2.0_alpha55/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20