aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Crute <mike@crute.us>2020-06-01 16:17:31 +0000
committerMike Crute <mike@crute.us>2020-06-01 18:12:23 +0000
commit70f81c1a261a83281628ff0d1132efbb71150ae2 (patch)
tree1f4d8d65eb4678a1489c3823d666efc766a334cf
parenta0c1b084c3f36a90a6ef89c78eb95aaccee1c31b (diff)
downloadalpine_aports-nmon.tar.bz2
alpine_aports-nmon.tar.xz
alpine_aports-nmon.zip
testing/nmon: new aportnmon
-rw-r--r--testing/nmon/APKBUILD42
-rw-r--r--testing/nmon/glibc.patch29
2 files changed, 71 insertions, 0 deletions
diff --git a/testing/nmon/APKBUILD b/testing/nmon/APKBUILD
new file mode 100644
index 0000000000..b09005c18b
--- /dev/null
+++ b/testing/nmon/APKBUILD
@@ -0,0 +1,42 @@
1# Contributor: Mike Crute <mike@crute.us>
2# Maintainer: Mike Crute <mike@crute.us>
3pkgname=nmon
4pkgver=16m
5pkgrel=0
6pkgdesc="Nigel's performance Monitor for Linux"
7url="http://nmon.sourceforge.net/"
8arch="all"
9license="BSD-3-Clause"
10options="!check" # no upstream tests
11makedepends="ncurses-dev"
12source="
13 glibc.patch
14
15 http://sourceforge.net/projects/nmon/files/lmon$pkgver.c
16 "
17
18prepare() {
19 mkdir "$builddir"
20 cp lmon$pkgver.c "$builddir"/lmon.c
21 default_prepare
22}
23
24build() {
25 case "$CARCH" in
26 ppc64le) _BUILD_ARCH="POWER" ;;
27 s390x) _BUILD_ARCH="MAINFRAME" ;;
28 arm*|aarch64) _BUILD_ARCH="ARM" ;;
29 *) _BUILD_ARCH="X86" ;;
30 esac
31
32 echo "Building for $_BUILD_ARCH"
33 cc -o nmon lmon.c -g -O3 -Wall -lncurses -lm \
34 -D $_BUILD_ARCH -D JFS -D GETUSER -D LARGEMEM
35}
36
37package() {
38 install -Dm0755 nmon "$pkgdir"/usr/bin/nmon
39}
40
41sha512sums="c6749baeeefbb5fa781badcf0a3b1a77792498663155b70f00ae8da751eb72ac38f1f734fd9e2eb32cb364938e366453f50e29928f247b945b684021fbde9af5 glibc.patch
42391d4703f5d052fd44a3c623155028e28649ea41a88c0fe8df81c7a7dc1f845e044f25e63352c1a7ea607c76c9afb0f82ff2841c8e789d88a9f1cf3c9e035f2e lmon16m.c"
diff --git a/testing/nmon/glibc.patch b/testing/nmon/glibc.patch
new file mode 100644
index 0000000000..9418f2d421
--- /dev/null
+++ b/testing/nmon/glibc.patch
@@ -0,0 +1,29 @@
1From: Mike Crute <mike@crute.us>
2Date: Sun, 31 May 2020 19:26:32 +0000
3Subject: [PATCH] Add glibc compatibility to nmon
4
5musl is missing some compatibility with glibc which this patch adds to the nmon
6source. The fstab.h header was not used and fails to build if it's included.
7
8---
9
10--- a/lmon.c
11+++ b/lmon.c
12@@ -42,6 +42,9 @@
13 pi_delayacct_blkio_ticks
14 */
15
16+/* Fix compatibility for glibc */
17+#define __STRING(x) #x
18+
19 /* note: RAW assumes you are using the index "i" to select the CPU */
20 #define RAW(member) (long)((long)(p->cpuN[i].member) - (long)(q->cpuN[i].member))
21 #define RAWTOTAL(member) (long)((long)(p->cpu_total.member) - (long)(q->cpu_total.member))
22@@ -583,7 +586,6 @@
23 int isroot = 0;
24
25 #include <mntent.h>
26-#include <fstab.h>
27 #include <sys/stat.h>
28 #include <sys/statfs.h>
29 #include <net/if.h>