$OpenBSD: patch-scripts_xdg-mime,v 1.3 2009/01/28 09:53:02 ajacoutot Exp $

The file(1) call needs to be changed because the '-i' switch does not
exist under OpenBSD.

--- scripts/xdg-mime.orig	Sun Jun 24 21:57:57 2007
+++ scripts/xdg-mime	Wed Jan 28 10:54:32 2009
@@ -483,8 +483,8 @@ info_gnome()
 
 info_generic()
 {
-    DEBUG 1 "Running /usr/bin/file -i \"$1\"" 
-    /usr/bin/file -i "$1" 2> /dev/null | cut -d ":" -f 2 | sed s/"^ "//
+    DEBUG 1 "Running /usr/bin/file -bNs \"$1\""
+    /usr/bin/file -bNs "$1" 2> /dev/null | cut -d "," -f 1 | sed s/"^ "//
 
     exit_success
 }
@@ -557,7 +557,7 @@ defapp_generic()
     [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share"
     xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
     xdg_system_dirs="$XDG_DATA_DIRS"
-    [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
+    [ -n "$xdg_system_dirs" ] || xdg_system_dirs=${LOCALBASE}/share/:/usr/share/
 
     for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do
        DEBUG 2 "Checking $x/applications/defaults.list"
@@ -827,7 +827,7 @@ xdg_user_dir="$XDG_DATA_HOME"
 xdg_user_dir="$xdg_user_dir/$xdg_dir_name"
 
 xdg_system_dirs="$XDG_DATA_DIRS"
-[ -n "$xdg_system_dirs" ] || xdg_system_dirs=/usr/local/share/:/usr/share/
+[ -n "$xdg_system_dirs" ] || xdg_system_dirs=${LOCALBASE}/share/:/usr/share/
 for x in `echo $xdg_system_dirs | sed 's/:/ /g'`; do
     if [ -w $x/$xdg_dir_name ] ; then
         [ x"$mode" = x"system" ] && xdg_base_dir="$x/mime"
@@ -859,7 +859,7 @@ DEBUG 3 "kde_global_dir: $kde_global_dir"
 # TODO: Gnome legacy support
 # See http://forums.fedoraforum.org/showthread.php?t=26875
 gnome_user_dir="$HOME/.gnome/apps"
-gnome_global_dir=/usr/share/gnome/apps
+gnome_global_dir=${LOCALBASE}/share/gnome/apps
 [ -w $gnome_global_dir ] || gnome_global_dir=
 DEBUG 3 "gnome_user_dir: $gnome_user_dir"
 DEBUG 3 "gnome_global_dir: $gnome_global_dir"
