summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Griffis <agriffis@gentoo.org>2004-02-26 04:13:41 +0000
committerAron Griffis <agriffis@gentoo.org>2004-02-26 04:13:41 +0000
commitdd491ac2f959166caf8712e8e2c07cfccc20c14d (patch)
treefc91e388b54549b3fbb1deb87bf0340829aa6cba /net-www/mozilla-firefox
parentI don't know about you guys, but I did new licenses! (diff)
downloadhistorical-dd491ac2f959166caf8712e8e2c07cfccc20c14d.tar.gz
historical-dd491ac2f959166caf8712e8e2c07cfccc20c14d.tar.bz2
historical-dd491ac2f959166caf8712e8e2c07cfccc20c14d.zip
Update launcher script to fix bug 25737: The launcher didn't understand -remote. The script should also work for mozilla now, but that has yet to be tested/deployed
Diffstat (limited to 'net-www/mozilla-firefox')
-rw-r--r--net-www/mozilla-firefox/ChangeLog7
-rw-r--r--net-www/mozilla-firefox/Manifest10
-rw-r--r--net-www/mozilla-firefox/files/firefox62
3 files changed, 46 insertions, 33 deletions
diff --git a/net-www/mozilla-firefox/ChangeLog b/net-www/mozilla-firefox/ChangeLog
index 87cf7651425d..ef2799a208b5 100644
--- a/net-www/mozilla-firefox/ChangeLog
+++ b/net-www/mozilla-firefox/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-www/mozilla-firefox
# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla-firefox/ChangeLog,v 1.12 2004/02/24 06:23:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla-firefox/ChangeLog,v 1.13 2004/02/26 04:13:41 agriffis Exp $
+
+ 25 Feb 2004; Aron Griffis <agriffis@gentoo.org> files/firefox:
+ Update launcher script to fix bug 25737: The launcher didn't understand
+ -remote. The script should also work for mozilla now, but that has yet to be
+ tested/deployed
19 Feb 2004; Tavis Ormandy <taviso@gentoo.org> mozilla-firefox-0.8.ebuild:
marking alpha, #41338
diff --git a/net-www/mozilla-firefox/Manifest b/net-www/mozilla-firefox/Manifest
index a7135a14e0a5..8243c2b90832 100644
--- a/net-www/mozilla-firefox/Manifest
+++ b/net-www/mozilla-firefox/Manifest
@@ -1,9 +1,9 @@
-MD5 bff260036c5dcca45da3218517fb33d8 files/icon/firefox-icon.png 3979
+MD5 4a0f098fe65f44ad956d91fedce0251f mozilla-firefox-0.8.ebuild 7660
+MD5 e340fbd04fbf1c2b3df27800d5ca0ee7 ChangeLog 2149
+MD5 ce23390351fe8020387d93ee29e09a3d metadata.xml 160
MD5 507a3d1338e85acc8828cec7c91d22df files/digest-mozilla-firefox-0.8 73
-MD5 aad3668516b9f1de28a915d9c75f41c7 files/firefox 3518
+MD5 c2264f2747929f5183a032d1cec3d910 files/firefox 3980
MD5 23d1fbd03cc6dd346a4e4ce8f2d88ebf files/mozilla-1.3-alpha-stubs.patch 4646
MD5 606e82226379fd5ae6cd1d0d1faff7ff files/10MozillaFirefox 31
MD5 f0e9adeb0454377ce019e8969e644efb files/mozilla-firebird-amd64.patch 35052
-MD5 4a0f098fe65f44ad956d91fedce0251f mozilla-firefox-0.8.ebuild 7660
-MD5 63d19de0d01f54b0832f619e669c12b8 ChangeLog 1910
-MD5 ce23390351fe8020387d93ee29e09a3d metadata.xml 160
+MD5 bff260036c5dcca45da3218517fb33d8 files/icon/firefox-icon.png 3979
diff --git a/net-www/mozilla-firefox/files/firefox b/net-www/mozilla-firefox/files/firefox
index ab6065569e4f..9a5397fe26e1 100644
--- a/net-www/mozilla-firefox/files/firefox
+++ b/net-www/mozilla-firefox/files/firefox
@@ -2,21 +2,31 @@
#
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla-firefox/files/firefox,v 1.4 2004/02/16 05:47:56 brad Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-www/mozilla-firefox/files/firefox,v 1.5 2004/02/26 04:13:41 agriffis Exp $
# Set MOZILLA_NEWTYPE to "window" in your environment if you prefer
# new Firefox windows instead of new tabs
newtype=${MOZILLA_NEWTYPE:-"window"}
-# Point this to your Firefox installation if not using the default
-export MOZILLA_FIVE_HOME="/usr/lib/MozillaFirefox"
-ffpath=${MOZILLA_FIVE_HOME}
-
-# Sanity check
-if [[ -z $DISPLAY ]]; then
- echo "DISPLAY is unset!" >&2
- exit 1
-fi
+# Support both firefox and mozilla
+case "$0" in
+ *fox*)
+ export MOZILLA_FIVE_HOME="/usr/lib/MozillaFirefox"
+ remote=$MOZILLA_FIVE_HOME/mozilla-xremote-client
+ mozbin=$MOZILLA_FIVE_HOME/firefox
+ grepfor=firefox-bin
+ ;;
+
+ *mozilla*)
+ export MOZILLA_FIVE_HOME="/usr/lib/mozilla"
+ remote=$MOZILLA_FIVE_HOME/mozilla-xremote-client
+ # This is the old mozilla.sh which used to be installed as /usr/bin/mozilla.
+ # I have no idea what parts of it should be kept/dropped so I'm just calling
+ # it for now.
+ mozbin=$MOZILLA_FIVE_HOME/mozilla.sh
+ grepfor=mozilla-bin
+ ;;
+esac
# Validate the args and extract the urls
args=()
@@ -58,8 +68,8 @@ declare -a screens=(
# openURL request appropriately.
declare -a candidates=()
for s in $DISPLAY "${screens[@]}"; do
- if DISPLAY=${s} xwininfo -root -tree | grep -q 'firefox-bin'; then
- candidates=("${candidates[@]}" ${s})
+ if DISPLAY=$s xwininfo -root -tree | grep -q "$grepfor"; then
+ candidates=("${candidates[@]}" $s)
fi
done
@@ -69,15 +79,12 @@ done
# Handle multiple URLs by looping over the xremote call
for u in "${urls[@]}"; do
- # prepend http:// if needed
- [[ $u == ? && $u != *:* ]] && u=http://$u
-
- # try mozila-xremote-client on each candidate screen
- if [[ ${#candidates[@]} > 0 ]]; then
+ # Try mozilla-xremote-client on each candidate screen.
+ # Only use mozilla-xremote-client if we have no other args (which
+ # must be passed to the browser binary).
+ if [[ ${#candidates[@]} > 0 && ${#args[*]} == 0 ]]; then
for s in "${candidates[@]}"; do
- DISPLAY=${s} \
- ${ffpath}/mozilla-xremote-client "openURL($u, new-$newtype)" \
- && break
+ DISPLAY=$s $remote "openURL($u, new-$newtype)" && break
done
retval=$?
else
@@ -86,24 +93,25 @@ for u in "${urls[@]}"; do
fi
# 2 = No running windows found, so start a new instance
- # 3 = Thunderbird is running, but doesn't handle openURL command
- # (or it might be an unresponsive Firefox)
+ # 3 = Browser is running, but doesn't handle openURL command
+ # (or it might be unresponsive)
if [[ $retval -eq 2 || $retval -eq 3 ]] ; then
# Handle case of multiple URLs
if [[ ${#urls[@]} > 1 ]]; then
- ${ffpath}/firefox "${args[@]}" "$u" &
+ $mozbin "${args[@]}" "$u" &
if [[ -x /usr/bin/xtoolwait ]]; then
xtoolwait sleep 10
else
- sleep 10 # totally arbitrary! :-(
+ sleep 10 # totally arbitrary without xtoolwait! :-(
fi
- candidates=$DISPLAY
+ candidates=$DISPLAY # next time through, use $remote
+ args=() # and drop the args
continue
fi
# Handle case of single URL
- ${ffpath}/firefox "${args[@]}" "$u" &
+ $mozbin "${args[@]}" "$u" &
break
elif [[ $retval -eq 1 ]]; then
@@ -117,7 +125,7 @@ done
# Will only wait here if firefox was started by this script
if ! wait; then
retval=$?
- echo "firefox exited with non-zero status ($?)" >&2
+ echo "${mozbin##*/} exited with non-zero status ($?)" >&2
fi
exit $retval