blob: bb5dae97d86aeb02cdf06a5bb122dca883ebe247 [file] [log] [blame]
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
CROS_WORKON_COMMIT="a3ce8d76c8953528a0b345870df0ea2853de6f25"
CROS_WORKON_TREE="6ad52e53a9e89c5d0888aafa5c8274a4c327bf74"
CROS_WORKON_PROJECT="chromiumos/third_party/libmbim"
inherit autotools cros-sanitizers cros-workon
DESCRIPTION="MBIM modem protocol helper library"
HOMEPAGE="http://cgit.freedesktop.org/libmbim/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="*"
IUSE="-asan doc static-libs"
RDEPEND=">=dev-libs/glib-2.36
virtual/libgudev"
DEPEND="${RDEPEND}
doc? ( dev-util/gtk-doc )
virtual/pkgconfig"
src_prepare() {
default
gtkdocize
eautoreconf
}
src_configure() {
sanitizers-setup-env
econf \
--enable-mbim-username='modem' \
--enable-compile-warnings=yes \
$(use_enable static{-libs,}) \
$(use_enable {,gtk-}doc)
}
src_test() {
# TODO(benchan): Run unit tests for non-x86 platforms via qemu.
[[ "${ARCH}" == "x86" || "${ARCH}" == "amd64" ]] && emake check
}
src_install() {
default
use static-libs || rm -f "${ED}"/usr/$(get_libdir)/libmbim-glib.la
}