summaryrefslogtreecommitdiff
path: root/net-analyzer/nast
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-04 05:48:38 -0500
commitbfd9c39e4712ebdb442d4ca0673061faed1e70e1 (patch)
tree0d7a74b4463ee387f9cf9368ceb1b757f694f72a /net-analyzer/nast
parentf716a9fe6455d39eef01e718aae68dae61c19704 (diff)
downloadbaldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.gz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.xz
baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.zip
Revert "Adding metadata"
This reverts commit f716a9fe6455d39eef01e718aae68dae61c19704.
Diffstat (limited to 'net-analyzer/nast')
-rw-r--r--net-analyzer/nast/Manifest1
-rw-r--r--net-analyzer/nast/files/0001-Fix-signal-handler.patch43
-rw-r--r--net-analyzer/nast/files/0002-Fix-Wformat-security.patch58
-rw-r--r--net-analyzer/nast/files/nast-0.2.0-gentoo.patch104
-rw-r--r--net-analyzer/nast/metadata.xml11
-rw-r--r--net-analyzer/nast/nast-0.2.0-r4.ebuild49
6 files changed, 266 insertions, 0 deletions
diff --git a/net-analyzer/nast/Manifest b/net-analyzer/nast/Manifest
new file mode 100644
index 000000000000..89294fc11f3a
--- /dev/null
+++ b/net-analyzer/nast/Manifest
@@ -0,0 +1 @@
+DIST nast-0.2.0.tar.gz 147568 BLAKE2B f51a0b3cebfac04cb3aa57f627099aecf893722ca8552c0e6f7f67266e13729e5c54c533cd7599c6d7cfa50c89ad5181439d4c1bc5bba883438213b45b4221ee SHA512 fbf29f9c2ae783e38d40054577a697f631c6590075ef80aa970002f1133c681a4cc1fcd715bc6140cc361c609dcebe8c6bf74544e8710363d30649398b3e388c
diff --git a/net-analyzer/nast/files/0001-Fix-signal-handler.patch b/net-analyzer/nast/files/0001-Fix-signal-handler.patch
new file mode 100644
index 000000000000..7961649e7db6
--- /dev/null
+++ b/net-analyzer/nast/files/0001-Fix-signal-handler.patch
@@ -0,0 +1,43 @@
+From eff649cd681e52b953dcf37065a7035246930858 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 12 Feb 2025 15:32:37 +0000
+Subject: [PATCH 1/2] Fix signal handler
+
+Signal handlers need to take an argument.
+
+Bug: https://bugs.gentoo.org/944402
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ common.c | 2 +-
+ include/nast.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/common.c b/common.c
+index 5649295..f2b60f4 100644
+--- a/common.c
++++ b/common.c
+@@ -226,7 +226,7 @@ void openfile(void)
+ }
+
+ /* signal handler */
+-void sigexit()
++void sigexit(int unused)
+ {
+ #ifdef HAVE_LIBNCURSES
+ # include <ncurses.h>
+diff --git a/include/nast.h b/include/nast.h
+index f5cd047..a65a404 100644
+--- a/include/nast.h
++++ b/include/nast.h
+@@ -73,7 +73,7 @@ int car (char *dev, int lg);
+ int run_bc (char *dev, char *filter);
+
+ /* other functions*/
+-void sigexit();
++void sigexit(int unused);
+ void openfile(void);
+ void bkg(void);
+
+--
+2.48.1
+
diff --git a/net-analyzer/nast/files/0002-Fix-Wformat-security.patch b/net-analyzer/nast/files/0002-Fix-Wformat-security.patch
new file mode 100644
index 000000000000..039950a6344e
--- /dev/null
+++ b/net-analyzer/nast/files/0002-Fix-Wformat-security.patch
@@ -0,0 +1,58 @@
+From 63598f0194ec0b291af30d8d7b3ee7bab1cd0928 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 12 Feb 2025 15:35:13 +0000
+Subject: [PATCH 2/2] Fix -Wformat-security
+
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ bcount.c | 2 +-
+ ncurses/n_nast.c | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/bcount.c b/bcount.c
+index 3130188..7987ac6 100644
+--- a/bcount.c
++++ b/bcount.c
+@@ -153,7 +153,7 @@ void bytecounting ()
+ else icons++;
+
+ sprintf (value, "%Ld", number);
+- printf (value);
++ printf ("%s", value);
+
+ /* calculate space */
+ if (strlen(value) < 6) printf ("\t\t");
+diff --git a/ncurses/n_nast.c b/ncurses/n_nast.c
+index 3e02859..ba50f2f 100644
+--- a/ncurses/n_nast.c
++++ b/ncurses/n_nast.c
+@@ -641,7 +641,7 @@ void title(void)
+ title = subwin(stdscr,3,COLS,0,0);
+ wbkgd(title,COLOR_PAIR(1));
+ box(title,0,0);
+- mvwprintw(title,1,(COLS-sizeof(TITLE))/2, TITLE);
++ mvwprintw(title,1,(COLS-sizeof(TITLE))/2, "%s", TITLE);
+ wrefresh(title);
+ }
+
+@@ -748,7 +748,7 @@ void pop_up_win(void)
+ pop_up = newwin(17,55,(LINES-17)/2,(COLS-55)/2);
+ wbkgd(pop_up,COLOR_PAIR(4));
+ box(pop_up,0,0);
+- mvwprintw(pop_up,0,(55 -strlen(message))/2, message);
++ mvwprintw(pop_up,0,(55 -strlen(message))/2, "%s", message);
+ wrefresh(pop_up);
+ }
+
+@@ -759,7 +759,7 @@ void help_win(void)
+ help = newwin(23,67,(LINES-23)/2,(COLS-67)/2);
+ wbkgd(help,COLOR_PAIR(4));
+ box(help,0,0);
+- mvwprintw(help,0,(67 -strlen(message))/2, message);
++ mvwprintw(help,0,(67 -strlen(message))/2, "%s", message);
+ wrefresh(help);
+ }
+
+--
+2.48.1
+
diff --git a/net-analyzer/nast/files/nast-0.2.0-gentoo.patch b/net-analyzer/nast/files/nast-0.2.0-gentoo.patch
new file mode 100644
index 000000000000..015354e51862
--- /dev/null
+++ b/net-analyzer/nast/files/nast-0.2.0-gentoo.patch
@@ -0,0 +1,104 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -83,22 +83,6 @@
+ # -- libnet --
+ #
+
+-filechk="yes"
+-AC_CHECK_FILE(/usr/lib/libnet.a,, filechk="no")
+-if test "$filechk" = "no"; then
+- AC_CHECK_FILE(/usr/local/lib/libnet.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
+-fi
+-
+-if test "$filechk" = "no"; then AC_MSG_ERROR([
+-
+-Libnet archive file (libnet.a) not found in /usr or /usr/local!
+-
+-Libnet-1.1.x Packet Shaping Library is required.
+-You can download it from official web site: http://www.packetfactory.net/libnet
+-
+-])
+-fi
+-
+ AC_CHECK_LIB(net, libnet_name2addr4,, AC_MSG_ERROR([
+
+ Libnet-1.1.x Packet Shaping Library not found! It's required.
+@@ -110,22 +94,6 @@
+ # -- libpcap --
+ #
+
+-filechk="yes"
+-AC_CHECK_FILE(/usr/lib/libpcap.a,, filechk="no")
+-if test "$filechk" = "no"; then
+- AC_CHECK_FILE(/usr/local/lib/libpcap.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
+-fi
+-
+-if test "$filechk" = "no"; then AC_MSG_ERROR([
+-
+-Libpcap archive file (libpcap.a) not found in /usr or /usr/local!
+-
+-Libpcap-0.7.1 Packet Capture Library is required.
+-You can download it from official web site: http://www.tcpdump.org/#current
+-
+-])
+-fi
+-
+ AC_CHECK_LIB(pcap, pcap_dispatch,, AC_MSG_ERROR([
+
+ Libpcap-0.7.1 Packet Capture Library not found! It's required.
+@@ -137,25 +105,7 @@
+ # -- libncurses support --
+ #
+
+-filechk="yes"
+-AC_CHECK_FILE(/usr/lib/libncurses.a,, filechk="no")
+-if test "$filechk" = "no"; then
+- AC_CHECK_FILE(/usr/local/lib/libncurses.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
+-fi
+-
+-if test "$filechk" = "no";
+-then AC_MSG_WARN([
+-
+-Libncurses archive file (libncurses.a) not found in /usr or /usr/local!
+-
+-Ncurses library (*) not found in your system.
+-You can download it from official web site: http://www.gnu.org/software/ncurses/ncurses.html
+-(*): CRT screen handling and optimization package
+-
+-Building without ncurses menu support (-G flag will doesn't work)
+-
+-])
+-fi
++PKG_CHECK_MODULES(ncurses,ncurses,[LIBS="$LIBS $ncurses_LIBS"],)
+
+ ENABLE_NCRS="no"
+ AC_CHECK_LIB(ncurses, initscr, ENABLE_NCRS="yes"; NCURSES=ncurses/n_nast.o; LIBS="-lncurses $LIBS"; AC_DEFINE(HAVE_LIBNCURSES), AC_MSG_RESULT([
+@@ -173,28 +123,6 @@
+ # --lmenu support--
+ #
+
+-filechk="yes"
+-AC_CHECK_FILE(/usr/lib/libmenu.a,, filechk="no")
+-if test "$filechk" = "no"; then
+- AC_CHECK_FILE(/usr/local/lib/libmenu.a, filechk="yes" ; LDFLAGS="-L/usr/local/lib"; CPPFLAGS="-I/usr/local/include")
+-fi
+-
+-if test "$filechk" = "no";
+-then AC_MSG_WARN([
+-
+-Menu archive file (libncurses.a) not found in /usr or /usr/local!
+-
+-
+-Menu library (*) not found in your system.
+-You can download it from official web site: http://www.gnu.org/software/ncurses/ncurses.html
+-(*): CRT screen handling and optimization package
+-
+-
+-Building without ncurses menu support (-G flag will doesn't work)
+-])
+-
+-fi
+-
+ ENABLE_NCRS="no"
+ AC_CHECK_LIB(menu, menu_opts_off, ENABLE_NCRS="yes"; MENU=ncurses/n_menu.o; LIBS="-lmenu $LIBS"; AC_DEFINE(HAVE_LIBMENU), AC_MSG_RESULT([
+
diff --git a/net-analyzer/nast/metadata.xml b/net-analyzer/nast/metadata.xml
new file mode 100644
index 000000000000..b5b76fdc2ceb
--- /dev/null
+++ b/net-analyzer/nast/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>netmon@gentoo.org</email>
+ <name>Gentoo network monitoring and analysis project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">nast.berlios</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-analyzer/nast/nast-0.2.0-r4.ebuild b/net-analyzer/nast/nast-0.2.0-r4.ebuild
new file mode 100644
index 000000000000..7417306e5b69
--- /dev/null
+++ b/net-analyzer/nast/nast-0.2.0-r4.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="NAST - Network Analyzer Sniffer Tool"
+HOMEPAGE="https://sourceforge.net/projects/nast.berlios/"
+SRC_URI="https://downloads.sourceforge.net/${PN}.berlios/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 x86"
+IUSE="ncurses"
+
+RDEPEND="
+ >=net-libs/libnet-1.1.1
+ net-libs/libpcap
+ ncurses? ( >=sys-libs/ncurses-5.4:= )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+ "${FILESDIR}"/0001-Fix-signal-handler.patch
+ "${FILESDIR}"/0002-Fix-Wformat-security.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ append-cflags -fcommon
+ default
+}
+
+src_compile() {
+ emake CFLAGS="${CFLAGS}"
+}
+
+src_install() {
+ dosbin nast
+ doman nast.8
+ dodoc AUTHORS BUGS CREDITS ChangeLog NCURSES_README README TODO
+}