* Fix external URI loaders by loading the correct version of the GNOME

libraries.  This means Mozilla's GNOME integration (i.e. GConf) should
  now work [1]
* Fix i18n support when invoking Mozilla, and add atsdsp support [2]
* Port all fixes to mozilla-devel

PR:		75428 [2]
Reported by:	Jose M Rodriguez (freebsd) <josemi@freebsd.jazztel.es> [1]
Submitted by:	Jose M Rodriguez (freebsd) <josemi@freebsd.jazztel.es> [2]
This commit is contained in:
Joe Marcus Clarke 2004-12-24 18:25:45 +00:00
parent b85ff85af3
commit 52a070ec51
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=125080
12 changed files with 340 additions and 31 deletions

View File

@ -7,7 +7,7 @@
PORTNAME?= mozilla
PORTVERSION= 1.8.a5
PORTREVISION= 1
PORTREVISION?= 2
PORTEPOCH?= 2
CATEGORIES?= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}

View File

@ -1,11 +1,59 @@
#!/bin/sh
MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%"
MOZILLA_EXEC="mozilla"
MOZILLA_EXEC="./mozilla"
MOZILLA_REMOTE_EXEC="${MOZILLA_EXEC} -remote"
APPLICATION_ID="mozilla"
LOCATION='new-tab'
#MOZILLA_UILOCALE="en-US"
#MOZILLA_UIREGION="US"
#MOZILLA_DSP="auto"
cd $MOZILLA_DIR || exit 1
# LANG, MOZILLA_UILOCALE, MOZILLA_UIREGION
if [ -n "$LANG" -a ! -n "${MOZILLA_UILOCALE}" ]; then
_locale="${LANG%%.*}"
if [ "${_locale}" != "en_US" -a "${_locale}" != "C" ]; then
_region="${_locale##*_}"
_locale="${_locale%_*}"
[ -r chrome/${_locale}-${_region}.jar ] && \
MOZILLA_EXEC="${MOZILLA_EXEC} -UILocale ${_locale}-${_region}"
fi
elif [ -n "${MOZILLA_UILOCALE}" ]; then
MOZILLA_EXEC="${MOZILLA_EXEC} -UILocale ${MOZILLA_UILOCALE}"
if [ -n "${MOZILLA_UIREGION}" ]; then
MOZILLA_EXEC="${MOZILLA_EXEC} -UIRegion ${MOZILLA_UIREGION}"
fi
fi
# find a /dev/dsp handler
case "${MOZILLA_DSP}" in
# [Ee][Ss][Dd]|esddsp) # Use the esd dsp wrapper
# MOZILLA_DSP="esddsp"
# ;;
[Aa][Rr][Tt][Ss]|artsdsp) # Use the arts dsp wrapper
MOZILLA_DSP="artsdsp"
;;
[Nn][Oo][Nn][Ee]) # Direct dsp output
MOZILLA_DSP=""
;;
*) # Guest one (auto)
if [ -n "${KDE_FULL_SESSION}" ]; then
MOZILLA_DSP="artsdsp"
# elif [ -r ${HOME}/.esd_auth ]; then
# MOZILLA_DSP="esddsp"
else
MOZILLA_DSP=""
fi
;;
esac
if [ -n "${MOZILLA_DSP}" ] && type "${MOZILLA_DSP}" > /dev/null 2>&1; then
MOZILLA_EXEC="${MOZILLA_DSP} ${MOZILLA_EXEC}"
fi
case $1 in
-browser)
REMOTE_COMMAND="xfeDoCommand (openBrowser)"
@ -17,17 +65,21 @@ case $1 in
REMOTE_COMMAND="xfeDoCommand (composeMessage)"
;;
-*)
exec ./$MOZILLA_EXEC "$@"
exec ${MOZILLA_EXEC} "$@"
;;
*)
REMOTE_COMMAND="openURL($@, $LOCATION)"
if [ -n "${LOCATION}" ]; then
REMOTE_COMMAND="openURL($@,$LOCATION)"
else
REMOTE_COMMAND="openURL($@)"
fi
;;
esac
# process found
./$MOZILLA_EXEC -remote "ping()" &&
./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0
${MOZILLA_REMOTE_EXEC} "ping()" >/dev/null 2>&1 &&
${MOZILLA_REMOTE_EXEC} "${REMOTE_COMMAND}" && exit 0
# no existing process
exec ./$MOZILLA_EXEC "$@"
exec ${MOZILLA_EXEC} "$@"

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

@ -7,6 +7,7 @@
PORTNAME?= mozilla
PORTVERSION= 1.7.5
PORTREVISION?= 1
PORTEPOCH?= 2
CATEGORIES?= www
MASTER_SITES= ${MASTER_SITE_MOZILLA} \

View File

