| # 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_PROJECT="chromium/deps/libmtp" |
| CROS_WORKON_LOCALNAME="../../chromium/src/third_party/libmtp" |
| |
| inherit autotools cros-workon |
| |
| DESCRIPTION="An implementation of Microsoft's Media Transfer Protocol (MTP)." |
| HOMEPAGE="http://libmtp.sourceforge.net/" |
| |
| LICENSE="LGPL-2.1" |
| SLOT="0" |
| KEYWORDS="~*" |
| IUSE="-asan +crypt doc examples static-libs" |
| |
| RDEPEND="virtual/libusb:1 |
| crypt? ( dev-libs/libgcrypt )" |
| DEPEND="${RDEPEND} |
| virtual/pkgconfig |
| doc? ( app-doc/doxygen )" |
| |
| DOCS="AUTHORS ChangeLog README TODO" |
| |
| src_prepare() { |
| if [[ ${PV} == *9999* ]]; then |
| touch config.rpath # This is from upstream autogen.sh |
| eautoreconf |
| else |
| # We have generated autotools. Touch the files to make sure the |
| # timestamps from git don't mess us up. https://crbug.com/649592 |
| find -type f -exec touch -r . {} + |
| fi |
| } |
| |
| src_configure() { |
| asan-setup-env |
| cros-workon_src_configure \ |
| $(use_enable static-libs static) \ |
| $(use_enable doc doxygen) \ |
| $(use_enable crypt mtpz) |
| } |
| |
| src_install() { |
| default |
| find "${ED}" -name '*.la' -exec rm -f {} + |
| |
| if use examples; then |
| docinto examples |
| dodoc examples/*.{c,h,sh} |
| fi |
| } |