diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-04-14 03:52:55 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-04-14 03:52:55 +0000 |
commit | 7c266ff5a9e1f533fd8bd8c2fbbcc05df350dcd3 (patch) | |
tree | a65448ff1236d65a3fea9015e7cd01e6483eb282 /community/lxtask | |
parent | 3d6877ee9ee7bba813a4b6be30a11d2b1942c656 (diff) |
Mon Apr 14 03:47:31 UTC 2014
Diffstat (limited to 'community/lxtask')
-rw-r--r-- | community/lxtask/PKGBUILD | 27 | ||||
-rw-r--r-- | community/lxtask/fix-cpu-count.patch | 18 | ||||
-rw-r--r-- | community/lxtask/fix-integer-overflow.patch | 39 | ||||
-rw-r--r-- | community/lxtask/fix-sort-by-user.patch | 19 |
4 files changed, 97 insertions, 6 deletions
diff --git a/community/lxtask/PKGBUILD b/community/lxtask/PKGBUILD index c1c6bf5e4..6ba068535 100644 --- a/community/lxtask/PKGBUILD +++ b/community/lxtask/PKGBUILD @@ -1,26 +1,41 @@ -# $Id: PKGBUILD 104479 2014-01-21 17:24:15Z bpiotrowski $ -# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org> +# $Id: PKGBUILD 109303 2014-04-13 01:12:59Z bgyorgy $ +# Maintainer: Balló György <ballogyor+arch at gmail dot com> +# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org> # Contributor: Angel Velasquez <angvp@archlinux.org> # Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr> pkgname=lxtask pkgver=0.1.4 -pkgrel=4 +pkgrel=5 pkgdesc='Task manager of the LXDE Desktop' arch=('i686' 'x86_64') license=('GPL2') url='http://lxde.org/' groups=('lxde') depends=('gtk2') -makedepends=('pkgconfig' 'intltool') -source=(http://downloads.sourceforge.net/sourceforge/lxde/$pkgname-$pkgver.tar.gz) -md5sums=('c4ab47d03d41a88696d64d3f1e78cf7f') +makedepends=('intltool') +source=(http://downloads.sourceforge.net/lxde/$pkgname-$pkgver.tar.gz + fix-integer-overflow.patch + fix-sort-by-user.patch + fix-cpu-count.patch) +md5sums=('c4ab47d03d41a88696d64d3f1e78cf7f' + '0d4d325bd20dc7dcf2489bf78f18efb5' + 'ecb4b04fac25c7533b8760696b742330' + 'd18064be20c653274e31a73426e06abb') + +prepare() { + cd $pkgname-$pkgver + patch -Np1 -i ../fix-integer-overflow.patch + patch -Np1 -i ../fix-sort-by-user.patch + patch -Np1 -i ../fix-cpu-count.patch +} build() { cd $pkgname-$pkgver ./configure --sysconfdir=/etc --prefix=/usr make } + package() { cd $pkgname-$pkgver make DESTDIR="$pkgdir" install diff --git a/community/lxtask/fix-cpu-count.patch b/community/lxtask/fix-cpu-count.patch new file mode 100644 index 000000000..a0104289a --- /dev/null +++ b/community/lxtask/fix-cpu-count.patch @@ -0,0 +1,18 @@ +commit 963dea395cc58eae940b85e242f0d84fb7d2eaa5 +Author: dgod <dgod.osa@gmail.com> +Date: Mon Apr 22 19:08:58 2013 +0800 + + Patch that resolves -1% CPU for processes on armhf + +diff --git a/src/xfce-taskmanager-linux.c b/src/xfce-taskmanager-linux.c +index 116fec1..1267dfc 100644 +--- a/src/xfce-taskmanager-linux.c ++++ b/src/xfce-taskmanager-linux.c +@@ -267,6 +267,7 @@ gboolean get_system_status (system_status *sys_stat) + } + } + fclose (file); ++ if(!cpu_count) cpu_count++; /* cpu_count should be at least 1 */ + } + sys_stat->cpu_count=cpu_count; + return TRUE; diff --git a/community/lxtask/fix-integer-overflow.patch b/community/lxtask/fix-integer-overflow.patch new file mode 100644 index 000000000..aac7b22c6 --- /dev/null +++ b/community/lxtask/fix-integer-overflow.patch @@ -0,0 +1,39 @@ +commit 2dbcf129cd830bc3b50a2e040f862026eb1d9ab7 +Author: dgod <dgod.osa@gmail.com> +Date: Sun Feb 12 17:32:14 2012 +0800 + + fix integer overflow in memory show + + Extended by Arch Linux to fix sort tasks by memory. + +diff --git a/src/interface.c b/src/interface.c +index 52c6727..62e89ff 100644 +--- a/src/interface.c ++++ b/src/interface.c +@@ -430,10 +430,10 @@ void fill_list_item(gint i, GtkTreeIter *iter) + gtk_tree_store_set(GTK_TREE_STORE(list_store), iter, COLUMN_STATE, task->state, -1); + + /* size */ +- gtk_tree_store_set(GTK_TREE_STORE(list_store), iter, COLUMN_MEM, size_to_string(buf, task->size * 1024), -1); ++ gtk_tree_store_set(GTK_TREE_STORE(list_store), iter, COLUMN_MEM, size_to_string(buf, ((guint64)task->size)*1024), -1); + + /* rss */ +- gtk_tree_store_set(GTK_TREE_STORE(list_store), iter, COLUMN_RSS, size_to_string(buf, task->rss*1024), -1); ++ gtk_tree_store_set(GTK_TREE_STORE(list_store), iter, COLUMN_RSS, size_to_string(buf, ((guint64)task->rss)*1024), -1); + + gtk_tree_store_set(GTK_TREE_STORE(list_store), iter, COLUMN_UNAME, task->uname, -1); + sprintf(buf,"%0d%%", (guint)task->time_percentage); +@@ -545,10 +545,10 @@ gint compare_size_list_item(GtkTreeModel *model, GtkTreeIter *iter1, GtkTreeIter + gtk_tree_model_get(model, iter1, column, &s1, -1); + gtk_tree_model_get(model, iter2, column, &s2, -1); + +- gint64 i1 = string_to_size(s1); +- gint64 i2 = string_to_size(s2); ++ guint64 i1 = string_to_size(s1); ++ guint64 i2 = string_to_size(s2); + +- ret = i2 - i1; ++ ret = (i2 > i1) - (i2 < i1); + + g_free(s1); + g_free(s2); diff --git a/community/lxtask/fix-sort-by-user.patch b/community/lxtask/fix-sort-by-user.patch new file mode 100644 index 000000000..0c049554e --- /dev/null +++ b/community/lxtask/fix-sort-by-user.patch @@ -0,0 +1,19 @@ +commit 02fb78fb4f1e46b5176f45e2c221da6e52e9d014 +Author: dgod <dgod.osa@gmail.com> +Date: Wed Oct 31 20:31:48 2012 +0800 + + fix sort tasks by clicking the User Name + +diff --git a/src/interface.c b/src/interface.c +index 45cf256..1f98351 100644 +--- a/src/interface.c ++++ b/src/interface.c +@@ -195,7 +195,7 @@ void create_list_store(void) + column = gtk_tree_view_column_new_with_attributes(_("User"), cell_renderer, "text", COLUMN_UNAME, NULL); + gtk_tree_view_column_set_resizable(column, TRUE); + gtk_tree_view_column_set_sort_column_id(column, COLUMN_UNAME); +- gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(list_store), COLUMN_UNAME, compare_int_list_item, (void *)COLUMN_UNAME, NULL); ++ gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(list_store), COLUMN_UNAME, compare_string_list_item, (void *)COLUMN_UNAME, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), column); + + cell_renderer = gtk_cell_renderer_text_new(); |