1 |
commit: 539ff83c65a3fe116f0ef306ef1970b4662f578d |
2 |
Author: Justin Lecher <jlec <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 24 10:23:36 2014 +0000 |
4 |
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 24 10:23:36 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/betagarden.git;a=commit;h=539ff83c |
7 |
|
8 |
net-analyzer/nethogs: Backport patch for ncurses[tinfo] |
9 |
|
10 |
Package-Manager: portage-2.2.10 |
11 |
|
12 |
--- |
13 |
net-analyzer/nethogs/ChangeLog | 4 ++ |
14 |
.../nethogs/files/nethogs-9999-tinfo.patch | 46 ++++++++++++++++++++++ |
15 |
net-analyzer/nethogs/nethogs-9999.ebuild | 7 ++++ |
16 |
3 files changed, 57 insertions(+) |
17 |
|
18 |
diff --git a/net-analyzer/nethogs/ChangeLog b/net-analyzer/nethogs/ChangeLog |
19 |
index d69ab41..46c2ce4 100644 |
20 |
--- a/net-analyzer/nethogs/ChangeLog |
21 |
+++ b/net-analyzer/nethogs/ChangeLog |
22 |
@@ -2,6 +2,10 @@ |
23 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
24 |
# $Header: $ |
25 |
|
26 |
+ 24 Jul 2014; Justin Lecher <jlec@g.o> nethogs-9999.ebuild, |
27 |
+ +files/nethogs-9999-tinfo.patch: |
28 |
+ Backport patch for ncurses[tinfo] |
29 |
+ |
30 |
*nethogs-9999 (21 Jul 2014) |
31 |
|
32 |
21 Jul 2014; Justin Lecher <jlec@g.o> +nethogs-9999.ebuild, |
33 |
|
34 |
diff --git a/net-analyzer/nethogs/files/nethogs-9999-tinfo.patch b/net-analyzer/nethogs/files/nethogs-9999-tinfo.patch |
35 |
new file mode 100644 |
36 |
index 0000000..4a80e2a |
37 |
--- /dev/null |
38 |
+++ b/net-analyzer/nethogs/files/nethogs-9999-tinfo.patch |
39 |
@@ -0,0 +1,46 @@ |
40 |
+From 01c61290a30ae40a358ed803190c21d0dd42dc3a Mon Sep 17 00:00:00 2001 |
41 |
+From: Justin Lecher <jlec@g.o> |
42 |
+Date: Thu, 24 Jul 2014 12:13:06 +0200 |
43 |
+Subject: [PATCH] Allow to specify ncurses libs at buildtime |
44 |
+ |
45 |
+If the system is using libtinfo then you need ot link against libncurses and libtinfo. |
46 |
+With this patch it is possible to specify this at buildtime. |
47 |
+ |
48 |
+Signed-off-by: Justin Lecher <jlec@g.o> |
49 |
+--- |
50 |
+ Makefile | 9 ++++++--- |
51 |
+ 1 file changed, 6 insertions(+), 3 deletions(-) |
52 |
+ |
53 |
+diff --git a/Makefile b/Makefile |
54 |
+index 83b1c3e..3c0e7c7 100644 |
55 |
+--- a/Makefile |
56 |
++++ b/Makefile |
57 |
+@@ -20,6 +20,9 @@ CFLAGS?=-Wall -Wextra |
58 |
+ CXXFLAGS?=-Wall -Wextra |
59 |
+ |
60 |
+ OBJS=packet.o connection.o process.o refresh.o decpcap.o cui.o inode2prog.o conninode.o devices.o |
61 |
++ |
62 |
++NCURSES_LIBS?=-lncurses |
63 |
++ |
64 |
+ .PHONY: tgz |
65 |
+ |
66 |
+ tgz: clean |
67 |
+@@ -36,12 +39,12 @@ install: nethogs nethogs.8 |
68 |
+ install -m 644 nethogs.8 $(DESTDIR)$(man8) |
69 |
+ |
70 |
+ test: test.cpp |
71 |
+- $(CXX) $(CXXFLAGS) $(LDFLAGS) test.cpp -o test -lpcap -lm -lncurses -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" |
72 |
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) test.cpp -o test -lpcap -lm ${NCURSES_LIBS} -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" |
73 |
+ |
74 |
+ nethogs: main.cpp nethogs.cpp $(OBJS) |
75 |
+- $(CXX) $(CXXFLAGS) $(LDFLAGS) main.cpp $(OBJS) -o nethogs -lpcap -lm -lncurses -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" |
76 |
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) main.cpp $(OBJS) -o nethogs -lpcap -lm ${NCURSES_LIBS} -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" |
77 |
+ nethogs_testsum: nethogs_testsum.cpp $(OBJS) |
78 |
+- $(CXX) $(CXXFLAGS) $(LDFLAGS) nethogs_testsum.cpp $(OBJS) -o nethogs_testsum -lpcap -lm -lncurses -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" |
79 |
++ $(CXX) $(CXXFLAGS) $(LDFLAGS) nethogs_testsum.cpp $(OBJS) -o nethogs_testsum -lpcap -lm ${NCURSES_LIBS} -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" |
80 |
+ |
81 |
+ decpcap_test: decpcap_test.cpp decpcap.o |
82 |
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) decpcap_test.cpp decpcap.o -o decpcap_test -lpcap -lm |
83 |
+-- |
84 |
+2.0.2 |
85 |
+ |
86 |
|
87 |
diff --git a/net-analyzer/nethogs/nethogs-9999.ebuild b/net-analyzer/nethogs/nethogs-9999.ebuild |
88 |
index ead5955..6175ec3 100644 |
89 |
--- a/net-analyzer/nethogs/nethogs-9999.ebuild |
90 |
+++ b/net-analyzer/nethogs/nethogs-9999.ebuild |
91 |
@@ -26,10 +26,17 @@ DEPEND=" |
92 |
|
93 |
DOCS=( Changelog DESIGN README ) |
94 |
|
95 |
+PATCHES=( "${FILESDIR}"/${P}-tinfo.patch ) |
96 |
+ |
97 |
src_prepare() { |
98 |
+ epatch "${PATCHES[@]}" |
99 |
tc-export CC CXX PKG_CONFIG |
100 |
} |
101 |
|
102 |
+src_compile() { |
103 |
+ emake NCURSES_LIBS="$($(tc-getPKG_CONFIG) --libs ncurses)" |
104 |
+} |
105 |
+ |
106 |
src_install() { |
107 |
emake DESTDIR="${ED}" prefix=/usr install |
108 |
dodoc ${DOCS[@]} |