aboutsummaryrefslogtreecommitdiffstats
path: root/www/seamonkey2/files
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-12-25 02:25:45 +0800
committermarcus <marcus@FreeBSD.org>2004-12-25 02:25:45 +0800
commit0c7e8f5294e9740013b4b8537addf85bb983a77c (patch)
treeda7fa69c984371620e61c2a072c7b6166d6e1ad5 /www/seamonkey2/files
parenta16dc79b7aab4d333f56454463d5eda775335e69 (diff)
downloadfreebsd-ports-gnome-0c7e8f5294e9740013b4b8537addf85bb983a77c.tar.gz
freebsd-ports-gnome-0c7e8f5294e9740013b4b8537addf85bb983a77c.tar.zst
freebsd-ports-gnome-0c7e8f5294e9740013b4b8537addf85bb983a77c.zip
* 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]
Diffstat (limited to 'www/seamonkey2/files')
-rw-r--r--www/seamonkey2/files/mozilla.sh66
-rw-r--r--www/seamonkey2/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp29
2 files changed, 88 insertions, 7 deletions
diff --git a/www/seamonkey2/files/mozilla.sh b/www/seamonkey2/files/mozilla.sh
index c839ef1a9ff4..870b74e8cd38 100644
--- a/www/seamonkey2/files/mozilla.sh
+++ b/www/seamonkey2/files/mozilla.sh
@@ -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} "$@"
diff --git a/www/seamonkey2/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp b/www/seamonkey2/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp
new file mode 100644
index 000000000000..7f8e55f536df
--- /dev/null
+++ b/www/seamonkey2/files/patch-uriloader_exthandler_unix_nsGNOMERegistry.cpp
@@ -0,0 +1,29 @@
+--- uriloader/exthandler/unix/nsGNOMERegistry.cpp.orig Fri Dec 24 04:30:00 2004
++++ uriloader/exthandler/unix/nsGNOMERegistry.cpp Fri Dec 24 04:34:05 2004
+@@ -143,7 +143,7 @@
+ PR_END_MACRO
+
+ // Attempt to open libgconf
+- gconfLib = LoadVersionedLibrary("gconf-2", ".4");
++ gconfLib = PR_LoadLibrary("libgconf-2.so");
+ ENSURE_LIB(gconfLib);
+
+ GET_LIB_FUNCTION(gconf, gconf_client_get_default);
+@@ -151,7 +151,7 @@
+ GET_LIB_FUNCTION(gconf, gconf_client_get_bool);
+
+ // Attempt to open libgnome
+- gnomeLib = LoadVersionedLibrary("gnome-2", ".0");
++ gnomeLib = PR_LoadLibrary("libgnome-2.so");
+ ENSURE_LIB(gnomeLib);
+
+ GET_LIB_FUNCTION(gnome, gnome_url_show);
+@@ -160,7 +160,7 @@
+ GET_LIB_FUNCTION(gnome, gnome_program_get);
+
+ // Attempt to open libgnomevfs
+- vfsLib = LoadVersionedLibrary("gnomevfs-2", ".0");
++ vfsLib = PR_LoadLibrary("libgnomevfs-2.so");
+ ENSURE_LIB(vfsLib);
+
+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_type_from_name);