summaryrefslogtreecommitdiff
path: root/community/tint2
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-09-26 03:23:44 -0700
committerroot <root@rshg054.dnsready.net>2013-09-26 03:23:44 -0700
commit5758d40da140a8e3602b08938ab5584a5afb0082 (patch)
treeaaa8636be276d63ddc435c80caef94749ca0e152 /community/tint2
parent839df58b3e0710d90fb09388ab2797d47caa79ec (diff)
Thu Sep 26 03:20:04 PDT 2013
Diffstat (limited to 'community/tint2')
-rw-r--r--community/tint2/PKGBUILD35
-rw-r--r--community/tint2/fix_defunct_processes.patch31
-rw-r--r--community/tint2/middle_click_on_clock.patch75
3 files changed, 127 insertions, 14 deletions
diff --git a/community/tint2/PKGBUILD b/community/tint2/PKGBUILD
index 09bc4aff4..2571b8dee 100644
--- a/community/tint2/PKGBUILD
+++ b/community/tint2/PKGBUILD
@@ -1,43 +1,50 @@
-# $Id: PKGBUILD 64903 2012-02-18 20:04:04Z bpiotrowski $
+# $Id: PKGBUILD 97618 2013-09-25 18:19:34Z bpiotrowski $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Blue Peppers <bluepeppers@archlinux.us>
# Contributor: Stefan Husmann< stefan-husmann@t-online.de>
pkgname=tint2
pkgver=0.11
-pkgrel=5
-pkgdesc="A basic, good-looking task manager for WMs"
+pkgrel=6
+pkgdesc='Basic, good-looking task manager for WMs'
arch=('i686' 'x86_64')
url="http://code.google.com/p/tint2/"
license=('GPL2')
conflicts=('ttm-svn' 'tint')
replaces=('tint')
depends=('gtk2' 'imlib2')
-optdepends=('pygtk: for using tint2conf')
+optdepends=('pygtk: for tint2wizard')
makedepends=('pygtk' 'cmake')
provides=('tint')
-source=("http://$pkgname.googlecode.com/files/$pkgname-${pkgver}.tar.bz2"
- 'add-power-now-support.patch')
+source=(http://tint2.googlecode.com/files/tint2-$pkgver.tar.bz2
+ add-power-now-support.patch
+ fix_defunct_processes.patch
+ middle_click_on_clock.patch)
md5sums=('6fc5731e7425125fa84a2add5cef4bff'
- '6cfcad028f1bd2f69812167f5395f890')
+ '6cfcad028f1bd2f69812167f5395f890'
+ 'b3d052ac5ada81c56e36133b1ecdee8c'
+ 'f7918d29a87422aab6fb9d922867d8f8')
-build() {
- cd "$srcdir/$pkgname-${pkgver}"
+prepare() {
+ cd $pkgname-$pkgver
- # add support for power_now battery attribute (fixes FS#21954)
patch -Np0 -i ../add-power-now-support.patch
+ patch -Np0 -i ../fix_defunct_processes.patch
+ patch -Np0 -i ../middle_click_on_clock.patch
# python2 fix
sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' src/tint2conf/tintwizard.py
sed -i 's_python _python2 _' src/tint2conf/main.c
+}
+
+build() {
+ cd $pkgname-$pkgver
- [ -d build ] || mkdir build
- cd build
- cmake -DCMAKE_INSTALL_PREFIX=/usr ../
+ cmake -DCMAKE_INSTALL_PREFIX=/usr .
make
}
package() {
- cd "$srcdir/$pkgname-${pkgver}/build"
+ cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
}
diff --git a/community/tint2/fix_defunct_processes.patch b/community/tint2/fix_defunct_processes.patch
new file mode 100644
index 000000000..28ea6c27a
--- /dev/null
+++ b/community/tint2/fix_defunct_processes.patch
@@ -0,0 +1,31 @@
+http://code.google.com/p/tint2/issues/detail?id=430
+Submitted By: David B. Cortarello (Nomius) <dcortarello at gmail dot com>
+Date: 18-05-2013
+Initial Package Version: subversion trunk (revision 652)
+Description: Fix zombie (defunct) processes created in clock_action.
+This patch provides the following bugfixes:
+ * This patch uses waitpid with WNOHANG to eliminate all zombie processes created by tint2 (in particular by the clock -right or left- click). This is done by a small hack in the update_clocks_min, called to "redraw" that area.
+
+--- src/clock/clock.c (revision 652)
++++ src/clock/clock.c (working copy)
+@@ -23,6 +23,8 @@
+ #include <cairo-xlib.h>
+ #include <pango/pangocairo.h>
+ #include <stdlib.h>
++#include <sys/types.h>
++#include <sys/wait.h>
+
+ #include "window.h"
+ #include "server.h"
+@@ -98,6 +103,10 @@
+ // remember old_sec because after suspend/hibernate the clock should be updated directly, and not
+ // on next minute change
+ time_t old_sec = time_clock.tv_sec;
++
++ // Little hack to wait executed commands in clock_action avoiding zombies
++ waitpid(-1, NULL, WNOHANG);
++
+ gettimeofday(&time_clock, 0);
+ if (time_clock.tv_sec % 60 == 0 || time_clock.tv_sec - old_sec > 60) {
+ int i;
+
diff --git a/community/tint2/middle_click_on_clock.patch b/community/tint2/middle_click_on_clock.patch
new file mode 100644
index 000000000..800c15c44
--- /dev/null
+++ b/community/tint2/middle_click_on_clock.patch
@@ -0,0 +1,75 @@
+http://code.google.com/p/tint2/issues/detail?id=430
+Submitted By: David B. Cortarello (Nomius) <dcortarello at gmail dot com>
+Date: 18-05-2013
+Initial Package Version: subversion trunk (revision 652)
+Description: Implemented middle click mouse button in the clock to execute tasks.
+* Implemented middle click mouse button over the clock by accepting the button 2 in the clock_action.
+* A new configuration parameter was created called clock_mclick_command, which works in the same way
+* clock_lclick_command and clock_rclick_command does.
+
+Index: src/clock/clock.c
+===================================================================
+--- src/clock/clock.c (revision 652)
++++ src/clock/clock.c (working copy)
+@@ -39,6 +41,7 @@
+ char *time_tooltip_format;
+ char *time_tooltip_timezone;
+ char *clock_lclick_command;
++char *clock_mclick_command;
+ char *clock_rclick_command;
+ struct timeval time_clock;
+ PangoFontDescription *time1_font_desc;
+@@ -61,6 +64,7 @@
+ time_tooltip_format = 0;
+ time_tooltip_timezone = 0;
+ clock_lclick_command = 0;
++ clock_mclick_command = 0;
+ clock_rclick_command = 0;
+ time1_font_desc = 0;
+ time2_font_desc = 0;
+@@ -77,6 +81,7 @@
+ if (time2_timezone) g_free(time2_timezone);
+ if (time_tooltip_timezone) g_free(time_tooltip_timezone);
+ if (clock_lclick_command) g_free(clock_lclick_command);
++ if (clock_mclick_command) g_free(clock_mclick_command);
+ if (clock_rclick_command) g_free(clock_rclick_command);
+ if (clock_timeout) stop_timeout(clock_timeout);
+ }
+@@ -254,6 +263,9 @@
+ case 1:
+ command = clock_lclick_command;
+ break;
++ case 2:
++ command = clock_mclick_command;
++ break;
+ case 3:
+ command = clock_rclick_command;
+ break;
+Index: src/clock/clock.h
+===================================================================
+--- src/clock/clock.h (revision 652)
++++ src/clock/clock.h (working copy)
+@@ -33,6 +33,7 @@
+ extern PangoFontDescription *time1_font_desc;
+ extern PangoFontDescription *time2_font_desc;
+ extern char *clock_lclick_command;
++extern char *clock_mclick_command;
+ extern char *clock_rclick_command;
+ extern int clock_enabled;
+
+Index: src/config.c
+===================================================================
+--- src/config.c (revision 652)
++++ src/config.c (working copy)
+@@ -396,6 +396,10 @@
+ if (strlen(value) > 0)
+ clock_lclick_command = strdup(value);
+ }
++ else if (strcmp(key, "clock_mclick_command") == 0) {
++ if (strlen(value) > 0)
++ clock_mclick_command = strdup(value);
++ }
+ else if (strcmp(key, "clock_rclick_command") == 0) {
+ if (strlen(value) > 0)
+ clock_rclick_command = strdup(value);
+