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

Contents of /app-emulation/xen/xen-4.3.1-r4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Fri Feb 7 10:19:00 2014 UTC (4 years, 10 months ago) by idella4
Branch: MAIN
Changes since 1.2: +1 -1 lines
Returned xen-4.3.1-r4.ebuild, sheduled for probable stablising soon

(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)

1 dlan 1.1 # Copyright 1999-2014 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 idella4 1.3 # $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/Attic/xen-4.3.1-r4.ebuild,v 1.2 2014/02/07 08:21:21 idella4 dead $
4 dlan 1.1
5     EAPI=5
6    
7     PYTHON_COMPAT=( python2_7 )
8    
9     if [[ $PV == *9999 ]]; then
10     KEYWORDS=""
11     REPO="xen-unstable.hg"
12     EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
13     S="${WORKDIR}/${REPO}"
14     live_eclass="mercurial"
15     else
16     # Set to match entry in stable 4.3.1-r1, Bug 493944
17     KEYWORDS="~amd64 -x86"
18     SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
19     fi
20    
21     inherit mount-boot flag-o-matic python-any-r1 toolchain-funcs eutils ${live_eclass}
22    
23     DESCRIPTION="The Xen virtual machine monitor"
24     HOMEPAGE="http://xen.org/"
25     LICENSE="GPL-2"
26     SLOT="0"
27     IUSE="custom-cflags debug efi flask xsm"
28    
29     DEPEND="${PYTHON_DEPS}
30     efi? ( >=sys-devel/binutils-2.22[multitarget] )
31     !efi? ( >=sys-devel/binutils-2.22[-multitarget] )"
32     RDEPEND=""
33     PDEPEND="~app-emulation/xen-tools-${PV}"
34    
35     RESTRICT="test"
36    
37     # Approved by QA team in bug #144032
38     QA_WX_LOAD="boot/xen-syms-${PV}"
39    
40     REQUIRED_USE="flask? ( xsm )"
41    
42     # Security patches
43     XSA_PATCHES=(
44     "${FILESDIR}"/${PN}-CVE-2013-4375-XSA-71.patch
45     "${FILESDIR}"/${PN}-CVE-2013-4494-XSA-73.patch
46     "${FILESDIR}"/${PN}-4.3-CVE-2013-6375-XSA-75.patch
47     "${FILESDIR}"/${PN}-CVE-2013-6375-XSA-78.patch
48     "${FILESDIR}"/${PN}-CVE-2013-6885-XSA-82.patch
49     "${FILESDIR}"/${PN}-4.3-CVE-2013-4553-XSA-74.patch
50     "${FILESDIR}"/${PN}-CVE-2013-4554-XSA-76.patch
51     "${FILESDIR}"/${PN}-CVE-2013-6400-XSA-80.patch
52     "${FILESDIR}"/${PN}-4-XSA-83.patch #bug #499054
53     "${FILESDIR}"/${PN}-4.3-XSA-87.patch #bug #499124
54     )
55    
56     pkg_setup() {
57     python-any-r1_pkg_setup
58     if [[ -z ${XEN_TARGET_ARCH} ]]; then
59     if use x86 && use amd64; then
60     die "Confusion! Both x86 and amd64 are set in your use flags!"
61     elif use x86; then
62     export XEN_TARGET_ARCH="x86_32"
63     elif use amd64; then
64     export XEN_TARGET_ARCH="x86_64"
65     else
66     die "Unsupported architecture!"
67     fi
68     fi
69    
70     if use flask ; then
71     export "XSM_ENABLE=y"
72     export "FLASK_ENABLE=y"
73     elif use xsm ; then
74     export "XSM_ENABLE=y"
75     fi
76     }
77    
78     src_prepare() {
79     # Drop .config and fix gcc-4.6
80     epatch "${FILESDIR}"/${PN/-pvgrub/}-4.3-fix_dotconfig-gcc.patch
81    
82     if use efi; then
83     epatch "${FILESDIR}"/${PN}-4.2-efi.patch
84     export EFI_VENDOR="gentoo"
85     export EFI_MOUNTPOINT="boot"
86     fi
87    
88     # if the user *really* wants to use their own custom-cflags, let them
89     if use custom-cflags; then
90     einfo "User wants their own CFLAGS - removing defaults"
91     # try and remove all the default custom-cflags
92     find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
93     -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
94     -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
95     -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
96     -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
97     -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
98     -i {} \; || die "failed to re-set custom-cflags"
99     fi
100    
101     # not strictly necessary to fix this
102     sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
103    
104     [[ ${XSA_PATCHES[@]} ]] && epatch "${XSA_PATCHES[@]}"
105    
106     epatch_user
107     }
108    
109     src_configure() {
110     use debug && myopt="${myopt} debug=y"
111    
112     if use custom-cflags; then
113     filter-flags -fPIE -fstack-protector
114     replace-flags -O3 -O2
115     else
116     unset CFLAGS
117     fi
118     }
119    
120     src_compile() {
121     # Send raw LDFLAGS so that --as-needed works
122     emake CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
123     }
124    
125     src_install() {
126     local myopt
127     use debug && myopt="${myopt} debug=y"
128    
129     # The 'make install' doesn't 'mkdir -p' the subdirs
130     if use efi; then
131     mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
132     fi
133    
134     emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
135     }
136    
137     pkg_postinst() {
138     elog "Official Xen Guide and the unoffical wiki page:"
139     elog " http://www.gentoo.org/doc/en/xen-guide.xml"
140     elog " http://en.gentoo-wiki.com/wiki/Xen/"
141    
142     use efi && einfo "The efi executable is installed in boot/efi/gentoo"
143     }

  ViewVC Help
Powered by ViewVC 1.1.20