summaryrefslogtreecommitdiff
path: root/sys-process/unixtop
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-process/unixtop
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-process/unixtop')
-rw-r--r--sys-process/unixtop/Manifest11
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch75
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch44
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch14
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-no-AX-macros.patch22
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-percent-cpu.patch23
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-renice-segfault.patch21
-rw-r--r--sys-process/unixtop/metadata.xml11
-rw-r--r--sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild43
9 files changed, 264 insertions, 0 deletions
diff --git a/sys-process/unixtop/Manifest b/sys-process/unixtop/Manifest
new file mode 100644
index 000000000000..6133e02aa45e
--- /dev/null
+++ b/sys-process/unixtop/Manifest
@@ -0,0 +1,11 @@
+AUX unixtop-3.8_beta1-high-threadid-crash.patch 2261 SHA256 23db7fe72cb7523e886c5d0bc7d06b61320a182c2f03001060ea1b5496b9ec83 SHA512 d25ce022391db06eeef794062bd49cb4c20f4a544bbd389fed566e172c58025cfc79ba6128ebdac2c9c97c21782842922834138d8a754e20c88d64ee65ccf2c7 WHIRLPOOL a3423a71a18f80d6922c56147ca5311200039f1682f6b94ba1cedeb8019930abbc733eab6f0da542a5a2100282b40a76816835f53da361ce43ad80ce6e39cac3
+AUX unixtop-3.8_beta1-memleak-fix-v2.patch 1060 SHA256 56167fb4d6a655c248ddc3a2809fba5bb0a410d4497990e089d680cb57e2a250 SHA512 83ac5d5c61adeb839d45af91c5a52dce38a66abea5f14407dcb988e29c297f7fd36a6c6d845cd90110a003471aba9ed0f715b68beaf6cbb15f433597a6273c8c WHIRLPOOL 6e9c96d6c5df1193f16afa9db98ad3551c4ed256060c4dc07cc0928cafb57a0a17da46d24a606526fd2be215ad1396c9816fcceb00f28f1fc9cab03f5955aa6f
+AUX unixtop-3.8_beta1-ncurses.patch 436 SHA256 26971db7940dd2aed33f523ea19c0084a679d4803f9f8fab8edcd822cad05e3c SHA512 1d5e63cadcc3c69ed4e92973cd0e8bd2de69d19a4dc7cf92ba30e669ece9e9c70b7ec8f0cfb621e101abd850470b75e388f70ceb46dfc9746ab04442ec98f68a WHIRLPOOL 87afe7f29f35f90c398620dde03d27f161ee979809cad57a0c6be25c4cc0cdd7b76b98cedee0888c5522883a88b327a4c90b3bf780abb4b57144f53f4293640f
+AUX unixtop-3.8_beta1-no-AX-macros.patch 609 SHA256 ba24d9c3f3d361d6dfb55447fb2e7e270224868723121fefa7ebd04a1909129f SHA512 a55e9c5b4f337365b24b99f2412ad69edc51a610a4cf831592183d284c83202149342c52e1f09fbdb78dc468484510d3d67902386358aa85eb45c5e8a092ff8e WHIRLPOOL 1b150b36dffbe125b853dfd9dcecc479a8501aa75bcf3a3722fe37d3908a43f7a04b625f2a3330dbf1b0b373159663defeef9e1e37ea0d0a654f2d9c0b691d11
+AUX unixtop-3.8_beta1-percent-cpu.patch 903 SHA256 94236fc3ceb038a7022b8b9208cf8e29ffd1a6bfbb1a05baa97a4e8e4cc45a91 SHA512 6867b2c9951e801aeefc464e7903b719c6acfee7db33e65c7c51da2055daef5990d5a8d1131dc069334bca54f866b25db2891fdb7c15a9d8c468047f090e327c WHIRLPOOL 71cb14d53f25ac5ce510204c9993a95115ce8dc0372e380367a7f153810354740e81b0904a02e9632f773a9e1251ad157bec0f2cb187a92f508cbbedd295133b
+AUX unixtop-3.8_beta1-renice-segfault.patch 518 SHA256 47ffd2879fa9d3e6eae4fd38191abc004540f04b54cf39a72ab2366802067c7e SHA512 2d74ee0e67136a59d6745522ea7671404a9d0a026311f6dfa47dc78d12ecb12da63aab915b969cdecbdf9f3ba9dd86babeebc5c1b61713adbb7c98f70adf56f6 WHIRLPOOL 9f9619bb73c0d3856fcb84bff57856fc83ed80ac0bdc8680d1cf1d89600cd4367240b2aa2e1d119c9758a81f9e2ca5c4fb0769ae70519e1ec3058733adf03f35
+DIST top-3.8beta1.tar.bz2 233880 SHA256 1b5281071a4fcc132205e643fb2fe196cf839555874aaee507a7d07aa0076cda SHA512 c66d786e34070afd00dc2225ce4cddcf0fdaee0e2a6c6e2dfadadcd97bbe84c6668041ff5b075137630b99240c711fbfda8b85fb09c6a39e3067798cbe612671 WHIRLPOOL 1a51c53494d8128fd6ff8bcbfea54efbacf0d7af3e78a492ca29d5bf276ca639d403273f03e49536e7168122bc6002cd1fb1c0c84cd322d691b41032ed766842
+EBUILD unixtop-3.8_beta1-r3.ebuild 1092 SHA256 d1d798cd1442efc65b87bcfd7f8756e6c2053f3529e71c1ea340caf2651e08c4 SHA512 25c86d0658a57534c6c90b976761205dcd5c2385a0ba5c1571b292da2d63546e505ff9df2e60688151a9d2ac396941be7c900e7f81b017fb957bbb3c964680d1 WHIRLPOOL 3cf20cafda41fa64870e11e01ec7b3dd7cd6fa868eb94db69599d621ef4edf6e276d0bf57835601bf7d3cfb6d16070ce3bfc988faa52fc0ded2c6a77ea584aa2
+MISC ChangeLog 2966 SHA256 98ca5c3c1bc6d170946473c74f142f7787309ff2d22543ccfddfff4872a02dbd SHA512 ccf5a78a1a0fd0aa302a55149d6e4eb431ff797e1baac1e3f09d47bfc60d5d622a5952cb4fd405ca81513f39724455e24641a7c4c6a46b70d29ec2704b5dd7a6 WHIRLPOOL 358fa40c060dba982e59a8ffa993a6f5b686e2fcad04d9ca4ba7d6857fe223e02cafbc0b203d8986e1cc67f0715f96b04f52ef62296a3b9752f11bc56a78a360
+MISC ChangeLog-2015 1471 SHA256 fb97d4396cc7ad726df7f79893557941e6fc8b42a8b1d2fefa80fd3a797c6cd1 SHA512 cf17716444d5cce2cfa92422336858c51fd1c693e04d27a8f57f8a2466b9661ef67512a168a2615391b74b7f6d55d64ff7912c246c765ffc68cb012ea9f9abc7 WHIRLPOOL a6a8ae18d02f53f0d3d1edfa80a5fddf8bdafd7b4c7b37a44025fd1fedfa1f452fe26982912238f2808c9dceb5b90de58b61e77ff6adf03c07a5d2d905deddcc
+MISC metadata.xml 324 SHA256 1ec4053008fdd25e9fd79b5e0169462977711a937f31b5986d8bec3dbcb820f4 SHA512 9d0285bab5e9e40597de61a2dd87370aa693ea943f63a6163d5fc3100e9ca8dd7198a309e0d4735a9cb6bbfdb850a06f1e082758d71df21ab1eb0af34361968d WHIRLPOOL 39cb0277eb39a1a456b3c0aec3adce1515aaa9320d0d6990f543ea1254ac4dd76502622601970d3ff986abdd832c818f6a00083d2a7fab74697a22600f2b86d0
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch
new file mode 100644
index 000000000000..734826a647dd
--- /dev/null
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-high-threadid-crash.patch
@@ -0,0 +1,75 @@
+https://sourceforge.net/tracker/index.php?func=detail&aid=2815842&group_id=72892&atid=536042
+
+*** hash.c-old Thu Jul 2 15:30:55 2009
+--- hash.c Thu Jul 2 15:48:39 2009
+***************
+*** 1354,1360 ****
+ hi->value = value;
+
+ /* hash to the bucket */
+! bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)]);
+
+ /* walk the list to make sure we do not have a duplicate */
+ ll = &(bucket->list);
+--- 1354,1360 ----
+ hi->value = value;
+
+ /* hash to the bucket */
+! bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)]);
+
+ /* walk the list to make sure we do not have a duplicate */
+ ll = &(bucket->list);
+***************
+*** 1408,1414 ****
+ pidthr_t k1;
+
+ /* find the bucket */
+! bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)]);
+
+ /* walk the list until we find the existing item */
+ ll = &(bucket->list);
+--- 1408,1414 ----
+ pidthr_t k1;
+
+ /* find the bucket */
+! bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)]);
+
+ /* walk the list until we find the existing item */
+ ll = &(bucket->list);
+***************
+*** 1460,1466 ****
+ pidthr_t k1;
+
+ result = NULL;
+! if ((bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)])) != NULL)
+ {
+ ll = &(bucket->list);
+ li = LL_FIRST(ll);
+--- 1460,1466 ----
+ pidthr_t k1;
+
+ result = NULL;
+! if ((bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)])) != NULL)
+ {
+ ll = &(bucket->list);
+ li = LL_FIRST(ll);
+***************
+*** 1499,1505 ****
+ pidthr_t k1;
+
+ result = NULL;
+! if ((bucket = &(ht->buckets[((key.k_thr * 10000 + key.k_pid) % ht->num_buckets)])) != NULL)
+ {
+ ll = &(bucket->list);
+ li = LL_FIRST(ll);
+--- 1499,1505 ----
+ pidthr_t k1;
+
+ result = NULL;
+! if ((bucket = &(ht->buckets[(((unsigned long)(key.k_thr) * 10000U + (unsigned long)(key.k_pid)) % ht->num_buckets)])) != NULL)
+ {
+ ll = &(bucket->list);
+ li = LL_FIRST(ll);
+
+
+
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch
new file mode 100644
index 000000000000..76042bb4c1a6
--- /dev/null
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch
@@ -0,0 +1,44 @@
+https://hg.openindiana.org/upstream/oracle/userland-gate/raw-file/23c55a2f8a8e/components/top/patches/03.sunos5.patch
+
+*** top-3.8beta1/machine/m_sunos5.c.orig Wed Aug 31 05:23:52 2011
+--- top-3.8beta1/machine/m_sunos5.c Wed Aug 31 05:25:25 2011
+***************
+*** 2064,2070 ****
+
+ /* read the whole file */
+ p = malloc(st.st_size);
+! (void)pread(fd, p, st.st_size, 0);
+
+ /* cache the file descriptor if we can */
+ if (fd < maxfiles)
+--- 2064,2076 ----
+
+ /* read the whole file */
+ p = malloc(st.st_size);
+! if (pread(fd, p, st.st_size, 0) != st.st_size)
+! {
+! (void) close(fd);
+! op->fd_lpsinfo = -1;
+! free(p);
+! continue;
+! }
+
+ /* cache the file descriptor if we can */
+ if (fd < maxfiles)
+***************
+*** 2148,2154 ****
+ op->oldtime = TIMESPEC_TO_DOUBLE(lwpp->pr_time);
+ op->seen = 1;
+ }
+! free(p);
+ }
+ #endif
+
+--- 2154,2160 ----
+ op->oldtime = TIMESPEC_TO_DOUBLE(lwpp->pr_time);
+ op->seen = 1;
+ }
+! free(prp);
+ }
+ #endif
+
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch
new file mode 100644
index 000000000000..73cd88b72826
--- /dev/null
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-ncurses.patch
@@ -0,0 +1,14 @@
+* check ncurses first, such that we only link agains (system) termcap if
+ necessary (never the case in prefix) -- grobian@gentoo.org
+
+--- configure.ac
++++ configure.ac
+@@ -174,7 +174,7 @@
+ AC_CHECK_LIB(kvm, kvm_open)
+ # -lmld -lmach
+ AC_CHECK_LIB(mach, vm_statistics)
+-AC_SEARCH_LIBS(tgetent, termcap curses ncurses)
++AC_SEARCH_LIBS(tgetent, ncurses curses termcap)
+ AC_CHECK_LIB(m, exp)
+
+ # check for libraries required by extension
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-no-AX-macros.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-no-AX-macros.patch
new file mode 100644
index 000000000000..f5d34a4a9ae9
--- /dev/null
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-no-AX-macros.patch
@@ -0,0 +1,22 @@
+* no idea where these macros are, but we can surely do without this, for
+ now -- grobian@gentoo.org
+
+--- configure.ac
++++ configure.ac
+@@ -504,16 +504,6 @@
+
+ AC_MSG_RESULT($result)
+
+-# add extra cflags if the compiler accepts them
+-AX_CFLAGS_WARN_ALL
+-MODULE_CFLAGS=""
+-if test "$ax_cv_c_compiler_vendor" = "gnu"; then
+- AX_CFLAGS_GCC_OPTION([-fno-strict-aliasing], [MODULE_CFLAGS])
+- if test "$target_cpu" = "alpha"; then
+- AX_CFLAGS_GCC_OPTION([-mfp-trap-mode=sui -mtrap-precision=i])
+- fi
+-fi
+-
+ # Define man page supplement
+ MAN_SUPPLEMENT=machine/m_$MODULE.man
+ AC_SUBST_FILE(MAN_SUPPLEMENT)
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-percent-cpu.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-percent-cpu.patch
new file mode 100644
index 000000000000..503ed3576a70
--- /dev/null
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-percent-cpu.patch
@@ -0,0 +1,23 @@
+https://hg.openindiana.org/upstream/oracle/userland-gate/file/23c55a2f8a8e/components/top/patches/04.percent_cpu.patch
+
+--- top-3.8beta1/machine/m_sunos5.c.orig Tue Nov 8 11:23:08 2011
++++ top-3.8beta1/machine/m_sunos5.c Tue Nov 8 11:23:11 2011
+@@ -152,8 +152,17 @@
+ * one of the spare slots in the prinfo structure.
+ */
+
+-#define percent_cpu(pp) (*(double *)dbl_align(&pp->pr_filler[0]))
++#if OSREV > 59
++/*
++ * on Solaris 10, psinfo.pr_filler is 4 bytes and not double-aligned, so we must * move our scratch space to the larger pr.lwp_pr_filler which is 20 bytes
++ * XXX this is a time bomb and will likely break in future Solaris releases.
++ */
++#define percent_cpu(pp) (*(double *)dbl_align(&pp->pr_lwp.pr_filler[0]))
++#else
++#define percent_cpu(pp) (*(double *)dbl_align(&pp->pr_filler[0]))
++#endif
+
++
+ /* definitions for indices in the nlist array */
+ #define X_V 0
+ #define X_MPID 1
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-renice-segfault.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-renice-segfault.patch
new file mode 100644
index 000000000000..afea694b59ad
--- /dev/null
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-renice-segfault.patch
@@ -0,0 +1,21 @@
+http://defect.opensolaris.org/bz/show_bug.cgi?id=6580
+
+--- top-3.8beta1/commands.c
++++ top-3.8beta1/commands.c
+@@ -501,13 +501,15 @@
+ if (procnum == -1 || prio < PRIO_MIN || prio > PRIO_MAX)
+ {
+ message_error(" renice: bad priority value");
++ return;
+ }
+ #endif
+
+ /* move to the first process number */
+ if ((str = next_field(str)) == NULL)
+ {
+- message_error(" remice: no processes specified");
++ message_error(" renice: no processes specified");
++ return;
+ }
+
+ #ifdef HAVE_SETPRIORITY
diff --git a/sys-process/unixtop/metadata.xml b/sys-process/unixtop/metadata.xml
new file mode 100644
index 000000000000..47b89025aeed
--- /dev/null
+++ b/sys-process/unixtop/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>prefix@gentoo.org</email>
+ <name>Gentoo Prefix</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">unixtop</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild b/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild
new file mode 100644
index 000000000000..d32e3863a6f7
--- /dev/null
+++ b/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils autotools
+
+DESCRIPTION="top for UNIX systems"
+HOMEPAGE="http://unixtop.sourceforge.net/"
+SRC_URI="mirror://sourceforge/unixtop/top-${PV/_/}.tar.bz2"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64-linux ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE=""
+
+RDEPEND="sys-libs/ncurses"
+DEPEND="${RDEPEND}"
+
+S=${WORKDIR}/top-${PV/_/}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-ncurses.patch
+ epatch "${FILESDIR}"/${P}-no-AX-macros.patch
+ epatch "${FILESDIR}"/${P}-renice-segfault.patch
+ epatch "${FILESDIR}"/${P}-memleak-fix-v2.patch
+ epatch "${FILESDIR}"/${P}-high-threadid-crash.patch
+ epatch "${FILESDIR}"/${P}-percent-cpu.patch
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=
+
+ # don't do bi-arch cruft on hosts that support that, such as Solaris
+ export enable_dualarch=no
+
+ # configure demands an override because on OSX this is "experimental"
+ [[ ${CHOST} == *-darwin* ]] && myconf="${myconf} --with-module=macosx"
+
+ econf ${myconf}
+}