Gentoo Archives: gentoo-commits

From: "Yixun Lan (dlan)" <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/xen: ChangeLog xen-4.2.5-r10.ebuild xen-4.5.0-r7.ebuild xen-4.4.2-r3.ebuild
Date: Wed, 03 Jun 2015 10:07:31
Message-Id: 20150603100725.83135A19@oystercatcher.gentoo.org
1 dlan 15/06/03 10:07:25
2
3 Modified: ChangeLog
4 Added: xen-4.2.5-r10.ebuild xen-4.5.0-r7.ebuild
5 xen-4.4.2-r3.ebuild
6 Log:
7 security bump, bug 549950, XSA-{128,129,130,131}
8
9 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0xAABEFD55)
10
11 Revision Changes Path
12 1.205 app-emulation/xen/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen/ChangeLog?rev=1.205&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen/ChangeLog?rev=1.205&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen/ChangeLog?r1=1.204&r2=1.205
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-emulation/xen/ChangeLog,v
21 retrieving revision 1.204
22 retrieving revision 1.205
23 diff -u -r1.204 -r1.205
24 --- ChangeLog 14 May 2015 09:09:06 -0000 1.204
25 +++ ChangeLog 3 Jun 2015 10:07:25 -0000 1.205
26 @@ -1,6 +1,14 @@
27 # ChangeLog for app-emulation/xen
28 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/ChangeLog,v 1.204 2015/05/14 09:09:06 dlan Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/ChangeLog,v 1.205 2015/06/03 10:07:25 dlan Exp $
31 +
32 +*xen-4.5.0-r7 (03 Jun 2015)
33 +*xen-4.4.2-r3 (03 Jun 2015)
34 +*xen-4.2.5-r10 (03 Jun 2015)
35 +
36 + 03 Jun 2015; Yixun Lan <dlan@g.o> +xen-4.2.5-r10.ebuild,
37 + +xen-4.4.2-r3.ebuild, +xen-4.5.0-r7.ebuild:
38 + security bump, bug 549950, XSA-{128,129,130,131}
39
40 14 May 2015; Yixun Lan <dlan@g.o> -xen-4.2.5-r8.ebuild,
41 -xen-4.4.2-r1.ebuild, -xen-4.5.0-r5.ebuild:
42
43
44
45 1.1 app-emulation/xen/xen-4.2.5-r10.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen/xen-4.2.5-r10.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen/xen-4.2.5-r10.ebuild?rev=1.1&content-type=text/plain
49
50 Index: xen-4.2.5-r10.ebuild
51 ===================================================================
52 # Copyright 1999-2015 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-4.2.5-r10.ebuild,v 1.1 2015/06/03 10:07:25 dlan Exp $
55
56 EAPI=5
57
58 PYTHON_COMPAT=( python2_7 )
59
60 if [[ $PV == *9999 ]]; then
61 KEYWORDS=""
62 REPO="xen-unstable.hg"
63 EHG_REPO_URI="http://xenbits.xensource.com/${REPO}"
64 S="${WORKDIR}/${REPO}"
65 live_eclass="mercurial"
66 else
67 KEYWORDS="~amd64 ~x86"
68 UPSTREAM_VER=8
69 SECURITY_VER=2
70 GENTOO_VER=
71
72 [[ -n ${UPSTREAM_VER} ]] && \
73 UPSTREAM_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
74 [[ -n ${SECURITY_VER} ]] && \
75 SECURITY_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
76 [[ -n ${GENTOO_VER} ]] && \
77 GENTOO_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
78 SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz
79 ${UPSTREAM_PATCHSET_URI}
80 ${SECURITY_PATCHSET_URI}
81 ${GENTOO_PATCHSET_URI}"
82 fi
83
84 inherit mount-boot flag-o-matic python-any-r1 toolchain-funcs eutils ${live_eclass}
85
86 DESCRIPTION="The Xen virtual machine monitor"
87 HOMEPAGE="http://xen.org/"
88 LICENSE="GPL-2"
89 SLOT="0"
90 IUSE="custom-cflags debug efi flask pae xsm"
91
92 DEPEND="${PYTHON_DEPS}
93 efi? ( >=sys-devel/binutils-2.22[multitarget] )
94 !efi? ( >=sys-devel/binutils-2.22[-multitarget] )"
95 RDEPEND=""
96 PDEPEND="~app-emulation/xen-tools-${PV}"
97
98 RESTRICT="test"
99
100 # Approved by QA team in bug #144032
101 QA_WX_LOAD="boot/xen-syms-${PV}"
102
103 REQUIRED_USE="
104 flask? ( xsm )
105 "
106
107 pkg_setup() {
108 python-any-r1_pkg_setup
109 if [[ -z ${XEN_TARGET_ARCH} ]]; then
110 if use x86 && use amd64; then
111 die "Confusion! Both x86 and amd64 are set in your use flags!"
112 elif use x86; then
113 export XEN_TARGET_ARCH="x86_32"
114 elif use amd64; then
115 export XEN_TARGET_ARCH="x86_64"
116 else
117 die "Unsupported architecture!"
118 fi
119 fi
120
121 if use flask ; then
122 export "XSM_ENABLE=y"
123 export "FLASK_ENABLE=y"
124 elif use xsm ; then
125 export "XSM_ENABLE=y"
126 fi
127 }
128
129 src_prepare() {
130 # Upstream's patchset
131 if [[ -n ${UPSTREAM_VER} ]]; then
132 EPATCH_SUFFIX="patch" \
133 EPATCH_FORCE="yes" \
134 EPATCH_OPTS="-p1" \
135 epatch "${WORKDIR}"/patches-upstream
136 fi
137
138 # Security patchset
139 if [[ -n ${SECURITY_VER} ]]; then
140 EPATCH_SUFFIX="patch" \
141 EPATCH_FORCE="yes" \
142 EPATCH_OPTS="-p1" \
143 epatch "${WORKDIR}/patches-security/${PV}"
144 fi
145
146 # Gentoo's patchset
147 if [[ -n ${GENTOO_VER} ]]; then
148 EPATCH_SUFFIX="patch" \
149 EPATCH_FORCE="yes" \
150 epatch "${WORKDIR}"/patches-gentoo
151 fi
152
153 # Drop .config and fix gcc-4.6
154 epatch "${FILESDIR}"/${PN/-pvgrub/}-4-fix_dotconfig-gcc.patch
155
156 if use efi; then
157 epatch "${FILESDIR}"/${PN}-4.2-efi.patch
158 export EFI_VENDOR="gentoo"
159 export EFI_MOUNTPOINT="boot"
160 fi
161
162 # if the user *really* wants to use their own custom-cflags, let them
163 if use custom-cflags; then
164 einfo "User wants their own CFLAGS - removing defaults"
165 # try and remove all the default custom-cflags
166 find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
167 -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
168 -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
169 -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
170 -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
171 -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
172 -i {} \; || die "failed to re-set custom-cflags"
173 fi
174
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 epatch_user
179 }
180
181 src_configure() {
182 use debug && myopt="${myopt} debug=y"
183 use pae && myopt="${myopt} pae=y"
184
185 if use custom-cflags; then
186 filter-flags -fPIE -fstack-protector
187 replace-flags -O3 -O2
188 else
189 unset CFLAGS
190 fi
191 }
192
193 src_compile() {
194 # Send raw LDFLAGS so that --as-needed works
195 emake CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
196 }
197
198 src_install() {
199 local myopt
200 use debug && myopt="${myopt} debug=y"
201 use pae && myopt="${myopt} pae=y"
202
203 # The 'make install' doesn't 'mkdir -p' the subdirs
204 if use efi; then
205 mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
206 fi
207
208 emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
209 }
210
211 pkg_postinst() {
212 elog "Official Xen Guide and the unoffical wiki page:"
213 elog " https://wiki.gentoo.org/wiki/Xen"
214 elog " http://en.gentoo-wiki.com/wiki/Xen/"
215
216 use pae && ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!"
217 use efi && einfo "The efi executable is installed in boot/efi/gentoo"
218 }
219
220
221
222 1.1 app-emulation/xen/xen-4.5.0-r7.ebuild
223
224 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen/xen-4.5.0-r7.ebuild?rev=1.1&view=markup
225 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen/xen-4.5.0-r7.ebuild?rev=1.1&content-type=text/plain
226
227 Index: xen-4.5.0-r7.ebuild
228 ===================================================================
229 # Copyright 1999-2015 Gentoo Foundation
230 # Distributed under the terms of the GNU General Public License v2
231 # $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-4.5.0-r7.ebuild,v 1.1 2015/06/03 10:07:25 dlan Exp $
232
233 EAPI=5
234
235 PYTHON_COMPAT=( python2_7 )
236
237 MY_PV=${PV/_/-}
238 MY_P=${PN}-${PV/_/-}
239
240 if [[ $PV == *9999 ]]; then
241 KEYWORDS=""
242 EGIT_REPO_URI="git://xenbits.xen.org/${PN}.git"
243 live_eclass="git-2"
244 else
245 KEYWORDS="~arm ~arm64 ~amd64"
246 UPSTREAM_VER=5
247 SECURITY_VER=2
248 GENTOO_VER=
249
250 [[ -n ${UPSTREAM_VER} ]] && \
251 UPSTREAM_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
252 [[ -n ${SECURITY_VER} ]] && \
253 SECURITY_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
254 [[ -n ${GENTOO_VER} ]] && \
255 GENTOO_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
256 SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
257 ${UPSTREAM_PATCHSET_URI}
258 ${SECURITY_PATCHSET_URI}
259 ${GENTOO_PATCHSET_URI}"
260
261 fi
262
263 inherit mount-boot flag-o-matic python-any-r1 toolchain-funcs eutils ${live_eclass}
264
265 DESCRIPTION="The Xen virtual machine monitor"
266 HOMEPAGE="http://xen.org/"
267 LICENSE="GPL-2"
268 SLOT="0"
269 IUSE="custom-cflags debug efi flask xsm"
270
271 DEPEND="${PYTHON_DEPS}
272 efi? ( >=sys-devel/binutils-2.22[multitarget] )
273 !efi? ( >=sys-devel/binutils-2.22[-multitarget] )"
274 RDEPEND=""
275 PDEPEND="~app-emulation/xen-tools-${PV}"
276
277 RESTRICT="test"
278
279 # Approved by QA team in bug #144032
280 QA_WX_LOAD="boot/xen-syms-${PV}"
281
282 REQUIRED_USE="flask? ( xsm )
283 arm? ( debug )"
284
285 S="${WORKDIR}/${MY_P}"
286
287 pkg_setup() {
288 python-any-r1_pkg_setup
289 if [[ -z ${XEN_TARGET_ARCH} ]]; then
290 if use x86 && use amd64; then
291 die "Confusion! Both x86 and amd64 are set in your use flags!"
292 elif use x86; then
293 export XEN_TARGET_ARCH="x86_32"
294 elif use amd64; then
295 export XEN_TARGET_ARCH="x86_64"
296 elif use arm; then
297 export XEN_TARGET_ARCH="arm32"
298 elif use arm64; then
299 export XEN_TARGET_ARCH="arm64"
300 else
301 die "Unsupported architecture!"
302 fi
303 fi
304
305 if use flask ; then
306 export "XSM_ENABLE=y"
307 export "FLASK_ENABLE=y"
308 elif use xsm ; then
309 export "XSM_ENABLE=y"
310 fi
311 }
312
313 src_prepare() {
314 # Upstream's patchset
315 if [[ -n ${UPSTREAM_VER} ]]; then
316 EPATCH_SUFFIX="patch" \
317 EPATCH_FORCE="yes" \
318 EPATCH_OPTS="-p1" \
319 epatch "${WORKDIR}"/patches-upstream
320 fi
321
322 # Security patchset
323 if [[ -n ${SECURITY_VER} ]]; then
324 EPATCH_SUFFIX="patch" \
325 EPATCH_FORCE="yes" \
326 EPATCH_OPTS="-p1" \
327 epatch "${WORKDIR}/patches-security/${PV}"
328 fi
329
330 # Gentoo's patchset
331 if [[ -n ${GENTOO_VER} ]]; then
332 EPATCH_SUFFIX="patch" \
333 EPATCH_FORCE="yes" \
334 epatch "${WORKDIR}"/patches-gentoo
335 fi
336
337 # Drop .config
338 sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
339
340 if use efi; then
341 epatch "${FILESDIR}"/${PN}-4.5-efi.patch
342 export EFI_VENDOR="gentoo"
343 export EFI_MOUNTPOINT="boot"
344 fi
345
346 # if the user *really* wants to use their own custom-cflags, let them
347 if use custom-cflags; then
348 einfo "User wants their own CFLAGS - removing defaults"
349 # try and remove all the default custom-cflags
350 find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
351 -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
352 -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
353 -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
354 -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
355 -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
356 -i {} \; || die "failed to re-set custom-cflags"
357 fi
358
359 # remove -Werror for gcc-4.6's sake
360 find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
361 xargs sed -i 's/ *-Werror */ /'
362 # not strictly necessary to fix this
363 sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
364
365 epatch_user
366 }
367
368 src_configure() {
369 use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
370
371 use debug && myopt="${myopt} debug=y"
372
373 if use custom-cflags; then
374 filter-flags -fPIE -fstack-protector
375 replace-flags -O3 -O2
376 else
377 unset CFLAGS
378 fi
379 }
380
381 src_compile() {
382 # Send raw LDFLAGS so that --as-needed works
383 emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
384 }
385
386 src_install() {
387 local myopt
388 use debug && myopt="${myopt} debug=y"
389
390 # The 'make install' doesn't 'mkdir -p' the subdirs
391 if use efi; then
392 mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
393 fi
394
395 emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
396 }
397
398 pkg_postinst() {
399 elog "Official Xen Guide and the unoffical wiki page:"
400 elog " https://wiki.gentoo.org/wiki/Xen"
401 elog " http://en.gentoo-wiki.com/wiki/Xen/"
402
403 use efi && einfo "The efi executable is installed in boot/efi/gentoo"
404 }
405
406
407
408 1.1 app-emulation/xen/xen-4.4.2-r3.ebuild
409
410 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen/xen-4.4.2-r3.ebuild?rev=1.1&view=markup
411 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/xen/xen-4.4.2-r3.ebuild?rev=1.1&content-type=text/plain
412
413 Index: xen-4.4.2-r3.ebuild
414 ===================================================================
415 # Copyright 1999-2015 Gentoo Foundation
416 # Distributed under the terms of the GNU General Public License v2
417 # $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-4.4.2-r3.ebuild,v 1.1 2015/06/03 10:07:25 dlan Exp $
418
419 EAPI=5
420
421 PYTHON_COMPAT=( python2_7 )
422
423 MY_PV=${PV/_/-}
424 MY_P=${PN}-${PV/_/-}
425
426 if [[ $PV == *9999 ]]; then
427 KEYWORDS=""
428 EGIT_REPO_URI="git://xenbits.xen.org/${PN}.git"
429 live_eclass="git-2"
430 else
431 KEYWORDS="~amd64 ~arm -x86"
432 UPSTREAM_VER=1
433 SECURITY_VER=2
434 GENTOO_VER=
435
436 [[ -n ${UPSTREAM_VER} ]] && \
437 UPSTREAM_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
438 [[ -n ${SECURITY_VER} ]] && \
439 SECURITY_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
440 [[ -n ${GENTOO_VER} ]] && \
441 GENTOO_PATCHSET_URI="http://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
442 SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
443 ${UPSTREAM_PATCHSET_URI}
444 ${SECURITY_PATCHSET_URI}
445 ${GENTOO_PATCHSET_URI}"
446
447 fi
448
449 inherit mount-boot flag-o-matic python-any-r1 toolchain-funcs eutils ${live_eclass}
450
451 DESCRIPTION="The Xen virtual machine monitor"
452 HOMEPAGE="http://xen.org/"
453 LICENSE="GPL-2"
454 SLOT="0"
455 IUSE="custom-cflags debug efi flask xsm"
456
457 DEPEND="${PYTHON_DEPS}
458 efi? ( >=sys-devel/binutils-2.22[multitarget] )
459 !efi? ( >=sys-devel/binutils-2.22[-multitarget] )"
460 RDEPEND=""
461 PDEPEND="~app-emulation/xen-tools-${PV}"
462
463 RESTRICT="test"
464
465 # Approved by QA team in bug #144032
466 QA_WX_LOAD="boot/xen-syms-${PV}"
467
468 REQUIRED_USE="flask? ( xsm )
469 arm? ( debug )"
470
471 S="${WORKDIR}/${MY_P}"
472
473 pkg_setup() {
474 python-any-r1_pkg_setup
475 if [[ -z ${XEN_TARGET_ARCH} ]]; then
476 if use x86 && use amd64; then
477 die "Confusion! Both x86 and amd64 are set in your use flags!"
478 elif use x86; then
479 export XEN_TARGET_ARCH="x86_32"
480 elif use amd64; then
481 export XEN_TARGET_ARCH="x86_64"
482 elif use arm; then
483 export XEN_TARGET_ARCH="arm32"
484 else
485 die "Unsupported architecture!"
486 fi
487 fi
488
489 if use flask ; then
490 export "XSM_ENABLE=y"
491 export "FLASK_ENABLE=y"
492 elif use xsm ; then
493 export "XSM_ENABLE=y"
494 fi
495 }
496
497 src_prepare() {
498 # Upstream's patchset
499 if [[ -n ${UPSTREAM_VER} ]]; then
500 EPATCH_SUFFIX="patch" \
501 EPATCH_FORCE="yes" \
502 EPATCH_OPTS="-p1" \
503 epatch "${WORKDIR}"/patches-upstream
504 fi
505
506 # Security patchset
507 if [[ -n ${SECURITY_VER} ]]; then
508 EPATCH_SUFFIX="patch" \
509 EPATCH_FORCE="yes" \
510 EPATCH_OPTS="-p1" \
511 epatch "${WORKDIR}/patches-security/${PV}"
512 fi
513
514 # Gentoo's patchset
515 if [[ -n ${GENTOO_VER} ]]; then
516 EPATCH_SUFFIX="patch" \
517 EPATCH_FORCE="yes" \
518 epatch "${WORKDIR}"/patches-gentoo
519 fi
520
521 # Drop .config
522 sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
523
524 if use efi; then
525 epatch "${FILESDIR}"/${PN}-4.4-efi.patch
526 export EFI_VENDOR="gentoo"
527 export EFI_MOUNTPOINT="boot"
528 fi
529
530 # if the user *really* wants to use their own custom-cflags, let them
531 if use custom-cflags; then
532 einfo "User wants their own CFLAGS - removing defaults"
533 # try and remove all the default custom-cflags
534 find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
535 -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
536 -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
537 -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
538 -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
539 -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
540 -i {} \; || die "failed to re-set custom-cflags"
541 fi
542
543 # remove -Werror for gcc-4.6's sake
544 find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
545 xargs sed -i 's/ *-Werror */ /'
546 # not strictly necessary to fix this
547 sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
548
549 epatch_user
550 }
551
552 src_configure() {
553 use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
554
555 use debug && myopt="${myopt} debug=y"
556
557 if use custom-cflags; then
558 filter-flags -fPIE -fstack-protector
559 replace-flags -O3 -O2
560 else
561 unset CFLAGS
562 fi
563 }
564
565 src_compile() {
566 # Send raw LDFLAGS so that --as-needed works
567 emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
568 }
569
570 src_install() {
571 local myopt
572 use debug && myopt="${myopt} debug=y"
573
574 # The 'make install' doesn't 'mkdir -p' the subdirs
575 if use efi; then
576 mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
577 fi
578
579 emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
580 }
581
582 pkg_postinst() {
583 elog "Official Xen Guide and the unoffical wiki page:"
584 elog " https://wiki.gentoo.org/wiki/Xen"
585 elog " http://en.gentoo-wiki.com/wiki/Xen/"
586
587 use efi && einfo "The efi executable is installed in boot/efi/gentoo"
588 }