From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Mar 22 22:30:03 2005 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 77A8F16A4CE for ; Tue, 22 Mar 2005 22:30:03 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id C791843D31 for ; Tue, 22 Mar 2005 22:30:02 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j2MMU2Ev001910 for ; Tue, 22 Mar 2005 22:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j2MMU2QS001902; Tue, 22 Mar 2005 22:30:02 GMT (envelope-from gnats) Resent-Date: Tue, 22 Mar 2005 22:30:02 GMT Resent-Message-Id: <200503222230.j2MMU2QS001902@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Jose M Rodriguez Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8942016A4CE; Tue, 22 Mar 2005 22:22:45 +0000 (GMT) Received: from 62-15-215-140.inversas.jazztel.es (62-15-215-140.inversas.jazztel.es [62.15.215.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2EDE043D39; Tue, 22 Mar 2005 22:22:43 +0000 (GMT) (envelope-from josemi@freebsd.jazztel.es) Received: from redesjm.local (orion.redesjm.local [192.168.254.16]) j2MMMmMF000859; Tue, 22 Mar 2005 23:22:49 +0100 (CET) (envelope-from freebsd@redesjm.local) Received: (from freebsd@localhost) by redesjm.local (8.13.3/8.13.3/Submit) id j2MMN2eY092469; Tue, 22 Mar 2005 23:23:02 +0100 (CET) (envelope-from freebsd) Message-Id: <200503222223.j2MMN2eY092469@redesjm.local> Date: Tue, 22 Mar 2005 23:23:02 +0100 (CET) From: Jose M Rodriguez To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: gnome@FreeBSD.org Subject: ports/79146: [PATCH] update mozilla to 1.7.6 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jose M Rodriguez List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Mar 2005 22:30:03 -0000 >Number: 79146 >Category: ports >Synopsis: [PATCH] update mozilla to 1.7.6 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue Mar 22 22:30:01 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Jose M Rodriguez >Release: FreeBSD 5.4-PRERELEASE i386 >Organization: Redes JM >Environment: System: FreeBSD orion.redesjm.local 5.4-PRERELEASE FreeBSD 5.4-PRERELEASE #0: Tue Mar 22 12:25:04 CET 2005 root@orion.redesjm.local:/usr/obj/usr/src/sys/ORION i386 >Description: Actual mozilla have several security issues corrected in the new 1.7.6 release. Also other issues are also merged from latest firefox and thunderbird. This patchset also updates mozilla.sh, making files/mozilla.sh no longer needed. Also, correct .desktop file (no startup notify) and add update-desktop-database processing as in latest firefox. >How-To-Repeat: >Fix: Included patchset --- patch-mozilla begins here --- diff -Nru /usr/HEAD/ports/www/mozilla/Makefile www/mozilla/Makefile --- /usr/HEAD/ports/www/mozilla/Makefile Sat Mar 12 11:53:10 2005 +++ www/mozilla/Makefile Tue Mar 22 23:09:20 2005 @@ -6,8 +6,7 @@ # PORTNAME?= mozilla -PORTVERSION= 1.7.5 -PORTREVISION?= 2 +PORTVERSION= 1.7.6 PORTEPOCH?= 2 CATEGORIES?= www MASTER_SITES= ${MASTER_SITE_MOZILLA} \ @@ -214,7 +213,7 @@ .endif .if defined(WITH_MENU_ENTRY) -USE_GNOME+= gnomehier +USE_GNOME+= gnomehier desktopfileutils .endif .if ${ARCH} == "alpha" && ${OSVERSION} < 500035 @@ -283,10 +282,6 @@ ${FALSE}; \ fi -post-build: - ${SED} -e "s|%%PREFIX%%|${PREFIX}|g" -e "s|%%MOZILLA%%|${MOZILLA}|g" \ - ${FILESDIR}/mozilla.sh >${WRKSRC}/${MOZILLA} - pre-install: ${RM} -rf ${FAKEDIR} ${PLIST} ${TOUCH} -f ${PLIST} @@ -340,7 +335,7 @@ ${INSTALL_SCRIPT} ${FAKEDIR}/bin/mozilla-config ${PREFIX}/lib/${MOZILLA} cd ${FAKEDIR}/lib/${MOZILLA} && ${FIND} . | \ ${CPIO} -pdm -L -R ${LIBOWN}:${LIBGRP} ${PREFIX}/lib/${MOZILLA} - ${INSTALL_SCRIPT} ${WRKSRC}/${MOZILLA} ${PREFIX}/bin + ${INSTALL_SCRIPT} ${FAKEDIR}/bin/mozilla ${PREFIX}/bin if [ ! -x ${PREFIX}/bin/mozilla -a ! -L ${PREFIX}/bin/mozilla ]; then \ ${LN} -sf ${PREFIX}/bin/${MOZILLA} ${PREFIX}/bin/mozilla ; \ fi @@ -378,6 +373,9 @@ @${CHMOD} -R u-w ${PREFIX}/lib/${MOZILLA}/components .if !defined(PACKAGE_BUILDING) @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL +.endif +.if defined(WITH_MENU_ENTRY) + @-update-desktop-database .endif .include diff -Nru /usr/HEAD/ports/www/mozilla/distinfo www/mozilla/distinfo --- /usr/HEAD/ports/www/mozilla/distinfo Sun Dec 19 21:02:25 2004 +++ www/mozilla/distinfo Tue Mar 22 23:09:51 2005 @@ -1,2 +1,2 @@ -MD5 (mozilla-source-1.7.5.tar.bz2) = e5994f3e801cd834966367c6a12f8aeb -SIZE (mozilla-source-1.7.5.tar.bz2) = 30440393 +MD5 (mozilla-source-1.7.6.tar.bz2) = 09c78e9e51d8b11b2d3059987ef42fd0 +SIZE (mozilla-source-1.7.6.tar.bz2) = 30448120 diff -Nru /usr/HEAD/ports/www/mozilla/files/mozilla.desktop.in www/mozilla/files/mozilla.desktop.in --- /usr/HEAD/ports/www/mozilla/files/mozilla.desktop.in Thu Dec 23 02:53:11 2004 +++ www/mozilla/files/mozilla.desktop.in Tue Mar 22 23:04:43 2005 @@ -161,7 +161,7 @@ Comment[zh_CN]=浏览 Web Comment[zh_TW]=瀏覽網頁 Exec=mozilla %U -StartupNotify=true +StartupNotify=false Terminal=false Type=Application Icon=%%PREFIX%%/lib/mozilla/chrome/icons/default/default.xpm diff -Nru /usr/HEAD/ports/www/mozilla/files/mozilla.sh www/mozilla/files/mozilla.sh --- /usr/HEAD/ports/www/mozilla/files/mozilla.sh Fri Dec 24 19:25:44 2004 +++ www/mozilla/files/mozilla.sh Thu Jan 1 01:00:00 1970 @@ -1,85 +0,0 @@ -#!/bin/sh - -MOZILLA_DIR="%%PREFIX%%/lib/%%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_UIREGION -if [ -n "$LANG" -a ! -n "${MOZILLA_UILOCALE}" ]; then - _locale="${LANG%%.*}" - if [ "${_locale}" != "en_US" -a "${_locale}" != "C" ]; then - _region="${_locale##*_}" - _locale="${_locale%_*}" - [ -r chrome/${_locale}-${_region}.jar ] && \ - MOZILLA_EXEC="${MOZILLA_EXEC} -UILocale ${_locale}-${_region}" - fi -elif [ -n "${MOZILLA_UILOCALE}" ]; then - MOZILLA_EXEC="${MOZILLA_EXEC} -UILocale ${MOZILLA_UILOCALE}" - if [ -n "${MOZILLA_UIREGION}" ]; then - MOZILLA_EXEC="${MOZILLA_EXEC} -UIRegion ${MOZILLA_UIREGION}" - 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)" - ;; - -mail) - REMOTE_COMMAND="xfeDoCommand (openInbox)" - ;; - -compose) - REMOTE_COMMAND="xfeDoCommand (composeMessage)" - ;; - -*) - exec ${MOZILLA_EXEC} "$@" - ;; - *) - if [ -n "${LOCATION}" ]; then - REMOTE_COMMAND="openURL($@,$LOCATION)" - else - REMOTE_COMMAND="openURL($@)" - fi - ;; -esac - -# process found -${MOZILLA_REMOTE_EXEC} "ping()" >/dev/null 2>&1 && -${MOZILLA_REMOTE_EXEC} "${REMOTE_COMMAND}" && exit 0 - -# no existing process -exec ${MOZILLA_EXEC} "$@" - diff -Nru /usr/HEAD/ports/www/mozilla/files/patch-xpfe_bootstrap_mozilla.in www/mozilla/files/patch-xpfe_bootstrap_mozilla.in --- /usr/HEAD/ports/www/mozilla/files/patch-xpfe_bootstrap_mozilla.in Thu Jan 1 01:00:00 1970 +++ www/mozilla/files/patch-xpfe_bootstrap_mozilla.in Tue Mar 22 23:04:13 2005 @@ -0,0 +1,434 @@ +--- xpfe/bootstrap/mozilla.in.orig Fri Feb 20 19:13:46 2004 ++++ xpfe/bootstrap/mozilla.in Tue Mar 22 22:40:43 2005 +@@ -29,139 +29,323 @@ + ## the mozilla-bin binary to work. + ## + ++# ++# MOZ_PIS, "Mozilla Plugable Init Scripts" ++# MOZ_PIS_ is the name space used ++# These variables and there meaning are specified in ++# mozilla/xpfe/bootstrap/init.d/README + moz_pis_startstop_scripts() + { +- MOZ_USER_DIR="%MOZ_USER_DIR%" +- # MOZ_PIS_ is the name space for "Mozilla Plugable Init Scripts" +- # These variables and there meaning are specified in +- # mozilla/xpfe/bootstrap/init.d/README +- MOZ_PIS_API=2 +- MOZ_PIS_MOZBINDIR="${dist_bin}" +- MOZ_PIS_SESSION_PID="$$" +- MOZ_PIS_USER_DIR="${MOZ_USER_DIR}" +- export MOZ_PIS_API MOZ_PIS_MOZBINDIR MOZ_PIS_SESSION_PID MOZ_PIS_USER_DIR +- +- case "${1}" in +- "start") +- for curr_pis in "${dist_bin}/init.d"/S* "${HOME}/${MOZ_USER_DIR}/init.d"/S* ; do +- if [ -x "${curr_pis}" ] ; then +- case "${curr_pis}" in +- *.sh) . "${curr_pis}" ;; +- *) "${curr_pis}" "start" ;; +- esac +- fi +- done +- ;; +- "stop") +- for curr_pis in "${HOME}/${MOZ_USER_DIR}/init.d"/K* "${dist_bin}/init.d"/K* ; do +- if [ -x "${curr_pis}" ] ; then +- case "${curr_pis}" in +- *.sh) . "${curr_pis}" ;; +- *) "${curr_pis}" "stop" ;; +- esac +- fi +- done +- ;; +- *) +- echo 1>&2 "$0: Internal error in moz_pis_startstop_scripts." +- exit 1 +- ;; +- esac ++ MOZ_PIS_API=2 ++ MOZ_PIS_MOZBINDIR="${dist_bin}" ++ MOZ_PIS_SESSION_PID="$$" ++ MOZ_PIS_USER_DIR="${MOZ_USER_DIR}" ++ export MOZ_PIS_API MOZ_PIS_MOZBINDIR MOZ_PIS_SESSION_PID MOZ_PIS_USER_DIR ++ ++ case "${1}" in ++ "start") ++ for curr_pis in "${MOZ_PIS_MOZBINDIR}/init.d"/S* \ ++ "${HOME}/${MOZ_PIS_USER_DIR}/init.d"/S*; do ++ if [ -x "${curr_pis}" ]; then ++ case "${curr_pis}" in ++ *.sh) ++ . "${curr_pis}" ++ ;; ++ *) ++ ${curr_pis} "start" ++ ;; ++ esac ++ fi ++ done ++ ;; ++ "stop") ++ for curr_pis in "${MOZ_PIS_MOZBINDIR}/init.d"/K* \ ++ "${HOME}/${MOZ_PIS_USER_DIR}/init.d"/K*; do ++ if [ -x "${curr_pis}" ]; then ++ case "${curr_pis}" in ++ *.sh) ++ . "${curr_pis}" ++ ;; ++ *) ++ ${curr_pis} "stop" ++ ;; ++ esac ++ fi ++ done ++ ;; ++ *) ++ echo "$0: Internal error in moz_pis_startstop_scripts." 1>&2 ++ exit 1 ++ ;; ++ esac + } + + #uncomment for debugging + #set -x + +-moz_libdir=%MOZAPPDIR% +-MRE_HOME=%MREDIR% ++# ++# variables ++# ++location="new-tab" ++#MOZILLA_UILOCALE="en-US" ++#MOZILLA_UIREGION="US" + +-# honor MOZILLA_FIVE_HOME if it's there +-if [ -n "$MOZILLA_FIVE_HOME" ] ; then +- dist_bin="$MOZILLA_FIVE_HOME" +-else +- # Use run-mozilla.sh in the current dir if it exists +- # If not, then start resolving symlinks until we find run-mozilla.sh +- found=0 +- progname=$0 +- curdir=`dirname "$progname"` +- run_moz="$curdir/run-mozilla.sh" +- if test -x "$run_moz"; then +- dist_bin=$curdir ++# ++# working definitions ++# ++MOZ_USER_DIR="%MOZ_USER_DIR%" ++moz_libdir="%MOZAPPDIR%" ++MRE_HOME="%MREDIR%" ++ ++debugging= # set the debugging level ++use_openFile="yes" # use openFile() for file/dir ++here=`pwd` ++ ++if [ ! -d "${MRE_HOME}" ]; then ++ # use moz_libdir as MRE_HOME ++ MRE_HOME="${moz_libdir}" ++fi ++export MRE_HOME ++ ++# Use run-mozilla.sh in the current dir if it exists ++# If not, then start resolving symlinks until we find run-mozilla.sh ++found=0 ++progname="$0" ++curdir=`dirname "$progname"` ++progbase=`basename "$progname"` ++run_moz="$curdir/run-mozilla.sh" ++# mozilla must obey MOZILLA_FIVE_HOME ++if [ -n "$MOZILLA_FIVE_HOME" -a -d "$MOZILLA_FIVE_HOME" -a \ ++ -x "$MOZILLA_FIVE_HOME/run-mozilla.sh" ]; then ++ curdir="$MOZILLA_FIVE_HOME" ++ run_moz="$curdir/run-mozilla.sh" ++ dist_bin="$curdir" + found=1 +- else +- here=`/bin/pwd` +- while [ -h "$progname" ]; do +- bn=`basename "$progname"` +- cd `dirname "$progname"` +- progname=`/bin/ls -l "$bn" |sed -e 's/^.* -> //' ` +- if [ ! -x "$progname" ]; then +- break +- fi +- curdir=`dirname "$progname"` +- run_moz="$curdir/run-mozilla.sh" +- if [ -x "$run_moz" ]; then +- cd "$curdir" +- dist_bin=`pwd` +- found=1 +- break +- fi ++elif [ -x "$run_moz" ]; then ++ dist_bin="$curdir" ++ found=1 ++else ++ while [ -h "${progname}" ]; do ++ bn=`basename "${progname}"` ++ cd `dirname "${progname}"` ++ progname=`ls -l "${bn}" | sed -e 's/^.* -> //'` ++ if [ ! -x "$progname" ]; then ++ break ++ fi ++ curdir=`dirname "${progname}"` ++ run_moz="${curdir}/run-mozilla.sh" ++ if [ -x "${run_moz}" ]; then ++ cd "$curdir" ++ dist_bin=`pwd` ++ run_moz="${dist_bin}/run-mozilla.sh" ++ found=1 ++ break ++ fi + done +- cd "$here" +- fi +- if [ $found = 0 ]; then ++ cd "${here}" ++fi ++if [ $found = 0 ]; then + # Check default compile-time libdir +- if [ -x "$moz_libdir/run-mozilla.sh" ]; then +- dist_bin=$moz_libdir +- else +- echo "Cannot find mozilla runtime directory. Exiting." +- exit 1 +- fi +- fi ++ if [ -x "${moz_libdir}/run-mozilla.sh" ]; then ++ dist_bin="$moz_libdir" ++ run_moz="${dist_bin}/run-mozilla.sh" ++ else ++ echo "$0: Cannot find mozilla runtime directory. Exiting." 1>&2 ++ exit 1 ++ fi + fi + +-script_args="" +-moreargs="" +-debugging=0 +-MOZILLA_BIN="%MOZILLA-BIN%" +- ++MOZILLA_BIN="${progbase}-bin" + if [ "$OSTYPE" = "beos" ]; then +- mimeset -F $MOZILLA_BIN ++ mimeset -F "$MOZILLA_BIN" + fi + ++# test for binary apps in ${dist_bin} ++if [ -x "${dist_bin}/${MOZILLA_BIN}" ]; then ++ MOZILLA_BIN="${dist_bin}/${progbase}-bin" ++else ++ echo "$0: Cannot find mozilla binary executable. Exiting." 1>&2 ++ exit 1 ++fi ++if [ -x "${dist_bin}/mozilla-xremote-client" ]; then ++ MOZ_CLIENT_PROGRAM="${dist_bin}/mozilla-xremote-client -a ${progbase}" ++else ++ MOZ_CLIENT_PROGRAM="${MOZILLA_BIN} -remote -a ${progbase}" ++fi ++ ++# guest a default remote command ++_remote_cmd="xfeDoCommand(openBrowser)" ++ ++# parse options ++script_args= # null ++moreargs= # null ++target= # null ++ALREADY_RUNNING="test" + while [ $# -gt 0 ] + do +- case "$1" in +- -p | -pure) +- MOZILLA_BIN="%MOZILLA-BIN%.pure" +- shift +- ;; +- -g | --debug) +- script_args="$script_args -g" +- debugging=1 +- shift +- ;; +- -d | --debugger) +- script_args="$script_args -d $2" +- shift 2 +- ;; +- *) +- moreargs="$moreargs \"$1\"" +- shift 1 +- ;; +- esac ++ if [ -n "${target}" ]; then ++ # well, this can't be the target if not last ++ moreargs="${moreargs} \"${target}\"" ++ target= # null ++ fi ++ case "$1" in ++ # preserve [pP] for profile ++ --pure | -pure) ++ MOZILLA_BIN="${MOZILLA_BIN}.pure" ++ shift ++ ;; ++ -g | --debug) ++ script_args="${script_args} -g" ++ debugging=1 ++ shift ++ ;; ++ -d | --debugger) ++ if [ -n "$2" ]; then ++ script_args="${script_args} -d $2" ++ shift 2 ++ else ++ "$0: ERROR, $1 needs an argument. Exiting" 1>&2 ++ exit 1 ++ fi ++ ;; ++ -[Uu][Ii][Ll]ocale) ++ if [ -n "$2" ]; then ++ uilocale="$2" ++ shift 2 ++ else ++ echo "$0: ERROR, $1 needs an argument. Exiting" 1>&2 ++ exit 1 ++ fi ++ ;; ++ -[Uu][Ii][Rr]egion) ++ if [ -n "$2" ]; then ++ uiregion="$2" ++ shift 2 ++ else ++ echo "$0: ERROR, $1 needs an argument. Exiting" 1>&2 ++ exit 1 ++ fi ++ ;; ++ -browser) ++ # browser is default for mozilla ++ shift ++ ;; ++ -mail) ++ _remote_cmd="xfeDoCommand(openInbox)" ++ moreargs="${moreargs} $1" ++ shift ++ ;; ++ -compose) ++ _remote_cmd="xfeDoCommand(composeMessage)" ++ moreargs="${moreargs} $1" ++ shift ++ ;; ++ -turbo | -nosplash | -quiet) ++ # use remote even with this ++ moreargs="${moreargs} $1" ++ shift ++ ;; ++ -*) ++ # don't use remote with options ++ ALREADY_RUNNING= # null ++ moreargs="${moreargs} $1" ++ shift ++ ;; ++ *) ++ target="$1" ++ shift ++ ;; ++ esac + done + +-export MRE_HOME +-eval "set -- $moreargs" ++# test for a running copy of firefox ++# seems this is not needed ++#if [-n "${ALREADY_RUNNING}" ]; then ++# if [ -n "${DISPLAY}" ]; then ++# if [ -n "${debugging}" ]; then ++# echo "${run_moz} ${MOZ_CLIENT_PROGRAM} ping()" ++# ${run_moz} ${MOZ_CLIENT_PROGRAM} 'ping()' && ALREADY_RUNNING="yes" ++# else ++# ${run_moz} ${MOZ_CLIENT_PROGRAM} 'ping()' >/dev/null 2>&1 && ++# ALREADY_RUNNING="yes" ++# fi ++# elif [ -n "${debugging}" ]; then ++# echo "$0: WARN, no DISPLAY environment" 1>&2 ++# fi ++#fi ++ ++# process target ++if [ -n "${target}" ]; then ++ moreargs="${moreargs} \"${target}\"" ++ if [ -n "${ALREADY_RUNNING}" ]; then ++ if [ `expr "${target}" : '.*:.*'` -eq 0 ]; then ++ if [ `expr "${target}" : '/.*'` -eq 0 ]; then ++ target="${here}/${target}" ++ fi ++ if [ -r "${target}" -o -d "${target}" ]; then ++ [ -n "${use_openFile}" ] || target="file://${target}" ++ else ++ echo "$0: WARN, target: ${target} not an URI/file/dir" 1>&2 ++ ALREADY_RUNNING= # null ++ fi ++ else ++ # an former URI, don't use openFile ++ use_openFile= # null ++ fi ++ fi ++fi ++ ++# try remote protocol if running ++if [ -n "${ALREADY_RUNNING}" ]; then ++ if [ -n "${target}" ]; then ++ if [ -n "${use_openFile}" ]; then ++ _remote_cmd="openFile(${target})" ++ elif [ -n "${location}" ]; then ++ _remote_cmd="openURL(${target},${location})" ++ else ++ _remote_cmd="openURL(${target})" ++ fi ++ fi ++ # FIXME problems with freedesktop StartupNotify ++ if [ -n "${debugging}" ]; then ++ echo "${run_moz} ${script_args} ${MOZ_CLIENT_PROGRAM} ${_remote_cmd}" ++ ${run_moz} ${script_args} ${MOZ_CLIENT_PROGRAM} ${_remote_cmd} && ++ exit 0 ++ else ++ ${run_moz} ${script_args} ${MOZ_CLIENT_PROGRAM} ${_remote_cmd} \ ++ >/dev/null 2>&1 && exit 0 ++ fi ++fi ++ ++# fallback to direct invocation ++ ++# UILocale, UIRegion ++if [ -z "${uilocale}" -a -n "${MOZILLA_UILOCALE}" ]; then ++ uilocale="${MOZILLA_UILOCALE}" ++fi ++if [ -z "${uiregion}" -a -n "${MOZILLA_UIREGION}" ]; then ++ uiregion="${MOZILLA_UIREGION}" ++fi ++if [ -n "${uiregion}" -a -z "${uilocale}" ]; then ++ uilocale="en-US" ++fi ++if [ -n "${uilocale}" ]; then ++ if [ -n "${uiregion}" ]; then ++ moreargs="-UIRegion ${uiregion} ${moreargs}" ++ fi ++ moreargs="-UILocale ${uilocale} ${moreargs}" ++fi ++ ++# real invocation ++eval "set -- ${moreargs}" + + ## Start addon scripts + moz_pis_startstop_scripts "start" + +-if [ $debugging = 1 ] +-then +- echo $dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@" ++if [ -n "${debugging}" ]; then ++ echo "${run_moz} ${script_args} ${MOZILLA_BIN} $@" + fi +-"$dist_bin/run-mozilla.sh" $script_args "$dist_bin/$MOZILLA_BIN" "$@" ++${run_moz} ${script_args} ${MOZILLA_BIN} "$@" + exitcode=$? + + ## Stop addon scripts --- patch-mozilla ends here --- >Release-Note: >Audit-Trail: >Unformatted: