From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Apr 6 07:30:20 2003 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2241E37B401 for ; Sun, 6 Apr 2003 07:30:20 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0501043FAF for ; Sun, 6 Apr 2003 07:30:19 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h36EUIUp033448 for ; Sun, 6 Apr 2003 07:30:18 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h36EUI0v033447; Sun, 6 Apr 2003 07:30:18 -0700 (PDT) Resent-Date: Sun, 6 Apr 2003 07:30:18 -0700 (PDT) Resent-Message-Id: <200304061430.h36EUI0v033447@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Guido Berhoerster Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C519437B401 for ; Sun, 6 Apr 2003 07:26:55 -0700 (PDT) Received: from helium.webpack.hosteurope.de (helium.one-2-one.net [217.115.142.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BCB643F93 for ; Sun, 6 Apr 2003 07:26:54 -0700 (PDT) (envelope-from ich@guido-berhoerster.org) Received: from hal.privat.lan (pD9E58DA7.dip.t-dialin.net [217.229.141.167]) h36ET0g28747 for ; Sun, 6 Apr 2003 16:29:00 +0200 Received: from hal.privat.lan (localhost [127.0.0.1]) by hal.privat.lan (8.12.8p1/8.12.8) with ESMTP id h36EQjgY039073 for ; Sun, 6 Apr 2003 16:26:46 +0200 (CEST) (envelope-from guiber@hal.privat.lan) Received: (from guiber@localhost) by hal.privat.lan (8.12.8p1/8.12.8/Submit) id h36EQjgP039072; Sun, 6 Apr 2003 16:26:45 +0200 (CEST) Message-Id: <200304061426.h36EQjgP039072@hal.privat.lan> Date: Sun, 6 Apr 2003 16:26:45 +0200 (CEST) From: Guido Berhoerster To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/50643: [PATCH] Add a wrapper script to phoenix X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Guido Berhoerster List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2003 14:30:20 -0000 >Number: 50643 >Category: ports >Synopsis: [PATCH] Add a wrapper script to phoenix >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Apr 06 07:30:18 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Guido Berhoerster >Release: FreeBSD 4.8-RELEASE i386 >Organization: >Environment: System: FreeBSD hal.privat.lan 4.8-RELEASE FreeBSD 4.8-RELEASE #1: Fri Apr 4 15:35:08 CEST 2003 root@hal.privat.lan:/usr/obj/usr/src/sys/HAL i386 >Description: Unlike the mozilla* ports phoenix does not use a wrapper script that checks if a process of phoenix is already running. Instead ${PREFIX}/bin/phoenix is a symlink to the phoenix startup script in ${PREFIX}/lib/phoenix/bin/. So if phoenix is already running and then called again the profile manager will pop up which is quite annoying. There is an extra script 'phoenix.rb' which does this but it's rather impractical since it requires ruby to be installed. >How-To-Repeat: Call phoenix again when it is already running. >Fix: The following shell script which is heavily inspired by its equivalents from the mozilla* ports acts as a wrapper for the phoenix startup script. If phoenix is already running and called again it will open up a new tab just like the mozilla* ports do. --- phoenix.sh begins here --- #!/bin/sh MOZILLA_DIR="%%PREFIX%%/lib/phoenix/bin" MOZILLA_EXEC="phoenix" LOCATION='new-tab' cd $MOZILLA_DIR || exit 1 case $1 in -*) exec ./$MOZILLA_EXEC "$@" ;; *) REMOTE_COMMAND="openURL($@, $LOCATION)" ;; esac # process found ./$MOZILLA_EXEC -remote "ping()" && ./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0 # no existing process exec ./$MOZILLA_EXEC "$@" --- phoenix.sh ends here --- Apply this to the Makefile. --- Makefile.diff begins here --- --- Makefile.orig Fri Mar 7 07:12:52 2003 +++ Makefile Sun Apr 6 15:32:44 2003 @@ -103,21 +103,23 @@ <${FILESDIR}/mozconfig.in >${WRKSRC}/.mozconfig post-build: + ${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \ + ${FILESDIR}/phoenix.sh >${WRKSRC}/phoenix ${RM} -f ${PLIST} ${TOUCH} ${PLIST} pre-install: ${RM} -fr ${LOCAL_PREFIX} +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/phoenix ${PREFIX}/bin + install-extra: .for i in ${EXTRA_SCRIPTS} ${INSTALL_SCRIPT} ${FILESDIR}/${i} ${PREFIX}/bin .endfor # i in ${EXTRA_SCRIPTS} link-bins: - ${RM} -f ${PREFIX}/bin/phoenix - ${LN} -s ${LOCAL_PREFIX}/bin/phoenix \ - ${PREFIX}/bin/phoenix ${RM} -f ${PREFIX}/bin/phoenix-config ${LN} -s ${LOCAL_PREFIX}/bin/mozilla-config \ ${PREFIX}/bin/phoenix-config --- Makefile.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: