1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00
the release notes)
* Add a new Firefox launch script [1]
* Merge URI helper patch from www/mozilla
* Add option to make URLs open in new tabs instead of new windows [1]
* Sanitize CFLAGS [1]
* Update the GNOME .desktop file with i18n translations and MIME types [1]

PR:		75816 [1]
Submitted by:	Jose M Rodriguez (freebsd) <josemi@freebsd.jazztel.es> [1]
This commit is contained in:
Joe Marcus Clarke 2005-02-25 07:51:58 +00:00
parent 16ea9b4265
commit c3a55025a2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=129730
45 changed files with 6642 additions and 603 deletions

View File

@ -6,13 +6,12 @@
#
PORTNAME= firefox
PORTVERSION= 1.0
PORTREVISION= 7
PORTVERSION= 1.0.1
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0/source
DISTNAME= ${PORTNAME}-1.0-source
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0.1/source
DISTNAME= ${PORTNAME}-1.0.1-source
MAINTAINER= gnome@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
@ -32,7 +31,7 @@ PLIST= ${WRKDIR}/plist
PLUGINSDIR= ${PREFIX}/lib/browser_plugins
USE_BZIP2= yes
USE_GMAKE= yes
USE_GNOME= gtk20 libidl gnomehier
USE_GNOME= gtk20 libidl gnomehier desktopfileutils
USE_ICONV= yes
USE_PERL5_BUILD=yes
USE_X_PREFIX= yes
@ -62,11 +61,14 @@ 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
SYSTEM_PREFS= ${FAKEDIR}/lib/${FIREFOX}-${FF_VER}/defaults/pref/firefox.js
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 \
SMB "Enable smb:// URI support using gnomevfs" off
SMB "Enable smb:// URI support using gnomevfs" off \
NEWTAB "Open external links in a new tab" on
.include <bsd.port.pre.mk>
@ -76,9 +78,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)
@ -137,6 +139,12 @@ post-patch:
< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
@${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${FIREFOX}|g' \
< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
.for ii in ${EXTRA_SCRIPTS}
@${SED} -e 's|%%MOZILLA%%|${FIREFOX}|g ; \
s|%%PREFIX%%|${PREFIX}|g ; \
s|%%X11BASE%%|${X11BASE}|g' \
< ${FILESDIR}/${ii} > ${WRKDIR}/${ii}
.endfor
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/build/unix/run-mozilla.sh
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
@ -180,6 +188,12 @@ pre-install:
done
${ECHO_CMD} bin/firefox >> ${PLIST}
${ECHO_CMD} bin/firefox-config >> ${PLIST}
.if !defined(WITHOUT_NEWTAB)
${ECHO_CMD} >> ${SYSTEM_PREFS}
${ECHO_CMD} "// Open external links in new tab" >> ${SYSTEM_PREFS}
${ECHO_CMD} "pref(\"browser.link.open_external\", 3);" \
>> ${SYSTEM_PREFS}
.endif # !defined(WITHOUT_NEWTAB)
cd ${FAKEDIR}/lib/${FIREFOX}-${FF_VER} && ${FIND} -s * -type f -o -type l | \
${SED} -e 's|^|lib/${FIREFOX}/|' >> ${PLIST} \
&& ${FIND} -d * -type d | \
@ -198,6 +212,8 @@ pre-install:
${ECHO_CMD} @dirrm include/${FIREFOX} >> ${PLIST}
${ECHO_CMD} lib/browser_plugins/.${PORTNAME}.keep >> ${PLIST}
${ECHO_CMD} "@unexec ${RMDIR} %D/lib/browser_plugins 2>/dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@exec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@unexec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
do-install:
${MKDIR} ${PREFIX}/lib/${FIREFOX}
@ -240,5 +256,6 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/firefox.desktop ${PREFIX}/share/gnome/applications
${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/firefox/default.xpm \
${PREFIX}/lib/${FIREFOX}/chrome/icons/default/default.xpm
@-update-desktop-database
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (firefox-1.0-source.tar.bz2) = 49c16a71f4de014ea471be81e46b1da8
SIZE (firefox-1.0-source.tar.bz2) = 32686249
MD5 (firefox-1.0.1-source.tar.bz2) = ebaea974fea9460ab7050fff76b41cb1
SIZE (firefox-1.0.1-source.tar.bz2) = 32671529

View File

@ -1,9 +1,191 @@
[Desktop Entry]
Name=Firefox
Comment=Firefox Web Browser
Encoding=UTF-8
Name=Firefox Web Browser
Name[am]=
Name[ar]=
Name[az]=Firefox Veb Səyyahı
Name[be]=
Name[bg]=Интернет браузър Firefox
Name[bn]=
Name[bs]=Firefox web preglednik
Name[ca]=Navegador web Firefox
Name[cs]=Prohlížeč WWW Firefox
Name[cy]=Y Porwr Gwe Firefox
Name[da]=Firefox - internetsurfning
Name[de]=Firefox Webbrowser
Name[el]=Περιηγητής Διαδικτύου Firefox
Name[en_CA]=Firefox Web Browser
Name[en_GB]=Firefox Web Browser
Name[es]=Navegador Web Firefox
Name[et]=Firefox veebibrauser
Name[eu]=Firefox web arakatzailea
Name[fi]=Firefox, WWW-selain
Name[fr]=Navigateur Web Firefox
Name[ga]=Brabhsálaí Lín Firefox
Name[gu]=
Name[he]=דפדפן Firefox
Name[hi]=
Name[hr]=Firefox Web preglednik
Name[hu]=Firefox webböngésző
Name[id]=Web Browser Firefox
Name[it]=Browser web Firefox
Name[ja]=Firefox
Name[ko]=Firefox
Name[li]=Firefox Web Browser
Name[lt]=Firefox web naršyklė
Name[mk]=Firefox веб прелистувач
Name[ml]=ിി
Name[mn]=Firefox веб хөтөч
Name[ms]=Pelungsur Web Firefox
Name[nb]=Firefox nettleser
Name[nl]=Firefox Webbrowser
Name[nn]=Firefox nettlesar
Name[no]=Firefox nettleser
Name[pa]=
Name[pl]=Przeglądarka WWW Firefox
Name[pt]=Navegador Web Firefox
Name[pt_BR]=Navegador Web Firefox
Name[ro]=Navigatorul Firefox
Name[ru]=Веб-браузер Firefox
Name[sk]=
Name[sl]=Spletni brskalnik Firefox
Name[sq]=Firefox - Shfletuesi Web
Name[sr]=
Name[sr@Latn]=Veb čitač Spoznaja
Name[sv]=Webbläsaren Firefox
Name[ta]=ிி ி
Name[tk]=Firefox Web Ahtarçisi
Name[tr]=Firefox Web Tarayıcı
Name[uk]=Переглядач web Firefox
Name[vi]=Trình Duyt Web Firefox
Name[wa]=Betchteu waibe epiphany
Name[zh_CN]=Firefox Web
Name[zh_TW]=Firefox
GenericName=Web Browser
GenericName[ar]=متصفّح الانترنت
GenericName[az]=Veb Səyyahı
GenericName[be]=Вандроўнік па павуціньню
GenericName[bg]=Браузър
GenericName[bn]=
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[cs]=Prohlížeč WWW
GenericName[cy]=Porwr Gwe
GenericName[da]=Internetsurfning
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής Ιστοσελίδων
GenericName[en_CA]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web Firefox
GenericName[ga]=Brabhsálaí Lín
GenericName[gu]=
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[id]=Browser Web
GenericName[it]=Browser web
GenericName[ja]=GNOME
GenericName[ko]=
GenericName[li]=Wèb Browser
GenericName[lt]=Web naršyklė
GenericName[mk]=Веб прелистувач
GenericName[mn]=Веб хөтөч
GenericName[ms]=Pelungsur Web
GenericName[nb]=Nettleser
GenericName[nl]=Web-browser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pa]=
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sq]=Shfletuesi Web
GenericName[sr]=Веб читач
GenericName[sr@Latn]=Veb čitač
GenericName[sv]=Webbläsare
GenericName[ta]= ி
GenericName[th]=
GenericName[tk]=Web Ahtarçysy
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Переглядач web-сторінок
GenericName[vi]=Trình duyt Web
GenericName[wa]=Betchteu waibe
GenericName[zh_CN]=Web
GenericName[zh_TW]=
Comment=Browse the web
Comment[ar]=تصفح الانترنت
Comment[az]=Vebi gəzin
Comment[be]=Вандраваць па павуціньню
Comment[bg]=Сърфиране в интернет
Comment[bn]=
Comment[bs]=Pregledaj na internetu
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížet WWW
Comment[cy]=Pori'r we
Comment[da]=Surf på internettet
Comment[de]=Im Web surfen
Comment[el]=Περιήγηση στον παγκόσμιο ιστό
Comment[en_CA]=Browse the web
Comment[en_GB]=Browse the web
Comment[es]=Navegar por la web
Comment[et]=Sirvi veebi
Comment[eu]=Arakatu web-a
Comment[fi]=Selaa WWW:tä
Comment[fr]=Naviguer sur Internet
Comment[ga]=Brabhsáil an Líon
Comment[gu]=
Comment[he]=גלוש ברשת
Comment[hi]=
Comment[hr]=Pregledaj Web
Comment[hu]=A világháló böngészése
Comment[id]=Jelajah web
Comment[it]=Esplora il web
Comment[ja]=
Comment[ko]=
Comment[li]=Blajere op internet
Comment[lt]=Naršyti internete
Comment[mk]=Прелистувајте на веб
Comment[ml]= ി
Comment[mn]=Веб броузе хийх
Comment[ms]=Layari web
Comment[nb]=Surf på nettet
Comment[nl]=Websurfen
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pa]=
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegar na web
Comment[pt_BR]=Navegar na web
Comment[ro]=Navigare Internet
Comment[ru]=Веб-браузер
Comment[sk]=Prehliadať internet
Comment[sl]=Brskaj po spletu
Comment[sq]=Eksploro web-in
Comment[sr]=Прегледај веб
Comment[sr@Latn]=Pregledaj veb
Comment[sv]=Surfa på nätet
Comment[ta]=ி
Comment[th]= Firefox
Comment[tk]=Webi Ahtar
Comment[tr]=Web'e Gözat
Comment[uk]=Програма перегляду web-сторінок
Comment[vi]=Duyt web
Comment[wa]=Naivyî avå les waibes
Comment[zh_CN]= Web
Comment[zh_TW]=
Exec=firefox %U
Icon=@FIREFOX_ICON@
StartupNotify=false
Terminal=false
Type=Application
Categories=Application;Network;
Encoding=UTF-8
MimeType=text/html;text/xml;application/xhtml+xml;

View File

