dev-embedded/u-boot-tools: tweak for gcc-10
[gentoo.git] / dev-embedded / u-boot-tools / u-boot-tools-2018.11.ebuild
1 # Copyright 1999-2018 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit toolchain-funcs
7
8 MY_P="u-boot-${PV/_/-}"
9 DESCRIPTION="utilities for working with Das U-Boot"
10 HOMEPAGE="http://www.denx.de/wiki/U-Boot/WebHome"
11 SRC_URI="ftp://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
16 IUSE=""
17
18 S=${WORKDIR}/${MY_P}
19
20 src_compile() {
21         # Unset a few KBUILD variables. Bug #540476
22         unset KBUILD_OUTPUT KBUILD_SRC
23         emake defconfig
24         emake \
25                 HOSTSTRIP=: \
26                 STRIP=: \
27                 HOSTCC="$(tc-getCC)" \
28                 HOSTCFLAGS="${CFLAGS} ${CPPFLAGS}"' $(HOSTCPPFLAGS)' \
29                 HOSTLDFLAGS="${LDFLAGS}" \
30                 CONFIG_ENV_OVERWRITE=y \
31                 tools-all
32 }
33
34 src_install() {
35         cd tools || die
36         dobin bmp_logo dumpimage fdtgrep gen_eth_addr img2srec mkenvimage mkimage
37         dobin easylogo/easylogo
38         dobin env/fw_printenv
39         dosym fw_printenv /usr/bin/fw_setenv
40         insinto /etc
41         doins env/fw_env.config
42         doman "${S}"/doc/mkimage.1
43 }