@ -1,12 +1,18 @@
#!/bin/sh
MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%"
MOZILLA_EXEC="mozilla"
MOZILLA_EXEC="./mozilla"
MOZILLA_REMOTE_EXEC="${MOZILLA_EXEC} -remote"
APPLICATION_ID="mozilla"
LOCATION='new-tab'
#MOZILLA_UILOCALE="en-US"
#MOZILLA_UIREGION="US"
#MOZILLA_DSP="auto"
cd $MOZILLA_DIR || exit 1
# LANG, MOZILLA_UILOCALE, MOZILLA_REGION
# LANG, MOZILLA_UILOCALE, MOZILLA_UIREGION
if [ -n "$LANG" -a ! -n "${MOZILLA_UILOCALE}" ]; then
_locale="${LANG%%.*}"
if [ "${_locale}" != "en_US" -a "${_locale}" != "C" ]; then
@ -22,6 +28,32 @@ elif [ -n "${MOZILLA_UILOCALE}" ]; then
fi
fi
# find a /dev/dsp handler
case "${MOZILLA_DSP}" in
# [Ee][Ss][Dd]|esddsp) # Use the esd dsp wrapper
# MOZILLA_DSP="esddsp"
# ;;
[Aa][Rr][Tt][Ss]|artsdsp) # Use the arts dsp wrapper
MOZILLA_DSP="artsdsp"
;;
[Nn][Oo][Nn][Ee]) # Direct dsp output
MOZILLA_DSP=""
;;
*) # Guest one (auto)
if [ -n "${KDE_FULL_SESSION}" ]; then
MOZILLA_DSP="artsdsp"
# elif [ -r ${HOME}/.esd_auth ]; then
# MOZILLA_DSP="esddsp"
else
MOZILLA_DSP=""
fi
;;
esac
if [ -n "${MOZILLA_DSP}" ] && type "${MOZILLA_DSP}" > /dev/null 2>&1; then
MOZILLA_EXEC="${MOZILLA_DSP} ${MOZILLA_EXEC}"
fi
case $1 in
-browser)
REMOTE_COMMAND="xfeDoCommand (openBrowser)"
@ -33,17 +65,21 @@ case $1 in
REMOTE_COMMAND="xfeDoCommand (composeMessage)"
;;
-*)
exec ./$MOZILLA_EXEC "$@"
exec ${MOZILLA_EXEC} "$@"
;;
*)
REMOTE_COMMAND="openURL($@,$LOCATION)"
if [ -n "${LOCATION}" ]; then
REMOTE_COMMAND="openURL($@,$LOCATION)"
else
REMOTE_COMMAND="openURL($@)"
fi
;;
esac
# process found
./$MOZILLA_EXEC -remote "ping()" &&
./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0
${MOZILLA_REMOTE_EXEC} "ping()" >/dev/null 2>&1 &&
${MOZILLA_REMOTE_EXEC} "${REMOTE_COMMAND}" && exit 0
# no existing process
exec ./$MOZILLA_EXEC "$@"
exec ${MOZILLA_EXEC} "$@"

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

@ -7,7 +7,7 @@
PORTNAME?= mozilla
PORTVERSION= 1.8.a5
PORTREVISION= 1
PORTREVISION?= 2
PORTEPOCH?= 2
CATEGORIES?= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}

View File

@ -1,11 +1,59 @@
#!/bin/sh
MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%"
MOZILLA_EXEC="mozilla"
MOZILLA_EXEC="./mozilla"
MOZILLA_REMOTE_EXEC="${MOZILLA_EXEC} -remote"
APPLICATION_ID="mozilla"
LOCATION='new-tab'
#MOZILLA_UILOCALE="en-US"
#MOZILLA_UIREGION="US"
#MOZILLA_DSP="auto"
cd $MOZILLA_DIR || exit 1
# LANG, MOZILLA_UILOCALE, MOZILLA_UIREGION
if [ -n "$LANG" -a ! -n "${MOZILLA_UILOCALE}" ]; then
_locale="${LANG%%.*}"
if [ "${_locale}" != "en_US" -a "${_locale}" != "C" ]; then
_region="${_locale##*_}"
_locale="${_locale%_*}"
[ -r chrome/${_locale}-${_region}.jar ] && \
MOZILLA_EXEC="${MOZILLA_EXEC} -UILocale ${_locale}-${_region}"
fi
elif [ -n "${MOZILLA_UILOCALE}" ]; then
MOZILLA_EXEC="${MOZILLA_EXEC} -UILocale ${MOZILLA_UILOCALE}"
if [ -n "${MOZILLA_UIREGION}" ]; then
MOZILLA_EXEC="${MOZILLA_EXEC} -UIRegion ${MOZILLA_UIREGION}"
fi
fi
# find a /dev/dsp handler
case "${MOZILLA_DSP}" in
# [Ee][Ss][Dd]|esddsp) # Use the esd dsp wrapper
# MOZILLA_DSP="esddsp"
# ;;
[Aa][Rr][Tt][Ss]|artsdsp) # Use the arts dsp wrapper
MOZILLA_DSP="artsdsp"
;;
[Nn][Oo][Nn][Ee]) # Direct dsp output
MOZILLA_DSP=""
;;
*) # Guest one (auto)
if [ -n "${KDE_FULL_SESSION}" ]; then
MOZILLA_DSP="artsdsp"
# elif [ -r ${HOME}/.esd_auth ]; then
# MOZILLA_DSP="esddsp"
else
MOZILLA_DSP=""
fi
;;
esac
if [ -n "${MOZILLA_DSP}" ] && type "${MOZILLA_DSP}" > /dev/null 2>&1; then
MOZILLA_EXEC="${MOZILLA_DSP} ${MOZILLA_EXEC}"
fi
case $1 in
-browser)
REMOTE_COMMAND="xfeDoCommand (openBrowser)"
@ -17,17 +65,21 @@ case $1 in
REMOTE_COMMAND="xfeDoCommand (composeMessage)"
;;
-*)
exec ./$MOZILLA_EXEC "$@"
exec ${MOZILLA_EXEC} "$@"
;;
*)
REMOTE_COMMAND="openURL($@, $LOCATION)"
if [ -n "${LOCATION}" ]; then
REMOTE_COMMAND="openURL($@,$LOCATION)"
else
REMOTE_COMMAND="openURL($@)"
fi
;;
esac
# process found
./$MOZILLA_EXEC -remote "ping()" &&
./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0
${MOZILLA_REMOTE_EXEC} "ping()" >/dev/null 2>&1 &&
${MOZILLA_REMOTE_EXEC} "${REMOTE_COMMAND}" && exit 0
# no existing process
exec ./$MOZILLA_EXEC "$@"
exec ${MOZILLA_EXEC} "$@"

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

