spectools-2016.01.1.ebuild 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools eutils flag-o-matic toolchain-funcs udev
  5. MY_PN=${PN}
  6. MY_PV=${PV/\./-}
  7. MY_PV=${MY_PV/./-R}
  8. MY_P="${MY_PN}-${MY_PV}"
  9. S=${WORKDIR}/${MY_P}
  10. if [[ ${PV} == "9999" ]] ; then
  11. EGIT_REPO_URI="https://www.kismetwireless.net/${PN}.git"
  12. inherit git-r3
  13. else
  14. SRC_URI="http://www.kismetwireless.net/code/${MY_P}.tar.xz"
  15. KEYWORDS="amd64 arm ~arm64 ~ppc x86"
  16. fi
  17. DESCRIPTION="Spectrum Analyzer for Meta-Geek Wi-Spy and GSG Ubertooth hardware"
  18. HOMEPAGE="http://www.kismetwireless.net/spectools/"
  19. LICENSE="GPL-2"
  20. SLOT="0"
  21. IUSE="debug +ncurses +gtk"
  22. RDEPEND="
  23. virtual/libusb:0
  24. ncurses? ( sys-libs/ncurses:0= )
  25. gtk? ( x11-libs/gtk+:2
  26. x11-libs/cairo
  27. x11-libs/gdk-pixbuf
  28. x11-libs/pango
  29. dev-libs/glib:= )"
  30. DEPEND="${RDEPEND}
  31. virtual/pkgconfig"
  32. # Upstream has still not migrated to the libusb-1 line.
  33. src_prepare() {
  34. epatch "${FILESDIR}"/${PN}-2011.08.1_p20140618-tinfo.patch
  35. mv configure.{in,ac} || die
  36. eautoreconf
  37. # fix bug 577466 by restoring pre-GCC5 inline semantics
  38. append-cflags -std=gnu89
  39. }
  40. # Please note that upstream removed the --with-gtk-version option
  41. # and GTK is now automagical. GTK1 support was also removed.
  42. src_compile() {
  43. emake depend
  44. emake spectool_net
  45. use debug && emake spectool_raw
  46. use ncurses && emake spectool_curses
  47. use gtk && emake spectool_gtk
  48. #if use maemo; then
  49. # emake spectool_hildon usbcontrol \
  50. # || die "emake spectool_hildon usbcontrol failed"
  51. #fi
  52. }
  53. src_install() {
  54. dobin spectool_net
  55. use debug && dobin spectool_raw
  56. use ncurses && dobin spectool_curses
  57. use gtk && dobin spectool_gtk
  58. udev_dorules 99-wispy.rules
  59. dodoc README
  60. #if use maemo; then
  61. # dobin spectool_hildon
  62. # dosbin usbcontrol
  63. #fi
  64. }