diff options
author | ahze <ahze@FreeBSD.org> | 2005-02-28 09:43:57 +0800 |
---|---|---|
committer | ahze <ahze@FreeBSD.org> | 2005-02-28 09:43:57 +0800 |
commit | 3956388e75513412074f8671cb5699c0bb73a468 (patch) | |
tree | 3d2ef9d3ba9a42e09b163b756365e859a87c78b0 /www/seamonkey | |
parent | 7b514664ca7ee8fc7e198c32ea0d07fc02031211 (diff) | |
download | freebsd-ports-graphics-3956388e75513412074f8671cb5699c0bb73a468.tar.gz freebsd-ports-graphics-3956388e75513412074f8671cb5699c0bb73a468.tar.zst freebsd-ports-graphics-3956388e75513412074f8671cb5699c0bb73a468.zip |
- Update to 1.8b1
(Release notes: http://www.mozilla.org/releases/mozilla1.8b1/ )
- Add new launch script [1]
- Sanitize CFLAGS [1]
- Add Mozilla Plugable Init Scripts (PIS) to handle upgrades with ease [1]
PR: ports/77744 [1]
Submitted by: Jose M Rodriguez <josemi@freebsd.jazztel.es> [1]
Diffstat (limited to 'www/seamonkey')
-rw-r--r-- | www/seamonkey/Makefile | 51 | ||||
-rw-r--r-- | www/seamonkey/distinfo | 4 | ||||
-rw-r--r-- | www/seamonkey/files/moz_pis_S50cleanhome | 31 | ||||
-rw-r--r-- | www/seamonkey/files/patch-xpfe_bootstrap_mozilla.in | 425 |
4 files changed, 483 insertions, 28 deletions
diff --git a/www/seamonkey/Makefile b/www/seamonkey/Makefile index fc4c10dd28f..dbc5318963c 100644 --- a/www/seamonkey/Makefile +++ b/www/seamonkey/Makefile @@ -6,13 +6,13 @@ # PORTNAME?= mozilla -PORTVERSION= 1.8.a6 +PORTVERSION= 1.8.b1 PORTREVISION?= 0 PORTEPOCH?= 2 CATEGORIES?= www MASTER_SITES= ${MASTER_SITE_MOZILLA} -MASTER_SITE_SUBDIR= mozilla/releases/${PORTNAME}${PORTVERSION:S/.a6/a6/}/source -DISTFILES= ${PORTNAME}-source-${PORTVERSION:S/.a6/a6/}${EXTRACT_SUFX} +MASTER_SITE_SUBDIR= mozilla/releases/${PORTNAME}${PORTVERSION:S/.b1/b1/}/source +DISTFILES= ${PORTNAME}-source-${PORTVERSION:S/.b1/b1/}${EXTRACT_SUFX} MAINTAINER= gnome@FreeBSD.org COMMENT= The open source, standards compliant web browser @@ -22,8 +22,7 @@ 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 + freetype.9:${PORTSDIR}/print/freetype2 WRKSRC= ${WRKDIR}/${PORTNAME} @@ -97,6 +96,10 @@ 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 +SCRIPTS_DIR= ${FAKEDIR}/lib/${MOZILLA} +MOZ_PIS_SCRIPTS= S50cleanhome +MOZ_PIS_DIR= ${SCRIPTS_DIR}/init.d + OPTIONS=XFT "Enable Xft font anti-aliasing" on \ CALENDAR "Enable the Calendar module" off \ MAILNEWS "Enable Mail and News modules" on \ @@ -104,7 +107,6 @@ OPTIONS=XFT "Enable Xft font anti-aliasing" on \ DEBUG "Enable debugging (i.e. gdb) support" off \ LDAP "Enable LDAP support for Mailnews" on \ CHATZILLA "Enable the Chatzilla IRC module" on \ - XMLTERM "Enable the XMLTerm module" on \ JAVASCRIPT_DEBUGGER "Enable the DTD and JavaScript debuggers" off \ OPTIMIZED_CFLAGS "Enable -O2 optimizations" off \ SMB "Enable smb:// URI support using gnomevfs" off @@ -169,9 +171,6 @@ CONFIGURE_ARGS+= --enable-ldap --enable-mailnews .if !defined(WITHOUT_CHATZILLA) MOZ_EXTENSIONS:= ${MOZ_EXTENSIONS},irc .endif -.if !defined(WITHOUT_XMLTERM) -MOZ_EXTENSIONS:= ${MOZ_EXTENSIONS},xmlterm -.endif CONFIGURE_ARGS+= --enable-extensions=${MOZ_EXTENSIONS} .if defined(WITH_JAVASCRIPT_DEBUGGER) @@ -194,6 +193,8 @@ MAKE_ENV= LD_LIBRARY_PATH=${WRKSRC}/dist/bin \ MOZ_INTERNAL_LIBART_LGPL=1 ALL_TARGET= default FAKEDIR= ${WRKDIR}/fake +SCRIPTS_DIR= ${FAKEDIR}/lib/${MOZILLA} +MOZ_PIS_DIR= ${SCRIPTS_DIR}/init.d .if ${ARCH} == "i386" CONFIGURE_ARGS+= --enable-reorder @@ -206,8 +207,10 @@ CONFIGURE_ARGS+=--disable-gnomevfs .endif .if defined(WITH_OPTIMIZED_CFLAGS) -CFLAGS+= -O2 -CONFIGURE_ARGS+= --enable-optimize=-O2 +CFLAGS:= -O2 -fno-strict-aliasing ${CFLAGS:N-O*} +.else +CFLAGS:= -O ${CFLAGS:N-O*:N-m*} +CONFIGURE_ENV+= WITH_OPTIMIZE=-O .endif .if ${ARCH} == "alpha" && ${OSVERSION} < 500035 @@ -218,15 +221,6 @@ IGNORE= "core dumps on alpha during post-build" BROKEN="You must upgrade your freetype port to 1.3.1_2 or higher before installing Mozilla. If you have 1.3.1_2 installed, please remove ${LOCALBASE}/include/freetype, then build Mozilla" .endif -pre-everything:: -.if defined(WITH_CALENDAR) - @${ECHO_MSG} "" - @${ECHO_MSG} "Calendar is still beta software." - @${ECHO_MSG} "Use at your own risk." - @${ECHO_MSG} "http://mozilla.org/projects/calendar/" - @${ECHO_MSG} "" -.endif - post-patch: @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ ${WRKSRC}/build/unix/run-mozilla.sh @@ -280,6 +274,8 @@ pre-install: ${TOUCH} -f ${PLIST} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \ Makefile ${MAKE_ARGS} install + ${MKDIR} ${SCRIPTS_DIR} + ${MKDIR} ${MOZ_PIS_DIR} ${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g' \ ${FAKEDIR}/bin/mozilla \ ${FAKEDIR}/bin/mozilla-config @@ -299,6 +295,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} ${FILESDIR}/moz_pis_${ii} ${MOZ_PIS_DIR}/${ii} +.endfor .if !defined(WITHOUT_MAILNEWS) @${CP} -RL ${WRKSRC}/dist/bin/defaults/isp ${FAKEDIR}/lib/${MOZILLA}/defaults .endif @@ -323,6 +322,12 @@ 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} + for pcfile in ${PKGCONFIG_FILES}; do \ + ${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g' \ + ${WRKSRC}/build/unix/$${pcfile}.pc; \ + ${INSTALL_DATA} ${WRKSRC}/build/unix/$${pcfile}.pc \ + ${PREFIX}/libdata/pkgconfig/$${pcfile}${MOZ_SUFX}.pc ; \ + done ${INSTALL_SCRIPT} ${WRKSRC}/${MOZILLA} ${PREFIX}/bin if [ ! -x ${PREFIX}/bin/mozilla -a ! -L ${PREFIX}/bin/mozilla ]; then \ ${LN} -sf ${PREFIX}/bin/${MOZILLA} ${PREFIX}/bin/mozilla ; \ @@ -340,12 +345,6 @@ do-install: fi; \ done; \ fi - for pcfile in ${PKGCONFIG_FILES}; do \ - ${REINPLACE_CMD} -e 's|${FAKEDIR}|${PREFIX}|g' \ - ${WRKSRC}/build/unix/$${pcfile}.pc; \ - ${INSTALL_DATA} ${WRKSRC}/build/unix/$${pcfile}.pc \ - ${PREFIX}/libdata/pkgconfig/$${pcfile}${MOZ_SUFX}.pc ; \ - done -${RM} -fr ${PREFIX}/include/${MOZILLA} ${MKDIR} ${PREFIX}/include/${MOZILLA} ${CHMOD} 755 ${PREFIX}/include/${MOZILLA} diff --git a/www/seamonkey/distinfo b/www/seamonkey/distinfo index 475e6e526e2..0500ca725e2 100644 --- a/www/seamonkey/distinfo +++ b/www/seamonkey/distinfo @@ -1,2 +1,2 @@ -MD5 (mozilla-source-1.8a6.tar.bz2) = ea5d925b7e2e047f7791781d6a121c26 -SIZE (mozilla-source-1.8a6.tar.bz2) = 31842532 +MD5 (mozilla-source-1.8b1.tar.bz2) = 42a0b25d405ee60128adb0eef4bc0fa0 +SIZE (mozilla-source-1.8b1.tar.bz2) = 32116336 diff --git a/www/seamonkey/files/moz_pis_S50cleanhome b/www/seamonkey/files/moz_pis_S50cleanhome new file mode 100644 index 00000000000..3de5565e39f --- /dev/null +++ b/www/seamonkey/files/moz_pis_S50cleanhome @@ -0,0 +1,31 @@ +#!/bin/sh +# + +# S50cleanhome +# a script to clean up users' Mozilla home directories to make upgrading +# less painful. + +# We run in our own subshell + +# First, verify protocol +[ "$1" != "start" ] && exit 1 +[ -z "${MOZ_PIS_API}" -o ${MOZ_PIS_API} -ne 2 ] && exit 1 +[ -z "${MOZ_PIS_MOZBINDIR}" -o ! -d "${MOZ_PIS_MOZBINDIR}" ] && exit 1 +[ -z "${HOME}" -o ! -d "${HOME}" ] && exit 1 +[ -z "${MOZ_PIS_USER_DIR}" -o ! -d "${HOME}/${MOZ_PIS_USER_DIR}" ] && exit 1 + +# Try to cleanup ${HOME}/${MOZ_PIS_USER_DIR} + +if [ -f "${HOME}/${MOZ_PIS_USER_DIR}/profiles.ini" ]; then + sed -e '/Path=/! d' -e "s,Path=,${HOME}/${MOZ_PIS_USER_DIR}/," \ + "${HOME}/${MOZ_PIS_USER_DIR}/profiles.ini" \ + | while read dir + do + [ ! -d "${dir}" ] && continue + # Debian does this for new builds + # rm -f "${dir}/XUL.mfasl" + # force a rebuild of compreg.dat and xpti.dat for new installations + [ "${dir}/compreg.dat" -ot "${MOZ_PIS_MOZBINDIR}/components.ini" ] && + rm -f "${dir}/compatibility.ini" "${dir}/XUL.mfasl" + done +fi 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 00000000000..c6602d9b800 --- /dev/null +++ b/www/seamonkey/files/patch-xpfe_bootstrap_mozilla.in @@ -0,0 +1,425 @@ +--- xpfe/bootstrap/mozilla.in.orig Sat Apr 17 18:51:11 2004 ++++ xpfe/bootstrap/mozilla.in Thu Feb 17 14:55:17 2005 +@@ -49,139 +49,314 @@ + ## 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 ++elif [ -x "$run_moz" ]; then ++ 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 ++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 ++MOZILLA_BIN="${dist_bin}/${progbase}-bin" ++ ++# test for binary apps in ${dist_bin} ++if [ -x "${dist_bin}/mozilla-xremote-client" ]; then ++ MOZ_CLIENT_PROGRAM="${dist_bin}/mozilla-xremote-client -a ${progbase}" ++elif [ -x "${MOZILLA_BIN}" ]; then ++ MOZ_CLIENT_PROGRAM="${MOZILLA_BIN} -remote -a ${progbase}" ++else ++ echo "$0: Cannot find mozilla binary executable. Exiting." 1>&2 ++ exit 1 ++fi ++ ++# guest a default remote command ++_remote_cmd="xfeDoCommand(openBrowser)" ++ ++# test for a running copy of mozilla ++ALREADY_RUNNING= # null ++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 + ++# parse options ++script_args= # null ++moreargs= # null ++target= # null + 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 ++ -p | --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, -d needs an argument. Exiting" 1>&2 ++ exit 1 ++ fi ++ ;; ++ -UILocale) ++ if [ -n "$2" ]; then ++ uilocale="$2" ++ shift 2 ++ else ++ echo "$0: ERROR, -UILocale needs an argument. Exiting" 1>&2 ++ exit 1 ++ fi ++ ;; ++ -UIRegion) ++ if [ -n "$2" ]; then ++ uiregion="$2" ++ shift 2 ++ else ++ echo "$0: ERROR, -UIRegion needs an argument. Exiting" 1>&2 ++ exit 1 ++ fi ++ ;; ++ -browser) ++ _remote_cmd="xfeDoCommand(openBrowser)" ++ moreargs="${moreargs} $1" ++ shift ++ ;; ++ -mail) ++ _remote_cmd="xfeDoCommand(openInbox)" ++ moreargs="${moreargs} $1" ++ shift ++ ;; ++ -compose) ++ _remote_cmd="xfeDoCommand(composeMessage)" ++ moreargs="${moreargs} $1" ++ shift ++ ;; ++ -chat | -edit | -webcal) ++ # don't use remote for this ++ ALREADY_RUNNING= # null ++ moreargs="${moreargs} $1" ++ shift ++ ;; ++ -*) ++ moreargs="${moreargs} $1" ++ shift ++ ;; ++ *) ++ target="$1" ++ shift ++ ;; ++ esac + done + +-export MRE_HOME +-eval "set -- $moreargs" ++# process target ++if [ -n "${target}" ]; 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 ++ ++# 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}" ++ fi ++ ${run_moz} ${script_args} ${MOZ_CLIENT_PROGRAM} ${_remote_cmd} && exit 0 ++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} ${more_args}" ++ fi ++ moreargs="-UILocale ${uilocale} ${more_args}" ++fi ++ ++# real invocation ++if [ -n "${target}" ]; then ++ eval "set -- ${moreargs} \"${target}\"" ++else ++ eval "set -- ${moreargs}" ++fi + + ## 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 |