diff options
Diffstat (limited to 'patches')
-rw-r--r-- | patches/10-escaping.patch | 23 | ||||
-rw-r--r-- | patches/100-gmrunrc.patch | 25 | ||||
-rw-r--r-- | patches/20-includes.patch | 15 | ||||
-rw-r--r-- | patches/30-fix-gcc-4.3-build.patch | 27 | ||||
-rw-r--r-- | patches/40-history_string.patch | 28 | ||||
-rw-r--r-- | patches/50-empty-history.patch | 36 | ||||
-rw-r--r-- | patches/60-fix_gtkcompletionline.patch | 56 | ||||
-rw-r--r-- | patches/70-cmdline.patch | 18 | ||||
-rw-r--r-- | patches/80-selectoption.patch | 31 | ||||
-rw-r--r-- | patches/90-window_placement.patch | 50 | ||||
-rw-r--r-- | patches/debian-changes-0.9.2-2.1 | 76 | ||||
-rw-r--r-- | patches/return-type-gtk_completion_line_get_type.patch | 45 | ||||
-rw-r--r-- | patches/series | 12 |
13 files changed, 442 insertions, 0 deletions
diff --git a/patches/10-escaping.patch b/patches/10-escaping.patch new file mode 100644 index 0000000..b4bc208 --- /dev/null +++ b/patches/10-escaping.patch @@ -0,0 +1,23 @@ +# Description: Correct escaping of characters +# Author: Luca Bedogni <me@lucabedogni.it> + +Index: gmrun-0.9.2/src/gtkcompletionline.cc +=================================================================== +--- gmrun-0.9.2.orig/src/gtkcompletionline.cc 2010-02-03 12:30:02.239774762 +0800 ++++ gmrun-0.9.2/src/gtkcompletionline.cc 2010-02-03 12:30:24.983767847 +0800 +@@ -226,12 +226,9 @@ + const char* i = str.c_str(); + while (*i) { + char c = *i++; +- switch (c) { +- case ' ': +- res += '\\'; +- default: +- res += c; +- } ++ if (c == ' ' || c == '(' || c == ')' || c =='\'') ++ res += '\\'; ++ res += c; + } + return res; + } diff --git a/patches/100-gmrunrc.patch b/patches/100-gmrunrc.patch new file mode 100644 index 0000000..3614f42 --- /dev/null +++ b/patches/100-gmrunrc.patch @@ -0,0 +1,25 @@ +# Description: Use x-terminal-emulator and x-www-browser +# Author: Vincent Legout <vincent@legout.info> + +Index: gmrun-0.9.2/config/gmrunrc +=================================================================== +--- gmrun-0.9.2.orig/config/gmrunrc 2010-02-04 22:00:30.944468499 +0800 ++++ gmrun-0.9.2/config/gmrunrc 2010-02-04 22:01:31.508469387 +0800 +@@ -3,7 +3,7 @@ + # GPL v2.0 applies + + # Set terminal +-Terminal = gnome-terminal --start-factory-server --use-factory ++Terminal = x-terminal-emulator + TermExec = ${Terminal} -e + AlwaysInTerm = ssh telnet ftp lynx mc vi vim pine centericq perldoc man + +@@ -30,7 +30,7 @@ + # - %u gets replaced with the whole URL ("http://www.google.com") + # - %s gets replaced with "//www.google.com". This is useful for URL-s + # like "man:printf" --> %s will get replaced with "printf" +-URL_http = mozilla -remote "openURL(%u, new-window)" ++URL_http = x-www-browser '%u' + URL_mailto = mozilla -remote "mailto(%s)" + URL_man = ${TermExec} 'man %s' + URL_info = ${TermExec} 'info %s' diff --git a/patches/20-includes.patch b/patches/20-includes.patch new file mode 100644 index 0000000..c387bcd --- /dev/null +++ b/patches/20-includes.patch @@ -0,0 +1,15 @@ +# Description: include missing headers +# Author: Martin Michlmayr <tbm@cyrius.com> + +Index: gmrun-0.9.2/src/prefs.cc +=================================================================== +--- gmrun-0.9.2.orig/src/prefs.cc 2010-02-03 12:30:57.407768496 +0800 ++++ gmrun-0.9.2/src/prefs.cc 2010-02-03 12:31:04.636318281 +0800 +@@ -10,6 +10,7 @@ + *****************************************************************************/ + + ++#include <cstdlib> + #include <fstream> + #include <iostream> + #include <stdio.h> diff --git a/patches/30-fix-gcc-4.3-build.patch b/patches/30-fix-gcc-4.3-build.patch new file mode 100644 index 0000000..bcdbc8a --- /dev/null +++ b/patches/30-fix-gcc-4.3-build.patch @@ -0,0 +1,27 @@ +# Description: include missing headers +# Author: Cyril Brulebois <cyril.brulebois@enst-bretagne.fr> + +Index: gmrun-0.9.2/src/ci_string.h +=================================================================== +--- gmrun-0.9.2.orig/src/ci_string.h 2010-02-03 12:31:31.323767018 +0800 ++++ gmrun-0.9.2/src/ci_string.h 2010-02-03 12:31:38.822001700 +0800 +@@ -8,6 +8,7 @@ + + #include <string> + #include <ctype.h> ++#include <cstring> + + struct ci_char_traits : public std::char_traits<char> + { +Index: gmrun-0.9.2/src/gtkcompletionline.cc +=================================================================== +--- gmrun-0.9.2.orig/src/gtkcompletionline.cc 2010-02-03 12:31:43.951768512 +0800 ++++ gmrun-0.9.2/src/gtkcompletionline.cc 2010-02-03 12:31:51.199767425 +0800 +@@ -30,6 +30,7 @@ + #include <sstream> + #include <string> + #include <vector> ++#include <cstring> + using namespace std; + + #include "gtkcompletionline.h" diff --git a/patches/40-history_string.patch b/patches/40-history_string.patch new file mode 100644 index 0000000..ecfe1d3 --- /dev/null +++ b/patches/40-history_string.patch @@ -0,0 +1,28 @@ +# Description: Handle more than 256 characters in the history +# Author: <bdefreese@bddebian3.bddebian.com> + +Index: gmrun-0.9.2/src/history.cc +=================================================================== +--- gmrun-0.9.2.orig/src/history.cc 2010-02-03 12:32:18.519767950 +0800 ++++ gmrun-0.9.2/src/history.cc 2010-02-03 12:32:43.586035039 +0800 +@@ -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(); diff --git a/patches/50-empty-history.patch b/patches/50-empty-history.patch new file mode 100644 index 0000000..7f9477f --- /dev/null +++ b/patches/50-empty-history.patch @@ -0,0 +1,36 @@ +# Description: Don't create an empty history file when History=0 +# Author: <bdefreese@bddebian3.bddebian.com> + +Index: gmrun-0.9.2/src/history.cc +=================================================================== +--- gmrun-0.9.2.orig/src/history.cc 2010-02-03 12:33:29.575767540 +0800 ++++ gmrun-0.9.2/src/history.cc 2010-02-03 12:34:47.349422238 +0800 +@@ -65,17 +65,19 @@ + if (!configuration.get_int("History", HIST_MAX_SIZE)) + HIST_MAX_SIZE = 20; + +- ofstream f(filename, ios::out); ++ if (HIST_MAX_SIZE) { ++ ofstream f(filename, ios::out); + +- int start = 0; +- if (history.size() > (size_t)HIST_MAX_SIZE) +- start = history.size() - HIST_MAX_SIZE; ++ int start = 0; ++ if (history.size() > (size_t)HIST_MAX_SIZE) ++ start = history.size() - HIST_MAX_SIZE; ++ ++ for (size_t i = start; i < history.size(); i++) ++ if (history[i].length() != 0) ++ f << history[i] << endl; + +- for (size_t i = start; i < history.size(); i++) +- if (history[i].length() != 0) +- f << history[i] << endl; +- +- f.flush(); ++ f.flush(); ++ } + } + + void diff --git a/patches/60-fix_gtkcompletionline.patch b/patches/60-fix_gtkcompletionline.patch new file mode 100644 index 0000000..7ce7dd3 --- /dev/null +++ b/patches/60-fix_gtkcompletionline.patch @@ -0,0 +1,56 @@ +# Description: Fixes FTBFS +# Author: Rafael Cunha de Almeida <rafael@kontesti.me> + +Index: gmrun-0.9.2/src/gtkcompletionline.cc +=================================================================== +--- gmrun-0.9.2.orig/src/gtkcompletionline.cc 2010-03-07 14:53:19.000000000 +0000 ++++ gmrun-0.9.2/src/gtkcompletionline.cc 2010-03-07 14:53:53.000000000 +0000 +@@ -374,30 +374,6 @@ + return 0; + } + +-int my_alphasort(const void* va, const void* vb) { +- const struct dirent** a = (const struct dirent**)va; +- const struct dirent** b = (const struct dirent**)vb; +- +- const char* s1 = (*a)->d_name; +- const char* s2 = (*b)->d_name; +- +- int l1 = strlen(s1); +- int l2 = strlen(s2); +- int result = strcmp(s1, s2); +- +- if (result == 0) return 0; +- +- if (l1 < l2) { +- int res2 = strncmp(s1, s2, l1); +- if (res2 == 0) return -1; +- } else { +- int res2 = strncmp(s1, s2, l2); +- if (res2 == 0) return 1; +- } +- +- return result; +-} +- + static void + generate_execs() + { +@@ -405,7 +381,7 @@ + + for (StrSet::iterator i = path.begin(); i != path.end(); i++) { + struct dirent **eps; +- int n = scandir(i->c_str(), &eps, select_executables_only, my_alphasort); ++ int n = scandir(i->c_str(), &eps, select_executables_only, alphasort); + if (n >= 0) { + for (int j = 0; j < n; j++) { + execs.insert(eps[j]->d_name); +@@ -505,7 +481,7 @@ + dirlist.clear(); + struct dirent **eps; + prefix = filename; +- n = scandir(dest.c_str(), &eps, select_executables_only, my_alphasort); ++ n = scandir(dest.c_str(), &eps, select_executables_only, alphasort); + if (n >= 0) { + for (int j = 0; j < n; j++) { + { diff --git a/patches/70-cmdline.patch b/patches/70-cmdline.patch new file mode 100644 index 0000000..05bac80 --- /dev/null +++ b/patches/70-cmdline.patch @@ -0,0 +1,18 @@ +# Description: add support for command line argument as initial content +# Author: Fernando Vezzosi <fv@linuxvar.it> + +Index: gmrun-0.9.2/src/main.cc +=================================================================== +--- gmrun-0.9.2.orig/src/main.cc 2010-02-03 12:36:13.483769799 +0800 ++++ gmrun-0.9.2/src/main.cc 2010-02-03 12:37:21.895975382 +0800 +@@ -619,6 +619,10 @@ + gtk_completion_line_last_history_item(GTK_COMPLETION_LINE(compline)); + } + ++ if(argc == 2 && argv[1]){ ++ gtk_entry_set_text(GTK_ENTRY(compline), argv[1]); ++ } ++ + gtk_box_pack_start(GTK_BOX(hbox), compline, TRUE, TRUE, 0); + + int prefs_top = 80; diff --git a/patches/80-selectoption.patch b/patches/80-selectoption.patch new file mode 100644 index 0000000..86da288 --- /dev/null +++ b/patches/80-selectoption.patch @@ -0,0 +1,31 @@ +# Description: add "Selected" config option +# Author: Fernando Vezzosi <fv@linuxvar.it> + +Index: gmrun-0.9.2/src/main.cc +=================================================================== +--- gmrun-0.9.2.orig/src/main.cc 2010-02-03 12:37:52.455767905 +0800 ++++ gmrun-0.9.2/src/main.cc 2010-02-03 12:38:46.801743816 +0800 +@@ -615,6 +615,10 @@ + if (!configuration.get_int("ShowLast", shows_last_history_item)) { + shows_last_history_item = 0; + } ++ int last_history_selected = 0; ++ if (!configuration.get_int("Selected", last_history_selected)) { ++ last_history_selected = 1; ++ } + if (shows_last_history_item) { + gtk_completion_line_last_history_item(GTK_COMPLETION_LINE(compline)); + } +@@ -662,7 +666,11 @@ + + gtk_widget_show(win); + +- gtk_window_set_focus(GTK_WINDOW(win), compline); ++ if(last_history_selected){ ++ gtk_entry_select_region(GTK_ENTRY(compline), 0, strlen(gtk_entry_get_text(GTK_ENTRY(compline)))); ++ }else{ ++ gtk_entry_set_position(GTK_ENTRY(compline), -1); ++ } + + gtk_main(); + } diff --git a/patches/90-window_placement.patch b/patches/90-window_placement.patch new file mode 100644 index 0000000..e83adde --- /dev/null +++ b/patches/90-window_placement.patch @@ -0,0 +1,50 @@ +# Description: Update window placement +# If the user hasn't set any position prefs (Top or Left directives), then +# center the window +# Bug-Debian: http://bugs.debian.org/471319 +# Author: Vincent Legout <vincent@legout.info> + +Index: gmrun-0.9.2/config/gmrunrc +=================================================================== +--- gmrun-0.9.2.orig/config/gmrunrc 2010-02-04 21:55:11.968469321 +0800 ++++ gmrun-0.9.2/config/gmrunrc 2010-02-04 21:55:14.860466459 +0800 +@@ -9,8 +9,6 @@ + + # Set window geometry (except height) + Width = 400 +-Top = 100 +-Left = 200 + + # History size + History = 256 +Index: gmrun-0.9.2/src/main.cc +=================================================================== +--- gmrun-0.9.2.orig/src/main.cc 2010-02-04 21:55:22.104464288 +0800 ++++ gmrun-0.9.2/src/main.cc 2010-02-04 21:56:42.232468582 +0800 +@@ -629,8 +629,8 @@ + + gtk_box_pack_start(GTK_BOX(hbox), compline, TRUE, TRUE, 0); + +- int prefs_top = 80; +- int prefs_left = 100; ++ int prefs_top = -1; ++ int prefs_left = -1; + configuration.get_int("Top", prefs_top); + configuration.get_int("Left", prefs_left); + +@@ -659,10 +659,14 @@ + geo_parsed = gtk_window_parse_geometry (GTK_WINDOW (win), + geoptr); + } +- else ++ else if (prefs_top != -1 && prefs_left != -1) + { + gtk_widget_set_uposition(win, prefs_left, prefs_top); + } ++ else ++ { ++ gtk_window_set_position (GTK_WINDOW (win), GTK_WIN_POS_CENTER); ++ } + + gtk_widget_show(win); + diff --git a/patches/debian-changes-0.9.2-2.1 b/patches/debian-changes-0.9.2-2.1 new file mode 100644 index 0000000..c66d16f --- /dev/null +++ b/patches/debian-changes-0.9.2-2.1 @@ -0,0 +1,76 @@ +Description: Upstream changes introduced in version 0.9.2-2.1 + This patch has been created by dpkg-source during the package build. + Here's the last changelog entry, hopefully it gives details on why + those changes were made: + . + gmrun (0.9.2-2.1) unstable; urgency=low + . + * Non-maintainer upload. + * Use patch from Rafael Cunha de Almeida to build using glibc's alphasort + (Closes: #570348) + . + The person named in the Author field signed this changelog entry. +Author: Christoph Egger <christoph@debian.org> +Bug-Debian: http://bugs.debian.org/570348 + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: <vendor|upstream|other>, <url of original patch> +Bug: <url in upstream bugtracker> +Bug-Debian: http://bugs.debian.org/<bugnumber> +Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber> +Forwarded: <no|not-needed|url proving that it has been forwarded> +Reviewed-By: <name and email of someone who approved the patch> +Last-Update: <YYYY-MM-DD> + +--- gmrun-0.9.2.orig/src/gtkcompletionline.cc ++++ gmrun-0.9.2/src/gtkcompletionline.cc +@@ -374,6 +374,27 @@ select_executables_only(const struct dir + return 0; + } + ++int my_alphasort(const struct dirent** a, const struct dirent** b) { ++ const char* s1 = (*a)->d_name; ++ const char* s2 = (*b)->d_name; ++ ++ int l1 = strlen(s1); ++ int l2 = strlen(s2); ++ int result = strcmp(s1, s2); ++ ++ if (result == 0) return 0; ++ ++ if (l1 < l2) { ++ int res2 = strncmp(s1, s2, l1); ++ if (res2 == 0) return -1; ++ } else { ++ int res2 = strncmp(s1, s2, l2); ++ if (res2 == 0) return 1; ++ } ++ ++ return result; ++} ++ + static void + generate_execs() + { +@@ -381,7 +402,7 @@ generate_execs() + + for (StrSet::iterator i = path.begin(); i != path.end(); i++) { + struct dirent **eps; +- int n = scandir(i->c_str(), &eps, select_executables_only, alphasort); ++ int n = scandir(i->c_str(), &eps, select_executables_only, my_alphasort); + if (n >= 0) { + for (int j = 0; j < n; j++) { + execs.insert(eps[j]->d_name); +@@ -481,7 +502,7 @@ generate_dirlist(const char *what) + dirlist.clear(); + struct dirent **eps; + prefix = filename; +- n = scandir(dest.c_str(), &eps, select_executables_only, alphasort); ++ n = scandir(dest.c_str(), &eps, select_executables_only, my_alphasort); + if (n >= 0) { + for (int j = 0; j < n; j++) { + { diff --git a/patches/return-type-gtk_completion_line_get_type.patch b/patches/return-type-gtk_completion_line_get_type.patch new file mode 100644 index 0000000..9c6f1f2 --- /dev/null +++ b/patches/return-type-gtk_completion_line_get_type.patch @@ -0,0 +1,45 @@ +From: Andreas Henriksson <andreas@fatal.se> +Date: Wed, 8 Mar 2017 23:21:15 +0100 +Subject: fix return type of gtk_completion_line_get_type + +Patch originally downloaded from +https://src.fedoraproject.org/cgit/rpms/gmrun.git/plain/gmrun-0.9.2-f12.patch + +slighly modified (parts dropped, fuzz fixed) to apply on top of debian +package + +Closes: #857065 +--- + src/gtkcompletionline.cc | 4 ++-- + src/gtkcompletionline.h | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/gtkcompletionline.cc b/src/gtkcompletionline.cc +index 90897f7..c247994 100644 +--- a/src/gtkcompletionline.cc ++++ b/src/gtkcompletionline.cc +@@ -77,9 +77,9 @@ static gboolean + 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 = +diff --git a/src/gtkcompletionline.h b/src/gtkcompletionline.h +index 5e14cd7..caed4c7 100644 +--- a/src/gtkcompletionline.h ++++ b/src/gtkcompletionline.h +@@ -76,7 +76,7 @@ extern "C++" { + 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*); diff --git a/patches/series b/patches/series new file mode 100644 index 0000000..2a255f0 --- /dev/null +++ b/patches/series @@ -0,0 +1,12 @@ +10-escaping.patch +20-includes.patch +30-fix-gcc-4.3-build.patch +40-history_string.patch +50-empty-history.patch +60-fix_gtkcompletionline.patch +70-cmdline.patch +80-selectoption.patch +90-window_placement.patch +100-gmrunrc.patch +debian-changes-0.9.2-2.1 +return-type-gtk_completion_line_get_type.patch |