aboutsummaryrefslogtreecommitdiff
blob: 9b7851d57bc43a9329a11bf8591f0098c0845a09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright (c) 2017 sakaki <sakaki@deciban.com>
#           (c) 2021 quarkyalice <quarkyalice@disroot.org>
# License: GPL v3+
# NO WARRANTY

EAPI=8
inherit toolchain-funcs

KEYWORDS="~amd64 ~arm ~arm64"

DESCRIPTION="Selected utilities from the coreboot project"
HOMEPAGE="https://www.coreboot.org"
SRC_URI="https://coreboot.org/releases/coreboot-${PV}.tar.xz -> ${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
IUSE=""
RESTRICT="mirror"

S="${WORKDIR}/coreboot-${PV}"

DEPEND="amd64? ( >=sys-apps/pciutils-3.4.1 )
	"
RDEPEND="${DEPEND}"

PATCHES=( "${FILESDIR}/${P}-fix-install-path.patch" )

src_compile() {
	cd "${S}/util/cbfstool"
	emake clean
	emake
	cd "${S}/util/ifdtool"
	emake clean
	emake
	if use amd64; then
		# intelmetool has a slightly nicer Makefile
		cd "${S}/util/intelmetool"
		emake clean
		emake
	fi
}

src_install() {
	cd "${S}/util/cbfstool"
	emake DESTDIR="${D}" install
	cd "${S}/util/ifdtool"
	emake DESTDIR="${D}" install
	if use amd64; then
		cd "${S}/util/intelmetool"
		emake DESTDIR="${D}" install
	fi
}