aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/gmrun/README3
-rw-r--r--desktop/gmrun/gmrun.SlackBuild101
-rw-r--r--desktop/gmrun/gmrun.info10
-rw-r--r--desktop/gmrun/patches/gmrun-0.9.2-gcc43.patch44
-rw-r--r--desktop/gmrun/patches/gmrun-0.9.2-mousewheel.patch68
-rw-r--r--desktop/gmrun/patches/gmrun-gmrunrc.patch37
-rw-r--r--desktop/gmrun/patches/gtkcompletionline.cc.patch11
-rw-r--r--desktop/gmrun/slack-desc19
8 files changed, 293 insertions, 0 deletions
diff --git a/desktop/gmrun/README b/desktop/gmrun/README
new file mode 100644
index 0000000000000..b8245b2eba702
--- /dev/null
+++ b/desktop/gmrun/README
@@ -0,0 +1,3 @@
+gmrun is a simple GTK program which provides a "run program" window.
+It features a bash-like TAB completion, Ctrl-R/Ctrl-S for searching
+through the history and URL handlers for any user defined prefix.
diff --git a/desktop/gmrun/gmrun.SlackBuild b/desktop/gmrun/gmrun.SlackBuild
new file mode 100644
index 0000000000000..1e28193ace328
--- /dev/null
+++ b/desktop/gmrun/gmrun.SlackBuild
@@ -0,0 +1,101 @@
+#!/bin/sh
+
+# Copyright 2010 Binh Nguyen <binhnguyen@fastmail.fm>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=gmrun
+VERSION=0.9.2
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -eu
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Apply some patches from Fedora's SRPM:
+patch -p1 < $CWD/patches/gmrun-0.9.2-gcc43.patch
+patch -p1 < $CWD/patches/gmrun-0.9.2-mousewheel.patch
+patch -p1 < $CWD/patches/gmrun-gmrunrc.patch
+# And one from Gentoo
+patch -p1 < $CWD/patches/gtkcompletionline.cc.patch
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/desktop/gmrun/gmrun.info b/desktop/gmrun/gmrun.info
new file mode 100644
index 0000000000000..b28b1e5c6d021
--- /dev/null
+++ b/desktop/gmrun/gmrun.info
@@ -0,0 +1,10 @@
+PRGNAM="gmrun"
+VERSION="0.9.2"
+HOMEPAGE="http://sourceforge.net/projects/gmrun/"
+DOWNLOAD="http://downloads.sourceforge.net/gmrun/gmrun-0.9.2.tar.gz"
+MD5SUM="6cef37a968006d9496fc56a7099c603c"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Binh Nguyen"
+EMAIL="binhnguyen@fastmail.fm"
+APPROVED="rworkman"
diff --git a/desktop/gmrun/patches/gmrun-0.9.2-gcc43.patch b/desktop/gmrun/patches/gmrun-0.9.2-gcc43.patch
new file mode 100644
index 0000000000000..5f889d4e1e5ab
--- /dev/null
+++ b/desktop/gmrun/patches/gmrun-0.9.2-gcc43.patch
@@ -0,0 +1,44 @@
+diff -ur gmrun-0.9.2/src/ci_string.h gmrun-0.9.2.new/src/ci_string.h
+--- gmrun-0.9.2/src/ci_string.h 2001-05-16 17:39:31.000000000 +0300
++++ gmrun-0.9.2.new/src/ci_string.h 2008-01-15 09:10:39.000000000 +0200
+@@ -7,6 +7,7 @@
+ #define __CI_STRING_H__
+
+ #include <string>
++#include <string.h>
+ #include <ctype.h>
+
+ struct ci_char_traits : public std::char_traits<char>
+diff -ur gmrun-0.9.2/src/gtkcompletionline.cc gmrun-0.9.2.new/src/gtkcompletionline.cc
+--- gmrun-0.9.2/src/gtkcompletionline.cc 2003-11-16 12:55:07.000000000 +0200
++++ gmrun-0.9.2.new/src/gtkcompletionline.cc 2008-01-15 09:10:39.000000000 +0200
+@@ -24,6 +24,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <string.h>
+
+ #include <iostream>
+ #include <set>
+diff -ur gmrun-0.9.2/src/main.cc gmrun-0.9.2.new/src/main.cc
+--- gmrun-0.9.2/src/main.cc 2003-11-16 12:55:07.000000000 +0200
++++ gmrun-0.9.2.new/src/main.cc 2008-01-15 09:10:39.000000000 +0200
+@@ -20,6 +20,7 @@
+ #include <algorithm>
+ #include <iterator>
+ #include <popt.h>
++#include <string.h>
+
+ using namespace std;
+
+diff -ur gmrun-0.9.2/src/prefs.cc gmrun-0.9.2.new/src/prefs.cc
+--- gmrun-0.9.2/src/prefs.cc 2002-08-16 13:48:22.000000000 +0300
++++ gmrun-0.9.2.new/src/prefs.cc 2008-01-16 19:48:39.000000000 +0200
+@@ -13,6 +13,7 @@
+ #include <fstream>
+ #include <iostream>
+ #include <stdio.h>
++#include <stdlib.h>
+
+ #include <list>
+
diff --git a/desktop/gmrun/patches/gmrun-0.9.2-mousewheel.patch b/desktop/gmrun/patches/gmrun-0.9.2-mousewheel.patch
new file mode 100644
index 0000000000000..ac1f843223f7c
--- /dev/null
+++ b/desktop/gmrun/patches/gmrun-0.9.2-mousewheel.patch
@@ -0,0 +1,68 @@
+diff -ur gmrun-0.9.2/src/gtkcompletionline.cc gmrun-0.9.2.new/src/gtkcompletionline.cc
+--- gmrun-0.9.2/src/gtkcompletionline.cc 2010-01-11 12:20:16.076644635 +0200
++++ gmrun-0.9.2.new/src/gtkcompletionline.cc 2010-01-11 12:21:11.815581518 +0200
+@@ -75,6 +75,8 @@
+
+ static gboolean
+ on_key_press(GtkCompletionLine *cl, GdkEventKey *event, gpointer data);
++static gboolean
++on_scroll(GtkCompletionLine *cl, GdkEventScroll *event, gpointer data);
+
+ /* get_type */
+ guint gtk_completion_line_get_type(void)
+@@ -204,6 +206,8 @@
+ GTK_SIGNAL_FUNC(on_key_press), NULL);
+ gtk_signal_connect(GTK_OBJECT(object), "key_release_event",
+ GTK_SIGNAL_FUNC(on_key_press), NULL);
++ gtk_signal_connect(GTK_OBJECT(object), "scroll-event",
++ GTK_SIGNAL_FUNC(on_scroll), NULL);
+
+ object->hist = new HistoryFile();
+
+@@ -954,6 +958,45 @@
+ }
+
+ static gboolean
++on_scroll(GtkCompletionLine *cl, GdkEventScroll *event, gpointer data)
++{
++ if (event->direction == GDK_SCROLL_UP) {
++ if (cl->win_compl != NULL) {
++ int &item = cl->list_compl_items_where;
++ item--;
++ if (item < 0) {
++ item = 0;
++ } else {
++ complete_from_list(cl);
++ }
++ } else {
++ up_history(cl);
++ }
++ if (MODE_SRC) {
++ search_off(cl);
++ }
++ return TRUE;
++ } else if (event->direction == GDK_SCROLL_DOWN) {
++ if (cl->win_compl != NULL) {
++ int &item = cl->list_compl_items_where;
++ item++;
++ if (item >= cl->list_compl_nr_rows) {
++ item = cl->list_compl_nr_rows - 1;
++ } else {
++ complete_from_list(cl);
++ }
++ } else {
++ down_history(cl);
++ }
++ if (MODE_SRC) {
++ search_off(cl);
++ }
++ return TRUE;
++ }
++ return FALSE;
++}
++
++static gboolean
+ on_key_press(GtkCompletionLine *cl, GdkEventKey *event, gpointer data)
+ {
+ static gint tt_id = -1;
+Only in gmrun-0.9.2.new/src: gtkcompletionline.cc.orig
diff --git a/desktop/gmrun/patches/gmrun-gmrunrc.patch b/desktop/gmrun/patches/gmrun-gmrunrc.patch
new file mode 100644
index 0000000000000..6a53462590b21
--- /dev/null
+++ b/desktop/gmrun/patches/gmrun-gmrunrc.patch
@@ -0,0 +1,37 @@
+--- gmrun-0.9.2/config/gmrunrc.old 2003-11-16 12:43:41.000000000 +0200
++++ gmrun-0.9.2/config/gmrunrc 2007-01-18 16:05:47.000000000 +0200
+@@ -3,7 +3,7 @@
+ # GPL v2.0 applies
+
+ # Set terminal
+-Terminal = gnome-terminal --start-factory-server --use-factory
++Terminal = xterm
+ TermExec = ${Terminal} -e
+ AlwaysInTerm = ssh telnet ftp lynx mc vi vim pine centericq perldoc man
+
+@@ -32,18 +32,14 @@
+ # - %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_mailto = mozilla -remote "mailto(%s)"
++URL_http = xdg-open %u
++URL_mailto = xdg-email %u
++URL_file = xdg-open %s
+ URL_man = ${TermExec} 'man %s'
+ URL_info = ${TermExec} 'info %s'
+-URL_pd = ${TermExec} 'perldoc %s'
+-URL_file = nautilus %s
+-URL_readme = ${TermExec} 'less /usr/doc/%s/README'
+-URL_info = ${TermExec} 'info %s'
+-URL_sh = sh -c '%s'
++URL_search = xdg-open 'http://www.google.com/search?q=%s'
+
+ # extension handlers
+-EXT:doc,rtf = AbiWord %s
+-EXT:txt,cc,cpp,h,java,html,htm,epl,tex,latex,js,css,xml,xsl,am = emacs %s
+-EXT:ps = gv %s
+-EXT:pdf = xpdf %s
++# Customize your own extension handler.
++EXT:doc,rtf,txt,cc,cpp,h,java,html,htm,epl,tex,latex,js,css,xml,xsl,am,ps,pdf = xdg-open %s
++
diff --git a/desktop/gmrun/patches/gtkcompletionline.cc.patch b/desktop/gmrun/patches/gtkcompletionline.cc.patch
new file mode 100644
index 0000000000000..989183b2be462
--- /dev/null
+++ b/desktop/gmrun/patches/gtkcompletionline.cc.patch
@@ -0,0 +1,11 @@
+--- gmrun-0.9.2/src/gtkcompletionline.cc.orig 2009-06-19 22:38:14.000000000 +0400
++++ gmrun-0.9.2/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/desktop/gmrun/slack-desc b/desktop/gmrun/slack-desc
new file mode 100644
index 0000000000000..d5eca865f6523
--- /dev/null
+++ b/desktop/gmrun/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler----------------------------------------------------|
+gmrun: gmrun (A simple program which provides a run program window)
+gmrun:
+gmrun: gmrun is a simple GTK program which provides a "run program" window.
+gmrun: It features a bash-like TAB completion, Ctrl-R/Ctrl-S for searching
+gmrun: through the history and URL handlers for any user defined prefix.
+gmrun:
+gmrun: Homepage: http://sourceforge.net/projects/gmrun/
+gmrun:
+gmrun:
+gmrun:
+gmrun: