Date: Thu, 23 Dec 2004 12:17:05 +0100 (CET) From: Jose M Rodriguez (freebsd) <josemi@freebsd.jazztel.es> To: FreeBSD-gnats-submit@freebsd.org Cc: gnome@freebsd.org Subject: [PATCH] www/mozilla: update mozilla.sh Message-ID: <200412231117.iBNBH55H002761@redesjm.local>
next in thread | raw e-mail | index | archive | help
>Submitter-Id: current-users >Originator: Jose M Rodriguez (freebsd) >Organization: Redes JM >Confidential: no >Synopsis: [PATCH] www/mozilla: update mozilla.sh >Severity: non-critical >Priority: low >Category: ports >Class: update >Release: FreeBSD 5.3-STABLE i386 >Environment: System: FreeBSD orion.redesjm.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Wed Dec 22 19:41:23 CET 2004 >Description: - Update mozilla.sh script Correct fail with remote and MOZILLA_UILOCALE Add artsdsp/esddsp support Port maintainer (gnome@FreeBSD.org) is cc'd. Generated with FreeBSD Port Tools 0.63 >How-To-Repeat: >Fix: --- mozilla-1.7.5,2.patch begins here --- diff -ruN --exclude=CVS /usr/HEAD/ports/www/mozilla/files/mozilla.sh /junk/wk/www/mozilla/files/mozilla.sh --- /usr/HEAD/ports/www/mozilla/files/mozilla.sh Sun Dec 19 21:02:25 2004 +++ /junk/wk/www/mozilla/files/mozilla.sh Thu Dec 23 11:18:49 2004 @@ -1,12 +1,18 @@ #!/bin/sh MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%" -MOZILLA_EXEC="mozilla" +MOZILLA_EXEC="./mozilla" +MOZILLA_REMOTE_EXEC="${MOZILLA_EXEC} -remote" +APPLICATION_ID="mozilla" + LOCATION='new-tab' +#MOZILLA_UILOCALE="en-US" +#MOZILLA_UIREGION="US" +#MOZILLA_DSP="auto" cd $MOZILLA_DIR || exit 1 -# LANG, MOZILLA_UILOCALE, MOZILLA_REGION +# LANG, MOZILLA_UILOCALE, MOZILLA_UIREGION if [ -n "$LANG" -a ! -n "${MOZILLA_UILOCALE}" ]; then _locale="${LANG%%.*}" if [ "${_locale}" != "en_US" -a "${_locale}" != "C" ]; then @@ -22,6 +28,32 @@ fi fi +# find a /dev/dsp handler +case "${MOZILLA_DSP}" in + [Ee][Ss][Dd]|esddsp) # Use the esd dsp wrapper + MOZILLA_DSP="esddsp" + ;; + [Aa][Rr][Tt][Ss]|artsdsp) # Use the arts dsp wrapper + MOZILLA_DSP="artsdsp" + ;; + [Nn][Oo][Nn][Ee]) # Direct dsp output + MOZILLA_DSP="" + ;; + *) # Guest one (auto) + if [ -n "${KDE_FULL_SESSION}" ]; then + MOZILLA_DSP="artsdsp" + elif [ -r ${HOME}/.esd_auth ]; then + MOZILLA_DSP="esddsp" + else + MOZILLA_DSP="" + fi + ;; +esac + +if [ -n "${MOZILLA_DSP}" ] && type "${MOZILLA_DSP}" > /dev/null 2>&1; then + MOZILLA_EXEC="${MOZILLA_DSP} ${MOZILLA_EXEC}" +fi + case $1 in -browser) REMOTE_COMMAND="xfeDoCommand (openBrowser)" @@ -33,17 +65,21 @@ REMOTE_COMMAND="xfeDoCommand (composeMessage)" ;; -*) - exec ./$MOZILLA_EXEC "$@" + exec ${MOZILLA_EXEC} "$@" ;; *) - REMOTE_COMMAND="openURL($@,$LOCATION)" + if [ -n "${LOCATION}" ]; then + REMOTE_COMMAND="openURL($@,$LOCATION)" + else + REMOTE_COMMAND="openURL($@)" + fi ;; esac # process found -./$MOZILLA_EXEC -remote "ping()" && -./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0 +${MOZILLA_REMOTE_EXEC} "ping()" >/dev/null 2>&1 && +${MOZILLA_REMOTE_EXEC} "${REMOTE_COMMAND}" && exit 0 # no existing process -exec ./$MOZILLA_EXEC "$@" +exec ${MOZILLA_EXEC} "$@" --- mozilla-1.7.5,2.patch ends here ---
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412231117.iBNBH55H002761>