summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/slurm')
-rw-r--r--net-analyzer/slurm/Manifest1
-rw-r--r--net-analyzer/slurm/files/slurm-0.3.3-gentoo.patch48
-rw-r--r--net-analyzer/slurm/files/slurm-0.3.3-overflow.patch17
-rw-r--r--net-analyzer/slurm/files/slurm-0.3.3-theme.patch16
-rw-r--r--net-analyzer/slurm/metadata.xml5
-rw-r--r--net-analyzer/slurm/slurm-0.3.3-r1.ebuild40
-rw-r--r--net-analyzer/slurm/slurm-0.3.3-r2.ebuild38
7 files changed, 165 insertions, 0 deletions
diff --git a/net-analyzer/slurm/Manifest b/net-analyzer/slurm/Manifest
new file mode 100644
index 000000000000..5f06db15c49c
--- /dev/null
+++ b/net-analyzer/slurm/Manifest
@@ -0,0 +1 @@
+DIST slurm-0.3.3.tar.gz 122839 SHA256 b25889aa1910b1bb48e4eafdac0c810bc02e8b98ddb2ade0aed2ec64672d6834 SHA512 67ffef9d0fc6239e2a742b2020a2a1fa913a6f0d681ffb7fd00611265e60b39f83b18cbd782ce841b6b39ed0db2c40cd6410d7f5d9408bf0eb0361b95949a8a3 WHIRLPOOL a35d3cb726bf390f90c7f095c34b94b48cc0c3f59a8f8b88aa6ce31c033f74542e8ce7cefb1ecc15ea13ad5addecd9c0a321bf1e2834b582ff770fcfe9c4e1e2
diff --git a/net-analyzer/slurm/files/slurm-0.3.3-gentoo.patch b/net-analyzer/slurm/files/slurm-0.3.3-gentoo.patch
new file mode 100644
index 000000000000..bd97a10c1e81
--- /dev/null
+++ b/net-analyzer/slurm/files/slurm-0.3.3-gentoo.patch
@@ -0,0 +1,48 @@
+--- a/configure.in
++++ b/configure.in
+@@ -40,31 +40,6 @@
+ fi
+ AC_DEFINE(OSTYPE, ["${OSTYPE}"], [The operating system to build for])
+
+-for cursespath in /usr/include/ncurses.h /usr/local/include/ncurses.h /usr/local/include/ncurses/ncurses.h /opt/include/ncurses.h /opt/include/curses.h /usr/include/curses.h /usr/local/include/curses.h /dev/null
+-do
+- test -f "${cursespath}" && break
+-done
+-case ${cursespath} in
+- /usr/include/*)
+- CFLAGS="$CFLAGS -I/usr/include"
+- LDFLAGS=""
+- ;;
+- /usr/local/include/ncurses/*)
+- CFLAGS="${CFLAGS} -I/usr/local/include/ncurses"
+- LDFLAGS="-L/usr/local/lib"
+- SOLLDFLAGS="-R/usr/local/lib"
+- ;;
+- /usr/local/include/*)
+- CFLAGS="${CFLAGS} -I/usr/local/include"
+- LDFLAGS="-L/usr/local/lib"
+- SOLLDFLAGS="-R/usr/local/lib"
+- ;;
+- /opt/include/*)
+- CFLAGS="${CFLAGS} -I/opt/include"
+- LDFLAGS="-L/opt/lib"
+- SOLLDFLAGS="-R/opt/lib"
+- ;;
+-esac
+ # add Slowlaris -R and libraries to LDFLAGS
+ if test ${OSTYPE} = "solaris" ; then
+ LDFLAGS="${LDFLAGS} ${SOLLDFLAGS} -lnsl -lsocket -lkstat"
+@@ -74,7 +49,12 @@
+ ncurses_support="no"
+ curses_support="no"
+ color_support="no"
+-AC_CHECK_LIB(ncurses, use_default_colors, LDFLAGS="$LDFLAGS -lncurses"; CFLAGS="$CFLAGS -D_HAVE_NCURSES -D_HAVE_NCURSES_COLOR"; color_support="yes"; ncurses_support="yes", AC_CHECK_LIB(ncurses, use_default_colors, LDFLAGS="$LDFLAGS -lncurses"; CFLAGS="$CFLAGS -D_HAVE_NCURSES"; ncurses_support="yes"; echo "NO TRANSPARENCY SUPPORT in this ncurses lib", AC_CHECK_LIB(curses, initscr, LDFLAGS="$LDFLAGS -lcurses"; CFLAGS="$CFLAGS -D_HAVE_CURSES"; curses_support="yes"; echo "NO TRANSPARENCY SUPPORT in curses lib")))
++PKG_CHECK_MODULES(ncurses,ncurses,
++ LIBS="$LIBS $ncurses_LIBS"
++ AC_DEFINE(HAVE_NCURSES, 1, [Define if we have ncurses])
++ AC_DEFINE(HAVE_NCURSES_COLOR, 1, [We want color])
++ color_support="yes"; ncurses_support="yes"
++ ,AC_MSG_ERROR([ncurses not found]))
+
+ # disable color support on Solaris for now
+ if test ${OSTYPE} = "solaris" ; then
diff --git a/net-analyzer/slurm/files/slurm-0.3.3-overflow.patch b/net-analyzer/slurm/files/slurm-0.3.3-overflow.patch
new file mode 100644
index 000000000000..f9adc1d9bf71
--- /dev/null
+++ b/net-analyzer/slurm/files/slurm-0.3.3-overflow.patch
@@ -0,0 +1,17 @@
+--- a/src/linux.c
++++ b/src/linux.c
+@@ -68,11 +68,11 @@
+
+ /* do not parse the first two lines as they only contain static garbage */
+ fseek(proc_net_dev, 0, SEEK_SET);
+- fgets(buffer, BUFSIZ-1, proc_net_dev);
+- fgets(buffer, BUFSIZ-1, proc_net_dev);
++ fgets(buffer, BUFSIZE-1, proc_net_dev);
++ fgets(buffer, BUFSIZE-1, proc_net_dev);
+
+ interfacefound = 0;
+- while (fgets(buffer, BUFSIZ-1, proc_net_dev) != NULL)
++ while (fgets(buffer, BUFSIZE-1, proc_net_dev) != NULL)
+ {
+ /* find the device name and substitute ':' with '\0' */
+ ptr = buffer;
diff --git a/net-analyzer/slurm/files/slurm-0.3.3-theme.patch b/net-analyzer/slurm/files/slurm-0.3.3-theme.patch
new file mode 100644
index 000000000000..131554ee57f7
--- /dev/null
+++ b/net-analyzer/slurm/files/slurm-0.3.3-theme.patch
@@ -0,0 +1,16 @@
+--- a/theme.c
++++ b/theme.c
+@@ -70,13 +70,7 @@
+ if ((f = fopen(filename, "r")) == NULL)
+ {
+ bzero(&filename, BUFSIZ);
+-#ifdef __NetBSD__
+- snprintf(filename, BUFSIZ, "/usr/pkg/share/slurm/%s.theme", name);
+-#elif __Debian__
+ snprintf(filename, BUFSIZ, "/usr/share/slurm/%s.theme", name);
+-#else
+- snprintf(filename, BUFSIZ, "/usr/local/share/slurm/%s.theme", name);
+-#endif
+ if ((f = fopen(filename, "r")) == NULL)
+ error(ERR_FATAL, "cannot find theme '%s'", name);
+ }
diff --git a/net-analyzer/slurm/metadata.xml b/net-analyzer/slurm/metadata.xml
new file mode 100644
index 000000000000..03aa50bab7e3
--- /dev/null
+++ b/net-analyzer/slurm/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>netmon</herd>
+</pkgmetadata>
diff --git a/net-analyzer/slurm/slurm-0.3.3-r1.ebuild b/net-analyzer/slurm/slurm-0.3.3-r1.ebuild
new file mode 100644
index 000000000000..f582f8e443c6
--- /dev/null
+++ b/net-analyzer/slurm/slurm-0.3.3-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit autotools eutils
+
+DESCRIPTION="Realtime network interface monitor based on FreeBSD's pppstatus"
+HOMEPAGE="http://www.wormulon.net/projects/slurm"
+SRC_URI="http://www.wormulon.net/files/code/slurm/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+IUSE=""
+
+DEPEND="sys-libs/ncurses"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-overflow.patch \
+ "${FILESDIR}"/${P}-theme.patch
+ eautoreconf
+}
+
+src_install() {
+ # binary
+ dobin slurm
+
+ # themes to use with -t option
+ insinto /usr/share/${PN}/themes
+ doins themes/*.theme
+
+ # manual and other docs
+ doman slurm.1
+ dodoc AUTHORS ChangeLog COPYRIGHT FAQ KEYS README THANKS \
+ THEMES.txt TODO
+}
diff --git a/net-analyzer/slurm/slurm-0.3.3-r2.ebuild b/net-analyzer/slurm/slurm-0.3.3-r2.ebuild
new file mode 100644
index 000000000000..a4a79bce3510
--- /dev/null
+++ b/net-analyzer/slurm/slurm-0.3.3-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit autotools eutils
+
+DESCRIPTION="Realtime network interface monitor based on FreeBSD's pppstatus"
+HOMEPAGE="http://www.wormulon.net/projects/slurm"
+SRC_URI="http://www.wormulon.net/files/code/slurm/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~ppc ~sparc x86"
+
+RDEPEND="sys-libs/ncurses"
+DEPEND="
+ ${RDEPEND}
+ virtual/pkgconfig
+"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-gentoo.patch \
+ "${FILESDIR}"/${P}-overflow.patch \
+ "${FILESDIR}"/${P}-theme.patch
+ eautoreconf
+}
+
+src_install() {
+ dobin slurm
+
+ insinto /usr/share/${PN}
+ doins themes/*.theme
+
+ doman slurm.1
+ dodoc AUTHORS ChangeLog FAQ KEYS README THANKS THEMES.txt TODO
+}