summaryrefslogtreecommitdiffstats
path: root/mail/thunderbird-devel
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2005-03-25 05:53:04 +0000
committermarcus <marcus@FreeBSD.org>2005-03-25 05:53:04 +0000
commita3ff86d6b0c2a6bb4dad3094d070d3584549e5af (patch)
treed114da0467e61bc5bc1312087431ab88216d27c7 /mail/thunderbird-devel
parent405a4866fbc2a3857fa2438ba64b1311bfb9432b (diff)
downloadFreeBSD-ports-a3ff86d6b0c2a6bb4dad3094d070d3584549e5af.zip
FreeBSD-ports-a3ff86d6b0c2a6bb4dad3094d070d3584549e5af.tar.gz
* Update to 1.0.2 to fix security issues (see
http://www.vuxml.org/freebsd/7d2aac52-9c6b-11d9-99a7-000a95bc6fae.html for more details) * Cleanup home directories to make migration easier [1] * Add an improved startup script [1] * Support GConf for external protocol handlers PR: 75837 [1] Submitted by: Jose M Rodriguez (freebsd) <josemi@freebsd.jazztel.es> [1] Approved by: portmgr (implicit)
Diffstat (limited to 'mail/thunderbird-devel')
-rw-r--r--mail/thunderbird-devel/Makefile27
-rw-r--r--mail/thunderbird-devel/distinfo4
-rw-r--r--mail/thunderbird-devel/files/moz_pis_S50cleanhome34
-rw-r--r--mail/thunderbird-devel/files/patch-mail_app_mozilla.in506
-rw-r--r--mail/thunderbird-devel/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp29
-rw-r--r--mail/thunderbird-devel/files/thunderbird.desktop.in6
6 files changed, 553 insertions, 53 deletions
diff --git a/mail/thunderbird-devel/Makefile b/mail/thunderbird-devel/Makefile
index f3366b4..7ebedba 100644
--- a/mail/thunderbird-devel/Makefile
+++ b/mail/thunderbird-devel/Makefile
@@ -6,8 +6,8 @@
#
PORTNAME= thunderbird
-PORTVERSION= 1.0
-PORTREVISION= 2
+PORTVERSION= 1.0.2
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= thunderbird/releases/${PORTVERSION}/source
@@ -18,8 +18,7 @@ COMMENT= Mozilla Thunderbird is standalone mail and news that stands above
LIB_DEPENDS= jpeg.9:${PORTSDIR}/graphics/jpeg \
png.5:${PORTSDIR}/graphics/png \
- mng.1:${PORTSDIR}/graphics/libmng \
- nspr4.1:${PORTSDIR}/devel/nspr
+ mng.1:${PORTSDIR}/graphics/libmng
BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip
USE_X_PREFIX= yes
@@ -45,8 +44,12 @@ LOCAL_SUBDIR= lib/${PORTNAME}
LOCAL_PREFIX= ${PREFIX}/${LOCAL_SUBDIR}
ESD_LIB= libesd.so.2
+THUNDERBIRD= ${PORTNAME}
THUNDERBIRD_ICON= thunderbird.xpm
THUNDERBIRD_ICON_SRC= ${WRKSRC}/other-licenses/branding/thunderbird/default.xpm
+MOZ_PIS_SCRIPTS= S50cleanhome
+SCRIPTS_DIR= ${FAKEDIR}/${LOCAL_SUBDIR}/lib/${PORTNAME}-${PORTVERSION}
+MOZ_PIS_DIR= ${SCRIPTS_DIR}/init.d
OPTIONS= DEBUG "Build a debugging image" off \
LOGGING "Enable additional log messages" off \
@@ -69,9 +72,9 @@ CONFIGURE_ENV+= WITH_DEBUG=yes
.endif # defined(WITH_DEBUG)
.if defined(WITH_OPTIMIZED_CFLAGS)
-CFLAGS+= -O2
-CONFIGURE_ENV+= WITH_OPTIMIZE=-O2
+CFLAGS:= -O2 -fno-strict-aliasing ${CFLAGS:N-O*}
.else
+CFLAGS:= -O ${CFLAGS:N-O*:N-m*}
CONFIGURE_ENV+= WITH_OPTIMIZE=-O
.endif # defined(WITH_OPTIMIZED_CFLAGS)
@@ -140,6 +143,12 @@ post-patch:
< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
@${SED} -e 's|@THUNDERBIRD_ICON@|${THUNDERBIRD_ICON}|' \
< ${FILESDIR}/thunderbird.desktop.in > ${WRKDIR}/thunderbird.desktop
+.for ii in ${MOZ_PIS_SCRIPTS}
+ @${SED} -e 's|%%MOZILLA%%|${THUNDERBIRD}|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 \
@@ -159,6 +168,8 @@ pre-install:
@${RM} -rf ${FAKEDIR} ${PLIST}
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
Makefile ${MAKE_ARGS} install
+ @${MKDIR} ${SCRIPTS_DIR}
+ @${MKDIR} ${MOZ_PIS_DIR}
.for ii in mac win
.for jj in / .jar
@${RM} -rf ${FAKEDIR}/lib/${PORTNAME}/lib/${PORTNAME}-${PORTVERSION}/chrome/en-${ii}${jj}
@@ -168,6 +179,9 @@ pre-install:
.for ii in thunderbird thunderbird-config
@${ECHO_CMD} bin/${ii} >> ${PLIST}
.endfor
+.for ii in ${MOZ_PIS_SCRIPTS}
+ ${INSTALL_SCRIPT} ${WRKDIR}/moz_pis_${ii} ${MOZ_PIS_DIR}/${ii}
+.endfor
@${MKDIR} ${FAKEDIR}/${LOCAL_SUBDIR}/lib/${PORTNAME}-${PORTVERSION}/defaults
@${CP} -RL ${WRKSRC}/dist/bin/defaults/isp \
${FAKEDIR}/${LOCAL_SUBDIR}/lib/${PORTNAME}-${PORTVERSION}/defaults
@@ -178,7 +192,6 @@ pre-install:
"s:^:@unexec ${RMDIR} %D/:" -e "s:$$: || true:" >> ${PLIST}; \
${FIND} * -type d ! -empty | ${SORT} -r | ${SED} -e "s:^:@dirrm :" | \
${GREP} / >> ${PLIST}
- ${ECHO_CMD} '@dirrm ${LOCAL_SUBDIR}/defaults/isp' >> ${PLIST}
${ECHO_CMD} 'share/gnome/pixmaps/${THUNDERBIRD_ICON}' >> ${PLIST}
${ECHO_CMD} 'share/gnome/applications/thunderbird.desktop' >> ${PLIST}
diff --git a/mail/thunderbird-devel/distinfo b/mail/thunderbird-devel/distinfo
index 70f60b0..ba9f249 100644
--- a/mail/thunderbird-devel/distinfo
+++ b/mail/thunderbird-devel/distinfo
@@ -1,2 +1,2 @@
-MD5 (thunderbird-1.0-source.tar.bz2) = 232ffe434fd65f5f0284a760d6e4ba2a
-SIZE (thunderbird-1.0-source.tar.bz2) = 33255315
+MD5 (thunderbird-1.0.2-source.tar.bz2) = 9e5b8a3edb3ced400e769dc2faa45317
+SIZE (thunderbird-1.0.2-source.tar.bz2) = 33354397
diff --git a/mail/thunderbird-devel/files/moz_pis_S50cleanhome b/mail/thunderbird-devel/files/moz_pis_S50cleanhome
new file mode 100644
index 0000000..3485923
--- /dev/null
+++ b/mail/thunderbird-devel/files/moz_pis_S50cleanhome
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+
+# S50cleanhome
+# a script to polite ${HOME}/${MOZ_PIS_USER_DIR}
+
+# 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 polite ${HOME}/${MOZ_PIS_USER_DIR}
+
+# This must be really needed?
+# rm -f "${$HOME}/${MOZ_PIS_USER_DIR}/pluginreg.dat"
+
+# Try to polite profile dirs
+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
+ # at last, debian do this, we do for new builds
+ # rm -f "${dir}/XUL.mfasl"
+ # make reclaculate compreg.dat, xpti.dat for new builds
+ [ "${dir}/compreg.dat" -ot "${MOZ_PIS_MOZBINDIR}/components.ini" ] &&
+ rm -f "${dir}/compatibility.ini" "${dir}/XUL.mfasl"
+ done
+fi
diff --git a/mail/thunderbird-devel/files/patch-mail_app_mozilla.in b/mail/thunderbird-devel/files/patch-mail_app_mozilla.in
index a296ae8..01091fb 100644
--- a/mail/thunderbird-devel/files/patch-mail_app_mozilla.in
+++ b/mail/thunderbird-devel/files/patch-mail_app_mozilla.in
@@ -1,50 +1,472 @@
---- mail/app/mozilla.in.orig Sat Jul 24 19:58:06 2004
-+++ mail/app/mozilla.in Mon Dec 27 18:40:04 2004
-@@ -167,12 +167,12 @@
- done #others arg
+--- mail/app/mozilla.in.orig Sun Jul 25 01:58:06 2004
++++ mail/app/mozilla.in Tue Mar 22 23:59:11 2005
+@@ -29,51 +29,82 @@
+ ## the mozilla-bin binary to work.
+ ##
- #???: needs check if othersopt begin with -* ?
++#
++# 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
++# uncomment for debugging
+ #set -x
+
+-moz_libdir=%MOZAPPDIR%
+-MRE_HOME=%MREDIR%
++#
++# variables
++#
++#location="new-tab"
++#MOZILLA_UILOCALE="en-US"
++#MOZILLA_UIREGION="US"
++
++#
++# working definitions
++#
++MOZ_USER_DIR="%MOZ_USER_DIR%"
++moz_libdir="%MOZAPPDIR%"
++MRE_HOME="%MREDIR%"
++
++debugging= # set the debugging level
++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
+@@ -82,160 +113,214 @@
+ curdir=`dirname "$progname"`
+ progbase=`basename "$progname"`
+ run_moz="$curdir/run-mozilla.sh"
+-if test -x "$run_moz"; then
+- dist_bin="$curdir"
+- found=1
++if [ -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
+- done
+- cd "$here"
++ 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
+- # 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
+-
+-script_args=""
+-moreargs=""
+-debugging=0
+-MOZILLA_BIN="${progbase}-bin"
+-
+-# The following is to check for a currently running instance.
+-# This is taken almost verbatim from the Mozilla RPM package's launch script.
+-MOZ_CLIENT_PROGRAM="$dist_bin/mozilla-xremote-client"
+-check_running() {
+- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" 'ping()' 2>/dev/null >/dev/null
+- RETURN_VAL=$?
+- if [ $RETURN_VAL -eq 0 ]; then
+- echo 1
+- return 1
++ # Check default compile-time libdir
++ if [ -x "${moz_libdir}/run-mozilla.sh" ]; then
++ dist_bin="$moz_libdir"
++ run_moz="${dist_bin}/run-mozilla.sh"
+ else
+- echo 0
+- return 0
++ echo "$0: Cannot find mozilla runtime directory. Exiting." 1>&2
++ exit 1
+ fi
+-}
++fi
+
++MOZILLA_BIN="${progbase}-bin"
+ if [ "$OSTYPE" = "beos" ]; then
+- mimeset -F "$MOZILLA_BIN"
++ mimeset -F "$MOZILLA_BIN"
+ fi
+
+-ALREADY_RUNNING=`check_running`
++# 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
+
+-################################################################ Parse Arguments
+-# If there's a command line argument but it doesn't begin with a -
+-# it's probably a url. Try to send it to a running instance.
+-_USE_EXIST=0
+-_NEW_WINDOW=
+-_optOne="$1"
+-case "${_optOne}" in
+- -*)
+- ;;
++# guest a default remote command
++_remote_cmd="xfeDoCommand(openInbox)"
++
++# parse options
++script_args= # null
++moreargs= # null
++target= # null
++ALREADY_RUNNING="test"
++while [ $# -gt 0 ]
++do
++ 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
++ ;;
++ -mail)
++ # mail is default for ithunderbird
++ 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
++ ;;
+ *)
+- _USE_EXIST=1
+- ;;
+-esac
+-
+-_optOthers=
+-_optLast=
+-for i in "$@"; do
+- _optLast="${i}"
+-done #last arg
+-
+-for i in "$@"; do
+- [ $i = ${_optLast} ] && break
+- _optOthers="${_optOthers} ${i}"
+-done #others arg
+-
+-#???: needs check if othersopt begin with -* ?
-if [ `expr "${_optLast}" : '.*:/.*'` -eq 0 -a \( -f "${_optLast}" -o -d "${_optLast}" \) ]; then
-+if [ `expr X"${_optLast}" : 'X.*:/.*'` -eq 0 -a \( -f "${_optLast}" -o -d "${_optLast}" \) ]; then
- # Last argument seems to be a local file/directory
- # Check, if it is absolutely specified (ie. /home/foo/file vs. ./file)
- # If it is just "relatively" (./file) specified, make it absolutely
+- # Last argument seems to be a local file/directory
+- # Check, if it is absolutely specified (ie. /home/foo/file vs. ./file)
+- # If it is just "relatively" (./file) specified, make it absolutely
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
-elif [ `expr "${_optLast}" : '.*:/.*'` -gt 0 -o -n "${_optOthers}" ]; then #???? like before...
-+ [ `expr X"${_optLast}" : 'X/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
-+elif [ `expr X"${_optLast}" : 'X.*:/.*'` -gt 0 -o -n "${_optOthers}" ]; then #???? like before...
- _NEW_WINDOW=1
+- _NEW_WINDOW=1
+-fi
+-################################################################ Parse Arguments
+-
+-########################################################################### Main
+-if [ $ALREADY_RUNNING -eq 1 ]; then
+- # There's an instance already running. Use it.
+- # Any command line args passed in?
+- if [ $# -gt 0 ]; then
+- # There were "some" command line args.
+- if [ ${_USE_EXIST} -eq 1 ]; then
+- # We should use an existing instance, as _USE_EXIST=$_USE_EXIST=-1
+- _open_type="window"
+- #_open_type="tab"
+- _remote_cmd="openURL(${_optLast} , new-${_open_type})"
+- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "${_remote_cmd}"
+- unset _remote_cmd _open_type
+- exit $?
+- fi
++ target="$1"
++ shift
++ ;;
++ esac
++done
++
++# 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
++ # not an URI, don't use xremote
++ ALREADY_RUNNING= # null
++ fi
++ fi
++fi
++
++# try remote protocol if running
++if [ -n "${ALREADY_RUNNING}" ]; then
++ if [ -n "${target}" ]; then
++ if [ -n "${location}" ]; then
++ _remote_cmd="openURL(${target},${location})"
+ else
+- # No command line args. Open new window/tab
+- #exec "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "xfeDoCommand(openBrowser)"
+- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "xfeDoCommand(openInbox)"
+- exit $?
++ _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
- ################################################################ Parse Arguments
-@@ -218,12 +218,31 @@
- script_args="$script_args -d $2"
- shift 2
- ;;
-+ -UILocale)
-+ moreargs="$moreargs -UILocale $2"
-+ _done_locale="YES"
-+ shift 2
-+ ;;
-+ -UIRegion)
-+ if [ -n "${_done_locale}" ]; then
-+ moreargs="$moreargs -UIRegion $2"
-+ fi
-+ shift 2
-+ ;;
- *)
- moreargs="$moreargs \"$1\""
- shift 1
- ;;
- esac
- done
-+
-+if [ ! -n "${_done_locale}" -a -n "${MOZILLA_UILOCALE}" ]; then
-+ moreargs="$moreargs -UILocale ${MOZILLA_UILOCALE}"
-+ if [ -n "${MOZILLA_UIREGION}" ]; then
-+ moreargs="$moreargs -UIRegion ${MOZILLA_UIREGION}"
+-# Default action - no running instance or _USE_EXIST (${_USE_EXIST}) ! -eq 1
+-########################################################################### Main
+
+-while [ $# -gt 0 ]
+-do
+- case "$1" in
+- -p | --pure | -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
+-done
++# 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
-+unset _done_locale
- export MRE_HOME
- eval "set -- $moreargs"
+-export MRE_HOME
+-eval "set -- $moreargs"
++# 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/mail/thunderbird-devel/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp b/mail/thunderbird-devel/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp
new file mode 100644
index 0000000..7f8e55f
--- /dev/null
+++ b/mail/thunderbird-devel/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp
@@ -0,0 +1,29 @@
+--- uriloader/exthandler/unix/nsGNOMERegistry.cpp.orig Fri Dec 24 04:30:00 2004
++++ uriloader/exthandler/unix/nsGNOMERegistry.cpp Fri Dec 24 04:34:05 2004
+@@ -143,7 +143,7 @@
+ PR_END_MACRO
+
+ // Attempt to open libgconf
+- gconfLib = LoadVersionedLibrary("gconf-2", ".4");
++ gconfLib = PR_LoadLibrary("libgconf-2.so");
+ ENSURE_LIB(gconfLib);
+
+ GET_LIB_FUNCTION(gconf, gconf_client_get_default);
+@@ -151,7 +151,7 @@
+ GET_LIB_FUNCTION(gconf, gconf_client_get_bool);
+
+ // Attempt to open libgnome
+- gnomeLib = LoadVersionedLibrary("gnome-2", ".0");
++ gnomeLib = PR_LoadLibrary("libgnome-2.so");
+ ENSURE_LIB(gnomeLib);
+
+ GET_LIB_FUNCTION(gnome, gnome_url_show);
+@@ -160,7 +160,7 @@
+ GET_LIB_FUNCTION(gnome, gnome_program_get);
+
+ // Attempt to open libgnomevfs
+- vfsLib = LoadVersionedLibrary("gnomevfs-2", ".0");
++ vfsLib = PR_LoadLibrary("libgnomevfs-2.so");
+ ENSURE_LIB(vfsLib);
+
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_type_from_name);
diff --git a/mail/thunderbird-devel/files/thunderbird.desktop.in b/mail/thunderbird-devel/files/thunderbird.desktop.in
index 3fbc730..814e074 100644
--- a/mail/thunderbird-devel/files/thunderbird.desktop.in
+++ b/mail/thunderbird-devel/files/thunderbird.desktop.in
@@ -1,9 +1,11 @@
[Desktop Entry]
+Encoding=UTF-8
Name=Thunderbird
+GenericName=Mail Client
Comment=Mail client and News Reader
-Exec=thunderbird
+Exec=thunderbird %U
Icon=@THUNDERBIRD_ICON@
+StartupNotify=false
Terminal=false
Type=Application
Categories=Application;Network;
-Encoding=UTF-8
OpenPOWER on IntegriCloud