1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{2_7,3_{4,5}} )
8 inherit eutils toolchain-funcs python-any-r1
12 # SeaBIOS maintainers sometimes don't release stable tarballs or stable
13 # binaries to generate the stable tarball the following is necessary:
14 # git clone git://git.seabios.org/seabios.git && cd seabios
15 # git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV}
17 if [[ ${PV} = *9999* || ! -z "${EGIT_COMMIT}" ]]; then
18 EGIT_REPO_URI="git://git.seabios.org/seabios.git"
21 KEYWORDS="amd64 ~ppc ~ppc64 x86 ~amd64-fbsd ~x86-fbsd"
22 SRC_URI="!binary? ( https://code.coreboot.org/p/seabios/downloads/get/${P}.tar.gz )
23 binary? ( https://code.coreboot.org/p/seabios/downloads/get/bios.bin-${PV}.gz )
24 ${BACKPORTS:+https://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz}"
27 DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS"
28 HOMEPAGE="https://www.seabios.org/"
30 LICENSE="LGPL-3 GPL-3"
34 REQUIRED_USE="ppc? ( binary )
39 >=sys-power/iasl-20060912
46 ewarn "You have decided to compile your own SeaBIOS. This is not"
47 ewarn "supported by upstream unless you use their recommended"
48 ewarn "toolchain (which you are not)."
50 ewarn "If you are intending to use this build with QEMU, realize"
51 ewarn "you will not receive any support if you have compiled your"
52 ewarn "own SeaBIOS. Virtual machines subtly fail based on changes"
58 use binary || python-any-r1_pkg_setup
64 # This simplifies the logic between binary & source builds.
71 if [[ -z "${EGIT_COMMIT}" ]]; then
72 sed -e "s/VERSION=.*/VERSION=${PV}/" \
75 sed -e "s/VERSION=.*/VERSION=${PV}_pre${EGIT_COMMIT}/" \
83 use binary || tc-ld-disable-gold #438058
87 if ! use binary ; then
92 OBJCOPY="$(tc-getOBJCOPY)" \
93 RANLIB="$(tc-getRANLIB)" \
94 OBJDUMP="$(tc-getOBJDUMP)" \
95 HOST_CC="$(tc-getBUILD_CC)" \
101 insinto /usr/share/seabios
102 if ! use binary ; then
105 newins ../bios.bin-${PV} bios.bin