Date: Monday, January 29, 2018 @ 12:49:39 Author: bgyorgy Revision: 287767
upgpkg: gmrun 0.9.2-7 Fix build, fix hang on long string in history (FS#43721) Added: gmrun/trunk/history_string.patch gmrun/trunk/return-type-gtk_completion_line_get_type.patch Modified: gmrun/trunk/PKGBUILD ------------------------------------------------+ PKGBUILD | 19 +++++++++++--- history_string.patch | 26 +++++++++++++++++++ return-type-gtk_completion_line_get_type.patch | 31 +++++++++++++++++++++++ 3 files changed, 72 insertions(+), 4 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-01-29 12:06:10 UTC (rev 287766) +++ PKGBUILD 2018-01-29 12:49:39 UTC (rev 287767) @@ -4,7 +4,7 @@ pkgname=gmrun pkgver=0.9.2 -pkgrel=6 +pkgrel=7 pkgdesc="A simple program which provides a run program window" arch=('x86_64') url="http://sf.net/projects/gmrun" @@ -11,14 +11,25 @@ license=('GPL') depends=('gtk2' 'popt') source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz - gcc43.patch) + gcc43.patch + return-type-gtk_completion_line_get_type.patch + history_string.patch) md5sums=('6cef37a968006d9496fc56a7099c603c' - '3a0b69d8c2cac6cfb551b9d235441ecb') + '3a0b69d8c2cac6cfb551b9d235441ecb' + '0b467e3cdb14ca9f93176d3193659af7' + 'f33450f3fae35ed6111aec8417c4d3d6') +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + + patch -p0 -i "$srcdir/gcc43.patch" + patch -p1 -i "$srcdir/return-type-gtk_completion_line_get_type.patch" + patch -p1 -i "$srcdir/history_string.patch" +} + build() { cd "${srcdir}/${pkgname}-${pkgver}" - patch -p0 -i "$srcdir/gcc43.patch" ./configure --prefix=/usr make } Added: history_string.patch =================================================================== --- history_string.patch (rev 0) +++ history_string.patch 2018-01-29 12:49:39 UTC (rev 287767) @@ -0,0 +1,26 @@ +Description: Handle more than 256 characters in the history +Author: <bdefre...@bddebian3.bddebian.com> + +--- a/src/history.cc ++++ b/src/history.cc +@@ -41,15 +41,14 @@ + ifstream f(filename); + if (!f) return; + ++ string line_text; ++ + while (!f.eof()) { +- char line_text[256]; + string line_str; + +- f.getline(line_text, sizeof(line_text)); +- if (*line_text) { +- line_str = line_text; +- history.push_back(line_str); +- } ++ getline(f,line_text); ++ line_str = line_text; ++ history.push_back(line_str); + } + + m_file_entries = history.size(); Added: return-type-gtk_completion_line_get_type.patch =================================================================== --- return-type-gtk_completion_line_get_type.patch (rev 0) +++ return-type-gtk_completion_line_get_type.patch 2018-01-29 12:49:39 UTC (rev 287767) @@ -0,0 +1,31 @@ +Description: fix return type of gtk_completion_line_get_type + Patch from fedora was slightly modified (parts dropped, fuzz fixed) to apply on + top of Debian package by Andreas Henriksson <andr...@fatal.se> +Origin: https://src.fedoraproject.org/cgit/rpms/gmrun.git/plain/gmrun-0.9.2-f12.patch +Bug-Debian: https://bugs.debian.org/857065 + +--- a/src/gtkcompletionline.cc ++++ b/src/gtkcompletionline.cc +@@ -77,9 +77,9 @@ + on_key_press(GtkCompletionLine *cl, GdkEventKey *event, gpointer data); + + /* get_type */ +-guint gtk_completion_line_get_type(void) ++GtkType gtk_completion_line_get_type(void) + { +- static guint type = 0; ++ static GtkType type = 0; + if (type == 0) + { + GtkTypeInfo type_info = +--- a/src/gtkcompletionline.h ++++ b/src/gtkcompletionline.h +@@ -76,7 +76,7 @@ + void (* cancel)(GtkCompletionLine *cl); + }; + +- guint gtk_completion_line_get_type(void); ++ GtkType gtk_completion_line_get_type(void); + GtkWidget *gtk_completion_line_new(); + + void gtk_completion_line_last_history_item(GtkCompletionLine*);