Index: head/devel/xdg-utils/Makefile =================================================================== --- head/devel/xdg-utils/Makefile (revision 490008) +++ head/devel/xdg-utils/Makefile (revision 490009) @@ -1,29 +1,30 @@ # Created by: Michael Johnson # $FreeBSD$ PORTNAME= xdg-utils -PORTVERSION= 1.1.1 +PORTVERSION= 1.1.3 CATEGORIES= devel MASTER_SITES= http://portland.freedesktop.org/download/ MAINTAINER= gnome@FreeBSD.org COMMENT= Tools to allow all applications to integrate with the free desktop LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= minixmlto:textproc/minixmlto RUN_DEPENDS= ${LOCALBASE}/share/icons/hicolor/index.theme:misc/hicolor-icon-theme \ xprop:x11/xprop \ xset:x11/xset USES= gmake + CONFIGURE_ENV= XMLTO=${LOCALBASE}/bin/minixmlto GNU_CONFIGURE= yes NO_ARCH= yes post-patch: @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ ${WRKSRC}/scripts/xdg-* .include Index: head/devel/xdg-utils/distinfo =================================================================== --- head/devel/xdg-utils/distinfo (revision 490008) +++ head/devel/xdg-utils/distinfo (revision 490009) @@ -1,2 +1,3 @@ -SHA256 (xdg-utils-1.1.1.tar.gz) = b0dd63a2576e0bb16f1aa78d6ddf7d6784784a098d4df17161cd6a17c7bc4125 -SIZE (xdg-utils-1.1.1.tar.gz) = 295213 +TIMESTAMP = 1546903676 +SHA256 (xdg-utils-1.1.3.tar.gz) = d798b08af8a8e2063ddde6c9fa3398ca81484f27dec642c5627ffcaa0d4051d9 +SIZE (xdg-utils-1.1.3.tar.gz) = 297170 Index: head/devel/xdg-utils/files/patch-scripts_xdg-desktop-menu.in =================================================================== --- head/devel/xdg-utils/files/patch-scripts_xdg-desktop-menu.in (revision 490008) +++ head/devel/xdg-utils/files/patch-scripts_xdg-desktop-menu.in (revision 490009) @@ -1,47 +1,47 @@ ---- scripts/xdg-desktop-menu.in.orig 2016-01-27 22:06:06.661844000 +0100 -+++ scripts/xdg-desktop-menu.in 2016-01-27 22:08:30.057702000 +0100 -@@ -67,7 +67,7 @@ +--- scripts/xdg-desktop-menu.in.orig 2019-01-08 19:02:17 UTC ++++ scripts/xdg-desktop-menu.in +@@ -67,7 +67,7 @@ make_lazy_default() for MIME in $mimetypes ; do xdg_default_dirs="$XDG_DATA_DIRS" - [ -n "$xdg_default_dirs" ] || xdg_default_dirs=/usr/local/share/:/usr/share/ + [ -n "$xdg_default_dirs" ] || xdg_default_dirs=%%LOCALBASE%%/share/:/usr/share/ if [ x"$mode" = x"user" ] ; then xdg_user_dir="$XDG_DATA_HOME" [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share" -@@ -110,7 +110,7 @@ +@@ -110,7 +110,7 @@ update_submenu() xdg_user_dir="$xdg_user_dir/$xdg_dir_name" xdg_system_dirs="$XDG_CONFIG_DIRS" - [ -n "$xdg_system_dirs" ] || xdg_system_dirs=/etc/xdg + [ -n "$xdg_system_dirs" ] || xdg_system_dirs=%%LOCALBASE%%/etc/xdg xdg_global_dir= for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do if [ -w $x/$xdg_dir_name ] ; then -@@ -475,7 +475,7 @@ +@@ -475,7 +475,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/ xdg_global_dir= for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do if [ -w $x/$xdg_dir_name ] ; then -@@ -542,7 +542,7 @@ +@@ -542,7 +542,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/ xdg_global_dir= for x in `echo $xdg_system_dirs | sed 's/:/ /g'` ; do if [ -w $x/$xdg_dir_name ] ; then -@@ -556,7 +556,7 @@ +@@ -556,7 +556,7 @@ kde_global_dir=`kde${KDE_SESSION_VERSION}-config --pat [ -w $kde_global_dir ] || kde_global_dir= 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 "Install locations for *.desktop files:" Index: head/devel/xdg-utils/files/patch-scripts_xdg-email.in =================================================================== --- head/devel/xdg-utils/files/patch-scripts_xdg-email.in (revision 490008) +++ head/devel/xdg-utils/files/patch-scripts_xdg-email.in (revision 490009) @@ -1,38 +1,38 @@ ---- scripts/xdg-email.in.orig 2016-01-27 22:09:31.736910000 +0100 -+++ scripts/xdg-email.in 2016-01-27 22:46:01.701427000 +0100 -@@ -34,7 +34,7 @@ +--- scripts/xdg-email.in.orig 2019-01-08 19:02:17 UTC ++++ scripts/xdg-email.in +@@ -34,7 +34,7 @@ run_thunderbird() { local THUNDERBIRD MAILTO NEWMAILTO TO CC BCC SUBJECT BODY ATTACH THUNDERBIRD="$1" - MAILTO=$(echo "$2" | sed 's/^mailto://') + MAILTO=$(echo "$2" | tr '&' '\n') echo "$MAILTO" | grep -qs "^?" if [ "$?" = "0" ] ; then MAILTO=$(echo "$MAILTO" | sed 's/^?//') -@@ -48,7 +48,7 @@ +@@ -48,7 +48,7 @@ run_thunderbird() BCC=$(/bin/echo -e $(echo "$MAILTO" | grep '^bcc=' | sed 's/^bcc=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }')) SUBJECT=$(echo "$MAILTO" | grep '^subject=' | tail -n 1) BODY=$(echo "$MAILTO" | grep '^body=' | tail -n 1) - ATTACH=$(/bin/echo -e $(echo "$MAILTO" | grep '^attach=' | sed 's/^attach=//;s/%\(..\)/\\x\1/g' | awk '{ printf "%s,",$0 }' | sed 's/,$//')) + ATTACH=$(for attachment in $(echo "$MAILTO" | sed -ne 's,^attach=,file://,gp') ; do printf "%s," "$attachment" ; done); ATTACH=${ATTACH%,} if [ -z "$TO" ] ; then NEWMAILTO= -@@ -293,7 +293,7 @@ +@@ -314,7 +314,7 @@ LC_ALL="$ORIG_LC_ALL" options= mailto= -utf8="iconv -t utf8" +utf8="iconv -t UTF-8" while [ $# -gt 0 ] ; do parm="$1" shift -@@ -434,7 +434,7 @@ +@@ -455,7 +455,7 @@ fi if [ x"$BROWSER" = x"" ]; then BROWSER=www-browser:links2:elinks:links:lynx:w3m - if [ -n "$DISPLAY" ]; then + if has_display; then - BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER + BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chrome:chromium-browser:google-chrome:$BROWSER fi fi Index: head/devel/xdg-utils/files/patch-scripts_xdg-icon-resource.in =================================================================== --- head/devel/xdg-utils/files/patch-scripts_xdg-icon-resource.in (revision 490008) +++ head/devel/xdg-utils/files/patch-scripts_xdg-icon-resource.in (revision 490009) @@ -1,11 +1,11 @@ ---- scripts/xdg-icon-resource.in.orig 2016-01-27 22:13:25.171381000 +0100 -+++ scripts/xdg-icon-resource.in 2016-01-27 22:13:51.264266000 +0100 -@@ -222,7 +222,7 @@ +--- scripts/xdg-icon-resource.in.orig 2019-01-08 19:02:17 UTC ++++ scripts/xdg-icon-resource.in +@@ -222,7 +222,7 @@ xdg_user_dir="$xdg_user_dir/$xdg_dir_name" xdg_global_dir= xdg_global_prefix= 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 xdg_global_prefix="$x/icons" Index: head/devel/xdg-utils/files/patch-scripts_xdg-mime.in =================================================================== --- head/devel/xdg-utils/files/patch-scripts_xdg-mime.in (revision 490008) +++ head/devel/xdg-utils/files/patch-scripts_xdg-mime.in (revision 490009) @@ -1,47 +1,38 @@ ---- scripts/xdg-mime.in.orig 2016-01-27 22:14:36.041781000 +0100 -+++ scripts/xdg-mime.in 2016-01-27 22:17:25.276625000 +0100 -@@ -315,7 +315,7 @@ +--- scripts/xdg-mime.in.orig 2019-01-08 19:02:17 UTC ++++ scripts/xdg-mime.in +@@ -318,7 +318,7 @@ defapp_fallback() [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share" 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/ preference=-1 desktop_file="" -@@ -389,7 +389,7 @@ +@@ -401,7 +401,7 @@ defapp_generic() xdg_user_dir="$XDG_DATA_HOME" [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share" 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/ local oldifs="$IFS" dir -@@ -492,7 +492,7 @@ - ;; - esac - check_input_file "$filename" -- filename=`readlink -f -- "$filename"` -+ filename=`stat -f "$filename"` - ;; - - default) -@@ -694,7 +694,7 @@ +@@ -702,7 +702,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" -@@ -726,7 +726,7 @@ +@@ -734,7 +734,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" Index: head/devel/xdg-utils/files/patch-scripts_xdg-open.in =================================================================== --- head/devel/xdg-utils/files/patch-scripts_xdg-open.in (revision 490008) +++ head/devel/xdg-utils/files/patch-scripts_xdg-open.in (revision 490009) @@ -1,62 +1,72 @@ ---- scripts/xdg-open.in.orig 2016-01-27 22:52:37.829535000 +0100 -+++ scripts/xdg-open.in 2016-01-28 11:10:29.639949000 +0100 +--- scripts/xdg-open.in.orig 2019-01-08 19:02:17 UTC ++++ scripts/xdg-open.in @@ -15,6 +15,12 @@ # #--------------------------------------------- +# If we are started from a Linux app with LD_PRELOAD set unset that +# so native apps (like browers) won't fail to start. +if [ "x$(uname)" = "xLinux" ]; then + unset LD_PRELOAD +fi + manualpage() { cat << _MANUALPAGE -@@ -92,7 +98,7 @@ +@@ -92,7 +98,7 @@ file_url_to_path() if [ -x /usr/bin/printf ]; then printf=/usr/bin/printf fi - file=$($printf "$(echo "$file" | sed -e 's@%\([a-f0-9A-F]\{2\}\)@\\x\1@g')") + file=$(echo "$file" | unvis -h) fi echo "$file" } -@@ -211,6 +217,17 @@ +@@ -193,6 +199,17 @@ open_gnome() fi } +open_lumina() +{ + lumina-open "$1" + + if [ $? -eq 0 ]; then + exit_success + else + exit_failure_operation_failed + fi +} + - #----------------------------------------- - # Recursively search .desktop file + open_mate() + { + if gio help open 2>/dev/null 1>&2; then +@@ -342,8 +359,7 @@ open_generic_xdg_mime() + [ -n "$xdg_user_dir" ] || xdg_user_dir="$HOME/.local/share" -@@ -380,7 +397,7 @@ + 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/ + DEBUG 3 "$xdg_user_dir:$xdg_system_dirs" + for x in `echo "$xdg_user_dir:$xdg_system_dirs" | sed 's/:/ /g'`; do + search_desktop_file "$default" "$x/applications/" "$1" +@@ -438,7 +454,7 @@ open_generic() if [ x"$BROWSER" = x"" ]; then BROWSER=www-browser:links2:elinks:links:lynx:w3m - if [ -n "$DISPLAY" ]; then -- BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium-browser:google-chrome:$BROWSER + if has_display; then +- BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chromium:chromium-browser:google-chrome:$BROWSER + BROWSER=x-www-browser:firefox:iceweasel:seamonkey:mozilla:epiphany:konqueror:chrome:chromium-browser:google-chrome:$BROWSER fi fi -@@ -472,6 +489,10 @@ - open_mate "$url" - ;; +@@ -534,6 +550,10 @@ case "$DE" in -+ lumina) -+ open_lumina "$url" + gnome) + open_gnome "$url" + ;; + - xfce) - open_xfce "$url" ++ lumina) ++ open_lumina "$url" ;; + + mate) Index: head/devel/xdg-utils/files/patch-scripts_xdg-screensaver.in =================================================================== --- head/devel/xdg-utils/files/patch-scripts_xdg-screensaver.in (revision 490008) +++ head/devel/xdg-utils/files/patch-scripts_xdg-screensaver.in (revision 490009) @@ -1,13 +1,13 @@ ---- scripts/xdg-screensaver.in.orig 2016-01-27 22:18:04.068869000 +0100 -+++ scripts/xdg-screensaver.in 2016-01-27 22:18:32.024901000 +0100 -@@ -27,7 +27,9 @@ +--- scripts/xdg-screensaver.in.orig 2019-01-08 19:02:17 UTC ++++ scripts/xdg-screensaver.in +@@ -27,7 +27,9 @@ _USAGE #@xdg-utils-common@ # Check if we can use "mv -T" -if mv -T ... ... 2>&1 | grep '\.\.\.' > /dev/null ; then +# FreeBSD mv doesn't support this, so supress scary messages in the terminal +#if mv -T ... ... 2>&1 | grep '\.\.\.' > /dev/null ; then +if false; then # We can securely move files in /tmp with mv -T DEBUG 1 "mv -T available" MV="mv -T" Index: head/devel/xdg-utils/files/patch-scripts_xdg-utils-common.in =================================================================== --- head/devel/xdg-utils/files/patch-scripts_xdg-utils-common.in (revision 490008) +++ head/devel/xdg-utils/files/patch-scripts_xdg-utils-common.in (revision 490009) @@ -1,56 +1,62 @@ ---- scripts/xdg-utils-common.in.orig 2016-01-27 22:52:37.833381000 +0100 -+++ scripts/xdg-utils-common.in 2016-01-28 09:44:29.953139000 +0100 -@@ -279,6 +279,44 @@ +--- scripts/xdg-utils-common.in.orig 2019-01-08 19:02:17 UTC ++++ scripts/xdg-utils-common.in +@@ -304,12 +304,50 @@ detectDE() XFCE) DE=xfce ;; + Lumina) + DE=lumina + ;; -+ X-Generic) -+ DE=generic -+ ;; -+ esac -+ fi -+ + X-Generic) + DE=generic + ;; + esac + fi + +# xxx PCDM_SESSION check here? + if [ -n "${PCDM_SESSION}" ]; then + case "${PCDM_SESSION}" in + # only recently added to menu-spec, pre-spec X- still in use + CINNAMON) + DE=cinnamon; + ;; + ENLIGHTENMENT) + DE=enlightenment; + ;; + # GNOME, GNOME-Classic:GNOME, or GNOME-Flashback:GNOME + GNOME*) + DE=gnome; + ;; + KDE) + DE=kde; + ;; + LXDE) + DE=lxde; + ;; + MATE) + DE=mate; + ;; + XFCE) + DE=xfce + ;; + LUMINA) + DE=lumina + ;; - X-Generic) - DE=generic - ;; -@@ -294,6 +332,8 @@ ++ X-Generic) ++ DE=generic ++ ;; ++ esac ++ fi ++ + if [ x"$DE" = x"" ]; then + # classic fallbacks + if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=kde; +@@ -319,6 +357,8 @@ detectDE() elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce; elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment; + #Simple fallback for non-XDG window managers if Lumina is installed in the normal place (no heavy runtime dependencies) + elif [ -x "/usr/local/bin/lumina-open" ]; then DE=lumina; + elif [ x"$LXQT_SESSION_CONFIG" != x"" ]; then DE=lxqt; fi fi -