Question about new options framework (regression?)

Baptiste Daroussin bapt at FreeBSD.org
Mon Aug 20 15:52:36 UTC 2012


On Fri, Jul 27, 2012 at 07:02:16PM +0200, Oliver Fromme wrote:
> 
> Jase Thew wrote:
>  > On 27/07/2012 10:41, Baptiste Daroussin wrote:
>  > > 
>  > > I think that is the more reasonnable, I'll add this when fully back. I was
>  > > thinking of LATE_SET and LATE_UNSET but OVERRIDE_SET and OVERRIDE_UNSET sounds
>  > > better to me.
>  > 
>  > What use-case are you thinking of that requires the ability for saved
>  > config to override manually specified config? If there isn't a
>  > compelling reason for this, then I'd personally much rather see the
>  > original behaviour restored rather than adding another two variables.
> 
> Baptiste is right ...  The original behaviour is flawed,
> because it depends on how the port's maintainer wrote the
> Makefile.
> 
> For example, If you have WITH_FOO=YES in the options file,
> and the port's Makefile checks whether WITH_FOO is set or
> unset, then there is *no* way to override that, not even
> with the old options framework.
> 
> In the case of zsh I was lucky, because the (old) Makefile
> checked if WITH_ZSH_STATIC is set, while the options file
> contained WITHOUT_ZSH_STATIC, so I could override that.
> If it was checking whether WITHOUT_ZSH_STATIC was unset,
> it wouldn't have worked.
> 
> Also, if I wanted to do it the other way round, i.e. set
> WITH_ZSH_STATIC in the options file, there would be no
> way to unset that on the command line.
> 
> So, Baptiste's approach to fix that alltogether is right,
> in my opinion.
> 
> Best regards
>    Oliver
> 

Does this patch fits your needs?
http://people.freebsd.org/~bapt/OVERRIDE_BLA.diff

The initial configuration has been saved using make config.

# make showconfig
===> The following configuration options are available for zsh-5.0.0:
     DEBUG=off: Install debug symbols
     DOCS=off: Build and install the documentation
     GDBM=on: Enable GDBM support (GPL)
     MAILDIR=on: Enable support for Maildirs in MAIL(PATH)
     MEM=off: Enable zsh-mem options
     MULTIBYTE=on: multibyte character support
     PCRE=off: Use Perl Compatible Regular Expressions
     SECURE_FREE=on: Enable zsh-secure-free
     STATIC=off: Build static executable/libraries
===> Use 'make config' to modify these settings
# OVERRIDE_SET=DOCS make showconfig
===> The following configuration options are available for zsh-5.0.0:
     DEBUG=off: Install debug symbols
     DOCS=on: Build and install the documentation
     GDBM=on: Enable GDBM support (GPL)
     MAILDIR=on: Enable support for Maildirs in MAIL(PATH)
     MEM=off: Enable zsh-mem options
     MULTIBYTE=on: multibyte character support
     PCRE=off: Use Perl Compatible Regular Expressions
     SECURE_FREE=on: Enable zsh-secure-free
     STATIC=off: Build static executable/libraries
===> Use 'make config' to modify these settings
# OVERRIDE_SET=DOCS OVERRIDE_UNSET=GDBM make showconfig
===> The following configuration options are available for zsh-5.0.0:
     DEBUG=off: Install debug symbols
     DOCS=on: Build and install the documentation
     GDBM=off: Enable GDBM support (GPL)
     MAILDIR=on: Enable support for Maildirs in MAIL(PATH)
     MEM=off: Enable zsh-mem options
     MULTIBYTE=on: multibyte character support
     PCRE=off: Use Perl Compatible Regular Expressions
     SECURE_FREE=on: Enable zsh-secure-free
     STATIC=off: Build static executable/libraries
===> Use 'make config' to modify these settings
# 


Sorry for having been long on this.

regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20120820/1341398f/attachment.pgp


More information about the freebsd-ports mailing list