diff options
author | ahze <ahze@FreeBSD.org> | 2006-03-15 20:17:25 +0800 |
---|---|---|
committer | ahze <ahze@FreeBSD.org> | 2006-03-15 20:17:25 +0800 |
commit | de87384f48bf823c06dd00921e4aede59c9ef60c (patch) | |
tree | b5bde5f1eb996b57795f323f305dbd4d7b02ea16 | |
parent | 5d4f9b234acf22bb65595c045df70eeaedb8ee4e (diff) | |
download | freebsd-ports-gnome-de87384f48bf823c06dd00921e4aede59c9ef60c.tar.gz freebsd-ports-gnome-de87384f48bf823c06dd00921e4aede59c9ef60c.tar.zst freebsd-ports-gnome-de87384f48bf823c06dd00921e4aede59c9ef60c.zip |
- Add patch to support MOZ_PIS scripts
Submitted by: aflist@gmail.com
-rw-r--r-- | www/seamonkey/Makefile | 2 | ||||
-rw-r--r-- | www/seamonkey/files/patch-xpfe_bootstrap_mozilla.in | 441 | ||||
-rw-r--r-- | www/seamonkey/pkg-deinstall.in | 2 | ||||
-rw-r--r-- | www/seamonkey2/Makefile | 2 | ||||
-rw-r--r-- | www/seamonkey2/files/patch-xpfe_bootstrap_mozilla.in | 441 | ||||
-rw-r--r-- | www/seamonkey2/pkg-deinstall.in | 2 |
6 files changed, 886 insertions, 4 deletions
diff --git a/www/seamonkey/Makefile b/www/seamonkey/Makefile index 232483d82bec..ee0cf109beea 100644 --- a/www/seamonkey/Makefile +++ b/www/seamonkey/Makefile @@ -3,7 +3,7 @@ # Whom: eivind/dima/jseger # # $FreeBSD$ -# $MCom: ports/www/seamonkey/Makefile,v 1.35 2005/11/28 19:28:49 ahze Exp $ +# $MCom: ports-stable/www/seamonkey/Makefile,v 1.1 2006/03/09 21:26:46 ahze Exp $ # PORTNAME= seamonkey diff --git a/www/seamonkey/files/patch-xpfe_bootstrap_mozilla.in b/www/seamonkey/files/patch-xpfe_bootstrap_mozilla.in new file mode 100644 index 000000000000..6ea8a35682d8 --- /dev/null +++ b/www/seamonkey/files/patch-xpfe_bootstrap_mozilla.in @@ -0,0 +1,441 @@ +--- xpfe/bootstrap/mozilla.in.orig Tue Mar 7 16:02:19 2006 ++++ xpfe/bootstrap/mozilla.in Tue Mar 7 18:13:59 2006 +@@ -49,142 +49,324 @@ + ## the application 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 +- run_moz="$moz_libdir/run-mozilla.sh" +- else +- echo "Cannot find %MOZ_APP_DISPLAYNAME% 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="" +-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" + pass_arg_count=0 + while [ $# -gt $pass_arg_count ] + 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 +- ;; +- *) +- # Move the unrecognized argument to the end of the list. +- arg="$1" +- shift +- set -- "$@" "$arg" +- pass_arg_count=`expr $pass_arg_count + 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 ++# 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 + + + + diff --git a/www/seamonkey/pkg-deinstall.in b/www/seamonkey/pkg-deinstall.in index cea8b574be77..2aa8d7e4847a 100644 --- a/www/seamonkey/pkg-deinstall.in +++ b/www/seamonkey/pkg-deinstall.in @@ -1,7 +1,7 @@ #!/bin/sh # # $FreeBSD$ -# $MCom: ports/www/seamonkey/pkg-deinstall.in,v 1.9 2005/11/11 04:11:02 ahze Exp $ +# $MCom: ports-stable/www/seamonkey/pkg-deinstall.in,v 1.1 2006/03/09 21:26:46 ahze Exp $ # # Date created: Mon Nov 29, 2003 # Whom: Thierry Thomas (<thierry@pompo.net>) diff --git a/www/seamonkey2/Makefile b/www/seamonkey2/Makefile index 232483d82bec..ee0cf109beea 100644 --- a/www/seamonkey2/Makefile +++ b/www/seamonkey2/Makefile @@ -3,7 +3,7 @@ # Whom: eivind/dima/jseger # # $FreeBSD$ -# $MCom: ports/www/seamonkey/Makefile,v 1.35 2005/11/28 19:28:49 ahze Exp $ +# $MCom: ports-stable/www/seamonkey/Makefile,v 1.1 2006/03/09 21:26:46 ahze Exp $ # PORTNAME= seamonkey diff --git a/www/seamonkey2/files/patch-xpfe_bootstrap_mozilla.in b/www/seamonkey2/files/patch-xpfe_bootstrap_mozilla.in new file mode 100644 index 000000000000..6ea8a35682d8 --- /dev/null +++ b/www/seamonkey2/files/patch-xpfe_bootstrap_mozilla.in @@ -0,0 +1,441 @@ +--- xpfe/bootstrap/mozilla.in.orig Tue Mar 7 16:02:19 2006 ++++ xpfe/bootstrap/mozilla.in Tue Mar 7 18:13:59 2006 +@@ -49,142 +49,324 @@ + ## the application 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 +- run_moz="$moz_libdir/run-mozilla.sh" +- else +- echo "Cannot find %MOZ_APP_DISPLAYNAME% 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="" +-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" + pass_arg_count=0 + while [ $# -gt $pass_arg_count ] + 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 +- ;; +- *) +- # Move the unrecognized argument to the end of the list. +- arg="$1" +- shift +- set -- "$@" "$arg" +- pass_arg_count=`expr $pass_arg_count + 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 ++# 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 + + + + diff --git a/www/seamonkey2/pkg-deinstall.in b/www/seamonkey2/pkg-deinstall.in index cea8b574be77..2aa8d7e4847a 100644 --- a/www/seamonkey2/pkg-deinstall.in +++ b/www/seamonkey2/pkg-deinstall.in @@ -1,7 +1,7 @@ #!/bin/sh # # $FreeBSD$ -# $MCom: ports/www/seamonkey/pkg-deinstall.in,v 1.9 2005/11/11 04:11:02 ahze Exp $ +# $MCom: ports-stable/www/seamonkey/pkg-deinstall.in,v 1.1 2006/03/09 21:26:46 ahze Exp $ # # Date created: Mon Nov 29, 2003 # Whom: Thierry Thomas (<thierry@pompo.net>) |