summaryrefslogtreecommitdiff
path: root/extra/htop
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-12-13 02:32:08 -0800
committerroot <root@rshg054.dnsready.net>2012-12-13 02:32:08 -0800
commit1517345ab70f42a5e050f3dc9b498038118f9ff1 (patch)
tree7d253e05f7ccad9016d9c0dee8b2671e5b73045b /extra/htop
parentef947957a5734ba25be3cdb6595491c816592133 (diff)
Thu Dec 13 02:27:45 PST 2012
Diffstat (limited to 'extra/htop')
-rw-r--r--extra/htop/PKGBUILD14
-rw-r--r--extra/htop/tree-crash.patch13
2 files changed, 23 insertions, 4 deletions
diff --git a/extra/htop/PKGBUILD b/extra/htop/PKGBUILD
index 93b4db608..509980f30 100644
--- a/extra/htop/PKGBUILD
+++ b/extra/htop/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 170397 2012-11-07 01:25:17Z dreisner $
+# $Id: PKGBUILD 173197 2012-12-12 17:29:21Z heftig $
# Maintainer: Angel Velasquez <angvp@archlinux.org>
# Contributor: Eric Belanger <eric@archlinux.org>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=htop
pkgver=1.0.2
-pkgrel=1
+pkgrel=2
pkgdesc="Interactive process viewer"
arch=('i686' 'x86_64')
url="http://htop.sourceforge.net/"
@@ -15,8 +15,10 @@ makedepends=('python2')
optdepends=('lsof: show files opened by a process'
'strace: attach to a running process')
options=('!emptydirs')
-source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz")
-md5sums=('0d01cca8df3349c74569cefebbd9919e')
+source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
+ tree-crash.patch)
+md5sums=('0d01cca8df3349c74569cefebbd9919e'
+ '48eba3c0303bfd19d761b859bc69d713')
build() {
cd "$pkgname-$pkgver"
@@ -24,6 +26,10 @@ build() {
sed -i 's|ncursesw/curses.h|curses.h|' RichString.[ch] configure
sed -i 's|python|python2|' scripts/MakeHeader.py
+ # Boost field buffer size - crashes when trying to draw very deep UTF-8 trees
+ # Test by nesting 30 shells
+ patch -N -i ../tree-crash.patch
+
./configure \
--prefix=/usr \
--enable-unicode \
diff --git a/extra/htop/tree-crash.patch b/extra/htop/tree-crash.patch
new file mode 100644
index 000000000..b949e262d
--- /dev/null
+++ b/extra/htop/tree-crash.patch
@@ -0,0 +1,13 @@
+Index: Process.c
+===================================================================
+--- Process.c (revision 302)
++++ Process.c (working copy)
+@@ -371,7 +371,7 @@
+ }
+
+ static void Process_writeField(Process* this, RichString* str, ProcessField field) {
+- char buffer[128]; buffer[127] = '\0';
++ char buffer[256]; buffer[255] = '\0';
+ int attr = CRT_colors[DEFAULT_COLOR];
+ int baseattr = CRT_colors[PROCESS_BASENAME];
+ int n = sizeof(buffer) - 1;