summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/nethogs/files/nethogs-0.8.0-gentoo.patch')
-rw-r--r--net-analyzer/nethogs/files/nethogs-0.8.0-gentoo.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/net-analyzer/nethogs/files/nethogs-0.8.0-gentoo.patch b/net-analyzer/nethogs/files/nethogs-0.8.0-gentoo.patch
new file mode 100644
index 000000000000..292af8e4175b
--- /dev/null
+++ b/net-analyzer/nethogs/files/nethogs-0.8.0-gentoo.patch
@@ -0,0 +1,70 @@
+--- a/Makefile
++++ b/Makefile
+@@ -5,15 +5,17 @@
+ #DESTDIR := /usr
+ DESTDIR := /usr/local
+
+-sbin := $(DESTDIR)/sbin
+-man8 := $(DESTDIR)/share/man/man8/
++sbin := $(DESTDIR)/usr/sbin
++man8 := $(DESTDIR)/usr/share/man/man8/
+
+ all: nethogs decpcap_test
+ # nethogs_testsum
+
+-CFLAGS=-g -Wall -Wextra
+-#CFLAGS=-O2
++CXXFLAGS+= -Wall -Wextra
+ OBJS=packet.o connection.o process.o refresh.o decpcap.o cui.o inode2prog.o conninode.o devices.o
++
++LIBS = $(shell $(PKG_CONFIG) --libs ncurses)
++
+ .PHONY: tgz
+
+ tgz: clean
+@@ -30,33 +32,33 @@
+ install -m 644 nethogs.8 $(man8)
+
+ nethogs: nethogs.cpp $(OBJS)
+- $(CXX) $(CFLAGS) nethogs.cpp $(OBJS) -o nethogs -lpcap -lm -lncurses -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) nethogs.cpp $(OBJS) -o nethogs -lpcap -lm $(LIBS) -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
+ nethogs_testsum: nethogs_testsum.cpp $(OBJS)
+- $(CXX) $(CFLAGS) -g nethogs_testsum.cpp $(OBJS) -o nethogs_testsum -lpcap -lm -lncurses -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) -g nethogs_testsum.cpp $(OBJS) -o nethogs_testsum -lpcap -lm $(LIBS) -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
+
+ decpcap_test: decpcap_test.cpp decpcap.o
+- $(CXX) $(CFLAGS) decpcap_test.cpp decpcap.o -o decpcap_test -lpcap -lm
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) decpcap_test.cpp decpcap.o -o decpcap_test -lpcap -lm
+
+ #-lefence
+
+ refresh.o: refresh.cpp refresh.h nethogs.h
+- $(CXX) $(CFLAGS) -c refresh.cpp
++ $(CXX) $(CXXFLAGS) -c refresh.cpp
+ process.o: process.cpp process.h nethogs.h
+- $(CXX) $(CFLAGS) -c process.cpp
++ $(CXX) $(CXXFLAGS) -c process.cpp
+ packet.o: packet.cpp packet.h nethogs.h
+- $(CXX) $(CFLAGS) -c packet.cpp
++ $(CXX) $(CXXFLAGS) -c packet.cpp
+ connection.o: connection.cpp connection.h nethogs.h
+- $(CXX) $(CFLAGS) -c connection.cpp
++ $(CXX) $(CXXFLAGS) -c connection.cpp
+ decpcap.o: decpcap.c decpcap.h
+- $(CC) $(CFLAGS) -c decpcap.c
++ $(CC) $(CXXFLAGS) -c decpcap.c
+ inode2prog.o: inode2prog.cpp inode2prog.h nethogs.h
+- $(CXX) $(CFLAGS) -c inode2prog.cpp
++ $(CXX) $(CXXFLAGS) -c inode2prog.cpp
+ conninode.o: conninode.cpp nethogs.h conninode.h
+- $(CXX) $(CFLAGS) -c conninode.cpp
++ $(CXX) $(CXXFLAGS) -c conninode.cpp
+ #devices.o: devices.cpp devices.h
+-# $(CXX) $(CFLAGS) -c devices.cpp
++# $(CXX) $(CXXFLAGS) -c devices.cpp
+ cui.o: cui.cpp cui.h nethogs.h
+- $(CXX) $(CFLAGS) -c cui.cpp -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
++ $(CXX) $(CXXFLAGS) -c cui.cpp -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\"
+
+ .PHONY: clean
+ clean: