From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/nethogs/, net-analyzer/nethogs/files/
Date: Sat, 25 Jan 2025 16:10:06 +0000 (UTC) [thread overview]
Message-ID: <1737821381.769c936892ecbe54b0a2a36179335a9e13c0dfaf.sam@gentoo> (raw)
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
+}
next reply other threads:[~2025-01-25 16:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-25 16:10 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-12-24 12:06 [gentoo-commits] repo/gentoo:master commit in: net-analyzer/nethogs/, net-analyzer/nethogs/files/ Jeroen Roovers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1737821381.769c936892ecbe54b0a2a36179335a9e13c0dfaf.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox