summaryrefslogtreecommitdiff
path: root/community/parcellite
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2013-12-27 23:55:53 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2013-12-27 23:55:53 +0000
commit65eeff79fff8a1bfdf67ca51d147384f46f4d5c0 (patch)
treefbfdff322b28d9a3c37e6e31c94caf1d8e48dac1 /community/parcellite
parentd53c44f055929b18d7d1b25f8367ee5836c435fc (diff)
Fri Dec 27 23:54:04 UTC 2013
Diffstat (limited to 'community/parcellite')
-rw-r--r--community/parcellite/PKGBUILD17
-rw-r--r--community/parcellite/fix-crash.patch11
-rw-r--r--community/parcellite/history_menu_crash_patch39
3 files changed, 23 insertions, 44 deletions
diff --git a/community/parcellite/PKGBUILD b/community/parcellite/PKGBUILD
index 5b26e980c..ab156dbab 100644
--- a/community/parcellite/PKGBUILD
+++ b/community/parcellite/PKGBUILD
@@ -1,18 +1,25 @@
-# $Id: PKGBUILD 99050 2013-10-23 12:05:36Z spupykin $
+# $Id: PKGBUILD 100807 2013-11-11 10:58:12Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Alexander Fehr <pizzapunk gmail com>
pkgname=parcellite
-pkgver=1.1.6
-pkgrel=1
+pkgver=1.1.7
+pkgrel=2
pkgdesc="Lightweight GTK+ clipboard manager"
arch=('i686' 'x86_64')
url="http://parcellite.sourceforge.net/"
license=('GPL3')
depends=('gtk2')
makedepends=('intltool')
-source=(http://downloads.sourceforge.net/parcellite/parcellite-$pkgver.tar.gz)
-md5sums=('4b0a89aeb885a2f7d2ace3e4ea7e153e')
+source=(http://downloads.sourceforge.net/parcellite/parcellite-$pkgver.tar.gz
+ fix-crash.patch)
+md5sums=('a542aab0df50ac7a7de6501957e78fb3'
+ 'f2cc1986e573d49c92ea3d81efd5d574')
+
+prepare() {
+ cd "$srcdir/parcellite-$pkgver"
+ patch -Np1 <$srcdir/fix-crash.patch
+}
build() {
cd "$srcdir/parcellite-$pkgver"
diff --git a/community/parcellite/fix-crash.patch b/community/parcellite/fix-crash.patch
new file mode 100644
index 000000000..a8ce712e1
--- /dev/null
+++ b/community/parcellite/fix-crash.patch
@@ -0,0 +1,11 @@
+--- a/src/preferences.c.orig 2013-11-11 14:39:32.000000000 +0400
++++ b/src/preferences.c 2013-11-11 14:40:03.970776522 +0400
+@@ -381,7 +381,7 @@
+ }
+ /**now go through and make sure we have no duplicates */
+ for (i=0;NULL != keylist[i].name; ++i){
+- if(0 != keylist[i].keyval[0]){
++ if(NULL != keylist[i].keyval && 0 != keylist[i].keyval[0]){
+ /**see if it exists elsewhere */
+ for (l=0;NULL != keylist[l].name; ++l){
+ if(l!=i && 0 != keylist[l].keyval[0]){
diff --git a/community/parcellite/history_menu_crash_patch b/community/parcellite/history_menu_crash_patch
deleted file mode 100644
index 961106839..000000000
--- a/community/parcellite/history_menu_crash_patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Index: main.c
-===================================================================
---- main.c (revision 232)
-+++ main.c (working copy)
-@@ -1199,24 +1199,28 @@
- {
- GString* string = g_string_new((gchar*)element->data);
- /* Ellipsize text */
-- if (string->len > prefs.item_length)
-+ glong len = g_utf8_strlen(string->str, string->len);
-+ if (len > prefs.item_length)
- {
- switch (prefs.ellipsize)
- {
- case PANGO_ELLIPSIZE_START:
-- string = g_string_erase(string, 0, string->len-(prefs.item_length));
-+ string = g_string_erase(string, 0, g_utf8_offset_to_pointer(string->str, len - prefs.item_length) - string->str);
- string = g_string_prepend(string, "...");
- break;
- case PANGO_ELLIPSIZE_MIDDLE:
-- string = g_string_erase(string, (prefs.item_length/2), string->len-(prefs.item_length));
-- string = g_string_insert(string, (string->len/2), "...");
-+ ; /* to avoid wierd gcc error */
-+ gchar* p1 = g_utf8_offset_to_pointer(string->str, prefs.item_length / 2);
-+ gchar* p2 = g_utf8_offset_to_pointer(string->str, len - prefs.item_length / 2);
-+ string = g_string_erase(string, p1 - string->str, p2 - p1);
-+ string = g_string_insert(string, p1 - string->str, "...");
- break;
- case PANGO_ELLIPSIZE_END:
-- string = g_string_truncate(string, prefs.item_length);
-+ string = g_string_truncate(string, g_utf8_offset_to_pointer(string->str, prefs.item_length) - string->str);
- string = g_string_append(string, "...");
- break;
- }
-- }
-+ }
- /* Remove control characters */
- gsize i = 0;
- while (i < string->len)