libftdi-0.19.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright 1999-2011 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="2"
  4. if [[ ${PV} == 9999* ]] ; then
  5. EGIT_REPO_URI="git://developer.intra2net.com/${PN}"
  6. inherit git-2 autotools
  7. else
  8. SRC_URI="http://www.intra2net.com/en/developer/${PN}/download/${P}.tar.gz"
  9. KEYWORDS="amd64 arm ppc ppc64 sparc x86"
  10. fi
  11. DESCRIPTION="Userspace access to FTDI USB interface chips"
  12. HOMEPAGE="http://www.intra2net.com/en/developer/libftdi/"
  13. LICENSE="LGPL-2"
  14. SLOT="0"
  15. IUSE="cxx doc examples python static-libs"
  16. RDEPEND="virtual/libusb:0
  17. cxx? ( dev-libs/boost )
  18. python? ( dev-lang/python )"
  19. DEPEND="${RDEPEND}
  20. python? ( dev-lang/swig )
  21. doc? ( app-doc/doxygen )"
  22. src_prepare() {
  23. if [[ ${PV} == 9999* ]] ; then
  24. mkdir -p m4
  25. eautoreconf
  26. fi
  27. }
  28. src_configure() {
  29. econf \
  30. $(use_enable cxx libftdipp) \
  31. $(use_with doc docs) \
  32. $(use_with examples) \
  33. $(use_enable python python-binding) \
  34. $(use_enable static-libs static)
  35. }
  36. src_install() {
  37. emake DESTDIR="${D}" install || die
  38. use static-libs || find "${D}" -name '*.la' -delete
  39. dodoc ChangeLog README
  40. if use doc ; then
  41. doman doc/man/man3/*
  42. dohtml doc/html/*
  43. fi
  44. if use examples ; then
  45. docinto examples
  46. dodoc examples/*.c
  47. fi
  48. }