diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2005-03-25 06:01:49 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2005-03-25 06:01:49 +0000 |
commit | c9e3ed99194c2ecee8db2f77b797064aa9e97af3 (patch) | |
tree | 6db49dbbb1dddbed037442ca09cd4eeef36ef156 /www/mozilla | |
parent | 1bfc3f6afd8beff83afff91e78eee4e60f2a8c6b (diff) | |
download | ports-c9e3ed99194c2ecee8db2f77b797064aa9e97af3.tar.gz ports-c9e3ed99194c2ecee8db2f77b797064aa9e97af3.zip |
Notes
Diffstat (limited to 'www/mozilla')
-rw-r--r-- | www/mozilla/Makefile | 38 | ||||
-rw-r--r-- | www/mozilla/distinfo | 4 | ||||
-rw-r--r-- | www/mozilla/files/mozilla.desktop.in | 2 | ||||
-rw-r--r-- | www/mozilla/files/mozilla.sh | 85 | ||||
-rw-r--r-- | www/mozilla/files/patch-xpfe_bootstrap_mozilla.in | 434 |
5 files changed, 462 insertions, 101 deletions
diff --git a/www/mozilla/Makefile b/www/mozilla/Makefile index 9e3bc708df10..b40b7db72551 100644 --- a/www/mozilla/Makefile +++ b/www/mozilla/Makefile @@ -6,8 +6,8 @@ # PORTNAME?= mozilla -PORTVERSION= 1.7.5 -PORTREVISION?= 2 +PORTVERSION= 1.7.6 +PORTREVISION?= 1 PORTEPOCH?= 2 CATEGORIES?= www MASTER_SITES= ${MASTER_SITE_MOZILLA} \ @@ -22,13 +22,10 @@ DISTFILES= ${PORTNAME}-source-${PORTVERSION}${EXTRACT_SUFX} MAINTAINER= gnome@FreeBSD.org COMMENT= The open source, standards compliant web browser -BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip \ - freetype-config:${PORTSDIR}/print/freetype2 +BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \ png.5:${PORTSDIR}/graphics/png \ - mng.1:${PORTSDIR}/graphics/libmng \ - freetype.9:${PORTSDIR}/print/freetype2 \ - nspr4.1:${PORTSDIR}/devel/nspr + mng.1:${PORTSDIR}/graphics/libmng WRKSRC= ${WRKDIR}/${PORTNAME} @@ -100,6 +97,9 @@ JPI_LIST?=\ ${LOCALBASE}/diablo-jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so \ ${LOCALBASE}/jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so +# moz_pis +MOZ_PIS_SCRIPTS= # no default scripts + OPTIONS=XFT "Enable Xft font anti-aliasing" on \ CALENDAR "Enable the Calendar module" off \ MAILNEWS "Enable Mail and News modules" on \ @@ -191,6 +191,7 @@ MAKE_ENV= LD_LIBRARY_PATH=${WRKSRC}/dist/bin \ MOZ_INTERNAL_LIBART_LGPL=1 ALL_TARGET= default FAKEDIR= ${WRKDIR}/fake +MOZ_PIS_DIR= ${FAKEDIR}/lib/${MOZILLA}/init.d #.if ${ARCH} == "i386" #CONFIGURE_ARGS+= --enable-reorder @@ -214,7 +215,7 @@ CONFIGURE_ARGS+= --enable-optimize=-O2 .endif .if defined(WITH_MENU_ENTRY) -USE_GNOME+= gnomehier +USE_GNOME+= gnomehier desktopfileutils .endif .if ${ARCH} == "alpha" && ${OSVERSION} < 500035 @@ -276,6 +277,12 @@ post-patch: @${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \ < ${FILESDIR}/mozilla.desktop.in > \ ${WRKDIR}/mozilla.desktop +.for ii in ${MOZ_PIS_SCRIPTS} + @${SED} -e 's|%%MOZILLA%%|${MOZILLA}|g ; \ + s|%%PREFIX%%|${PREFIX}|g ; \ + s|%%X11BASE%%|${X11BASE}|g' \ + < ${FILESDIR}/moz_pis_${ii} > ${WRKDIR}/moz_pis_${ii} +.endfor pre-configure: @if [ -n "`${PKG_INFO} -xI '^bind[0-9]*-base-[0-9]'`" ]; then \ @@ -283,15 +290,12 @@ pre-configure: ${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} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \ Makefile ${MAKE_ARGS} install + ${MKDIR} ${MOZ_PIS_DIR} ${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g' \ ${FAKEDIR}/bin/mozilla \ ${FAKEDIR}/bin/mozilla-config @@ -313,6 +317,9 @@ pre-install: ${ECHO_CMD} "@unexec ${RMDIR} %D/lib/browser_plugins 2>/dev/null || ${TRUE}" >> ${PLIST} ${ECHO_CMD} lib/${MOZILLA}/mozilla >> ${PLIST} ${ECHO_CMD} lib/${MOZILLA}/mozilla-config >> ${PLIST} +.for ii in ${MOZ_PIS_SCRIPTS} + ${INSTALL_SCRIPT} ${WRKDIR}/moz_pis_${ii} ${MOZ_PIS_DIR}/${ii} +.endfor .if !defined(WITHOUT_MAILNEWS) @${CP} -RL ${WRKSRC}/dist/bin/defaults/isp ${FAKEDIR}/lib/${MOZILLA}/defaults .endif @@ -332,6 +339,8 @@ pre-install: && ${FIND} -d * -type d | \ ${SED} -e 's:^:@dirrm include/${MOZILLA}/:' >> ${PLIST} ${ECHO_CMD} @dirrm include/${MOZILLA} >> ${PLIST} + ${ECHO_CMD} "@exec ${LOCALBASE}/bin/update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST} + ${ECHO_CMD} "@unexec ${LOCALBASE}/bin/update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST} do-install: ${MKDIR} ${PREFIX}/lib/${MOZILLA} @@ -340,7 +349,7 @@ do-install: ${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 @@ -379,5 +388,8 @@ post-install: .if !defined(PACKAGE_BUILDING) @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif +.if defined(WITH_MENU_ENTRY) + @-update-desktop-database +.endif .include <bsd.port.post.mk> diff --git a/www/mozilla/distinfo b/www/mozilla/distinfo index a8ffe6243946..6ea084fbc9e3 100644 --- a/www/mozilla/distinfo +++ b/www/mozilla/distinfo @@ -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 --git a/www/mozilla/files/mozilla.desktop.in b/www/mozilla/files/mozilla.desktop.in index 2c0e68dabd3c..191765663938 100644 --- a/www/mozilla/files/mozilla.desktop.in +++ b/www/mozilla/files/mozilla.desktop.in @@ -161,7 +161,7 @@ Comment[wa]=Naivyî avå les waibes 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 --git a/www/mozilla/files/mozilla.sh b/www/mozilla/files/mozilla.sh deleted file mode 100644 index 870b74e8cd38..000000000000 --- a/www/mozilla/files/mozilla.sh +++ /dev/null @@ -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 --git a/www/mozilla/files/patch-xpfe_bootstrap_mozilla.in b/www/mozilla/files/patch-xpfe_bootstrap_mozilla.in new file mode 100644 index 000000000000..7a7b2cc5ff89 --- /dev/null +++ b/www/mozilla/files/patch-xpfe_bootstrap_mozilla.in @@ -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 |