blob: 1893a08497865a2c4de256a1d030a854b49c03dd [file] [log] [blame]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI="4"
CROS_WORKON_COMMIT="83c8a860f6ff8a147af584550ae2d961b9af7f04"
CROS_WORKON_TREE="b74e3782fb7a50fe61ded1a7adf6aba69111b80c"
CROS_WORKON_PROJECT="chromiumos/platform/mosys"
CROS_WORKON_LOCALNAME="../platform/mosys"
inherit flag-o-matic toolchain-funcs cros-workon
DESCRIPTION="Utility for obtaining various bits of low-level system info"
HOMEPAGE="http://mosys.googlecode.com/"
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
IUSE="static"
# We need util-linux for libuuid.
RDEPEND="sys-apps/util-linux
>=sys-apps/flashmap-0.3-r4"
DEPEND="${RDEPEND}"
src_configure() {
# Generate a default .config for our target architecture. This will
# likely become more sophisticated as we broaden board support.
einfo "using default configuration for $(tc-arch)"
ARCH=$(tc-arch) emake defconfig
tc-export AR CC LD PKG_CONFIG
export FMAP_LINKOPT="$(${PKG_CONFIG} --libs-only-l fmap)"
append-ldflags "$(${PKG_CONFIG} --libs-only-L fmap)"
export LDFLAGS="$(raw-ldflags)"
append-flags "$(${PKG_CONFIG} --cflags fmap)"
export CFLAGS
if use static; then
# We can't use append-ldflags because the build system doesn't
# handle LDFLAGS correctly:
# http://code.google.com/p/mosys/issues/detail?id=3
append-flags "-static"
fi
}
src_install() {
dosbin mosys
dodoc README TODO
}