Subject: Re: PLIST_SRC vs PKG_OPTIONS
To: Jeff Rizzo <riz@tastylime.net>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-pkg
Date: 03/16/2005 20:15:36
On Wed, 16 Mar 2005, Jeff Rizzo wrote:
> bumping my head against something I can't figure out... getting the
> PLIST right when an option is enabled.

Maybe just maintain a single PLIST, and enable/disable single lines based 
on options - probably much simpler.

The idea is something like in pkgsrc/devel/gmake, i.e. test if feature is 
set, and if so set a variable either to "" or @comment, then expand that 
in the PLIST:

Makefile:

 	.if !defined(GNU_PROGRAM_PREFIX) || ${GNU_PROGRAM_PREFIX} != "g"
 	PLIST_SUBST+=           GMAKE_LINK=""
 	.else
 	PLIST_SUBST+=           GMAKE_LINK="@comment "
 	.endif

PLIST:
 	${GMAKE_LINK}bin/gmake


  - Hubert

-- 
NetBSD - Free AND Open!      (And of course secure, portable, yadda yadda)