pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

btop: Fix the memory meter.



Module Name:	pkgsrc-wip
Committed By:	Santhosh Raju <fox%NetBSD.org@localhost>
Pushed By:	fox
Date:		Tue Feb 20 05:44:58 2024 +0100
Changeset:	b290be79a1c63265dc3f776fc02cade764015676

Modified Files:
	btop/Makefile
	btop/PLIST
	btop/distinfo
	btop/patches/patch-Makefile
	btop/patches/patch-src_netbsd_btop__collect.cpp

Log Message:
btop: Fix the memory meter.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b290be79a1c63265dc3f776fc02cade764015676

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 btop/Makefile                                   |  7 ++++---
 btop/PLIST                                      |  1 +
 btop/distinfo                                   | 10 +++++-----
 btop/patches/patch-Makefile                     |  6 +++---
 btop/patches/patch-src_netbsd_btop__collect.cpp | 14 +++++++-------
 5 files changed, 20 insertions(+), 18 deletions(-)

diffs:
diff --git a/btop/Makefile b/btop/Makefile
index 7fe475022e..2244e99880 100644
--- a/btop/Makefile
+++ b/btop/Makefile
@@ -1,10 +1,10 @@
 # $NetBSD$
 
-DISTNAME=	btop-1.2.13.20240103
+DISTNAME=	btop-1.2.13.20240218
 CATEGORIES=	sysutils
 MASTER_SITES=	${MASTER_SITE_GITHUB:=aristocratos/}
 #GITHUB_TAG=	v${PKGVERSION_NOREV}
-GITHUB_TAG=	114a98d813f618ab8ef594eb0de90a2a13dd3a0c
+GITHUB_TAG=	6c667402907171f3ba7ebb637e553cc6f66f4e66
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	https://github.com/aristocratos/btop
@@ -16,8 +16,9 @@ DEPENDS+=	coreutils-[0-9]*:../../sysutils/coreutils
 USE_LANGUAGES=	c c++
 USE_TOOLS+=	gmake
 GCC_REQD+=	10
+CXXFLAGS+=	-DNDEBUG
 
-MAKE_ARGS=	STRIP=true ADDFLAGS="${CXXFLAGS} ${LDFLAGS}" VERBOSE=true
+MAKE_ARGS=	STRIP=true VERBOSE=true
 
 .include "../../mk/pthread.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/btop/PLIST b/btop/PLIST
index 075f2616e8..a736a0a6dd 100644
--- a/btop/PLIST
+++ b/btop/PLIST
@@ -10,6 +10,7 @@ share/btop/themes/dracula.theme
 share/btop/themes/dusklight.theme
 share/btop/themes/elementarish.theme
 share/btop/themes/everforest-dark-hard.theme
+share/btop/themes/everforest-dark-medium.theme
 share/btop/themes/flat-remix-light.theme
 share/btop/themes/flat-remix.theme
 share/btop/themes/greyscale.theme
diff --git a/btop/distinfo b/btop/distinfo
index de81d8f6b6..48f9972ec5 100644
--- a/btop/distinfo
+++ b/btop/distinfo
@@ -1,8 +1,8 @@
 $NetBSD$
 
-BLAKE2s (btop-1.2.13.20240103-114a98d813f618ab8ef594eb0de90a2a13dd3a0c.tar.gz) = 5b96897391ec55189abb61705af0c221f8704cf009c41f637f3c21a151a8fcd7
-SHA512 (btop-1.2.13.20240103-114a98d813f618ab8ef594eb0de90a2a13dd3a0c.tar.gz) = 8f1e638b7e49813b17eafbb07b0bb500dd35ad8e3501053846c18cfe14ab13b45b7da522f99ca30cee03207d90d6d7aa3480b95c629448a5427ae62051d4e38b
-Size (btop-1.2.13.20240103-114a98d813f618ab8ef594eb0de90a2a13dd3a0c.tar.gz) = 1142649 bytes
-SHA1 (patch-Makefile) = e106baf05007146c1f38dd190b639844f4743d4e
+BLAKE2s (btop-1.2.13.20240218-6c667402907171f3ba7ebb637e553cc6f66f4e66.tar.gz) = e828f1fa3410bd8a3eda1db38a88236be6d76befb3ac63eedc2c343e80cc0f9c
+SHA512 (btop-1.2.13.20240218-6c667402907171f3ba7ebb637e553cc6f66f4e66.tar.gz) = 61d1ccf691c32fc1b314a4031ea127527a31829edbc7c81ff0d6b10bbaa5dd5ed2a34674579ea5b0884f2e18b6316b19160bc91fa72f9f9b52b1108ee396285b
+Size (btop-1.2.13.20240218-6c667402907171f3ba7ebb637e553cc6f66f4e66.tar.gz) = 1145612 bytes
+SHA1 (patch-Makefile) = c881cc9121de99902f560728da201473b2ea9ef9
 SHA1 (patch-src_btop.cpp) = 60c805d6a5343d2e46f8f7cb0b03059426871fe9
