Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Oct 1999 13:08:55 -0400 (EDT)
From:      Chuck Robey <chuckr@picnic.mat.net>
To:        Marcin Cieslak <saper@system.pl>
Cc:        ports@FreeBSD.ORG
Subject:   Re: gif2png: 'optional' dependencies
Message-ID:  <Pine.BSF.4.10.9910261303450.29073-100000@picnic.mat.net>
In-Reply-To: <Pine.GSO.4.10.9910261842380.16153-100000@tricord.system.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 26 Oct 1999, Marcin Cieslak wrote:

> 
> First, smaller problem, is to fix the initial "#!" line.
> The original one says:
> 
>  #! /usr/bin/python
> 
> and is obviuosly incorrect, since most pythons are
> installed in /usr/local/bin.
> 
> What is The Right Way(tm) of finding the location of python
> binary? Should I just use 'which' or should I somehow search
> the package database ... or should I just assume ${PREFIX}/bin?

This is done by a lot of ports.  Use a patch to change that line to
something easily replaced, like %%PREFIX%%/bin, and then use
a pre-install target to sed that:

pre-install:
	$(SED) -e "s/%%PREFIX%%/$(PREFIX)/" < infile >outfile

The Makefile will change the second part of the sed to what it should be
for the port automatically, and then it just gets installed right byt he
install target.

>  
> Second, a bit more important is... what about python dependency?
> I don't think it is necessary to add python as a dependency
> for this little script. I see three options:
> 
> 1) install this script as-is into ${PREFIX}/bin and fix the
> #! (see the problem above)
> 
> 2) detect whether python is installed and install the script then.
> (what if the user installs python later for any reason?)
> 
> 3) create a small mini-port for web2png alone (say py-web2png),
> requiring both gif2png and python to be installed.
> Any hints how to force this mini-port not to use it's own
> distfile and just to sneak into the gif2png work tree and install
> the script and manpage of it's own? This seems more elegant,
> however isn't it a waste of space/bandwidth for yet
> another Makefile, pkg, and all the stuff belonging to the port.

This part is up to you.  Do you think it adds enough real functionality to
justify adding python?  If you do that, does it really functionally
operate (more than just compile, does it work)?

> 
> Or any other suggestions welcome...
> 
> 

----------------------------------------------------------------------------
Chuck Robey                | Interests include C programming, Electronics,
213 Lakeside Dr. Apt. T-1  | communications, and signal processing.
Greenbelt, MD 20770        | I run picnic.mat.net: FreeBSD-current(i386) and
(301) 220-2114             |       jaunt.mat.net : FreeBSD-current(Alpha)
----------------------------------------------------------------------------



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9910261303450.29073-100000>