Index: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
+++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml
@@ -4111,7 +4111,9 @@
- OPT_USE
+ OPT_USE
+ and
+ OPT_USE_OFF
When option OPT is selected,
for each
@@ -4123,10 +4125,14 @@
USE_KEY. If
value has spaces in it, replace
them with commas and they will be changed back to spaces
- during processing. For example:
+ during processing.
+ OPT_USE_OFF
+ works the same way, but when OPT is
+ not selected. For example:
OPTIONS_DEFINE= OPT1
-OPT1_USE= mysql=yes xorg=x11,xextproto,xext,xrandr
+OPT1_USE= mysql=yes xorg=x11,xextproto,xext,xrandr
+OPT1_USE_OFF= openssl=yes
is equivalent to:
@@ -4137,36 +4143,8 @@
.if ${PORT_OPTIONS:MOPT1}
USE_MYSQL= yes
USE_XORG= x11 xextproto xext xrandr
-.endif
-
-
-
- OPT_USE_OFF
-
- 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
+.else
+USE_OPENSSL= yes
.endif
@@ -4179,7 +4157,8 @@
then
--enable-entry
is appended to CONFIGURE_ARGS. When
- option OPT is not selected,
+ option OPT is
+ not selected,
--disable-entry
is appended to CONFIGURE_ARGS. An
optional argument can be specified with an
@@ -4220,7 +4199,8 @@
then
--with-entry
is appended to CONFIGURE_ARGS. When
- option OPT is not selected,
+ option OPT is
+ not selected,
--without-entry
is appended to CONFIGURE_ARGS. An
optional argument can be specified with an
@@ -4253,16 +4233,22 @@
- OPT_CONFIGURE_ON
+ OPT_CONFIGURE_ON
+ and
+ OPT_CONFIGURE_OFF
When option OPT is selected,
the value of
OPT_CONFIGURE_ON,
if defined, is appended to
- CONFIGURE_ARGS. For example:
+ CONFIGURE_ARGS.
+ OPT_CONFIGURE_OFF
+ works the same way, but when OPT is
+ not selected. For example:
OPTIONS_DEFINE= OPT1
-OPT1_CONFIGURE_ON= --add-test
+OPT1_CONFIGURE_ON= --add-test
+OPT1_CONFIGURE_OFF= --no-test
is equivalent to:
@@ -4272,43 +4258,27 @@
.if ${PORT_OPTIONS:MOPT1}
CONFIGURE_ARGS+= --add-test
-.endif
-
-
-
- OPT_CONFIGURE_OFF
-
- 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
-
- is equivalent to:
-
- OPTIONS_DEFINE= OPT1
-
-.include <bsd.port.options.mk>
-
-.if ! ${PORT_OPTIONS:MOPT1}
+.else
CONFIGURE_ARGS+= --no-test
.endif
- OPT_CMAKE_ON
+ OPT_CMAKE_ON
+ and
+ OPT_CMAKE_OFF
When option OPT is selected,
the value of
OPT_CMAKE_ON,
if defined, is appended to CMAKE_ARGS.
- For example:
+ OPT_CMAKE_OFF
+ works the same way, but when OPT is
+ not selected. For example:
OPTIONS_DEFINE= OPT1
-OPT1_CMAKE_ON= -DTEST:BOOL=true
+OPT1_CMAKE_ON= -DTEST:BOOL=true
+OPT1_CMAKE_OFF= -DOPTIMIZE:BOOL=true
is equivalent to:
@@ -4318,43 +4288,27 @@
.if ${PORT_OPTIONS:MOPT1}
CMAKE_ARGS+= -DTEST:BOOL=true
-.endif
-
-
-
- OPT_CMAKE_OFF
-
- 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
-
- is equivalent to:
-
- OPTIONS_DEFINE= OPT1
-
-.include <bsd.port.options.mk>
-
-.if ! ${PORT_OPTIONS:MOPT1}
-CMAKE_ARGS+= -DTEST:BOOL=false
+.else
+CMAKE_ARGS+= -DOPTIMIZE:BOOL=true
.endif
- OPT_QMAKE_ON
+ OPT_QMAKE_ON
+ and
+ OPT_QMAKE_OFF
When option OPT is selected,
the value of
OPT_QMAKE_ON,
- if defined, is appended to
- QMAKE_ARGS. For example:
+ if defined, is appended to QMAKE_ARGS.
+ OPT_QMAKE_OFF
+ works the same way, but when OPT is
+ not selected. For example:
OPTIONS_DEFINE= OPT1
-OPT1_QMAKE_ON= -DTEST:BOOL=true
+OPT1_QMAKE_ON= -DTEST:BOOL=true
+OPT1_QMAKE_OFF= -DPRODUCTION:BOOL=true
is equivalent to:
@@ -4364,29 +4318,8 @@
.if ${PORT_OPTIONS:MOPT1}
QMAKE_ARGS+= -DTEST:BOOL=true
-.endif
-
-
-
- OPT_QMAKE_OFF
-
- 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
+.else
+QMAKE_ARGS+= -DPRODUCTION:BOOL=true
.endif
@@ -4497,7 +4430,10 @@
- Dependencies
+ Dependencies,
+ OPT_DEPTYPE
+ and
+ OPT_DEPTYPE_OFF
For any of these dependency types:
@@ -4531,20 +4467,19 @@
- The following variables can be used.
-
-
- OPT_ABOVEVARIABLE
-
When option OPT is
selected, the value of
- OPT_ABOVEVARIABLE,
+ OPT_DEPTYPE,
if defined, is appended to
- ABOVEVARIABLE.
- For example:
+ DEPTYPE.
+ OPT_DEPTYPE_OFF
+ works the same, but when OPT is
+ not
+ selected. For example:
OPTIONS_DEFINE= OPT1
-OPT1_LIB_DEPENDS= liba.so:${PORTSDIR}/devel/a
+OPT1_LIB_DEPENDS= liba.so:${PORTSDIR}/devel/a
+OPT1_LIB_DEPENDS_OFF= libb.so:${PORTSDIR}/devel/b
is equivalent to:
@@ -4554,37 +4489,16 @@
.if ${PORT_OPTIONS:MOPT1}
LIB_DEPENDS+= liba.so:${PORTSDIR}/devel/a
+.else
+LIB_DEPENDS+= libb.so:${PORTSDIR}/devel/b
.endif
-
-
-
-
- OPT_ABOVEVARIABLE_OFF
-
- 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
-
- is equivalent to:
-
- OPTIONS_DEFINE= OPT1
-
-.include <bsd.port.options.mk>
-
-. if ! ${PORT_OPTIONS:MOPT1}
-LIB_DEPENDS+= liba.so:${PORTSDIR}/devel/a
-.endif
-
- Generic Variables Replacement
+ Generic Variables Replacement,
+ OPT_VARIABLE
+ and
+ OPT_VARIABLE_OFF
For any of these variables:
@@ -4730,7 +4644,31 @@
- The following variables can be used.
+ When option OPT is
+ selected, the value of
+ OPT_ABOVEVARIABLE,
+ if defined, is appended to
+ ABOVEVARIABLE.
+ OPT_ABOVEVARIABLE_OFF
+ works the same way, but when OPT is
+ not
+ selected. For example:
+
+ OPTIONS_DEFINE= OPT1
+OPT1_USES= gmake
+OPT1_CFLAGS_OFF= -DTEST
+
+ is equivalent to:
+
+ OPTIONS_DEFINE= OPT1
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MOPT1}
+USES+= gmake
+.else
+CFLAGS+= -DTEST
+.endif
Some variables are not in this list, in particular
@@ -4770,59 +4708,13 @@
would have a value of all.
-
- OPT_ABOVEVARIABLE
-
- When option OPT is
- selected, the value of
- OPT_ABOVEVARIABLE,
- if defined, is appended to
- ABOVEVARIABLE.
- For example:
-
- OPTIONS_DEFINE= OPT1
-OPT1_USES= gmake
-OPT1_CFLAGS= -DTEST
-
- is equivalent to:
-
- OPTIONS_DEFINE= OPT1
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MOPT1}
-USES+= gmake
-CFLAGS+= -DTEST
-.endif
-
-
-
- OPT_ABOVEVARIABLE_OFF
-
- 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
-
- is equivalent to:
-
- OPTIONS_DEFINE= OPT1
-
-.include <bsd.port.options.mk>
-
-.if ! ${PORT_OPTIONS:MOPT1}
-USES+= gmake
-.endif
-
-
- Additional Build Targets
+ Additional Build Targets,
+ TARGET-OPT-on
+ and
+ TARGET-OPT-on
These Makefile targets can accept
optional extra build targets:
@@ -4917,49 +4809,21 @@
- The additional build targets are listed below.
-
-
- ABOVETARGET-OPT-on
-
When option OPT is
selected, the target
- ABOVETARGET-OPT-on,
+ TARGET-OPT-on,
if defined, is executed after
- ABOVETARGET.
- For example:
+ TARGET.
+ TARGET-OPT-off
+ works the same way, but when OPT is
+ not selected. For example:
OPTIONS_DEFINE= OPT1
post-patch-OPT1-on:
- @${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile
-
- is equivalent to:
-
- OPTIONS_DEFINE= OPT1
-
-.include <bsd.port.options.mk>
-
-post-patch:
-.if ${PORT_OPTIONS:MOPT1}
@${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile
-.endif
-
-
-
- ABOVETARGET-OPT-off
-
- When option OPT is
- not selected, the target
- ABOVETARGET-OPT-off,
- if defined, is executed after
- ABOVETARGET.
- For example:
-
- OPTIONS_DEFINE= OPT1
-
post-patch-OPT1-off:
- @${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${LOCALBASE}/bin/|' ${WRKSRC}/Makefile
is equivalent to:
@@ -4968,10 +4832,11 @@
.include <bsd.port.options.mk>
post-patch:
-.if !${PORT_OPTIONS:MOPT1}
+.if ${PORT_OPTIONS:MOPT1}
@${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile
+.else
+ @${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${LOCALBASE}/bin/|' ${WRKSRC}/Makefile
.endif
-