diff options
author | Oliver Bandel | 2021-03-10 02:52:50 +0100 |
---|---|---|
committer | Oliver Bandel | 2021-03-10 02:52:50 +0100 |
commit | b3542e61b9c05670f98f2abea7110a9b40967663 (patch) | |
tree | 43ff30fd3936d9adaa1738906e2c86d66f0546a3 | |
parent | c91e6cedbb590d1a7a51927465ef45241f178a09 (diff) | |
download | aur-b3542e61b9c05670f98f2abea7110a9b40967663.tar.gz |
Adapting to changes in pcap-lib and some other patches.
Thanks to daltomi (AUR).
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 7 | ||||
-rw-r--r-- | trafshow.patch | 94 |
3 files changed, 98 insertions, 9 deletions
@@ -1,9 +1,7 @@ -# Generated by makepkg 4.2.1 -# Mon Mar 23 16:45:37 UTC 2015 pkgbase = trafshow pkgdesc = Full screen network monitoring pkgver = 5.2.3 - pkgrel = 5 + pkgrel = 6 url = http://soft.risp.ru/trafshow/index_en.shtml arch = i686 arch = x86_64 @@ -13,7 +11,7 @@ pkgbase = trafshow source = http://fossies.org/linux/misc/old/trafshow-5.2.3.tgz source = trafshow.patch md5sums = 0b2f0bb23b7832138b7d841437b9e182 - md5sums = 4a85997d88dffa27ac469c6429752cb2 + md5sums = c6f0102c66868a65d93f210c524e7ff9 pkgname = trafshow @@ -1,19 +1,22 @@ # Maintainer: oliver < a t > first . in-berlin . de +# Contributor: daltomi (from AUR) # Contributor: gunnar <tomtinn@gmail.com> pkgname=trafshow pkgver=5.2.3 -pkgrel=5 +pkgrel=6 pkgdesc="Full screen network monitoring" arch=('i686' 'x86_64') url="http://soft.risp.ru/trafshow/index_en.shtml" license=('netbsd') depends=('libpcap' 'ncurses') source=(http://fossies.org/linux/misc/old/${pkgname}-$pkgver.tgz trafshow.patch) -md5sums=('0b2f0bb23b7832138b7d841437b9e182' '4a85997d88dffa27ac469c6429752cb2') +md5sums=('0b2f0bb23b7832138b7d841437b9e182' 'c6f0102c66868a65d93f210c524e7ff9') build() { cd $srcdir/$pkgname-$pkgver patch -p1 -i ../trafshow.patch || return 1 +autoconf -f -Wnone || autoheader -f -Wnone # this ignores tons of warnings +#autoconf -f || autoheader -f # consider using this to get the tons of warnings ./configure --prefix=/usr make || return 1 } diff --git a/trafshow.patch b/trafshow.patch index 32b96666cd28..4924accae98b 100644 --- a/trafshow.patch +++ b/trafshow.patch @@ -1,4 +1,4 @@ -diff -aur trafshow-5.2.3/Makefile.in trafshow-5.2.3.patched/Makefile.in +unchanged: --- trafshow-5.2.3/Makefile.in 2004-06-15 08:29:14.000000000 +0000 +++ trafshow-5.2.3.patched/Makefile.in 2009-11-05 12:46:47.274533717 +0000 @@ -73,9 +73,9 @@ @@ -14,7 +14,7 @@ diff -aur trafshow-5.2.3/Makefile.in trafshow-5.2.3.patched/Makefile.in clean: rm -f $(CLEANFILES) -diff -aur trafshow-5.2.3/config.sub trafshow-5.2.3.patched/config.sub +unchanged: --- trafshow-5.2.3/config.sub 2004-01-28 08:00:38.000000000 +0000 +++ trafshow-5.2.3.patched/config.sub 2009-11-05 12:34:51.358774674 +0000 @@ -164,6 +164,9 @@ @@ -27,7 +27,7 @@ diff -aur trafshow-5.2.3/config.sub trafshow-5.2.3.patched/config.sub # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 -diff -aur trafshow-5.2.3/session.c trafshow-5.2.3.patched/session.c +unchanged: --- trafshow-5.2.3/session.c 2006-01-08 05:58:08.000000000 +0000 +++ trafshow-5.2.3.patched/session.c 2009-11-05 12:34:51.361276949 +0000 @@ -40,7 +40,7 @@ @@ -39,3 +39,91 @@ diff -aur trafshow-5.2.3/session.c trafshow-5.2.3.patched/session.c #error the fcntl argument to turn ON/OFF non-blocking I/O is unknown #endif +unchanged: +--- trafshow-5.2.3/trafshow.c 2006-03-14 04:58:07.000000000 -0300 ++++ trafshow-5.2.3.patched/trafshow.c 2021-02-25 19:50:26.045330218 -0300 +@@ -58,7 +58,7 @@ + static void vers(); + static void usage(); + static pcap_if_t *pcap_matchdev(pcap_if_t *dp, const char *name); +-static int pcap_init(PCAP_HANDLER **ph_list, pcap_if_t *dp); ++static int pcap_initialize(PCAP_HANDLER **ph_list, pcap_if_t *dp); + static void *pcap_feed(void *arg); /* PCAP_HANDLER *ph */ + #ifdef HAVE_PCAP_GET_SELECTABLE_FD + static void *pcap_feed2(void *arg); /* PCAP_HANDLER *ph */ +@@ -172,7 +172,7 @@ + } + + /* initialize list of pcap handlers */ +- if ((op = pcap_init(&ph_list, dev_list)) < 1) { ++ if ((op = pcap_initialize(&ph_list, dev_list)) < 1) { + fprintf(stderr, "No packet capture device available (no permission?)\n"); + exit(1); + } +@@ -298,7 +298,7 @@ + } + + static int +-pcap_init(ph_list, dp) ++pcap_initialize(ph_list, dp) + PCAP_HANDLER **ph_list; + pcap_if_t *dp; + { +unchanged: +--- trafshow-5.2.3/domain_resolver.c 2006-01-08 02:59:23.000000000 -0300 ++++ trafshow-5.2.3.patched/domain_resolver.c 2021-02-25 20:06:44.286697300 -0300 +@@ -380,7 +380,7 @@ + if ((curr->name = strdup(name)) == 0) { + int save_errno = errno; + free(curr); +- save_errno = errno; ++ errno = save_errno; + return 0; + } + /* make all lowercase */ +unchanged: +--- trafshow-5.2.3/show_dump.c 2006-03-14 05:58:30.000000000 -0300 ++++ trafshow-5.2.3.patched/show_dump.c 2021-02-25 20:16:09.733634011 -0300 +@@ -333,7 +333,7 @@ + clearerr(file_netflow); /* tail file */ + while (fgets(buf, sizeof(buf), file_netflow) != 0) { + buf[sizeof(buf)-1] = '\0'; +- if ((cp = strpbrk(buf, "\r\n")) != '\0') ++ if ((cp = strpbrk(buf, "\r\n")) != NULL) + *cp = '\0'; + printw("%s\n", buf); + redraw_lines++; +only in patch2: +unchanged: +--- trafshow-5.2.3/configure.in 2006-03-14 01:58:36.000000000 -0300 ++++ trafshow-5.2.3.patch/configure.in 2021-02-26 20:31:54.772907536 -0300 +@@ -120,18 +120,18 @@ + AC_CACHE_VAL(ac_cv_have_curses, + ac_cv_save_CFLAGS="$CFLAGS" + ac_cv_save_LIBS="$LIBS" +- LIBS="-lslang $ac_cv_save_LIBS" +- AC_TRY_LINK([#include <slcurses.h>],[initscr();], +- ac_cv_have_curses="slang", +- LIBS="-lncurses $ac_cv_save_LIBS" ++ LIBS="-lncurses $ac_cv_save_LIBS" ++ AC_TRY_LINK([#include <ncurses.h>], [initscr();], ++ ac_cv_have_curses="ncurses", ++ CFLAGS="-I/usr/include/ncurses $ac_cv_save_CFLAGS" + AC_TRY_LINK([#include <ncurses.h>], [initscr();], +- ac_cv_have_curses="ncurses", +- CFLAGS="-I/usr/include/ncurses $ac_cv_save_CFLAGS" +- AC_TRY_LINK([#include <ncurses.h>], [initscr();], +- ac_cv_have_curses="n_curses", +- LIBS="-lcurses $ac_cv_save_LIBS" +- AC_TRY_LINK([#include <curses.h>], [initscr();], +- ac_cv_have_curses="curses", ++ ac_cv_have_curses="n_curses", ++ LIBS="-lcurses $ac_cv_save_LIBS" ++ AC_TRY_LINK([#include <curses.h>], [initscr();], ++ ac_cv_have_curses="curses", ++ LIBS="-lslang $ac_cv_save_LIBS" ++ AC_TRY_LINK([#include <slcurses.h>],[initscr();], ++ ac_cv_have_curses="slang", + ac_cv_have_curses="none" + ) + ) |