summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2020-05-30 12:12:53 +0200
committerFabian Groffen <grobian@gentoo.org>2020-05-30 12:13:08 +0200
commited270e4a02b2450c9e18d01710baa7860478f1cc (patch)
tree177953f9b8c3acfcb99cf71f6389af452ae3a29a /sys-process
parentnet-dns/pdns: Mark 4.3.0 stable on amd64/x86 (diff)
downloadgentoo-ed270e4a02b2450c9e18d01710baa7860478f1cc.tar.gz
gentoo-ed270e4a02b2450c9e18d01710baa7860478f1cc.tar.bz2
gentoo-ed270e4a02b2450c9e18d01710baa7860478f1cc.zip
sys-process/unixtop-3.8_beta1-r3: fix compilation on Linux #726052
Albeit not really keyworded, fix compilation on Linux, and add some other fixes too: - block sys-process/procps for conflicting /usr/bin/top - add resize crash patch - add patch to allow compilation on Linux - fix curses patch to work with ncurses[tinfo] Closes: https://bugs.gentoo.org/726052 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch3
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-recent-linux.patch13
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-winch-segfault.patch31
-rw-r--r--sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild7
4 files changed, 51 insertions, 3 deletions
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch
index a2da4b47da6a..476093c7e565 100644
--- a/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch
@@ -1,5 +1,6 @@
* check ncurses first, such that we only link agains (system) termcap if
necessary (never the case in prefix) -- grobian@gentoo.org
+* check tinfo in case of ncurses[tinfo] -- jer@gentoo.org
--- a/configure.ac
+++ b/configure.ac
@@ -8,7 +9,7 @@
# -lmld -lmach
AC_CHECK_LIB(mach, vm_statistics)
-AC_SEARCH_LIBS(tgetent, termcap curses ncurses)
-+AC_SEARCH_LIBS(tgetent, ncurses curses termcap)
++AC_SEARCH_LIBS(tgetent, ncurses tinfo curses termcap)
AC_CHECK_LIB(m, exp)
# check for libraries required by extension
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
new file mode 100644
index 000000000000..f3777dacb80a
--- /dev/null
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-recent-linux.patch
@@ -0,0 +1,13 @@
+grab PAGE_SHIFT from a location where it is defined nowadays
+
+--- a/machine/m_linux.c
++++ b/machine/m_linux.c
+@@ -68,7 +68,7 @@
+ #include <sys/vfs.h>
+
+ #include <sys/param.h> /* for HZ */
+-#include <asm/page.h> /* for PAGE_SHIFT */
++#include <sys/user.h> /* for PAGE_SHIFT */
+
+ #if 0
+ #include <linux/proc_fs.h> /* for PROC_SUPER_MAGIC */
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
new file mode 100644
index 000000000000..e00e4052eb4f
--- /dev/null
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-winch-segfault.patch
@@ -0,0 +1,31 @@
+https://sourceforge.net/p/unixtop/patches/22/
+
+diff -u top-3.8beta1/top.c top-3.8beta1-rivoreo-r1/top.c
+--- top-3.8beta1/top.c 2008-05-07 11:41:39.000000000 +0800
++++ top-3.8beta1-rivoreo-r1/top.c 2017-01-15 18:32:50.000000000 +0800
+@@ -257,14 +258,14 @@
+ }
+
+ void
+-set_signals()
++set_signals(int set_winch)
+
+ {
+ (void) set_signal(SIGINT, sig_leave);
+ (void) set_signal(SIGQUIT, sig_leave);
+ (void) set_signal(SIGTSTP, sig_tstop);
+ #ifdef SIGWINCH
+- (void) set_signal(SIGWINCH, sig_winch);
++ if(set_winch) set_signal(SIGWINCH, sig_winch);
+ #endif
+ }
+
+@@ -905,7 +906,7 @@
+ screen_init();
+
+ /* set the signal handlers */
+- set_signals();
++ set_signals(gstate->interactive);
+
+ /* longjmp re-entry point */
+ /* set the jump buffer for long jumps out of signal handlers */
diff --git a/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild b/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild
index c4f9598cf00b..c4ee3dd47486 100644
--- a/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild
+++ b/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -15,7 +15,8 @@ KEYWORDS="~amd64-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris
IUSE=""
RDEPEND="sys-libs/ncurses"
-DEPEND="${RDEPEND}"
+DEPEND="${RDEPEND}
+ !sys-process/procps"
S=${WORKDIR}/top-${PV/_/}
@@ -26,6 +27,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.8_beta1-memleak-fix-v2.patch
"${FILESDIR}"/${PN}-3.8_beta1-high-threadid-crash.patch
"${FILESDIR}"/${PN}-3.8_beta1-percent-cpu.patch
+ "${FILESDIR}"/${PN}-3.8_beta1-winch-segfault.patch
+ "${FILESDIR}"/${PN}-3.8_beta1-recent-linux.patch
)
src_prepare() {