| 1 |
# Copyright 1999-2013 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/media-libs/libmtp/libmtp-9999.ebuild,v 1.6 2012/12/11 16:29:23 axs Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
inherit autotools eutils udev user toolchain-funcs
|
| 8 |
|
| 9 |
if [[ ${PV} == *9999* ]]; then
|
| 10 |
EGIT_REPO_URI="git://git.code.sf.net/p/libmtp/code"
|
| 11 |
EGIT_PROJECT="libmtp"
|
| 12 |
inherit git-2
|
| 13 |
else
|
| 14 |
KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
|
| 15 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
|
| 16 |
fi
|
| 17 |
|
| 18 |
DESCRIPTION="An implementation of Microsoft's Media Transfer Protocol (MTP)."
|
| 19 |
HOMEPAGE="http://libmtp.sourceforge.net/"
|
| 20 |
|
| 21 |
LICENSE="LGPL-2.1"
|
| 22 |
SLOT="0"
|
| 23 |
IUSE="+crypt doc examples static-libs"
|
| 24 |
|
| 25 |
RDEPEND="virtual/libusb:1
|
| 26 |
crypt? ( dev-libs/libgcrypt )"
|
| 27 |
DEPEND="${RDEPEND}
|
| 28 |
virtual/pkgconfig
|
| 29 |
doc? ( app-doc/doxygen )"
|
| 30 |
|
| 31 |
DOCS="AUTHORS ChangeLog README TODO"
|
| 32 |
|
| 33 |
pkg_setup() {
|
| 34 |
enewgroup plugdev
|
| 35 |
}
|
| 36 |
|
| 37 |
src_prepare() {
|
| 38 |
if [[ ${PV} == *9999* ]]; then
|
| 39 |
touch config.rpath # This is from upstream autogen.sh
|
| 40 |
eautoreconf
|
| 41 |
fi
|
| 42 |
}
|
| 43 |
|
| 44 |
src_configure() {
|
| 45 |
econf \
|
| 46 |
$(use_enable static-libs static) \
|
| 47 |
$(use_enable doc doxygen) \
|
| 48 |
$(use_enable crypt mtpz) \
|
| 49 |
--with-udev="$(udev_get_udevdir)" \
|
| 50 |
--with-udev-group=plugdev \
|
| 51 |
--with-udev-mode=0660
|
| 52 |
}
|
| 53 |
|
| 54 |
src_install() {
|
| 55 |
default
|
| 56 |
prune_libtool_files
|
| 57 |
|
| 58 |
if use examples; then
|
| 59 |
docinto examples
|
| 60 |
dodoc examples/*.{c,h,sh}
|
| 61 |
fi
|
| 62 |
}
|