htop: update to 2.1.0

This commit is contained in:
Leonid Pliushch 2018-03-05 18:00:05 +02:00 committed by Fredrik Fornwall
parent 2f96b6a677
commit 51fe412ccd
3 changed files with 42 additions and 18 deletions

View File

@ -2,10 +2,12 @@ TERMUX_PKG_HOMEPAGE=http://hisham.hm/htop/
TERMUX_PKG_DESCRIPTION="Interactive process viewer for Linux"
# htop checks setlocale() return value for UTF-8 support, so use libandroid-support.
TERMUX_PKG_DEPENDS="ncurses, libandroid-support"
TERMUX_PKG_VERSION=2.0.2
TERMUX_PKG_REVISION=1
TERMUX_PKG_VERSION=2.1.0
TERMUX_PKG_SRCURL=http://hisham.hm/htop/releases/${TERMUX_PKG_VERSION}/htop-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=179be9dccb80cee0c5e1a1f58c8f72ce7b2328ede30fb71dcdf336539be2f487
TERMUX_PKG_SHA256=3260be990d26e25b6b49fc9d96dbc935ad46e61083c0b7f6df413e513bf80748
TERMUX_PKG_BUILD_IN_SRC="yes"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_lib_ncursesw6_addnwstr=yes"
TERMUX_PKG_RM_AFTER_INSTALL="share/applications share/pixmaps"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
ac_cv_lib_ncursesw6_addnwstr=yes
LIBS=-landroid-support
"

View File

@ -0,0 +1,36 @@
diff -uNr htop-2.1.0/linux/LinuxProcessList.c htop-2.1.0.mod/linux/LinuxProcessList.c
--- htop-2.1.0/linux/LinuxProcessList.c 2018-02-04 20:57:13.000000000 +0200
+++ htop-2.1.0.mod/linux/LinuxProcessList.c 2018-03-05 17:57:46.901891199 +0200
@@ -37,6 +37,14 @@
#include <linux/taskstats.h>
#endif
+#ifndef major
+#define major(rdev) ((rdev)>>8)
+#endif
+
+#ifndef minor
+#define minor(rdev) ((rdev) & 0xff)
+#endif
+
/*{
#include "ProcessList.h"
diff -uNr htop-2.1.0/Process.c htop-2.1.0.mod/Process.c
--- htop-2.1.0/Process.c 2018-02-04 20:57:13.000000000 +0200
+++ htop-2.1.0.mod/Process.c 2018-03-05 17:59:16.522983619 +0200
@@ -29,6 +29,14 @@
#include <assert.h>
#include <math.h>
+#ifndef major
+#define major(rdev) ((rdev)>>8)
+#endif
+
+#ifndef minor
+#define minor(rdev) ((rdev) & 0xff)
+#endif
+
#ifdef __ANDROID__
#define SYS_ioprio_get __NR_ioprio_get
#define SYS_ioprio_set __NR_ioprio_set

View File

@ -1,14 +0,0 @@
diff -uNr htop-2.0.2/StringUtils.c htop-2.0.2.mod/StringUtils.c
--- htop-2.0.2/StringUtils.c 2016-06-20 18:11:13.000000000 +0300
+++ htop-2.0.2.mod/StringUtils.c 2017-09-26 13:33:10.596064441 +0300
@@ -88,6 +88,10 @@
}
void String_freeArray(char** s) {
+ if (!s) {
+ return;
+ }
+
for (int i = 0; s[i] != NULL; i++) {
free(s[i]);
}