diff options
author | marcus <marcus@FreeBSD.org> | 2002-11-24 08:24:04 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2002-11-24 08:24:04 +0800 |
commit | b1c38d310f23d32319e1c368aa770e49adc18521 (patch) | |
tree | d7b8b5c3cdbbd105c83dbc1cc47e48106580430a /www | |
parent | f03697bdcc62a0dc29a18644b33ae22d07db423c (diff) | |
download | freebsd-ports-gnome-b1c38d310f23d32319e1c368aa770e49adc18521.tar.gz freebsd-ports-gnome-b1c38d310f23d32319e1c368aa770e49adc18521.tar.zst freebsd-ports-gnome-b1c38d310f23d32319e1c368aa770e49adc18521.zip |
Make the Mozilla startup scripts a little smarter. Instead of launching a
new Mozilla instance each time, check to see if one already exists, and if
so, spawn a new browser tab in the current window.
PR: 45610
Submitted by: Nick Jennings
Diffstat (limited to 'www')
-rw-r--r-- | www/mozilla-devel-gtk1/Makefile | 2 | ||||
-rw-r--r-- | www/mozilla-devel-gtk2/Makefile | 2 | ||||
-rw-r--r-- | www/mozilla-devel/Makefile | 4 | ||||
-rw-r--r-- | www/mozilla-devel/files/mozilla.sh | 24 | ||||
-rw-r--r-- | www/mozilla-gtk1/Makefile | 2 | ||||
-rw-r--r-- | www/mozilla-gtk2/Makefile | 2 | ||||
-rw-r--r-- | www/mozilla-vendor/Makefile | 4 | ||||
-rw-r--r-- | www/mozilla-vendor/files/mozilla.sh | 24 | ||||
-rw-r--r-- | www/mozilla/Makefile | 4 | ||||
-rw-r--r-- | www/mozilla/files/mozilla.sh | 24 | ||||
-rw-r--r-- | www/seamonkey/Makefile | 4 | ||||
-rw-r--r-- | www/seamonkey/files/mozilla.sh | 24 | ||||
-rw-r--r-- | www/seamonkey2/Makefile | 4 | ||||
-rw-r--r-- | www/seamonkey2/files/mozilla.sh | 24 |
14 files changed, 114 insertions, 34 deletions
diff --git a/www/mozilla-devel-gtk1/Makefile b/www/mozilla-devel-gtk1/Makefile index 83a56d60a1e1..cf8dbe4eecd2 100644 --- a/www/mozilla-devel-gtk1/Makefile +++ b/www/mozilla-devel-gtk1/Makefile @@ -6,7 +6,7 @@ # PORTNAME= mozilla -PORTREVISION= 0 +PORTREVISION= 1 PORTEPOCH= 0 CATEGORIES= www diff --git a/www/mozilla-devel-gtk2/Makefile b/www/mozilla-devel-gtk2/Makefile index 83a56d60a1e1..cf8dbe4eecd2 100644 --- a/www/mozilla-devel-gtk2/Makefile +++ b/www/mozilla-devel-gtk2/Makefile @@ -6,7 +6,7 @@ # PORTNAME= mozilla -PORTREVISION= 0 +PORTREVISION= 1 PORTEPOCH= 0 CATEGORIES= www diff --git a/www/mozilla-devel/Makefile b/www/mozilla-devel/Makefile index 0f2f416a3c29..7ef9a86ffacd 100644 --- a/www/mozilla-devel/Makefile +++ b/www/mozilla-devel/Makefile @@ -7,7 +7,7 @@ PORTNAME?= mozilla PORTVERSION= 1.2b -PORTREVISION?= 1 +PORTREVISION?= 2 PORTEPOCH?= 1 CATEGORIES?= www MASTER_SITES= ${MASTER_SITE_MOZILLA} \ @@ -174,7 +174,7 @@ post-patch: ${WRKSRC}/config/autoconf.mk.in post-build: - ${SED} -e "s;@PREFIX@;${PREFIX};g" -e "s;%%MOZILLA%%;${MOZILLA};g" \ + ${SED} -e "s|%%PREFIX%%|${PREFIX}|g" -e "s|%%MOZILLA%%|${MOZILLA}|g" \ ${FILESDIR}/mozilla.sh >${WRKSRC}/${MOZILLA} (cd ${WRKSRC}/dist/bin; \ ${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. ./regxpcom; \ diff --git a/www/mozilla-devel/files/mozilla.sh b/www/mozilla-devel/files/mozilla.sh index efea04a63e16..0e34950cd32c 100644 --- a/www/mozilla-devel/files/mozilla.sh +++ b/www/mozilla-devel/files/mozilla.sh @@ -1,6 +1,22 @@ #!/bin/sh -# -# $FreeBSD$ -cd @PREFIX@/lib/%%MOZILLA%% -exec ./mozilla "$@" +MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%" +MOZILLA_EXEC="mozilla" +LOCATION='new-tab' + +cd $MOZILLA_DIR || exit 1 + +# catch calls for mozilla mail +if [ "$1" = "-mail" ]; then + REMOTE_COMMAND="xfeDoCommand (openInbox)" +else + REMOTE_COMMAND="openURL($@, $LOCATION)" +fi + +# process found +./$MOZILLA_EXEC -remote "ping()" && +./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0 + +# no existing process +exec ./$MOZILLA_EXEC "$@" + diff --git a/www/mozilla-gtk1/Makefile b/www/mozilla-gtk1/Makefile index 83a56d60a1e1..cf8dbe4eecd2 100644 --- a/www/mozilla-gtk1/Makefile +++ b/www/mozilla-gtk1/Makefile @@ -6,7 +6,7 @@ # PORTNAME= mozilla -PORTREVISION= 0 +PORTREVISION= 1 PORTEPOCH= 0 CATEGORIES= www diff --git a/www/mozilla-gtk2/Makefile b/www/mozilla-gtk2/Makefile index 83a56d60a1e1..cf8dbe4eecd2 100644 --- a/www/mozilla-gtk2/Makefile +++ b/www/mozilla-gtk2/Makefile @@ -6,7 +6,7 @@ # PORTNAME= mozilla -PORTREVISION= 0 +PORTREVISION= 1 PORTEPOCH= 0 CATEGORIES= www diff --git a/www/mozilla-vendor/Makefile b/www/mozilla-vendor/Makefile index 6a77c986def5..02db100a7b79 100644 --- a/www/mozilla-vendor/Makefile +++ b/www/mozilla-vendor/Makefile @@ -7,7 +7,7 @@ PORTNAME= mozilla PORTVERSION= 1.0.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_MOZILLA} \ http://people.FreeBSD.org/~marcus/:local @@ -114,7 +114,7 @@ post-patch: ${WRKSRC}/build/unix/run-mozilla.sh post-build: - ${SED} -e "s;@PREFIX@;${PREFIX};g" \ + ${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \ ${FILESDIR}/mozilla.sh >${WRKSRC}/mozilla-vendor (cd ${WRKSRC}/dist/bin; \ ${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. ./regxpcom; \ diff --git a/www/mozilla-vendor/files/mozilla.sh b/www/mozilla-vendor/files/mozilla.sh index fa04f84dc7ca..05783d57373f 100644 --- a/www/mozilla-vendor/files/mozilla.sh +++ b/www/mozilla-vendor/files/mozilla.sh @@ -1,6 +1,22 @@ #!/bin/sh -# -# $FreeBSD$ -cd @PREFIX@/lib/mozilla-vendor -exec ./mozilla "$@" +MOZILLA_DIR="%%PREFIX%%/lib/mozilla-vendor" +MOZILLA_EXEC="mozilla" +LOCATION='new-tab' + +cd $MOZILLA_DIR || exit 1 + +# catch calls for mozilla mail +if [ "$1" = "-mail" ]; then + REMOTE_COMMAND="xfeDoCommand (openInbox)" +else + REMOTE_COMMAND="openURL($@, $LOCATION)" +fi + +# process found +./$MOZILLA_EXEC -remote "ping()" && +./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0 + +# no existing process +exec ./$MOZILLA_EXEC "$@" + diff --git a/www/mozilla/Makefile b/www/mozilla/Makefile index 43e319e1d2d8..6709dbfb12d1 100644 --- a/www/mozilla/Makefile +++ b/www/mozilla/Makefile @@ -7,7 +7,7 @@ PORTNAME= mozilla PORTVERSION= 1.1 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 2 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_MOZILLA} \ @@ -113,7 +113,7 @@ post-patch: ${WRKSRC}/build/unix/run-mozilla.sh post-build: - ${SED} -e "s;@PREFIX@;${PREFIX};g" \ + ${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \ ${FILESDIR}/mozilla.sh >${WRKSRC}/mozilla (cd ${WRKSRC}/dist/bin; \ ${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. ./regxpcom; \ diff --git a/www/mozilla/files/mozilla.sh b/www/mozilla/files/mozilla.sh index 699f5d9d52f1..cc1eff88a0b1 100644 --- a/www/mozilla/files/mozilla.sh +++ b/www/mozilla/files/mozilla.sh @@ -1,6 +1,22 @@ #!/bin/sh -# -# $FreeBSD$ -cd @PREFIX@/lib/mozilla -exec ./mozilla "$@" +MOZILLA_DIR="%%PREFIX%%/lib/mozilla" +MOZILLA_EXEC="mozilla" +LOCATION='new-tab' + +cd $MOZILLA_DIR || exit 1 + +# catch calls for mozilla mail +if [ "$1" = "-mail" ]; then + REMOTE_COMMAND="xfeDoCommand (openInbox)" +else + REMOTE_COMMAND="openURL($@, $LOCATION)" +fi + +# process found +./$MOZILLA_EXEC -remote "ping()" && +./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0 + +# no existing process +exec ./$MOZILLA_EXEC "$@" + diff --git a/www/seamonkey/Makefile b/www/seamonkey/Makefile index 0f2f416a3c29..7ef9a86ffacd 100644 --- a/www/seamonkey/Makefile +++ b/www/seamonkey/Makefile @@ -7,7 +7,7 @@ PORTNAME?= mozilla PORTVERSION= 1.2b -PORTREVISION?= 1 +PORTREVISION?= 2 PORTEPOCH?= 1 CATEGORIES?= www MASTER_SITES= ${MASTER_SITE_MOZILLA} \ @@ -174,7 +174,7 @@ post-patch: ${WRKSRC}/config/autoconf.mk.in post-build: - ${SED} -e "s;@PREFIX@;${PREFIX};g" -e "s;%%MOZILLA%%;${MOZILLA};g" \ + ${SED} -e "s|%%PREFIX%%|${PREFIX}|g" -e "s|%%MOZILLA%%|${MOZILLA}|g" \ ${FILESDIR}/mozilla.sh >${WRKSRC}/${MOZILLA} (cd ${WRKSRC}/dist/bin; \ ${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. ./regxpcom; \ diff --git a/www/seamonkey/files/mozilla.sh b/www/seamonkey/files/mozilla.sh index efea04a63e16..0e34950cd32c 100644 --- a/www/seamonkey/files/mozilla.sh +++ b/www/seamonkey/files/mozilla.sh @@ -1,6 +1,22 @@ #!/bin/sh -# -# $FreeBSD$ -cd @PREFIX@/lib/%%MOZILLA%% -exec ./mozilla "$@" +MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%" +MOZILLA_EXEC="mozilla" +LOCATION='new-tab' + +cd $MOZILLA_DIR || exit 1 + +# catch calls for mozilla mail +if [ "$1" = "-mail" ]; then + REMOTE_COMMAND="xfeDoCommand (openInbox)" +else + REMOTE_COMMAND="openURL($@, $LOCATION)" +fi + +# process found +./$MOZILLA_EXEC -remote "ping()" && +./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0 + +# no existing process +exec ./$MOZILLA_EXEC "$@" + diff --git a/www/seamonkey2/Makefile b/www/seamonkey2/Makefile index 0f2f416a3c29..7ef9a86ffacd 100644 --- a/www/seamonkey2/Makefile +++ b/www/seamonkey2/Makefile @@ -7,7 +7,7 @@ PORTNAME?= mozilla PORTVERSION= 1.2b -PORTREVISION?= 1 +PORTREVISION?= 2 PORTEPOCH?= 1 CATEGORIES?= www MASTER_SITES= ${MASTER_SITE_MOZILLA} \ @@ -174,7 +174,7 @@ post-patch: ${WRKSRC}/config/autoconf.mk.in post-build: - ${SED} -e "s;@PREFIX@;${PREFIX};g" -e "s;%%MOZILLA%%;${MOZILLA};g" \ + ${SED} -e "s|%%PREFIX%%|${PREFIX}|g" -e "s|%%MOZILLA%%|${MOZILLA}|g" \ ${FILESDIR}/mozilla.sh >${WRKSRC}/${MOZILLA} (cd ${WRKSRC}/dist/bin; \ ${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. ./regxpcom; \ diff --git a/www/seamonkey2/files/mozilla.sh b/www/seamonkey2/files/mozilla.sh index efea04a63e16..0e34950cd32c 100644 --- a/www/seamonkey2/files/mozilla.sh +++ b/www/seamonkey2/files/mozilla.sh @@ -1,6 +1,22 @@ #!/bin/sh -# -# $FreeBSD$ -cd @PREFIX@/lib/%%MOZILLA%% -exec ./mozilla "$@" +MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%" +MOZILLA_EXEC="mozilla" +LOCATION='new-tab' + +cd $MOZILLA_DIR || exit 1 + +# catch calls for mozilla mail +if [ "$1" = "-mail" ]; then + REMOTE_COMMAND="xfeDoCommand (openInbox)" +else + REMOTE_COMMAND="openURL($@, $LOCATION)" +fi + +# process found +./$MOZILLA_EXEC -remote "ping()" && +./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0 + +# no existing process +exec ./$MOZILLA_EXEC "$@" + |