[arch-commits] Commit in tint2/repos (16 files)
Alexander Rødseth
arodseth at archlinux.org
Sun Aug 2 14:58:43 UTC 2015
Date: Sunday, August 2, 2015 @ 16:58:42
Author: arodseth
Revision: 137707
archrelease: copy trunk to community-x86_64, community-i686
Added:
tint2/repos/community-i686/PKGBUILD
(from rev 137706, tint2/trunk/PKGBUILD)
tint2/repos/community-i686/zombie-fix.patch
(from rev 137706, tint2/trunk/zombie-fix.patch)
tint2/repos/community-x86_64/PKGBUILD
(from rev 137706, tint2/trunk/PKGBUILD)
tint2/repos/community-x86_64/zombie-fix.patch
(from rev 137706, tint2/trunk/zombie-fix.patch)
Deleted:
tint2/repos/community-i686/PKGBUILD
tint2/repos/community-i686/add-power-now-support.patch
tint2/repos/community-i686/clock.patch
tint2/repos/community-i686/launcher_apps_dir-v2.patch
tint2/repos/community-i686/src-task-align.patch
tint2/repos/community-i686/zombie-fix.patch
tint2/repos/community-x86_64/PKGBUILD
tint2/repos/community-x86_64/add-power-now-support.patch
tint2/repos/community-x86_64/clock.patch
tint2/repos/community-x86_64/launcher_apps_dir-v2.patch
tint2/repos/community-x86_64/src-task-align.patch
tint2/repos/community-x86_64/zombie-fix.patch
----------------------------------------------+
/PKGBUILD | 104 ++++++++++++++++++++++
/zombie-fix.patch | 66 ++++++++++++++
community-i686/PKGBUILD | 64 -------------
community-i686/add-power-now-support.patch | 19 ----
community-i686/clock.patch | 78 ----------------
community-i686/launcher_apps_dir-v2.patch | 100 ---------------------
community-i686/src-task-align.patch | 115 -------------------------
community-i686/zombie-fix.patch | 33 -------
community-x86_64/PKGBUILD | 64 -------------
community-x86_64/add-power-now-support.patch | 19 ----
community-x86_64/clock.patch | 78 ----------------
community-x86_64/launcher_apps_dir-v2.patch | 100 ---------------------
community-x86_64/src-task-align.patch | 115 -------------------------
community-x86_64/zombie-fix.patch | 33 -------
14 files changed, 170 insertions(+), 818 deletions(-)
Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD 2015-08-02 14:58:24 UTC (rev 137706)
+++ community-i686/PKGBUILD 2015-08-02 14:58:42 UTC (rev 137707)
@@ -1,64 +0,0 @@
-# $Id$
-# Maintainer: Alexander Rødseth <rodseth at gmail.com>
-# Contributor: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
-# Contributor: Blue Peppers <bluepeppers at archlinux.us>
-# Contributor: Stefan Husmann< stefan-husmann at t-online.de>
-
-pkgname=tint2
-pkgver=0.11
-pkgrel=8
-pkgdesc='Basic, good-looking task manager for WMs'
-arch=('x86_64' 'i686')
-url='http://code.google.com/p/tint2/'
-license=('GPL2')
-conflicts=('ttm-svn' 'tint')
-replaces=('tint')
-depends=('gtk2' 'imlib2')
-optdepends=('pygtk: for tint2wizard' 'python2')
-makedepends=('pygtk' 'cmake' 'python2')
-provides=('tint')
-source=("http://tint2.googlecode.com/files/tint2-$pkgver.tar.bz2"
- 'add-power-now-support.patch'
- 'clock.patch'
- 'launcher_apps_dir-v2.patch'
- 'src-task-align.patch'
- 'zombie-fix.patch')
-md5sums=('6fc5731e7425125fa84a2add5cef4bff'
- '448beead6c9d44b864f99e08a027cb56'
- 'bc0bab2979dacff551a97bdf2c2fdedc'
- '13218765dd684ae825967d3ffb4f4a75'
- 'f0d7f51ec8dbf2e7b6bcca942f0fd6c0'
- 'cdb83cd911e005a3529e5d1cd952a956')
-
-prepare() {
- cd "$pkgname-$pkgver"
-
- # Applying all patches, even some that only applies partially.
- # Tint2 works fine with these, but a new release from upstream would be nice.
- for f in ../*.patch; do
- echo -e "--- ${f##*/} ---\n"
- patch -Np1 -i $f && echo "${f##*/} OK!" || echo "${f##*/} FAILED!"
- echo
- done
-
- # 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"
-
- mkdir -p build
- cd build
- cmake .. \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DENABLE_TINT2CONF=1
- make
-}
-
-package() {
- make -C "$pkgname-$pkgver/build" DESTDIR="$pkgdir" install
-}
-
-# vim:set ts=2 sw=2 et:
Copied: tint2/repos/community-i686/PKGBUILD (from rev 137706, tint2/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD (rev 0)
+++ community-i686/PKGBUILD 2015-08-02 14:58:42 UTC (rev 137707)
@@ -0,0 +1,52 @@
+# $Id$
+# Maintainer: Alexander Rødseth <rodseth at gmail.com>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
+# Contributor: Blue Peppers <bluepeppers at archlinux.us>
+# Contributor: Stefan Husmann< stefan-husmann at t-online.de>
+
+pkgname=tint2
+pkgver=0.12.1
+pkgrel=1
+pkgdesc='Basic, good-looking task manager for WMs'
+arch=('x86_64' 'i686')
+url='https://gitlab.com/o9000/tint2'
+license=('GPL2')
+conflicts=('ttm-svn')
+depends=('gtk2' 'imlib2' 'startup-notification')
+optdepends=('pygtk: for tint2wizard' 'python2')
+makedepends=('pygtk' 'cmake' 'python2' 'startup-notification' 'git')
+source=("$pkgname-$pkgver.tgz::https://gitlab.com/o9000/tint2/repository/archive.tar.gz?ref=$pkgver"
+ 'zombie-fix.patch')
+md5sums=('f34335906d5eb3bf86ac6a162dc88513'
+ 'cdb83cd911e005a3529e5d1cd952a956')
+
+prepare() {
+ cd "$pkgname.git"
+
+ # Applying all available patches
+ for f in ../*.patch; do
+ echo -e "--- ${f##*/} ---"
+ patch -Np1 -i $f && echo "${f##*/} OK!" || echo "${f##*/} FAILED!"
+ done
+
+ # Fix for Python 2
+ sed -i 's_python _python2 _' src/tint2conf/main.c
+}
+
+build() {
+ cd "$pkgname.git"
+
+ msg2 'Compiling...'
+ mkdir -p build
+ cd build
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DENABLE_TINT2CONF=1
+ make
+}
+
+package() {
+ make -C "$pkgname.git/build" DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
Deleted: community-i686/add-power-now-support.patch
===================================================================
--- community-i686/add-power-now-support.patch 2015-08-02 14:58:24 UTC (rev 137706)
+++ community-i686/add-power-now-support.patch 2015-08-02 14:58:42 UTC (rev 137707)
@@ -1,19 +0,0 @@
-diff -rup trunk/src/battery/battery.c ./src/battery/battery.c
---- trunk/src/battery/battery.c 2010-12-02 23:56:11.313403140 +0100
-+++ trunk/src/battery/battery.c 2010-12-02 23:57:22.266956142 +0100
-@@ -184,8 +184,14 @@ void init_battery()
- }
- g_free(path2);
- }
-- if (path_energy_now && path_energy_full) {
-+
-+ path_current_now = g_build_filename(battery_dir, "power_now", NULL);
-+ if (!g_file_test (path_current_now, G_FILE_TEST_EXISTS)) {
-+ g_free(path_current_now);
- path_current_now = g_build_filename(battery_dir, "current_now", NULL);
-+ }
-+
-+ if (path_energy_now && path_energy_full) {
- path_status = g_build_filename(battery_dir, "status", NULL);
-
- // check file
Deleted: community-i686/clock.patch
===================================================================
--- community-i686/clock.patch 2015-08-02 14:58:24 UTC (rev 137706)
+++ community-i686/clock.patch 2015-08-02 14:58:42 UTC (rev 137707)
@@ -1,78 +0,0 @@
-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: trunk/src/clock/clock.c
-===================================================================
---- trunk/src/clock/clock.c (revision 652)
-+++ trunk/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: trunk/src/clock/clock.h
-===================================================================
---- trunk/src/clock/clock.h (revision 652)
-+++ trunk/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: trunk/src/config.c
-===================================================================
---- trunk/src/config.c (revision 652)
-+++ trunk/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);
-
-
Deleted: community-i686/launcher_apps_dir-v2.patch
===================================================================
--- community-i686/launcher_apps_dir-v2.patch 2015-08-02 14:58:24 UTC (rev 137706)
+++ community-i686/launcher_apps_dir-v2.patch 2015-08-02 14:58:42 UTC (rev 137707)
@@ -1,100 +0,0 @@
-Index: trunk/src/config.c
-===================================================================
---- trunk/src/config.c (revision 646)
-+++ trunk/src/config.c (working copy)
-@@ -583,6 +583,18 @@
- char *app = strdup(value);
- panel_config.launcher.list_apps = g_slist_append(panel_config.launcher.list_apps, app);
- }
-+ else if (strcmp(key, "launcher_apps_dir") == 0) {
-+
-+ GList *list = dir_scan_alpha(value, "*.desktop");
-+
-+ for (list = g_list_first(list); list; list = g_list_next(list)) {
-+ fprintf(stderr, "Add launcher app: %s\n", (const char *)list->data);
-+ panel_config.launcher.list_apps = g_slist_append(panel_config.launcher.list_apps, (char *)strdup((const char *)list->data));
-+ }
-+
-+ // Cleanup
-+ g_list_free_full(list, g_free);
-+ }
- else if (strcmp(key, "launcher_icon_theme") == 0) {
- // if XSETTINGS manager running, tint2 use it.
- if (!icon_theme_name)
-Index: trunk/src/util/common.c
-===================================================================
---- trunk/src/util/common.c (revision 646)
-+++ trunk/src/util/common.c (working copy)
-@@ -22,10 +22,13 @@
- #include <X11/Xutil.h>
- #include <X11/Xatom.h>
- #include <X11/extensions/Xrender.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
-+#include <fnmatch.h>
-
- #include "common.h"
- #include "../server.h"
-@@ -342,3 +345,46 @@
- XRenderFreePicture(server.dsp, pict_image);
- XRenderFreePicture(server.dsp, pict_drawable);
- }
-+
-+/**
-+ * @brief
-+ * Scan given directory for files which are meet the given mask and sort them alphabetically
-+ *
-+ * @param path - directory path
-+ * @param mask - filename mask
-+ *
-+ * @return files list
-+ */
-+GList *dir_scan_alpha(const char *path, const char *mask)
-+{
-+ GError *err = NULL;
-+ GList *list = NULL;
-+ const char *n;
-+ gchar *fn;
-+ struct stat st;
-+
-+ GDir *dir = g_dir_open(path, 0, &err);
-+
-+ if (!dir) {
-+ fprintf(stderr, "%s\n", err->message);
-+ g_error_free(err);
-+ } else {
-+ // Enumerate files
-+ while ((n = g_dir_read_name(dir))) {
-+ if (!fnmatch(mask, n, FNM_PATHNAME)) {
-+ fn = g_build_filename(path, n, NULL);
-+
-+ if (stat((char *)fn, &st) < 0)
-+ continue;
-+
-+ // Only regular files
-+ if (S_ISREG(st.st_mode))
-+ list = g_list_prepend(list, (gpointer)fn);
-+ }
-+ }
-+
-+ list = g_list_sort (list, (GCompareFunc) &strcmp);
-+ }
-+
-+ return list;
-+}
-Index: trunk/src/util/common.h
-===================================================================
---- trunk/src/util/common.h (revision 646)
-+++ trunk/src/util/common.h (working copy)
-@@ -57,5 +57,7 @@
- void createHeuristicMask(DATA32* data, int w, int h);
-
- void render_image(Drawable d, int x, int y, int w, int h);
-+
-+GList *dir_scan_alpha(const char *path, const char *mask);
- #endif
-
Deleted: community-i686/src-task-align.patch
===================================================================
--- community-i686/src-task-align.patch 2015-08-02 14:58:24 UTC (rev 137706)
+++ community-i686/src-task-align.patch 2015-08-02 14:58:42 UTC (rev 137707)
@@ -1,115 +0,0 @@
-Index: trunk/src/panel.h
-===================================================================
---- trunk/src/panel.h (revision 639)
-+++ trunk/src/panel.h (working copy)
-@@ -61,6 +61,9 @@
- extern int panel_strut_policy;
- extern char *panel_items_order;
-
-+// tasks alignment
-+enum { ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT };
-+
- extern int max_tick_urgent;
-
- extern GArray* backgrounds;
-Index: src/config.c
-===================================================================
---- trunk/src/config.c (revision 639)
-+++ trunk/src/config.c (working copy)
-@@ -484,6 +484,14 @@
- if (value2) panel_config.g_task.area.paddingy = atoi (value2);
- if (value3) panel_config.g_task.area.paddingx = atoi (value3);
- }
-+ else if (strcmp (key, "task_align") == 0) {
-+ extract_values(value, &value1, &value2, &value3);
-+ printf("task_align: %s\n", value1);
-+ if (strcmp (value1, "left") == 0) panel_config.g_task.align = ALIGN_LEFT;
-+ else if (strcmp (value1, "center") == 0) panel_config.g_task.align = ALIGN_CENTER;
-+ else if (strcmp (value1, "right") == 0) panel_config.g_task.align = ALIGN_RIGHT;
-+ else fprintf(stderr, "Unknown value for task_align: %s\n", value1);
-+ }
- else if (strcmp (key, "task_font") == 0) {
- panel_config.g_task.font_desc = pango_font_description_from_string (value);
- }
-Index: trunk/src/taskbar/task.h
-===================================================================
---- trunk/src/taskbar/task.h (revision 639)
-+++ trunk/src/taskbar/task.h (working copy)
-@@ -26,6 +26,7 @@
- int text;
- int icon;
- int centered;
-+ int align;
-
- int icon_posy;
- int icon_size1;
-Index: trunk/src/util/area.c
-===================================================================
---- trunk/src/util/area.c (revision 639)
-+++ trunk/src/util/area.c (working copy)
-@@ -130,6 +130,54 @@
- }
-
-
-+// calculate total size of all children including
-+// parent's padding
-+int children_size(Area *a, int horizontal)
-+{
-+ int size = 0;
-+ GSList *l;
-+
-+ for (l = a->list; l; l = l->next) {
-+ Area *child = ((Area*)l->data);
-+ if (!child->on_screen) continue;
-+
-+ if (horizontal)
-+ size += child->width + a->paddingx;
-+ else
-+ size += child->height + a->paddingy;
-+ }
-+
-+ return size;
-+}
-+
-+
-+// calculate chilren's align offset depending on the align type
-+int align_offset(Area *a, int align, int horizontal)
-+{
-+ int size = 0;
-+ int child_size = children_size(a, horizontal);
-+
-+ if (horizontal)
-+ size = a->width;
-+ else
-+ size = a->height;
-+
-+ switch (align) {
-+ case ALIGN_LEFT:
-+ return 0;
-+
-+ case ALIGN_CENTER:
-+ return (size - child_size) / 2;
-+
-+ case ALIGN_RIGHT:
-+ return size - child_size;
-+
-+ default:
-+ return 0;
-+ }
-+}
-+
-+
- void size_by_layout (Area *a, int pos, int level)
- {
- // don't resize hiden objects
-@@ -179,7 +227,9 @@
- int k;
- for (k=0 ; k < level ; k++) printf(" ");
- printf("tree level %d, object %d, pos %d, %s\n", level, i, pos, (child->size_mode == SIZE_BY_LAYOUT) ? "SIZE_BY_LAYOUT" : "SIZE_BY_CONTENT");*/
-- size_by_layout(child, pos, level+1);
-+
-+ int offset = align_offset(child, panel_config.g_task.align, panel_horizontal);
-+ size_by_layout(child, pos + offset, level + 1);
-
- if (panel_horizontal)
- pos += child->width + a->paddingx;
Deleted: community-i686/zombie-fix.patch
===================================================================
--- community-i686/zombie-fix.patch 2015-08-02 14:58:24 UTC (rev 137706)
+++ community-i686/zombie-fix.patch 2015-08-02 14:58:42 UTC (rev 137707)
@@ -1,33 +0,0 @@
-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.
-
---- trunk/src/clock/clock.c (revision 652)
-+++ trunk/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;
-
Copied: tint2/repos/community-i686/zombie-fix.patch (from rev 137706, tint2/trunk/zombie-fix.patch)
===================================================================
--- community-i686/zombie-fix.patch (rev 0)
+++ community-i686/zombie-fix.patch 2015-08-02 14:58:42 UTC (rev 137707)
@@ -0,0 +1,33 @@
+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.
+
+--- trunk/src/clock/clock.c (revision 652)
++++ trunk/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;
+
Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD 2015-08-02 14:58:24 UTC (rev 137706)
+++ community-x86_64/PKGBUILD 2015-08-02 14:58:42 UTC (rev 137707)
@@ -1,64 +0,0 @@
-# $Id$
-# Maintainer: Alexander Rødseth <rodseth at gmail.com>
-# Contributor: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
-# Contributor: Blue Peppers <bluepeppers at archlinux.us>
-# Contributor: Stefan Husmann< stefan-husmann at t-online.de>
-
-pkgname=tint2
-pkgver=0.11
-pkgrel=8
-pkgdesc='Basic, good-looking task manager for WMs'
-arch=('x86_64' 'i686')
-url='http://code.google.com/p/tint2/'
-license=('GPL2')
-conflicts=('ttm-svn' 'tint')
-replaces=('tint')
-depends=('gtk2' 'imlib2')
-optdepends=('pygtk: for tint2wizard' 'python2')
-makedepends=('pygtk' 'cmake' 'python2')
-provides=('tint')
-source=("http://tint2.googlecode.com/files/tint2-$pkgver.tar.bz2"
- 'add-power-now-support.patch'
- 'clock.patch'
- 'launcher_apps_dir-v2.patch'
- 'src-task-align.patch'
- 'zombie-fix.patch')
-md5sums=('6fc5731e7425125fa84a2add5cef4bff'
- '448beead6c9d44b864f99e08a027cb56'
- 'bc0bab2979dacff551a97bdf2c2fdedc'
- '13218765dd684ae825967d3ffb4f4a75'
- 'f0d7f51ec8dbf2e7b6bcca942f0fd6c0'
- 'cdb83cd911e005a3529e5d1cd952a956')
-
-prepare() {
- cd "$pkgname-$pkgver"
-
- # Applying all patches, even some that only applies partially.
- # Tint2 works fine with these, but a new release from upstream would be nice.
- for f in ../*.patch; do
- echo -e "--- ${f##*/} ---\n"
- patch -Np1 -i $f && echo "${f##*/} OK!" || echo "${f##*/} FAILED!"
- echo
- done
-
- # 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"
-
- mkdir -p build
- cd build
- cmake .. \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DENABLE_TINT2CONF=1
- make
-}
-
-package() {
- make -C "$pkgname-$pkgver/build" DESTDIR="$pkgdir" install
-}
-
-# vim:set ts=2 sw=2 et:
Copied: tint2/repos/community-x86_64/PKGBUILD (from rev 137706, tint2/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2015-08-02 14:58:42 UTC (rev 137707)
@@ -0,0 +1,52 @@
+# $Id$
+# Maintainer: Alexander Rødseth <rodseth at gmail.com>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
+# Contributor: Blue Peppers <bluepeppers at archlinux.us>
+# Contributor: Stefan Husmann< stefan-husmann at t-online.de>
+
+pkgname=tint2
+pkgver=0.12.1
+pkgrel=1
+pkgdesc='Basic, good-looking task manager for WMs'
+arch=('x86_64' 'i686')
+url='https://gitlab.com/o9000/tint2'
+license=('GPL2')
+conflicts=('ttm-svn')
+depends=('gtk2' 'imlib2' 'startup-notification')
+optdepends=('pygtk: for tint2wizard' 'python2')
+makedepends=('pygtk' 'cmake' 'python2' 'startup-notification' 'git')
+source=("$pkgname-$pkgver.tgz::https://gitlab.com/o9000/tint2/repository/archive.tar.gz?ref=$pkgver"
+ 'zombie-fix.patch')
+md5sums=('f34335906d5eb3bf86ac6a162dc88513'
+ 'cdb83cd911e005a3529e5d1cd952a956')
+
+prepare() {
+ cd "$pkgname.git"
+
+ # Applying all available patches
+ for f in ../*.patch; do
+ echo -e "--- ${f##*/} ---"
+ patch -Np1 -i $f && echo "${f##*/} OK!" || echo "${f##*/} FAILED!"
+ done
+
+ # Fix for Python 2
+ sed -i 's_python _python2 _' src/tint2conf/main.c
+}
+
+build() {
+ cd "$pkgname.git"
+
+ msg2 'Compiling...'
+ mkdir -p build
+ cd build
+ cmake .. \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DENABLE_TINT2CONF=1
+ make
+}
+
+package() {
+ make -C "$pkgname.git/build" DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
Deleted: community-x86_64/add-power-now-support.patch
===================================================================
--- community-x86_64/add-power-now-support.patch 2015-08-02 14:58:24 UTC (rev 137706)
+++ community-x86_64/add-power-now-support.patch 2015-08-02 14:58:42 UTC (rev 137707)
@@ -1,19 +0,0 @@
-diff -rup trunk/src/battery/battery.c ./src/battery/battery.c
---- trunk/src/battery/battery.c 2010-12-02 23:56:11.313403140 +0100
-+++ trunk/src/battery/battery.c 2010-12-02 23:57:22.266956142 +0100
-@@ -184,8 +184,14 @@ void init_battery()
- }
- g_free(path2);
- }
-- if (path_energy_now && path_energy_full) {
-+
-+ path_current_now = g_build_filename(battery_dir, "power_now", NULL);
-+ if (!g_file_test (path_current_now, G_FILE_TEST_EXISTS)) {
-+ g_free(path_current_now);
- path_current_now = g_build_filename(battery_dir, "current_now", NULL);
-+ }
-+
-+ if (path_energy_now && path_energy_full) {
- path_status = g_build_filename(battery_dir, "status", NULL);
-
- // check file
Deleted: community-x86_64/clock.patch
===================================================================
--- community-x86_64/clock.patch 2015-08-02 14:58:24 UTC (rev 137706)
+++ community-x86_64/clock.patch 2015-08-02 14:58:42 UTC (rev 137707)
@@ -1,78 +0,0 @@
-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: trunk/src/clock/clock.c
-===================================================================
---- trunk/src/clock/clock.c (revision 652)
-+++ trunk/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: trunk/src/clock/clock.h
-===================================================================
---- trunk/src/clock/clock.h (revision 652)
-+++ trunk/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: trunk/src/config.c
-===================================================================
---- trunk/src/config.c (revision 652)
-+++ trunk/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);
-
-
Deleted: community-x86_64/launcher_apps_dir-v2.patch
===================================================================
--- community-x86_64/launcher_apps_dir-v2.patch 2015-08-02 14:58:24 UTC (rev 137706)
+++ community-x86_64/launcher_apps_dir-v2.patch 2015-08-02 14:58:42 UTC (rev 137707)
@@ -1,100 +0,0 @@
-Index: trunk/src/config.c
-===================================================================
---- trunk/src/config.c (revision 646)
-+++ trunk/src/config.c (working copy)
-@@ -583,6 +583,18 @@
- char *app = strdup(value);
- panel_config.launcher.list_apps = g_slist_append(panel_config.launcher.list_apps, app);
- }
-+ else if (strcmp(key, "launcher_apps_dir") == 0) {
-+
-+ GList *list = dir_scan_alpha(value, "*.desktop");
-+
-+ for (list = g_list_first(list); list; list = g_list_next(list)) {
-+ fprintf(stderr, "Add launcher app: %s\n", (const char *)list->data);
-+ panel_config.launcher.list_apps = g_slist_append(panel_config.launcher.list_apps, (char *)strdup((const char *)list->data));
-+ }
-+
-+ // Cleanup
-+ g_list_free_full(list, g_free);
-+ }
- else if (strcmp(key, "launcher_icon_theme") == 0) {
- // if XSETTINGS manager running, tint2 use it.
- if (!icon_theme_name)
-Index: trunk/src/util/common.c
-===================================================================
---- trunk/src/util/common.c (revision 646)
-+++ trunk/src/util/common.c (working copy)
-@@ -22,10 +22,13 @@
- #include <X11/Xutil.h>
- #include <X11/Xatom.h>
- #include <X11/extensions/Xrender.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <unistd.h>
-+#include <fnmatch.h>
-
- #include "common.h"
- #include "../server.h"
-@@ -342,3 +345,46 @@
- XRenderFreePicture(server.dsp, pict_image);
- XRenderFreePicture(server.dsp, pict_drawable);
- }
-+
-+/**
-+ * @brief
-+ * Scan given directory for files which are meet the given mask and sort them alphabetically
-+ *
-+ * @param path - directory path
-+ * @param mask - filename mask
-+ *
-+ * @return files list
-+ */
-+GList *dir_scan_alpha(const char *path, const char *mask)
-+{
-+ GError *err = NULL;
-+ GList *list = NULL;
-+ const char *n;
-+ gchar *fn;
-+ struct stat st;
-+
-+ GDir *dir = g_dir_open(path, 0, &err);
-+
-+ if (!dir) {
-+ fprintf(stderr, "%s\n", err->message);
-+ g_error_free(err);
-+ } else {
-+ // Enumerate files
-+ while ((n = g_dir_read_name(dir))) {
-+ if (!fnmatch(mask, n, FNM_PATHNAME)) {
-+ fn = g_build_filename(path, n, NULL);
-+
-+ if (stat((char *)fn, &st) < 0)
-+ continue;
-+
-+ // Only regular files
-+ if (S_ISREG(st.st_mode))
-+ list = g_list_prepend(list, (gpointer)fn);
-+ }
-+ }
-+
-+ list = g_list_sort (list, (GCompareFunc) &strcmp);
-+ }
-+
-+ return list;
-+}
-Index: trunk/src/util/common.h
-===================================================================
---- trunk/src/util/common.h (revision 646)
-+++ trunk/src/util/common.h (working copy)
-@@ -57,5 +57,7 @@
- void createHeuristicMask(DATA32* data, int w, int h);
-
- void render_image(Drawable d, int x, int y, int w, int h);
-+
-+GList *dir_scan_alpha(const char *path, const char *mask);
- #endif
-
Deleted: community-x86_64/src-task-align.patch
===================================================================
--- community-x86_64/src-task-align.patch 2015-08-02 14:58:24 UTC (rev 137706)
+++ community-x86_64/src-task-align.patch 2015-08-02 14:58:42 UTC (rev 137707)
@@ -1,115 +0,0 @@
-Index: trunk/src/panel.h
-===================================================================
---- trunk/src/panel.h (revision 639)
-+++ trunk/src/panel.h (working copy)
-@@ -61,6 +61,9 @@
- extern int panel_strut_policy;
- extern char *panel_items_order;
-
-+// tasks alignment
-+enum { ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT };
-+
- extern int max_tick_urgent;
-
- extern GArray* backgrounds;
-Index: src/config.c
-===================================================================
---- trunk/src/config.c (revision 639)
-+++ trunk/src/config.c (working copy)
-@@ -484,6 +484,14 @@
- if (value2) panel_config.g_task.area.paddingy = atoi (value2);
- if (value3) panel_config.g_task.area.paddingx = atoi (value3);
- }
-+ else if (strcmp (key, "task_align") == 0) {
-+ extract_values(value, &value1, &value2, &value3);
-+ printf("task_align: %s\n", value1);
-+ if (strcmp (value1, "left") == 0) panel_config.g_task.align = ALIGN_LEFT;
-+ else if (strcmp (value1, "center") == 0) panel_config.g_task.align = ALIGN_CENTER;
-+ else if (strcmp (value1, "right") == 0) panel_config.g_task.align = ALIGN_RIGHT;
-+ else fprintf(stderr, "Unknown value for task_align: %s\n", value1);
-+ }
- else if (strcmp (key, "task_font") == 0) {
- panel_config.g_task.font_desc = pango_font_description_from_string (value);
- }
-Index: trunk/src/taskbar/task.h
-===================================================================
---- trunk/src/taskbar/task.h (revision 639)
-+++ trunk/src/taskbar/task.h (working copy)
-@@ -26,6 +26,7 @@
- int text;
- int icon;
- int centered;
-+ int align;
-
- int icon_posy;
- int icon_size1;
-Index: trunk/src/util/area.c
-===================================================================
---- trunk/src/util/area.c (revision 639)
-+++ trunk/src/util/area.c (working copy)
-@@ -130,6 +130,54 @@
- }
-
-
-+// calculate total size of all children including
-+// parent's padding
-+int children_size(Area *a, int horizontal)
-+{
-+ int size = 0;
-+ GSList *l;
-+
-+ for (l = a->list; l; l = l->next) {
-+ Area *child = ((Area*)l->data);
-+ if (!child->on_screen) continue;
-+
-+ if (horizontal)
-+ size += child->width + a->paddingx;
-+ else
-+ size += child->height + a->paddingy;
-+ }
-+
-+ return size;
-+}
-+
-+
-+// calculate chilren's align offset depending on the align type
-+int align_offset(Area *a, int align, int horizontal)
-+{
-+ int size = 0;
-+ int child_size = children_size(a, horizontal);
-+
-+ if (horizontal)
-+ size = a->width;
-+ else
-+ size = a->height;
-+
-+ switch (align) {
-+ case ALIGN_LEFT:
-+ return 0;
-+
-+ case ALIGN_CENTER:
-+ return (size - child_size) / 2;
-+
-+ case ALIGN_RIGHT:
-+ return size - child_size;
-+
-+ default:
-+ return 0;
-+ }
-+}
-+
-+
- void size_by_layout (Area *a, int pos, int level)
- {
- // don't resize hiden objects
-@@ -179,7 +227,9 @@
- int k;
- for (k=0 ; k < level ; k++) printf(" ");
- printf("tree level %d, object %d, pos %d, %s\n", level, i, pos, (child->size_mode == SIZE_BY_LAYOUT) ? "SIZE_BY_LAYOUT" : "SIZE_BY_CONTENT");*/
-- size_by_layout(child, pos, level+1);
-+
-+ int offset = align_offset(child, panel_config.g_task.align, panel_horizontal);
-+ size_by_layout(child, pos + offset, level + 1);
-
- if (panel_horizontal)
- pos += child->width + a->paddingx;
Deleted: community-x86_64/zombie-fix.patch
===================================================================
--- community-x86_64/zombie-fix.patch 2015-08-02 14:58:24 UTC (rev 137706)
+++ community-x86_64/zombie-fix.patch 2015-08-02 14:58:42 UTC (rev 137707)
@@ -1,33 +0,0 @@
-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.
-
---- trunk/src/clock/clock.c (revision 652)
-+++ trunk/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;
-
Copied: tint2/repos/community-x86_64/zombie-fix.patch (from rev 137706, tint2/trunk/zombie-fix.patch)
===================================================================
--- community-x86_64/zombie-fix.patch (rev 0)
+++ community-x86_64/zombie-fix.patch 2015-08-02 14:58:42 UTC (rev 137707)
@@ -0,0 +1,33 @@
+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.
+
+--- trunk/src/clock/clock.c (revision 652)
++++ trunk/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;
+
More information about the arch-commits
mailing list