From owner-freebsd-gnome@FreeBSD.ORG Thu Dec 23 11:17:11 2004 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17D4F16A4CE; Thu, 23 Dec 2004 11:17:11 +0000 (GMT) Received: from smtp1.jazztel.es (smtp1.jazztel.es [62.14.3.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B54843D39; Thu, 23 Dec 2004 11:17:10 +0000 (GMT) (envelope-from josemi@freebsd.jazztel.es) Received: from antivirus by smtp1.jazztel.es with antivirus id 1ChQyF-0006jj-00 Thu, 23 Dec 2004 12:17:27 +0100 Received: from [212.106.253.64] (helo=antares.redesjm.local) by smtp1.jazztel.es with esmtp id 1ChQyF-0006i0-00 Thu, 23 Dec 2004 12:17:27 +0100 Received: from redesjm.local (orion.redesjm.local [192.168.254.16]) by antares.redesjm.local (8.13.1/8.13.1) with ESMTP id iBNBH6ro038704; Thu, 23 Dec 2004 12:17:06 +0100 (CET) (envelope-from freebsd@redesjm.local) Received: (from freebsd@localhost) by redesjm.local (8.13.1/8.13.1/Submit) id iBNBH55H002761; Thu, 23 Dec 2004 12:17:05 +0100 (CET) (envelope-from freebsd) Date: Thu, 23 Dec 2004 12:17:05 +0100 (CET) Message-Id: <200412231117.iBNBH55H002761@redesjm.local> To: FreeBSD-gnats-submit@freebsd.org From: Jose M Rodriguez (freebsd) X-send-pr-version: 3.113 X-GNATS-Notify: X-AntiVirus: checked by AntiVir Milter (version: 1.1.0-3; AVE: 6.29.0.5; VDF: 6.29.0.31; host: antares.redesjm.local) X-Virus-Scanned: by antivirus cc: gnome@freebsd.org Subject: [PATCH] www/mozilla: update mozilla.sh X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Dec 2004 11:17:11 -0000 >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 ---