From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/nmon/, sys-process/nmon/files/
Date: Thu, 23 Jun 2022 04:47:27 +0000 (UTC) [thread overview]
Message-ID: <1655959433.a4a19cca5de67ffb9d50c61f3fe1273dd6aa348e.sam@gentoo> (raw)
commit: a4a19cca5de67ffb9d50c61f3fe1273dd6aa348e
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 23 04:43:49 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 23 04:43:53 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4a19cca
sys-process/nmon: fix musl build
Closes: https://bugs.gentoo.org/712472
Thanks-to: Jory A. Pratt <anarchy <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-process/nmon/files/nmon-16n-musl.patch | 29 +++++++++++++++++++++++++++++
sys-process/nmon/nmon-16n.ebuild | 12 +++++++-----
2 files changed, 36 insertions(+), 5 deletions(-)
diff --git a/sys-process/nmon/files/nmon-16n-musl.patch b/sys-process/nmon/files/nmon-16n-musl.patch
new file mode 100644
index 000000000000..a26008cc3bf4
--- /dev/null
+++ b/sys-process/nmon/files/nmon-16n-musl.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/712472
+
+From: Mike Crute <mike@crute.us>
+Date: Sun, 31 May 2020 19:26:32 +0000
+Subject: [PATCH] Add glibc compatibility to nmon
+
+musl is missing some compatibility with glibc which this patch adds to the nmon
+source. The fstab.h header was not used and fails to build if it's included.
+
+--- a/nmon.c
++++ b/nmon.c
+@@ -42,6 +42,9 @@
+ pi_delayacct_blkio_ticks
+ */
+
++/* Fix compatibility for glibc */
++#define __STRING(x) #x
++
+ /* note: RAW assumes you are using the index "i" to select the CPU */
+ #define RAW(member) (long)((long)(p->cpuN[i].member) - (long)(q->cpuN[i].member))
+ #define RAWTOTAL(member) (long)((long)(p->cpu_total.member) - (long)(q->cpu_total.member))
+@@ -583,7 +586,6 @@
+ int isroot = 0;
+
+ #include <mntent.h>
+-#include <fstab.h>
+ #include <sys/stat.h>
+ #include <sys/statfs.h>
+ #include <net/if.h>
diff --git a/sys-process/nmon/nmon-16n.ebuild b/sys-process/nmon/nmon-16n.ebuild
index f4d4553ac6e5..1aee09867d35 100644
--- a/sys-process/nmon/nmon-16n.ebuild
+++ b/sys-process/nmon/nmon-16n.ebuild
@@ -6,10 +6,10 @@ EAPI=8
inherit flag-o-matic toolchain-funcs
MY_P="lmon${PV}"
-
-DESCRIPTION="Nigel's performance MONitor for CPU, memory, network, disks, etc..."
+DESCRIPTION="Nigel's performance MONitor for CPU, memory, network, disks, etc"
HOMEPAGE="http://nmon.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.c"
+S="${WORKDIR}"
LICENSE="GPL-3"
SLOT="0"
@@ -19,7 +19,9 @@ RDEPEND="sys-libs/ncurses:="
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
-S="${WORKDIR}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-16n-musl.patch
+)
src_unpack() {
cp "${DISTDIR}"/${MY_P}.c "${S}"/${PN}.c || die
@@ -27,13 +29,13 @@ src_unpack() {
src_configure() {
local cflags=(
- ## recommended by upstream to be always on
+ # Recommended by upstream to be always on
-DGETUSER
-DJFS
-DLARGEMEM
-DKERNEL_2_6_18
- ## archs
+ # Arches
$(usex amd64 -DX86 '')
$(usex x86 -DX86 '')
$(usex arm -DARM '')
reply other threads:[~2022-06-23 4:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1655959433.a4a19cca5de67ffb9d50c61f3fe1273dd6aa348e.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