Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen-pvgrub/
Date: Mon, 01 Feb 2021 19:24:08
Message-Id: 1612207439.0beed217d7ec6525c37d1c795b2d285b81d07976.whissi@gentoo
1 commit: 0beed217d7ec6525c37d1c795b2d285b81d07976
2 Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Tue Jan 19 16:59:44 2021 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 1 19:23:59 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0beed217
7
8 app-emulation/xen-pvgrub: bump to 4.14.1
9
10 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 app-emulation/xen-pvgrub/Manifest | 1 +
14 app-emulation/xen-pvgrub/xen-pvgrub-4.14.1.ebuild | 155 ++++++++++++++++++++++
15 2 files changed, 156 insertions(+)
16
17 diff --git a/app-emulation/xen-pvgrub/Manifest b/app-emulation/xen-pvgrub/Manifest
18 index 781deb13d41..81f86df719c 100644
19 --- a/app-emulation/xen-pvgrub/Manifest
20 +++ b/app-emulation/xen-pvgrub/Manifest
21 @@ -5,4 +5,5 @@ DIST pciutils-2.2.9.tar.bz2 212265 BLAKE2B 014b664e90c64e7255c9e21fc25a2cc60d57f
22 DIST polarssl-1.1.4-gpl.tgz 611340 BLAKE2B 613da06dda9e4b86db5a4d616a0a0afee98c907c3c6b352eed3d9e500fc5739e62eb4f6fc32ff02579c6a6de9bd49fcd2c8bd8b2d158a5050cbaa82118d61ef0 SHA512 88da614e4d3f4409c4fd3bb3e44c7587ba051e3fed4e33d526069a67e8180212e1ea22da984656f50e290049f60ddca65383e5983c0f8884f648d71f698303ad
23 DIST xen-4.13.2.tar.gz 39037826 BLAKE2B ad2b7c3003ca29e5e60a85c581f706ef87d99eadf939ed36ebe8f6698582f7a29dbdaf502039b60a0afe7ad4ae6ce89713e69dc8b8a7d5abe65063da7f1baa5b SHA512 cd3092281c97e9421e303aa288aac04dcccd5536ba7c0ff4d51fbf3d07b5ffacfe3456ba06f5cf63577dafbf8cf3a5d9825ceb5e9ef8ca1427900cc3e57b50a3
24 DIST xen-4.14.0.tar.gz 39950576 BLAKE2B db4c3e79cfdfb10260d0d14d9d28e8c8bd9bf23f42aee743acf8f560bf4cdb96a425c0df887c70f9755f62680be24bfbe0149e52a4cb843ae83090cd9d6afc71 SHA512 ebce47a2f754955d8517123d69f62006634d97620fbbe3784869a0667466e586a249f57ffaf7846d5bcb45d69377cde43354c82c233fbb5407e55653b9a33ac0
25 +DIST xen-4.14.1.tar.gz 39970115 BLAKE2B 21e5838b2b4d78420dcaaae2b8fc98ac876230217e6a3764aa643920150b8cef96025663e6a2fc423ab15f7f470b62547e91ce1be0337fc78f00c148c7ff40ab SHA512 c75cbec82793435f5a7026626ffdb2e9a2166b42d2be4b2f1194240e0312458124f0ebd53eeb02ce7330c22afe402a28a96b32f8af66e41e9416fe94535724c9
26 DIST zlib-1.2.3.tar.gz 496597 BLAKE2B 603020b70cd52b83e48bde420b86e2acfd29d69bf7476eecbeeb07d1b8bcab703d2cbd3eab77772990bddb8c268f13594592ce985798d49e2d6ba25104d49f22 SHA512 021b958fcd0d346c4ba761bcf0cc40f3522de6186cf5a0a6ea34a70504ce9622b1c2626fce40675bc8282cf5f5ade18473656abc38050f72f5d6480507a2106e
27
28 diff --git a/app-emulation/xen-pvgrub/xen-pvgrub-4.14.1.ebuild b/app-emulation/xen-pvgrub/xen-pvgrub-4.14.1.ebuild
29 new file mode 100644
30 index 00000000000..c3980e0437e
31 --- /dev/null
32 +++ b/app-emulation/xen-pvgrub/xen-pvgrub-4.14.1.ebuild
33 @@ -0,0 +1,155 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +PYTHON_COMPAT=( python3_{6..9} )
40 +PYTHON_REQ_USE='xml,threads(+)'
41 +
42 +inherit flag-o-matic multilib python-single-r1 toolchain-funcs
43 +
44 +MY_PV=${PV/_/-}
45 +
46 +XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
47 +LIBPCI_URL=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
48 +GRUB_URL=mirror://gnu-alpha/grub
49 +
50 +UPSTREAM_VER=
51 +[[ -n ${UPSTREAM_VER} ]] && \
52 + UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-pvgrub/}-upstream-patches-${UPSTREAM_VER}.tar.xz
53 + https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P/-pvgrub/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
54 +
55 +SRC_URI="
56 + https://downloads.xenproject.org/release/xen/${MY_PV}/xen-${MY_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-${MY_PV}"
66 +
67 +DESCRIPTION="allows to boot Xen domU kernels from a menu.lst laying inside guest filesystem"
68 +HOMEPAGE="https://www.xenproject.org"
69 +LICENSE="GPL-2"
70 +SLOT="0"
71 +KEYWORDS="~amd64 ~x86"
72 +IUSE=""
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 +# python2 only
85 +RESTRICT="test"
86 +
87 +pkg_setup() {
88 + python-single-r1_pkg_setup
89 +}
90 +
91 +retar-externals() {
92 + # Purely to unclutter src_prepare
93 + 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"
94 +
95 + # eapply can't patch in $WORKDIR, requires a sed; Bug #455194. Patchable, but sed informative
96 + sed -e s':AR=${AR-"ar rc"}:AR=${AR-"ar"}:' \
97 + -i "${WORKDIR}"/zlib-1.2.3/configure || die
98 + sed -e 's:^AR=ar rc:AR=ar:' \
99 + -e s':$(AR) $@:$(AR) rc $@:' \
100 + -i "${WORKDIR}"/zlib-1.2.3/{Makefile,Makefile.in} || die
101 + einfo "zlib Makefile edited"
102 +
103 + cd "${WORKDIR}" || die
104 + tar czp zlib-1.2.3 -f zlib-1.2.3.tar.gz || die
105 + tar czp grub-0.97 -f grub-0.97.tar.gz || die
106 + tar czp lwip -f lwip-1.3.0.tar.gz || die
107 + tar czp newlib-1.16.0 -f newlib-1.16.0.tar.gz || die
108 + tar czp polarssl-1.1.4 -f polarssl-1.1.4-gpl.tgz || die
109 + mv $set "${S}"/stubdom/ || die
110 + einfo "tarballs moved to source"
111 +}
112 +
113 +src_prepare() {
114 + # Upstream's patchset
115 + if [[ -n ${UPSTREAM_VER} ]]; then
116 + einfo "Try to apply Xen Upstream patch set"
117 + EPATCH_SUFFIX="patch" \
118 + EPATCH_FORCE="yes" \
119 + EPATCH_OPTS="-p1" \
120 + eapply "${WORKDIR}"/patches-upstream
121 + fi
122 +
123 + # Patch the unmergeable newlib, fix most of the leftover gcc QA issues
124 + cp "${FILESDIR}"/newlib-implicits.patch stubdom || die
125 +
126 + # Patch stubdom/Makefile to patch insource newlib & prevent internal downloading
127 + eapply "${FILESDIR}"/${PN/-pvgrub/}-4.10-externals.patch
128 +
129 + # fix jobserver in Makefile
130 + eapply "${FILESDIR}"/${PN}-4.8-jserver.patch
131 +
132 + #Substitute for internal downloading. pciutils copied only due to the only .bz2
133 + cp "${DISTDIR}"/pciutils-2.2.9.tar.bz2 ./stubdom/ || die "pciutils not copied to stubdom"
134 + retar-externals || die "re-tar procedure failed"
135 +
136 + default
137 +}
138 +
139 +src_configure() {
140 + local myconf="--prefix=${PREFIX}/usr \
141 + --libdir=${PREFIX}/usr/$(get_libdir) \
142 + --libexecdir=${PREFIX}/usr/libexec \
143 + --disable-werror \
144 + --disable-xen"
145 +
146 + econf ${myconf}
147 +}
148 +
149 +src_compile() {
150 + unset CFLAGS
151 + if test-flag-CC -fno-strict-overflow; then
152 + append-flags -fno-strict-overflow
153 + fi
154 +
155 + emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" -C tools/include
156 + emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" -C tools/libs
157 +
158 + if use x86; then
159 + emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
160 + XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
161 + elif use amd64; then
162 + emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
163 + XEN_TARGET_ARCH="x86_64" -C stubdom pv-grub
164 + if has_multilib_profile; then
165 + multilib_toolchain_setup x86
166 + emake CC="$(tc-getCC)" AR="$(tc-getAR)" \
167 + XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
168 + fi
169 + fi
170 +}
171 +
172 +src_install() {
173 + if use x86; then
174 + emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
175 + fi
176 + if use amd64; then
177 + emake XEN_TARGET_ARCH="x86_64" DESTDIR="${D}" -C stubdom install-grub
178 + if has_multilib_profile; then
179 + emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
180 + fi
181 + fi
182 +}
183 +
184 +pkg_postinst() {
185 + elog "Official Xen Guide and the offical wiki page:"
186 + elog "https://wiki.gentoo.org/wiki/Xen"
187 + elog "https://wiki.xen.org/wiki/Main_Page"
188 +}