* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/nethogs/, net-analyzer/nethogs/files/
@ 2025-01-25 16:10 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2025-01-25 16:10 UTC (permalink / raw
To: gentoo-commits
commit: 769c936892ecbe54b0a2a36179335a9e13c0dfaf
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 25 16:09:09 2025 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Jan 25 16:09:41 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=769c9368
net-analyzer/nethogs: add 0.8.8
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-analyzer/nethogs/Manifest | 1 +
.../nethogs/files/nethogs-0.8.8-meson.patch | 85 ++++++++++++++++++++++
net-analyzer/nethogs/nethogs-0.8.8.ebuild | 40 ++++++++++
3 files changed, 126 insertions(+)
diff --git a/net-analyzer/nethogs/Manifest b/net-analyzer/nethogs/Manifest
index c56737e97dda..3299ce9b8f89 100644
--- a/net-analyzer/nethogs/Manifest
+++ b/net-analyzer/nethogs/Manifest
@@ -1 +1,2 @@
DIST nethogs-0.8.7.tar.gz 270631 BLAKE2B 179227d4b1fde5328e4885ce72bb28ac20482fa161afee7562546af5b403be1e851533e3861dfa2f514968aebe91a822e6b792520407853dfb1055c6d29ad121 SHA512 d965f3fa439ea9fbba83578b4272d03f396bf3cff9ae73a94936d47a3422d066d885c7f6f2a47fbe2f445a017bffa3fb3a1215976522ef0ad120fae3b95b31a2
+DIST nethogs-0.8.8.tar.gz 272792 BLAKE2B ec18cd291768c1baf22ab71b4219ab050c8f919419510234e71ec3d618fb0ff72cac4ccf04a4b1b063f71cf308f2ce2db09c595e4845372e4e6c61bf074e3ef3 SHA512 df076204c329f48161b01b51f89a6e7946b83ef330349e0df39e0358b9d3d973be9cdb64eb86ab9a83fb4f9389865a7859739de6a896374952ec2a08b2084b0d
diff --git a/net-analyzer/nethogs/files/nethogs-0.8.8-meson.patch b/net-analyzer/nethogs/files/nethogs-0.8.8-meson.patch
new file mode 100644
index 000000000000..2c87197b9933
--- /dev/null
+++ b/net-analyzer/nethogs/files/nethogs-0.8.8-meson.patch
@@ -0,0 +1,85 @@
+https://github.com/raboof/nethogs/pull/285
+
+[Formatting patch 3/3 dropped.]
+
+From 049fff5623720fcd0b4fdc92501b586addbb6b48 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 25 Jan 2025 16:03:12 +0000
+Subject: [PATCH 1/3] meson: cleanup version detection
+
+Tell Meson what version the project is, so that we set the right versioning
+on libnethogs.
+---
+ meson.build | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 81d7b59..16e61b4 100644
+--- a/meson.build
++++ b/meson.build
+@@ -5,11 +5,11 @@
+ project('nethogs',
+ ['c', 'cpp'],
+ default_options : ['warning_level=3',
+- 'cpp_std=c++14']
++ 'cpp_std=c++14'],
++ version : run_command('./determineVersion.sh').stdout().strip(),
+ )
+
+ cc = meson.get_compiler('cpp')
+-version = run_command('./determineVersion.sh', check: true).stdout().strip()
+
+ #######################################
+ ## Dependencies and flags definition ##
+@@ -19,7 +19,7 @@ projectinc = [include_directories('.', 'src')]
+
+ # flags
+ c_args = [
+- '-DVERSION="' + version + '"'
++ '-DVERSION="' + meson.project_version() + '"'
+ ]
+
+ # dependencies
+@@ -42,5 +42,5 @@ pkgconfig = import('pkgconfig')
+ pkgconfig_install_dir = join_paths(get_option('libdir'), 'pkgconfig')
+ pkgconfig.generate(libnethogs,
+ requires: ['libpcap'],
+- version: version
++ version: meson.project_version()
+ )
+
+From 5afce747f142f6df6a264ab368c99f47050d9984 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 25 Jan 2025 16:05:20 +0000
+Subject: [PATCH 2/3] meson: fix build with libnethogs disabled
+
+Fix `meson.build:43:19: ERROR: Unknown variable "libnethogs".`.
+
+While src/ has this correct, the top-level meson.build wasn't right.
+---
+ meson.build | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 16e61b4..8537718 100644
+--- a/meson.build
++++ b/meson.build
+@@ -38,9 +38,11 @@ subdir('src')
+ #############################
+ ## Pkgconfig definition ##
+ #############################
+-pkgconfig = import('pkgconfig')
+-pkgconfig_install_dir = join_paths(get_option('libdir'), 'pkgconfig')
+-pkgconfig.generate(libnethogs,
+- requires: ['libpcap'],
+- version: meson.project_version()
+- )
++if get_option('enable-libnethogs').enabled()
++ pkgconfig = import('pkgconfig')
++ pkgconfig_install_dir = join_paths(get_option('libdir'), 'pkgconfig')
++ pkgconfig.generate(libnethogs,
++ requires: ['libpcap'],
++ version: meson.project_version()
++ )
++endif
+
diff --git a/net-analyzer/nethogs/nethogs-0.8.8.ebuild b/net-analyzer/nethogs/nethogs-0.8.8.ebuild
new file mode 100644
index 000000000000..9b5e7a08fb1b
--- /dev/null
+++ b/net-analyzer/nethogs/nethogs-0.8.8.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit fcaps meson
+
+DESCRIPTION="Small 'net top' tool, grouping bandwidth by process"
+HOMEPAGE="https://github.com/raboof/nethogs"
+SRC_URI="https://github.com/raboof/nethogs/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+
+RDEPEND="
+ net-libs/libpcap
+ sys-libs/ncurses:=[cxx]
+"
+DEPEND="${RDEPEND}"
+
+DOCS=( DESIGN README.decpcap.txt README.md )
+
+FILECAPS=(
+ cap_net_admin,cap_net_raw usr/sbin/nethogs
+)
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.8.8-meson.patch
+)
+
+src_prepare() {
+ default
+
+ cat <<-EOF > determineVersion.sh || die
+ #!/bin/sh
+ printf "${PV}"
+ EOF
+ chmod +x determineVersion.sh || die
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-analyzer/nethogs/, net-analyzer/nethogs/files/
@ 2016-12-24 12:06 Jeroen Roovers
0 siblings, 0 replies; 2+ messages in thread
From: Jeroen Roovers @ 2016-12-24 12:06 UTC (permalink / raw
To: gentoo-commits
commit: 992371804021fdebbae0c004eae1346b1179c62a
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 24 12:05:30 2016 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Dec 24 12:06:11 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99237180
net-analyzer/nethogs: Old.
Package-Manager: Portage-2.3.3, Repoman-2.3.1
net-analyzer/nethogs/Manifest | 1 -
.../nethogs/files/nethogs-0.8.0-gentoo.patch | 70 ----------------------
net-analyzer/nethogs/nethogs-0.8.0-r4.ebuild | 33 ----------
3 files changed, 104 deletions(-)
diff --git a/net-analyzer/nethogs/Manifest b/net-analyzer/nethogs/Manifest
index 974556c..a694127 100644
--- a/net-analyzer/nethogs/Manifest
+++ b/net-analyzer/nethogs/Manifest
@@ -1,2 +1 @@
-DIST nethogs-0.8.0.tar.gz 38036 SHA256 b09cb3c2690a522f8b1314221095d5abb1958d50b56de6d36b11a8e6f28961d0 SHA512 6530c1bdbdf1ace7368941e8e0e53a83ac808bbea7a952936fa570ad2d49e8b4cef6a37d433f1873655edfd63cce556146a48ff81665905827237edf50419446 WHIRLPOOL 1b7c7456e2c55df0be188a0858ee039f7fde52ae58554ca16f7b92f732735ad4e225341526f6c4d36051898160cb063dac6fc4479ff1e3decabc9d62346dd3d5
DIST nethogs-0.8.1.tar.gz 35986 SHA256 4c30ef43814549974a5b01fb1a94eb72ff08628c5a421085b1ce3bfe0524df42 SHA512 f1af7bb7208d08fc3a51bb38ee475da5a7b8f8814e2a7a653057d0c5d6b4e73be7742ffef5569525822160971f81dd22212d6854483928e621cfddce8d98409f WHIRLPOOL 4595abdb530329f41dc4d3c4e6ab8cf87a8589d9cd6f8f217644f435449c86747c66ed9884a2afcc858b7eaa9d216ef8d686bc7c5eff84bbec98151bea9ab6c3
diff --git a/net-analyzer/nethogs/files/nethogs-0.8.0-gentoo.patch b/net-analyzer/nethogs/files/nethogs-0.8.0-gentoo.patch
deleted file mode 100644
index 292af8e..00000000
--- a/net-analyzer/nethogs/files/nethogs-0.8.0-gentoo.patch
+++ /dev/null
@@ -1,70 +0,0 @@
---- 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:
diff --git a/net-analyzer/nethogs/nethogs-0.8.0-r4.ebuild b/net-analyzer/nethogs/nethogs-0.8.0-r4.ebuild
deleted file mode 100644
index 3f0bc40..00000000
--- a/net-analyzer/nethogs/nethogs-0.8.0-r4.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit eutils toolchain-funcs
-
-DESCRIPTION="A small 'net top' tool, grouping bandwidth by process"
-HOMEPAGE="http://nethogs.sf.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-1"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~ia64 x86"
-
-RDEPEND="
- net-libs/libpcap
- sys-libs/ncurses:0=
-"
-DEPEND="
- ${RDEPEND}
- virtual/pkgconfig
-"
-
-DOCS=( Changelog DESIGN README )
-
-S=${WORKDIR}/${PN}
-
-src_prepare() {
- epatch "${FILESDIR}"/${P}-gentoo.patch
- tc-export CC CXX PKG_CONFIG
-}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-25 16:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-25 16:10 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/nethogs/, net-analyzer/nethogs/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2016-12-24 12:06 Jeroen Roovers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox