blob: 4476bbdbf27d13351acccc788b7f788a790070a9 [file] [log] [blame]
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="4"
CROS_WORKON_COMMIT="a436c551cf226af66cdb3dd74ee3971d0b1dae04"
CROS_WORKON_TREE="3758086ccb0a331595a2f4098e465ab2c053ee77"
CROS_WORKON_PROJECT="chromiumos/third_party/libqmi"
inherit autotools cros-workon
DESCRIPTION="QMI modem protocol helper library"
HOMEPAGE="http://cgit.freedesktop.org/libqmi/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="*"
IUSE="-asan -clang doc static-libs"
REQUIRED_USE="asan? ( clang )"
RDEPEND=">=dev-libs/glib-2.32"
DEPEND="${RDEPEND}
doc? ( dev-util/gtk-doc )
virtual/pkgconfig"
src_prepare() {
gtkdocize
eautoreconf
}
src_configure() {
clang-setup-env
# Disable the unused function check as libqmi has auto-generated
# functions that may not be used.
append-flags -Xclang-only=-Wno-unused-function
econf \
--enable-qmi-username='modem' \
$(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)/libqmi-glib.la
}