Commit 6fc956c2 authored by Mike Crute's avatar Mike Crute Committed by Leo
Browse files

testing/nmon: new aport

parent 6e94e628
# Contributor: Mike Crute <mike@crute.us>
# Maintainer: Mike Crute <mike@crute.us>
pkgname=nmon
pkgver=16m
pkgrel=0
pkgdesc="Nigel's performance Monitor for Linux"
url="http://nmon.sourceforge.net/"
arch="all"
license="BSD-3-Clause"
options="!check" # no upstream tests
makedepends="ncurses-dev"
source="
glibc.patch
http://sourceforge.net/projects/nmon/files/lmon$pkgver.c
"
prepare() {
mkdir "$builddir"
cp lmon$pkgver.c "$builddir"/lmon.c
default_prepare
}
build() {
case "$CARCH" in
ppc64le) _BUILD_ARCH="POWER" ;;
s390x) _BUILD_ARCH="MAINFRAME" ;;
arm*|aarch64) _BUILD_ARCH="ARM" ;;
*) _BUILD_ARCH="X86" ;;
esac
echo "Building for $_BUILD_ARCH"
cc -o nmon lmon.c -g -O3 -Wall -lncurses -lm \
-D $_BUILD_ARCH -D JFS -D GETUSER -D LARGEMEM
}
package() {
install -Dm0755 nmon "$pkgdir"/usr/bin/nmon
}
sha512sums="c6749baeeefbb5fa781badcf0a3b1a77792498663155b70f00ae8da751eb72ac38f1f734fd9e2eb32cb364938e366453f50e29928f247b945b684021fbde9af5 glibc.patch
391d4703f5d052fd44a3c623155028e28649ea41a88c0fe8df81c7a7dc1f845e044f25e63352c1a7ea607c76c9afb0f82ff2841c8e789d88a9f1cf3c9e035f2e lmon16m.c"
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/lmon.c
+++ b/lmon.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>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment