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

Contents of /app-emulation/xen/xen-3.0.4_p1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sat Nov 17 00:13:55 2007 UTC (10 years, 10 months ago) by marineam
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +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.0.4_p1.ebuild,v 1.5 2007/08/27 17:19:12 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 MY_PV=${PV/_p/_}
10 SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV/_/-}/src.tgz/xen-${MY_PV}-src.tgz"
11 S="${WORKDIR}/xen-${MY_PV}-src"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="debug custom-cflags pae"
17
18 RDEPEND="|| ( sys-boot/grub
19 sys-boot/grub-static )
20 >=sys-kernel/xen-sources-2.6.16.33"
21 PDEPEND="~app-emulation/xen-tools-${PV}"
22
23 RESTRICT="test"
24
25 # Approved by QA team in bug #144032
26 QA_WX_LOAD="boot/xen-syms-${MY_PV/_/-}"
27
28 pkg_setup() {
29 if [[ -z ${XEN_TARGET_ARCH} ]]; then
30 if use x86 && use amd64; then
31 die "Confusion! Both x86 and amd64 are set in your use flags!"
32 elif use x86; then
33 export XEN_TARGET_ARCH="x86_32"
34 elif use amd64; then
35 export XEN_TARGET_ARCH="x86_64"
36 else
37 die "Unsupported architecture!"
38 fi
39 fi
40 }
41
42 src_unpack() {
43 unpack ${A}
44 # if the user *really* wants to use their own custom-cflags, let them
45 if use custom-cflags; then
46 einfo "User wants their own CFLAGS - removing defaults"
47 # try and remove all the default custom-cflags
48 find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
49 -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
50 -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
51 -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
52 -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
53 -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
54 -i {} \;
55 fi
56 }
57
58 src_compile() {
59 local myopt
60 use debug && myopt="${myopt} debug=y"
61 use pae && myopt="${myopt} pae=y"
62
63 if use custom-cflags; then
64 filter-flags -fPIE -fstack-protector
65 else
66 unset CFLAGS
67 fi
68
69 # Send raw LDFLAGS so that --as-needed works
70 emake LDFLAGS="$(raw-ldflags)" -C xen ${myopt} || die "compile failed"
71 }
72
73 src_install() {
74 local myopt
75 use debug && myopt="${myopt} debug=y"
76 use pae && myopt="${myopt} pae=y"
77
78 emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" ${myopt} install-xen || die "install failed"
79 }
80
81 pkg_postinst() {
82 elog "Please visit the Xen and Gentoo wiki:"
83 elog "http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
84
85 echo
86 elog "Note: xen tools have been moved to app-emulation/xen-tools"
87
88 if use pae; then
89 echo
90 ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!"
91 fi
92 }

  ViewVC Help
Powered by ViewVC 1.1.20