summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Bidulock2015-06-10 04:22:25 -0600
committerBrian Bidulock2015-06-10 04:22:25 -0600
commit969be4cc3501b769f3aeb7f5ba1f0b70c8da1d21 (patch)
tree2c178e3e9ec50f5d1fe515e00de6c299a3f87056
downloadaur-969be4cc3501b769f3aeb7f5ba1f0b70c8da1d21.tar.gz
initial version
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD35
-rw-r--r--gcc43.patch51
-rw-r--r--gmrun-0.9.2-xdg.patch58
4 files changed, 165 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..45386b5c78b4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = gmrun-xdg
+ pkgdesc = A simple program which provides a run program window (XDG aware)
+ pkgver = 0.9.2
+ pkgrel = 4
+ url = http://sf.net/projects/gmrun
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = gtk2
+ depends = popt
+ conflicts = gmrun
+ replaces = gmrun
+ source = http://downloads.sourceforge.net/gmrun/gmrun-0.9.2.tar.gz
+ source = gcc43.patch
+ source = gmrun-0.9.2-xdg.patch
+ md5sums = 6cef37a968006d9496fc56a7099c603c
+ md5sums = 3a0b69d8c2cac6cfb551b9d235441ecb
+ md5sums = ffe92ec406269b94dd4d23e41488c04d
+
+pkgname = gmrun-xdg
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..874d1e0ce751
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Contributor: Jeff Mickey <j@codemac.net>
+# Contributor: Woody Gilk aka Shadowhand <woody.gilk@gmail.com>
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+# Contributor: Richard Gill <richard@houbathecat.fr>
+
+pkgname=gmrun-xdg
+pkgver=0.9.2
+pkgrel=4
+pkgdesc="A simple program which provides a run program window (XDG aware)"
+arch=('i686' 'x86_64')
+url="http://sf.net/projects/gmrun"
+license=('GPL')
+conflicts='gmrun'
+replaces='gmrun'
+depends=('gtk2' 'popt')
+source=(http://downloads.sourceforge.net/gmrun/gmrun-$pkgver.tar.gz
+ gcc43.patch gmrun-$pkgver-xdg.patch)
+md5sums=('6cef37a968006d9496fc56a7099c603c'
+ '3a0b69d8c2cac6cfb551b9d235441ecb'
+ 'ffe92ec406269b94dd4d23e41488c04d')
+
+build() {
+ cd "${srcdir}/gmrun-${pkgver}"
+
+ patch -p0 -i "$srcdir/gcc43.patch"
+ patch -Np1 -i "$srcdir/gmrun-$pkgver-xdg.patch"
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/gmrun-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/gcc43.patch b/gcc43.patch
new file mode 100644
index 000000000000..6f79591f69d2
--- /dev/null
+++ b/gcc43.patch
@@ -0,0 +1,51 @@
+--- src/gtkcompletionline.cc.orig 2003-11-16 11:55:07.000000000 +0100
++++ src/gtkcompletionline.cc 2008-05-08 08:51:22.000000000 +0200
+@@ -29,6 +29,7 @@
+ #include <set>
+ #include <sstream>
+ #include <string>
++#include <cstring>
+ #include <vector>
+ using namespace std;
+
+--- src/ci_string.h.orig 2001-05-16 16:39:31.000000000 +0200
++++ src/ci_string.h 2008-05-08 08:51:33.000000000 +0200
+@@ -7,6 +7,7 @@
+ #define __CI_STRING_H__
+
+ #include <string>
++#include <cstring>
+ #include <ctype.h>
+
+ struct ci_char_traits : public std::char_traits<char>
+--- src/prefs.cc.orig 2002-08-16 12:48:22.000000000 +0200
++++ src/prefs.cc 2008-05-08 08:51:54.000000000 +0200
+@@ -13,6 +13,7 @@
+ #include <fstream>
+ #include <iostream>
+ #include <stdio.h>
++#include <stdlib.h>
+
+ #include <list>
+
+--- src/main.cc.orig 2003-11-16 11:55:07.000000000 +0100
++++ src/main.cc 2008-05-08 09:03:11.000000000 +0200
+@@ -14,6 +14,7 @@
+ #include <gdk/gdkkeysyms.h>
+
+ #include <string>
++#include <cstring>
+ #include <iostream>
+ #include <sstream>
+ #include <vector>
+
+--- src/gtkcompletionline.cc.orig 2009-06-19 22:38:14.000000000 +0400
++++ src/gtkcompletionline.cc 2009-06-19 22:37:14.000000000 +0400
+@@ -376,7 +377,7 @@
+ return 0;
+ }
+
+-int my_alphasort(const void* va, const void* vb) {
++int my_alphasort(const dirent** va, const dirent** vb) {
+ const struct dirent** a = (const struct dirent**)va;
+ const struct dirent** b = (const struct dirent**)vb;
diff --git a/gmrun-0.9.2-xdg.patch b/gmrun-0.9.2-xdg.patch
new file mode 100644
index 000000000000..c4a3c9778f91
--- /dev/null
+++ b/gmrun-0.9.2-xdg.patch
@@ -0,0 +1,58 @@
+diff -ur gmrun-0.9.2/src/history.cc gmrun-0.9.2-xdg/src/history.cc
+--- gmrun-0.9.2/src/history.cc 2002-08-17 15:19:31.000000000 +0200
++++ gmrun-0.9.2-xdg/src/history.cc 2012-06-04 23:42:35.314653414 +0200
+@@ -24,8 +24,15 @@
+ HistoryFile::HistoryFile()
+ {
+ m_file_entries = 0;
+- m_filename = g_get_home_dir();
+- m_filename += "/.gmrun_history";
++ const char* filename = getenv("XDG_CACHE_HOME");
++ if (filename != 0 && *filename != '\0') {
++ m_filename = filename;
++ m_filename += "/gmrun_history";
++ }
++ else {
++ m_filename = g_get_home_dir();
++ m_filename += "/.gmrun_history";
++ }
+ m_current = 0;
+ m_default_set = false;
+ read_the_file();
+diff -ur gmrun-0.9.2/src/prefs.cc gmrun-0.9.2-xdg/src/prefs.cc
+--- gmrun-0.9.2/src/prefs.cc 2012-06-04 22:35:00.671949439 +0200
++++ gmrun-0.9.2-xdg/src/prefs.cc 2012-06-04 23:24:24.184445962 +0200
+@@ -35,12 +35,29 @@
+ file_name += GMRUNRC;
+ init(file_name);
+
+- file_name = getenv("HOME");
+- if (!file_name.empty()) {
++ file_name.clear();
++ const char* filename = getenv("XDG_CONFIG_HOME");
++ if (filename != 0 && *filename != '\0') {
++ file_name = filename;
+ string::iterator i = file_name.end() - 1;
+- if (*i == '/') file_name.erase(i);
+- file_name += "/.";
++ if (*i != '/') {
++ file_name += '/';
++ }
+ file_name += GMRUNRC;
++ }
++ else {
++ filename = getenv("HOME");
++ if (filename != 0 && *filename != '\0') {
++ file_name = filename;
++ string::iterator i = file_name.end() - 1;
++ if (*i != '/') {
++ file_name += '/';
++ }
++ file_name += '.';
++ file_name += GMRUNRC;
++ }
++ }
++ if (!file_name.empty()) {
+ init(file_name);
+ }
+ }