Gentoo Archives: gentoo-commits

From: Yixun Lan <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-pvgrub/
Date: Wed, 22 Nov 2017 01:45:39
Message-Id: 1511315116.1f344e6c40044f590f994eef0fc6e00ff1ebc12f.dlan@gentoo
1 commit: 1f344e6c40044f590f994eef0fc6e00ff1ebc12f
2 Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 21 05:34:13 2017 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Wed Nov 22 01:45:16 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f344e6c
7
8 app-emulation/xen-pvgrub: drop old
9
10 Package-Manager: Portage-2.3.10, Repoman-2.3.3
11
12 app-emulation/xen-pvgrub/Manifest | 2 -
13 app-emulation/xen-pvgrub/xen-pvgrub-4.7.2.ebuild | 161 -----------------------
14 app-emulation/xen-pvgrub/xen-pvgrub-4.7.3.ebuild | 161 -----------------------
15 app-emulation/xen-pvgrub/xen-pvgrub-4.8.2.ebuild | 161 -----------------------
16 4 files changed, 485 deletions(-)
17
18 diff --git a/app-emulation/xen-pvgrub/Manifest b/app-emulation/xen-pvgrub/Manifest
19 index 469e985d25e..c363c875810 100644
20 --- a/app-emulation/xen-pvgrub/Manifest
21 +++ b/app-emulation/xen-pvgrub/Manifest
22 @@ -3,7 +3,5 @@ DIST lwip-1.3.0.tar.gz 398933 SHA256 772e4d550e07826665ed0528c071dd5404ef7dbe182
23 DIST newlib-1.16.0.tar.gz 12024353 SHA256 db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07 SHA512 40eb96bbc6736a16b6399e0cdb73e853d0d90b685c967e77899183446664d64570277a633fdafdefc351b46ce210a99115769a1d9f47ac749d7e82837d4d1ac3 WHIRLPOOL 47f7afd525f482d79d9e964f0e75ee8a77e59551bd19cd94f9b95ac3af9406afa381c9d8d224f76eb568441ab613b2b194f8e5be50aa222f9ed2d9b9761829db
24 DIST pciutils-2.2.9.tar.bz2 212265 SHA256 f60ae61cfbd5da1d849d0beaa21f593c38dac9359f0b3ddc612f447408265b24 SHA512 2b3d98d027e46d8c08037366dde6f0781ca03c610ef2b380984639e4ef39899ed8d8b8e4cd9c9dc54df101279b95879bd66bfd4d04ad07fef41e847ea7ae32b5 WHIRLPOOL ce801947fcf7ba0b56710029f25e746d3e03a80699af9d3570efcd417b12b546264f286b2e78b1402cca766c08e35bdd0ff0a692ab4ad419295f00bcfe91130e
25 DIST polarssl-1.1.4-gpl.tgz 611340 SHA256 2d29fd04a0d0ba29dae6bd29fb418944c08d3916665dcca74afb297ef37584b6 SHA512 88da614e4d3f4409c4fd3bb3e44c7587ba051e3fed4e33d526069a67e8180212e1ea22da984656f50e290049f60ddca65383e5983c0f8884f648d71f698303ad WHIRLPOOL 39448c00dda142a836a78381b446c7b586272a44d8afc867a7ea702228f105bb2adffe757bd6c23af090cff64ef32e7af0c373dccc5145ff4c11552cf3f28383
26 -DIST xen-4.7.2.tar.gz 20714281 SHA256 61494a56d9251e2108080f95b0dc8e3d175f1ba4da34603fc07b91cfebf358d5 SHA512 8f447e7feffec81fea5b5a4098968b8b8cebc6989e7b6a845413317644d5d328d6f12181d09266366200878ab6a29ab34c7235c1af7b55463a3fdaea40ee1500 WHIRLPOOL 27f3fd88846724e03bf9bb53133046cb79139950c9162dd9c9a85798e169259f73dc2fe4212e750ce9a8fd1d0abd99f1f76108faceb7bf1934ce0495377ee756
27 -DIST xen-4.7.3.tar.gz 20722625 SHA256 5b5385b476e59e4cf31ecc6dd605df38814b83432b8e8d917f18c8edfdfb708f SHA512 df596bef7f0f0e7f35246fb025913721dae5aa91da27f1b47a49256e9faa8f7dcb80e8c4679345c19614093c02059b6ced54fc51e6900a372b0e76b4ad827126 WHIRLPOOL 9e88db149e216651711cd56830fba33d587de60d57d53fd3ab3db231319f74e4e88222bf1b2bb9b20fea68739bccd4b26304c73a0ae25aad6dbbac64681e3a62
28 DIST xen-4.8.2.tar.gz 22522336 SHA256 cb1cc2f0985e3d8651215e5d24c1fcc3036994fa7cc495a5091a2c85ece2aff9 SHA512 7805531f73d23ecfff3439770e62d387f4254a444875670d53a0a739323e5d4d8f8fcc478f8936ee1ae8aff3e0229549e47c01c606365a8ce060dd5c503e87da WHIRLPOOL 8e54e79219f89640162673da471a02ee8a39bb884e2376a79a09226462903185b49a771fef51ceca54c4dd42a110ee1214db6dbf94235a156a17d6c597634c3d
29 DIST zlib-1.2.3.tar.gz 496597 SHA256 1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e SHA512 021b958fcd0d346c4ba761bcf0cc40f3522de6186cf5a0a6ea34a70504ce9622b1c2626fce40675bc8282cf5f5ade18473656abc38050f72f5d6480507a2106e WHIRLPOOL 8fd7010faf6a48a9c7ff4bcfe3ce4fe9061eb541259e0a2d0def214e8c4becf2b22e8d6f96f65ca827abffeaa9d96e95ed2402844f99835f7b079fc9f3e84276
30
31 diff --git a/app-emulation/xen-pvgrub/xen-pvgrub-4.7.2.ebuild b/app-emulation/xen-pvgrub/xen-pvgrub-4.7.2.ebuild
32 deleted file mode 100644
33 index af5278706da..00000000000
34 --- a/app-emulation/xen-pvgrub/xen-pvgrub-4.7.2.ebuild
35 +++ /dev/null
36 @@ -1,161 +0,0 @@
37 -# Copyright 1999-2017 Gentoo Foundation
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI=5
41 -
42 -PYTHON_COMPAT=( python2_7 )
43 -PYTHON_REQ_USE='xml,threads'
44 -
45 -inherit flag-o-matic eutils multilib python-single-r1 toolchain-funcs
46 -
47 -XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
48 -LIBPCI_URL=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
49 -GRUB_URL=mirror://gnu-alpha/grub
50 -
51 -UPSTREAM_VER=
52 -[[ -n ${UPSTREAM_VER} ]] && \
53 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
54 -
55 -SRC_URI="
56 - http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz
57 - $GRUB_URL/grub-0.97.tar.gz
58 - $XEN_EXTFILES_URL/zlib-1.2.3.tar.gz
59 - $LIBPCI_URL/pciutils-2.2.9.tar.bz2
60 - $XEN_EXTFILES_URL/lwip-1.3.0.tar.gz
61 - $XEN_EXTFILES_URL/newlib/newlib-1.16.0.tar.gz
62 - $XEN_EXTFILES_URL/polarssl-1.1.4-gpl.tgz
63 - ${UPSTREAM_PATCHSET_URI}"
64 -
65 -S="${WORKDIR}/xen-${PV}"
66 -
67 -DESCRIPTION="allows to boot Xen domU kernels from a menu.lst laying inside guest filesystem"
68 -HOMEPAGE="http://xen.org/"
69 -LICENSE="GPL-2"
70 -SLOT="0"
71 -KEYWORDS="amd64 x86"
72 -IUSE="custom-cflags"
73 -
74 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
75 -
76 -DEPEND="sys-devel/gettext
77 - sys-devel/bin86
78 - sys-apps/texinfo
79 - x11-libs/pixman"
80 -
81 -RDEPEND="${PYTHON_DEPS}
82 - >=app-emulation/xen-tools-${PV}"
83 -
84 -pkg_setup() {
85 - python-single-r1_pkg_setup
86 -}
87 -
88 -retar-externals() {
89 - # Purely to unclutter src_prepare
90 - local set="grub-0.97.tar.gz lwip-1.3.0.tar.gz newlib-1.16.0.tar.gz polarssl-1.1.4-gpl.tgz zlib-1.2.3.tar.gz"
91 -
92 - # epatch can't patch in $WORKDIR, requires a sed; Bug #455194. Patchable, but sed informative
93 - sed -e s':AR=${AR-"ar rc"}:AR=${AR-"ar"}:' \
94 - -i "${WORKDIR}"/zlib-1.2.3/configure
95 - sed -e 's:^AR=ar rc:AR=ar:' \
96 - -e s':$(AR) $@:$(AR) rc $@:' \
97 - -i "${WORKDIR}"/zlib-1.2.3/{Makefile,Makefile.in}
98 - einfo "zlib Makefile edited"
99 -
100 - cd "${WORKDIR}"
101 - tar czp zlib-1.2.3 -f zlib-1.2.3.tar.gz
102 - tar czp grub-0.97 -f grub-0.97.tar.gz
103 - tar czp lwip -f lwip-1.3.0.tar.gz
104 - tar czp newlib-1.16.0 -f newlib-1.16.0.tar.gz
105 - tar czp polarssl-1.1.4 -f polarssl-1.1.4-gpl.tgz
106 - mv $set "${S}"/stubdom/
107 - einfo "tarballs moved to source"
108 -}
109 -
110 -src_prepare() {
111 - # Upstream's patchset
112 - if [[ -n ${UPSTREAM_VER} ]]; then
113 - einfo "Try to apply Xen Upstream patch set"
114 - EPATCH_SUFFIX="patch" \
115 - EPATCH_FORCE="yes" \
116 - EPATCH_OPTS="-p1" \
117 - epatch "${WORKDIR}"/patches-upstream
118 - fi
119 -
120 - # if the user *really* wants to use their own custom-cflags, let them
121 - if use custom-cflags; then
122 - einfo "User wants their own CFLAGS - removing defaults"
123 - # try and remove all the default custom-cflags
124 - find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
125 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
126 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
127 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
128 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
129 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
130 - -i {} \;
131 - fi
132 -
133 - # Patch the unmergeable newlib, fix most of the leftover gcc QA issues
134 - cp "${FILESDIR}"/newlib-implicits.patch stubdom || die
135 -
136 - # Patch stubdom/Makefile to patch insource newlib & prevent internal downloading
137 - epatch "${FILESDIR}"/${PN/-pvgrub/}-4.3-externals.patch
138 -
139 - # fix jobserver in Makefile
140 - epatch "${FILESDIR}"/${PN}-4.2-jserver.patch
141 -
142 - #Substitute for internal downloading. pciutils copied only due to the only .bz2
143 - cp "${DISTDIR}"/pciutils-2.2.9.tar.bz2 ./stubdom/ || die "pciutils not copied to stubdom"
144 - retar-externals || die "re-tar procedure failed"
145 -
146 - epatch_user
147 -}
148 -
149 -src_configure() {
150 - local myconf="--prefix=${PREFIX}/usr \
151 - --libdir=${PREFIX}/usr/$(get_libdir) \
152 - --libexecdir=${PREFIX}/usr/libexec \
153 - --disable-werror \
154 - --disable-xen"
155 -
156 - econf ${myconf}
157 -}
158 -
159 -src_compile() {
160 - use custom-cflags || unset CFLAGS
161 - if test-flag-CC -fno-strict-overflow; then
162 - append-flags -fno-strict-overflow
163 - fi
164 -
165 - emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" -C tools/include
166 -
167 - if use x86; then
168 - emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
169 - XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
170 - elif use amd64; then
171 - emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
172 - XEN_TARGET_ARCH="x86_64" -C stubdom pv-grub
173 - if has_multilib_profile; then
174 - multilib_toolchain_setup x86
175 - emake CC="$(tc-getCC)" AR="$(tc-getAR)" \
176 - XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
177 - fi
178 - fi
179 -}
180 -
181 -src_install() {
182 - if use x86; then
183 - emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
184 - fi
185 - if use amd64; then
186 - emake XEN_TARGET_ARCH="x86_64" DESTDIR="${D}" -C stubdom install-grub
187 - if has_multilib_profile; then
188 - emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
189 - fi
190 - fi
191 -}
192 -
193 -pkg_postinst() {
194 - elog "Official Xen Guide and the offical wiki page:"
195 - elog "https://wiki.gentoo.org/wiki/Xen"
196 - elog "http://wiki.xen.org/wiki/Main_Page"
197 -}
198
199 diff --git a/app-emulation/xen-pvgrub/xen-pvgrub-4.7.3.ebuild b/app-emulation/xen-pvgrub/xen-pvgrub-4.7.3.ebuild
200 deleted file mode 100644
201 index 28b054d2bc9..00000000000
202 --- a/app-emulation/xen-pvgrub/xen-pvgrub-4.7.3.ebuild
203 +++ /dev/null
204 @@ -1,161 +0,0 @@
205 -# Copyright 1999-2017 Gentoo Foundation
206 -# Distributed under the terms of the GNU General Public License v2
207 -
208 -EAPI=5
209 -
210 -PYTHON_COMPAT=( python2_7 )
211 -PYTHON_REQ_USE='xml,threads'
212 -
213 -inherit flag-o-matic eutils multilib python-single-r1 toolchain-funcs
214 -
215 -XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
216 -LIBPCI_URL=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
217 -GRUB_URL=mirror://gnu-alpha/grub
218 -
219 -UPSTREAM_VER=
220 -[[ -n ${UPSTREAM_VER} ]] && \
221 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
222 -
223 -SRC_URI="
224 - https://downloads.xenproject.org/release/xen/${PV}/xen-${PV}.tar.gz
225 - $GRUB_URL/grub-0.97.tar.gz
226 - $XEN_EXTFILES_URL/zlib-1.2.3.tar.gz
227 - $LIBPCI_URL/pciutils-2.2.9.tar.bz2
228 - $XEN_EXTFILES_URL/lwip-1.3.0.tar.gz
229 - $XEN_EXTFILES_URL/newlib/newlib-1.16.0.tar.gz
230 - $XEN_EXTFILES_URL/polarssl-1.1.4-gpl.tgz
231 - ${UPSTREAM_PATCHSET_URI}"
232 -
233 -S="${WORKDIR}/xen-${PV}"
234 -
235 -DESCRIPTION="allows to boot Xen domU kernels from a menu.lst laying inside guest filesystem"
236 -HOMEPAGE="http://xen.org/"
237 -LICENSE="GPL-2"
238 -SLOT="0"
239 -KEYWORDS="amd64 x86"
240 -IUSE="custom-cflags"
241 -
242 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
243 -
244 -DEPEND="sys-devel/gettext
245 - sys-devel/bin86
246 - sys-apps/texinfo
247 - x11-libs/pixman"
248 -
249 -RDEPEND="${PYTHON_DEPS}
250 - >=app-emulation/xen-tools-${PV}"
251 -
252 -pkg_setup() {
253 - python-single-r1_pkg_setup
254 -}
255 -
256 -retar-externals() {
257 - # Purely to unclutter src_prepare
258 - local set="grub-0.97.tar.gz lwip-1.3.0.tar.gz newlib-1.16.0.tar.gz polarssl-1.1.4-gpl.tgz zlib-1.2.3.tar.gz"
259 -
260 - # epatch can't patch in $WORKDIR, requires a sed; Bug #455194. Patchable, but sed informative
261 - sed -e s':AR=${AR-"ar rc"}:AR=${AR-"ar"}:' \
262 - -i "${WORKDIR}"/zlib-1.2.3/configure
263 - sed -e 's:^AR=ar rc:AR=ar:' \
264 - -e s':$(AR) $@:$(AR) rc $@:' \
265 - -i "${WORKDIR}"/zlib-1.2.3/{Makefile,Makefile.in}
266 - einfo "zlib Makefile edited"
267 -
268 - cd "${WORKDIR}"
269 - tar czp zlib-1.2.3 -f zlib-1.2.3.tar.gz
270 - tar czp grub-0.97 -f grub-0.97.tar.gz
271 - tar czp lwip -f lwip-1.3.0.tar.gz
272 - tar czp newlib-1.16.0 -f newlib-1.16.0.tar.gz
273 - tar czp polarssl-1.1.4 -f polarssl-1.1.4-gpl.tgz
274 - mv $set "${S}"/stubdom/
275 - einfo "tarballs moved to source"
276 -}
277 -
278 -src_prepare() {
279 - # Upstream's patchset
280 - if [[ -n ${UPSTREAM_VER} ]]; then
281 - einfo "Try to apply Xen Upstream patch set"
282 - EPATCH_SUFFIX="patch" \
283 - EPATCH_FORCE="yes" \
284 - EPATCH_OPTS="-p1" \
285 - epatch "${WORKDIR}"/patches-upstream
286 - fi
287 -
288 - # if the user *really* wants to use their own custom-cflags, let them
289 - if use custom-cflags; then
290 - einfo "User wants their own CFLAGS - removing defaults"
291 - # try and remove all the default custom-cflags
292 - find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
293 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
294 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
295 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
296 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
297 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
298 - -i {} \;
299 - fi
300 -
301 - # Patch the unmergeable newlib, fix most of the leftover gcc QA issues
302 - cp "${FILESDIR}"/newlib-implicits.patch stubdom || die
303 -
304 - # Patch stubdom/Makefile to patch insource newlib & prevent internal downloading
305 - epatch "${FILESDIR}"/${PN/-pvgrub/}-4.3-externals.patch
306 -
307 - # fix jobserver in Makefile
308 - epatch "${FILESDIR}"/${PN}-4.2-jserver.patch
309 -
310 - #Substitute for internal downloading. pciutils copied only due to the only .bz2
311 - cp "${DISTDIR}"/pciutils-2.2.9.tar.bz2 ./stubdom/ || die "pciutils not copied to stubdom"
312 - retar-externals || die "re-tar procedure failed"
313 -
314 - epatch_user
315 -}
316 -
317 -src_configure() {
318 - local myconf="--prefix=${PREFIX}/usr \
319 - --libdir=${PREFIX}/usr/$(get_libdir) \
320 - --libexecdir=${PREFIX}/usr/libexec \
321 - --disable-werror \
322 - --disable-xen"
323 -
324 - econf ${myconf}
325 -}
326 -
327 -src_compile() {
328 - use custom-cflags || unset CFLAGS
329 - if test-flag-CC -fno-strict-overflow; then
330 - append-flags -fno-strict-overflow
331 - fi
332 -
333 - emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" -C tools/include
334 -
335 - if use x86; then
336 - emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
337 - XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
338 - elif use amd64; then
339 - emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
340 - XEN_TARGET_ARCH="x86_64" -C stubdom pv-grub
341 - if has_multilib_profile; then
342 - multilib_toolchain_setup x86
343 - emake CC="$(tc-getCC)" AR="$(tc-getAR)" \
344 - XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
345 - fi
346 - fi
347 -}
348 -
349 -src_install() {
350 - if use x86; then
351 - emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
352 - fi
353 - if use amd64; then
354 - emake XEN_TARGET_ARCH="x86_64" DESTDIR="${D}" -C stubdom install-grub
355 - if has_multilib_profile; then
356 - emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
357 - fi
358 - fi
359 -}
360 -
361 -pkg_postinst() {
362 - elog "Official Xen Guide and the offical wiki page:"
363 - elog "https://wiki.gentoo.org/wiki/Xen"
364 - elog "http://wiki.xen.org/wiki/Main_Page"
365 -}
366
367 diff --git a/app-emulation/xen-pvgrub/xen-pvgrub-4.8.2.ebuild b/app-emulation/xen-pvgrub/xen-pvgrub-4.8.2.ebuild
368 deleted file mode 100644
369 index 72d54928c84..00000000000
370 --- a/app-emulation/xen-pvgrub/xen-pvgrub-4.8.2.ebuild
371 +++ /dev/null
372 @@ -1,161 +0,0 @@
373 -# Copyright 1999-2017 Gentoo Foundation
374 -# Distributed under the terms of the GNU General Public License v2
375 -
376 -EAPI=5
377 -
378 -PYTHON_COMPAT=( python2_7 )
379 -PYTHON_REQ_USE='xml,threads'
380 -
381 -inherit flag-o-matic eutils multilib python-single-r1 toolchain-funcs
382 -
383 -XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
384 -LIBPCI_URL=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
385 -GRUB_URL=mirror://gnu-alpha/grub
386 -
387 -UPSTREAM_VER=
388 -[[ -n ${UPSTREAM_VER} ]] && \
389 - UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
390 -
391 -SRC_URI="
392 - https://downloads.xenproject.org/release/xen/${PV}/xen-${PV}.tar.gz
393 - $GRUB_URL/grub-0.97.tar.gz
394 - $XEN_EXTFILES_URL/zlib-1.2.3.tar.gz
395 - $LIBPCI_URL/pciutils-2.2.9.tar.bz2
396 - $XEN_EXTFILES_URL/lwip-1.3.0.tar.gz
397 - $XEN_EXTFILES_URL/newlib/newlib-1.16.0.tar.gz
398 - $XEN_EXTFILES_URL/polarssl-1.1.4-gpl.tgz
399 - ${UPSTREAM_PATCHSET_URI}"
400 -
401 -S="${WORKDIR}/xen-${PV}"
402 -
403 -DESCRIPTION="allows to boot Xen domU kernels from a menu.lst laying inside guest filesystem"
404 -HOMEPAGE="http://xen.org/"
405 -LICENSE="GPL-2"
406 -SLOT="0"
407 -KEYWORDS="~amd64 ~x86"
408 -IUSE="custom-cflags"
409 -
410 -REQUIRED_USE="${PYTHON_REQUIRED_USE}"
411 -
412 -DEPEND="sys-devel/gettext
413 - sys-devel/bin86
414 - sys-apps/texinfo
415 - x11-libs/pixman"
416 -
417 -RDEPEND="${PYTHON_DEPS}
418 - >=app-emulation/xen-tools-${PV}"
419 -
420 -pkg_setup() {
421 - python-single-r1_pkg_setup
422 -}
423 -
424 -retar-externals() {
425 - # Purely to unclutter src_prepare
426 - local set="grub-0.97.tar.gz lwip-1.3.0.tar.gz newlib-1.16.0.tar.gz polarssl-1.1.4-gpl.tgz zlib-1.2.3.tar.gz"
427 -
428 - # epatch can't patch in $WORKDIR, requires a sed; Bug #455194. Patchable, but sed informative
429 - sed -e s':AR=${AR-"ar rc"}:AR=${AR-"ar"}:' \
430 - -i "${WORKDIR}"/zlib-1.2.3/configure
431 - sed -e 's:^AR=ar rc:AR=ar:' \
432 - -e s':$(AR) $@:$(AR) rc $@:' \
433 - -i "${WORKDIR}"/zlib-1.2.3/{Makefile,Makefile.in}
434 - einfo "zlib Makefile edited"
435 -
436 - cd "${WORKDIR}"
437 - tar czp zlib-1.2.3 -f zlib-1.2.3.tar.gz
438 - tar czp grub-0.97 -f grub-0.97.tar.gz
439 - tar czp lwip -f lwip-1.3.0.tar.gz
440 - tar czp newlib-1.16.0 -f newlib-1.16.0.tar.gz
441 - tar czp polarssl-1.1.4 -f polarssl-1.1.4-gpl.tgz
442 - mv $set "${S}"/stubdom/
443 - einfo "tarballs moved to source"
444 -}
445 -
446 -src_prepare() {
447 - # Upstream's patchset
448 - if [[ -n ${UPSTREAM_VER} ]]; then
449 - einfo "Try to apply Xen Upstream patch set"
450 - EPATCH_SUFFIX="patch" \
451 - EPATCH_FORCE="yes" \
452 - EPATCH_OPTS="-p1" \
453 - epatch "${WORKDIR}"/patches-upstream
454 - fi
455 -
456 - # if the user *really* wants to use their own custom-cflags, let them
457 - if use custom-cflags; then
458 - einfo "User wants their own CFLAGS - removing defaults"
459 - # try and remove all the default custom-cflags
460 - find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
461 - -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
462 - -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
463 - -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
464 - -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
465 - -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
466 - -i {} \;
467 - fi
468 -
469 - # Patch the unmergeable newlib, fix most of the leftover gcc QA issues
470 - cp "${FILESDIR}"/newlib-implicits.patch stubdom || die
471 -
472 - # Patch stubdom/Makefile to patch insource newlib & prevent internal downloading
473 - epatch "${FILESDIR}"/${PN/-pvgrub/}-4.3-externals.patch
474 -
475 - # fix jobserver in Makefile
476 - epatch "${FILESDIR}"/${PN}-4.8-jserver.patch
477 -
478 - #Substitute for internal downloading. pciutils copied only due to the only .bz2
479 - cp "${DISTDIR}"/pciutils-2.2.9.tar.bz2 ./stubdom/ || die "pciutils not copied to stubdom"
480 - retar-externals || die "re-tar procedure failed"
481 -
482 - epatch_user
483 -}
484 -
485 -src_configure() {
486 - local myconf="--prefix=${PREFIX}/usr \
487 - --libdir=${PREFIX}/usr/$(get_libdir) \
488 - --libexecdir=${PREFIX}/usr/libexec \
489 - --disable-werror \
490 - --disable-xen"
491 -
492 - econf ${myconf}
493 -}
494 -
495 -src_compile() {
496 - use custom-cflags || unset CFLAGS
497 - if test-flag-CC -fno-strict-overflow; then
498 - append-flags -fno-strict-overflow
499 - fi
500 -
501 - emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" -C tools/include
502 -
503 - if use x86; then
504 - emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
505 - XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
506 - elif use amd64; then
507 - emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
508 - XEN_TARGET_ARCH="x86_64" -C stubdom pv-grub
509 - if has_multilib_profile; then
510 - multilib_toolchain_setup x86
511 - emake CC="$(tc-getCC)" AR="$(tc-getAR)" \
512 - XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
513 - fi
514 - fi
515 -}
516 -
517 -src_install() {
518 - if use x86; then
519 - emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
520 - fi
521 - if use amd64; then
522 - emake XEN_TARGET_ARCH="x86_64" DESTDIR="${D}" -C stubdom install-grub
523 - if has_multilib_profile; then
524 - emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
525 - fi
526 - fi
527 -}
528 -
529 -pkg_postinst() {
530 - elog "Official Xen Guide and the offical wiki page:"
531 - elog "https://wiki.gentoo.org/wiki/Xen"
532 - elog "http://wiki.xen.org/wiki/Main_Page"
533 -}