freebsd-ports/devel/xdg-utils/files/patch-scripts_xdg-mime
2008-04-09 01:00:46 +00:00

38 lines
1.6 KiB
Text

--- scripts/xdg-mime.orig 2007-06-24 15:57:57.000000000 -0400
+++ scripts/xdg-mime 2008-04-08 20:57:53.179475369 -0400
@@ -474,7 +474,7 @@
info_gnome()
{
- file=`readlink -f "$1"` # Normalize path
+ file=`stat -f "$1"` # Normalize path
DEBUG 1 "Running gnomevfs-info \"$file\""
gnomevfs-info "$file" 2> /dev/null | grep MIME | cut -d ":" -f 2 | sed s/"^ "//
@@ -557,7 +557,7 @@
[ -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/local/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_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/local/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 @@
# 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"