summaryrefslogtreecommitdiff
path: root/sys-process/nmon/nmon-16n.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /sys-process/nmon/nmon-16n.ebuild
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'sys-process/nmon/nmon-16n.ebuild')
-rw-r--r--sys-process/nmon/nmon-16n.ebuild57
1 files changed, 57 insertions, 0 deletions
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}
+}