aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2021-08-04 20:53:02 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2021-08-04 20:56:00 +0000
commita5541579f68c92886f7adbaf5e538193d21000d1 (patch)
tree3d4c24f4747ac34e5ab946d189d14313237a01ad
parentfd15b7fad5200a1a01f26d808fa8782541193cdc (diff)
downloadports-a5541579f68c92886f7adbaf5e538193d21000d1.tar.gz
ports-a5541579f68c92886f7adbaf5e538193d21000d1.zip
sysutils/tmux-mem-cpu-load: Replace local patch with upstream version
3.5.0 required a patch against a build error. This commit replaces a local patch for it with the version from upstream, which is substantively the same except the local patch won't recognize more than 256 CPUs. I'm including a PORTREVISION bump in case you're running tmux-mem-cpu-load on your 512-core machine.
-rw-r--r--sysutils/tmux-mem-cpu-load/Makefile1
-rw-r--r--sysutils/tmux-mem-cpu-load/files/patch-common_cpu.h11
-rw-r--r--sysutils/tmux-mem-cpu-load/files/patch-freebsd_cpu.cc28
3 files changed, 29 insertions, 11 deletions
diff --git a/sysutils/tmux-mem-cpu-load/Makefile b/sysutils/tmux-mem-cpu-load/Makefile
index 30343445a256..5409d447ca8b 100644
--- a/sysutils/tmux-mem-cpu-load/Makefile
+++ b/sysutils/tmux-mem-cpu-load/Makefile
@@ -2,6 +2,7 @@
PORTNAME= tmux-mem-cpu-load
PORTVERSION= 3.5.0
+PORTREVISION= 1
DISTVERSIONPREFIX= v
CATEGORIES= sysutils
diff --git a/sysutils/tmux-mem-cpu-load/files/patch-common_cpu.h b/sysutils/tmux-mem-cpu-load/files/patch-common_cpu.h
deleted file mode 100644
index 42237a044b95..000000000000
--- a/sysutils/tmux-mem-cpu-load/files/patch-common_cpu.h
+++ /dev/null
@@ -1,11 +0,0 @@
---- common/cpu.h.orig 2021-08-04 11:37:18 UTC
-+++ common/cpu.h
-@@ -45,7 +45,7 @@
- #endif
-
- float cpu_percentage( unsigned );
--uint32_t get_cpu_count();
-+uint8_t get_cpu_count();
-
- /** CPU percentage output mode.
- *
diff --git a/sysutils/tmux-mem-cpu-load/files/patch-freebsd_cpu.cc b/sysutils/tmux-mem-cpu-load/files/patch-freebsd_cpu.cc
new file mode 100644
index 000000000000..c1bd8c3b9ab0
--- /dev/null
+++ b/sysutils/tmux-mem-cpu-load/files/patch-freebsd_cpu.cc
@@ -0,0 +1,28 @@
+From 96ea7dc0507679203b07e673ebd21a0ea8d474e9 Mon Sep 17 00:00:00 2001
+From: Matt McCormick <matt.mccormick@kitware.com>
+Date: Wed, 4 Aug 2021 15:05:19 -0400
+Subject: [PATCH] Consistent get_cpu_count for FreeBSD
+
+---
+ freebsd/cpu.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/freebsd/cpu.cc b/freebsd/cpu.cc
+index b85d402..4c7dddb 100644
+--- freebsd/cpu.cc.orig
++++ freebsd/cpu.cc
+@@ -26,12 +26,12 @@
+ #include "getsysctl.h"
+ #include "cpu.h"
+
+-uint8_t get_cpu_count()
++uint32_t get_cpu_count()
+ {
+ int32_t cpu_count = 0;
+ GETSYSCTL( "hw.ncpu", cpu_count );
+
+- return static_cast<uint8_t>( cpu_count );
++ return static_cast<uint32_t>( cpu_count );
+ }
+
+ float cpu_percentage( unsigned int cpu_usage_delay )