htop: update to 3.0.0

This commit is contained in:
Leonid Pliushch 2020-08-28 21:43:12 +03:00
parent 85bafbf680
commit ab326d4cea
2 changed files with 42 additions and 6 deletions

View File

@ -0,0 +1,32 @@
From b992d52bcf8ff8c51c847cd4bbf33a7db441dbe9 Mon Sep 17 00:00:00 2001
From: Nathan Scott <nathans@redhat.com>
Date: Fri, 28 Aug 2020 16:57:21 +1000
Subject: [PATCH] Increae the size of sysfs power supply path buffers
Resolves https://github.com/htop-dev/htop/issues/15
---
linux/Battery.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux/Battery.c b/linux/Battery.c
index 4014a50..a8784da 100644
--- a/linux/Battery.c
+++ b/linux/Battery.c
@@ -107,7 +107,7 @@ static ACPresence procAcpiCheck() {
if (entryName[0] != 'A')
continue;
- char statePath[50];
+ char statePath[256];
xSnprintf((char *) statePath, sizeof statePath, "%s/%s/state", power_supplyPath, entryName);
FILE* file = fopen(statePath, "r");
if (!file) {
@@ -191,7 +191,7 @@ static void Battery_getSysData(double* level, ACPresence* isOnAC) {
if (!dirEntry)
break;
char* entryName = (char *) dirEntry->d_name;
- const char filePath[50];
+ const char filePath[256];
xSnprintf((char *) filePath, sizeof filePath, SYS_POWERSUPPLY_DIR "/%s/type", entryName);
int fd1 = open(filePath, O_RDONLY);

View File

@ -1,15 +1,19 @@
TERMUX_PKG_HOMEPAGE=https://hisham.hm/htop/
TERMUX_PKG_HOMEPAGE=https://htop.dev/
TERMUX_PKG_DESCRIPTION="Interactive process viewer for Linux"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=2.2.0
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=http://hisham.hm/htop/releases/${TERMUX_PKG_VERSION}/htop-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=d9d6826f10ce3887950d709b53ee1d8c1849a70fa38e91d5896ad8cbc6ba3c57
TERMUX_PKG_VERSION=3.0.0
TERMUX_PKG_SRCURL=https://github.com/htop-dev/htop/archive/${TERMUX_PKG_VERSION}/htop-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=1c0661f0ae5f4e2874da250b60cd515e4ac4c041583221adfe95f10e18d1a4e6
# htop checks setlocale() return value for UTF-8 support, so use libandroid-support.
TERMUX_PKG_DEPENDS="ncurses, libandroid-support"
TERMUX_PKG_DEPENDS="libandroid-support, ncurses"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_RM_AFTER_INSTALL="share/applications share/pixmaps"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
ac_cv_lib_ncursesw6_addnwstr=yes
LIBS=-landroid-support
"
termux_step_pre_configure() {
./autogen.sh
}