Commits

Lee Pak Hong  committed 9d3bffa

Rebuild gmrun

Signed-off-by: Lee Pak Hong <hata.ph@gmail.com>

  • Participants
  • Parent commits 6c42779
  • Branches veclinux-7.0

Comments (0)

Files changed (6)

File var/vabs/gmrun/src/gmrun.SlackBuild

 # Linux forum at http://forum.vectorlinux.com and from tidbits collected 
 # from all over the internet. 
 #
-# Generated by sbbuilder-0.4.15, written by Rodrigo Bistolfi 
+# Generated by sbbuilder-0.4.14.1, written by Rodrigo Bistolfi 
 # (rbistolfi) and Raimon Grau Cuscó (Kidd) for VectorLinux.
 #
 # Please put your name below if you add some original scripting lines.
 NAME="gmrun"            #Enter package Name!
 VERSION=${VERSION:-"0.9.2"}      #Enter package Version!
 VER=$(echo $VERSION|sed 's/-/_/') #this fixes - in version
-VL_PACKAGER=${VL_PACKAGER:-"test"}   #Enter your Name!
-LINK=${LINK:-"http://downloads.sourceforge.net/project/$NAME/$NAME/$VERSION/$NAME-$VERSION.tar.gz"}  #Enter URL for package here!
+VL_PACKAGER=${VL_PACKAGER:-"hata_ph"}   #Enter your Name!
+LINK=${LINK:-"http://downloads.sourceforge.net/$NAME/$NAME-$VERSION.tar.gz"}  #Enter URL for package here!
 
 
 #SYSTEM VARIABLES
 if [[ "$ARCH" = i?86 ]]; then
   ARCH=i586
   SLKCFLAGS="-O2 -march=i586 -mtune=i686"
-  CONFIGURE_TRIPLET="i486-vector-linux"
+  CONFIGURE_TRIPLET="i486-slackware-linux"
   LIBDIRSUFFIX=""
 elif [ "$ARCH" = "x86_64" ]; then
   SLKCFLAGS="-O2 -fpic"
-  CONFIGURE_TRIPLET="x86_64-vlocity-linux"
+  CONFIGURE_TRIPLET="x86_64-slackware-linux"
   LIBDIRSUFFIX="64"
 elif [ "$ARCH" = "powerpc" ]; then
   SLKCFLAGS="-O2"
 # your patches use the -p1 strip option!
 #-----------------------------------------------------
 for i in $CWD/patches/*;do
-  patch -p1 <$i
+#  patch -p1 <$i
   mkdir -p $PKG/usr/doc/$NAME-$VERSION/patches/
   cp $i $PKG/usr/doc/$NAME-$VERSION/patches/
 done
 #-----------------------------------------------------
  
- 
+# 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 
 
 #SET PERMISSIONS
 #-----------------------------------------
 
 
 mkdir -p $PKG/usr/doc/$NAME-$VERSION
-cp -a AUTHORS COPYING ChangeLog Credits MANIFEST README TODO \
+cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README \
 $PKG/usr/doc/$NAME-$VERSION
 cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
 
 echo "fi" >> $PKG/install/doinst.sh
 fi
 
+mkdir -p $PKG/install
+cat >> $PKG/install/doinst.sh << EOF
+# update rarian database
+if [ -x usr/bin/rarian-sk-update ]; then
+  usr/bin/rarian-sk-update 1> /dev/null 2> /dev/null
+fi
+
+# update mime database
+if [ -x usr/bin/update-mime-database ]; then
+  usr/bin/update-mime-database usr/share/mime 1> /dev/null 2> /dev/null
+fi
+
+# update desktop entries
+if [ -x usr/bin/update-desktop-database ]; then
+  usr/bin/update-desktop-database 1> /dev/null 2> /dev/null
+fi
+
+# update hicolor icons
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+	rm -f usr/share/icons/hicolor/icon-theme.cache
+fi
+usr/bin/gtk-update-icon-cache -f -q usr/share/icons/hicolor 1>/dev/null 2>/dev/null
+
+if [ -x /usr/bin/glib-compile-schemas ]; then
+  /usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas/ >/dev/null 2>&1
+fi
+
+# Restart gconfd-2 if running to reload new gconf settings
+if ps acx | grep -q gconfd-2 ; then
+        killall -HUP gconfd-2 ;
+fi
+EOF
 
 #if there is a slack-desc in src dir use it
 if test -f $CWD/slack-desc; then
 # customary to leave one space after the ':'.
 
 $SHIM|-----handy-ruler------------------------------------------------------|
-$NAME: $NAME ()
+$NAME: $NAME (A simple program which provides a run program window)
 $NAME:
-$NAME: 
-$NAME: 
-$NAME: 
+$NAME: gmrun is a simple GTK program which provides a "run program" window.
+$NAME: It features a bash-like TAB completion, Ctrl-R/Ctrl-S for searching
+$NAME: through the history and URL handlers for any user defined prefix.
 $NAME: 
 $NAME:
 $NAME:
 $NAME: License: GPL
-$NAME: Authors: 
-$NAME: Website: 
+$NAME: Authors: Mihai Bazon <mishoo@infoiasi.ro>
+$NAME: Website: http://sourceforge.net/projects/gmrun/
 
 EOF
 fi
 fi
 #--------------------------------------------------------------
 
-# vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##
+# vim: set tabstop=4 shiftwidth=4 foldmethod=marker : ##

File var/vabs/gmrun/src/patches/gcc43.patch

-diff -Naur gmrun-0.9.2/src/ci_string.h gmrun-0.9.2.patched/src/ci_string.h
---- gmrun-0.9.2/src/ci_string.h	2001-05-16 08:39:31.000000000 -0600
-+++ gmrun-0.9.2.patched/src/ci_string.h	2013-02-16 11:20:36.000000000 -0700
-@@ -7,6 +7,7 @@
- #define __CI_STRING_H__
- 
- #include <string>
-+#include <cstring>
- #include <ctype.h>
- 
- struct ci_char_traits : public std::char_traits<char>
-diff -Naur gmrun-0.9.2/src/gtkcompletionline.cc gmrun-0.9.2.patched/src/gtkcompletionline.cc
---- gmrun-0.9.2/src/gtkcompletionline.cc	2003-11-16 03:55:07.000000000 -0700
-+++ gmrun-0.9.2.patched/src/gtkcompletionline.cc	2013-02-16 11:21:12.000000000 -0700
-@@ -29,6 +29,7 @@
- #include <set>
- #include <sstream>
- #include <string>
-+#include <cstring>
- #include <vector>
- using namespace std;
- 
-@@ -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 -Naur gmrun-0.9.2/src/main.cc gmrun-0.9.2.patched/src/main.cc
---- gmrun-0.9.2/src/main.cc	2003-11-16 03:55:07.000000000 -0700
-+++ gmrun-0.9.2.patched/src/main.cc	2013-02-16 11:20:54.000000000 -0700
-@@ -14,6 +14,7 @@
- #include <gdk/gdkkeysyms.h>
- 
- #include <string>
-+#include <cstring>
- #include <iostream>
- #include <sstream>
- #include <vector>
-diff -Naur gmrun-0.9.2/src/prefs.cc gmrun-0.9.2.patched/src/prefs.cc
---- gmrun-0.9.2/src/prefs.cc	2002-08-16 04:48:22.000000000 -0600
-+++ gmrun-0.9.2.patched/src/prefs.cc	2013-02-16 11:20:48.000000000 -0700
-@@ -13,6 +13,7 @@
- #include <fstream>
- #include <iostream>
- #include <stdio.h>
-+#include <stdlib.h>
- 
- #include <list>
- 

File var/vabs/gmrun/src/patches/gmrun-0.9.2-gcc43.patch

+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>
+ 

File var/vabs/gmrun/src/patches/gmrun-0.9.2-mousewheel.patch

+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

File var/vabs/gmrun/src/patches/gmrun-gmrunrc.patch

+--- 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
++

File var/vabs/gmrun/src/patches/gtkcompletionline.cc.patch

+--- 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;
+