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