diff options
author | Fabian Groffen <grobian@gentoo.org> | 2012-05-09 11:14:22 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2012-05-09 11:14:22 +0000 |
commit | 221b68f36cb506df301c2af8e72a9b8ea36c586e (patch) | |
tree | 1a567b5f23d2717c3bba16fa9c1db6a91f804b9f /sys-process/unixtop | |
parent | Make comply with multilib-strict (diff) | |
download | gentoo-2-221b68f36cb506df301c2af8e72a9b8ea36c586e.tar.gz gentoo-2-221b68f36cb506df301c2af8e72a9b8ea36c586e.tar.bz2 gentoo-2-221b68f36cb506df301c2af8e72a9b8ea36c586e.zip |
Revbump for some patches from Oracle/OpenIndiana
(Portage version: 2.2.01.20430-prefix/cvs/SunOS i386)
Diffstat (limited to 'sys-process/unixtop')
-rw-r--r-- | sys-process/unixtop/ChangeLog | 11 | ||||
-rw-r--r-- | sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch | 44 | ||||
-rw-r--r-- | sys-process/unixtop/files/unixtop-3.8_beta1-percent-cpu.patch | 23 | ||||
-rw-r--r-- | sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild | 49 |
4 files changed, 125 insertions, 2 deletions
diff --git a/sys-process/unixtop/ChangeLog b/sys-process/unixtop/ChangeLog index 63d2d83881df..74578d80a591 100644 --- a/sys-process/unixtop/ChangeLog +++ b/sys-process/unixtop/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-process/unixtop -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/unixtop/ChangeLog,v 1.3 2010/01/25 18:36:49 grobian Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/unixtop/ChangeLog,v 1.4 2012/05/09 11:14:22 grobian Exp $ + +*unixtop-3.8_beta1-r3 (09 May 2012) + + 09 May 2012; Fabian Groffen <grobian@gentoo.org> + +files/unixtop-3.8_beta1-memleak-fix-v2.patch, + +files/unixtop-3.8_beta1-percent-cpu.patch, +unixtop-3.8_beta1-r3.ebuild: + Revbump for some patches from Oracle/OpenIndiana *unixtop-3.8_beta1-r2 (25 Jan 2010) 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-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/unixtop-3.8_beta1-r3.ebuild b/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild new file mode 100644 index 000000000000..5ccad0837793 --- /dev/null +++ b/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/unixtop/unixtop-3.8_beta1-r3.ebuild,v 1.1 2012/05/09 11:14:22 grobian Exp $ + +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="~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND="sys-libs/ncurses" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/top-${PV/_/} + +src_unpack() { + unpack ${A} + cd "${S}" + 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 + eautoreconf +} + +src_compile() { + 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} || die + emake || die +} + +src_install() { + emake DESTDIR="${D}" install + dodoc README FAQ Y2K +} |