Subject: Re: FLAVOR (was Re: RCD_SCRIPTS_DIR)
To: None <tech-pkg@netbsd.org>
From: avon barksdale <avon@flatlet.net>
List: tech-pkg
Date: 10/23/2002 21:19:57
On Wed, Oct 23, 2002 at 06:18:17PM -0700, Jeremy C. Reed wrote:
> NetBSD already has package specific options for many packages.

What do you mean exactly?  I don't think I made myself clear.  OpenBSD
has something called the fake framework.  What happens is the port
actually installs itself into a subdirectory of the work directory.
This is done by augmenting the environment a bit.  It's really nice
because a package is then made by tarring up the files listed in PLIST.
Then the port is actually installed onto the system by extracting the
tarball/package.  It's really nice because it makes PLIST management a
lot more simple (and accurate).
 
> Tell us more on how the FLAVOR system can help. If I understand correctly,
> it makes it so you can have a setting that is applicable for multiple
> packages.
>
> Can you provide some examples of using FLAVOR(S) with NetBSD's pkgsrc
> and how it would make things easier?

Well take Mozilla for example.  I don't want mail/news, ldap, or
chatzilla.  For OpenBSD, it would like something like this:

FLAVORS=                chatzilla debug dynamic mailnews
FLAVOR?=

.if ${FLAVOR:L:Mchatzilla}
CONFIGURE_ARGS+=        --enable-extensions=default,irc,xmlterm
.else
CONFIGURE_ARGS+=        --enable-extensions=default,xmlterm

.endif

<not going to list all FLAVORs for the sake of brevity>

This is really helpful for applications which can use GNOME or just
plain GTK.  If the default is to use gnome, then you're stuck building
all of the gnome core & libs.  It's nice for increasing a users ability
to build software only with the options they want.

> (Also MULTI_PACKAGES looks interesting for creating multiple packages of
> same package each with different configs.)

Yes it ties in with FLAVOR quite a bit.

thanks for your comments.

- avon