From owner-freebsd-ports Tue Oct 26 9:59:14 1999 Delivered-To: freebsd-ports@freebsd.org Received: from tricord.system.pl (tricord.system.pl [195.205.185.10]) by hub.freebsd.org (Postfix) with ESMTP id 849DC151F3 for ; Tue, 26 Oct 1999 09:58:54 -0700 (PDT) (envelope-from saper@system.pl) Received: from localhost (saper@localhost [127.0.0.1]) by tricord.system.pl (SYSTEM Internet) with ESMTP id SAA16367 for ; Tue, 26 Oct 1999 18:58:59 +0200 (MET DST) Date: Tue, 26 Oct 1999 18:58:56 +0200 (MET DST) From: Marcin Cieslak To: ports@freebsd.org Subject: gif2png: 'optional' dependencies Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org I am trying to fix a gif2png port, recently updated with ports/14331 PR. I have two problems with this port, and I am sure that they were somehow discussed there, but searching the list archive didn't help much. Please excuse me if my problems are too trivial for the -ports sharks, but I thinks that tuning the details of ports is a good way of making FreeBSD a YetBetterOS(tm). :) Original gif2png is a C program, compiled into an ELF binary. However, gif2png 1.1.1 comes with a tiny Python script, called web2png, which assists a larger batch job of gif-to-png conversion. The script is also accompanied by a manpage, so we have "MAN1= gif2png.1 web2png.1" in the Makefile. 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? 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. Or any other suggestions welcome... -- << Marcin Cieslak // saper@system.pl >> ----------------------------------------------------------------- SYSTEM Internet Provider http://www.system.pl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message