1 |
commit: 33054afab6337ac8999ab723b948494ee4f6ee75 |
2 |
Author: Yixun Lan <dlan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 27 07:15:23 2016 +0000 |
4 |
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 27 07:36:55 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33054afa |
7 |
|
8 |
app-emulation/xen: version bump |
9 |
|
10 |
Package-Manager: portage-2.3.0_rc1 |
11 |
|
12 |
app-emulation/xen/Manifest | 2 + |
13 |
app-emulation/xen/xen-4.6.3.ebuild | 193 +++++++++++++++++++++++++++++++++++++ |
14 |
app-emulation/xen/xen-4.7.0.ebuild | 193 +++++++++++++++++++++++++++++++++++++ |
15 |
3 files changed, 388 insertions(+) |
16 |
|
17 |
diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest |
18 |
index e5177b9..3010bd8 100644 |
19 |
--- a/app-emulation/xen/Manifest |
20 |
+++ b/app-emulation/xen/Manifest |
21 |
@@ -2,6 +2,8 @@ DIST xen-4.6.0-upstream-patches-0.tar.xz 19280 SHA256 8ef2d139f86cb52d2208a17c97 |
22 |
DIST xen-4.6.0.tar.gz 19694350 SHA256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 SHA512 b4b02f306ffea360f539dd8c231b2f58c00c3638fdb665cb659c7291b475b40f1075bc59d49a6144767729e57b8bc40a1cfd9030d61de2b8fa4ac97d43655c2b WHIRLPOOL d3f01183440ca1875b6e850bd116db0c382383433e50c0902d3268e9e36b39d184fc65e925bdb5363ef4ca7a232fee15b4749c89baf789137b8a8248565c75a8 |
23 |
DIST xen-4.6.1-upstream-patches-0.tar.xz 92472 SHA256 7b32cbd57571d838ec606c5bd2b98a51e14a6bcf44d2d61007c274fa3b6b5eb6 SHA512 2f8e9273601c70eac88fb9d94bcb607bc5ea76514f9cdee0e96309b9a9d78db881d94c57a518ad5cef398fa57274b9940ba1553d0984bb5504ca27b6b62a6003 WHIRLPOOL 9b2592f33587fc85b091fbfb357d4ab4914f39286f3207a0d8aebf26259f0ebd1eb7d6bede7da9a202427cf9c7d97c11c4c84c5f90584948b1f3c32fefac5164 |
24 |
DIST xen-4.6.1.tar.gz 19693042 SHA256 44cc2fccba1e147ef4c8da0584ce0f24189c8743de0e3e9a9226da88ddb5f589 SHA512 f01a0b7874abf8b3a81432428d7ba2d5aceb9d75ae20310f8ef49a3a0df927720a51d49090f74fda7f374c779e121ad26da6966a6f2623ed1a7743b4c080427c WHIRLPOOL b4eec12118d602d1b41edee32ed7c0c61646974060bc44e3eedaf78f7c3015c151998f72573fd2bab1992263dd98f09992772334bae7826048d187de7ed022e5 |
25 |
+DIST xen-4.6.3.tar.gz 19707041 SHA256 02badfce9a037bd1bd4a94210c1f6b85467746216c71795805102b514bcf1fc4 SHA512 187a860b40c05139f22b8498a5fae1db173c3110d957147af29a56cb83b7111c9dc4946d65f9dffc847001fc01c5e9bf51886eaa1194bb9cfd0b6dbcd43a2c5c WHIRLPOOL f80fa73727218567b8d6c8d6bab9dfd577c4bb84ac737b084e4396128e8c4aa79776a277f73c283d5b12f17764b183b67fbf8596e240042dd0709f28cbab777e |
26 |
+DIST xen-4.7.0.tar.gz 20702550 SHA256 be5876144d49729572ae06142e0bb93f1c1f2695578141eff2931995add24623 SHA512 2c52c8ef145dfab7d069e79318d5d631e1106a0ddc79d88b3bacf36c7f15cea67dccb704a245e785d2a1e42c6fb6c0ad74832f564aaeec025ad7b864031f0921 WHIRLPOOL 9725ac9fe94e78aab47b0534b5ee1a190106a773bf7d6204fed736abe7069b71937717b6680833736bd02a3a3a43f2eb2162fe7c0d992ddd47d12158b5d9835f |
27 |
DIST xen-security-patches-0.tar.xz 5944 SHA256 c0456793064185f0781668264a09a2412a25e2ff8c4ce0d332204e37b94d7e96 SHA512 de812e66563e608548b220aa00c8fd71973af748a00cea79959f46a5b6893a38248d2ea455026af43f47e3f5e566d08b5a6f3d18f22e940d75d2a2ca76cec3d3 WHIRLPOOL 3e18d32798bdfe584ee8d102963090b569ec3660fd5723d8c608091e5c7d935c1edced5e258d92bf51fe06975455a3ae33dfedd01702c6076aedf97ea61f2d1b |
28 |
DIST xen-security-patches-00.tar.gz 4280 SHA256 1cb3d3d4af15202ce8ea5d6a5982b8c9a4623e565c732c64f5ec949cf55a11c0 SHA512 06e8fa8bda712564a18712640087a920545da3dc6bd6d94762f7f7fee33afb807f2d517e8d6177a683baf8ec04832acf57557f8125973f00e7de6109b3d5131b WHIRLPOOL 8b1b7caa37b73f442f440f599d9ae8d1562c6361c693b4d18540dbe7de4fa8046e3139f19dfdff35a316466ed7f017a3a99d430eb28e0716a0c6b52d8aec5b0b |
29 |
DIST xen-security-patches-01.tar.gz 4683 SHA256 ca1e565180aff5485f217735faa24bea2f7fc821d5c5a506d1854291681fdc28 SHA512 538d5df0c3b5b5277613af3a3fc11aa46a16cfdfdc88488da5020e3ad38580b8cdb12778e251c4b41c6b5cfe37d8266a599b8b15b4032491c0689e442b388847 WHIRLPOOL a22492288fa04919c60d9e7e15181bc7eb05f457b0aad0e8ece172443fd4208d4bdeb692ef713b99aa83eb030caf3dfcf1236b5d8de13e152b93096aa2e869b8 |
30 |
|
31 |
diff --git a/app-emulation/xen/xen-4.6.3.ebuild b/app-emulation/xen/xen-4.6.3.ebuild |
32 |
new file mode 100644 |
33 |
index 0000000..97198be |
34 |
--- /dev/null |
35 |
+++ b/app-emulation/xen/xen-4.6.3.ebuild |
36 |
@@ -0,0 +1,193 @@ |
37 |
+# Copyright 1999-2016 Gentoo Foundation |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+# $Id$ |
40 |
+ |
41 |
+EAPI=5 |
42 |
+ |
43 |
+PYTHON_COMPAT=( python2_7 ) |
44 |
+ |
45 |
+inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs |
46 |
+ |
47 |
+MY_PV=${PV/_/-} |
48 |
+MY_P=${PN}-${PV/_/-} |
49 |
+ |
50 |
+if [[ $PV == *9999 ]]; then |
51 |
+ inherit git-r3 |
52 |
+ KEYWORDS="" |
53 |
+ EGIT_REPO_URI="git://xenbits.xen.org/xen.git" |
54 |
+ SRC_URI="" |
55 |
+else |
56 |
+ KEYWORDS="~amd64 ~arm -x86" |
57 |
+ UPSTREAM_VER= |
58 |
+ SECURITY_VER= |
59 |
+ GENTOO_VER= |
60 |
+ |
61 |
+ [[ -n ${UPSTREAM_VER} ]] && \ |
62 |
+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
63 |
+ [[ -n ${SECURITY_VER} ]] && \ |
64 |
+ SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz" |
65 |
+ [[ -n ${GENTOO_VER} ]] && \ |
66 |
+ GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz" |
67 |
+ SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz |
68 |
+ ${UPSTREAM_PATCHSET_URI} |
69 |
+ ${SECURITY_PATCHSET_URI} |
70 |
+ ${GENTOO_PATCHSET_URI}" |
71 |
+fi |
72 |
+ |
73 |
+DESCRIPTION="The Xen virtual machine monitor" |
74 |
+HOMEPAGE="http://xen.org/" |
75 |
+LICENSE="GPL-2" |
76 |
+SLOT="0" |
77 |
+IUSE="custom-cflags debug efi flask" |
78 |
+ |
79 |
+DEPEND="${PYTHON_DEPS} |
80 |
+ efi? ( >=sys-devel/binutils-2.22[multitarget] ) |
81 |
+ !efi? ( >=sys-devel/binutils-2.22 )" |
82 |
+RDEPEND="" |
83 |
+PDEPEND="~app-emulation/xen-tools-${PV}" |
84 |
+ |
85 |
+# no tests are available for the hypervisor |
86 |
+# prevent the silliness of /usr/lib/debug/usr/lib/debug files |
87 |
+# prevent stripping of the debug info from the /usr/lib/debug/xen-syms |
88 |
+RESTRICT="test splitdebug strip" |
89 |
+ |
90 |
+# Approved by QA team in bug #144032 |
91 |
+QA_WX_LOAD="boot/xen-syms-${PV}" |
92 |
+ |
93 |
+REQUIRED_USE="arm? ( debug )" |
94 |
+ |
95 |
+S="${WORKDIR}/${MY_P}" |
96 |
+ |
97 |
+pkg_setup() { |
98 |
+ python-any-r1_pkg_setup |
99 |
+ if [[ -z ${XEN_TARGET_ARCH} ]]; then |
100 |
+ if use amd64; then |
101 |
+ export XEN_TARGET_ARCH="x86_64" |
102 |
+ elif use arm; then |
103 |
+ export XEN_TARGET_ARCH="arm32" |
104 |
+ elif use arm64; then |
105 |
+ export XEN_TARGET_ARCH="arm64" |
106 |
+ else |
107 |
+ die "Unsupported architecture!" |
108 |
+ fi |
109 |
+ fi |
110 |
+ |
111 |
+ if use flask ; then |
112 |
+ export "XSM_ENABLE=y" |
113 |
+ export "FLASK_ENABLE=y" |
114 |
+ fi |
115 |
+} |
116 |
+ |
117 |
+src_prepare() { |
118 |
+ # Upstream's patchset |
119 |
+ if [[ -n ${UPSTREAM_VER} ]]; then |
120 |
+ EPATCH_SUFFIX="patch" \ |
121 |
+ EPATCH_FORCE="yes" \ |
122 |
+ EPATCH_OPTS="-p1" \ |
123 |
+ epatch "${WORKDIR}"/patches-upstream |
124 |
+ fi |
125 |
+ |
126 |
+ # Security patchset |
127 |
+ if [[ -n ${SECURITY_VER} ]]; then |
128 |
+ einfo "Try to apply Xen Security patch set" |
129 |
+ # apply main xen patches |
130 |
+ # Two parallel systems, both work side by side |
131 |
+ # Over time they may concdense into one. This will suffice for now |
132 |
+ EPATCH_SUFFIX="patch" |
133 |
+ EPATCH_FORCE="yes" |
134 |
+ |
135 |
+ source "${WORKDIR}"/patches-security/${PV}.conf |
136 |
+ |
137 |
+ for i in ${XEN_SECURITY_MAIN}; do |
138 |
+ epatch "${WORKDIR}"/patches-security/xen/$i |
139 |
+ done |
140 |
+ fi |
141 |
+ |
142 |
+ # Gentoo's patchset |
143 |
+ if [[ -n ${GENTOO_VER} ]]; then |
144 |
+ EPATCH_SUFFIX="patch" \ |
145 |
+ EPATCH_FORCE="yes" \ |
146 |
+ epatch "${WORKDIR}"/patches-gentoo |
147 |
+ fi |
148 |
+ |
149 |
+ epatch "${FILESDIR}"/${PN}-4.6-efi.patch |
150 |
+ |
151 |
+ # Drop .config |
152 |
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
153 |
+ |
154 |
+ if use efi; then |
155 |
+ export EFI_VENDOR="gentoo" |
156 |
+ export EFI_MOUNTPOINT="boot" |
157 |
+ fi |
158 |
+ |
159 |
+ # if the user *really* wants to use their own custom-cflags, let them |
160 |
+ if use custom-cflags; then |
161 |
+ einfo "User wants their own CFLAGS - removing defaults" |
162 |
+ # try and remove all the default custom-cflags |
163 |
+ find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \ |
164 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
165 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
166 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
167 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
168 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
169 |
+ -i {} \; || die "failed to re-set custom-cflags" |
170 |
+ fi |
171 |
+ |
172 |
+ # remove -Werror for gcc-4.6's sake |
173 |
+ find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \ |
174 |
+ xargs sed -i 's/ *-Werror */ /' |
175 |
+ # not strictly necessary to fix this |
176 |
+ sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py" |
177 |
+ |
178 |
+ # Bug #575868 converted to a sed statement, typo of one char |
179 |
+ sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die |
180 |
+ |
181 |
+ epatch_user |
182 |
+} |
183 |
+ |
184 |
+src_configure() { |
185 |
+ use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" |
186 |
+ |
187 |
+ use debug && myopt="${myopt} debug=y" |
188 |
+ |
189 |
+ if use custom-cflags; then |
190 |
+ filter-flags -fPIE -fstack-protector |
191 |
+ replace-flags -O3 -O2 |
192 |
+ else |
193 |
+ unset CFLAGS |
194 |
+ unset LDFLAGS |
195 |
+ unset ASFLAGS |
196 |
+ fi |
197 |
+} |
198 |
+ |
199 |
+src_compile() { |
200 |
+ # Send raw LDFLAGS so that --as-needed works |
201 |
+ emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt} |
202 |
+} |
203 |
+ |
204 |
+src_install() { |
205 |
+ local myopt |
206 |
+ use debug && myopt="${myopt} debug=y" |
207 |
+ |
208 |
+ # The 'make install' doesn't 'mkdir -p' the subdirs |
209 |
+ if use efi; then |
210 |
+ mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die |
211 |
+ fi |
212 |
+ |
213 |
+ emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install |
214 |
+ |
215 |
+ # make install likes to throw in some extra EFI bits if it built |
216 |
+ use efi || rm -rf "${D}/usr/$(get_libdir)/efi" |
217 |
+} |
218 |
+ |
219 |
+pkg_postinst() { |
220 |
+ elog "Official Xen Guide and the unoffical wiki page:" |
221 |
+ elog " https://wiki.gentoo.org/wiki/Xen" |
222 |
+ elog " http://en.gentoo-wiki.com/wiki/Xen/" |
223 |
+ |
224 |
+ use efi && einfo "The efi executable is installed in boot/efi/gentoo" |
225 |
+ |
226 |
+ elog "You can optionally block the installation of /boot/xen-syms by an entry" |
227 |
+ elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK" |
228 |
+ elog "e.g. echo ${msg} > /etc/portage/env/xen.conf" |
229 |
+} |
230 |
|
231 |
diff --git a/app-emulation/xen/xen-4.7.0.ebuild b/app-emulation/xen/xen-4.7.0.ebuild |
232 |
new file mode 100644 |
233 |
index 0000000..97198be |
234 |
--- /dev/null |
235 |
+++ b/app-emulation/xen/xen-4.7.0.ebuild |
236 |
@@ -0,0 +1,193 @@ |
237 |
+# Copyright 1999-2016 Gentoo Foundation |
238 |
+# Distributed under the terms of the GNU General Public License v2 |
239 |
+# $Id$ |
240 |
+ |
241 |
+EAPI=5 |
242 |
+ |
243 |
+PYTHON_COMPAT=( python2_7 ) |
244 |
+ |
245 |
+inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs |
246 |
+ |
247 |
+MY_PV=${PV/_/-} |
248 |
+MY_P=${PN}-${PV/_/-} |
249 |
+ |
250 |
+if [[ $PV == *9999 ]]; then |
251 |
+ inherit git-r3 |
252 |
+ KEYWORDS="" |
253 |
+ EGIT_REPO_URI="git://xenbits.xen.org/xen.git" |
254 |
+ SRC_URI="" |
255 |
+else |
256 |
+ KEYWORDS="~amd64 ~arm -x86" |
257 |
+ UPSTREAM_VER= |
258 |
+ SECURITY_VER= |
259 |
+ GENTOO_VER= |
260 |
+ |
261 |
+ [[ -n ${UPSTREAM_VER} ]] && \ |
262 |
+ UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz" |
263 |
+ [[ -n ${SECURITY_VER} ]] && \ |
264 |
+ SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz" |
265 |
+ [[ -n ${GENTOO_VER} ]] && \ |
266 |
+ GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz" |
267 |
+ SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz |
268 |
+ ${UPSTREAM_PATCHSET_URI} |
269 |
+ ${SECURITY_PATCHSET_URI} |
270 |
+ ${GENTOO_PATCHSET_URI}" |
271 |
+fi |
272 |
+ |
273 |
+DESCRIPTION="The Xen virtual machine monitor" |
274 |
+HOMEPAGE="http://xen.org/" |
275 |
+LICENSE="GPL-2" |
276 |
+SLOT="0" |
277 |
+IUSE="custom-cflags debug efi flask" |
278 |
+ |
279 |
+DEPEND="${PYTHON_DEPS} |
280 |
+ efi? ( >=sys-devel/binutils-2.22[multitarget] ) |
281 |
+ !efi? ( >=sys-devel/binutils-2.22 )" |
282 |
+RDEPEND="" |
283 |
+PDEPEND="~app-emulation/xen-tools-${PV}" |
284 |
+ |
285 |
+# no tests are available for the hypervisor |
286 |
+# prevent the silliness of /usr/lib/debug/usr/lib/debug files |
287 |
+# prevent stripping of the debug info from the /usr/lib/debug/xen-syms |
288 |
+RESTRICT="test splitdebug strip" |
289 |
+ |
290 |
+# Approved by QA team in bug #144032 |
291 |
+QA_WX_LOAD="boot/xen-syms-${PV}" |
292 |
+ |
293 |
+REQUIRED_USE="arm? ( debug )" |
294 |
+ |
295 |
+S="${WORKDIR}/${MY_P}" |
296 |
+ |
297 |
+pkg_setup() { |
298 |
+ python-any-r1_pkg_setup |
299 |
+ if [[ -z ${XEN_TARGET_ARCH} ]]; then |
300 |
+ if use amd64; then |
301 |
+ export XEN_TARGET_ARCH="x86_64" |
302 |
+ elif use arm; then |
303 |
+ export XEN_TARGET_ARCH="arm32" |
304 |
+ elif use arm64; then |
305 |
+ export XEN_TARGET_ARCH="arm64" |
306 |
+ else |
307 |
+ die "Unsupported architecture!" |
308 |
+ fi |
309 |
+ fi |
310 |
+ |
311 |
+ if use flask ; then |
312 |
+ export "XSM_ENABLE=y" |
313 |
+ export "FLASK_ENABLE=y" |
314 |
+ fi |
315 |
+} |
316 |
+ |
317 |
+src_prepare() { |
318 |
+ # Upstream's patchset |
319 |
+ if [[ -n ${UPSTREAM_VER} ]]; then |
320 |
+ EPATCH_SUFFIX="patch" \ |
321 |
+ EPATCH_FORCE="yes" \ |
322 |
+ EPATCH_OPTS="-p1" \ |
323 |
+ epatch "${WORKDIR}"/patches-upstream |
324 |
+ fi |
325 |
+ |
326 |
+ # Security patchset |
327 |
+ if [[ -n ${SECURITY_VER} ]]; then |
328 |
+ einfo "Try to apply Xen Security patch set" |
329 |
+ # apply main xen patches |
330 |
+ # Two parallel systems, both work side by side |
331 |
+ # Over time they may concdense into one. This will suffice for now |
332 |
+ EPATCH_SUFFIX="patch" |
333 |
+ EPATCH_FORCE="yes" |
334 |
+ |
335 |
+ source "${WORKDIR}"/patches-security/${PV}.conf |
336 |
+ |
337 |
+ for i in ${XEN_SECURITY_MAIN}; do |
338 |
+ epatch "${WORKDIR}"/patches-security/xen/$i |
339 |
+ done |
340 |
+ fi |
341 |
+ |
342 |
+ # Gentoo's patchset |
343 |
+ if [[ -n ${GENTOO_VER} ]]; then |
344 |
+ EPATCH_SUFFIX="patch" \ |
345 |
+ EPATCH_FORCE="yes" \ |
346 |
+ epatch "${WORKDIR}"/patches-gentoo |
347 |
+ fi |
348 |
+ |
349 |
+ epatch "${FILESDIR}"/${PN}-4.6-efi.patch |
350 |
+ |
351 |
+ # Drop .config |
352 |
+ sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop" |
353 |
+ |
354 |
+ if use efi; then |
355 |
+ export EFI_VENDOR="gentoo" |
356 |
+ export EFI_MOUNTPOINT="boot" |
357 |
+ fi |
358 |
+ |
359 |
+ # if the user *really* wants to use their own custom-cflags, let them |
360 |
+ if use custom-cflags; then |
361 |
+ einfo "User wants their own CFLAGS - removing defaults" |
362 |
+ # try and remove all the default custom-cflags |
363 |
+ find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \ |
364 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ |
365 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ |
366 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ |
367 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ |
368 |
+ -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ |
369 |
+ -i {} \; || die "failed to re-set custom-cflags" |
370 |
+ fi |
371 |
+ |
372 |
+ # remove -Werror for gcc-4.6's sake |
373 |
+ find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \ |
374 |
+ xargs sed -i 's/ *-Werror */ /' |
375 |
+ # not strictly necessary to fix this |
376 |
+ sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py" |
377 |
+ |
378 |
+ # Bug #575868 converted to a sed statement, typo of one char |
379 |
+ sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die |
380 |
+ |
381 |
+ epatch_user |
382 |
+} |
383 |
+ |
384 |
+src_configure() { |
385 |
+ use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i" |
386 |
+ |
387 |
+ use debug && myopt="${myopt} debug=y" |
388 |
+ |
389 |
+ if use custom-cflags; then |
390 |
+ filter-flags -fPIE -fstack-protector |
391 |
+ replace-flags -O3 -O2 |
392 |
+ else |
393 |
+ unset CFLAGS |
394 |
+ unset LDFLAGS |
395 |
+ unset ASFLAGS |
396 |
+ fi |
397 |
+} |
398 |
+ |
399 |
+src_compile() { |
400 |
+ # Send raw LDFLAGS so that --as-needed works |
401 |
+ emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt} |
402 |
+} |
403 |
+ |
404 |
+src_install() { |
405 |
+ local myopt |
406 |
+ use debug && myopt="${myopt} debug=y" |
407 |
+ |
408 |
+ # The 'make install' doesn't 'mkdir -p' the subdirs |
409 |
+ if use efi; then |
410 |
+ mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die |
411 |
+ fi |
412 |
+ |
413 |
+ emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install |
414 |
+ |
415 |
+ # make install likes to throw in some extra EFI bits if it built |
416 |
+ use efi || rm -rf "${D}/usr/$(get_libdir)/efi" |
417 |
+} |
418 |
+ |
419 |
+pkg_postinst() { |
420 |
+ elog "Official Xen Guide and the unoffical wiki page:" |
421 |
+ elog " https://wiki.gentoo.org/wiki/Xen" |
422 |
+ elog " http://en.gentoo-wiki.com/wiki/Xen/" |
423 |
+ |
424 |
+ use efi && einfo "The efi executable is installed in boot/efi/gentoo" |
425 |
+ |
426 |
+ elog "You can optionally block the installation of /boot/xen-syms by an entry" |
427 |
+ elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK" |
428 |
+ elog "e.g. echo ${msg} > /etc/portage/env/xen.conf" |
429 |
+} |