libmtp-1.1.13.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit eutils udev user
  5. if [[ ${PV} == 9999* ]]; then
  6. EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/code"
  7. inherit autotools git-r3
  8. else
  9. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  10. KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd"
  11. fi
  12. DESCRIPTION="An implementation of Microsoft's Media Transfer Protocol (MTP)"
  13. HOMEPAGE="http://libmtp.sourceforge.net/"
  14. LICENSE="LGPL-2.1" # LGPL-2+ and LGPL-2.1+ ?
  15. SLOT="0/9" # Based on SONAME of libmtp shared library
  16. IUSE="+crypt doc examples static-libs"
  17. RDEPEND="virtual/libusb:1
  18. crypt? ( >=dev-libs/libgcrypt-1.5.4:0= )"
  19. DEPEND="${RDEPEND}
  20. virtual/pkgconfig
  21. doc? ( app-doc/doxygen )"
  22. DOCS="AUTHORS README TODO"
  23. pkg_setup() {
  24. enewgroup plugdev
  25. }
  26. src_prepare() {
  27. default
  28. # ChangeLog says "RETIRING THIS FILE ..pause.. GIT" (Last entry from start of 2011)
  29. rm -f ChangeLog
  30. if [[ ${PV} == 9999* ]]; then
  31. local crpthf=config.rpath
  32. local crpthd=/usr/share/gettext/${crpthf}
  33. if has_version '>sys-devel/gettext-0.18.3' && [[ -e ${crpthd} ]]; then
  34. cp "${crpthd}" .
  35. else
  36. touch ${crpthf} # This is from upstream autogen.sh
  37. fi
  38. eautoreconf
  39. fi
  40. }
  41. src_configure() {
  42. econf \
  43. $(use_enable static-libs static) \
  44. $(use_enable doc doxygen) \
  45. $(use_enable crypt mtpz) \
  46. --with-udev="$(get_udevdir)" \
  47. --with-udev-group=plugdev \
  48. --with-udev-mode=0660
  49. }
  50. src_install() {
  51. default
  52. prune_libtool_files --all
  53. if use examples; then
  54. docinto examples
  55. dodoc examples/*.{c,h,sh}
  56. fi
  57. }