net-fs/nfs-utils: remove
[sgilles-overlay.git] / sys-boot / vboot-utils / vboot-utils-51_p20160427-r1.ebuild
blob492dc34ca42d2d17fa702eb77ac041e271cec2d2
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
5 EAPI=5
7 inherit eutils toolchain-funcs
9 # This is the latest commit in the latest branch.
10 GIT_SHA1="48b1a50b086e39332d2e1e51a73434e39c40b329"
12 DESCRIPTION="Chrome OS verified boot tools"
13 HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform/vboot_reference/ http://dev.chromium.org/chromium-os/chromiumos-design-docs/verified-boot"
14 # Can't use gitiles directly until b/19710536 is fixed.
15 #SRC_URI="https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+archive/${GIT_SHA1}.tar.gz -> ${P}.tar.gz"
16 SRC_URI="mirror://gentoo/${P}.tar.xz"
18 LICENSE="BSD"
19 SLOT="0"
20 KEYWORDS="~amd64 ~arm ~arm64 ~mips ~x86"
21 IUSE="crossystem libressl minimal static"
23 LIB_DEPEND="!libressl? ( dev-libs/openssl:0=[static-libs(+)] )
24 libressl? ( dev-libs/libressl:0=[static-libs(+)] )
25 sys-apps/util-linux:=[static-libs(+)]"
26 RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
27 crossystem? ( sys-apps/mosys )
28 !minimal? (
29 app-arch/xz-utils:=
30 dev-libs/libyaml:=
32 DEPEND="${RDEPEND}
33 static? ( ${LIB_DEPEND} )
34 app-crypt/trousers"
36 S=${WORKDIR}
38 src_prepare() {
39 sed -i \
40 -e 's:${DESTDIR}/\(bin\|${LIBDIR}\):${DESTDIR}/usr/\1:g' \
41 -e 's:${DESTDIR}/default:${DESTDIR}/etc/default:g' \
42 Makefile || die
45 _emake() {
46 local arch=$(tc-arch)
47 emake \
48 V=1 \
49 QEMU_ARCH= \
50 ARCH=${arch} \
51 HOST_ARCH=${arch} \
52 LIBDIR="$(get_libdir)" \
53 DEBUG_FLAGS= \
54 WERROR= \
55 MINIMAL=$(usev minimal) \
56 STATIC=$(usev static) \
57 $(usex elibc_musl HAVE_MUSL=1 "") \
58 "$@"
61 src_compile() {
62 tc-export CC AR CXX PKG_CONFIG
63 _emake TEST_BINS= all
66 src_test() {
67 _emake runtests
70 src_install() {
71 _emake DESTDIR="${ED}" install
73 insinto /usr/share/vboot/devkeys
74 doins tests/devkeys/*
76 insinto /usr/include/vboot
77 doins host/include/* \
78 firmware/include/gpt.h \
79 firmware/include/tlcl.h \
80 firmware/include/tss_constants.h
82 dolib.a build/libvboot_host.a
84 dodoc README