summaryrefslogtreecommitdiff
path: root/sys-process/htop/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-02 15:59:12 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-03-02 15:59:12 +0000
commit06a7b5647e11a8ddf69b1c3d3ded6a8ba28b923e (patch)
tree8d58c1f4b049da677b33209b072f2b3057268fe0 /sys-process/htop/files
parent99abbc5e5a6ecd3fc981b45646fd8cb5d320377b (diff)
gentoo resync : 02.03.2018
Diffstat (limited to 'sys-process/htop/files')
-rw-r--r--sys-process/htop/files/htop-2.1.0-MakeHeader-python3.patch29
-rw-r--r--sys-process/htop/files/htop-2.1.0-bashisms.patch37
-rw-r--r--sys-process/htop/files/htop-2.1.0-clear_on_sigwinch.patch21
-rw-r--r--sys-process/htop/files/htop-2.1.0-color_issues.patch87
-rw-r--r--sys-process/htop/files/htop-2.1.0-header_updates.patch42
-rw-r--r--sys-process/htop/files/htop-2.1.0-ldflags.patch21
-rw-r--r--sys-process/htop/files/htop-2.1.0-ncurses_cflags.patch46
-rw-r--r--sys-process/htop/files/htop-2.1.0-sysmacros.patch91
8 files changed, 349 insertions, 25 deletions
diff --git a/sys-process/htop/files/htop-2.1.0-MakeHeader-python3.patch b/sys-process/htop/files/htop-2.1.0-MakeHeader-python3.patch
new file mode 100644
index 000000000000..7c8590a29919
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-MakeHeader-python3.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/646880
+
+--- a/scripts/MakeHeader.py
++++ b/scripts/MakeHeader.py
+@@ -1,5 +1,5 @@
+ #!/usr/bin/env python
+-import os, sys, string
++import os, sys, string, io
+ try:
+ from cStringIO import StringIO
+ except ImportError:
+@@ -16,7 +16,7 @@ SKIPONE=4
+ state = ANY
+ static = 0
+
+-file = open(sys.argv[1])
++file = io.open(sys.argv[1], "r", errors="ignore")
+ name = sys.argv[1][:-2]
+
+ out = StringIO()
+@@ -94,7 +94,7 @@ out.write( "#endif\n" )
+ # This prevents a lot of recompilation during development
+ out.seek(0)
+ try:
+- with open(name + ".h", "r") as orig:
++ with io.open(name + ".h", "r", errors="ignore") as orig:
+ origcontents = orig.readlines()
+ except:
+ origcontents = ""
diff --git a/sys-process/htop/files/htop-2.1.0-bashisms.patch b/sys-process/htop/files/htop-2.1.0-bashisms.patch
new file mode 100644
index 000000000000..3b5bdabe82fd
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-bashisms.patch
@@ -0,0 +1,37 @@
+From d4ea7cd65ccf8551cabb0706167b2c15aad7866d Mon Sep 17 00:00:00 2001
+From: Jesin <jesin00@gmail.com>
+Date: Mon, 26 Feb 2018 18:07:52 -0500
+Subject: [PATCH] Fix bashisms (#749)
+
+The configure script relied on bash-specific extensions to shell syntax
+and behavior, causing build failures on systems with other /bin/sh
+implementations. This commit replaces those with equivalent constructs
+that should work in all POSIX shells.
+---
+ configure.ac | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index d4bb36b0..3d69756d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -66,7 +66,7 @@ dnl glibc 2.25 deprecates 'major' and 'minor' in <sys/types.h> and requires to
+ dnl include <sys/sysmacros.h>. However the logic in AC_HEADER_MAJOR has not yet
+ dnl been updated in Autoconf 2.69, so use a workaround:
+ m4_version_prereq([2.70], [],
+-[if test $ac_cv_header_sys_mkdev_h = no; then
++[if test "x$ac_cv_header_sys_mkdev_h" = xno; then
+ AC_CHECK_HEADER(sys/sysmacros.h, [AC_DEFINE(MAJOR_IN_SYSMACROS, 1,
+ [Define to 1 if `major', `minor', and `makedev' are declared in <sys/sysmacros.h>.])])
+ fi])
+@@ -278,8 +278,8 @@ then
+ PKG_PROG_PKG_CONFIG()
+ PKG_CHECK_MODULES(LIBNL3, libnl-3.0, [], [missing_libraries="$missing_libraries libnl-3"])
+ PKG_CHECK_MODULES(LIBNL3GENL, libnl-genl-3.0, [], [missing_libraries="$missing_libraries libnl-genl-3"])
+- CFLAGS+=" $LIBNL3_CFLAGS $LIBNL3GENL_CFLAGS"
+- LIBS+=" $LIBNL3_LIBS $LIBNL3GENL_LIBS"
++ CFLAGS="$CFLAGS $LIBNL3_CFLAGS $LIBNL3GENL_CFLAGS"
++ LIBS="$LIBS $LIBNL3_LIBS $LIBNL3GENL_LIBS"
+ AC_DEFINE(HAVE_DELAYACCT, 1, [Define if delay accounting support should be enabled.])
+ fi
+
diff --git a/sys-process/htop/files/htop-2.1.0-clear_on_sigwinch.patch b/sys-process/htop/files/htop-2.1.0-clear_on_sigwinch.patch
new file mode 100644
index 000000000000..3ba7147e3b4f
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-clear_on_sigwinch.patch
@@ -0,0 +1,21 @@
+From 5fca258f33e08cd7733940391edbf9e22208de83 Mon Sep 17 00:00:00 2001
+From: guoci <zguoci@gmail.com>
+Date: Sat, 17 Feb 2018 13:25:57 -0500
+Subject: [PATCH] call clear() function when SIGWINCH is received. (#660)
+
+---
+ Action.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Action.c b/Action.c
+index a6394ac3..50ab0bb9 100644
+--- a/Action.c
++++ b/Action.c
+@@ -185,6 +185,7 @@ static Htop_Reaction sortBy(State* st) {
+ // ----------------------------------------
+
+ static Htop_Reaction actionResize(State* st) {
++ clear();
+ Panel_resize(st->panel, COLS, LINES-(st->panel->y)-1);
+ return HTOP_REDRAW_BAR;
+ }
diff --git a/sys-process/htop/files/htop-2.1.0-color_issues.patch b/sys-process/htop/files/htop-2.1.0-color_issues.patch
new file mode 100644
index 000000000000..0b4bea8bb956
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-color_issues.patch
@@ -0,0 +1,87 @@
+From ac2dff2881a7ab203750e8edf7a46b69ae492ed0 Mon Sep 17 00:00:00 2001
+From: Hisham Muhammad <hisham@gobolinux.org>
+Date: Mon, 5 Feb 2018 07:01:12 +0100
+Subject: [PATCH] Fix color behavior on some terminals.
+
+Fixes #635.
+---
+ CRT.c | 32 +++++++++++++++++---------------
+ CRT.h | 1 +
+ ColorsPanel.c | 1 +
+ 3 files changed, 19 insertions(+), 15 deletions(-)
+
+diff --git a/CRT.c b/CRT.c
+index 237e30ef..ca9a10dd 100644
+--- a/CRT.c
++++ b/CRT.c
+@@ -37,6 +37,7 @@ in the source distribution for its full text.
+ #define White COLOR_WHITE
+
+ #define ColorPairGrayBlack ColorPair(Magenta,Magenta)
++#define ColorIndexGrayBlack ColorIndex(Magenta,Magenta)
+
+ #define KEY_WHEELUP KEY_F(20)
+ #define KEY_WHEELDOWN KEY_F(21)
+@@ -713,22 +714,23 @@ void CRT_enableDelay() {
+
+ void CRT_setColors(int colorScheme) {
+ CRT_colorScheme = colorScheme;
+- if (colorScheme == COLORSCHEME_BLACKNIGHT) {
+- for (int i = 0; i < 8; i++)
+- for (int j = 0; j < 8; j++) {
+- if (ColorIndex(i,j) != ColorIndex(Magenta,Magenta)) {
+- init_pair(ColorIndex(i,j), i, j);
+- }
+- }
+- init_pair(ColorIndex(Magenta,Magenta), 8, 0);
+- } else {
+- for (int i = 0; i < 8; i++)
+- for (int j = 0; j < 8; j++) {
+- if (ColorIndex(i,j) != ColorIndex(Magenta,Magenta)) {
+- init_pair(ColorIndex(i,j), i, (j==0?-1:j));
+- }
++
++ for (int i = 0; i < 8; i++) {
++ for (int j = 0; j < 8; j++) {
++ if (ColorIndex(i,j) != ColorPairGrayBlack) {
++ int bg = (colorScheme != COLORSCHEME_BLACKNIGHT)
++ ? (j==0 ? -1 : j)
++ : j;
++ init_pair(ColorIndex(i,j), i, bg);
+ }
+- init_pair(ColorIndex(Magenta,Magenta), 8, -1);
++ }
+ }
++
++ int grayBlackFg = COLORS > 8 ? 8 : 0;
++ int grayBlackBg = (colorScheme != COLORSCHEME_BLACKNIGHT)
++ ? -1
++ : 0;
++ init_pair(ColorIndexGrayBlack, grayBlackFg, grayBlackBg);
++
+ CRT_colors = CRT_colorSchemes[colorScheme];
+ }
+diff --git a/CRT.h b/CRT.h
+index 590fff6e..933fe068 100644
+--- a/CRT.h
++++ b/CRT.h
+@@ -26,6 +26,7 @@ in the source distribution for its full text.
+ #define White COLOR_WHITE
+
+ #define ColorPairGrayBlack ColorPair(Magenta,Magenta)
++#define ColorIndexGrayBlack ColorIndex(Magenta,Magenta)
+
+ #define KEY_WHEELUP KEY_F(20)
+ #define KEY_WHEELDOWN KEY_F(21)
+diff --git a/ColorsPanel.c b/ColorsPanel.c
+index 627a516a..2028335f 100644
+--- a/ColorsPanel.c
++++ b/ColorsPanel.c
+@@ -78,6 +78,7 @@ static HandlerResult ColorsPanel_eventHandler(Panel* super, int ch) {
+ this->settings->changed = true;
+ const Header* header = this->scr->header;
+ CRT_setColors(mark);
++ clear();
+ Panel* menu = (Panel*) Vector_get(this->scr->panels, 0);
+ Header_draw(header);
+ RichString_setAttr(&(super->header), CRT_colors[PANEL_HEADER_FOCUS]);
diff --git a/sys-process/htop/files/htop-2.1.0-header_updates.patch b/sys-process/htop/files/htop-2.1.0-header_updates.patch
new file mode 100644
index 000000000000..5c36d8b337e4
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-header_updates.patch
@@ -0,0 +1,42 @@
+From ccd156f8ba68c3c82f9a3afef46e414b2af16613 Mon Sep 17 00:00:00 2001
+From: Hisham Muhammad <hisham@gobolinux.org>
+Date: Mon, 26 Feb 2018 11:44:00 -0300
+Subject: [PATCH] Updates to generated header files
+
+---
+ Process.h | 5 +++++
+ linux/LinuxProcessList.h | 5 +++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/Process.h b/Process.h
+index 6c41edc2..fda8480a 100644
+--- a/Process.h
++++ b/Process.h
+@@ -9,6 +9,11 @@ Released under the GNU GPL, see the COPYING file
+ in the source distribution for its full text.
+ */
+
++#ifdef MAJOR_IN_MKDEV
++#elif defined(MAJOR_IN_SYSMACROS) || \
++ (defined(HAVE_SYS_SYSMACROS_H) && HAVE_SYS_SYSMACROS_H)
++#endif
++
+ #ifdef __ANDROID__
+ #define SYS_ioprio_get __NR_ioprio_get
+ #define SYS_ioprio_set __NR_ioprio_set
+diff --git a/linux/LinuxProcessList.h b/linux/LinuxProcessList.h
+index 5005220a..0851a102 100644
+--- a/linux/LinuxProcessList.h
++++ b/linux/LinuxProcessList.h
+@@ -9,6 +9,11 @@ Released under the GNU GPL, see the COPYING file
+ in the source distribution for its full text.
+ */
+
++#ifdef MAJOR_IN_MKDEV
++#elif defined(MAJOR_IN_SYSMACROS) || \
++ (defined(HAVE_SYS_SYSMACROS_H) && HAVE_SYS_SYSMACROS_H)
++#endif
++
+ #ifdef HAVE_DELAYACCT
+ #endif
+
diff --git a/sys-process/htop/files/htop-2.1.0-ldflags.patch b/sys-process/htop/files/htop-2.1.0-ldflags.patch
new file mode 100644
index 000000000000..386542f35479
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-ldflags.patch
@@ -0,0 +1,21 @@
+From df9922a67eb8e02ab4cf1ff8f24b40f14094e699 Mon Sep 17 00:00:00 2001
+From: Hisham Muhammad <hisham@gobolinux.org>
+Date: Sat, 17 Feb 2018 14:50:55 -0200
+Subject: [PATCH] Fix preservation of LDFLAGS value during configure script
+
+Fixes #738.
+---
+
+diff --git a/configure.ac b/configure.ac
+index df922e07..44595050 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -167,7 +167,7 @@ m4_define([HTOP_CHECK_SCRIPT],
+ LIBS="$htop_config_script $LIBS "
+ htop_script_success=yes
+ ], [])
+- LDFLAGS="$save_LDFLAGS"
++ LDFLAGS="$htop_save_LDFLAGS"
+ fi
+ if test "x$htop_script_success" = xno; then
+ [$5]
diff --git a/sys-process/htop/files/htop-2.1.0-ncurses_cflags.patch b/sys-process/htop/files/htop-2.1.0-ncurses_cflags.patch
new file mode 100644
index 000000000000..0a25aeb7fa23
--- /dev/null
+++ b/sys-process/htop/files/htop-2.1.0-ncurses_cflags.patch
@@ -0,0 +1,46 @@
+From bc5d46982f3504000567e00f59e4f7a5905597a9 Mon Sep 17 00:00:00 2001
+From: Michael Klein <michael.klein@puffin.lb.shuttle.de>
+Date: Mon, 26 Feb 2018 14:19:01 +0100
+Subject: [PATCH] use CFLAGS from ncurses*-config, if present (#745)
+
+Fixes #695.
+---
+ configure.ac | 18 ++++++++++++------
+ 1 file changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 36aebc5e..d4bb36b0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -164,19 +164,25 @@ m4_define([HTOP_CHECK_SCRIPT],
+ [
+ if test ! -z "m4_toupper($HTOP_[$1]_CONFIG_SCRIPT)"; then
+ # to be used to set the path to ncurses*-config when cross-compiling
+- htop_config_script=$(m4_toupper($HTOP_[$1]_CONFIG_SCRIPT) --libs 2> /dev/null)
++ htop_config_script_libs=$(m4_toupper($HTOP_[$1]_CONFIG_SCRIPT) --libs 2> /dev/null)
++ htop_config_script_cflags=$(m4_toupper($HTOP_[$1]_CONFIG_SCRIPT) --cflags 2> /dev/null)
+ else
+- htop_config_script=$([$4] --libs 2> /dev/null)
++ htop_config_script_libs=$([$4] --libs 2> /dev/null)
++ htop_config_script_cflags=$([$4] --cflags 2> /dev/null)
+ fi
+ htop_script_success=no
+ htop_save_LDFLAGS="$LDFLAGS"
+- if test ! "x$htop_config_script" = x; then
+- LDFLAGS="$htop_config_script $LDFLAGS"
++ htop_save_CFLAGS="$CFLAGS"
++ if test ! "x$htop_config_script_libs" = x; then
++ LDFLAGS="$htop_config_script_libs $LDFLAGS"
++ CFLAGS="$htop_config_script_cflags $CFLAGS"
+ AC_CHECK_LIB([$1], [$2], [
+ AC_DEFINE([$3], 1, [The library is present.])
+- LIBS="$htop_config_script $LIBS "
++ LIBS="$htop_config_script_libs $LIBS "
+ htop_script_success=yes
+- ], [])
++ ], [
++ CFLAGS="$htop_save_CFLAGS"
++ ])
+ LDFLAGS="$htop_save_LDFLAGS"
+ fi
+ if test "x$htop_script_success" = xno; then
diff --git a/sys-process/htop/files/htop-2.1.0-sysmacros.patch b/sys-process/htop/files/htop-2.1.0-sysmacros.patch
index 63677dd35fa9..0ab1bb0c02a0 100644
--- a/sys-process/htop/files/htop-2.1.0-sysmacros.patch
+++ b/sys-process/htop/files/htop-2.1.0-sysmacros.patch
@@ -1,40 +1,81 @@
-From 7fd09c08b5b50e5c0a2aebb66072deda4ac503fb Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Mon, 5 Feb 2018 16:02:19 +0100
-Subject: [PATCH] Add <sys/sysmacros.h> to two files.
+From d2d413161bbdf009f232faa5789131326225f838 Mon Sep 17 00:00:00 2001
+From: Explorer09 <explorer09@gmail.com>
+Date: Sat, 24 Feb 2018 11:57:18 +0800
+Subject: [PATCH] Fix build failure ('major' undefined) in glibc 2.28.
->=glibc-2.28 will no longer include sysmacros implicitly.
+glibc 2.28 no longer defines 'major' and 'minor' in <sys/types.h> and
+requires us to include <sys/sysmacros.h>. (glibc 2.25 starts
+deprecating the macros in <sys/types.h>.) Now do include the latter if
+found on the system.
+
+At the moment, let's also utilize AC_HEADER_MAJOR in configure script.
+However as Autoconf 2.69 has not yet updated the AC_HEADER_MAJOR macro
+to reflect the glibc change [1], so add a workaround code.
+
+Fixes #663. Supersedes pull request #729.
+
+Reference:
+[1] https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=e17a30e987d7ee695fb4294a82d987ec3dc9b974
+
+Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
---
- Process.c | 3 +++
- linux/LinuxProcessList.c | 1 +
- 2 files changed, 4 insertions(+)
+ Process.c | 6 ++++++
+ configure.ac | 10 ++++++++++
+ linux/LinuxProcessList.c | 6 ++++++
+ 3 files changed, 22 insertions(+)
diff --git a/Process.c b/Process.c
-index 2ff778d..e135c60 100644
+index 2ff778df..845ca54b 100644
--- a/Process.c
+++ b/Process.c
-@@ -19,6 +19,9 @@ in the source distribution for its full text.
- #include <sys/param.h>
- #include <sys/stat.h>
- #include <sys/types.h>
-+#ifdef HAVE_SYS_SYSMACROS_H
-+# include <sys/sysmacros.h> /* for major, minor */
+@@ -28,6 +28,12 @@ in the source distribution for its full text.
+ #include <time.h>
+ #include <assert.h>
+ #include <math.h>
++#ifdef MAJOR_IN_MKDEV
++#include <sys/mkdev.h>
++#elif defined(MAJOR_IN_SYSMACROS) || \
++ (defined(HAVE_SYS_SYSMACROS_H) && HAVE_SYS_SYSMACROS_H)
++#include <sys/sysmacros.h>
+#endif
- #include <unistd.h>
- #include <stdlib.h>
- #include <signal.h>
+
+ #ifdef __ANDROID__
+ #define SYS_ioprio_get __NR_ioprio_get
+diff --git a/configure.ac b/configure.ac
+index 44595050..36aebc5e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -61,6 +61,16 @@ AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h],[
+ ])
+ AC_CHECK_HEADERS([execinfo.h],[:],[:])
+
++AC_HEADER_MAJOR
++dnl glibc 2.25 deprecates 'major' and 'minor' in <sys/types.h> and requires to
++dnl include <sys/sysmacros.h>. However the logic in AC_HEADER_MAJOR has not yet
++dnl been updated in Autoconf 2.69, so use a workaround:
++m4_version_prereq([2.70], [],
++[if test $ac_cv_header_sys_mkdev_h = no; then
++ AC_CHECK_HEADER(sys/sysmacros.h, [AC_DEFINE(MAJOR_IN_SYSMACROS, 1,
++ [Define to 1 if `major', `minor', and `makedev' are declared in <sys/sysmacros.h>.])])
++fi])
++
+ # Checks for typedefs, structures, and compiler characteristics.
+ # ----------------------------------------------------------------------
+ AC_HEADER_STDBOOL
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
-index c8ba89d..fb95440 100644
+index c8ba89d2..158a7ea2 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
-@@ -25,6 +25,7 @@ in the source distribution for its full text.
- #include <time.h>
+@@ -26,6 +26,12 @@ in the source distribution for its full text.
#include <assert.h>
#include <sys/types.h>
-+#include <sys/sysmacros.h>
#include <fcntl.h>
++#ifdef MAJOR_IN_MKDEV
++#include <sys/mkdev.h>
++#elif defined(MAJOR_IN_SYSMACROS) || \
++ (defined(HAVE_SYS_SYSMACROS_H) && HAVE_SYS_SYSMACROS_H)
++#include <sys/sysmacros.h>
++#endif
#ifdef HAVE_DELAYACCT
---
-2.16.2
-
+ #include <netlink/attr.h>