media-plugins/gst-plugins-taglib: x86 stable (bug #624180)
[gentoo.git] / sys-firmware / sgabios / sgabios-0.1_pre8.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=4
5
6 inherit eutils toolchain-funcs
7
8 DESCRIPTION="serial graphics adapter bios option rom for x86"
9 HOMEPAGE="https://code.google.com/p/sgabios/"
10 SRC_URI="mirror://gentoo/${P}.tar.xz
11         https://dev.gentoo.org/~cardoe/distfiles/${P}.tar.xz
12         https://dev.gentoo.org/~cardoe/distfiles/${P}-bins.tar.xz"
13
14 LICENSE="Apache-2.0"
15 SLOT="0"
16 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86"
17 IUSE=""
18
19 src_prepare() {
20         epatch "${FILESDIR}"/${P}-makefile.patch
21         epatch "${FILESDIR}"/${P}-build-cc.patch #552280
22         epatch_user
23 }
24
25 src_compile() {
26         if use amd64 || use x86 ; then
27                 tc-ld-disable-gold
28                 tc-export_build_env BUILD_CC
29                 emake \
30                         BUILD_CC="${BUILD_CC}" \
31                         BUILD_CFLAGS="${BUILD_CFLAGS}" \
32                         BUILD_LDFLAGS="${BUILD_LDFLAGS}" \
33                         BUILD_CPPFLAGS="${BUILD_CPPFLAGS}" \
34                         CC="$(tc-getCC)" \
35                         LD="$(tc-getLD)" \
36                         AR="$(tc-getAR)" \
37                         OBJCOPY="$(tc-getOBJCOPY)"
38         fi
39 }
40
41 src_install() {
42         insinto /usr/share/sgabios
43
44         if use amd64 || use x86 ; then
45                 doins sgabios.bin
46         else
47                 doins bins/sgabios.bin
48         fi
49 }