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 @@ -3856,16 +3857,17 @@ <varname><replaceable>OPT</replaceable>_USE</varname> - For each + When option OPT is selected, + for each key=value pair in - OPT_USE the + OPT_USE, + value is appended to 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 - spaces during processing. For example: + USE_KEY. If + value has spaces in it, replace + them with commas and they will be changed back to spaces + during processing. For example: OPTIONS_DEFINE= OPT1 OPT1_USE= mysql=yes xorg=x11,xextproto,xext,xrandr @@ -3882,22 +3884,56 @@ .endif + + <varname><replaceable>OPT</replaceable>_USE_OFF</varname> + + When option OPT is + not selected, for each + key=value + pair in + OPT_USE_OFF, + value is appended to the + corresponding + USE_KEY. If + value has spaces in it, replace + them with commas and 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> - If + When option OPT is selected, + for each entry in OPT_CONFIGURE_ENABLE - is set then - --enable-${OPT_CONFIGURE_ENABLE} - or - --disable-${OPT_CONFIGURE_ENABLE} - will be added to CONFIGURE_ARGS depending - on the value of the option - OPT, for - example: + then + --enable-entry + is appended to CONFIGURE_ARGS. When option + OPT is not selected, + --disable-entry + is appended to CONFIGURE_ARGS. An optional + argument can be specified with an = + symbol. This argument is only appended to the + --enable-entry + configure option. For example: - OPTIONS_DEFINE= OPT1 -OPT1_CONFIGURE_ENABLE= test + OPTIONS_DEFINE= OPT1 OPT2 +OPT1_CONFIGURE_ENABLE= test1 test2 +OPT2_CONFIGURE_ENABLE= test2=exhaustive is equivalent to: @@ -3906,33 +3942,38 @@ .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MOPT1} -CONFIGURE_ARGS+= --enable-test +CONFIGURE_ARGS+= --enable-test1 --enable-test2 .else -CONFIGURE_ARGS+= --disable-test +CONFIGURE_ARGS+= --disable-test1 --disable-test2 +.endif + +.if ${PORT_OPTIONS:MOPT2} +CONFIGURE_ARGS+= --enable-test2=exhaustive +.else +CONFIGURE_ARGS+= --disable-test2 .endif <varname><replaceable>OPT</replaceable>_CONFIGURE_WITH</varname> - If - OPT_CONFIGURE_WITH - is set then - --with-${OPT_CONFIGURE_WITH} - or - --without-${OPT_CONFIGURE_WITH} - will be added to CONFIGURE_ARGS depending - on the status of the option - OPT. An - optional argument can be specified with an - = symbol. This argument is only appended - to the - --with-opt + When option OPT is selected, + for each entry in + OPT_CONFIGURE_ENABLE + then + --with-entry + is appended to CONFIGURE_ARGS. When option + OPT is not selected, + --without-entry + is appended to CONFIGURE_ARGS. An optional + argument can be specified with an = + symbol. This argument is only appended to the + --with-entry configure option. For example: OPTIONS_DEFINE= OPT1 OPT2 OPT1_CONFIGURE_WITH= test1 -OPT1_CONFIGURE_WITH= test2=exhaustive +OPT2_CONFIGURE_WITH= test2=exhaustive is equivalent to: @@ -3956,13 +3997,11 @@ <varname><replaceable>OPT</replaceable>_CONFIGURE_ON</varname> - 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: + When option OPT is selected, + the value of + OPT_CONFIGURE_ON, + if defined, is appended to + CONFIGURE_ARGS. For example: OPTIONS_DEFINE= OPT1 OPT1_CONFIGURE_ON= --add-test @@ -3981,13 +4020,11 @@ <varname><replaceable>OPT</replaceable>_CONFIGURE_OFF</varname> - 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: + When option OPT is + not selected, the value of + OPT_CONFIGURE_ON, + if defined, is appended to + CONFIGURE_ARGS. For example: OPTIONS_DEFINE= OPT1 OPT1_CONFIGURE_OFF= --no-test @@ -4006,12 +4043,11 @@ <varname><replaceable>OPT</replaceable>_CMAKE_ON</varname> - 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: + When option OPT is selected, + the value of + OPT_CMAKE_ON, + if defined, is appended to CMAKE_ARGS. + For example: OPTIONS_DEFINE= OPT1 OPT1_CMAKE_ON= -DTEST:BOOL=true @@ -4030,12 +4066,11 @@ <varname><replaceable>OPT</replaceable>_CMAKE_OFF</varname> - 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: + When option OPT is + not selected, the value of + OPT_CMAKE_OFF, + if defined, is appended to CMAKE_ARGS. + For example: OPTIONS_DEFINE= OPT1 OPT1_CMAKE_OFF= -DTEST:BOOL=false @@ -4051,6 +4086,52 @@ .endif + + <varname><replaceable>OPT</replaceable>_QMAKE_ON</varname> + + When option OPT is selected, + the value of + OPT_QMAKE_ON, + if defined, is appended to + QMAKE_ARGS. 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> + + When option OPT is + not selected, the value of + OPT_QMAKE_OFF, + if defined, is appended to + QMAKE_ARGS. 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 @@ -4089,13 +4170,12 @@ <varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname> - If - 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, the value of + OPT_ABOVEVARIABLE, + if defined, is appended to + ABOVEVARIABLE. + For example: OPTIONS_DEFINE= OPT1 OPT1_LIB_DEPENDS= liba.so:${PORTSDIR}/devel/a @@ -4115,13 +4195,12 @@ <varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable>_OFF</varname> - If - OPT_ABOVEVARIABLE_OFF - is set then a dependency of type - ABOVEVARIABLE - will be added when option - OPT is not - selected. For example: + When option OPT + is not selected, the value of + OPT_ABOVEVARIABLE_OFF, + if defined, is appended to + ABOVEVARIABLE. + For example: OPTIONS_DEFINE= OPT1 OPT1_LIB_DEPENDS_OFF= liba.so:${PORTSDIR}/devel/a @@ -4270,13 +4349,12 @@ <varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname> - If - 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, the value of + OPT_ABOVEVARIABLE, + if defined, is appended to + ABOVEVARIABLE. + For example: OPTIONS_DEFINE= OPT1 OPT1_USES= gmake @@ -4297,13 +4375,11 @@ <varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable>_OFF</varname> - If - OPT_ABOVEVARIABLE_OFF - is set then a flag - ABOVEVARIABLE - will be automatically set when option - OPT is not - selected. For example: + When option OPT is not selected, the value of + OPT_ABOVEVARIABLE_OFF, + if defined, is appended to + ABOVEVARIABLE. + For example: OPTIONS_DEFINE= OPT1 OPT1_USES_OFF=gmake