diff options
Diffstat (limited to 'sys-process/nmon')
-rw-r--r-- | sys-process/nmon/Manifest | 3 | ||||
-rw-r--r-- | sys-process/nmon/files/nmon-16n-musl.patch | 29 | ||||
-rw-r--r-- | sys-process/nmon/nmon-16n.ebuild | 57 |
3 files changed, 89 insertions, 0 deletions
diff --git a/sys-process/nmon/Manifest b/sys-process/nmon/Manifest index a173bf6e7971..3fcda95a1dd9 100644 --- a/sys-process/nmon/Manifest +++ b/sys-process/nmon/Manifest @@ -1,3 +1,6 @@ +AUX nmon-16n-musl.patch 853 BLAKE2B b6f1dc26a08e74be03659c75186c9785214de662520509dbdc0ce13ecd3c6637ae0863009cedbe5a4ebf8cfbfebcb05ce7c08f605ce624278a8bb18250bfcc02 SHA512 cb45b34d8dcf27e8e160ee0b7632a393ad61b95c24f787671ff72b0f2e7aa00d3783497f426e3e6970cd43f2315af6e735c176141b3dca2e0edfebfa7048f4ab DIST lmon16m.c 268614 BLAKE2B 8705a890cfc5f02079d70ab9de8e1462552342a16e5760964906f21a236bbef037e36c7d0f3af9fea7b4c1e86485620cef27fac16af33faa32d5e88afdde3358 SHA512 391d4703f5d052fd44a3c623155028e28649ea41a88c0fe8df81c7a7dc1f845e044f25e63352c1a7ea607c76c9afb0f82ff2841c8e789d88a9f1cf3c9e035f2e +DIST lmon16n.c 268772 BLAKE2B a85aa30029cff39859058689f013801d864a9ecc0f1115d59aac4b86284108b43c1f4230fdc617c1b7718ed503634ba14dfca2f9a6fb4cb8592e9f6bc327739f SHA512 7b801e3d8a1d60794993af6572b8db04aa0bc707cebd16404c6ad9056f4c37216d57e894241540405192bf76a7e0a49f2e31b55b1721c7eb9da437808ff5abda EBUILD nmon-16m.ebuild 980 BLAKE2B e2a51e7403989395a433cd85b13c388e49526a4e5fc2dc491ee1cd88f7166f0b25975dc62de242e5fe5759c2cda21591f7520a7eeabb17891363bfe0d33686c2 SHA512 07adf3f3c84473f5f45334d38818ac90ce8076a6d1eb9e93c46f29f13de2ff8b00a2930c1570e694e501d62e02a8fdab6c61ede8d4dc291601c5df891deebf28 +EBUILD nmon-16n.ebuild 1040 BLAKE2B 5871e33bc5e7edc96b7550b8e4e98f3a812d75d8811ce75c7849279ba3a762ddbbbc5926d636f38f9f0b6f769a4dce5a5e3713f81a19ceb498b625354d79df0e SHA512 3d8423292b9285e4e3c0cf4bd6832d2ca9f08361d1cf0701adf4d924130aba2a6247264c86477dada74aa6773fad20f61fd81c1c068fbfeb5b31a558c113b08f MISC metadata.xml 242 BLAKE2B 1dd26f07fdb13f53ab2af6aaff6c6f4ad675e9424088170eecaaceefd70d5f8e52b5849b97cb705c79cdeab723675bdc2a612b12ac5b1cec450dca47d170f344 SHA512 f910e0e91bee857d0b614384727e19b98e5743b1c55ae7fcd404a261670572429ee632dd91eb8156b656596f2d2b98f3a6fcf3f30c3db5666c8b14d36198b65c 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 new file mode 100644 index 000000000000..1aee09867d35 --- /dev/null +++ b/sys-process/nmon/nmon-16n.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +MY_P="lmon${PV}" +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" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" + +RDEPEND="sys-libs/ncurses:=" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-16n-musl.patch +) + +src_unpack() { + cp "${DISTDIR}"/${MY_P}.c "${S}"/${PN}.c || die +} + +src_configure() { + local cflags=( + # Recommended by upstream to be always on + -DGETUSER + -DJFS + -DLARGEMEM + -DKERNEL_2_6_18 + + # Arches + $(usex amd64 -DX86 '') + $(usex x86 -DX86 '') + $(usex arm -DARM '') + $(usex ppc64 -DPOWER '') + ) + + append-cflags "${cflags[@]}" + append-libs "$($(tc-getPKG_CONFIG) --libs ncurses) -lm" +} + +src_compile() { + tc-export CC + + emake ${PN} LDLIBS="${LIBS}" +} + +src_install() { + dobin ${PN} +} |