@ -1,56 +1,499 @@
--- browser/app/mozilla.in.orig Tue Oct 26 05:26:11 2004
+++ browser/app/mozilla.in Mon Dec 27 19:15:52 2004
@@ -110,6 +110,7 @@
# 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 "Cannot find mozilla runtime directory. Exiting."
exit 1
@@ -160,11 +161,11 @@
_optLast="${i}"
done #last arg
-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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
+ [ `expr -- "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
fi
################################################################ Parse Arguments
@@ -207,12 +208,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
--- browser/app/mozilla.in.orig Tue Oct 26 11:26:11 2004
+++ browser/app/mozilla.in Wed Feb 23 11:09:49 2005
@@ -28,52 +28,110 @@
## The script will setup all the environment voodoo needed to make
## the mozilla-bin binary to work.
##
-
+#!/bin/sh
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL. You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+#
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+#
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All Rights
+# Reserved.
+#
+
+if [ ! -n "${_done_locale}" -a -n "${MOZILLA_UILOCALE}" ]; then
+ if [ -n "${MOZILLA_UIREGION}" ]; then
+ moreargs="-UIRegion ${MOZILLA_UIREGION} $moreargs"
+ fi
+ moreargs="-UILocale ${MOZILLA_UILOCALE} $moreargs"
+fi
+unset _done_locale
+# $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
}
export MRE_HOME
eval "set -- $moreargs"
-#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,149 +140,224 @@
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`
- run_moz="$dist_bin/run-mozilla.sh"
- 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
+ # 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
-script_args=""
-moreargs=""
-debugging=0
MOZILLA_BIN="${progbase}-bin"
+if [ "$OSTYPE" = "beos" ]; then
+ mimeset -F "$MOZILLA_BIN"
+fi
-# 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 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)"
+
+# 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
-_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
-
-_optLast=
-for i in "$@"; do
- _optLast="${i}"
-done #last arg
-
-if [ `expr "${_optLast}" : '.*:/.*'` -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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
-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
- _remote_cmd="openURL(${_optLast})"
- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "${_remote_cmd}"
- unset _remote_cmd
- 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(openBrowser)"
- 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
-# 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
+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
-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=$?
## Stop addon scripts

View File

@ -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);

View File

@ -6,13 +6,12 @@
#
PORTNAME= firefox
PORTVERSION= 1.0
PORTREVISION= 7
PORTVERSION= 1.0.1
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0/source
DISTNAME= ${PORTNAME}-1.0-source
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0.1/source
DISTNAME= ${PORTNAME}-1.0.1-source
MAINTAINER= gnome@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
@ -32,7 +31,7 @@ PLIST= ${WRKDIR}/plist
PLUGINSDIR= ${PREFIX}/lib/browser_plugins
USE_BZIP2= yes
USE_GMAKE= yes
USE_GNOME= gtk20 libidl gnomehier
USE_GNOME= gtk20 libidl gnomehier desktopfileutils
USE_ICONV= yes
USE_PERL5_BUILD=yes
USE_X_PREFIX= yes
@ -62,11 +61,14 @@ 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
SYSTEM_PREFS= ${FAKEDIR}/lib/${FIREFOX}-${FF_VER}/defaults/pref/firefox.js
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 \
SMB "Enable smb:// URI support using gnomevfs" off
SMB "Enable smb:// URI support using gnomevfs" off \
NEWTAB "Open external links in a new tab" on
.include <bsd.port.pre.mk>
@ -76,9 +78,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)
@ -137,6 +139,12 @@ post-patch:
< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
@${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${FIREFOX}|g' \
< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
.for ii in ${EXTRA_SCRIPTS}
@${SED} -e 's|%%MOZILLA%%|${FIREFOX}|g ; \
s|%%PREFIX%%|${PREFIX}|g ; \
s|%%X11BASE%%|${X11BASE}|g' \
< ${FILESDIR}/${ii} > ${WRKDIR}/${ii}
.endfor
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/build/unix/run-mozilla.sh
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
@ -180,6 +188,12 @@ pre-install:
done
${ECHO_CMD} bin/firefox >> ${PLIST}
${ECHO_CMD} bin/firefox-config >> ${PLIST}
.if !defined(WITHOUT_NEWTAB)
${ECHO_CMD} >> ${SYSTEM_PREFS}
${ECHO_CMD} "// Open external links in new tab" >> ${SYSTEM_PREFS}
${ECHO_CMD} "pref(\"browser.link.open_external\", 3);" \
>> ${SYSTEM_PREFS}
.endif # !defined(WITHOUT_NEWTAB)
cd ${FAKEDIR}/lib/${FIREFOX}-${FF_VER} && ${FIND} -s * -type f -o -type l | \
${SED} -e 's|^|lib/${FIREFOX}/|' >> ${PLIST} \
&& ${FIND} -d * -type d | \
@ -198,6 +212,8 @@ pre-install:
${ECHO_CMD} @dirrm include/${FIREFOX} >> ${PLIST}
${ECHO_CMD} lib/browser_plugins/.${PORTNAME}.keep >> ${PLIST}
${ECHO_CMD} "@unexec ${RMDIR} %D/lib/browser_plugins 2>/dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@exec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@unexec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
do-install:
${MKDIR} ${PREFIX}/lib/${FIREFOX}
@ -240,5 +256,6 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/firefox.desktop ${PREFIX}/share/gnome/applications
${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/firefox/default.xpm \
${PREFIX}/lib/${FIREFOX}/chrome/icons/default/default.xpm
@-update-desktop-database
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (firefox-1.0-source.tar.bz2) = 49c16a71f4de014ea471be81e46b1da8
SIZE (firefox-1.0-source.tar.bz2) = 32686249
MD5 (firefox-1.0.1-source.tar.bz2) = ebaea974fea9460ab7050fff76b41cb1
SIZE (firefox-1.0.1-source.tar.bz2) = 32671529

View File

@ -1,9 +1,191 @@
[Desktop Entry]
Name=Firefox
Comment=Firefox Web Browser
Encoding=UTF-8
Name=Firefox Web Browser
Name[am]=
Name[ar]=
Name[az]=Firefox Veb Səyyahı
Name[be]=
Name[bg]=Интернет браузър Firefox
Name[bn]=
Name[bs]=Firefox web preglednik
Name[ca]=Navegador web Firefox
Name[cs]=Prohlížeč WWW Firefox
Name[cy]=Y Porwr Gwe Firefox
Name[da]=Firefox - internetsurfning
Name[de]=Firefox Webbrowser
Name[el]=Περιηγητής Διαδικτύου Firefox
Name[en_CA]=Firefox Web Browser
Name[en_GB]=Firefox Web Browser
Name[es]=Navegador Web Firefox
Name[et]=Firefox veebibrauser
Name[eu]=Firefox web arakatzailea
Name[fi]=Firefox, WWW-selain
Name[fr]=Navigateur Web Firefox
Name[ga]=Brabhsálaí Lín Firefox
Name[gu]=
Name[he]=דפדפן Firefox
Name[hi]=
Name[hr]=Firefox Web preglednik
Name[hu]=Firefox webböngésző
Name[id]=Web Browser Firefox
Name[it]=Browser web Firefox
Name[ja]=Firefox
Name[ko]=Firefox
Name[li]=Firefox Web Browser
Name[lt]=Firefox web naršyklė
Name[mk]=Firefox веб прелистувач
Name[ml]=ിി
Name[mn]=Firefox веб хөтөч
Name[ms]=Pelungsur Web Firefox
Name[nb]=Firefox nettleser
Name[nl]=Firefox Webbrowser
Name[nn]=Firefox nettlesar
Name[no]=Firefox nettleser
Name[pa]=
Name[pl]=Przeglądarka WWW Firefox
Name[pt]=Navegador Web Firefox
Name[pt_BR]=Navegador Web Firefox
Name[ro]=Navigatorul Firefox
Name[ru]=Веб-браузер Firefox
Name[sk]=
Name[sl]=Spletni brskalnik Firefox
Name[sq]=Firefox - Shfletuesi Web
Name[sr]=
Name[sr@Latn]=Veb čitač Spoznaja
Name[sv]=Webbläsaren Firefox
Name[ta]=ிி ி
Name[tk]=Firefox Web Ahtarçisi
Name[tr]=Firefox Web Tarayıcı
Name[uk]=Переглядач web Firefox
Name[vi]=Trình Duyt Web Firefox
Name[wa]=Betchteu waibe epiphany
Name[zh_CN]=Firefox Web
Name[zh_TW]=Firefox
GenericName=Web Browser
GenericName[ar]=متصفّح الانترنت
GenericName[az]=Veb Səyyahı
GenericName[be]=Вандроўнік па павуціньню
GenericName[bg]=Браузър
GenericName[bn]=
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[cs]=Prohlížeč WWW
GenericName[cy]=Porwr Gwe
GenericName[da]=Internetsurfning
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής Ιστοσελίδων
GenericName[en_CA]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web Firefox
GenericName[ga]=Brabhsálaí Lín
GenericName[gu]=
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[id]=Browser Web
GenericName[it]=Browser web
GenericName[ja]=GNOME
GenericName[ko]=
GenericName[li]=Wèb Browser
GenericName[lt]=Web naršyklė
GenericName[mk]=Веб прелистувач
GenericName[mn]=Веб хөтөч
GenericName[ms]=Pelungsur Web
GenericName[nb]=Nettleser
GenericName[nl]=Web-browser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pa]=
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sq]=Shfletuesi Web
GenericName[sr]=Веб читач
GenericName[sr@Latn]=Veb čitač
GenericName[sv]=Webbläsare
GenericName[ta]= ி
GenericName[th]=
GenericName[tk]=Web Ahtarçysy
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Переглядач web-сторінок
GenericName[vi]=Trình duyt Web
GenericName[wa]=Betchteu waibe
GenericName[zh_CN]=Web
GenericName[zh_TW]=
Comment=Browse the web
Comment[ar]=تصفح الانترنت
Comment[az]=Vebi gəzin
Comment[be]=Вандраваць па павуціньню
Comment[bg]=Сърфиране в интернет
Comment[bn]=
Comment[bs]=Pregledaj na internetu
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížet WWW
Comment[cy]=Pori'r we
Comment[da]=Surf på internettet
Comment[de]=Im Web surfen
Comment[el]=Περιήγηση στον παγκόσμιο ιστό
Comment[en_CA]=Browse the web
Comment[en_GB]=Browse the web
Comment[es]=Navegar por la web
Comment[et]=Sirvi veebi
Comment[eu]=Arakatu web-a
Comment[fi]=Selaa WWW:tä
Comment[fr]=Naviguer sur Internet
Comment[ga]=Brabhsáil an Líon
Comment[gu]=
Comment[he]=גלוש ברשת
Comment[hi]=
Comment[hr]=Pregledaj Web
Comment[hu]=A világháló böngészése
Comment[id]=Jelajah web
Comment[it]=Esplora il web
Comment[ja]=
Comment[ko]=
Comment[li]=Blajere op internet
Comment[lt]=Naršyti internete
Comment[mk]=Прелистувајте на веб
Comment[ml]= ി
Comment[mn]=Веб броузе хийх
Comment[ms]=Layari web
Comment[nb]=Surf på nettet
Comment[nl]=Websurfen
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pa]=
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegar na web
Comment[pt_BR]=Navegar na web
Comment[ro]=Navigare Internet
Comment[ru]=Веб-браузер
Comment[sk]=Prehliadať internet
Comment[sl]=Brskaj po spletu
Comment[sq]=Eksploro web-in
Comment[sr]=Прегледај веб
Comment[sr@Latn]=Pregledaj veb
Comment[sv]=Surfa på nätet
Comment[ta]=ி
Comment[th]= Firefox
Comment[tk]=Webi Ahtar
Comment[tr]=Web'e Gözat
Comment[uk]=Програма перегляду web-сторінок
Comment[vi]=Duyt web
Comment[wa]=Naivyî avå les waibes
Comment[zh_CN]= Web
Comment[zh_TW]=
Exec=firefox %U
Icon=@FIREFOX_ICON@
StartupNotify=false
Terminal=false
Type=Application
Categories=Application;Network;
Encoding=UTF-8
MimeType=text/html;text/xml;application/xhtml+xml;

View File

