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