Subject: Re: USE_SASL is too general?
To: Daniel Eggert <tech-pkg@netbsd.org>
From: Adam C. Migus <adam@migus.org>
List: tech-pkg
Date: 12/29/2003 18:08:21
On Monday 29 December 2003 05:43 pm, Daniel Eggert wrote:
> Hi all,
>
> The USE_SASL variable is very general. If one puts
> USE_SASL=YES
> into mk.conf all packages will be built with sasl. Wouldn't it be
> better to use
> LDAP_USE_SASL=NO
> POSTFIX_USE_SASL=YES
> etc. ?
>
> This would give much more flexibility.
>
> I'm in a situation where I want to build databases/openldap without
> SASL, but want to build mail/postfix _with_ SASL. If I do a
> make update
> somewhere things may break. Or am I missing something?
>
> /Daniel
My apologies for not readily offering a solution but your post gave me
an idea for this type situation. Wouldn't it be neat if you could say:
.if (I'm building databases)
USE_SASL=NO
.else
USE_SASL=YES
.endif
My thinking is doing it this way would offer more flexibility as you
point out but cut down on the number of _USE_ variables that would need
to be defined.
If there was a ${PKGNAME_NOVER} being ${PKGNAME} without the version
information one could say something like:
.if (${PKGNAME_NOVER} == "openldap")
A well written `sed' call could define that variable. Or perhaps
something more intelligent with names and categories could be
implemented to make it even more functional.
Adam