@ -1,56 +1,499 @@
--- browser/app/mozilla.in.orig Tue Oct 26 05:26:11 2004
+++ browser/app/mozilla.in Mon Dec 27 19:15:52 2004
@@ -110,6 +110,7 @@
# 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 "Cannot find mozilla runtime directory. Exiting."
exit 1
@@ -160,11 +161,11 @@
_optLast="${i}"
done #last arg
-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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
+ [ `expr -- "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
fi
################################################################ Parse Arguments
@@ -207,12 +208,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
--- browser/app/mozilla.in.orig Tue Oct 26 11:26:11 2004
+++ browser/app/mozilla.in Wed Feb 23 11:09:49 2005
@@ -28,52 +28,110 @@
## The script will setup all the environment voodoo needed to make
## the mozilla-bin binary to work.
##
-
+#!/bin/sh
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL. You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+#
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+#
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All Rights
+# Reserved.
+#
+
+if [ ! -n "${_done_locale}" -a -n "${MOZILLA_UILOCALE}" ]; then
+ if [ -n "${MOZILLA_UIREGION}" ]; then
+ moreargs="-UIRegion ${MOZILLA_UIREGION} $moreargs"
+ fi
+ moreargs="-UILocale ${MOZILLA_UILOCALE} $moreargs"
+fi
+unset _done_locale
+# $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
}
export MRE_HOME
eval "set -- $moreargs"
-#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,149 +140,224 @@
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`
- run_moz="$dist_bin/run-mozilla.sh"
- 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
+ # 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
-script_args=""
-moreargs=""
-debugging=0
MOZILLA_BIN="${progbase}-bin"
+if [ "$OSTYPE" = "beos" ]; then
+ mimeset -F "$MOZILLA_BIN"
+fi
-# 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 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)"
+
+# 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
-_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
-
-_optLast=
-for i in "$@"; do
- _optLast="${i}"
-done #last arg
-
-if [ `expr "${_optLast}" : '.*:/.*'` -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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
-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
- _remote_cmd="openURL(${_optLast})"
- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "${_remote_cmd}"
- unset _remote_cmd
- 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(openBrowser)"
- 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
-# 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
+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
-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=$?
## Stop addon scripts

View File

@ -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);

View File

@ -6,13 +6,12 @@
#
PORTNAME= firefox
PORTVERSION= 1.0
PORTREVISION= 7
PORTVERSION= 1.0.1
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0/source
DISTNAME= ${PORTNAME}-1.0-source
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0.1/source
DISTNAME= ${PORTNAME}-1.0.1-source
MAINTAINER= gnome@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
@ -32,7 +31,7 @@ PLIST= ${WRKDIR}/plist
PLUGINSDIR= ${PREFIX}/lib/browser_plugins
USE_BZIP2= yes
USE_GMAKE= yes
USE_GNOME= gtk20 libidl gnomehier
USE_GNOME= gtk20 libidl gnomehier desktopfileutils
USE_ICONV= yes
USE_PERL5_BUILD=yes
USE_X_PREFIX= yes
@ -62,11 +61,14 @@ 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
SYSTEM_PREFS= ${FAKEDIR}/lib/${FIREFOX}-${FF_VER}/defaults/pref/firefox.js
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 \
SMB "Enable smb:// URI support using gnomevfs" off
SMB "Enable smb:// URI support using gnomevfs" off \
NEWTAB "Open external links in a new tab" on
.include <bsd.port.pre.mk>
@ -76,9 +78,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)
@ -137,6 +139,12 @@ post-patch:
< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
@${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${FIREFOX}|g' \
< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
.for ii in ${EXTRA_SCRIPTS}
@${SED} -e 's|%%MOZILLA%%|${FIREFOX}|g ; \
s|%%PREFIX%%|${PREFIX}|g ; \
s|%%X11BASE%%|${X11BASE}|g' \
< ${FILESDIR}/${ii} > ${WRKDIR}/${ii}
.endfor
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/build/unix/run-mozilla.sh
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
@ -180,6 +188,12 @@ pre-install:
done
${ECHO_CMD} bin/firefox >> ${PLIST}
${ECHO_CMD} bin/firefox-config >> ${PLIST}
.if !defined(WITHOUT_NEWTAB)
${ECHO_CMD} >> ${SYSTEM_PREFS}
${ECHO_CMD} "// Open external links in new tab" >> ${SYSTEM_PREFS}
${ECHO_CMD} "pref(\"browser.link.open_external\", 3);" \
>> ${SYSTEM_PREFS}
.endif # !defined(WITHOUT_NEWTAB)
cd ${FAKEDIR}/lib/${FIREFOX}-${FF_VER} && ${FIND} -s * -type f -o -type l | \
${SED} -e 's|^|lib/${FIREFOX}/|' >> ${PLIST} \
&& ${FIND} -d * -type d | \
@ -198,6 +212,8 @@ pre-install:
${ECHO_CMD} @dirrm include/${FIREFOX} >> ${PLIST}
${ECHO_CMD} lib/browser_plugins/.${PORTNAME}.keep >> ${PLIST}
${ECHO_CMD} "@unexec ${RMDIR} %D/lib/browser_plugins 2>/dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@exec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@unexec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
do-install:
${MKDIR} ${PREFIX}/lib/${FIREFOX}
@ -240,5 +256,6 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/firefox.desktop ${PREFIX}/share/gnome/applications
${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/firefox/default.xpm \
${PREFIX}/lib/${FIREFOX}/chrome/icons/default/default.xpm
@-update-desktop-database
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (firefox-1.0-source.tar.bz2) = 49c16a71f4de014ea471be81e46b1da8
SIZE (firefox-1.0-source.tar.bz2) = 32686249
MD5 (firefox-1.0.1-source.tar.bz2) = ebaea974fea9460ab7050fff76b41cb1
SIZE (firefox-1.0.1-source.tar.bz2) = 32671529

View File

@ -1,9 +1,191 @@
[Desktop Entry]
Name=Firefox
Comment=Firefox Web Browser
Encoding=UTF-8
Name=Firefox Web Browser
Name[am]=
Name[ar]=
Name[az]=Firefox Veb Səyyahı
Name[be]=
Name[bg]=Интернет браузър Firefox
Name[bn]=
Name[bs]=Firefox web preglednik
Name[ca]=Navegador web Firefox
Name[cs]=Prohlížeč WWW Firefox
Name[cy]=Y Porwr Gwe Firefox
Name[da]=Firefox - internetsurfning
Name[de]=Firefox Webbrowser
Name[el]=Περιηγητής Διαδικτύου Firefox
Name[en_CA]=Firefox Web Browser
Name[en_GB]=Firefox Web Browser
Name[es]=Navegador Web Firefox
Name[et]=Firefox veebibrauser
Name[eu]=Firefox web arakatzailea
Name[fi]=Firefox, WWW-selain
Name[fr]=Navigateur Web Firefox
Name[ga]=Brabhsálaí Lín Firefox
Name[gu]=
Name[he]=דפדפן Firefox
Name[hi]=
Name[hr]=Firefox Web preglednik
Name[hu]=Firefox webböngésző
Name[id]=Web Browser Firefox
Name[it]=Browser web Firefox
Name[ja]=Firefox
Name[ko]=Firefox
Name[li]=Firefox Web Browser
Name[lt]=Firefox web naršyklė
Name[mk]=Firefox веб прелистувач
Name[ml]=ിി
Name[mn]=Firefox веб хөтөч
Name[ms]=Pelungsur Web Firefox
Name[nb]=Firefox nettleser
Name[nl]=Firefox Webbrowser
Name[nn]=Firefox nettlesar
Name[no]=Firefox nettleser
Name[pa]=
Name[pl]=Przeglądarka WWW Firefox
Name[pt]=Navegador Web Firefox
Name[pt_BR]=Navegador Web Firefox
Name[ro]=Navigatorul Firefox
Name[ru]=Веб-браузер Firefox
Name[sk]=
Name[sl]=Spletni brskalnik Firefox
Name[sq]=Firefox - Shfletuesi Web
Name[sr]=
Name[sr@Latn]=Veb čitač Spoznaja
Name[sv]=Webbläsaren Firefox
Name[ta]=ிி ி
Name[tk]=Firefox Web Ahtarçisi
Name[tr]=Firefox Web Tarayıcı
Name[uk]=Переглядач web Firefox
Name[vi]=Trình Duyt Web Firefox
Name[wa]=Betchteu waibe epiphany
Name[zh_CN]=Firefox Web
Name[zh_TW]=Firefox
GenericName=Web Browser
GenericName[ar]=متصفّح الانترنت
GenericName[az]=Veb Səyyahı
GenericName[be]=Вандроўнік па павуціньню
GenericName[bg]=Браузър
GenericName[bn]=
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[cs]=Prohlížeč WWW
GenericName[cy]=Porwr Gwe
GenericName[da]=Internetsurfning
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής Ιστοσελίδων
GenericName[en_CA]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web Firefox
GenericName[ga]=Brabhsálaí Lín
GenericName[gu]=
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[id]=Browser Web
GenericName[it]=Browser web
GenericName[ja]=GNOME
GenericName[ko]=
GenericName[li]=Wèb Browser
GenericName[lt]=Web naršyklė
GenericName[mk]=Веб прелистувач
GenericName[mn]=Веб хөтөч
GenericName[ms]=Pelungsur Web
GenericName[nb]=Nettleser
GenericName[nl]=Web-browser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pa]=
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sq]=Shfletuesi Web
GenericName[sr]=Веб читач
GenericName[sr@Latn]=Veb čitač
GenericName[sv]=Webbläsare
GenericName[ta]= ி
GenericName[th]=
GenericName[tk]=Web Ahtarçysy
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Переглядач web-сторінок
GenericName[vi]=Trình duyt Web
GenericName[wa]=Betchteu waibe
GenericName[zh_CN]=Web
GenericName[zh_TW]=
Comment=Browse the web
Comment[ar]=تصفح الانترنت
Comment[az]=Vebi gəzin
Comment[be]=Вандраваць па павуціньню
Comment[bg]=Сърфиране в интернет
Comment[bn]=
Comment[bs]=Pregledaj na internetu
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížet WWW
Comment[cy]=Pori'r we
Comment[da]=Surf på internettet
Comment[de]=Im Web surfen
Comment[el]=Περιήγηση στον παγκόσμιο ιστό
Comment[en_CA]=Browse the web
Comment[en_GB]=Browse the web
Comment[es]=Navegar por la web
Comment[et]=Sirvi veebi
Comment[eu]=Arakatu web-a
Comment[fi]=Selaa WWW:tä
Comment[fr]=Naviguer sur Internet
Comment[ga]=Brabhsáil an Líon
Comment[gu]=
Comment[he]=גלוש ברשת
Comment[hi]=
Comment[hr]=Pregledaj Web
Comment[hu]=A világháló böngészése
Comment[id]=Jelajah web
Comment[it]=Esplora il web
Comment[ja]=
Comment[ko]=
Comment[li]=Blajere op internet
Comment[lt]=Naršyti internete
Comment[mk]=Прелистувајте на веб
Comment[ml]= ി
Comment[mn]=Веб броузе хийх
Comment[ms]=Layari web
Comment[nb]=Surf på nettet
Comment[nl]=Websurfen
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pa]=
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegar na web
Comment[pt_BR]=Navegar na web
Comment[ro]=Navigare Internet
Comment[ru]=Веб-браузер
Comment[sk]=Prehliadať internet
Comment[sl]=Brskaj po spletu
Comment[sq]=Eksploro web-in
Comment[sr]=Прегледај веб
Comment[sr@Latn]=Pregledaj veb
Comment[sv]=Surfa på nätet
Comment[ta]=ி
Comment[th]= Firefox
Comment[tk]=Webi Ahtar
Comment[tr]=Web'e Gözat
Comment[uk]=Програма перегляду web-сторінок
Comment[vi]=Duyt web
Comment[wa]=Naivyî avå les waibes
Comment[zh_CN]= Web
Comment[zh_TW]=
Exec=firefox %U
Icon=@FIREFOX_ICON@
StartupNotify=false
Terminal=false
Type=Application
Categories=Application;Network;
Encoding=UTF-8
MimeType=text/html;text/xml;application/xhtml+xml;

View File

@ -1,56 +1,499 @@
--- browser/app/mozilla.in.orig Tue Oct 26 05:26:11 2004
+++ browser/app/mozilla.in Mon Dec 27 19:15:52 2004
@@ -110,6 +110,7 @@
# 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 "Cannot find mozilla runtime directory. Exiting."
exit 1
@@ -160,11 +161,11 @@
_optLast="${i}"
done #last arg
-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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
+ [ `expr -- "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
fi
################################################################ Parse Arguments
@@ -207,12 +208,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
--- browser/app/mozilla.in.orig Tue Oct 26 11:26:11 2004
+++ browser/app/mozilla.in Wed Feb 23 11:09:49 2005
@@ -28,52 +28,110 @@
## The script will setup all the environment voodoo needed to make
## the mozilla-bin binary to work.
##
-
+#!/bin/sh
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL. You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+#
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+#
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All Rights
+# Reserved.
+#
+
+if [ ! -n "${_done_locale}" -a -n "${MOZILLA_UILOCALE}" ]; then
+ if [ -n "${MOZILLA_UIREGION}" ]; then
+ moreargs="-UIRegion ${MOZILLA_UIREGION} $moreargs"
+ fi
+ moreargs="-UILocale ${MOZILLA_UILOCALE} $moreargs"
+fi
+unset _done_locale
+# $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
}
export MRE_HOME
eval "set -- $moreargs"
-#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,149 +140,224 @@
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`
- run_moz="$dist_bin/run-mozilla.sh"
- 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
+ # 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
-script_args=""
-moreargs=""
-debugging=0
MOZILLA_BIN="${progbase}-bin"
+if [ "$OSTYPE" = "beos" ]; then
+ mimeset -F "$MOZILLA_BIN"
+fi
-# 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 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)"
+
+# 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
-_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
-
-_optLast=
-for i in "$@"; do
- _optLast="${i}"
-done #last arg
-
-if [ `expr "${_optLast}" : '.*:/.*'` -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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
-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
- _remote_cmd="openURL(${_optLast})"
- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "${_remote_cmd}"
- unset _remote_cmd
- 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(openBrowser)"
- 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
-# 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
+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
-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=$?
## Stop addon scripts

View File

@ -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);

View File

@ -6,13 +6,12 @@
#
PORTNAME= firefox
PORTVERSION= 1.0
PORTREVISION= 7
PORTVERSION= 1.0.1
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0/source
DISTNAME= ${PORTNAME}-1.0-source
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0.1/source
DISTNAME= ${PORTNAME}-1.0.1-source
MAINTAINER= gnome@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
@ -32,7 +31,7 @@ PLIST= ${WRKDIR}/plist
PLUGINSDIR= ${PREFIX}/lib/browser_plugins
USE_BZIP2= yes
USE_GMAKE= yes
USE_GNOME= gtk20 libidl gnomehier
USE_GNOME= gtk20 libidl gnomehier desktopfileutils
USE_ICONV= yes
USE_PERL5_BUILD=yes
USE_X_PREFIX= yes
@ -62,11 +61,14 @@ 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
SYSTEM_PREFS= ${FAKEDIR}/lib/${FIREFOX}-${FF_VER}/defaults/pref/firefox.js
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 \
SMB "Enable smb:// URI support using gnomevfs" off
SMB "Enable smb:// URI support using gnomevfs" off \
NEWTAB "Open external links in a new tab" on
.include <bsd.port.pre.mk>
@ -76,9 +78,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)
@ -137,6 +139,12 @@ post-patch:
< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
@${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${FIREFOX}|g' \
< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
.for ii in ${EXTRA_SCRIPTS}
@${SED} -e 's|%%MOZILLA%%|${FIREFOX}|g ; \
s|%%PREFIX%%|${PREFIX}|g ; \
s|%%X11BASE%%|${X11BASE}|g' \
< ${FILESDIR}/${ii} > ${WRKDIR}/${ii}
.endfor
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/build/unix/run-mozilla.sh
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
@ -180,6 +188,12 @@ pre-install:
done
${ECHO_CMD} bin/firefox >> ${PLIST}
${ECHO_CMD} bin/firefox-config >> ${PLIST}
.if !defined(WITHOUT_NEWTAB)
${ECHO_CMD} >> ${SYSTEM_PREFS}
${ECHO_CMD} "// Open external links in new tab" >> ${SYSTEM_PREFS}
${ECHO_CMD} "pref(\"browser.link.open_external\", 3);" \
>> ${SYSTEM_PREFS}
.endif # !defined(WITHOUT_NEWTAB)
cd ${FAKEDIR}/lib/${FIREFOX}-${FF_VER} && ${FIND} -s * -type f -o -type l | \
${SED} -e 's|^|lib/${FIREFOX}/|' >> ${PLIST} \
&& ${FIND} -d * -type d | \
@ -198,6 +212,8 @@ pre-install:
${ECHO_CMD} @dirrm include/${FIREFOX} >> ${PLIST}
${ECHO_CMD} lib/browser_plugins/.${PORTNAME}.keep >> ${PLIST}
${ECHO_CMD} "@unexec ${RMDIR} %D/lib/browser_plugins 2>/dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@exec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@unexec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
do-install:
${MKDIR} ${PREFIX}/lib/${FIREFOX}
@ -240,5 +256,6 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/firefox.desktop ${PREFIX}/share/gnome/applications
${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/firefox/default.xpm \
${PREFIX}/lib/${FIREFOX}/chrome/icons/default/default.xpm
@-update-desktop-database
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (firefox-1.0-source.tar.bz2) = 49c16a71f4de014ea471be81e46b1da8
SIZE (firefox-1.0-source.tar.bz2) = 32686249
MD5 (firefox-1.0.1-source.tar.bz2) = ebaea974fea9460ab7050fff76b41cb1
SIZE (firefox-1.0.1-source.tar.bz2) = 32671529

View File

@ -1,9 +1,191 @@
[Desktop Entry]
Name=Firefox
Comment=Firefox Web Browser
Encoding=UTF-8
Name=Firefox Web Browser
Name[am]=
Name[ar]=
Name[az]=Firefox Veb Səyyahı
Name[be]=
Name[bg]=Интернет браузър Firefox
Name[bn]=
Name[bs]=Firefox web preglednik
Name[ca]=Navegador web Firefox
Name[cs]=Prohlížeč WWW Firefox
Name[cy]=Y Porwr Gwe Firefox
Name[da]=Firefox - internetsurfning
Name[de]=Firefox Webbrowser
Name[el]=Περιηγητής Διαδικτύου Firefox
Name[en_CA]=Firefox Web Browser
Name[en_GB]=Firefox Web Browser
Name[es]=Navegador Web Firefox
Name[et]=Firefox veebibrauser
Name[eu]=Firefox web arakatzailea
Name[fi]=Firefox, WWW-selain
Name[fr]=Navigateur Web Firefox
Name[ga]=Brabhsálaí Lín Firefox
Name[gu]=
Name[he]=דפדפן Firefox
Name[hi]=
Name[hr]=Firefox Web preglednik
Name[hu]=Firefox webböngésző
Name[id]=Web Browser Firefox
Name[it]=Browser web Firefox
Name[ja]=Firefox
Name[ko]=Firefox
Name[li]=Firefox Web Browser
Name[lt]=Firefox web naršyklė
Name[mk]=Firefox веб прелистувач
Name[ml]=ിി
Name[mn]=Firefox веб хөтөч
Name[ms]=Pelungsur Web Firefox
Name[nb]=Firefox nettleser
Name[nl]=Firefox Webbrowser
Name[nn]=Firefox nettlesar
Name[no]=Firefox nettleser
Name[pa]=
Name[pl]=Przeglądarka WWW Firefox
Name[pt]=Navegador Web Firefox
Name[pt_BR]=Navegador Web Firefox
Name[ro]=Navigatorul Firefox
Name[ru]=Веб-браузер Firefox
Name[sk]=
Name[sl]=Spletni brskalnik Firefox
Name[sq]=Firefox - Shfletuesi Web
Name[sr]=
Name[sr@Latn]=Veb čitač Spoznaja
Name[sv]=Webbläsaren Firefox
Name[ta]=ிி ி
Name[tk]=Firefox Web Ahtarçisi
Name[tr]=Firefox Web Tarayıcı
Name[uk]=Переглядач web Firefox
Name[vi]=Trình Duyt Web Firefox
Name[wa]=Betchteu waibe epiphany
Name[zh_CN]=Firefox Web
Name[zh_TW]=Firefox
GenericName=Web Browser
GenericName[ar]=متصفّح الانترنت
GenericName[az]=Veb Səyyahı
GenericName[be]=Вандроўнік па павуціньню
GenericName[bg]=Браузър
GenericName[bn]=
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[cs]=Prohlížeč WWW
GenericName[cy]=Porwr Gwe
GenericName[da]=Internetsurfning
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής Ιστοσελίδων
GenericName[en_CA]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web Firefox
GenericName[ga]=Brabhsálaí Lín
GenericName[gu]=
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[id]=Browser Web
GenericName[it]=Browser web
GenericName[ja]=GNOME
GenericName[ko]=
GenericName[li]=Wèb Browser
GenericName[lt]=Web naršyklė
GenericName[mk]=Веб прелистувач
GenericName[mn]=Веб хөтөч
GenericName[ms]=Pelungsur Web
GenericName[nb]=Nettleser
GenericName[nl]=Web-browser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pa]=
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sq]=Shfletuesi Web
GenericName[sr]=Веб читач
GenericName[sr@Latn]=Veb čitač
GenericName[sv]=Webbläsare
GenericName[ta]= ி
GenericName[th]=
GenericName[tk]=Web Ahtarçysy
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Переглядач web-сторінок
GenericName[vi]=Trình duyt Web
GenericName[wa]=Betchteu waibe
GenericName[zh_CN]=Web
GenericName[zh_TW]=
Comment=Browse the web
Comment[ar]=تصفح الانترنت
Comment[az]=Vebi gəzin
Comment[be]=Вандраваць па павуціньню
Comment[bg]=Сърфиране в интернет
Comment[bn]=
Comment[bs]=Pregledaj na internetu
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížet WWW
Comment[cy]=Pori'r we
Comment[da]=Surf på internettet
Comment[de]=Im Web surfen
Comment[el]=Περιήγηση στον παγκόσμιο ιστό
Comment[en_CA]=Browse the web
Comment[en_GB]=Browse the web
Comment[es]=Navegar por la web
Comment[et]=Sirvi veebi
Comment[eu]=Arakatu web-a
Comment[fi]=Selaa WWW:tä
Comment[fr]=Naviguer sur Internet
Comment[ga]=Brabhsáil an Líon
Comment[gu]=
Comment[he]=גלוש ברשת
Comment[hi]=
Comment[hr]=Pregledaj Web
Comment[hu]=A világháló böngészése
Comment[id]=Jelajah web
Comment[it]=Esplora il web
Comment[ja]=
Comment[ko]=
Comment[li]=Blajere op internet
Comment[lt]=Naršyti internete
Comment[mk]=Прелистувајте на веб
Comment[ml]= ി
Comment[mn]=Веб броузе хийх
Comment[ms]=Layari web
Comment[nb]=Surf på nettet
Comment[nl]=Websurfen
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pa]=
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegar na web
Comment[pt_BR]=Navegar na web
Comment[ro]=Navigare Internet
Comment[ru]=Веб-браузер
Comment[sk]=Prehliadať internet
Comment[sl]=Brskaj po spletu
Comment[sq]=Eksploro web-in
Comment[sr]=Прегледај веб
Comment[sr@Latn]=Pregledaj veb
Comment[sv]=Surfa på nätet
Comment[ta]=ி
Comment[th]= Firefox
Comment[tk]=Webi Ahtar
Comment[tr]=Web'e Gözat
Comment[uk]=Програма перегляду web-сторінок
Comment[vi]=Duyt web
Comment[wa]=Naivyî avå les waibes
Comment[zh_CN]= Web
Comment[zh_TW]=
Exec=firefox %U
Icon=@FIREFOX_ICON@
StartupNotify=false
Terminal=false
Type=Application
Categories=Application;Network;
Encoding=UTF-8
MimeType=text/html;text/xml;application/xhtml+xml;

