net-wireless/spectools: Add fix for ncurses[tinfo]
authorJustin Lecher <jlec@gentoo.org>
Thu, 27 Aug 2015 07:54:11 +0000 (09:54 +0200)
committerJustin Lecher <jlec@gentoo.org>
Thu, 27 Aug 2015 07:55:30 +0000 (09:55 +0200)
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=490976

Package-Manager: portage-2.2.20.1
Signed-off-by: Justin Lecher <jlec@gentoo.org>
net-wireless/spectools/files/spectools-2011.08.1_p20140618-tinfo.patch [new file with mode: 0644]
net-wireless/spectools/metadata.xml
net-wireless/spectools/spectools-2011.08.1_p20140618-r1.ebuild [new file with mode: 0644]
net-wireless/spectools/spectools-2011.08.1_p20140618.ebuild
net-wireless/spectools/spectools-9999.ebuild

diff --git a/net-wireless/spectools/files/spectools-2011.08.1_p20140618-tinfo.patch b/net-wireless/spectools/files/spectools-2011.08.1_p20140618-tinfo.patch
new file mode 100644 (file)
index 0000000..c5ef348
--- /dev/null
@@ -0,0 +1,41 @@
+ configure.in | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index a15258c..af4ae57 100644
+--- a/configure.in
++++ b/configure.in
+@@ -131,22 +131,23 @@ AC_CHECK_LIB([usb], [usb_init], AC_DEFINE(HAVE_LIBUSB, 1, LibUSB) LIBS="$LIBS -l
+ dnl Look for curses/libcurses
+ termcontrol="none";
+-AC_CHECK_LIB([ncurses], [initscr], 
++PKG_CHECK_MODULES([NCURSES], [ncurses], [foundhcurses=yesyes curseaux="${NCURSES_LIBS}" termcontrol="ncurses"], [
++      AC_CHECK_LIB([ncurses], [initscr], 
+                        AC_DEFINE(HAVE_LIBNCURSES, 1, NCurses terminal lib) \
+                        foundlcurses=yes curseaux="-lncurses" termcontrol="ncurses" )
+-if test "$foundlcurses" != "yes"; then
+-      AC_CHECK_LIB([curses], [initscr],
++      if test "$foundlcurses" != "yes"; then
++              AC_CHECK_LIB([curses], [initscr],
+                        AC_DEFINE(HAVE_LIBCURSES, 1, Curses terminal lib) \
+                        foundlcurses=yes curseaux="-lcurses" termcontrol="curses" )
+-fi
+-
+-if test "$termcontrol" = "ncurses"; then
+-      AC_CHECK_HEADER([ncurses.h], [foundhcurses=yes])
+-elif test "$termcontrol" = "curses"; then
+-      AC_CHECK_HEADER([curses.h], [foundhcurses=yes])
+-fi
++      fi
++      if test "$termcontrol" = "ncurses"; then
++              AC_CHECK_HEADER([ncurses.h], [foundhcurses=yes])
++      elif test "$termcontrol" = "curses"; then
++              AC_CHECK_HEADER([curses.h], [foundhcurses=yes])
++      fi
++])
+ if test "$foundhcurses$foundlcurses" != "yesyes"; then
+       AC_MSG_WARN(*** Could not find curses library.  Curses grapher will not be built.)
+ else
index 97e99311c4f5556569f93a64ff4e6d3da9ada119..2ad84fcbdca3359f27c5b2178f0f69d61b344a32 100644 (file)
@@ -16,9 +16,9 @@
                <name>Robin H. Johnson</name>
                <description>Maintainer, has 1st gen WiSpy hardware for testing</description>
        </maintainer>
-<use>
-       <flag name="debug">Build the raw output client for spectools. (for developers)</flag>
-       <flag name="ncurses">Build the ncurses based client for spectools</flag>
-       <flag name="gtk">Build the gtk-2 based client for spectools</flag>
-</use>
+       <use>
+               <flag name="debug">Build the raw output client for spectools. (for developers)</flag>
+               <flag name="ncurses">Build the ncurses based client for spectools</flag>
+               <flag name="gtk">Build the gtk-2 based client for spectools</flag>
+       </use>
 </pkgmetadata>
diff --git a/net-wireless/spectools/spectools-2011.08.1_p20140618-r1.ebuild b/net-wireless/spectools/spectools-2011.08.1_p20140618-r1.ebuild
new file mode 100644 (file)
index 0000000..6648268
--- /dev/null
@@ -0,0 +1,78 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils toolchain-funcs udev
+
+MY_PN=${PN}
+MY_PV=${PV/\./-}
+MY_PV=${MY_PV/./-R}
+MY_P="${MY_PN}-${MY_PV}"
+S=${WORKDIR}/${MY_P}
+
+if [[ ${PV} == "9999" ]] ; then
+               EGIT_REPO_URI="https://www.kismetwireless.net/${PN}.git"
+               inherit git-r3
+               KEYWORDS=""
+else
+               SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${MY_P}.tar.xz"
+               KEYWORDS="~amd64 ~arm ~ppc ~x86"
+fi
+
+DESCRIPTION="Spectrum Analyzer for Meta-Geek Wi-Spy and GSG Ubertooth hardware"
+HOMEPAGE="http://www.kismetwireless.net/spectools/"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug +ncurses +gtk"
+
+RDEPEND="
+       virtual/libusb:0
+       ncurses? ( sys-libs/ncurses:0= )
+       gtk? ( x11-libs/gtk+:2 )"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+# Upstream has still not migrated to the libusb-1 line.
+# Maemo: Add hildon and bbus
+
+src_prepare() {
+       epatch "${FILESDIR}"/${P}-tinfo.patch
+       mv configure.{in,ac} || die
+       eautoreconf
+}
+
+# Please note that upstream removed the --with-gtk-version option
+# and GTK is now automagical. GTK1 support was also removed.
+src_compile() {
+       emake depend
+
+       emake spectool_net
+
+       use debug && emake spectool_raw
+
+       use ncurses && emake spectool_curses
+
+       use gtk && emake spectool_gtk
+
+       #if use maemo; then
+       #       emake spectool_hildon usbcontrol \
+       #               || die "emake spectool_hildon usbcontrol failed"
+       #fi
+}
+
+src_install() {
+       dobin spectool_net
+       use debug && dobin spectool_raw
+       use ncurses && dobin spectool_curses
+       use gtk && dobin spectool_gtk
+
+       udev_dorules 99-wispy.rules
+       dodoc README
+
+       #if use maemo; then
+       #       dobin spectool_hildon
+       #       dosbin usbcontrol
+       #fi
+}
index b30e6ce1f2e87e526c377b7c504b979b6e5bfb33..650868c672fec63dd1413652e3650bc1e0c20ea9 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -27,8 +27,9 @@ LICENSE="GPL-2"
 SLOT="0"
 IUSE="debug +ncurses +gtk"
 
-RDEPEND="virtual/libusb:0
-       ncurses? ( sys-libs/ncurses )
+RDEPEND="
+       virtual/libusb:0
+       ncurses? ( sys-libs/ncurses:0= )
        gtk? ( x11-libs/gtk+:2 )"
 DEPEND="${RDEPEND}
        virtual/pkgconfig"
index e5c5de4b3fc6bc277c0b7b17b74c97fc4ffbcec2..2b88fdce4a16eade1a44272b7e278a3d8661c29d 100644 (file)
@@ -1,9 +1,10 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
 EAPI=5
-inherit udev toolchain-funcs
+
+inherit autotools eutils toolchain-funcs udev
 
 MY_PN=${PN}
 MY_PV=${PV/\./-}
@@ -27,14 +28,21 @@ LICENSE="GPL-2"
 SLOT="0"
 IUSE="debug +ncurses +gtk"
 
-RDEPEND="virtual/libusb:0
-       ncurses? ( sys-libs/ncurses )
+RDEPEND="
+       virtual/libusb:0
+       ncurses? ( sys-libs/ncurses:0= )
        gtk? ( x11-libs/gtk+:2 )"
 DEPEND="${RDEPEND}
        virtual/pkgconfig"
 # Upstream has still not migrated to the libusb-1 line.
 # Maemo: Add hildon and bbus
 
+src_prepare() {
+       epatch "${FILESDIR}"/${PN}-2011.08.1_p20150618-tinfo.patch
+       mv configure.{in,ac} || die
+       eautoreconf
+}
+
 # Please note that upstream removed the --with-gtk-version option
 # and GTK is now automagical. GTK1 support was also removed.
 src_compile() {