Hi, Here is a couple of new helpers that the new options framework allows.
To simplify some ports here is a couple of helpers I propose to add to the ports
tree:
OPTIONS_SUB= yes
if set, the framework will automatically some new PLIST_SUB:
for example: OPTIONS_DEFINE= OPT1
if OPT1 is set OPT1="" will be added to PLIST_SUB
if OPT1 is unset OPT1="@comment " will be added to the PLIST_SUB
OPT1_CONFIGURE_ENABLE= option
if OPT1 is set --enable-option will be added to CONFIGURE_ARGS
if OPT1 is unset --disable-option will be added to CONFIGURE_ARGS
OPT1_CONFIGURE_ON= --with-bla
OPT1_CONFIGURE_OFF= --no-something
if OPT1 is set --with-bla will be added to CONFIGURE_ARGS
if OPT1 is unset --no-something will be added to CONFIGURE_ARGS
OPT1_CFLAGS
OPT1_LDFLAGS
OPT1_CXXFLAGS
OPT1_MAKE_ENV
OPT1_CONFIGURE_ENV
if OPT1 is set the flags will be appended to the corresponding MACROS.
OPT1_USES= bla
if OP1 is set bla will be added to USES
OPT1_TYPE_DEPENDS= XXX:${PORTSDIR}/cat/port
with TYPE being PKG EXTRACT PATCH FETCH BUILD LIB or RUN
Will add the given dependency to the right place if OPT1 is set
Patch is here:
http://people.freebsd.org/~bapt/optionsng.diff
An example of usage is:
http://people.freebsd.org/~bapt/zsh-new-options.diff
(on top of the zsh Makefile)
Any opinion?
regards,
Bapt
pgp3WOmmazU1r.pgp
Description: PGP signature