View File

@ -1,56 +1,499 @@
--- browser/app/mozilla.in.orig Tue Oct 26 05:26:11 2004
+++ browser/app/mozilla.in Mon Dec 27 19:15:52 2004
@@ -110,6 +110,7 @@
# 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 "Cannot find mozilla runtime directory. Exiting."
exit 1
@@ -160,11 +161,11 @@
_optLast="${i}"
done #last arg
-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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
+ [ `expr -- "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
fi
################################################################ Parse Arguments
@@ -207,12 +208,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
--- browser/app/mozilla.in.orig Tue Oct 26 11:26:11 2004
+++ browser/app/mozilla.in Wed Feb 23 11:09:49 2005
@@ -28,52 +28,110 @@
## The script will setup all the environment voodoo needed to make
## the mozilla-bin binary to work.
##
-
+#!/bin/sh
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL. You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+#
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+#
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All Rights
+# Reserved.
+#
+
+if [ ! -n "${_done_locale}" -a -n "${MOZILLA_UILOCALE}" ]; then
+ if [ -n "${MOZILLA_UIREGION}" ]; then
+ moreargs="-UIRegion ${MOZILLA_UIREGION} $moreargs"
+ fi
+ moreargs="-UILocale ${MOZILLA_UILOCALE} $moreargs"
+fi
+unset _done_locale
+# $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
}
export MRE_HOME
eval "set -- $moreargs"
-#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,149 +140,224 @@
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`
- run_moz="$dist_bin/run-mozilla.sh"
- 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
+ # 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
-script_args=""
-moreargs=""
-debugging=0
MOZILLA_BIN="${progbase}-bin"
+if [ "$OSTYPE" = "beos" ]; then
+ mimeset -F "$MOZILLA_BIN"
+fi
-# 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 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)"
+
+# 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
-_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
-
-_optLast=
-for i in "$@"; do
- _optLast="${i}"
-done #last arg
-
-if [ `expr "${_optLast}" : '.*:/.*'` -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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
-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
- _remote_cmd="openURL(${_optLast})"
- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "${_remote_cmd}"
- unset _remote_cmd
- 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(openBrowser)"
- 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
-# 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
+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
-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=$?
## Stop addon scripts

View File

@ -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);

View File

@ -6,13 +6,12 @@
#
PORTNAME= firefox
PORTVERSION= 1.0
PORTREVISION= 7
PORTVERSION= 1.0.1
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0/source
DISTNAME= ${PORTNAME}-1.0-source
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0.1/source
DISTNAME= ${PORTNAME}-1.0.1-source
MAINTAINER= gnome@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
@ -32,7 +31,7 @@ PLIST= ${WRKDIR}/plist
PLUGINSDIR= ${PREFIX}/lib/browser_plugins
USE_BZIP2= yes
USE_GMAKE= yes
USE_GNOME= gtk20 libidl gnomehier
USE_GNOME= gtk20 libidl gnomehier desktopfileutils
USE_ICONV= yes
USE_PERL5_BUILD=yes
USE_X_PREFIX= yes
@ -62,11 +61,14 @@ 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
SYSTEM_PREFS= ${FAKEDIR}/lib/${FIREFOX}-${FF_VER}/defaults/pref/firefox.js
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 \
SMB "Enable smb:// URI support using gnomevfs" off
SMB "Enable smb:// URI support using gnomevfs" off \
NEWTAB "Open external links in a new tab" on
.include <bsd.port.pre.mk>
@ -76,9 +78,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)
@ -137,6 +139,12 @@ post-patch:
< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
@${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${FIREFOX}|g' \
< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
.for ii in ${EXTRA_SCRIPTS}
@${SED} -e 's|%%MOZILLA%%|${FIREFOX}|g ; \
s|%%PREFIX%%|${PREFIX}|g ; \
s|%%X11BASE%%|${X11BASE}|g' \
< ${FILESDIR}/${ii} > ${WRKDIR}/${ii}
.endfor
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/build/unix/run-mozilla.sh
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
@ -180,6 +188,12 @@ pre-install:
done
${ECHO_CMD} bin/firefox >> ${PLIST}
${ECHO_CMD} bin/firefox-config >> ${PLIST}
.if !defined(WITHOUT_NEWTAB)
${ECHO_CMD} >> ${SYSTEM_PREFS}
${ECHO_CMD} "// Open external links in new tab" >> ${SYSTEM_PREFS}
${ECHO_CMD} "pref(\"browser.link.open_external\", 3);" \
>> ${SYSTEM_PREFS}
.endif # !defined(WITHOUT_NEWTAB)
cd ${FAKEDIR}/lib/${FIREFOX}-${FF_VER} && ${FIND} -s * -type f -o -type l | \
${SED} -e 's|^|lib/${FIREFOX}/|' >> ${PLIST} \
&& ${FIND} -d * -type d | \
@ -198,6 +212,8 @@ pre-install:
${ECHO_CMD} @dirrm include/${FIREFOX} >> ${PLIST}
${ECHO_CMD} lib/browser_plugins/.${PORTNAME}.keep >> ${PLIST}
${ECHO_CMD} "@unexec ${RMDIR} %D/lib/browser_plugins 2>/dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@exec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@unexec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
do-install:
${MKDIR} ${PREFIX}/lib/${FIREFOX}
@ -240,5 +256,6 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/firefox.desktop ${PREFIX}/share/gnome/applications
${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/firefox/default.xpm \
${PREFIX}/lib/${FIREFOX}/chrome/icons/default/default.xpm
@-update-desktop-database
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (firefox-1.0-source.tar.bz2) = 49c16a71f4de014ea471be81e46b1da8
SIZE (firefox-1.0-source.tar.bz2) = 32686249
MD5 (firefox-1.0.1-source.tar.bz2) = ebaea974fea9460ab7050fff76b41cb1
SIZE (firefox-1.0.1-source.tar.bz2) = 32671529

View File

@ -1,9 +1,191 @@
[Desktop Entry]
Name=Firefox
Comment=Firefox Web Browser
Encoding=UTF-8
Name=Firefox Web Browser
Name[am]=
Name[ar]=
Name[az]=Firefox Veb Səyyahı
Name[be]=
Name[bg]=Интернет браузър Firefox
Name[bn]=
Name[bs]=Firefox web preglednik
Name[ca]=Navegador web Firefox
Name[cs]=Prohlížeč WWW Firefox
Name[cy]=Y Porwr Gwe Firefox
Name[da]=Firefox - internetsurfning
Name[de]=Firefox Webbrowser
Name[el]=Περιηγητής Διαδικτύου Firefox
Name[en_CA]=Firefox Web Browser
Name[en_GB]=Firefox Web Browser
Name[es]=Navegador Web Firefox
Name[et]=Firefox veebibrauser
Name[eu]=Firefox web arakatzailea
Name[fi]=Firefox, WWW-selain
Name[fr]=Navigateur Web Firefox
Name[ga]=Brabhsálaí Lín Firefox
Name[gu]=
Name[he]=דפדפן Firefox
Name[hi]=
Name[hr]=Firefox Web preglednik
Name[hu]=Firefox webböngésző
Name[id]=Web Browser Firefox
Name[it]=Browser web Firefox
Name[ja]=Firefox
Name[ko]=Firefox
Name[li]=Firefox Web Browser
Name[lt]=Firefox web naršyklė
Name[mk]=Firefox веб прелистувач
Name[ml]=ിി
Name[mn]=Firefox веб хөтөч
Name[ms]=Pelungsur Web Firefox
Name[nb]=Firefox nettleser
Name[nl]=Firefox Webbrowser
Name[nn]=Firefox nettlesar
Name[no]=Firefox nettleser
Name[pa]=
Name[pl]=Przeglądarka WWW Firefox
Name[pt]=Navegador Web Firefox
Name[pt_BR]=Navegador Web Firefox
Name[ro]=Navigatorul Firefox
Name[ru]=Веб-браузер Firefox
Name[sk]=
Name[sl]=Spletni brskalnik Firefox
Name[sq]=Firefox - Shfletuesi Web
Name[sr]=
Name[sr@Latn]=Veb čitač Spoznaja
Name[sv]=Webbläsaren Firefox
Name[ta]=ிி ி
Name[tk]=Firefox Web Ahtarçisi
Name[tr]=Firefox Web Tarayıcı
Name[uk]=Переглядач web Firefox
Name[vi]=Trình Duyt Web Firefox
Name[wa]=Betchteu waibe epiphany
Name[zh_CN]=Firefox Web
Name[zh_TW]=Firefox
GenericName=Web Browser
GenericName[ar]=متصفّح الانترنت
GenericName[az]=Veb Səyyahı
GenericName[be]=Вандроўнік па павуціньню
GenericName[bg]=Браузър
GenericName[bn]=
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[cs]=Prohlížeč WWW
GenericName[cy]=Porwr Gwe
GenericName[da]=Internetsurfning
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής Ιστοσελίδων
GenericName[en_CA]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web Firefox
GenericName[ga]=Brabhsálaí Lín
GenericName[gu]=
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[id]=Browser Web
GenericName[it]=Browser web
GenericName[ja]=GNOME
GenericName[ko]=
GenericName[li]=Wèb Browser
GenericName[lt]=Web naršyklė
GenericName[mk]=Веб прелистувач
GenericName[mn]=Веб хөтөч
GenericName[ms]=Pelungsur Web
GenericName[nb]=Nettleser
GenericName[nl]=Web-browser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pa]=
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sq]=Shfletuesi Web
GenericName[sr]=Веб читач
GenericName[sr@Latn]=Veb čitač
GenericName[sv]=Webbläsare
GenericName[ta]= ி
GenericName[th]=
GenericName[tk]=Web Ahtarçysy
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Переглядач web-сторінок
GenericName[vi]=Trình duyt Web
GenericName[wa]=Betchteu waibe
GenericName[zh_CN]=Web
GenericName[zh_TW]=
Comment=Browse the web
Comment[ar]=تصفح الانترنت
Comment[az]=Vebi gəzin
Comment[be]=Вандраваць па павуціньню
Comment[bg]=Сърфиране в интернет
Comment[bn]=
Comment[bs]=Pregledaj na internetu
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížet WWW
Comment[cy]=Pori'r we
Comment[da]=Surf på internettet
Comment[de]=Im Web surfen
Comment[el]=Περιήγηση στον παγκόσμιο ιστό
Comment[en_CA]=Browse the web
Comment[en_GB]=Browse the web
Comment[es]=Navegar por la web
Comment[et]=Sirvi veebi
Comment[eu]=Arakatu web-a
Comment[fi]=Selaa WWW:tä
Comment[fr]=Naviguer sur Internet
Comment[ga]=Brabhsáil an Líon
Comment[gu]=
Comment[he]=גלוש ברשת
Comment[hi]=
Comment[hr]=Pregledaj Web
Comment[hu]=A világháló böngészése
Comment[id]=Jelajah web
Comment[it]=Esplora il web
Comment[ja]=
Comment[ko]=
Comment[li]=Blajere op internet
Comment[lt]=Naršyti internete
Comment[mk]=Прелистувајте на веб
Comment[ml]= ി
Comment[mn]=Веб броузе хийх
Comment[ms]=Layari web
Comment[nb]=Surf på nettet
Comment[nl]=Websurfen
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pa]=
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegar na web
Comment[pt_BR]=Navegar na web
Comment[ro]=Navigare Internet
Comment[ru]=Веб-браузер
Comment[sk]=Prehliadať internet
Comment[sl]=Brskaj po spletu
Comment[sq]=Eksploro web-in
Comment[sr]=Прегледај веб
Comment[sr@Latn]=Pregledaj veb
Comment[sv]=Surfa på nätet
Comment[ta]=ி
Comment[th]= Firefox
Comment[tk]=Webi Ahtar
Comment[tr]=Web'e Gözat
Comment[uk]=Програма перегляду web-сторінок
Comment[vi]=Duyt web
Comment[wa]=Naivyî avå les waibes
Comment[zh_CN]= Web
Comment[zh_TW]=
Exec=firefox %U
Icon=@FIREFOX_ICON@
StartupNotify=false
Terminal=false
Type=Application
Categories=Application;Network;
Encoding=UTF-8
MimeType=text/html;text/xml;application/xhtml+xml;

