From 13b976708710e5f68a2c7d50cae231d6d0cd45b3 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Tue, 7 Aug 2012 14:01:42 -0500
Subject: tilda .9.6

---
 abs/core/tilda/PKGBUILD                 |  48 +++++++++++++++++++----------
 abs/core/tilda/config_0                 |  53 --------------------------------
 abs/core/tilda/tilda-0.9.6.tar.gz       | Bin 307517 -> 0 bytes
 abs/core/tilda/tilda-conf-sigsegv.patch |  11 +++++++
 abs/core/tilda/tilda-fix.patch          |  24 +++++++++++++++
 abs/core/tilda/tilda-glib2.patch        |  11 +++++++
 abs/core/tilda/tilda.changelog          |  20 ++++++++++++
 abs/core/tilda/tilda.install            |  44 --------------------------
 8 files changed, 98 insertions(+), 113 deletions(-)
 delete mode 100644 abs/core/tilda/config_0
 delete mode 100644 abs/core/tilda/tilda-0.9.6.tar.gz
 create mode 100644 abs/core/tilda/tilda-conf-sigsegv.patch
 create mode 100644 abs/core/tilda/tilda-fix.patch
 create mode 100644 abs/core/tilda/tilda-glib2.patch
 create mode 100644 abs/core/tilda/tilda.changelog
 delete mode 100644 abs/core/tilda/tilda.install

diff --git a/abs/core/tilda/PKGBUILD b/abs/core/tilda/PKGBUILD
index f8422bc..19ba559 100644
--- a/abs/core/tilda/PKGBUILD
+++ b/abs/core/tilda/PKGBUILD
@@ -1,26 +1,42 @@
-# Maintainer: William Rea <sillywilly@gmail.com>
+# $Id: PKGBUILD 71879 2012-06-02 18:37:37Z jlichtblau $
+# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+# Contributor: Douglas Soares de Andrade <dsa@aur.archlinux.org>
+# Contributor: William Rea <sillywilly@gmail.com>
+
 pkgname=tilda
 pkgver=0.9.6
-pkgrel=2
-pkgdesc="Linux terminal based on classic terminals from first person shooter games."
+pkgrel=6
+pkgdesc="Linux terminal based on classic terminals from first person shooter games"
+arch=('i686' 'x86_64')
 url="http://tilda.sourceforge.net"
-license="GPL"
-depends=('vte' 'confuse' 'libglade' 'gtk2')
+license=('GPL')
+depends=('vte' 'confuse' 'libglade')
 makedepends=('gawk')
-source=('tilda-0.9.6.tar.gz' 'config_0')
-arch=('i686')
+source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
+        tilda-fix.patch tilda-glib2.patch tilda-conf-sigsegv.patch)
+sha256sums=('b3bd0f63eb83a5001ef26056ca116e5f8005d454f8f82a94f334868862068411'
+            'ceac38bb33a0e8141f7b6cbc55807c999729319f2fdfaa3c375aa1a541d29729'
+            'c71cdd8cdc1fdd76c919605c6b7a1b89e4929d20630db17145e6c2b584c8aaf9'
+            'e28c731c0ca94210d5e4f4b7dd0eee9952405593f1d06e4ab2d87ee299e3e533')
+
 build() {
+  cd $srcdir/$pkgname-$pkgver
+
+# gdk && desktop file fix FS#25762
+  patch -p0 -i ${srcdir}/$pkgname-fix.patch
+
+# glib2 fix
+  patch -p0 -i ${srcdir}/$pkgname-glib2.patch
+
+# fix segfaults on malformed config files FS#29754
+  patch -p0 -i ${srcdir}/$pkgname-conf-sigsegv.patch
 
-  cd $startdir/src/tilda-$pkgver/src
-#  patch -p0 < $startdir/src/tilda.patch
-  cd $startdir/src/tilda-$pkgver
   ./configure --prefix=/usr
-  make || return 1
-  make DESTDIR=$startdir/pkg install
+  make
+}
 
