Date: Wed, 27 Jul 2011 11:37:37 +0100 From: Anton Shterenlikht <mexas@bristol.ac.uk> To: Test Rat <ttsestt@gmail.com> Cc: Anton Shterenlikht <mexas@bristol.ac.uk>, freebsd-ports@freebsd.org Subject: Re: is %%GECKO%% defined anywhere? Message-ID: <20110727103737.GA71837@mech-cluster241.men.bris.ac.uk> In-Reply-To: <86zkk0dp3v.fsf@gmail.com> References: <20110727082212.GA68537@mech-cluster241.men.bris.ac.uk> <86zkk0dp3v.fsf@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 27, 2011 at 01:55:48PM +0400, Test Rat wrote: > Anton Shterenlikht <mexas@bristol.ac.uk> 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 <bsd.port.pre.mk> > %% 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110727103737.GA71837>