View File

@ -1,56 +1,499 @@
--- browser/app/mozilla.in.orig Tue Oct 26 05:26:11 2004
+++ browser/app/mozilla.in Mon Dec 27 19:15:52 2004
@@ -110,6 +110,7 @@
# 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 "Cannot find mozilla runtime directory. Exiting."
exit 1
@@ -160,11 +161,11 @@
_optLast="${i}"
done #last arg
-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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
+ [ `expr -- "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
fi
################################################################ Parse Arguments
@@ -207,12 +208,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
--- browser/app/mozilla.in.orig Tue Oct 26 11:26:11 2004
+++ browser/app/mozilla.in Wed Feb 23 11:09:49 2005
@@ -28,52 +28,110 @@
## The script will setup all the environment voodoo needed to make
## the mozilla-bin binary to work.
##
-
+#!/bin/sh
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL. You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+#
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+#
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All Rights
+# Reserved.
+#
+
+if [ ! -n "${_done_locale}" -a -n "${MOZILLA_UILOCALE}" ]; then
+ if [ -n "${MOZILLA_UIREGION}" ]; then
+ moreargs="-UIRegion ${MOZILLA_UIREGION} $moreargs"
+ fi
+ moreargs="-UILocale ${MOZILLA_UILOCALE} $moreargs"
+fi
+unset _done_locale
+# $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
}
export MRE_HOME
eval "set -- $moreargs"
-#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,149 +140,224 @@
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`
- run_moz="$dist_bin/run-mozilla.sh"
- 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
+ # 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
-script_args=""
-moreargs=""
-debugging=0
MOZILLA_BIN="${progbase}-bin"
+if [ "$OSTYPE" = "beos" ]; then
+ mimeset -F "$MOZILLA_BIN"
+fi
-# 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 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)"
+
+# 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
-_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
-
-_optLast=
-for i in "$@"; do
- _optLast="${i}"
-done #last arg
-
-if [ `expr "${_optLast}" : '.*:/.*'` -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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
-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
- _remote_cmd="openURL(${_optLast})"
- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "${_remote_cmd}"
- unset _remote_cmd
- 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(openBrowser)"
- 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
-# 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
+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
-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=$?
## Stop addon scripts

View File

@ -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);

View File

@ -6,13 +6,12 @@
#
PORTNAME= firefox
PORTVERSION= 1.0
PORTREVISION= 7
PORTVERSION= 1.0.1
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0/source
DISTNAME= ${PORTNAME}-1.0-source
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0.1/source
DISTNAME= ${PORTNAME}-1.0.1-source
MAINTAINER= gnome@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
@ -32,7 +31,7 @@ PLIST= ${WRKDIR}/plist
PLUGINSDIR= ${PREFIX}/lib/browser_plugins
USE_BZIP2= yes
USE_GMAKE= yes
USE_GNOME= gtk20 libidl gnomehier
USE_GNOME= gtk20 libidl gnomehier desktopfileutils
USE_ICONV= yes
USE_PERL5_BUILD=yes
USE_X_PREFIX= yes
@ -62,11 +61,14 @@ 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
SYSTEM_PREFS= ${FAKEDIR}/lib/${FIREFOX}-${FF_VER}/defaults/pref/firefox.js
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 \
SMB "Enable smb:// URI support using gnomevfs" off
SMB "Enable smb:// URI support using gnomevfs" off \
NEWTAB "Open external links in a new tab" on
.include <bsd.port.pre.mk>
@ -76,9 +78,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)
@ -137,6 +139,12 @@ post-patch:
< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
@${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${FIREFOX}|g' \
< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
.for ii in ${EXTRA_SCRIPTS}
@${SED} -e 's|%%MOZILLA%%|${FIREFOX}|g ; \
s|%%PREFIX%%|${PREFIX}|g ; \
s|%%X11BASE%%|${X11BASE}|g' \
< ${FILESDIR}/${ii} > ${WRKDIR}/${ii}
.endfor
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/build/unix/run-mozilla.sh
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
@ -180,6 +188,12 @@ pre-install:
done
${ECHO_CMD} bin/firefox >> ${PLIST}
${ECHO_CMD} bin/firefox-config >> ${PLIST}
.if !defined(WITHOUT_NEWTAB)
${ECHO_CMD} >> ${SYSTEM_PREFS}
${ECHO_CMD} "// Open external links in new tab" >> ${SYSTEM_PREFS}
${ECHO_CMD} "pref(\"browser.link.open_external\", 3);" \
>> ${SYSTEM_PREFS}
.endif # !defined(WITHOUT_NEWTAB)
cd ${FAKEDIR}/lib/${FIREFOX}-${FF_VER} && ${FIND} -s * -type f -o -type l | \
${SED} -e 's|^|lib/${FIREFOX}/|' >> ${PLIST} \
&& ${FIND} -d * -type d | \
@ -198,6 +212,8 @@ pre-install:
${ECHO_CMD} @dirrm include/${FIREFOX} >> ${PLIST}
${ECHO_CMD} lib/browser_plugins/.${PORTNAME}.keep >> ${PLIST}
${ECHO_CMD} "@unexec ${RMDIR} %D/lib/browser_plugins 2>/dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@exec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@unexec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
do-install:
${MKDIR} ${PREFIX}/lib/${FIREFOX}
@ -240,5 +256,6 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/firefox.desktop ${PREFIX}/share/gnome/applications
${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/firefox/default.xpm \
${PREFIX}/lib/${FIREFOX}/chrome/icons/default/default.xpm
@-update-desktop-database
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (firefox-1.0-source.tar.bz2) = 49c16a71f4de014ea471be81e46b1da8
SIZE (firefox-1.0-source.tar.bz2) = 32686249
MD5 (firefox-1.0.1-source.tar.bz2) = ebaea974fea9460ab7050fff76b41cb1
SIZE (firefox-1.0.1-source.tar.bz2) = 32671529

View File

@ -1,9 +1,191 @@
[Desktop Entry]
Name=Firefox
Comment=Firefox Web Browser
Encoding=UTF-8
Name=Firefox Web Browser
Name[am]=
Name[ar]=
Name[az]=Firefox Veb Səyyahı
Name[be]=
Name[bg]=Интернет браузър Firefox
Name[bn]=
Name[bs]=Firefox web preglednik
Name[ca]=Navegador web Firefox
Name[cs]=Prohlížeč WWW Firefox
Name[cy]=Y Porwr Gwe Firefox
Name[da]=Firefox - internetsurfning
Name[de]=Firefox Webbrowser
Name[el]=Περιηγητής Διαδικτύου Firefox
Name[en_CA]=Firefox Web Browser
Name[en_GB]=Firefox Web Browser
Name[es]=Navegador Web Firefox
Name[et]=Firefox veebibrauser
Name[eu]=Firefox web arakatzailea
Name[fi]=Firefox, WWW-selain
Name[fr]=Navigateur Web Firefox
Name[ga]=Brabhsálaí Lín Firefox
Name[gu]=
Name[he]=דפדפן Firefox
Name[hi]=
Name[hr]=Firefox Web preglednik
Name[hu]=Firefox webböngésző
Name[id]=Web Browser Firefox
Name[it]=Browser web Firefox
Name[ja]=Firefox
Name[ko]=Firefox
Name[li]=Firefox Web Browser
Name[lt]=Firefox web naršyklė
Name[mk]=Firefox веб прелистувач
Name[ml]=ിി
Name[mn]=Firefox веб хөтөч
Name[ms]=Pelungsur Web Firefox
Name[nb]=Firefox nettleser
Name[nl]=Firefox Webbrowser
Name[nn]=Firefox nettlesar
Name[no]=Firefox nettleser
Name[pa]=
Name[pl]=Przeglądarka WWW Firefox
Name[pt]=Navegador Web Firefox
Name[pt_BR]=Navegador Web Firefox
Name[ro]=Navigatorul Firefox
Name[ru]=Веб-браузер Firefox
Name[sk]=
Name[sl]=Spletni brskalnik Firefox
Name[sq]=Firefox - Shfletuesi Web
Name[sr]=
Name[sr@Latn]=Veb čitač Spoznaja
Name[sv]=Webbläsaren Firefox
Name[ta]=ிி ி
Name[tk]=Firefox Web Ahtarçisi
Name[tr]=Firefox Web Tarayıcı
Name[uk]=Переглядач web Firefox
Name[vi]=Trình Duyt Web Firefox
Name[wa]=Betchteu waibe epiphany
Name[zh_CN]=Firefox Web
Name[zh_TW]=Firefox
GenericName=Web Browser
GenericName[ar]=متصفّح الانترنت
GenericName[az]=Veb Səyyahı
GenericName[be]=Вандроўнік па павуціньню
GenericName[bg]=Браузър
GenericName[bn]=
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[cs]=Prohlížeč WWW
GenericName[cy]=Porwr Gwe
GenericName[da]=Internetsurfning
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής Ιστοσελίδων
GenericName[en_CA]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web Firefox
GenericName[ga]=Brabhsálaí Lín
GenericName[gu]=
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[id]=Browser Web
GenericName[it]=Browser web
GenericName[ja]=GNOME
GenericName[ko]=
GenericName[li]=Wèb Browser
GenericName[lt]=Web naršyklė
GenericName[mk]=Веб прелистувач
GenericName[mn]=Веб хөтөч
GenericName[ms]=Pelungsur Web
GenericName[nb]=Nettleser
GenericName[nl]=Web-browser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pa]=
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sq]=Shfletuesi Web
GenericName[sr]=Веб читач
GenericName[sr@Latn]=Veb čitač
GenericName[sv]=Webbläsare
GenericName[ta]= ி
GenericName[th]=
GenericName[tk]=Web Ahtarçysy
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Переглядач web-сторінок
GenericName[vi]=Trình duyt Web
GenericName[wa]=Betchteu waibe
GenericName[zh_CN]=Web
GenericName[zh_TW]=
Comment=Browse the web
Comment[ar]=تصفح الانترنت
Comment[az]=Vebi gəzin
Comment[be]=Вандраваць па павуціньню
Comment[bg]=Сърфиране в интернет
Comment[bn]=
Comment[bs]=Pregledaj na internetu
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížet WWW
Comment[cy]=Pori'r we
Comment[da]=Surf på internettet
Comment[de]=Im Web surfen
Comment[el]=Περιήγηση στον παγκόσμιο ιστό
Comment[en_CA]=Browse the web
Comment[en_GB]=Browse the web
Comment[es]=Navegar por la web
Comment[et]=Sirvi veebi
Comment[eu]=Arakatu web-a
Comment[fi]=Selaa WWW:tä
Comment[fr]=Naviguer sur Internet
Comment[ga]=Brabhsáil an Líon
Comment[gu]=
Comment[he]=גלוש ברשת
Comment[hi]=
Comment[hr]=Pregledaj Web
Comment[hu]=A világháló böngészése
Comment[id]=Jelajah web
Comment[it]=Esplora il web
Comment[ja]=
Comment[ko]=
Comment[li]=Blajere op internet
Comment[lt]=Naršyti internete
Comment[mk]=Прелистувајте на веб
Comment[ml]= ി
Comment[mn]=Веб броузе хийх
Comment[ms]=Layari web
Comment[nb]=Surf på nettet
Comment[nl]=Websurfen
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pa]=
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegar na web
Comment[pt_BR]=Navegar na web
Comment[ro]=Navigare Internet
Comment[ru]=Веб-браузер
Comment[sk]=Prehliadať internet
Comment[sl]=Brskaj po spletu
Comment[sq]=Eksploro web-in
Comment[sr]=Прегледај веб
Comment[sr@Latn]=Pregledaj veb
Comment[sv]=Surfa på nätet
Comment[ta]=ி
Comment[th]= Firefox
Comment[tk]=Webi Ahtar
Comment[tr]=Web'e Gözat
Comment[uk]=Програма перегляду web-сторінок
Comment[vi]=Duyt web
Comment[wa]=Naivyî avå les waibes
Comment[zh_CN]= Web
Comment[zh_TW]=
Exec=firefox %U
Icon=@FIREFOX_ICON@
StartupNotify=false
Terminal=false
Type=Application
Categories=Application;Network;
Encoding=UTF-8
MimeType=text/html;text/xml;application/xhtml+xml;

