diff options
author | Timothy Redaelli <drizzt@gentoo.org> | 2009-03-04 21:51:08 +0000 |
---|---|---|
committer | Timothy Redaelli <drizzt@gentoo.org> | 2009-03-04 21:51:08 +0000 |
commit | b901efdd4b5ffdd22bbaf1b9c494b647cc5e3262 (patch) | |
tree | 8a81c13bac10b0b72b339847a5a45b0cdd938fb3 | |
parent | Version bump (fixes memory leaks and segfaults). Dropping old. (diff) | |
download | historical-b901efdd4b5ffdd22bbaf1b9c494b647cc5e3262.tar.gz historical-b901efdd4b5ffdd22bbaf1b9c494b647cc5e3262.tar.bz2 historical-b901efdd4b5ffdd22bbaf1b9c494b647cc5e3262.zip |
Patch for not-Linux hosts.
Authorized by gentoofan23
Package-Manager: portage-2.2_rc23/cvs/Linux x86_64
-rw-r--r-- | sys-process/htop/ChangeLog | 8 | ||||
-rw-r--r-- | sys-process/htop/Manifest | 13 | ||||
-rw-r--r-- | sys-process/htop/files/htop-0.8.1-no-plpa.patch | 111 | ||||
-rw-r--r-- | sys-process/htop/htop-0.8.1-r1.ebuild | 22 |
4 files changed, 137 insertions, 17 deletions
diff --git a/sys-process/htop/ChangeLog b/sys-process/htop/ChangeLog index db6eba2561b1..0378d68ea600 100644 --- a/sys-process/htop/ChangeLog +++ b/sys-process/htop/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-process/htop -# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/htop/ChangeLog,v 1.71 2008/12/01 15:39:42 ranger Exp $ +# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-process/htop/ChangeLog,v 1.72 2009/03/04 21:51:08 drizzt Exp $ + + 04 Mar 2009; Timothy Redaelli <drizzt@gentoo.org> + +files/htop-0.8.1-no-plpa.patch, htop-0.8.1-r1.ebuild: + Patch for not-Linux hosts. Authorized by gentoofan23 01 Dec 2008; Brent Baude <ranger@gentoo.org> htop-0.8.1-r1.ebuild: Marking htop-0.8.1-r1 ppc64 for bug 245966 diff --git a/sys-process/htop/Manifest b/sys-process/htop/Manifest index fe7c0fb799b1..65e4ce44bc35 100644 --- a/sys-process/htop/Manifest +++ b/sys-process/htop/Manifest @@ -2,15 +2,16 @@ Hash: SHA1 AUX htop-0.8.1-desktop-entry.patch 396 RMD160 a86dbdf0856410707d3b352df43c10dddfb3d807 SHA1 4f852f1a9be20bb6d49369c43d43d0c2560f6c49 SHA256 fad5d148a176b61b2ceeba0dfefd6dc9efd54704ff8f845f6b7ef695a49f2625 +AUX htop-0.8.1-no-plpa.patch 3206 RMD160 0a64aee22a69a7b4b80d2df3bae666d30efb2564 SHA1 b254da652488c8238e7dd2356f57db472416ce1d SHA256 866cacdd7572fc5d013aad40195d6b863d16c556d9f3b96d0ddfe71d776bafaa AUX htop-0.8.1-non-printable-char-filter.patch 576 RMD160 eb716cf0a079b4a06aa60c763c2b3ecb138aa82e SHA1 1ade154e42525b3e04210eb7375e1543ed6d87f5 SHA256 e4ff4eb727b9baae514589ec99d08f3c9f5160618dae493fcacca92473de68a7 DIST htop-0.8.1.tar.gz 414870 RMD160 8e73a9b31b6a48d4680c4df06c280c8d1bc125da SHA1 b41b4d83ab7ac40b79f6eeb730cd561293b62fd4 SHA256 25ae28202fa4b782ed0e1298d3feee407bdeb56eaf9c652d0a6f9dbf22125d28 -EBUILD htop-0.8.1-r1.ebuild 1329 RMD160 23212a1ca06f577718910cceb21591025e706d00 SHA1 83e13cb37133c0a4536543f5e22799a2eb1d30d8 SHA256 5e6d86832fc6988275f3825cd7d085fd272eb697eda20791e2bd75c95cf12326 -MISC ChangeLog 9685 RMD160 a5fd8a4626324506e314863121869722e69f1bb3 SHA1 104846e6c8d8611f1f634d5ddab4422514d6e40e SHA256 e6cf8bf23a37abf4c671735acd8200c2c650b4c7e53ca8671b882ef514edaf0b +EBUILD htop-0.8.1-r1.ebuild 1512 RMD160 13a8e45dedba02c291759e9a84c18450d36f855b SHA1 c87c6aaaa24e49a1c4ae092977ebf05793bfe3db SHA256 15211b4c89d7387eafc49985bed2b07cbeab3b3de63321435bdb626b5e0a50ab +MISC ChangeLog 9850 RMD160 abc84de154f751db3383b9aa4f40009b8731f6dc SHA1 ba32149c76fdff949ff47cbb868f12df5db7d3eb SHA256 603deba3bbe75915acf652e39170266d9b89ebc6d88fcb1cf742685b97ee7269 MISC metadata.xml 618 RMD160 dd00a14cdcd692f6c4efd5107cc0e97f2ea915c6 SHA1 4b96f9a5c5964bc4182eed3acdb59e6b9d9b0559 SHA256 b04ca9e5e1cde68556c792812c5ba650727c43513cf577296a6ed24c8d18256d -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.9 (GNU/Linux) +Version: GnuPG v2.0.10 (GNU/Linux) -iEYEARECAAYFAkk7rRQACgkQ67wieSYcaxevRwCgy8WZX0beQqKJP3/HqgpiU5yJ -a8sAn2AUnma5PPFzIRU2Wbl+UBDVoB/t -=nUAC +iEYEARECAAYFAkmu99UACgkQl4DfQEcjpw385QCfbUqMLDh4rbuHWgByJjs9dwr2 +afcAnithCZufHvdd0mqMtcVUD3J21UOp +=hh/a -----END PGP SIGNATURE----- diff --git a/sys-process/htop/files/htop-0.8.1-no-plpa.patch b/sys-process/htop/files/htop-0.8.1-no-plpa.patch new file mode 100644 index 000000000000..ee89da35bd4b --- /dev/null +++ b/sys-process/htop/files/htop-0.8.1-no-plpa.patch @@ -0,0 +1,111 @@ +Not-linux hosts does not support PLPA. +Since htop works also without it, why not? + +Original patch from FreeBSD by Yi-Jheng Lin <yzlin@cs.nctu.edu.tw> +Modified to be conditional by Timothy Redaelli <drizzt@gentoo.org> + +https://bugs.gentoo.org/220469 + +--- configure.ac ++++ configure.ac +@@ -97,8 +97,9 @@ + + PLPA_INCLUDED(plpa-1.1) + PLPA_INIT(plpa_happy=yes, plpa_happy=no) +-if test "x$plpa_happy" = xno; then +- AC_MSG_ERROR([Failed to initialize PLPA.]) ++AM_CONDITIONAL([HAVE_PLPA], [test "$plpa_happy" = "yes"]) ++if test "$plpa_happy" = "yes"; then ++ AC_DEFINE([HAVE_PLPA], [1], [Have plpa]) + fi + + AC_CONFIG_FILES([Makefile]) +--- htop.c ++++ htop.c +@@ -112,9 +112,11 @@ + mvaddstr(15, 0, " F9 k: kill process/tagged processes P: sort by CPU%"); + mvaddstr(16, 0, " + [ F7: lower priority (+ nice) M: sort by MEM%"); + mvaddstr(17, 0, " - ] F8: higher priority (root only) T: sort by TIME"); ++#ifdef HAVE_PLPA + if (pl->processorCount > 1) + mvaddstr(18, 0, " a: set CPU affinity F4 I: invert sort order"); + else ++#endif + mvaddstr(18, 0, " F4 I: invert sort order"); + mvaddstr(19, 0, " F2 S: setup F6 >: select sort column"); + mvaddstr(20, 0, " F1 h: show this help screen"); +@@ -131,8 +133,10 @@ + mvaddstr(16, 0, " + [ F7"); mvaddstr(16,40, " M"); + mvaddstr(17, 0, " - ] F8"); mvaddstr(17,40, " T"); + mvaddstr(18,40, " F4 I"); ++#if HAVE_PLPA + if (pl->processorCount > 1) + mvaddstr(18, 0, " a:"); ++#endif + mvaddstr(19, 0, " F2 S"); mvaddstr(19,40, " F6 >"); + mvaddstr(20, 0, " F1 h"); + mvaddstr(21, 0, " F10 q"); mvaddstr(21,40, " s"); +@@ -630,6 +634,7 @@ + refreshTimeout = 0; + break; + } ++#ifdef HAVE_PLPA + case 'a': + { + if (pl->processorCount == 1) +@@ -665,6 +670,7 @@ + refreshTimeout = 0; + break; + } ++#endif + case KEY_F(10): + case 'q': + quit = 1; +--- Process.c ++++ Process.c +@@ -28,7 +28,9 @@ + #include <pwd.h> + #include <sched.h> + ++#ifdef HAVE_PLPA + #include <plpa.h> ++#endif + + // This works only with glibc 2.1+. On earlier versions + // the behavior is similar to have a hardcoded page size. +@@ -493,6 +495,7 @@ + return (err == 0); + } + ++#ifdef HAVE_PLPA + unsigned long Process_getAffinity(Process* this) { + unsigned long mask = 0; + plpa_sched_getaffinity(this->pid, sizeof(unsigned long), (plpa_cpu_set_t*) &mask); +@@ -502,6 +505,7 @@ + bool Process_setAffinity(Process* this, unsigned long mask) { + return (plpa_sched_setaffinity(this->pid, sizeof(unsigned long), (plpa_cpu_set_t*) &mask) == 0); + } ++#endif + + void Process_sendSignal(Process* this, int signal) { + kill(this->pid, signal); +--- Makefile.am ++++ Makefile.am +@@ -1,5 +1,7 @@ + ++if HAVE_PLPA + SUBDIRS = plpa-1.1 ++endif + + bin_PROGRAMS = htop + dist_man_MANS = htop.1 +@@ -35,7 +37,9 @@ + + BUILT_SOURCES = $(myhtopheaders) + htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h debug.h ++if HAVE_PLPA + htop_LDADD = $(top_builddir)/plpa-1.1/src/libplpa_included.la ++endif + + profile: + $(MAKE) all CFLAGS="-pg -O2" diff --git a/sys-process/htop/htop-0.8.1-r1.ebuild b/sys-process/htop/htop-0.8.1-r1.ebuild index 6e9646e60afc..27f12086e38f 100644 --- a/sys-process/htop/htop-0.8.1-r1.ebuild +++ b/sys-process/htop/htop-0.8.1-r1.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-process/htop/htop-0.8.1-r1.ebuild,v 1.7 2008/12/07 11:01:34 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-process/htop/htop-0.8.1-r1.ebuild,v 1.8 2009/03/04 21:51:08 drizzt Exp $ -inherit eutils flag-o-matic +inherit autotools eutils flag-o-matic IUSE="debug unicode" DESCRIPTION="interactive process viewer" @@ -14,12 +14,13 @@ KEYWORDS="~alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd" DEPEND="sys-libs/ncurses" pkg_setup() { - if use elibc_FreeBSD ; then - elog - elog "htop needs /proc mounted to work, to mount it type" - elog "mount -t linprocfs none /proc" - elog "or uncomment the example in /etc/fstab" - elog + if use elibc_FreeBSD && ! [[ -f "${ROOT}"/proc/stat && -f "${ROOT}"/proc/meminfo ]] ; then + eerror + eerror "htop needs /proc mounted to compile and work, to mount it type" + eerror "mount -t linprocfs none /proc" + eerror "or uncomment the example in /etc/fstab" + eerror + die "htop needs /proc mounted" fi } @@ -28,6 +29,9 @@ src_unpack() { cd "${S}" epatch "${FILESDIR}"/${P}-desktop-entry.patch epatch "${FILESDIR}"/${P}-non-printable-char-filter.patch + epatch "${FILESDIR}"/${P}-no-plpa.patch + + eautoreconf } src_compile() { |