1 |
commit: ed270e4a02b2450c9e18d01710baa7860478f1cc |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 30 10:12:53 2020 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 30 10:13:08 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed270e4a |
7 |
|
8 |
sys-process/unixtop-3.8_beta1-r3: fix compilation on Linux #726052 |
9 |
|
10 |
Albeit not really keyworded, fix compilation on Linux, and add some |
11 |
other fixes too: |
12 |
- block sys-process/procps for conflicting /usr/bin/top |
13 |
- add resize crash patch |
14 |
- add patch to allow compilation on Linux |
15 |
- fix curses patch to work with ncurses[tinfo] |
16 |
|
17 |
Closes: https://bugs.gentoo.org/726052 |
18 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
19 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
20 |
|
21 |
.../unixtop/files/unixtop-3.8_beta1-ncurses.patch | 3 ++- |
22 |
.../files/unixtop-3.8_beta1-recent-linux.patch | 13 +++++++++ |
23 |
.../files/unixtop-3.8_beta1-winch-segfault.patch | 31 ++++++++++++++++++++++ |
24 |
sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild | 7 +++-- |
25 |
4 files changed, 51 insertions(+), 3 deletions(-) |
26 |
|
27 |
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch |
28 |
index a2da4b47da6..476093c7e56 100644 |
29 |
--- a/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch |
30 |
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch |
31 |
@@ -1,5 +1,6 @@ |
32 |
* check ncurses first, such that we only link agains (system) termcap if |
33 |
necessary (never the case in prefix) -- grobian@g.o |
34 |
+* check tinfo in case of ncurses[tinfo] -- jer@g.o |
35 |
|
36 |
--- a/configure.ac |
37 |
+++ b/configure.ac |
38 |
@@ -8,7 +9,7 @@ |
39 |
# -lmld -lmach |
40 |
AC_CHECK_LIB(mach, vm_statistics) |
41 |
-AC_SEARCH_LIBS(tgetent, termcap curses ncurses) |
42 |
-+AC_SEARCH_LIBS(tgetent, ncurses curses termcap) |
43 |
++AC_SEARCH_LIBS(tgetent, ncurses tinfo curses termcap) |
44 |
AC_CHECK_LIB(m, exp) |
45 |
|
46 |
# check for libraries required by extension |
47 |
|
48 |
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-recent-linux.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-recent-linux.patch |
49 |
new file mode 100644 |
50 |
index 00000000000..f3777dacb80 |
51 |
--- /dev/null |
52 |
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-recent-linux.patch |
53 |
@@ -0,0 +1,13 @@ |
54 |
+grab PAGE_SHIFT from a location where it is defined nowadays |
55 |
+ |
56 |
+--- a/machine/m_linux.c |
57 |
++++ b/machine/m_linux.c |
58 |
+@@ -68,7 +68,7 @@ |
59 |
+ #include <sys/vfs.h> |
60 |
+ |
61 |
+ #include <sys/param.h> /* for HZ */ |
62 |
+-#include <asm/page.h> /* for PAGE_SHIFT */ |
63 |
++#include <sys/user.h> /* for PAGE_SHIFT */ |
64 |
+ |
65 |
+ #if 0 |
66 |
+ #include <linux/proc_fs.h> /* for PROC_SUPER_MAGIC */ |
67 |
|
68 |
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-winch-segfault.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-winch-segfault.patch |
69 |
new file mode 100644 |
70 |
index 00000000000..e00e4052eb4 |
71 |
--- /dev/null |
72 |
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-winch-segfault.patch |
73 |
@@ -0,0 +1,31 @@ |
74 |
+https://sourceforge.net/p/unixtop/patches/22/ |
75 |
+ |
76 |
+diff -u top-3.8beta1/top.c top-3.8beta1-rivoreo-r1/top.c |
77 |
+--- top-3.8beta1/top.c 2008-05-07 11:41:39.000000000 +0800 |
78 |
++++ top-3.8beta1-rivoreo-r1/top.c 2017-01-15 18:32:50.000000000 +0800 |
79 |
+@@ -257,14 +258,14 @@ |
80 |
+ } |
81 |
+ |
82 |
+ void |
83 |
+-set_signals() |
84 |
++set_signals(int set_winch) |
85 |
+ |
86 |
+ { |
87 |
+ (void) set_signal(SIGINT, sig_leave); |
88 |
+ (void) set_signal(SIGQUIT, sig_leave); |
89 |
+ (void) set_signal(SIGTSTP, sig_tstop); |
90 |
+ #ifdef SIGWINCH |
91 |
+- (void) set_signal(SIGWINCH, sig_winch); |
92 |
++ if(set_winch) set_signal(SIGWINCH, sig_winch); |
93 |
+ #endif |
94 |
+ } |
95 |
+ |
96 |
+@@ -905,7 +906,7 @@ |
97 |
+ screen_init(); |
98 |
+ |
99 |
+ /* set the signal handlers */ |
100 |
+- set_signals(); |
101 |
++ set_signals(gstate->interactive); |
102 |
+ |
103 |
+ /* longjmp re-entry point */ |
104 |
+ /* set the jump buffer for long jumps out of signal handlers */ |
105 |
|
106 |
diff --git a/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild b/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild |
107 |
index c4f9598cf00..c4ee3dd4748 100644 |
108 |
--- a/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild |
109 |
+++ b/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild |
110 |
@@ -1,4 +1,4 @@ |
111 |
-# Copyright 1999-2018 Gentoo Foundation |
112 |
+# Copyright 1999-2020 Gentoo Authors |
113 |
# Distributed under the terms of the GNU General Public License v2 |
114 |
|
115 |
EAPI=6 |
116 |
@@ -15,7 +15,8 @@ KEYWORDS="~amd64-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris |
117 |
IUSE="" |
118 |
|
119 |
RDEPEND="sys-libs/ncurses" |
120 |
-DEPEND="${RDEPEND}" |
121 |
+DEPEND="${RDEPEND} |
122 |
+ !sys-process/procps" |
123 |
|
124 |
S=${WORKDIR}/top-${PV/_/} |
125 |
|
126 |
@@ -26,6 +27,8 @@ PATCHES=( |
127 |
"${FILESDIR}"/${PN}-3.8_beta1-memleak-fix-v2.patch |
128 |
"${FILESDIR}"/${PN}-3.8_beta1-high-threadid-crash.patch |
129 |
"${FILESDIR}"/${PN}-3.8_beta1-percent-cpu.patch |
130 |
+ "${FILESDIR}"/${PN}-3.8_beta1-winch-segfault.patch |
131 |
+ "${FILESDIR}"/${PN}-3.8_beta1-recent-linux.patch |
132 |
) |
133 |
|
134 |
src_prepare() { |