View File

@ -1,56 +1,499 @@
--- browser/app/mozilla.in.orig Tue Oct 26 05:26:11 2004
+++ browser/app/mozilla.in Mon Dec 27 19:15:52 2004
@@ -110,6 +110,7 @@
# 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 "Cannot find mozilla runtime directory. Exiting."
exit 1
@@ -160,11 +161,11 @@
_optLast="${i}"
done #last arg
-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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
+ [ `expr -- "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
fi
################################################################ Parse Arguments
@@ -207,12 +208,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
--- browser/app/mozilla.in.orig Tue Oct 26 11:26:11 2004
+++ browser/app/mozilla.in Wed Feb 23 11:09:49 2005
@@ -28,52 +28,110 @@
## The script will setup all the environment voodoo needed to make
## the mozilla-bin binary to work.
##
-
+#!/bin/sh
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL. You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+#
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+#
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All Rights
+# Reserved.
+#
+
+if [ ! -n "${_done_locale}" -a -n "${MOZILLA_UILOCALE}" ]; then
+ if [ -n "${MOZILLA_UIREGION}" ]; then
+ moreargs="-UIRegion ${MOZILLA_UIREGION} $moreargs"
+ fi
+ moreargs="-UILocale ${MOZILLA_UILOCALE} $moreargs"
+fi
+unset _done_locale
+# $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
}
export MRE_HOME
eval "set -- $moreargs"
-#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,149 +140,224 @@
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`
- run_moz="$dist_bin/run-mozilla.sh"
- 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
+ # 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
-script_args=""
-moreargs=""
-debugging=0
MOZILLA_BIN="${progbase}-bin"
+if [ "$OSTYPE" = "beos" ]; then
+ mimeset -F "$MOZILLA_BIN"
+fi
-# 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 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)"
+
+# 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
-_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
-
-_optLast=
-for i in "$@"; do
- _optLast="${i}"
-done #last arg
-
-if [ `expr "${_optLast}" : '.*:/.*'` -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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
-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
- _remote_cmd="openURL(${_optLast})"
- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "${_remote_cmd}"
- unset _remote_cmd
- 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(openBrowser)"
- 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
-# 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
+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
-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=$?
## Stop addon scripts

View File

@ -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);

View File

@ -6,13 +6,12 @@
#
PORTNAME= firefox
PORTVERSION= 1.0
PORTREVISION= 7
PORTVERSION= 1.0.1
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0/source
DISTNAME= ${PORTNAME}-1.0-source
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0.1/source
DISTNAME= ${PORTNAME}-1.0.1-source
MAINTAINER= gnome@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
@ -32,7 +31,7 @@ PLIST= ${WRKDIR}/plist
PLUGINSDIR= ${PREFIX}/lib/browser_plugins
USE_BZIP2= yes
USE_GMAKE= yes
USE_GNOME= gtk20 libidl gnomehier
USE_GNOME= gtk20 libidl gnomehier desktopfileutils
USE_ICONV= yes
USE_PERL5_BUILD=yes
USE_X_PREFIX= yes
@ -62,11 +61,14 @@ 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
SYSTEM_PREFS= ${FAKEDIR}/lib/${FIREFOX}-${FF_VER}/defaults/pref/firefox.js
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 \
SMB "Enable smb:// URI support using gnomevfs" off
SMB "Enable smb:// URI support using gnomevfs" off \
NEWTAB "Open external links in a new tab" on
.include <bsd.port.pre.mk>
@ -76,9 +78,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)
@ -137,6 +139,12 @@ post-patch:
< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
@${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${FIREFOX}|g' \
< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
.for ii in ${EXTRA_SCRIPTS}
@${SED} -e 's|%%MOZILLA%%|${FIREFOX}|g ; \
s|%%PREFIX%%|${PREFIX}|g ; \
s|%%X11BASE%%|${X11BASE}|g' \
< ${FILESDIR}/${ii} > ${WRKDIR}/${ii}
.endfor
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/build/unix/run-mozilla.sh
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
@ -180,6 +188,12 @@ pre-install:
done
${ECHO_CMD} bin/firefox >> ${PLIST}
${ECHO_CMD} bin/firefox-config >> ${PLIST}
.if !defined(WITHOUT_NEWTAB)
${ECHO_CMD} >> ${SYSTEM_PREFS}
${ECHO_CMD} "// Open external links in new tab" >> ${SYSTEM_PREFS}
${ECHO_CMD} "pref(\"browser.link.open_external\", 3);" \
>> ${SYSTEM_PREFS}
.endif # !defined(WITHOUT_NEWTAB)
cd ${FAKEDIR}/lib/${FIREFOX}-${FF_VER} && ${FIND} -s * -type f -o -type l | \
${SED} -e 's|^|lib/${FIREFOX}/|' >> ${PLIST} \
&& ${FIND} -d * -type d | \
@ -198,6 +212,8 @@ pre-install:
${ECHO_CMD} @dirrm include/${FIREFOX} >> ${PLIST}
${ECHO_CMD} lib/browser_plugins/.${PORTNAME}.keep >> ${PLIST}
${ECHO_CMD} "@unexec ${RMDIR} %D/lib/browser_plugins 2>/dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@exec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@unexec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
do-install:
${MKDIR} ${PREFIX}/lib/${FIREFOX}
@ -240,5 +256,6 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/firefox.desktop ${PREFIX}/share/gnome/applications
${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/firefox/default.xpm \
${PREFIX}/lib/${FIREFOX}/chrome/icons/default/default.xpm
@-update-desktop-database
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (firefox-1.0-source.tar.bz2) = 49c16a71f4de014ea471be81e46b1da8
SIZE (firefox-1.0-source.tar.bz2) = 32686249
MD5 (firefox-1.0.1-source.tar.bz2) = ebaea974fea9460ab7050fff76b41cb1
SIZE (firefox-1.0.1-source.tar.bz2) = 32671529

View File

@ -1,9 +1,191 @@
[Desktop Entry]
Name=Firefox
Comment=Firefox Web Browser
Encoding=UTF-8
Name=Firefox Web Browser
Name[am]=
Name[ar]=
Name[az]=Firefox Veb Səyyahı
Name[be]=
Name[bg]=Интернет браузър Firefox
Name[bn]=
Name[bs]=Firefox web preglednik
Name[ca]=Navegador web Firefox
Name[cs]=Prohlížeč WWW Firefox
Name[cy]=Y Porwr Gwe Firefox
Name[da]=Firefox - internetsurfning
Name[de]=Firefox Webbrowser
Name[el]=Περιηγητής Διαδικτύου Firefox
Name[en_CA]=Firefox Web Browser
Name[en_GB]=Firefox Web Browser
Name[es]=Navegador Web Firefox
Name[et]=Firefox veebibrauser
Name[eu]=Firefox web arakatzailea
Name[fi]=Firefox, WWW-selain
Name[fr]=Navigateur Web Firefox
Name[ga]=Brabhsálaí Lín Firefox
Name[gu]=
Name[he]=דפדפן Firefox
Name[hi]=
Name[hr]=Firefox Web preglednik
Name[hu]=Firefox webböngésző
Name[id]=Web Browser Firefox
Name[it]=Browser web Firefox
Name[ja]=Firefox
Name[ko]=Firefox
Name[li]=Firefox Web Browser
Name[lt]=Firefox web naršyklė
Name[mk]=Firefox веб прелистувач
Name[ml]=ിി
Name[mn]=Firefox веб хөтөч
Name[ms]=Pelungsur Web Firefox
Name[nb]=Firefox nettleser
Name[nl]=Firefox Webbrowser
Name[nn]=Firefox nettlesar
Name[no]=Firefox nettleser
Name[pa]=
Name[pl]=Przeglądarka WWW Firefox
Name[pt]=Navegador Web Firefox
Name[pt_BR]=Navegador Web Firefox
Name[ro]=Navigatorul Firefox
Name[ru]=Веб-браузер Firefox
Name[sk]=
Name[sl]=Spletni brskalnik Firefox
Name[sq]=Firefox - Shfletuesi Web
Name[sr]=
Name[sr@Latn]=Veb čitač Spoznaja
Name[sv]=Webbläsaren Firefox
Name[ta]=ிி ி
Name[tk]=Firefox Web Ahtarçisi
Name[tr]=Firefox Web Tarayıcı
Name[uk]=Переглядач web Firefox
Name[vi]=Trình Duyt Web Firefox
Name[wa]=Betchteu waibe epiphany
Name[zh_CN]=Firefox Web
Name[zh_TW]=Firefox
GenericName=Web Browser
GenericName[ar]=متصفّح الانترنت
GenericName[az]=Veb Səyyahı
GenericName[be]=Вандроўнік па павуціньню
GenericName[bg]=Браузър
GenericName[bn]=
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[cs]=Prohlížeč WWW
GenericName[cy]=Porwr Gwe
GenericName[da]=Internetsurfning
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής Ιστοσελίδων
GenericName[en_CA]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web Firefox
GenericName[ga]=Brabhsálaí Lín
GenericName[gu]=
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[id]=Browser Web
GenericName[it]=Browser web
GenericName[ja]=GNOME
GenericName[ko]=
GenericName[li]=Wèb Browser
GenericName[lt]=Web naršyklė
GenericName[mk]=Веб прелистувач
GenericName[mn]=Веб хөтөч
GenericName[ms]=Pelungsur Web
GenericName[nb]=Nettleser
GenericName[nl]=Web-browser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pa]=
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sq]=Shfletuesi Web
GenericName[sr]=Веб читач
GenericName[sr@Latn]=Veb čitač
GenericName[sv]=Webbläsare
GenericName[ta]= ி
GenericName[th]=
GenericName[tk]=Web Ahtarçysy
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Переглядач web-сторінок
GenericName[vi]=Trình duyt Web
GenericName[wa]=Betchteu waibe
GenericName[zh_CN]=Web
GenericName[zh_TW]=
Comment=Browse the web
Comment[ar]=تصفح الانترنت
Comment[az]=Vebi gəzin
Comment[be]=Вандраваць па павуціньню
Comment[bg]=Сърфиране в интернет
Comment[bn]=
Comment[bs]=Pregledaj na internetu
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížet WWW
Comment[cy]=Pori'r we
Comment[da]=Surf på internettet
Comment[de]=Im Web surfen
Comment[el]=Περιήγηση στον παγκόσμιο ιστό
Comment[en_CA]=Browse the web
Comment[en_GB]=Browse the web
Comment[es]=Navegar por la web
Comment[et]=Sirvi veebi
Comment[eu]=Arakatu web-a
Comment[fi]=Selaa WWW:tä
Comment[fr]=Naviguer sur Internet
Comment[ga]=Brabhsáil an Líon
Comment[gu]=
Comment[he]=גלוש ברשת
Comment[hi]=
Comment[hr]=Pregledaj Web
Comment[hu]=A világháló böngészése
Comment[id]=Jelajah web
Comment[it]=Esplora il web
Comment[ja]=
Comment[ko]=
Comment[li]=Blajere op internet
Comment[lt]=Naršyti internete
Comment[mk]=Прелистувајте на веб
Comment[ml]= ി
Comment[mn]=Веб броузе хийх
Comment[ms]=Layari web
Comment[nb]=Surf på nettet
Comment[nl]=Websurfen
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pa]=
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegar na web
Comment[pt_BR]=Navegar na web
Comment[ro]=Navigare Internet
Comment[ru]=Веб-браузер
Comment[sk]=Prehliadať internet
Comment[sl]=Brskaj po spletu
Comment[sq]=Eksploro web-in
Comment[sr]=Прегледај веб
Comment[sr@Latn]=Pregledaj veb
Comment[sv]=Surfa på nätet
Comment[ta]=ி
Comment[th]= Firefox
Comment[tk]=Webi Ahtar
Comment[tr]=Web'e Gözat
Comment[uk]=Програма перегляду web-сторінок
Comment[vi]=Duyt web
Comment[wa]=Naivyî avå les waibes
Comment[zh_CN]= Web
Comment[zh_TW]=
Exec=firefox %U
Icon=@FIREFOX_ICON@
StartupNotify=false
Terminal=false
Type=Application
Categories=Application;Network;
Encoding=UTF-8
MimeType=text/html;text/xml;application/xhtml+xml;

