summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maier <tamiko@gentoo.org>2018-02-11 19:02:18 -0600
committerMatthias Maier <tamiko@gentoo.org>2018-02-11 19:48:28 -0600
commit58e05bda7ad49968342bad630efa496a261fe5f1 (patch)
treed8de73dfc1c56e24947eddf28f3aa1e679d70bdd /sys-firmware
parentapp-misc/xmind: Version bump (diff)
downloadgentoo-58e05bda7ad49968342bad630efa496a261fe5f1.tar.gz
gentoo-58e05bda7ad49968342bad630efa496a261fe5f1.tar.bz2
gentoo-58e05bda7ad49968342bad630efa496a261fe5f1.zip
sys-firmware/sgabios: ebuild maintenance
- port to EAPI=6 - add USE=binary use flag to be compatible with all other sys-firmware packages that qemu depends on Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'sys-firmware')
-rw-r--r--sys-firmware/sgabios/metadata.xml5
-rw-r--r--sys-firmware/sgabios/sgabios-0.1_pre8-r1.ebuild58
2 files changed, 62 insertions, 1 deletions
diff --git a/sys-firmware/sgabios/metadata.xml b/sys-firmware/sgabios/metadata.xml
index 0d341c6a91bb..a1bc76dbe5ef 100644
--- a/sys-firmware/sgabios/metadata.xml
+++ b/sys-firmware/sgabios/metadata.xml
@@ -9,4 +9,7 @@
<email>qemu@gentoo.org</email>
<name>Gentoo QEMU Project</name>
</maintainer>
- </pkgmetadata>
+ <use>
+ <flag name="binary">Use pre-built binaries</flag>
+ </use>
+</pkgmetadata>
diff --git a/sys-firmware/sgabios/sgabios-0.1_pre8-r1.ebuild b/sys-firmware/sgabios/sgabios-0.1_pre8-r1.ebuild
new file mode 100644
index 000000000000..bbf4403ff4a8
--- /dev/null
+++ b/sys-firmware/sgabios/sgabios-0.1_pre8-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="serial graphics adapter bios option rom for x86"
+HOMEPAGE="https://code.google.com/p/sgabios/"
+SRC_URI="mirror://gentoo/${P}.tar.xz
+ !binary? ( https://dev.gentoo.org/~cardoe/distfiles/${P}.tar.xz )
+ binary? ( https://dev.gentoo.org/~cardoe/distfiles/${P}-bins.tar.xz )"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="+binary"
+
+REQUIRED_USE="!amd64? ( !x86? ( binary ) )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-makefile.patch
+ "${FILESDIR}"/${P}-build-cc.patch #552280
+)
+
+src_prepare() {
+ if use binary; then
+ eapply_user
+ return
+ fi
+ default
+}
+
+src_compile() {
+ use binary && return
+
+ tc-ld-disable-gold
+ tc-export_build_env BUILD_CC
+ emake \
+ BUILD_CC="${BUILD_CC}" \
+ BUILD_CFLAGS="${BUILD_CFLAGS}" \
+ BUILD_LDFLAGS="${BUILD_LDFLAGS}" \
+ BUILD_CPPFLAGS="${BUILD_CPPFLAGS}" \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" \
+ AR="$(tc-getAR)" \
+ OBJCOPY="$(tc-getOBJCOPY)"
+}
+
+src_install() {
+ insinto /usr/share/sgabios
+
+ if use binary ; then
+ doins bins/sgabios.bin
+ else
+ doins sgabios.bin
+ fi
+}