summaryrefslogtreecommitdiff
path: root/extra/htop
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-21 11:13:53 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-10-21 11:13:53 -0300
commit0fc81a2f2d55fa67c0c719ec87371f0cce0dc344 (patch)
treef615e5bac43a9f0977a687dffc56a866624fddf3 /extra/htop
parent65d9286f54bc65d71cf50737006c9d4c08512070 (diff)
parent1b21445a8e9097b0bb0542ed847fbb1eb832848f (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/haskell-hslogger/PKGBUILD
Diffstat (limited to 'extra/htop')
-rw-r--r--extra/htop/ChangeLog5
-rw-r--r--extra/htop/PKGBUILD32
-rw-r--r--extra/htop/fix-segfault-small-terminal.patch24
-rw-r--r--extra/htop/fix-sort-key-bug.patch15
4 files changed, 65 insertions, 11 deletions
diff --git a/extra/htop/ChangeLog b/extra/htop/ChangeLog
index ea5776244..df71cf644 100644
--- a/extra/htop/ChangeLog
+++ b/extra/htop/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-19 Andrea Scarpino <andrea@archlinux.org>
+ * Enable cgroup support (FS#26155)
+ * Add lsof and strace optional depends (FS#25778)
+ * Fix crash when column is less than 40 (closes FS#25823)
+
2011-05-17 Angel Velasquez <angvp@archlinux.org>
* Added patch to fix --sort-key (closes FS#23224)
diff --git a/extra/htop/PKGBUILD b/extra/htop/PKGBUILD
index 447b035a7..0771238a8 100644
--- a/extra/htop/PKGBUILD
+++ b/extra/htop/PKGBUILD
@@ -1,35 +1,45 @@
-# $Id: PKGBUILD 124246 2011-05-18 04:38:36Z angvp $
+# $Id: PKGBUILD 140790 2011-10-19 10:00:03Z andrea $
# Maintainer: Angel Velasquez <angvp@archlinux.org>
# Contributor: Eric Belanger <eric@archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=htop
pkgver=0.9
-pkgrel=2
+pkgrel=3
pkgdesc="Interactive process viewer"
arch=('i686' 'x86_64' 'mips64el')
url="http://htop.sourceforge.net/"
license=('GPL')
depends=('ncurses')
makedepends=('python2')
+optdepends=('lsof' 'strace')
options=('!emptydirs')
changelog=ChangeLog
-source=(http://downloads.sourceforge.net/htop/${pkgname}-${pkgver}.tar.gz
- htop.c.patch)
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ 'fix-sort-key-bug.patch'
+ 'fix-segfault-small-terminal.patch')
md5sums=('7c5507f35f363f3f40183a2ba3c561f8'
- '750e8ad8476c5d9738da2a2bc7a7c2b6')
+ '750e8ad8476c5d9738da2a2bc7a7c2b6'
+ 'd93e39c9662522367dc3a73cc3057039')
build() {
- cd ${srcdir}/${pkgname}-${pkgver}
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
sed -i 's|ncursesw/curses.h|curses.h|' RichString.h RichString.c configure
sed -i 's|python|python2|' scripts/MakeHeader.py
- patch -Np0 -i $srcdir/htop.c.patch
- ./configure --prefix=/usr --enable-unicode --enable-openvz \
- --enable-vserver
+
+ patch -Np0 -i "${srcdir}/fix-sort-key-bug.patch"
+ patch -p1 -i "${srcdir}/fix-segfault-small-terminal.patch"
+
+ ./configure --prefix=/usr \
+ --enable-unicode \
+ --enable-openvz \
+ --enable-vserver \
+ --enable-cgroup
make
}
package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make DESTDIR=${pkgdir} install
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
}
diff --git a/extra/htop/fix-segfault-small-terminal.patch b/extra/htop/fix-segfault-small-terminal.patch
new file mode 100644
index 000000000..c55146492
--- /dev/null
+++ b/extra/htop/fix-segfault-small-terminal.patch
@@ -0,0 +1,24 @@
+--- trunk/Meter.c 2011/08/26 20:52:35 229
++++ trunk/Meter.c 2011/08/26 20:55:09 230
+@@ -264,13 +264,19 @@
+
+ w--;
+ x++;
+- char bar[w];
++
++ if (w < 1) {
++ attrset(CRT_colors[RESET_COLOR]);
++ return;
++ }
++ char bar[w + 1];
+
+ int blockSizes[10];
+ for (int i = 0; i < w; i++)
+ bar[i] = ' ';
+
+- sprintf(bar + (w-strlen(buffer)), "%s", buffer);
++ const size_t barOffset = w - MIN(strlen(buffer), w);
++ snprintf(bar + barOffset, w - barOffset + 1, "%s", buffer);
+
+ // First draw in the bar[] buffer...
+ double total = 0.0;
diff --git a/extra/htop/fix-sort-key-bug.patch b/extra/htop/fix-sort-key-bug.patch
new file mode 100644
index 000000000..41a2dd377
--- /dev/null
+++ b/extra/htop/fix-sort-key-bug.patch
@@ -0,0 +1,15 @@
+From: Roman Kosenko <madkite@gmail.com>
+Date: Thu, 10 Mar 2011 16:23:53 +0200
+Subject: [PATCH] Fix stupid bug with --sort-key
+
+--- htop.c.old 2010-11-24 20:45:38.000000000 +0200
++++ htop.c 2011-03-10 16:32:18.473716667 +0200
+@@ -282,7 +282,7 @@
+ printVersionFlag();
+ break;
+ case 's':
+- if (strcmp(optarg, "help")) {
++ if (!strcmp(optarg, "help")) {
+ for (int j = 1; j < LAST_PROCESSFIELD; j++)
+ printf ("%s\n", Process_fieldNames[j]);
+ exit(0);