View File

@ -1,56 +1,499 @@
--- browser/app/mozilla.in.orig Tue Oct 26 05:26:11 2004
+++ browser/app/mozilla.in Mon Dec 27 19:15:52 2004
@@ -110,6 +110,7 @@
# 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 "Cannot find mozilla runtime directory. Exiting."
exit 1
@@ -160,11 +161,11 @@
_optLast="${i}"
done #last arg
-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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
+ [ `expr -- "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
fi
################################################################ Parse Arguments
@@ -207,12 +208,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
--- browser/app/mozilla.in.orig Tue Oct 26 11:26:11 2004
+++ browser/app/mozilla.in Wed Feb 23 11:09:49 2005
@@ -28,52 +28,110 @@
## The script will setup all the environment voodoo needed to make
## the mozilla-bin binary to work.
##
-
+#!/bin/sh
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL. You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+#
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+#
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All Rights
+# Reserved.
+#
+
+if [ ! -n "${_done_locale}" -a -n "${MOZILLA_UILOCALE}" ]; then
+ if [ -n "${MOZILLA_UIREGION}" ]; then
+ moreargs="-UIRegion ${MOZILLA_UIREGION} $moreargs"
+ fi
+ moreargs="-UILocale ${MOZILLA_UILOCALE} $moreargs"
+fi
+unset _done_locale
+# $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
}
export MRE_HOME
eval "set -- $moreargs"
-#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,149 +140,224 @@
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`
- run_moz="$dist_bin/run-mozilla.sh"
- 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
+ # 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
-script_args=""
-moreargs=""
-debugging=0
MOZILLA_BIN="${progbase}-bin"
+if [ "$OSTYPE" = "beos" ]; then
+ mimeset -F "$MOZILLA_BIN"
+fi
-# 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 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)"
+
+# 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
-_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
-
-_optLast=
-for i in "$@"; do
- _optLast="${i}"
-done #last arg
-
-if [ `expr "${_optLast}" : '.*:/.*'` -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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
-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
- _remote_cmd="openURL(${_optLast})"
- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "${_remote_cmd}"
- unset _remote_cmd
- 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(openBrowser)"
- 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
-# 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
+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
-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=$?
## Stop addon scripts

View File

@ -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);

View File

@ -6,13 +6,12 @@
#
PORTNAME= firefox
PORTVERSION= 1.0
PORTREVISION= 7
PORTVERSION= 1.0.1
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0/source
DISTNAME= ${PORTNAME}-1.0-source
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0.1/source
DISTNAME= ${PORTNAME}-1.0.1-source
MAINTAINER= gnome@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
@ -32,7 +31,7 @@ PLIST= ${WRKDIR}/plist
PLUGINSDIR= ${PREFIX}/lib/browser_plugins
USE_BZIP2= yes
USE_GMAKE= yes
USE_GNOME= gtk20 libidl gnomehier
USE_GNOME= gtk20 libidl gnomehier desktopfileutils
USE_ICONV= yes
USE_PERL5_BUILD=yes
USE_X_PREFIX= yes
@ -62,11 +61,14 @@ 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
SYSTEM_PREFS= ${FAKEDIR}/lib/${FIREFOX}-${FF_VER}/defaults/pref/firefox.js
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 \
SMB "Enable smb:// URI support using gnomevfs" off
SMB "Enable smb:// URI support using gnomevfs" off \
NEWTAB "Open external links in a new tab" on
.include <bsd.port.pre.mk>
@ -76,9 +78,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)
@ -137,6 +139,12 @@ post-patch:
< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
@${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${FIREFOX}|g' \
< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
.for ii in ${EXTRA_SCRIPTS}
@${SED} -e 's|%%MOZILLA%%|${FIREFOX}|g ; \
s|%%PREFIX%%|${PREFIX}|g ; \
s|%%X11BASE%%|${X11BASE}|g' \
< ${FILESDIR}/${ii} > ${WRKDIR}/${ii}
.endfor
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/build/unix/run-mozilla.sh
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
@ -180,6 +188,12 @@ pre-install:
done
${ECHO_CMD} bin/firefox >> ${PLIST}
${ECHO_CMD} bin/firefox-config >> ${PLIST}
.if !defined(WITHOUT_NEWTAB)
${ECHO_CMD} >> ${SYSTEM_PREFS}
${ECHO_CMD} "// Open external links in new tab" >> ${SYSTEM_PREFS}
${ECHO_CMD} "pref(\"browser.link.open_external\", 3);" \
>> ${SYSTEM_PREFS}
.endif # !defined(WITHOUT_NEWTAB)
cd ${FAKEDIR}/lib/${FIREFOX}-${FF_VER} && ${FIND} -s * -type f -o -type l | \
${SED} -e 's|^|lib/${FIREFOX}/|' >> ${PLIST} \
&& ${FIND} -d * -type d | \
@ -198,6 +212,8 @@ pre-install:
${ECHO_CMD} @dirrm include/${FIREFOX} >> ${PLIST}
${ECHO_CMD} lib/browser_plugins/.${PORTNAME}.keep >> ${PLIST}
${ECHO_CMD} "@unexec ${RMDIR} %D/lib/browser_plugins 2>/dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@exec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@unexec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
do-install:
${MKDIR} ${PREFIX}/lib/${FIREFOX}
@ -240,5 +256,6 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/firefox.desktop ${PREFIX}/share/gnome/applications
${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/firefox/default.xpm \
${PREFIX}/lib/${FIREFOX}/chrome/icons/default/default.xpm
@-update-desktop-database
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (firefox-1.0-source.tar.bz2) = 49c16a71f4de014ea471be81e46b1da8
SIZE (firefox-1.0-source.tar.bz2) = 32686249
MD5 (firefox-1.0.1-source.tar.bz2) = ebaea974fea9460ab7050fff76b41cb1
SIZE (firefox-1.0.1-source.tar.bz2) = 32671529

View File

@ -1,9 +1,191 @@
[Desktop Entry]
Name=Firefox
Comment=Firefox Web Browser
Encoding=UTF-8
Name=Firefox Web Browser
Name[am]=
Name[ar]=
Name[az]=Firefox Veb Səyyahı
Name[be]=
Name[bg]=Интернет браузър Firefox
Name[bn]=
Name[bs]=Firefox web preglednik
Name[ca]=Navegador web Firefox
Name[cs]=Prohlížeč WWW Firefox
Name[cy]=Y Porwr Gwe Firefox
Name[da]=Firefox - internetsurfning
Name[de]=Firefox Webbrowser
Name[el]=Περιηγητής Διαδικτύου Firefox
Name[en_CA]=Firefox Web Browser
Name[en_GB]=Firefox Web Browser
Name[es]=Navegador Web Firefox
Name[et]=Firefox veebibrauser
Name[eu]=Firefox web arakatzailea
Name[fi]=Firefox, WWW-selain
Name[fr]=Navigateur Web Firefox
Name[ga]=Brabhsálaí Lín Firefox
Name[gu]=
Name[he]=דפדפן Firefox
Name[hi]=
Name[hr]=Firefox Web preglednik
Name[hu]=Firefox webböngésző
Name[id]=Web Browser Firefox
Name[it]=Browser web Firefox
Name[ja]=Firefox
Name[ko]=Firefox
Name[li]=Firefox Web Browser
Name[lt]=Firefox web naršyklė
Name[mk]=Firefox веб прелистувач
Name[ml]=ിി
Name[mn]=Firefox веб хөтөч
Name[ms]=Pelungsur Web Firefox
Name[nb]=Firefox nettleser
Name[nl]=Firefox Webbrowser
Name[nn]=Firefox nettlesar
Name[no]=Firefox nettleser
Name[pa]=
Name[pl]=Przeglądarka WWW Firefox
Name[pt]=Navegador Web Firefox
Name[pt_BR]=Navegador Web Firefox
Name[ro]=Navigatorul Firefox
Name[ru]=Веб-браузер Firefox
Name[sk]=
Name[sl]=Spletni brskalnik Firefox
Name[sq]=Firefox - Shfletuesi Web
Name[sr]=
Name[sr@Latn]=Veb čitač Spoznaja
Name[sv]=Webbläsaren Firefox
Name[ta]=ிி ி
Name[tk]=Firefox Web Ahtarçisi
Name[tr]=Firefox Web Tarayıcı
Name[uk]=Переглядач web Firefox
Name[vi]=Trình Duyt Web Firefox
Name[wa]=Betchteu waibe epiphany
Name[zh_CN]=Firefox Web
Name[zh_TW]=Firefox
GenericName=Web Browser
GenericName[ar]=متصفّح الانترنت
GenericName[az]=Veb Səyyahı
GenericName[be]=Вандроўнік па павуціньню
GenericName[bg]=Браузър
GenericName[bn]=
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[cs]=Prohlížeč WWW
GenericName[cy]=Porwr Gwe
GenericName[da]=Internetsurfning
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής Ιστοσελίδων
GenericName[en_CA]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web Firefox
GenericName[ga]=Brabhsálaí Lín
GenericName[gu]=
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[id]=Browser Web
GenericName[it]=Browser web
GenericName[ja]=GNOME
GenericName[ko]=
GenericName[li]=Wèb Browser
GenericName[lt]=Web naršyklė
GenericName[mk]=Веб прелистувач
GenericName[mn]=Веб хөтөч
GenericName[ms]=Pelungsur Web
GenericName[nb]=Nettleser
GenericName[nl]=Web-browser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pa]=
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sq]=Shfletuesi Web
GenericName[sr]=Веб читач
GenericName[sr@Latn]=Veb čitač
GenericName[sv]=Webbläsare
GenericName[ta]= ி
GenericName[th]=
GenericName[tk]=Web Ahtarçysy
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Переглядач web-сторінок
GenericName[vi]=Trình duyt Web
GenericName[wa]=Betchteu waibe
GenericName[zh_CN]=Web
GenericName[zh_TW]=
Comment=Browse the web
Comment[ar]=تصفح الانترنت
Comment[az]=Vebi gəzin
Comment[be]=Вандраваць па павуціньню
Comment[bg]=Сърфиране в интернет
Comment[bn]=
Comment[bs]=Pregledaj na internetu
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížet WWW
Comment[cy]=Pori'r we
Comment[da]=Surf på internettet
Comment[de]=Im Web surfen
Comment[el]=Περιήγηση στον παγκόσμιο ιστό
Comment[en_CA]=Browse the web
Comment[en_GB]=Browse the web
Comment[es]=Navegar por la web
Comment[et]=Sirvi veebi
Comment[eu]=Arakatu web-a
Comment[fi]=Selaa WWW:tä
Comment[fr]=Naviguer sur Internet
Comment[ga]=Brabhsáil an Líon
Comment[gu]=
Comment[he]=גלוש ברשת
Comment[hi]=
Comment[hr]=Pregledaj Web
Comment[hu]=A világháló böngészése
Comment[id]=Jelajah web
Comment[it]=Esplora il web
Comment[ja]=
Comment[ko]=
Comment[li]=Blajere op internet
Comment[lt]=Naršyti internete
Comment[mk]=Прелистувајте на веб
Comment[ml]= ി
Comment[mn]=Веб броузе хийх
Comment[ms]=Layari web
Comment[nb]=Surf på nettet
Comment[nl]=Websurfen
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pa]=
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegar na web
Comment[pt_BR]=Navegar na web
Comment[ro]=Navigare Internet
Comment[ru]=Веб-браузер
Comment[sk]=Prehliadať internet
Comment[sl]=Brskaj po spletu
Comment[sq]=Eksploro web-in
Comment[sr]=Прегледај веб
Comment[sr@Latn]=Pregledaj veb
Comment[sv]=Surfa på nätet
Comment[ta]=ி
Comment[th]= Firefox
Comment[tk]=Webi Ahtar
Comment[tr]=Web'e Gözat
Comment[uk]=Програма перегляду web-сторінок
Comment[vi]=Duyt web
Comment[wa]=Naivyî avå les waibes
Comment[zh_CN]= Web
Comment[zh_TW]=
Exec=firefox %U
Icon=@FIREFOX_ICON@
StartupNotify=false
Terminal=false
Type=Application
Categories=Application;Network;
Encoding=UTF-8
MimeType=text/html;text/xml;application/xhtml+xml;

View File