@ -7,7 +7,7 @@
PORTNAME?= mozilla
PORTVERSION= 1.8.a5
PORTREVISION= 1
PORTREVISION?= 2
PORTEPOCH?= 2
CATEGORIES?= www
MASTER_SITES= ${MASTER_SITE_MOZILLA}

View File

@ -1,11 +1,59 @@
#!/bin/sh
MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%"
MOZILLA_EXEC="mozilla"
MOZILLA_EXEC="./mozilla"
MOZILLA_REMOTE_EXEC="${MOZILLA_EXEC} -remote"
APPLICATION_ID="mozilla"
LOCATION='new-tab'
#MOZILLA_UILOCALE="en-US"
#MOZILLA_UIREGION="US"
#MOZILLA_DSP="auto"
cd $MOZILLA_DIR || exit 1
# LANG, MOZILLA_UILOCALE, MOZILLA_UIREGION
if [ -n "$LANG" -a ! -n "${MOZILLA_UILOCALE}" ]; then
_locale="${LANG%%.*}"
if [ "${_locale}" != "en_US" -a "${_locale}" != "C" ]; then
_region="${_locale##*_}"
_locale="${_locale%_*}"
[ -r chrome/${_locale}-${_region}.jar ] && \
MOZILLA_EXEC="${MOZILLA_EXEC} -UILocale ${_locale}-${_region}"
fi
elif [ -n "${MOZILLA_UILOCALE}" ]; then
MOZILLA_EXEC="${MOZILLA_EXEC} -UILocale ${MOZILLA_UILOCALE}"
if [ -n "${MOZILLA_UIREGION}" ]; then
MOZILLA_EXEC="${MOZILLA_EXEC} -UIRegion ${MOZILLA_UIREGION}"
fi
fi
# find a /dev/dsp handler
case "${MOZILLA_DSP}" in
# [Ee][Ss][Dd]|esddsp) # Use the esd dsp wrapper
# MOZILLA_DSP="esddsp"
# ;;
[Aa][Rr][Tt][Ss]|artsdsp) # Use the arts dsp wrapper
MOZILLA_DSP="artsdsp"
;;
[Nn][Oo][Nn][Ee]) # Direct dsp output
MOZILLA_DSP=""
;;
*) # Guest one (auto)
if [ -n "${KDE_FULL_SESSION}" ]; then
MOZILLA_DSP="artsdsp"
# elif [ -r ${HOME}/.esd_auth ]; then
# MOZILLA_DSP="esddsp"
else
MOZILLA_DSP=""
fi
;;
esac
if [ -n "${MOZILLA_DSP}" ] && type "${MOZILLA_DSP}" > /dev/null 2>&1; then
MOZILLA_EXEC="${MOZILLA_DSP} ${MOZILLA_EXEC}"
fi
case $1 in
-browser)
REMOTE_COMMAND="xfeDoCommand (openBrowser)"
@ -17,17 +65,21 @@ case $1 in
REMOTE_COMMAND="xfeDoCommand (composeMessage)"
;;
-*)
exec ./$MOZILLA_EXEC "$@"
exec ${MOZILLA_EXEC} "$@"
;;
*)
REMOTE_COMMAND="openURL($@, $LOCATION)"
if [ -n "${LOCATION}" ]; then
REMOTE_COMMAND="openURL($@,$LOCATION)"
else
REMOTE_COMMAND="openURL($@)"
fi
;;
esac
# process found
./$MOZILLA_EXEC -remote "ping()" &&
./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0
${MOZILLA_REMOTE_EXEC} "ping()" >/dev/null 2>&1 &&
${MOZILLA_REMOTE_EXEC} "${REMOTE_COMMAND}" && exit 0
# no existing process
exec ./$MOZILLA_EXEC "$@"
exec ${MOZILLA_EXEC} "$@"

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