-  mkdir -p $startdir/pkg/etc
-  cp $startdir/src/config_0 $startdir/pkg/etc/tilda_config
+package() {
+  cd $srcdir/$pkgname-$pkgver
 
+  make DESTDIR=${pkgdir} install
 }
-md5sums=('b44ebe04fdfd312e9ddc5e0ed77f4289'
-         '754753190e0990cd6fba27b3c931bd0e')
diff --git a/abs/core/tilda/config_0 b/abs/core/tilda/config_0
deleted file mode 100644
index 198afd3..0000000
--- a/abs/core/tilda/config_0
+++ /dev/null
@@ -1,53 +0,0 @@
-tilda_config_version = "0.9.6"
-# image = ""
-# command = ""
-font = "Monospace 15"
-key = "F3"
-title = "Tilda"
-background_color = "white"
-# working_dir = ""
-web_browser = "firefox"
-lines = 7000
-max_width = 1612
-max_height = 532
-min_width = 1
-min_height = 1
-transparency = 0
-x_pos = 1114
-y_pos = 0
-tab_pos = 1
-backspace_key = 0
-delete_key = 1
-d_set_title = 3
-command_exit = 2
-scheme = 3
-slide_sleep_usec = 14607
-animation_orientation = 0
-scrollbar_pos = 2
-back_red = 0
-back_green = 0
-back_blue = 0
-text_red = 65535
-text_green = 65535
-text_blue = 65535
-scroll_background = true
-scroll_on_output = false
-notebook_border = true
-antialias = true
-scrollbar = false
-use_image = false
-grab_focus = true
-above = true
-notaskbar = true
-bold = true
-blinks = true
-scroll_on_key = true
-bell = false
-run_command = false
-pinned = true
-animation = false
-hidden = true
-centered_horizontally = true
-centered_vertically = false
-enable_transparency = false
-double_buffer = false
diff --git a/abs/core/tilda/tilda-0.9.6.tar.gz b/abs/core/tilda/tilda-0.9.6.tar.gz
deleted file mode 100644
index cb5531c..0000000
Binary files a/abs/core/tilda/tilda-0.9.6.tar.gz and /dev/null differ
diff --git a/abs/core/tilda/tilda-conf-sigsegv.patch b/abs/core/tilda/tilda-conf-sigsegv.patch
new file mode 100644
index 0000000..a48aad0
--- /dev/null
+++ b/abs/core/tilda/tilda-conf-sigsegv.patch
@@ -0,0 +1,11 @@
+--- src/key_grabber.c	2008-04-08 00:12:31.000000000 +0200
++++ src/key_grabber.c	2012-05-17 19:43:25.227699421 +0200
+@@ -257,7 +257,7 @@
+ gboolean tilda_keygrabber_bind (const gchar *keystr, tilda_window *tw)
+ {
+     /* Empty strings are no good */
+-    if (strcmp ("", keystr) == 0)
++    if (!keystr || strcmp ("", keystr) == 0)
+         return FALSE;
+ 
+     return tomboy_keybinder_bind (keystr, onKeybindingPull, tw);
diff --git a/abs/core/tilda/tilda-fix.patch b/abs/core/tilda/tilda-fix.patch
new file mode 100644
index 0000000..a6d273c
--- /dev/null
+++ b/abs/core/tilda/tilda-fix.patch
@@ -0,0 +1,24 @@
+--- src/key_grabber.c	2008-04-08 01:12:31.000000000 +0300
++++ src/key_grabber.c	2009-10-16 17:39:16.399679408 +0300
+@@ -190,7 +190,7 @@
+          * Overriding the user time here seems to work a lot better than calling
+          * gtk_window_present_with_time() here, or at the end of the function. I have
+          * no idea why, they should do the same thing. */
+-        gdk_x11_window_set_user_time (GTK_WIDGET(tw->window)->window,
++        gdk_x11_window_set_user_time (GTK_WIDGET(tw->window),
+                                       tomboy_keybinder_get_current_event_time());
+         gtk_window_move (GTK_WINDOW(tw->window), config_getint ("x_pos"), config_getint ("y_pos"));
+         gtk_widget_show (GTK_WIDGET(tw->window));
+
+--- tilda.desktop.in	2007-03-16 04:53:34.000000000 +0100
++++ tilda.desktop.in	2011-08-28 19:08:53.000000000 +0200
+@@ -2 +1,0 @@
+-Encoding=UTF-8
+@@ -4,2 +3,2 @@
+-Exec=@BINDIR@/tilda
+-Icon=@PIXMAPSDIR@/tilda.png
++Exec=tilda
++Icon=tilda
+@@ -8 +7 @@
+-Categories=GNOME;GTK;Application;Utility;TerminalEmulator;
++Categories=GNOME;GTK;Utility;TerminalEmulator;System;
diff --git a/abs/core/tilda/tilda-glib2.patch b/abs/core/tilda/tilda-glib2.patch
new file mode 100644
index 0000000..2d048e5
--- /dev/null
+++ b/abs/core/tilda/tilda-glib2.patch
@@ -0,0 +1,11 @@
+--- src/tomboykeybinder.h	2007-07-15 04:31:19.000000000 +0200
++++ src/tomboykeybinder.h	2012-05-17 19:42:06.613150329 +0200
+@@ -2,7 +2,7 @@
+ #ifndef __TOMBOY_KEY_BINDER_H__
+ #define __TOMBOY_KEY_BINDER_H__
+ 
+-#include <glib/gtypes.h>
++//#include <glib/gtypes.h>
+ 
+ G_BEGIN_DECLS
+ 
diff --git a/abs/core/tilda/tilda.changelog b/abs/core/tilda/tilda.changelog
new file mode 100644
index 0000000..4248e9a
--- /dev/null
+++ b/abs/core/tilda/tilda.changelog
@@ -0,0 +1,20 @@
+2012-06-02  Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+
+	* FS#29754 fixed
+
+2011-08-28  Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
+
+	* FS#25762 fixed
+
+2008-04-29  Mateusz Herych <heniekk@gmail.com>
+
+	* Updated for x86_64 - 0.9.6
+
+2008-04-28  Douglas Soares de Andrade  <dsa@aur.archlinux.org>
+
+	* Updated for i686 - 0.9.6
+
+2007-12-30  Douglas Soares de Andrade  <dsa@aur.archlinux.org>
+
+	* Updated to newer version - 0.9.5
+
diff --git a/abs/core/tilda/tilda.install b/abs/core/tilda/tilda.install
deleted file mode 100644
index 42bc9eb..0000000
--- a/abs/core/tilda/tilda.install
+++ /dev/null
@@ -1,44 +0,0 @@
-# This is a default template for a post-install scriptlet.  You can
-# remove any functions you don't need (and this header).
-
-# arg 1:  the new package version
-pre_install() {
-  /bin/true
-}
-
-# arg 1:  the new package version
-post_install() {
- MHOME=`cat /etc/passwd | grep "mythtv" | cut -d":" -f6`
- if [ ! -e $MHOME/.keylaunchrc ]
- then
-	echo "setting symlink for keylaunch"
- 	ln -s /etc/keylaunchrc $MHOME/.keylaunchrc
-fi
-}
-
-# arg 1:  the new package version
-# arg 2:  the old package version
-pre_upgrade() {
-  /bin/true
- 
-}
-
-# arg 1:  the new package version
-# arg 2:  the old package version
-post_upgrade() {
-  post_install
-}
-
-# arg 1:  the old package version
-pre_remove() {
-  /bin/true
-}
-
-# arg 1:  the old package version
-post_remove() {
-  /bin/true
-}
-
-op=$1
-shift
-$op $*
-- 
cgit v0.12