@ -1,56 +1,499 @@
--- browser/app/mozilla.in.orig Tue Oct 26 05:26:11 2004
+++ browser/app/mozilla.in Mon Dec 27 19:15:52 2004
@@ -110,6 +110,7 @@
# 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 "Cannot find mozilla runtime directory. Exiting."
exit 1
@@ -160,11 +161,11 @@
_optLast="${i}"
done #last arg
-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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
+ [ `expr -- "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
fi
################################################################ Parse Arguments
@@ -207,12 +208,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
--- browser/app/mozilla.in.orig Tue Oct 26 11:26:11 2004
+++ browser/app/mozilla.in Wed Feb 23 11:09:49 2005
@@ -28,52 +28,110 @@
## The script will setup all the environment voodoo needed to make
## the mozilla-bin binary to work.
##
-
+#!/bin/sh
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL. You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+#
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+#
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All Rights
+# Reserved.
+#
+
+if [ ! -n "${_done_locale}" -a -n "${MOZILLA_UILOCALE}" ]; then
+ if [ -n "${MOZILLA_UIREGION}" ]; then
+ moreargs="-UIRegion ${MOZILLA_UIREGION} $moreargs"
+ fi
+ moreargs="-UILocale ${MOZILLA_UILOCALE} $moreargs"
+fi
+unset _done_locale
+# $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
}
export MRE_HOME
eval "set -- $moreargs"
-#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,149 +140,224 @@
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`
- run_moz="$dist_bin/run-mozilla.sh"
- 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
+ # 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
-script_args=""
-moreargs=""
-debugging=0
MOZILLA_BIN="${progbase}-bin"
+if [ "$OSTYPE" = "beos" ]; then
+ mimeset -F "$MOZILLA_BIN"
+fi
-# 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 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)"
+
+# 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
-_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
-
-_optLast=
-for i in "$@"; do
- _optLast="${i}"
-done #last arg
-
-if [ `expr "${_optLast}" : '.*:/.*'` -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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
-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
- _remote_cmd="openURL(${_optLast})"
- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "${_remote_cmd}"
- unset _remote_cmd
- 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(openBrowser)"
- 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
-# 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
+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
-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=$?
## Stop addon scripts

View File

@ -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);

View File

@ -6,13 +6,12 @@
#
PORTNAME= firefox
PORTVERSION= 1.0
PORTREVISION= 7
PORTVERSION= 1.0.1
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0/source
DISTNAME= ${PORTNAME}-1.0-source
MASTER_SITE_SUBDIR= ${PORTNAME}/releases/1.0.1/source
DISTNAME= ${PORTNAME}-1.0.1-source
MAINTAINER= gnome@FreeBSD.org
COMMENT= Web browser based on the browser portion of Mozilla
@ -32,7 +31,7 @@ PLIST= ${WRKDIR}/plist
PLUGINSDIR= ${PREFIX}/lib/browser_plugins
USE_BZIP2= yes
USE_GMAKE= yes
USE_GNOME= gtk20 libidl gnomehier
USE_GNOME= gtk20 libidl gnomehier desktopfileutils
USE_ICONV= yes
USE_PERL5_BUILD=yes
USE_X_PREFIX= yes
@ -62,11 +61,14 @@ 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
SYSTEM_PREFS= ${FAKEDIR}/lib/${FIREFOX}-${FF_VER}/defaults/pref/firefox.js
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 \
SMB "Enable smb:// URI support using gnomevfs" off
SMB "Enable smb:// URI support using gnomevfs" off \
NEWTAB "Open external links in a new tab" on
.include <bsd.port.pre.mk>
@ -76,9 +78,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)
@ -137,6 +139,12 @@ post-patch:
< ${MASTERDIR}/pkg-install.in > ${PKGINSTALL}
@${SED} -e 's|%%MOZDIR%%|${PREFIX}/lib/${FIREFOX}|g' \
< ${MASTERDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
.for ii in ${EXTRA_SCRIPTS}
@${SED} -e 's|%%MOZILLA%%|${FIREFOX}|g ; \
s|%%PREFIX%%|${PREFIX}|g ; \
s|%%X11BASE%%|${X11BASE}|g' \
< ${FILESDIR}/${ii} > ${WRKDIR}/${ii}
.endfor
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/build/unix/run-mozilla.sh
@${REINPLACE_CMD} -e 's|-lc_r|${PTHREAD_LIBS}|g ; \
@ -180,6 +188,12 @@ pre-install:
done
${ECHO_CMD} bin/firefox >> ${PLIST}
${ECHO_CMD} bin/firefox-config >> ${PLIST}
.if !defined(WITHOUT_NEWTAB)
${ECHO_CMD} >> ${SYSTEM_PREFS}
${ECHO_CMD} "// Open external links in new tab" >> ${SYSTEM_PREFS}
${ECHO_CMD} "pref(\"browser.link.open_external\", 3);" \
>> ${SYSTEM_PREFS}
.endif # !defined(WITHOUT_NEWTAB)
cd ${FAKEDIR}/lib/${FIREFOX}-${FF_VER} && ${FIND} -s * -type f -o -type l | \
${SED} -e 's|^|lib/${FIREFOX}/|' >> ${PLIST} \
&& ${FIND} -d * -type d | \
@ -198,6 +212,8 @@ pre-install:
${ECHO_CMD} @dirrm include/${FIREFOX} >> ${PLIST}
${ECHO_CMD} lib/browser_plugins/.${PORTNAME}.keep >> ${PLIST}
${ECHO_CMD} "@unexec ${RMDIR} %D/lib/browser_plugins 2>/dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@exec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
${ECHO_CMD} "@unexec update-desktop-database > /dev/null || ${TRUE}" >> ${PLIST}
do-install:
${MKDIR} ${PREFIX}/lib/${FIREFOX}
@ -240,5 +256,6 @@ post-install:
${INSTALL_DATA} ${WRKDIR}/firefox.desktop ${PREFIX}/share/gnome/applications
${INSTALL_DATA} ${WRKSRC}/other-licenses/branding/firefox/default.xpm \
${PREFIX}/lib/${FIREFOX}/chrome/icons/default/default.xpm
@-update-desktop-database
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (firefox-1.0-source.tar.bz2) = 49c16a71f4de014ea471be81e46b1da8
SIZE (firefox-1.0-source.tar.bz2) = 32686249
MD5 (firefox-1.0.1-source.tar.bz2) = ebaea974fea9460ab7050fff76b41cb1
SIZE (firefox-1.0.1-source.tar.bz2) = 32671529

View File

@ -1,9 +1,191 @@
[Desktop Entry]
Name=Firefox
Comment=Firefox Web Browser
Encoding=UTF-8
Name=Firefox Web Browser
Name[am]=
Name[ar]=
Name[az]=Firefox Veb Səyyahı
Name[be]=
Name[bg]=Интернет браузър Firefox
Name[bn]=
Name[bs]=Firefox web preglednik
Name[ca]=Navegador web Firefox
Name[cs]=Prohlížeč WWW Firefox
Name[cy]=Y Porwr Gwe Firefox
Name[da]=Firefox - internetsurfning
Name[de]=Firefox Webbrowser
Name[el]=Περιηγητής Διαδικτύου Firefox
Name[en_CA]=Firefox Web Browser
Name[en_GB]=Firefox Web Browser
Name[es]=Navegador Web Firefox
Name[et]=Firefox veebibrauser
Name[eu]=Firefox web arakatzailea
Name[fi]=Firefox, WWW-selain
Name[fr]=Navigateur Web Firefox
Name[ga]=Brabhsálaí Lín Firefox
Name[gu]=
Name[he]=דפדפן Firefox
Name[hi]=
Name[hr]=Firefox Web preglednik
Name[hu]=Firefox webböngésző
Name[id]=Web Browser Firefox
Name[it]=Browser web Firefox
Name[ja]=Firefox
Name[ko]=Firefox
Name[li]=Firefox Web Browser
Name[lt]=Firefox web naršyklė
Name[mk]=Firefox веб прелистувач
Name[ml]=ിി
Name[mn]=Firefox веб хөтөч
Name[ms]=Pelungsur Web Firefox
Name[nb]=Firefox nettleser
Name[nl]=Firefox Webbrowser
Name[nn]=Firefox nettlesar
Name[no]=Firefox nettleser
Name[pa]=
Name[pl]=Przeglądarka WWW Firefox
Name[pt]=Navegador Web Firefox
Name[pt_BR]=Navegador Web Firefox
Name[ro]=Navigatorul Firefox
Name[ru]=Веб-браузер Firefox
Name[sk]=
Name[sl]=Spletni brskalnik Firefox
Name[sq]=Firefox - Shfletuesi Web
Name[sr]=
Name[sr@Latn]=Veb čitač Spoznaja
Name[sv]=Webbläsaren Firefox
Name[ta]=ிி ி
Name[tk]=Firefox Web Ahtarçisi
Name[tr]=Firefox Web Tarayıcı
Name[uk]=Переглядач web Firefox
Name[vi]=Trình Duyt Web Firefox
Name[wa]=Betchteu waibe epiphany
Name[zh_CN]=Firefox Web
Name[zh_TW]=Firefox
GenericName=Web Browser
GenericName[ar]=متصفّح الانترنت
GenericName[az]=Veb Səyyahı
GenericName[be]=Вандроўнік па павуціньню
GenericName[bg]=Браузър
GenericName[bn]=
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[cs]=Prohlížeč WWW
GenericName[cy]=Porwr Gwe
GenericName[da]=Internetsurfning
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής Ιστοσελίδων
GenericName[en_CA]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web Firefox
GenericName[ga]=Brabhsálaí Lín
GenericName[gu]=
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[id]=Browser Web
GenericName[it]=Browser web
GenericName[ja]=GNOME
GenericName[ko]=
GenericName[li]=Wèb Browser
GenericName[lt]=Web naršyklė
GenericName[mk]=Веб прелистувач
GenericName[mn]=Веб хөтөч
GenericName[ms]=Pelungsur Web
GenericName[nb]=Nettleser
GenericName[nl]=Web-browser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pa]=
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sq]=Shfletuesi Web
GenericName[sr]=Веб читач
GenericName[sr@Latn]=Veb čitač
GenericName[sv]=Webbläsare
GenericName[ta]= ி
GenericName[th]=
GenericName[tk]=Web Ahtarçysy
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Переглядач web-сторінок
GenericName[vi]=Trình duyt Web
GenericName[wa]=Betchteu waibe
GenericName[zh_CN]=Web
GenericName[zh_TW]=
Comment=Browse the web
Comment[ar]=تصفح الانترنت
Comment[az]=Vebi gəzin
Comment[be]=Вандраваць па павуціньню
Comment[bg]=Сърфиране в интернет
Comment[bn]=
Comment[bs]=Pregledaj na internetu
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížet WWW
Comment[cy]=Pori'r we
Comment[da]=Surf på internettet
Comment[de]=Im Web surfen
Comment[el]=Περιήγηση στον παγκόσμιο ιστό
Comment[en_CA]=Browse the web
Comment[en_GB]=Browse the web
Comment[es]=Navegar por la web
Comment[et]=Sirvi veebi
Comment[eu]=Arakatu web-a
Comment[fi]=Selaa WWW:tä
Comment[fr]=Naviguer sur Internet
Comment[ga]=Brabhsáil an Líon
Comment[gu]=
Comment[he]=גלוש ברשת
Comment[hi]=
Comment[hr]=Pregledaj Web
Comment[hu]=A világháló böngészése
Comment[id]=Jelajah web
Comment[it]=Esplora il web
Comment[ja]=
Comment[ko]=
Comment[li]=Blajere op internet
Comment[lt]=Naršyti internete
Comment[mk]=Прелистувајте на веб
Comment[ml]= ി
Comment[mn]=Веб броузе хийх
Comment[ms]=Layari web
Comment[nb]=Surf på nettet
Comment[nl]=Websurfen
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pa]=
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegar na web
Comment[pt_BR]=Navegar na web
Comment[ro]=Navigare Internet
Comment[ru]=Веб-браузер
Comment[sk]=Prehliadať internet
Comment[sl]=Brskaj po spletu
Comment[sq]=Eksploro web-in
Comment[sr]=Прегледај веб
Comment[sr@Latn]=Pregledaj veb
Comment[sv]=Surfa på nätet
Comment[ta]=ி
Comment[th]= Firefox
Comment[tk]=Webi Ahtar
Comment[tr]=Web'e Gözat
Comment[uk]=Програма перегляду web-сторінок
Comment[vi]=Duyt web
Comment[wa]=Naivyî avå les waibes
Comment[zh_CN]= Web
Comment[zh_TW]=
Exec=firefox %U
Icon=@FIREFOX_ICON@
StartupNotify=false
Terminal=false
Type=Application
Categories=Application;Network;
Encoding=UTF-8
MimeType=text/html;text/xml;application/xhtml+xml;

View File

@ -1,56 +1,499 @@
--- browser/app/mozilla.in.orig Tue Oct 26 05:26:11 2004
+++ browser/app/mozilla.in Mon Dec 27 19:15:52 2004
@@ -110,6 +110,7 @@
# 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 "Cannot find mozilla runtime directory. Exiting."
exit 1
@@ -160,11 +161,11 @@
_optLast="${i}"
done #last arg
-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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
+ [ `expr -- "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
fi
################################################################ Parse Arguments
@@ -207,12 +208,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
--- browser/app/mozilla.in.orig Tue Oct 26 11:26:11 2004
+++ browser/app/mozilla.in Wed Feb 23 11:09:49 2005
@@ -28,52 +28,110 @@
## The script will setup all the environment voodoo needed to make
## the mozilla-bin binary to work.
##
-
+#!/bin/sh
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.0 (the "NPL"); you may not use this file except in
+# compliance with the NPL. You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+#
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+#
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation. Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation. All Rights
+# Reserved.
+#
+
+if [ ! -n "${_done_locale}" -a -n "${MOZILLA_UILOCALE}" ]; then
+ if [ -n "${MOZILLA_UIREGION}" ]; then
+ moreargs="-UIRegion ${MOZILLA_UIREGION} $moreargs"
+ fi
+ moreargs="-UILocale ${MOZILLA_UILOCALE} $moreargs"
+fi
+unset _done_locale
+# $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
}
export MRE_HOME
eval "set -- $moreargs"
-#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,149 +140,224 @@
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`
- run_moz="$dist_bin/run-mozilla.sh"
- 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
+ # 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
-script_args=""
-moreargs=""
-debugging=0
MOZILLA_BIN="${progbase}-bin"
+if [ "$OSTYPE" = "beos" ]; then
+ mimeset -F "$MOZILLA_BIN"
+fi
-# 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 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)"
+
+# 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
-_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
-
-_optLast=
-for i in "$@"; do
- _optLast="${i}"
-done #last arg
-
-if [ `expr "${_optLast}" : '.*:/.*'` -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
- [ `expr "${_optLast}" : '/.*'` -eq 0 ] && _optLast="file://`pwd`/${_optLast}"
-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
- _remote_cmd="openURL(${_optLast})"
- "${run_moz}" "$MOZ_CLIENT_PROGRAM" -a "${progbase}" "${_remote_cmd}"
- unset _remote_cmd
- 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(openBrowser)"
- 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
-# 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
+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
-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=$?
## Stop addon scripts

View File

@ -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);