[PATCH] mail/thunderbird: latest changes against thunderbird

Jose M Rodriguez (freebsd) josemi at freebsd.jazztel.es
Tue Jan 4 18:30:46 PST 2005


>Submitter-Id:	current-users
>Originator:	Jose M Rodriguez (freebsd)
>Organization:	Redes JM
>Confidential:	no 
>Synopsis:	[PATCH] mail/thunderbird: latest changes against thunderbird
>Severity:	non-critical
>Priority:	low
>Category:	ports 
>Class:		change-request
>Release:	FreeBSD 5.3-STABLE i386
>Environment:
System: FreeBSD orion.redesjm.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Tue Jan  4 07:32:56 CET
>Description:
	- new mozilla.sh
	- new pkg scripts
	- move thunderbird[-config] from bin to $MOZDIR
	- i18n desktop entry without StartupNotification
	- gconf enabled external protocol handler
	- MOZ_PIS scripts
		S50cleanhome
		S90dsp
	...

Added file(s):
- files/moz_pis_S50cleanhome
- files/moz_pis_S90dsp.sh
- files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp

Port maintainer (gnome at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- thunderbird-1.0_2.patch begins here ---
diff -ruN --exclude=CVS /usr/HEAD/ports/mail/thunderbird/Makefile /junk/wk/mail/thunderbird/Makefile
--- /usr/HEAD/ports/mail/thunderbird/Makefile	Tue Dec 28 01:51:57 2004
+++ /junk/wk/mail/thunderbird/Makefile	Wed Jan  5 02:00:24 2005
@@ -7,7 +7,7 @@
 
 PORTNAME=	thunderbird
 PORTVERSION=	1.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail
 MASTER_SITES=	${MASTER_SITE_MOZILLA}
 MASTER_SITE_SUBDIR=	thunderbird/releases/${PORTVERSION}/source
@@ -18,8 +18,7 @@
 
 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
@@ -47,11 +46,15 @@
 
 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 \
 		OPTIMIZED_CFLAGS "Enable some additional optimizations" off \
-		XFT "Enable support for anti-aliased fonts" on
+		XFT "Enable support for anti-aliased fonts" on \
+		ARTSDSP "Add support for KDE arts (artsdsp)" on
 
 .include <bsd.port.pre.mk>
 
@@ -85,6 +88,10 @@
 LIB_DEPENDS+=	Xft.2:${PORTSDIR}/x11-fonts/libXft
 .endif # !defined(WITHOUT_XFT)
 
+.if !defined(WITHOUT_ARTSDSP)
+MOZ_PIS_SCRIPTS+=	S90dsp.sh
+.endif
+
 CPPFLAGS+=		-I${X11BASE}/include
 CFLAGS+=		${PTHREAD_CFLAGS}
 LDFLAGS+=		-L${X11BASE}/lib
@@ -133,10 +140,13 @@
 		${WRKSRC}/configure \
 		${WRKSRC}/intl/uconv/native/nsNativeUConvService.cpp \
 		${WRKSRC}/xpcom/io/nsNativeCharsetUtils.cpp
-	@${SED} -e 's|%%MOZDIR%%|${LOCAL_PREFIX}/lib/${PORTNAME}-${PORTVERSION}|g ; \
+	@${SED} -e 's|%%MOZDIR%%|${LOCAL_SUBDIR}/lib/${PORTNAME}-${PORTVERSION}|g ; \
+		s|%%PREFIX%%|${PREFIX}|g ; \
 		s|%%X11BASE%%|${X11BASE}|g' \
 		< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
-	@${SED} -e 's|%%MOZDIR%%|${LOCAL_PREFIX}/lib/${PORTNAME}-${PORTVERSION}|g' \
+	@${SED} -e 's|%%MOZDIR%%|${LOCAL_SUBDIR}/lib/${PORTNAME}-${PORTVERSION}|g ; \
+		s|%%PREFIX%%|${PREFIX}|g ; \
+		s|%%X11BASE%%|${X11BASE}|g' \
 		< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
 	@${SED} -e 's|@THUNDERBIRD_ICON@|${THUNDERBIRD_ICON}|' \
 		< ${FILESDIR}/thunderbird.desktop.in > ${WRKDIR}/thunderbird.desktop
@@ -165,12 +175,19 @@
 .endfor
 .endfor
 	@${RM} -fr ${FAKEDIR}/share/idl ${FAKEDIR}/include
+	@${MKDIR} ${SCRIPTS_DIR}
+	@${MKDIR} ${MOZ_PIS_DIR}
 .for ii in thunderbird thunderbird-config
-	@${ECHO_CMD} bin/${ii} >> ${PLIST}
+	@${INSTALL_SCRIPT} ${FAKEDIR}/${LOCAL_SUBDIR}/bin/${ii} ${SCRIPTS_DIR}
 .endfor
+.for ii in ${MOZ_PIS_SCRIPTS}
+	@${INSTALL_SCRIPT} ${FILESDIR}/moz_pis_${ii} ${MOZ_PIS_DIR}/${ii}
+.endfor
+	@${RM} -fr ${FAKEDIR}/${LOCAL_SUBDIR}/bin
 	@${MKDIR} ${FAKEDIR}/${LOCAL_SUBDIR}/lib/${PORTNAME}-${PORTVERSION}/defaults
 	@${CP} -RL ${WRKSRC}/dist/bin/defaults/isp \
 		${FAKEDIR}/${LOCAL_SUBDIR}/lib/${PORTNAME}-${PORTVERSION}/defaults
+
 	@cd ${FAKEDIR} && ${FIND} * ! -type d | ${SORT} >> ${PLIST}; \
 	${FIND} * -type d -empty | ${SORT} | ${SED} -e \
 		"s:^:@exec ${MKDIR} %D/:" -e "s:$$: || true:" >> ${PLIST}; \
@@ -189,16 +206,9 @@
 
 post-install:
 	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-	${MKDIR} ${PREFIX}/bin
-	${RM} -f ${PREFIX}/bin/thunderbird
-	${LN} -s ${LOCAL_PREFIX}/bin/thunderbird \
-		${PREFIX}/bin/thunderbird
-	${RM} -f ${PREFIX}/bin/thunderbird-config
-	${LN} -s ${LOCAL_PREFIX}/bin/thunderbird-config \
-		${PREFIX}/bin/thunderbird-config
 	${PERL} -pi -e 's|${FAKEDIR}|${PREFIX}|g' \
-		${LOCAL_PREFIX}/bin/thunderbird \
-		${LOCAL_PREFIX}/bin/thunderbird-config
+		${LOCAL_PREFIX}/lib/${PORTNAME}-${PORTVERSION}/thunderbird \
+		${LOCAL_PREFIX}/lib/${PORTNAME}-${PORTVERSION}/thunderbird-config
 	${FIND} ${LOCAL_PREFIX}/lib/pkgconfig -type f | ${XARGS} \
 		${PERL} -pi -e 's|${FAKEDIR}|${PREFIX}|g'
 	${INSTALL_DATA} ${THUNDERBIRD_ICON_SRC} ${PREFIX}/share/gnome/pixmaps/${THUNDERBIRD_ICON}
diff -ruN --exclude=CVS /usr/HEAD/ports/mail/thunderbird/files/moz_pis_S50cleanhome /junk/wk/mail/thunderbird/files/moz_pis_S50cleanhome
--- /usr/HEAD/ports/mail/thunderbird/files/moz_pis_S50cleanhome	Thu Jan  1 01:00:00 1970
+++ /junk/wk/mail/thunderbird/files/moz_pis_S50cleanhome	Wed Jan  5 01:15:20 2005
@@ -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.mfast"
+	# 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.mfast"
+    done
+fi
diff -ruN --exclude=CVS /usr/HEAD/ports/mail/thunderbird/files/moz_pis_S90dsp.sh /junk/wk/mail/thunderbird/files/moz_pis_S90dsp.sh
--- /usr/HEAD/ports/mail/thunderbird/files/moz_pis_S90dsp.sh	Thu Jan  1 01:00:00 1970
+++ /junk/wk/mail/thunderbird/files/moz_pis_S90dsp.sh	Wed Jan  5 01:14:40 2005
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+
+# S90dsp.sh
+# dsp aids for mozilla
+# WARN, this is sourced in the main mozilla.sh script.  Be carefull
+
+# esd support seems to be built-in in mozilla now
+# support only arts
+
+if [ -x "${run_moz}" ]; then
+    case "${MOZILLA_DSP}" in
+	[Aa][Rr][Tt][Ss] | artsdsp)
+	    MOZILLA_DSP="artsdsp"
+	    ;;
+	[Nn][Oo][Nn][Ee])
+	    MOZILLA_DSP=""
+	    ;;
+	*) # auto
+	    if [ -n "${KDE_FULL_SESSION}" ]; then
+		MOZILLA_DSP="artsdsp"
+	    else
+		MOZILLA_DSP=""
+	    fi
+	    ;;
+    esac
+    [ -n "${MOZILLA_DSP}" ] && MOZILLA_DSP=`which "${MOZILLA_DSP}"` &&
+    run_moz="${MOZILLA_DSP} ${run_moz}"
+fi
+
+if [ -n "${debuggin}" ]; then
+    echo "dsp: ${run_moz}"
+fi
diff -ruN --exclude=CVS /usr/HEAD/ports/mail/thunderbird/files/patch-mail_app_mozilla.in /junk/wk/mail/thunderbird/files/patch-mail_app_mozilla.in
--- /usr/HEAD/ports/mail/thunderbird/files/patch-mail_app_mozilla.in	Wed Dec 29 04:28:51 2004
+++ /junk/wk/mail/thunderbird/files/patch-mail_app_mozilla.in	Wed Jan  5 01:05:24 2005
@@ -1,50 +1,507 @@
---- 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	Wed Jan  5 01:03:17 2005
+@@ -16,64 +16,92 @@
+ # Reserved.
+ #
  
