And add license information, homepage and switch upstream source.
[Peter: no longer needs IPv6/mmu, fix static link]
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
config BR2_PACKAGE_BMON
bool "bmon"
- depends on BR2_INET_IPV6
- depends on BR2_USE_MMU # fork()
+ depends on BR2_TOOLCHAIN_HAS_THREADS # libnl
+ select BR2_PACKAGE_LIBCONFUSE
+ select BR2_PACKAGE_LIBNL
+ select BR2_PACKAGE_NCURSES
help
- Linux bandwidth monitor
+ bmon is a bandwidth monitor capable of retrieving statistics from
+ various input modules. It provides various output methods
+ including a curses based interface.
-comment "bmon needs a toolchain w/ IPv6"
- depends on BR2_USE_MMU
- depends on !BR2_INET_IPV6
+ http://www.infradead.org/~tgr/bmon/
+
+comment "bmon needs a toolchain w/ threads"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS
+++ /dev/null
-[PATCH] fix build without curses
-
-bmon supports a --disable-curses configure option, but still #error
-out if curses wasn't detected, even though the rest of the code is
-written to work without curses support.
-
-Fix it by removing the bogus #error line.
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- include/bmon/config.h | 2 --
- 1 file changed, 2 deletions(-)
-
-Index: bmon-2.1.0/include/bmon/config.h
-===================================================================
---- bmon-2.1.0.orig/include/bmon/config.h
-+++ bmon-2.1.0/include/bmon/config.h
-@@ -118,8 +118,6 @@
- # endif /* !HAVE_CURSES */
- #elif defined HAVE_CURSES
- # include <curses.h>
--#else
--# error "*** ERROR: Neither ncurses nor curses is present on your system. ***"
- #endif /* HAVE_[N]CURSES */
-
- #if defined HAVE_RRD
+++ /dev/null
-diff -ru bmon-2.1.0~/src/out_audio.c bmon-2.1.0/src/out_audio.c
---- bmon-2.1.0~/src/out_audio.c 2008-07-26 20:06:24.000000000 +0200
-+++ bmon-2.1.0/src/out_audio.c 2008-07-26 20:09:42.000000000 +0200
-@@ -141,7 +141,7 @@
- .om_draw = audio_draw,
- .om_set_opts = audio_set_opts,
- .om_probe = audio_probe,
-- .om_shutdown audio_shutdown,
-+ .om_shutdown = audio_shutdown
- };
-
- static void __init audio_init(void)
-diff -ru bmon-2.1.0~/src/out_db.c bmon-2.1.0/src/out_db.c
---- bmon-2.1.0~/src/out_db.c 2008-07-26 20:06:24.000000000 +0200
-+++ bmon-2.1.0/src/out_db.c 2008-07-26 20:07:44.000000000 +0200
-@@ -679,7 +679,7 @@
- .om_draw = db_draw,
- .om_set_opts = db_set_opts,
- .om_probe = db_probe,
-- .om_shutdown db_shutdown,
-+ .om_shutdown = db_shutdown,
- };
-
- static void __init db_init(void)
-diff -ru bmon-2.1.0~/src/out_xml_event.c bmon-2.1.0/src/out_xml_event.c
---- bmon-2.1.0~/src/out_xml_event.c 2008-07-26 20:06:24.000000000 +0200
-+++ bmon-2.1.0/src/out_xml_event.c 2008-07-26 20:09:42.000000000 +0200
-@@ -127,7 +127,7 @@
- .om_draw = xml_event_draw,
- .om_set_opts = xml_event_set_opts,
- .om_probe = xml_event_probe,
-- .om_shutdown xml_event_shutdown,
-+ .om_shutdown = xml_event_shutdown
- };
-
- static void __init xml_event_init(void)
+++ /dev/null
-diff -Nura bmon/configure bmon.libnl/configure
---- bmon/configure 2005-04-05 12:01:33.000000000 -0300
-+++ bmon.libnl/configure 2009-06-10 16:10:52.000000000 -0300
-@@ -7327,13 +7327,13 @@
- echo "${ECHO_T}$ac_cv_lib_nl_nl_connect" >&6
- if test $ac_cv_lib_nl_nl_connect = yes; then
-
--
--cat >>confdefs.h <<_ACEOF
--#define HAVE_NL "1"
--_ACEOF
--
-- LIBNL="-lnl"
-- NL="Yes"
-+ case ${target_os} in
-+ *linux*)
-+ echo
-+ echo "*** Warning: Building bmon on Linux w/o libnl ***"
-+ echo
-+ ;;
-+ esac
-
- else
-
+++ /dev/null
-diff -Nura bmon/GNUmakefile bmon.nostrip/GNUmakefile
---- bmon/GNUmakefile 2005-04-05 12:01:33.000000000 -0300
-+++ bmon.nostrip/GNUmakefile 2009-06-10 16:12:04.000000000 -0300
-@@ -50,7 +50,7 @@
- install:
- ./install-sh -d -m 0755 $(DESTDIR)$(prefix)/bin
- ./install-sh -d -m 0755 $(DESTDIR)$(mandir)/man1
-- ./install-sh -c -s -m 0755 src/bmon $(DESTDIR)$(prefix)/bin
-+ ./install-sh -c -m 0755 src/bmon $(DESTDIR)$(prefix)/bin
- ./install-sh -c -m 0644 man/bmon.1 $(DESTDIR)$(mandir)/man1
-
- show: Makefile.opts
#
################################################################################
-BMON_VERSION = 2.1.0
-BMON_SITE = http://distfiles.gentoo.org/distfiles
+BMON_VERSION = 3.2
+BMON_SITE = $(call github,tgraf,bmon,v$(BMON_VERSION))
+# configure not shipped
+BMON_AUTORECONF = YES
+BMON_DEPENDENCIES = host-pkgconf libconfuse libnl ncurses
+BMON_LICENSE = BSD-2c
+BMON_LICENSE_FILES = LICENSE
-ifeq ($(BR2_PACKAGE_NCURSES),y)
-BMON_DEPENDENCIES += ncurses
-else
-BMON_CONF_OPT += --disable-curses
-endif
-
-ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
-BMON_DEPENDENCIES += alsa-lib
-else
-BMON_CONF_OPT += --disable-asound
-endif
-
-ifneq ($(BR2_PREFER_STATIC_LIB),y)
# link dynamically unless explicitly requested otherwise
+ifeq ($(BR2_PREFER_STATIC_LIB),)
BMON_CONF_OPT += --disable-static
+else
+# forgets to explicitly link with pthread for libnl
+BMON_CONF_OPT += LIBS=-lpthread
endif
$(eval $(autotools-package))