From 86972e9f1301faa9c80921ea92730129b3c82b8a Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Thu, 1 Feb 2018 14:11:22 +0100 Subject: [PATCH] Update nethogs to 0.8.5 --- root-packages/nethogs/Makefile.patch | 69 ++++------------------ root-packages/nethogs/build.sh | 3 +- root-packages/nethogs/inode2prog.cpp.patch | 12 ---- 3 files changed, 12 insertions(+), 72 deletions(-) delete mode 100644 root-packages/nethogs/inode2prog.cpp.patch diff --git a/root-packages/nethogs/Makefile.patch b/root-packages/nethogs/Makefile.patch index 29f6b371d..7670c102e 100644 --- a/root-packages/nethogs/Makefile.patch +++ b/root-packages/nethogs/Makefile.patch @@ -1,62 +1,13 @@ diff --git a/Makefile b/Makefile -index 11c43f8..46b9589 100644 +index fd413a0..88e2617 100644 --- a/Makefile +++ b/Makefile -@@ -3,7 +3,7 @@ SUBVERSION := 8 - MINORVERSION := 1 - - #prefix := /usr --prefix := /usr/local -+prefix ?= /usr/local - - sbin := $(prefix)/sbin - man8 := $(prefix)/share/man/man8/ -@@ -39,36 +39,36 @@ install: nethogs nethogs.8 - install -m 644 nethogs.8 $(DESTDIR)$(man8) - - test: test.cpp -- $(CXX) $(CXXFLAGS) $(LDFLAGS) test.cpp -o test -lpcap -lm ${NCURSES_LIBS} -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" -+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) test.cpp -o test -lpcap -lm ${NCURSES_LIBS} -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" - - nethogs: main.cpp nethogs.cpp $(OBJS) -- $(CXX) $(CXXFLAGS) $(LDFLAGS) main.cpp $(OBJS) -o nethogs -lpcap -lm ${NCURSES_LIBS} -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" -+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) main.cpp $(OBJS) -o nethogs -lpcap -lm ${NCURSES_LIBS} -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" - nethogs_testsum: nethogs_testsum.cpp $(OBJS) -- $(CXX) $(CXXFLAGS) $(LDFLAGS) nethogs_testsum.cpp $(OBJS) -o nethogs_testsum -lpcap -lm ${NCURSES_LIBS} -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" -+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) nethogs_testsum.cpp $(OBJS) -o nethogs_testsum -lpcap -lm ${NCURSES_LIBS} -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" - - decpcap_test: decpcap_test.cpp decpcap.o -- $(CXX) $(CXXFLAGS) $(LDFLAGS) decpcap_test.cpp decpcap.o -o decpcap_test -lpcap -lm -+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) decpcap_test.cpp decpcap.o -o decpcap_test -lpcap -lm - - #-lefence - - refresh.o: refresh.cpp refresh.h nethogs.h -- $(CXX) $(CXXFLAGS) -c refresh.cpp -+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c refresh.cpp - process.o: process.cpp process.h nethogs.h -- $(CXX) $(CXXFLAGS) -c process.cpp -+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c process.cpp - packet.o: packet.cpp packet.h nethogs.h -- $(CXX) $(CXXFLAGS) -c packet.cpp -+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c packet.cpp - connection.o: connection.cpp connection.h nethogs.h -- $(CXX) $(CXXFLAGS) -c connection.cpp -+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c connection.cpp - decpcap.o: decpcap.c decpcap.h -- $(CC) $(CFLAGS) -c decpcap.c -+ $(CC) $(CPPFLAGS) $(CFLAGS) -c decpcap.c - inode2prog.o: inode2prog.cpp inode2prog.h nethogs.h -- $(CXX) $(CXXFLAGS) -c inode2prog.cpp -+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c inode2prog.cpp - conninode.o: conninode.cpp nethogs.h conninode.h -- $(CXX) $(CXXFLAGS) -c conninode.cpp -+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c conninode.cpp - #devices.o: devices.cpp devices.h - # $(CXX) $(CXXFLAGS) -c devices.cpp - cui.o: cui.cpp cui.h nethogs.h -- $(CXX) $(CXXFLAGS) -c cui.cpp -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" -+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c cui.cpp -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" - - .PHONY: clean - clean: +@@ -3,7 +3,7 @@ export VERSION := $(shell ./determineVersion.sh) + #export PREFIX := /usr + export PREFIX ?= /usr/local + +-all: decpcap_test test nethogs ++all: decpcap_test nethogs + + .PHONY: tgz release check install install_lib install_dev uninstall uninstall_lib nethogs libnethogs decpcap_test test clean all + tgz: clean diff --git a/root-packages/nethogs/build.sh b/root-packages/nethogs/build.sh index 1c28280d9..cd44d4f88 100644 --- a/root-packages/nethogs/build.sh +++ b/root-packages/nethogs/build.sh @@ -1,9 +1,10 @@ TERMUX_PKG_HOMEPAGE=https://github.com/raboof/nethogs TERMUX_PKG_DESCRIPTION="Net top tool grouping bandwidth per process" -TERMUX_PKG_VERSION=0.8.1 +TERMUX_PKG_VERSION=0.8.5 TERMUX_PKG_SRCURL=https://github.com/raboof/nethogs/archive/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_BUILD_IN_SRC=yes TERMUX_PKG_FOLDERNAME=nethogs-${TERMUX_PKG_VERSION} TERMUX_PKG_DEPENDS="ncurses, libpcap" TERMUX_PKG_MAINTAINER="Pierre Rudloff " +TERMUX_PKG_SHA256=6a9392726feca43228b3f0265379154946ef0544c2ca2cac59ec35a24f469dcc CPPFLAGS+=" -I./" diff --git a/root-packages/nethogs/inode2prog.cpp.patch b/root-packages/nethogs/inode2prog.cpp.patch deleted file mode 100644 index 3666e5abf..000000000 --- a/root-packages/nethogs/inode2prog.cpp.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/inode2prog.cpp b/inode2prog.cpp -index cfac566..4c1c4c5 100644 ---- a/inode2prog.cpp -+++ b/inode2prog.cpp -@@ -117,7 +117,7 @@ std::string getprogname (pid_t pid) { - const int maxfilenamelen = 14 + MAX_PID_LENGTH + 1; - char filename[maxfilenamelen]; - -- std::snprintf(filename, maxfilenamelen, "/proc/%d/cmdline", pid); -+ snprintf(filename, maxfilenamelen, "/proc/%d/cmdline", pid); - return read_file(filename); - }