From 24fd814c326e282c4321965c31f341dad77e270d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 8 Jan 2021 11:28:34 +0000 Subject: gentoo resync : 08.01.2021 --- sys-firmware/seabios/Manifest | 1 + sys-firmware/seabios/seabios-1.12.0-r1.ebuild | 171 ++++++++++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 sys-firmware/seabios/seabios-1.12.0-r1.ebuild (limited to 'sys-firmware/seabios') diff --git a/sys-firmware/seabios/Manifest b/sys-firmware/seabios/Manifest index f8cc71ab11f8..a964be11d2d7 100644 --- a/sys-firmware/seabios/Manifest +++ b/sys-firmware/seabios/Manifest @@ -16,5 +16,6 @@ DIST seabios-1.12.0.tar.gz 613542 BLAKE2B f145c2db716996bfa9e5c014086ccfaa8ae96e EBUILD seabios-1.10.2.ebuild 3375 BLAKE2B 318faa385a33ced2f9cb2243c14975e50f3d2ec358db7d1ea27bdd182422caac39fddcaab0a04f01feef18335d59369778a882eae157b69298c669d9bfd9ad91 SHA512 8406e91931ec65a4bd6a036624800da84611310bea87a3856fd0e3da04c4e5e9476b76a94d710601e7eec8dd2cbdb57afd4c6eef53f1a8a4c8c0081a7c09628e EBUILD seabios-1.11.0-r1.ebuild 4065 BLAKE2B 911d987097b600fc2b86f95291aa2f5ef5bc6ccdbbd1b5956977e540d4a3869a0f6ed782f1cc9c3e076a2a13ec84abb68df851cd533a7cd5ce51c85055ee8dbb SHA512 5411f225fd208df14e599ceff04275a9871e247fe066d9e88d4105df90741e661d92b1d9e82f456927642543085790b4e466cf608c8240d857039085d1e8d105 EBUILD seabios-1.11.0.ebuild 3291 BLAKE2B 968ee3c835bc28999bf2f1c2493a033047d5236b8c1b118480be99b547e81e6d23befb90475bf21083d708f5765b52f62d8742be25e40ba88e94cabcb61ea4ec SHA512 146b157b051a9643e4a4011105a38daff85cdf92ef996a5043e53b152a9987d408b377ab7091e21d2345b830a531cc48ea6d0a79a75f2b189fed0be28fafd509 +EBUILD seabios-1.12.0-r1.ebuild 4065 BLAKE2B e4295136331e5bebb91ca096250b1c65c662c855cb0d9cf49c92fb90d7299b3647b34505072a42bca2b2aaa908bcdec7e1d14494683954dc5cb13e8bd5021c65 SHA512 e794a9806a6008f86590aa86e64f9ab345481f9821e83456dd3711a58504318a12adc5c6edbef3634b303fc8baf7f925858ad9d6d7b2bacb6f23e7839b0f3969 EBUILD seabios-1.12.0.ebuild 3447 BLAKE2B 73b58b896f2772ea5aa0e26e42b70373c5e9b506cf69e5a4370656838d6aefe806c2bfa1d7172a928170bdc9cd0f9dd5a186b8febc34fecd06390ac7b0714e92 SHA512 6a9df75754d4904fa583e0791b2a1c7ea680728a029e32fd6e855b98958559b88e71ca7679c4dd525d7fa4654de5e23ab4113a2b00ac77dfe8b2e7b6df53f6e8 MISC metadata.xml 551 BLAKE2B 1bc4f5bcc0dd85ff4e14ededc83e631c942995a8f0ba9534d72b6d5b671ad471eeb0c43a02ce4cf7c0b79d7f0d5583d419c46aaa8c297f1544353b8f42cdefa4 SHA512 5a580198036d96152d46c79b19317e35e5ba15f998ccaeade825189ee640a6ca50552a46f56f783ebba288df3953d461695039539c47baa27e3c9da1f8b1ccc0 diff --git a/sys-firmware/seabios/seabios-1.12.0-r1.ebuild b/sys-firmware/seabios/seabios-1.12.0-r1.ebuild new file mode 100644 index 000000000000..23b9137e9fc8 --- /dev/null +++ b/sys-firmware/seabios/seabios-1.12.0-r1.ebuild @@ -0,0 +1,171 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +PYTHON_COMPAT=( python3_{7..9} ) + +inherit eutils toolchain-funcs python-any-r1 + +# SeaBIOS maintainers sometimes don't release stable tarballs or stable +# binaries to generate the stable tarball the following is necessary: +# git clone git://git.seabios.org/seabios.git && cd seabios +# git archive --output seabios-${PV}.tar.gz --prefix seabios-${PV}/ rel-${PV} + +if [[ ${PV} == *9999* || -n "${EGIT_COMMIT}" ]] ; then + EGIT_REPO_URI="git://git.seabios.org/seabios.git" + inherit git-r3 +else + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" + + # Binary versions taken from fedora: + # http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/Packages/s/ + # seabios-bin-1.12.1-2.fc31.noarch.rpm + # seavgabios-bin-1.12.1-2.fc31.noarch.rpm + SRC_URI=" + !binary? ( https://code.coreboot.org/p/seabios/downloads/get/${P}.tar.gz ) + binary? ( https://dev.gentoo.org/~tamiko/distfiles/${P}-bin.tar.xz )" +fi + +DESCRIPTION="Open Source implementation of a 16-bit x86 BIOS" +HOMEPAGE="https://www.seabios.org/" + +LICENSE="LGPL-3 GPL-3" +SLOT="0" +IUSE="+binary debug +seavgabios" + +REQUIRED_USE="debug? ( !binary )" + +SOURCE_DEPEND=" + >=sys-power/iasl-20060912 + ${PYTHON_DEPS}" +DEPEND=" + !binary? ( + ${SOURCE_DEPEND} + )" +RDEPEND="" + +choose_target_chost() { + if [[ -n "${CC}" ]]; then + ${CC} -dumpmachine + return + fi + + if use amd64 || use x86; then + # Use the native compiler + echo "${CHOST}" + return + fi + + local i + for i in x86_64 i686 i586 i486 i386 ; do + i=${i}-pc-linux-gnu + type -P ${i}-gcc > /dev/null && echo ${i} && return + done +} + +pkg_pretend() { + if ! use binary; then + ewarn "You have decided to compile your own SeaBIOS. This is not" + ewarn "supported by upstream unless you use their recommended" + ewarn "toolchain (which you are not)." + elog + ewarn "If you are intending to use this build with QEMU, realize" + ewarn "you will not receive any support if you have compiled your" + ewarn "own SeaBIOS. Virtual machines subtly fail based on changes" + ewarn "in SeaBIOS." + if [[ -z "$(choose_target_chost)" ]]; then + elog + eerror "Before you can compile ${PN}[-binary], you need to install a x86 cross-compiler" + eerror "Run the following commands:" + eerror " emerge crossdev" + eerror " crossdev --stable -t x86_64-pc-linux-gnu" + die "cross-compiler is needed" + fi + fi +} + +pkg_setup() { + use binary || python-any-r1_pkg_setup +} + +src_unpack() { + default + + # This simplifies the logic between binary & source builds. + mkdir -p "${S}" +} + +src_prepare() { + default + + # Ensure precompiled iasl files are never used + find "${WORKDIR}" -name '*.hex' -delete || die +} + +src_configure() { + use binary && return + + tc-ld-disable-gold #438058 + + if use debug ; then + echo "CONFIG_DEBUG_LEVEL=8" >.config + fi + _emake config +} + +_emake() { + LANG=C \ + emake V=1 \ + CC="$(tc-getCC)" \ + LD="$(tc-getLD)" \ + AR="$(tc-getAR)" \ + AS="$(tc-getAS)" \ + OBJCOPY="$(tc-getOBJCOPY)" \ + RANLIB="$(tc-getRANLIB)" \ + OBJDUMP="$(tc-getOBJDUMP)" \ + HOST_CC="$(tc-getBUILD_CC)" \ + VERSION="Gentoo/${EGIT_COMMIT:-${PVR}}" \ + "$@" +} + +src_compile() { + use binary && return + + local TARGET_CHOST=$(choose_target_chost) + + cp "${FILESDIR}/seabios/config.seabios-256k" .config || die + _emake oldnoconfig + CHOST="${TARGET_CHOST}" _emake iasl + CHOST="${TARGET_CHOST}" _emake out/bios.bin + mv out/bios.bin ../bios-256k.bin || die + + if use seavgabios ; then + local config t targets=( + cirrus + isavga + qxl + stdvga + virtio + vmware + ) + for t in "${targets[@]}" ; do + emake clean distclean + cp "${FILESDIR}/seavgabios/config.vga-${t}" .config || die + _emake oldnoconfig + CHOST="${TARGET_CHOST}" _emake out/vgabios.bin + cp out/vgabios.bin ../vgabios-${t}.bin || die + done + fi +} + +src_install() { + insinto /usr/share/seabios + use binary && doins ../bios.bin + doins ../bios-256k.bin + + if use seavgabios ; then + insinto /usr/share/seavgabios + doins ../vgabios*.bin + fi +} -- cgit v1.2.3