libsigrok-0.4.0.ebuild 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="6"
  4. PYTHON_COMPAT=( python{2_7,3_{4,5}} )
  5. inherit eutils python-single-r1 java-pkg-opt-2
  6. if [[ ${PV} == "9999" ]]; then
  7. EGIT_REPO_URI="git://sigrok.org/${PN}"
  8. inherit git-r3 autotools
  9. else
  10. SRC_URI="http://sigrok.org/download/source/${PN}/${P}.tar.gz"
  11. KEYWORDS="~amd64 ~x86"
  12. fi
  13. DESCRIPTION="basic hardware drivers for logic analyzers and input/output file format support"
  14. HOMEPAGE="http://sigrok.org/wiki/Libsigrok"
  15. LICENSE="GPL-3"
  16. SLOT="0"
  17. IUSE="cxx ftdi java parport python serial static-libs test usb"
  18. REQUIRED_USE="java? ( cxx ) python? ( cxx ${PYTHON_REQUIRED_USE} )"
  19. # We also support librevisa, but that isn't in the tree ...
  20. LIB_DEPEND=">=dev-libs/glib-2.32.0[static-libs(+)]
  21. >=dev-libs/libzip-0.8:=[static-libs(+)]
  22. cxx? ( dev-cpp/glibmm:2[static-libs(+)] )
  23. python? ( ${PYTHON_DEPS} >=dev-python/pygobject-3.0.0[${PYTHON_USEDEP}] )
  24. ftdi? ( >=dev-embedded/libftdi-0.16:=[static-libs(+)] )
  25. parport? ( sys-libs/libieee1284[static-libs(+)] )
  26. serial? ( >=dev-libs/libserialport-0.1.1[static-libs(+)] )
  27. usb? ( virtual/libusb:1[static-libs(+)] )"
  28. RDEPEND="!static-libs? ( ${LIB_DEPEND//\[static-libs(+)]} )
  29. static-libs? ( ${LIB_DEPEND} )
  30. java? ( >=virtual/jre-1.4 )"
  31. DEPEND="${LIB_DEPEND//\[static-libs(+)]}
  32. test? ( >=dev-libs/check-0.9.4 )
  33. cxx? ( app-doc/doxygen )
  34. java? (
  35. >=dev-lang/swig-3.0.6
  36. >=virtual/jdk-1.4
  37. )
  38. python? (
  39. >=dev-lang/swig-3.0.6
  40. )
  41. virtual/pkgconfig"
  42. pkg_setup() {
  43. use python && python-single-r1_pkg_setup
  44. java-pkg-opt-2_pkg_setup
  45. }
  46. src_prepare() {
  47. [[ ${PV} == "9999" ]] && eautoreconf
  48. eapply_user
  49. }
  50. src_configure() {
  51. econf \
  52. $(use_with ftdi libftdi) \
  53. $(use_with parport libieee1284) \
  54. $(use_with serial libserialport) \
  55. $(use_with usb libusb) \
  56. $(use_enable cxx) \
  57. $(use_enable java) \
  58. $(use_enable python) \
  59. --disable-ruby \
  60. $(use_enable static-libs static)
  61. }
  62. src_test() {
  63. emake check
  64. }
  65. src_install() {
  66. default
  67. prune_libtool_files
  68. }