Gentoo Archives: gentoo-commits

From: John Helmert III <ajak@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-firmware/seabios/
Date: Tue, 27 Sep 2022 03:27:27
Message-Id: 1664249184.44b2c98dd6c1897de85cbbb121a7d8b1fc626e85.ajak@gentoo
1 commit: 44b2c98dd6c1897de85cbbb121a7d8b1fc626e85
2 Author: John Helmert III <ajak <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 27 02:42:56 2022 +0000
4 Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 27 03:26:24 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=44b2c98d
7
8 sys-firmware/seabios: drop 1.12.0, 1.12.0-r1, 1.14.0, 1.14.0-r1
9
10 Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
11
12 sys-firmware/seabios/Manifest | 3 -
13 sys-firmware/seabios/seabios-1.12.0-r1.ebuild | 171 -------------------------
14 sys-firmware/seabios/seabios-1.12.0.ebuild | 145 ----------------------
15 sys-firmware/seabios/seabios-1.14.0-r1.ebuild | 172 --------------------------
16 sys-firmware/seabios/seabios-1.14.0.ebuild | 166 -------------------------
17 5 files changed, 657 deletions(-)
18
19 diff --git a/sys-firmware/seabios/Manifest b/sys-firmware/seabios/Manifest
20 index 53fef7c53118..8eda39382f89 100644
21 --- a/sys-firmware/seabios/Manifest
22 +++ b/sys-firmware/seabios/Manifest
23 @@ -1,6 +1,3 @@
24 -DIST seabios-1.12.0-bin.tar.xz 162492 BLAKE2B 9a5a349226ed7efbed328493dc057e232203b251677a23f1f09c133743ff0ca6b05270c9d27460be1d8897888fe23ff7bdfa122023fa8ddb23af03d5b9b6f8dd SHA512 f7a0395d621245093bb9a278d95ecc3d4e8d23f620058cd4fddaf885c8b86256f6258f3fd8173c1d24c03306f44d180e768bf8005ee123bc4b699b9f0ca371be
25 -DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96ebc158f34303b122b7bf209408c567665d8691364df8d8e886f63e0e72a3f3cd319dfa86ef581023201b5d94e53 SHA512 e52c5363e5bb37b5286e55545aa06bd126218f9d0e3a06ac2e189de68fe3de3256c11ca1bb13357a9c384d7e3af6284083ff3aa587688b5de04ef11b97bdfa27
26 -DIST seabios-1.14.0-bin.tar.xz 170160 BLAKE2B 1ab471ce0c6e27633ec42a66e3069496be84de713baab5de4f297821bd0da26404f7f70abc82e223ec5aa317a878889ae92b019988c72d24f77e7dcc5865f916 SHA512 7964e9bb7dff4fd6593f5d6d64efc4b1460750461b86635dbe5255d2086d619f51711d7a35e4dc20e556f705091c0950afabeddcd2e8876f05ce14f9ca73ed71
27 DIST seabios-1.14.0-r2-bin.tar.xz 132256 BLAKE2B 7d38949de254d6e3699d463a66c363156aa36bfe16c18bea48c55a61bdc423184175fd5427d3246a78d9c6335e61e5baa982f67e7406c5525e405b4383530d41 SHA512 5ce0e407b97e878842fbd7ad2f9e8a65f2565a5aa43d08e01cff024352780f55f8669958c58d20770db7f90e87cc52c860af831cefe3846227e7b45cd9dc33ee
28 DIST seabios-1.14.0.tar.gz 628985 BLAKE2B cc1126925dab1551a655680d20d06ebf28c12c386500d1ee4df9e1a99403b4c5bc6a66c2cc5ef58b4c3d6d7226f35007506a6a1855c2cf2742469dcb7aba05bb SHA512 215c42f59425f8abd062be7b11fc0e39c977cee5001a2381551b0f851ac337d0dd53c065267e6dee0e710ffd700fa635f9007b89da8dfce0f47122c984ee8146
29 DIST seabios-1.16.0.tar.gz 635419 BLAKE2B b645f20bae341d56ce4fc4a7044446050d8490c6c136377f6dccf02c88100b0644bc13d210b4a517a8be6002d5671b0fba77120a2aca3a9bafbad5e88d037e40 SHA512 9daefcfb1c9edda4462a4b080c9bac552154d577ae19703a914928e43005e7a52edd86869c6507e94a7f0c61ce8b3e6f5dea38cd5146628cb138a130947c522f
30
31 diff --git a/sys-firmware/seabios/seabios-1.12.0-r1.ebuild b/sys-firmware/seabios/seabios-1.12.0-r1.ebuild
32 deleted file mode 100644
33 index 03b9cd8cd76c..000000000000
34 --- a/sys-firmware/seabios/seabios-1.12.0-r1.ebuild
35 +++ /dev/null
36 @@ -1,171 +0,0 @@
37 -# Copyright 1999-2021 Gentoo Authors
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI="7"
41 -
42 -PYTHON_COMPAT=( python3_{7..9} )
43 -
44 -inherit toolchain-funcs python-any-r1
45 -
46 -# SeaBIOS maintainers sometimes don't release stable tarballs or stable
47 -# binaries to generate the stable tarball the following is necessary:
48 -# git clone git://git.seabios.org/seabios.git && cd seabios
49 -# git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV}
50 -
51 -if [[ ${PV} == *9999* || -n "${EGIT_COMMIT}" ]] ; then
52 - EGIT_REPO_URI="git://git.seabios.org/seabios.git"
53 - inherit git-r3
54 -else
55 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
56 -
57 - # Binary versions taken from fedora:
58 - # http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/s/
59 - # seabios-bin-1.12.1-2.fc31.noarch.rpm
60 - # seavgabios-bin-1.12.1-2.fc31.noarch.rpm
61 - SRC_URI="
62 - !binary? ( https://code.coreboot.org/p/seabios/downloads/get/${P}.tar.gz )
63 - binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-bin.tar.xz )"
64 -fi
65 -
66 -DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS"
67 -HOMEPAGE="https://www.seabios.org/"
68 -
69 -LICENSE="LGPL-3 GPL-3"
70 -SLOT="0"
71 -IUSE="+binary debug +seavgabios"
72 -
73 -REQUIRED_USE="debug? ( !binary )"
74 -
75 -SOURCE_DEPEND="
76 - >=sys-power/iasl-20060912
77 - ${PYTHON_DEPS}"
78 -DEPEND="
79 - !binary? (
80 - ${SOURCE_DEPEND}
81 - )"
82 -RDEPEND=""
83 -
84 -choose_target_chost() {
85 - if [[ -n "${CC}" ]]; then
86 - ${CC} -dumpmachine
87 - return
88 - fi
89 -
90 - if use amd64 || use x86; then
91 - # Use the native compiler
92 - echo "${CHOST}"
93 - return
94 - fi
95 -
96 - local i
97 - for i in x86_64 i686 i586 i486 i386 ; do
98 - i=${i}-pc-linux-gnu
99 - type -P ${i}-gcc > /dev/null && echo ${i} && return
100 - done
101 -}
102 -
103 -pkg_pretend() {
104 - if ! use binary; then
105 - ewarn "You have decided to compile your own SeaBIOS. This is not"
106 - ewarn "supported by upstream unless you use their recommended"
107 - ewarn "toolchain (which you are not)."
108 - elog
109 - ewarn "If you are intending to use this build with QEMU, realize"
110 - ewarn "you will not receive any support if you have compiled your"
111 - ewarn "own SeaBIOS. Virtual machines subtly fail based on changes"
112 - ewarn "in SeaBIOS."
113 - if [[ -z "$(choose_target_chost)" ]]; then
114 - elog
115 - eerror "Before you can compile ${PN}[-binary], you need to install a x86 cross-compiler"
116 - eerror "Run the following commands:"
117 - eerror " emerge crossdev"
118 - eerror " crossdev --stable -t x86_64-pc-linux-gnu"
119 - die "cross-compiler is needed"
120 - fi
121 - fi
122 -}
123 -
124 -pkg_setup() {
125 - use binary || python-any-r1_pkg_setup
126 -}
127 -
128 -src_unpack() {
129 - default
130 -
131 - # This simplifies the logic between binary & source builds.
132 - mkdir -p "${S}"
133 -}
134 -
135 -src_prepare() {
136 - default
137 -
138 - # Ensure precompiled iasl files are never used
139 - find "${WORKDIR}" -name '*.hex' -delete || die
140 -}
141 -
142 -src_configure() {
143 - use binary && return
144 -
145 - tc-ld-disable-gold #438058
146 -
147 - if use debug ; then
148 - echo "CONFIG_DEBUG_LEVEL=8" >.config
149 - fi
150 - _emake config
151 -}
152 -
153 -_emake() {
154 - LANG=C \
155 - emake V=1 \
156 - CC="$(tc-getCC)" \
157 - LD="$(tc-getLD)" \
158 - AR="$(tc-getAR)" \
159 - AS="$(tc-getAS)" \
160 - OBJCOPY="$(tc-getOBJCOPY)" \
161 - RANLIB="$(tc-getRANLIB)" \
162 - OBJDUMP="$(tc-getOBJDUMP)" \
163 - HOST_CC="$(tc-getBUILD_CC)" \
164 - VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \
165 - "$@"
166 -}
167 -
168 -src_compile() {
169 - use binary && return
170 -
171 - local TARGET_CHOST=$(choose_target_chost)
172 -
173 - cp "${FILESDIR}/seabios/config.seabios-256k" .config || die
174 - _emake oldnoconfig
175 - CHOST="${TARGET_CHOST}" _emake iasl
176 - CHOST="${TARGET_CHOST}" _emake out/bios.bin
177 - mv out/bios.bin ../bios-256k.bin || die
178 -
179 - if use seavgabios ; then
180 - local config t targets=(
181 - cirrus
182 - isavga
183 - qxl
184 - stdvga
185 - virtio
186 - vmware
187 - )
188 - for t in "${targets[@]}" ; do
189 - emake clean distclean
190 - cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die
191 - _emake oldnoconfig
192 - CHOST="${TARGET_CHOST}" _emake out/vgabios.bin
193 - cp out/vgabios.bin ../vgabios-${t}.bin || die
194 - done
195 - fi
196 -}
197 -
198 -src_install() {
199 - insinto /usr/share/seabios
200 - use binary && doins ../bios.bin
201 - doins ../bios-256k.bin
202 -
203 - if use seavgabios ; then
204 - insinto /usr/share/seavgabios
205 - doins ../vgabios*.bin
206 - fi
207 -}
208
209 diff --git a/sys-firmware/seabios/seabios-1.12.0.ebuild b/sys-firmware/seabios/seabios-1.12.0.ebuild
210 deleted file mode 100644
211 index 375070e32da8..000000000000
212 --- a/sys-firmware/seabios/seabios-1.12.0.ebuild
213 +++ /dev/null
214 @@ -1,145 +0,0 @@
215 -# Copyright 1999-2021 Gentoo Authors
216 -# Distributed under the terms of the GNU General Public License v2
217 -
218 -EAPI="7"
219 -
220 -PYTHON_COMPAT=( python3_{7..9} )
221 -
222 -inherit toolchain-funcs python-any-r1
223 -
224 -# SeaBIOS maintainers sometimes don't release stable tarballs or stable
225 -# binaries to generate the stable tarball the following is necessary:
226 -# git clone git://git.seabios.org/seabios.git && cd seabios
227 -# git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV}
228 -
229 -if [[ ${PV} == *9999* || -n "${EGIT_COMMIT}" ]] ; then
230 - EGIT_REPO_URI="git://git.seabios.org/seabios.git"
231 - inherit git-r3
232 -else
233 - KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sparc x86"
234 -
235 - # Binary versions taken from fedora:
236 - # http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/s/
237 - # seabios-bin-1.12.1-2.fc31.noarch.rpm
238 - # seavgabios-bin-1.12.1-2.fc31.noarch.rpm
239 - SRC_URI="
240 - !binary? ( https://code.coreboot.org/p/seabios/downloads/get/${P}.tar.gz )
241 - binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-bin.tar.xz )"
242 -fi
243 -
244 -DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS"
245 -HOMEPAGE="https://www.seabios.org/"
246 -
247 -LICENSE="LGPL-3 GPL-3"
248 -SLOT="0"
249 -IUSE="+binary debug +seavgabios"
250 -
251 -REQUIRED_USE="debug? ( !binary )
252 - !amd64? ( !x86? ( binary ) )"
253 -
254 -# The amd64/x86 check is needed to workaround #570892.
255 -SOURCE_DEPEND="
256 - >=sys-power/iasl-20060912
257 - ${PYTHON_DEPS}"
258 -DEPEND="
259 - !binary? (
260 - amd64? ( ${SOURCE_DEPEND} )
261 - x86? ( ${SOURCE_DEPEND} )
262 - )"
263 -RDEPEND=""
264 -
265 -pkg_pretend() {
266 - if ! use binary; then
267 - ewarn "You have decided to compile your own SeaBIOS. This is not"
268 - ewarn "supported by upstream unless you use their recommended"
269 - ewarn "toolchain (which you are not)."
270 - elog
271 - ewarn "If you are intending to use this build with QEMU, realize"
272 - ewarn "you will not receive any support if you have compiled your"
273 - ewarn "own SeaBIOS. Virtual machines subtly fail based on changes"
274 - ewarn "in SeaBIOS."
275 - fi
276 -}
277 -
278 -pkg_setup() {
279 - use binary || python-any-r1_pkg_setup
280 -}
281 -
282 -src_unpack() {
283 - default
284 -
285 - # This simplifies the logic between binary & source builds.
286 - mkdir -p "${S}"
287 -}
288 -
289 -src_prepare() {
290 - default
291 -
292 - # Ensure precompiled iasl files are never used
293 - find "${WORKDIR}" -name '*.hex' -delete || die
294 -}
295 -
296 -src_configure() {
297 - use binary && return
298 -
299 - tc-ld-disable-gold #438058
300 -
301 - if use debug ; then
302 - echo "CONFIG_DEBUG_LEVEL=8" >.config
303 - fi
304 - _emake config
305 -}
306 -
307 -_emake() {
308 - LANG=C \
309 - emake V=1 \
310 - CC="$(tc-getCC)" \
311 - LD="$(tc-getLD)" \
312 - AR="$(tc-getAR)" \
313 - AS="$(tc-getAS)" \
314 - OBJCOPY="$(tc-getOBJCOPY)" \
315 - RANLIB="$(tc-getRANLIB)" \
316 - OBJDUMP="$(tc-getOBJDUMP)" \
317 - HOST_CC="$(tc-getBUILD_CC)" \
318 - VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \
319 - "$@"
320 -}
321 -
322 -src_compile() {
323 - use binary && return
324 -
325 - cp "${FILESDIR}/seabios/config.seabios-256k" .config || die
326 - _emake oldnoconfig
327 - _emake iasl
328 - _emake out/bios.bin
329 - mv out/bios.bin ../bios-256k.bin || die
330 -
331 - if use seavgabios ; then
332 - local config t targets=(
333 - cirrus
334 - isavga
335 - qxl
336 - stdvga
337 - virtio
338 - vmware
339 - )
340 - for t in "${targets[@]}" ; do
341 - emake clean distclean
342 - cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die
343 - _emake oldnoconfig
344 - _emake out/vgabios.bin
345 - cp out/vgabios.bin ../vgabios-${t}.bin || die
346 - done
347 - fi
348 -}
349 -
350 -src_install() {
351 - insinto /usr/share/seabios
352 - use binary && doins ../bios.bin
353 - doins ../bios-256k.bin
354 -
355 - if use seavgabios ; then
356 - insinto /usr/share/seavgabios
357 - doins ../vgabios*.bin
358 - fi
359 -}
360
361 diff --git a/sys-firmware/seabios/seabios-1.14.0-r1.ebuild b/sys-firmware/seabios/seabios-1.14.0-r1.ebuild
362 deleted file mode 100644
363 index 92b326728a8d..000000000000
364 --- a/sys-firmware/seabios/seabios-1.14.0-r1.ebuild
365 +++ /dev/null
366 @@ -1,172 +0,0 @@
367 -# Copyright 1999-2021 Gentoo Authors
368 -# Distributed under the terms of the GNU General Public License v2
369 -
370 -EAPI="7"
371 -
372 -PYTHON_COMPAT=( python3_{8..10} )
373 -
374 -inherit toolchain-funcs python-any-r1
375 -
376 -# SeaBIOS maintainers sometimes don't release stable tarballs or stable
377 -# binaries to generate the stable tarball the following is necessary:
378 -# git clone git://git.seabios.org/seabios.git && cd seabios
379 -# git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV}
380 -
381 -if [[ ${PV} == *9999* || -n "${EGIT_COMMIT}" ]] ; then
382 - EGIT_REPO_URI="git://git.seabios.org/seabios.git"
383 - inherit git-r3
384 -else
385 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
386 -
387 - SRC_URI="
388 - !binary? ( https://www.seabios.org/downloads/${P}.tar.gz )
389 - binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-bin.tar.xz )"
390 -fi
391 -
392 -DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS"
393 -HOMEPAGE="https://www.seabios.org/"
394 -
395 -LICENSE="LGPL-3 GPL-3"
396 -SLOT="0"
397 -IUSE="+binary debug +seavgabios"
398 -
399 -REQUIRED_USE="debug? ( !binary )"
400 -
401 -SOURCE_DEPEND="
402 - >=sys-power/iasl-20060912
403 - ${PYTHON_DEPS}"
404 -DEPEND="
405 - !binary? (
406 - ${SOURCE_DEPEND}
407 - )"
408 -RDEPEND=""
409 -
410 -choose_target_chost() {
411 - if [[ -n "${CC}" ]]; then
412 - ${CC} -dumpmachine
413 - return
414 - fi
415 -
416 - if use amd64 || use x86; then
417 - # Use the native compiler
418 - echo "${CHOST}"
419 - return
420 - fi
421 -
422 - local i
423 - for i in x86_64 i686 i586 i486 i386 ; do
424 - i=${i}-pc-linux-gnu
425 - type -P ${i}-gcc > /dev/null && echo ${i} && return
426 - done
427 -}
428 -
429 -pkg_pretend() {
430 - if ! use binary; then
431 - ewarn "You have decided to compile your own SeaBIOS. This is not"
432 - ewarn "supported by upstream unless you use their recommended"
433 - ewarn "toolchain (which you are not)."
434 - elog
435 - ewarn "If you are intending to use this build with QEMU, realize"
436 - ewarn "you will not receive any support if you have compiled your"
437 - ewarn "own SeaBIOS. Virtual machines subtly fail based on changes"
438 - ewarn "in SeaBIOS."
439 - if [[ -z "$(choose_target_chost)" ]]; then
440 - elog
441 - eerror "Before you can compile ${PN}[-binary], you need to install a x86 cross-compiler"
442 - eerror "Run the following commands:"
443 - eerror " emerge crossdev"
444 - eerror " crossdev --stable -t x86_64-pc-linux-gnu"
445 - die "cross-compiler is needed"
446 - fi
447 - fi
448 -}
449 -
450 -pkg_setup() {
451 - use binary || python-any-r1_pkg_setup
452 -}
453 -
454 -src_unpack() {
455 - default
456 -
457 - # This simplifies the logic between binary & source builds.
458 - mkdir -p "${S}"
459 -}
460 -
461 -src_prepare() {
462 - default
463 -
464 - if ! use binary; then
465 - eapply "${FILESDIR}"/${PN}-1.14.0-binutils-2.36.patch
466 - fi
467 -
468 - # Ensure precompiled iasl files are never used
469 - find "${WORKDIR}" -name '*.hex' -delete || die
470 -}
471 -
472 -src_configure() {
473 - use binary && return
474 -
475 - tc-ld-disable-gold #438058
476 -
477 - if use debug ; then
478 - echo "CONFIG_DEBUG_LEVEL=8" >.config
479 - fi
480 - _emake config
481 -}
482 -
483 -_emake() {
484 - LANG=C \
485 - emake V=1 \
486 - CPP="$(tc-getPROG CPP cpp)" \
487 - CC="$(tc-getCC)" \
488 - LD="$(tc-getLD)" \
489 - AR="$(tc-getAR)" \
490 - AS="$(tc-getAS)" \
491 - OBJCOPY="$(tc-getOBJCOPY)" \
492 - RANLIB="$(tc-getRANLIB)" \
493 - OBJDUMP="$(tc-getOBJDUMP)" \
494 - STRIP="$(tc-getSTRIP)" \
495 - HOST_CC="$(tc-getBUILD_CC)" \
496 - VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \
497 - "$@"
498 -}
499 -
500 -src_compile() {
501 - use binary && return
502 -
503 - local TARGET_CHOST=$(choose_target_chost)
504 -
505 - cp "${FILESDIR}/seabios/config.seabios-256k" .config || die
506 - _emake oldnoconfig
507 - CHOST="${TARGET_CHOST}" _emake iasl
508 - CHOST="${TARGET_CHOST}" _emake out/bios.bin
509 - mv out/bios.bin ../bios-256k.bin || die
510 -
511 - if use seavgabios ; then
512 - local config t targets=(
513 - cirrus
514 - isavga
515 - qxl
516 - stdvga
517 - virtio
518 - vmware
519 - )
520 - for t in "${targets[@]}" ; do
521 - _emake clean distclean
522 - cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die
523 - _emake oldnoconfig
524 - CHOST="${TARGET_CHOST}" _emake out/vgabios.bin
525 - cp out/vgabios.bin ../vgabios-${t}.bin || die
526 - done
527 - fi
528 -}
529 -
530 -src_install() {
531 - insinto /usr/share/seabios
532 - doins ../bios-256k.bin
533 -
534 - if use seavgabios ; then
535 - insinto /usr/share/seavgabios
536 - doins ../vgabios*.bin
537 - fi
538 -}
539
540 diff --git a/sys-firmware/seabios/seabios-1.14.0.ebuild b/sys-firmware/seabios/seabios-1.14.0.ebuild
541 deleted file mode 100644
542 index 67cefdec6735..000000000000
543 --- a/sys-firmware/seabios/seabios-1.14.0.ebuild
544 +++ /dev/null
545 @@ -1,166 +0,0 @@
546 -# Copyright 1999-2021 Gentoo Authors
547 -# Distributed under the terms of the GNU General Public License v2
548 -
549 -EAPI="7"
550 -
551 -PYTHON_COMPAT=( python3_{8..10} )
552 -
553 -inherit toolchain-funcs python-any-r1
554 -
555 -# SeaBIOS maintainers sometimes don't release stable tarballs or stable
556 -# binaries to generate the stable tarball the following is necessary:
557 -# git clone git://git.seabios.org/seabios.git && cd seabios
558 -# git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV}
559 -
560 -if [[ ${PV} == *9999* || -n "${EGIT_COMMIT}" ]] ; then
561 - EGIT_REPO_URI="git://git.seabios.org/seabios.git"
562 - inherit git-r3
563 -else
564 - KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 ~sparc x86"
565 -
566 - SRC_URI="
567 - !binary? ( https://www.seabios.org/downloads/${P}.tar.gz )
568 - binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-bin.tar.xz )"
569 -fi
570 -
571 -DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS"
572 -HOMEPAGE="https://www.seabios.org/"
573 -
574 -LICENSE="LGPL-3 GPL-3"
575 -SLOT="0"
576 -IUSE="+binary debug +seavgabios"
577 -
578 -REQUIRED_USE="debug? ( !binary )"
579 -
580 -SOURCE_DEPEND="
581 - >=sys-power/iasl-20060912
582 - ${PYTHON_DEPS}"
583 -DEPEND="
584 - !binary? (
585 - ${SOURCE_DEPEND}
586 - )"
587 -RDEPEND=""
588 -
589 -choose_target_chost() {
590 - if [[ -n "${CC}" ]]; then
591 - ${CC} -dumpmachine
592 - return
593 - fi
594 -
595 - if use amd64 || use x86; then
596 - # Use the native compiler
597 - echo "${CHOST}"
598 - return
599 - fi
600 -
601 - local i
602 - for i in x86_64 i686 i586 i486 i386 ; do
603 - i=${i}-pc-linux-gnu
604 - type -P ${i}-gcc > /dev/null && echo ${i} && return
605 - done
606 -}
607 -
608 -pkg_pretend() {
609 - if ! use binary; then
610 - ewarn "You have decided to compile your own SeaBIOS. This is not"
611 - ewarn "supported by upstream unless you use their recommended"
612 - ewarn "toolchain (which you are not)."
613 - elog
614 - ewarn "If you are intending to use this build with QEMU, realize"
615 - ewarn "you will not receive any support if you have compiled your"
616 - ewarn "own SeaBIOS. Virtual machines subtly fail based on changes"
617 - ewarn "in SeaBIOS."
618 - if [[ -z "$(choose_target_chost)" ]]; then
619 - elog
620 - eerror "Before you can compile ${PN}[-binary], you need to install a x86 cross-compiler"
621 - eerror "Run the following commands:"
622 - eerror " emerge crossdev"
623 - eerror " crossdev --stable -t x86_64-pc-linux-gnu"
624 - die "cross-compiler is needed"
625 - fi
626 - fi
627 -}
628 -
629 -pkg_setup() {
630 - use binary || python-any-r1_pkg_setup
631 -}
632 -
633 -src_unpack() {
634 - default
635 -
636 - # This simplifies the logic between binary & source builds.
637 - mkdir -p "${S}"
638 -}
639 -
640 -src_prepare() {
641 - default
642 -
643 - # Ensure precompiled iasl files are never used
644 - find "${WORKDIR}" -name '*.hex' -delete || die
645 -}
646 -
647 -src_configure() {
648 - use binary && return
649 -
650 - tc-ld-disable-gold #438058
651 -
652 - if use debug ; then
653 - echo "CONFIG_DEBUG_LEVEL=8" >.config
654 - fi
655 - _emake config
656 -}
657 -
658 -_emake() {
659 - LANG=C \
660 - emake V=1 \
661 - CC="$(tc-getCC)" \
662 - LD="$(tc-getLD)" \
663 - AR="$(tc-getAR)" \
664 - AS="$(tc-getAS)" \
665 - OBJCOPY="$(tc-getOBJCOPY)" \
666 - RANLIB="$(tc-getRANLIB)" \
667 - OBJDUMP="$(tc-getOBJDUMP)" \
668 - HOST_CC="$(tc-getBUILD_CC)" \
669 - VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \
670 - "$@"
671 -}
672 -
673 -src_compile() {
674 - use binary && return
675 -
676 - local TARGET_CHOST=$(choose_target_chost)
677 -
678 - cp "${FILESDIR}/seabios/config.seabios-256k" .config || die
679 - _emake oldnoconfig
680 - CHOST="${TARGET_CHOST}" _emake iasl
681 - CHOST="${TARGET_CHOST}" _emake out/bios.bin
682 - mv out/bios.bin ../bios-256k.bin || die
683 -
684 - if use seavgabios ; then
685 - local config t targets=(
686 - cirrus
687 - isavga
688 - qxl
689 - stdvga
690 - virtio
691 - vmware
692 - )
693 - for t in "${targets[@]}" ; do
694 - emake clean distclean
695 - cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die
696 - _emake oldnoconfig
697 - CHOST="${TARGET_CHOST}" _emake out/vgabios.bin
698 - cp out/vgabios.bin ../vgabios-${t}.bin || die
699 - done
700 - fi
701 -}
702 -
703 -src_install() {
704 - insinto /usr/share/seabios
705 - doins ../bios-256k.bin
706 -
707 - if use seavgabios ; then
708 - insinto /usr/share/seavgabios
709 - doins ../vgabios*.bin
710 - fi
711 -}