From owner-freebsd-ports@FreeBSD.ORG Wed Jul 27 10:38:24 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE4C1106566B for ; Wed, 27 Jul 2011 10:38:24 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id 6C7CF8FC0A for ; Wed, 27 Jul 2011 10:38:24 +0000 (UTC) Received: from ncsc.bris.ac.uk ([137.222.10.41]) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1Qm1V6-0002ol-1b; Wed, 27 Jul 2011 11:38:14 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncsc.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Qm1Uf-0006ha-JH; Wed, 27 Jul 2011 11:37:37 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.4) with ESMTP id p6RAbbGC073098; Wed, 27 Jul 2011 11:37:37 +0100 (BST) (envelope-from mexas@bristol.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.4/Submit) id p6RAbbHv073097; Wed, 27 Jul 2011 11:37:37 +0100 (BST) (envelope-from mexas@bristol.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bristol.ac.uk using -f Date: Wed, 27 Jul 2011 11:37:37 +0100 From: Anton Shterenlikht To: Test Rat Message-ID: <20110727103737.GA71837@mech-cluster241.men.bris.ac.uk> References: <20110727082212.GA68537@mech-cluster241.men.bris.ac.uk> <86zkk0dp3v.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86zkk0dp3v.fsf@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: Anton Shterenlikht , freebsd-ports@freebsd.org Subject: Re: is %%GECKO%% defined anywhere? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2011 10:38:24 -0000 On Wed, Jul 27, 2011 at 01:55:48PM +0400, Test Rat wrote: > Anton Shterenlikht writes: > > > # cat /usr/ports/textproc/urlview/files/gecko.sh.in > > #! /bin/sh > > # $FreeBSD: ports/textproc/urlview/files/gecko.sh.in,v 1.1 2009/11/29 08:24:50 obrien Exp $ > > # Launch %%GECKO%% for urlview > > URL=$@ > > %%GECKO%% -remote "openurl($URL, new-tab)" || %%GECKO%% $URL > > # > > > > which on installation turns into > > > > # cat /usr/local/bin/gecko.sh > > #! /bin/sh > > # $FreeBSD: ports/textproc/urlview/files/gecko.sh.in,v 1.1 2009/11/29 08:24:50 obrien Exp $ > > # Launch for urlview > > URL=$@ > > -remote "openurl($URL, new-tab)" || $URL > > # > > > > I cannot find any reference to %%GECKO%% in Mk/* > > It's pre-processed by sed(1) before being installed, see SUB_LIST. > > $ make -V SUB_LIST:MGECKO\* > GECKO= > $ make -V SUB_LIST:MGECKO\* WITH_FIREFOX= > GECKO=firefox3 > $ make -V SUB_LIST:MGECKO\* WITH_SEAMONKEY= > GECKO=seamonkey > > Here is a bandaid that uses firefox by default. A proper fix would > probably involve relying on an environment variable and doing > away with gecko.sh to also address ports/152453. > > %% > Index: textproc/urlview/Makefile > =================================================================== > RCS file: /a/.cvsup/ports/textproc/urlview/Makefile,v > retrieving revision 1.33 > diff -u -p -r1.33 Makefile > --- textproc/urlview/Makefile 2 May 2011 22:05:18 -0000 1.33 > +++ textproc/urlview/Makefile 27 Jul 2011 09:32:54 -0000 > @@ -25,12 +25,12 @@ MAN1= urlview.1 > SUB_FILES= gecko.sh > SUB_LIST= GECKO=${GECKO} > > -.if defined(WITH_FIREFOX) > -USE_FIREFOX= 36 > -GECKO= firefox3 > -.elif defined(WITH_SEAMONKEY) > +.if defined(WITH_SEAMONKEY) > USE_SEAMONKEY= 20 > GECKO= seamonkey > +.else > +USE_FIREFOX= yes > +GECKO= firefox > .endif > > .include > %% Sorry, but I don't like this solution. This will force the user to build firefox always, even if they never want to use urlview with anything but e.g. lynx. I don't like the idea of gecko.sh either. There can be other browsers installed instead of the above 2, e.g. midori, kazehakase, etc. It adds unnecessary complexity to this very simple port. HOw about doing away with gecko.sh completely, and letting the user specify what they want directly in $HOME/.urlview: % cat $HOME/.urlview COMMAND lynx %s #COMMAND firefox3 %s #COMMAND midori %s -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423