- #???: needs check if othersopt begin with -* ?
+-## $Id: mozilla.in,v 1.2.6.1 2004/07/24 23:58:06 bryner%brianryner.com Exp $
+-## 
+-## Usage:
+-##
+-## $ mozilla [args]
+-##
+-## This script is meant to run the mozilla-bin binary from either 
+-## mozilla/xpfe/bootstrap or mozilla/dist/bin.
+-##
+-## The script will setup all the environment voodoo needed to make
+-## the mozilla-bin binary to work.
+-##
+-
++# $from: mozilla.in,v 1.3.4.9 2004/10/26 09:26:11 bryner%brianryner.com Exp $
++# Usage:
++#
++# $ mozilla [args]
++#
++# The script will setup all the environment voodoo needed to make
++# 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
++# 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
++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
+@@ -82,160 +110,227 @@
+ 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."
++    # 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: Cannot find mozilla runtime directory. Exiting." 1>&2
++	exit 1
++    fi
++fi
++MOZILLA_BIN="${progbase}-bin"
++
++if [ "$OSTYPE" = "beos" ]; then
++    mimeset -F "$MOZILLA_BIN"
++fi
++
++# 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 "${dist_bin}/${progbase}-bin" ]; then
++    MOZ_CLIENT_PROGRAM="${MOZILLA_BIN} -remote -a ${progbase}"
++else
++    echo "$0: Cannot find mozilla binary executable. Exiting." 1>&2
++    exit 1
++fi
++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
+ fi
+ 
+-script_args=""
+-moreargs=""
+-debugging=0
+-MOZILLA_BIN="${progbase}-bin"
++# guest a default remote command
++_remote_cmd="xfeDoCommand(openInbox)"
+ 
+-# 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
++# test for a running copy of firefox
++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
+-        echo 0
+-        return 0
++	${run_moz} ${MOZ_CLIENT_PROGRAM} 'ping()' >/dev/null 2>&1 &&
++		ALREADY_RUNNING="yes"
+     fi
+-}
+-
+-if [ "$OSTYPE" = "beos" ]; then
+-  mimeset -F "$MOZILLA_BIN"
++elif [ -n "${debugging}" ]; then
++    echo "$0: WARN, no DISPLAY environment" 1>&2
+ fi
+ 
+-ALREADY_RUNNING=`check_running`
+-
+-################################################################ 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
+-	-*) 
+-		;;
++#parse options
++script_args=	# null
++moreargs=	# null
++target=		# null
++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
++	-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
++	    ;;
+ 	*)
+-		_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
++
++# 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
+-		# 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 $?
++	    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
- ################################################################ 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
++# 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
-+unset _done_locale
++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 "${moz_uilocale}" ]; then
++    if [ -n "${moz_uiregion}" ]; then
++	moreargs="-UIRegion ${moz_uiregion} ${more_args}"
++    fi
++    moreargs="-UILocale ${moz_uilocale} ${more_args}"
++fi
+ 
+-export MRE_HOME
+-eval "set -- $moreargs"
++# 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=$?
  
- export MRE_HOME
- eval "set -- $moreargs"
+ ## Stop addon scripts
diff -ruN --exclude=CVS /usr/HEAD/ports/mail/thunderbird/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp /junk/wk/mail/thunderbird/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp
--- /usr/HEAD/ports/mail/thunderbird/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp	Thu Jan  1 01:00:00 1970
+++ /junk/wk/mail/thunderbird/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp	Wed Jan  5 01:15:46 2005
@@ -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 -ruN --exclude=CVS /usr/HEAD/ports/mail/thunderbird/files/thunderbird.desktop.in /junk/wk/mail/thunderbird/files/thunderbird.desktop.in
--- /usr/HEAD/ports/mail/thunderbird/files/thunderbird.desktop.in	Mon Dec 13 01:04:24 2004
+++ /junk/wk/mail/thunderbird/files/thunderbird.desktop.in	Wed Jan  5 02:37:15 2005
@@ -1,9 +1,87 @@
 [Desktop Entry]
+Encoding=UTF-8
 Name=Thunderbird
+Name[bn]=থাণà§~Mডারবারà§~Mড
+Name[eo]=Mozilo Tondrobirdo
+Name[fi]=Mozilla Thunderbird
+Name[pa]=ਥੰਡਰਬਰਡ
+Name[tg]=Ð~_аÑ~@Ñ~@андаи бало
+GenericName=Mail Client
+GenericName[af]=Pos Kliënt
+GenericName[ar]=اÙ~DبرÙ~Jد اÙ~DØ£Ù~DÙ~CترÙ~HÙ~FÙ~J
+GenericName[az]=Poçt Alıcısı
+GenericName[be]=Ð~_аÑ~HÑ~BовÑ~K клÑ~VенÑ~B
+GenericName[bg]=Ð~_оÑ~IенÑ~Aки клиенÑ~B
+GenericName[bn]=à¦~Gমà§~Gà¦~Gল à¦~Uà§~Mলাà§~_à§~Gনà§~Mà¦~_
+GenericName[br]=Arval postel
+GenericName[bs]=Program za Ä~Mitanje elektronske poÅ¡te
+GenericName[ca]=Client de correu electrònic
+GenericName[cs]=Klient pro Ä~Mtení elektronické poÅ¡ty
+GenericName[cy]=Dibynnydd Ebost
+GenericName[da]=E-mail-klient
+GenericName[de]=E-Mail-Programm
+GenericName[el]=Î| ελάÏ~DηÏ~B mail
+GenericName[eo]=Legi kaj sendi retpoÅ~]ton
+GenericName[es]=Cliente de correo electrónico
+GenericName[et]=Meiliklient
+GenericName[eu]=Posta bezeroa
+GenericName[fa]=کارگÛ~Lر پست اÙ~DکترÙ~HÙ~FÛ~LÚ©Û~L
+GenericName[fi]=Sähköpostiohjelma
+GenericName[fo]=Postforrit
+GenericName[fr]=Logiciel de messagerie électronique
+GenericName[ga]=Cliant Ríomhphoist
+GenericName[gl]=Cliente de correo
+GenericName[he]=ת×~U×~[×| ×~Yת ×~S×~U×~Pר
+GenericName[hi]=डाà¤~Uिया
+GenericName[hr]=Program za Ä~Mitanje elektronske poÅ¡te
+GenericName[hu]=LevelezÅ~Qprogram
+GenericName[id]=Klien Mail
+GenericName[is]=Póstforrit
+GenericName[it]=Programma di posta elettronica
+GenericName[ja]=ã~C¡ã~C¼ã~C«ã~B¯ã~C©ã~B¤ã~B¢ã~C³ã~C~H
+GenericName[ko]=í~N¸ì§~@를 주ê³|  ë°~[ë~J~T í~T~Dë¡~\ê·¸ë~^¨
+GenericName[lt]=Pašto klientas
+GenericName[lo]=à»~Dàº~Dà»~Aà»~@ອັàº~Yàº~Hົàº~Tຫມາàº~Mà»~@ອà»~@ລັàº~Aà»~Bàº~Uàº~Yິàº~A
+GenericName[lv]=Pasta Klients
+GenericName[mk]=Ð~_Ñ~@огÑ~@ама за елекÑ~BÑ~@онÑ~Aка поÑ~HÑ~Bа
+GenericName[mn]=Э-Ð~WаÑ~Eиа-Ð~_Ñ~@огÑ~@ам
+GenericName[mt]=Klijent tal-imejl
+GenericName[nb]=E-postklient
+GenericName[nds]=Mailprogramm
+GenericName[nl]=E-mailclient
+GenericName[nn]=Lesing og sending av e-post
+GenericName[nso]=Moreki wa Poso
+GenericName[oc]=Programari de correu electrònic
+GenericName[pa]=ਪੱਤਰ à¨~Uਲਾà¨~Bà¨~Gà¨~_
+GenericName[pl]=Program do wysyÅ~Bania i odbierania poczty elektronicznej
+GenericName[pt]=Client de E-mail
+GenericName[pt_BR]=Cliente de E-mail
+GenericName[ro]=Program de poÅ~_tÄ~C electronicÄ~C
+GenericName[ru]=Ð~ZлиенÑ~B Ñ~MлекÑ~BÑ~@онной поÑ~GÑ~BÑ~K
+GenericName[se]=Boastaprográmma
+GenericName[sk]=Klient elektronickej pošty
+GenericName[sl]=Program za e-pošto
+GenericName[sr]=Ð~_Ñ~@огÑ~@ам за e-поÑ~HÑ~BÑ~C
+GenericName[sr at Latn]=Program za e-poštu
+GenericName[ss]=Likhasimende leliposi
+GenericName[sv]=E-postklient
+GenericName[ta]=à®~Eà®~^à¯~Mà®~Zலà¯~M à®~Ià®±à¯~Aபà¯~Mபினரà¯~M
+GenericName[tg]=Ð~ZоÑ~@гиÑ~@и поÑ~GÑ~Bаи Ñ~MллекÑ~BÑ~@оникӣ
+GenericName[th]=à¹~Dà¸~Dลà¹~@อà¸~Yà¸~Uà¹~Là¸~Hà¸~Tหมายอิà¹~@ลà¹~Gà¸~Aà¸~Wรอà¸~Yิà¸~Aสà¹~L
+GenericName[tr]=Posta Ä°stemcisi
+GenericName[uk]=Ð~ZлÑ~VÑ~TнÑ~B елекÑ~BÑ~@онноÑ~W поÑ~HÑ~Bи
+GenericName[uz]=ХаÑ~B-Ñ~EабаÑ~@ клиенÑ~Bи
+GenericName[ven]=Mushumisani na poso
+GenericName[wa]=Cliyint d'Â| emilaedje
+GenericName[xh]=Umxhasi Weposi
+GenericName[zh_CN]=é~B®ä»¶ç¨~Kåº~O
+GenericName[zh_TW]=é~Cµä»¶è~Y~Uç~P~Fç¨~Kå¼~O
+GenericName[zu]=Umxhasi weposi
 Comment=Mail client and News Reader
-Exec=thunderbird
+Comment[es]=Cliente de correo y lector de noticias
+Exec=thunderbird %U
 Icon=@THUNDERBIRD_ICON@
+StartupNotify=false
 Terminal=false
 Type=Application
 Categories=Application;Network;
-Encoding=UTF-8
diff -ruN --exclude=CVS /usr/HEAD/ports/mail/thunderbird/pkg-deinstall.in /junk/wk/mail/thunderbird/pkg-deinstall.in
--- /usr/HEAD/ports/mail/thunderbird/pkg-deinstall.in	Sat Nov  6 07:11:36 2004
+++ /junk/wk/mail/thunderbird/pkg-deinstall.in	Wed Jan  5 01:26:45 2005
@@ -9,10 +9,12 @@
 umask 022
 PATH=/bin:/usr/bin
 
+prefix="${PKG_PREFIX:-%%PREFIX%%}"
+
 [ "x$1" = "x" ] && exit 1
 [ "x$2" != "xDEINSTALL" ] && exit 0
 
-MOZDIR=%%MOZDIR%%
+MOZDIR="${prefix}/%%MOZDIR%%"
 
 rm -rf ${MOZDIR}/chrome/overlayinfo
 rm -f ${MOZDIR}/chrome/*.rdf
@@ -21,5 +23,11 @@
 rm -f ${MOZDIR}/defaults.ini
 rm -f ${MOZDIR}/components/*.dat
 rm -rf ${MOZDIR}/extensions
+
+# support for outer scripts
+for script in thunderbird thunderbird-config; do
+    rm -f "${prefix}/bin/${script}"
+done
+# TODO, others thunderbird ports?
 
 exit 0
diff -ruN --exclude=CVS /usr/HEAD/ports/mail/thunderbird/pkg-install.in /junk/wk/mail/thunderbird/pkg-install.in
--- /usr/HEAD/ports/mail/thunderbird/pkg-install.in	Mon Nov 22 05:16:25 2004
+++ /junk/wk/mail/thunderbird/pkg-install.in	Wed Jan  5 01:21:58 2005
@@ -9,13 +9,15 @@
 umask 022
 PATH=/bin:/usr/bin:/usr/local/bin
 
+prefix="${PKG_PERFIX:-%%PREFIX%%}"
+
 [ "x$1" = "x" ] && exit 1
 [ "x$2" != "xPOST-INSTALL" ] && exit 0
 
-MOZDIR=%%MOZDIR%%
-REGXPCOM=${MOZDIR}/regxpcom
-REGCHROME=${MOZDIR}/regchrome
-THUNDERBIRD=${MOZDIR}/thunderbird-bin
+MOZDIR="${prefix}/%%MOZDIR%%"
+REGXPCOM="${MOZDIR}/regxpcom"
+REGCHROME="${MOZDIR}/regchrome"
+THUNDERBIRD="${MOZDIR}/thunderbird-bin"
 
 echo "===> Building Chrome's registry..."
 rm -rf ${MOZDIR}/chrome/overlayinfo
@@ -28,5 +30,12 @@
 ./run-mozilla.sh ${REGXPCOM} || true
 ./run-mozilla.sh ${REGCHROME} || true
 ./run-mozilla.sh ${THUNDERBIRD} -register > /dev/null 2>&1
+
+# install outer scripts
+for script in thunderbird thunderbird-config; do
+    if [ -x "${MOZDIR}/${script}" ]; then
+	install -m 555 ${MOZDIR}/${script} ${prefix}/bin
+    fi
+done
 
 exit 0
--- thunderbird-1.0_2.patch ends here ---



More information about the freebsd-gnome mailing list