libftdi-1.2.ebuild 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit cmake-utils
  5. MY_P="${PN}1-${PV}"
  6. if [[ ${PV} == 9999* ]] ; then
  7. EGIT_REPO_URI="git://developer.intra2net.com/${PN}"
  8. inherit git-2
  9. else
  10. SRC_URI="http://www.intra2net.com/en/developer/${PN}/download/${MY_P}.tar.bz2"
  11. KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 sparc x86"
  12. fi
  13. DESCRIPTION="Userspace access to FTDI USB interface chips"
  14. HOMEPAGE="http://www.intra2net.com/en/developer/libftdi/"
  15. LICENSE="LGPL-2"
  16. SLOT="1"
  17. IUSE="cxx doc examples python static-libs test tools"
  18. RDEPEND="virtual/libusb:1
  19. cxx? ( dev-libs/boost )
  20. python? ( dev-lang/python )
  21. tools? (
  22. !<dev-embedded/ftdi_eeprom-1.0
  23. dev-libs/confuse
  24. )"
  25. DEPEND="${RDEPEND}
  26. python? ( dev-lang/swig )
  27. doc? ( app-doc/doxygen )"
  28. S=${WORKDIR}/${MY_P}
  29. src_configure() {
  30. mycmakeargs=(
  31. $(cmake-utils_use cxx FTDIPP)
  32. $(cmake-utils_use doc DOCUMENTATION)
  33. $(cmake-utils_use examples EXAMPLES)
  34. $(cmake-utils_use python PYTHON_BINDINGS)
  35. $(cmake-utils_use static-libs STATICLIBS)
  36. $(cmake-utils_use test BUILD_TESTS)
  37. $(cmake-utils_use tools FTDI_EEPROM)
  38. -DCMAKE_SKIP_BUILD_RPATH=ON
  39. )
  40. cmake-utils_src_configure
  41. }
  42. src_install() {
  43. cmake-utils_src_install
  44. dodoc AUTHORS ChangeLog README TODO
  45. if use doc ; then
  46. # Clean up crap man pages. #356369
  47. rm -vf "${CMAKE_BUILD_DIR}"/doc/man/man3/_* || die
  48. doman "${CMAKE_BUILD_DIR}"/doc/man/man3/*
  49. dohtml "${CMAKE_BUILD_DIR}"/doc/html/*
  50. fi
  51. if use examples ; then
  52. docinto examples
  53. dodoc examples/*.c
  54. fi
  55. }