-SHA1 (patch-src_netbsd_btop__collect.cpp) = 3d86f131f33c5099233f101f6226a9804c3dd56a
+SHA1 (patch-src_netbsd_btop__collect.cpp) = 165a18f5073325233af11723ab7226a39a8b5ad5
diff --git a/btop/patches/patch-Makefile b/btop/patches/patch-Makefile
index e65e7b35f5..7102a8f0eb 100644
--- a/btop/patches/patch-Makefile
+++ b/btop/patches/patch-Makefile
@@ -2,10 +2,10 @@ $NetBSD$
 
 Add support for NetBSD.
 
---- Makefile.orig	2024-01-02 15:54:52.000000000 +0000
+--- Makefile.orig	2024-02-18 13:25:11.000000000 +0000
 +++ Makefile
-@@ -166,6 +166,12 @@ else ifeq ($(PLATFORM_LC),openbsd)
- 	override ADDFLAGS += -lkvm
+@@ -146,6 +146,12 @@ else ifeq ($(PLATFORM_LC),openbsd)
+ 	override ADDFLAGS += -lkvm -static-libstdc++
  	export MAKE = gmake
  	SU_GROUP := wheel
 +else ifeq ($(PLATFORM_LC),netbsd)
diff --git a/btop/patches/patch-src_netbsd_btop__collect.cpp b/btop/patches/patch-src_netbsd_btop__collect.cpp
index a79151e370..a09f8c8874 100644
--- a/btop/patches/patch-src_netbsd_btop__collect.cpp
+++ b/btop/patches/patch-src_netbsd_btop__collect.cpp
@@ -2,7 +2,7 @@ $NetBSD$
 
 Add support for NetBSD.
 
---- src/netbsd/btop_collect.cpp.orig	2024-01-06 07:32:32.704371129 +0000
+--- src/netbsd/btop_collect.cpp.orig	2024-02-20 04:23:40.288593132 +0000
 +++ src/netbsd/btop_collect.cpp
 @@ -0,0 +1,1284 @@
 +/* Copyright 2021 Aristocratos (jakob%qvantnet.com@localhost)
@@ -209,7 +209,7 @@ Add support for NetBSD.
 +	string cpuName;
 +	string cpuHz;
 +	bool has_battery = true;
-+	tuple<int, long, string> current_bat;
++	tuple<int, float, long, string> current_bat;
 +
 +	const array<string, 10> time_names = {"user", "nice", "system", "idle"};
 +
@@ -392,8 +392,8 @@ Add support for NetBSD.
 +		return core_map;
 +	}
 +
-+	auto get_battery() -> tuple<int, long, string> {
-+		if (not has_battery) return {0, 0, ""};
++	auto get_battery() -> tuple<int, float, long, string> {
++		if (not has_battery) return {0, 0.0, 0, ""};
 +
 +		long seconds = -1;
 +		uint32_t percent = -1;
@@ -424,7 +424,7 @@ Add support for NetBSD.
 +			}
 +		}
 +
-+		return {percent, seconds, status};
++		return {percent, 0.0, seconds, status};
 +	}
 +
 +	auto collect(bool no_update) -> cpu_info & {
@@ -626,9 +626,9 @@ Add support for NetBSD.
 +  		mem.stats.at("free") = Shared::totalMem - memActive - memWire;
 +
 +		if (show_swap) {
-+			int total = uvmexp.swpages * Shared::pageSize;
++			uint64_t total = uvmexp.swpages * Shared::pageSize;
 +			mem.stats.at("swap_total") = total;
-+			int swapped = uvmexp.swpginuse * Shared::pageSize;
++			uint64_t swapped = uvmexp.swpginuse * Shared::pageSize;
 +			mem.stats.at("swap_used") = swapped;
 +			mem.stats.at("swap_free") = total - swapped;
 +		}


Home | Main Index | Thread Index | Old Index