Index: en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml =================================================================== --- en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml +++ en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml @@ -3711,6 +3711,7 @@ OPTIONS_DEFAULT= PGSQL LDAP SSL +# Will add USE_PGSQL=yes PGSQL_USE= pgsql=yes # Will add --enable-postgres / --disable-postgres PGSQL_CONFIGURE_ENABLE= postgres @@ -3861,10 +3862,11 @@ pair in OPT_USE the corresponding - USE_KEY - will be set to value. - If value has spaces in it, - replace them with commas, they will be changed back to + USE_KEY will + be set to value when option + OPT is + selected. If value has spaces in + it, replace them with commas, they will be changed back to spaces during processing. For example: OPTIONS_DEFINE= OPT1 @@ -3882,6 +3884,36 @@ .endif + + <varname><replaceable>OPT</replaceable>_USE_OFF</varname> + + For each + key=value + pair in + OPT_USE_OFF + the corresponding + USE_KEY will + be set to value when option + OPT is not + selected. If value has spaces in + it, replace them with commas, they will be changed back to + spaces during processing. For example: + + OPTIONS_DEFINE= OPT1 +OPT1_USE_OFF= mysql=yes xorg=x11,xextproto,xext,xrandr + + is equivalent to: + + OPTIONS_DEFINE= OPT1 + +.include <bsd.port.options.mk> + +.if ! ${PORT_OPTIONS:MOPT1} +USE_MYSQL= yes +USE_XORG= x11 xextproto xext xrandr +.endif + + <varname><replaceable>OPT</replaceable>_CONFIGURE_ENABLE</varname> @@ -3892,12 +3924,17 @@ or --disable-${OPT_CONFIGURE_ENABLE} will be added to CONFIGURE_ARGS depending - on the value of the option - OPT, for - example: + on the status of the option + OPT. An + optional argument can be specified with an + = symbol. This argument is only appended + to the + --enable-opt + configure option. For example: - OPTIONS_DEFINE= OPT1 -OPT1_CONFIGURE_ENABLE= test + OPTIONS_DEFINE= OPT1 OPT2 +OPT1_CONFIGURE_ENABLE= test1 +OPT1_CONFIGURE_ENABLE= test2=exhaustive is equivalent to: @@ -3906,9 +3943,15 @@ .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MOPT1} -CONFIGURE_ARGS+= --enable-test +CONFIGURE_ARGS+= --enable-test1 +.else +CONFIGURE_ARGS+= --disable-test1 +.endif + +.if ${PORT_OPTIONS:MOPT2} +CONFIGURE_ARGS+= --enable-test2=exhaustive .else -CONFIGURE_ARGS+= --disable-test +CONFIGURE_ARGS+= --disable-test2 .endif @@ -3959,10 +4002,9 @@ If OPT_CONFIGURE_ON is set then its value will be appended to - CONFIGURE_ARGS depending on the status of - the option - OPT, for - example: + CONFIGURE_ARGS when option + OPT is + selected, for example: OPTIONS_DEFINE= OPT1 OPT1_CONFIGURE_ON= --add-test @@ -3984,10 +4026,9 @@ If OPT_CONFIGURE_OFF is set then its value will be appended to - CONFIGURE_ARGS depending on the status of - the option - OPT, for - example: + CONFIGURE_ARGS when option + OPT is not + selected, for example: OPTIONS_DEFINE= OPT1 OPT1_CONFIGURE_OFF= --no-test @@ -4009,9 +4050,9 @@ If OPT_CMAKE_ON is set then its value will be appended to - CMAKE_ARGS depending on the status of the - option OPT, - for example: + CMAKE_ARGS when option + OPT is + selected, for example: OPTIONS_DEFINE= OPT1 OPT1_CMAKE_ON= -DTEST:BOOL=true @@ -4033,9 +4074,9 @@ If OPT_CMAKE_OFF is set then its value will be appended to - CMAKE_ARGS depending on the status of the - option OPT, - for example: + CMAKE_ARGS when option + OPT is not + selected, for example: OPTIONS_DEFINE= OPT1 OPT1_CMAKE_OFF= -DTEST:BOOL=false @@ -4051,6 +4092,54 @@ .endif + + <varname><replaceable>OPT</replaceable>_QMAKE_ON</varname> + + If + OPT_QMAKE_ON + is set then its value will be appended to + QMAKE_ARGS when option + OPT is + selected, for example: + + OPTIONS_DEFINE= OPT1 +OPT1_QMAKE_ON= -DTEST:BOOL=true + + is equivalent to: + + OPTIONS_DEFINE= OPT1 + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MOPT1} +QMAKE_ARGS+= -DTEST:BOOL=true +.endif + + + + <varname><replaceable>OPT</replaceable>_QMAKE_OFF</varname> + + If + OPT_QMAKE_OFF + is set then its value will be appended to + QMAKE_ARGS when option + OPT is not + selected, for example: + + OPTIONS_DEFINE= OPT1 +OPT1_QMAKE_OFF= -DTEST:BOOL=false + + is equivalent to: + + OPTIONS_DEFINE= OPT1 + +.include <bsd.port.options.mk> + +.if ! ${PORT_OPTIONS:MOPT1} +QMAKE_ARGS+= -DTEST:BOOL=false +.endif + + Dependencies @@ -4093,9 +4182,9 @@ OPT_ABOVEVARIABLE is defined then its value will be appended to ABOVEVARIABLE - depending on the status of the option - OPT, for - example: + when option + OPT is + selected, for example: OPTIONS_DEFINE= OPT1 OPT1_LIB_DEPENDS= liba.so:${PORTSDIR}/devel/a @@ -4117,9 +4206,9 @@ If OPT_ABOVEVARIABLE_OFF - is set then a dependency of type + is defined then its value will be appended to ABOVEVARIABLE - will be added when option + when option OPT is not selected. For example: @@ -4274,9 +4363,9 @@ OPT_ABOVEVARIABLE is defined then its value will be appended to ABOVEVARIABLE - depending on the status of the option - OPT, for - example: + when option + OPT is + selected, for example: OPTIONS_DEFINE= OPT1 OPT1_USES= gmake @@ -4301,7 +4390,7 @@ OPT_ABOVEVARIABLE_OFF is set then a flag ABOVEVARIABLE - will be automatically set when option + when option OPT is not selected. For example: