diff options
author | Justin Lecher <jlec@gentoo.org> | 2014-07-24 12:23:36 +0200 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2014-07-24 12:23:36 +0200 |
commit | 539ff83c65a3fe116f0ef306ef1970b4662f578d (patch) | |
tree | 6a89cf73f546979d42df85e1cbe89355fdebac92 /net-analyzer | |
parent | net-analyzer/nethogs: Add live ebuild (diff) | |
download | betagarden-539ff83c65a3fe116f0ef306ef1970b4662f578d.tar.gz betagarden-539ff83c65a3fe116f0ef306ef1970b4662f578d.tar.bz2 betagarden-539ff83c65a3fe116f0ef306ef1970b4662f578d.zip |
net-analyzer/nethogs: Backport patch for ncurses[tinfo]
Package-Manager: portage-2.2.10
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/nethogs/ChangeLog | 4 | ||||
-rw-r--r-- | net-analyzer/nethogs/files/nethogs-9999-tinfo.patch | 46 | ||||
-rw-r--r-- | net-analyzer/nethogs/nethogs-9999.ebuild | 7 |
3 files changed, 57 insertions, 0 deletions
diff --git a/net-analyzer/nethogs/ChangeLog b/net-analyzer/nethogs/ChangeLog index d69ab41..46c2ce4 100644 --- a/net-analyzer/nethogs/ChangeLog +++ b/net-analyzer/nethogs/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 24 Jul 2014; Justin Lecher <jlec@gentoo.org> nethogs-9999.ebuild, + +files/nethogs-9999-tinfo.patch: + Backport patch for ncurses[tinfo] + *nethogs-9999 (21 Jul 2014) 21 Jul 2014; Justin Lecher <jlec@gentoo.org> +nethogs-9999.ebuild, diff --git a/net-analyzer/nethogs/files/nethogs-9999-tinfo.patch b/net-analyzer/nethogs/files/nethogs-9999-tinfo.patch new file mode 100644 index 0000000..4a80e2a --- /dev/null +++ b/net-analyzer/nethogs/files/nethogs-9999-tinfo.patch @@ -0,0 +1,46 @@ +From 01c61290a30ae40a358ed803190c21d0dd42dc3a Mon Sep 17 00:00:00 2001 +From: Justin Lecher <jlec@gentoo.org> +Date: Thu, 24 Jul 2014 12:13:06 +0200 +Subject: [PATCH] Allow to specify ncurses libs at buildtime + +If the system is using libtinfo then you need ot link against libncurses and libtinfo. +With this patch it is possible to specify this at buildtime. + +Signed-off-by: Justin Lecher <jlec@gentoo.org> +--- + Makefile | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 83b1c3e..3c0e7c7 100644 +--- a/Makefile ++++ b/Makefile +@@ -20,6 +20,9 @@ CFLAGS?=-Wall -Wextra + CXXFLAGS?=-Wall -Wextra + + OBJS=packet.o connection.o process.o refresh.o decpcap.o cui.o inode2prog.o conninode.o devices.o ++ ++NCURSES_LIBS?=-lncurses ++ + .PHONY: tgz + + tgz: clean +@@ -36,12 +39,12 @@ install: nethogs nethogs.8 + install -m 644 nethogs.8 $(DESTDIR)$(man8) + + test: test.cpp +- $(CXX) $(CXXFLAGS) $(LDFLAGS) test.cpp -o test -lpcap -lm -lncurses -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" ++ $(CXX) $(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 -lncurses -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" ++ $(CXX) $(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 -lncurses -DVERSION=\"$(VERSION)\" -DSUBVERSION=\"$(SUBVERSION)\" -DMINORVERSION=\"$(MINORVERSION)\" ++ $(CXX) $(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 +-- +2.0.2 + diff --git a/net-analyzer/nethogs/nethogs-9999.ebuild b/net-analyzer/nethogs/nethogs-9999.ebuild index ead5955..6175ec3 100644 --- a/net-analyzer/nethogs/nethogs-9999.ebuild +++ b/net-analyzer/nethogs/nethogs-9999.ebuild @@ -26,10 +26,17 @@ DEPEND=" DOCS=( Changelog DESIGN README ) +PATCHES=( "${FILESDIR}"/${P}-tinfo.patch ) + src_prepare() { + epatch "${PATCHES[@]}" tc-export CC CXX PKG_CONFIG } +src_compile() { + emake NCURSES_LIBS="$($(tc-getPKG_CONFIG) --libs ncurses)" +} + src_install() { emake DESTDIR="${ED}" prefix=/usr install dodoc ${DOCS[@]} |