Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F135487483
D3516.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
16 KB
Referenced Files
None
Subscribers
None
D3516.id.diff
View Options
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 @@
</sect3>
<sect3 xml:id="options-use">
- <title><varname><replaceable>OPT</replaceable>_USE</varname></title>
+ <title><varname><replaceable>OPT</replaceable>_USE</varname>
+ and
+ <varname><replaceable>OPT</replaceable>_USE_OFF</varname></title>
<para>When option <replaceable>OPT</replaceable> is selected,
for each
@@ -4123,10 +4125,14 @@
<varname>USE_<replaceable>KEY</replaceable></varname>. If
<replaceable>value</replaceable> has spaces in it, replace
them with commas and they will be changed back to spaces
- during processing. For example:</para>
+ during processing.
+ <varname><replaceable>OPT</replaceable>_USE_OFF</varname>
+ works the same way, but when <literal>OPT</literal> is
+ <emphasis>not</emphasis> selected. For example:</para>
<programlisting>OPTIONS_DEFINE= OPT1
-OPT1_USE= mysql=yes xorg=x11,xextproto,xext,xrandr</programlisting>
+OPT1_USE= mysql=yes xorg=x11,xextproto,xext,xrandr
+OPT1_USE_OFF= openssl=yes</programlisting>
<para>is equivalent to:</para>
@@ -4137,36 +4143,8 @@
.if ${PORT_OPTIONS:MOPT1}
USE_MYSQL= yes
USE_XORG= x11 xextproto xext xrandr
-.endif</programlisting>
- </sect3>
-
- <sect3 xml:id="options-use-off">
- <title><varname><replaceable>OPT</replaceable>_USE_OFF</varname></title>
-
- <para>When option <replaceable>OPT</replaceable> <emphasis>is
- not</emphasis> selected, for each
- <literal><replaceable>key</replaceable>=<replaceable>value</replaceable></literal>
- pair in
- <varname><replaceable>OPT</replaceable>_USE_OFF</varname>,
- <replaceable>value</replaceable> is appended to the
- corresponding
- <varname>USE_<replaceable>KEY</replaceable></varname>. If
- <replaceable>value</replaceable> has spaces in it, replace
- them with commas and they will be changed back to spaces
- during processing. For example:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-OPT1_USE_OFF= mysql=yes xorg=x11,xextproto,xext,xrandr</programlisting>
-
- <para>is equivalent to:</para>
-
- <programlisting>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</programlisting>
</sect3>
@@ -4179,7 +4157,8 @@
then
<literal>--enable-<replaceable>entry</replaceable></literal>
is appended to <varname>CONFIGURE_ARGS</varname>. When
- option <replaceable>OPT</replaceable> is not selected,
+ option <replaceable>OPT</replaceable> is
+ <emphasis>not</emphasis> selected,
<literal>--disable-<replaceable>entry</replaceable></literal>
is appended to <varname>CONFIGURE_ARGS</varname>. An
optional argument can be specified with an
@@ -4220,7 +4199,8 @@
then
<literal>--with-<replaceable>entry</replaceable></literal>
is appended to <varname>CONFIGURE_ARGS</varname>. When
- option <replaceable>OPT</replaceable> is not selected,
+ option <replaceable>OPT</replaceable> is
+ <emphasis>not</emphasis> selected,
<literal>--without-<replaceable>entry</replaceable></literal>
is appended to <varname>CONFIGURE_ARGS</varname>. An
optional argument can be specified with an
@@ -4253,16 +4233,22 @@
</sect3>
<sect3 xml:id="options-configure_on">
- <title><varname><replaceable>OPT</replaceable>_CONFIGURE_ON</varname></title>
+ <title><varname><replaceable>OPT</replaceable>_CONFIGURE_ON</varname>
+ and
+ <varname><replaceable>OPT</replaceable>_CONFIGURE_OFF</varname></title>
<para>When option <replaceable>OPT</replaceable> is selected,
the value of
<varname><replaceable>OPT</replaceable>_CONFIGURE_ON</varname>,
if defined, is appended to
- <varname>CONFIGURE_ARGS</varname>. For example:</para>
+ <varname>CONFIGURE_ARGS</varname>.
+ <varname><replaceable>OPT</replaceable>_CONFIGURE_OFF</varname>
+ works the same way, but when <literal>OPT</literal> is
+ <emphasis>not</emphasis> selected. For example:</para>
<programlisting>OPTIONS_DEFINE= OPT1
-OPT1_CONFIGURE_ON= --add-test</programlisting>
+OPT1_CONFIGURE_ON= --add-test
+OPT1_CONFIGURE_OFF= --no-test</programlisting>
<para>is equivalent to:</para>
@@ -4272,43 +4258,27 @@
.if ${PORT_OPTIONS:MOPT1}
CONFIGURE_ARGS+= --add-test
-.endif</programlisting>
- </sect3>
-
- <sect3 xml:id="options-configure_off">
- <title><varname><replaceable>OPT</replaceable>_CONFIGURE_OFF</varname></title>
-
- <para>When option <replaceable>OPT</replaceable> <emphasis>is
- not</emphasis> selected, the value of
- <varname><replaceable>OPT</replaceable>_CONFIGURE_ON</varname>,
- if defined, is appended to
- <varname>CONFIGURE_ARGS</varname>. For example:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-OPT1_CONFIGURE_OFF= --no-test</programlisting>
-
- <para>is equivalent to:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-
-.include <bsd.port.options.mk>
-
-.if ! ${PORT_OPTIONS:MOPT1}
+.else
CONFIGURE_ARGS+= --no-test
.endif</programlisting>
</sect3>
<sect3 xml:id="options-cmake_on">
- <title><varname><replaceable>OPT</replaceable>_CMAKE_ON</varname></title>
+ <title><varname><replaceable>OPT</replaceable>_CMAKE_ON</varname>
+ and
+ <varname><replaceable>OPT</replaceable>_CMAKE_OFF</varname></title>
<para>When option <replaceable>OPT</replaceable> is selected,
the value of
<varname><replaceable>OPT</replaceable>_CMAKE_ON</varname>,
if defined, is appended to <varname>CMAKE_ARGS</varname>.
- For example:</para>
+ <varname><replaceable>OPT</replaceable>_CMAKE_OFF</varname>
+ works the same way, but when <literal>OPT</literal> is
+ <emphasis>not</emphasis> selected. For example:</para>
<programlisting>OPTIONS_DEFINE= OPT1
-OPT1_CMAKE_ON= -DTEST:BOOL=true</programlisting>
+OPT1_CMAKE_ON= -DTEST:BOOL=true
+OPT1_CMAKE_OFF= -DOPTIMIZE:BOOL=true</programlisting>
<para>is equivalent to:</para>
@@ -4318,43 +4288,27 @@
.if ${PORT_OPTIONS:MOPT1}
CMAKE_ARGS+= -DTEST:BOOL=true
-.endif</programlisting>
- </sect3>
-
- <sect3 xml:id="options-cmake_off">
- <title><varname><replaceable>OPT</replaceable>_CMAKE_OFF</varname></title>
-
- <para>When option <replaceable>OPT</replaceable> <emphasis>is
- not</emphasis> selected, the value of
- <varname><replaceable>OPT</replaceable>_CMAKE_OFF</varname>,
- if defined, is appended to <varname>CMAKE_ARGS</varname>.
- For example:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-OPT1_CMAKE_OFF= -DTEST:BOOL=false</programlisting>
-
- <para>is equivalent to:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-
-.include <bsd.port.options.mk>
-
-.if ! ${PORT_OPTIONS:MOPT1}
-CMAKE_ARGS+= -DTEST:BOOL=false
+.else
+CMAKE_ARGS+= -DOPTIMIZE:BOOL=true
.endif</programlisting>
</sect3>
<sect3 xml:id="options-qmake_on">
- <title><varname><replaceable>OPT</replaceable>_QMAKE_ON</varname></title>
+ <title><varname><replaceable>OPT</replaceable>_QMAKE_ON</varname>
+ and
+ <varname><replaceable>OPT</replaceable>_QMAKE_OFF</varname></title>
<para>When option <replaceable>OPT</replaceable> is selected,
the value of
<varname><replaceable>OPT</replaceable>_QMAKE_ON</varname>,
- if defined, is appended to
- <varname>QMAKE_ARGS</varname>. For example:</para>
+ if defined, is appended to <varname>QMAKE_ARGS</varname>.
+ <varname><replaceable>OPT</replaceable>_QMAKE_OFF</varname>
+ works the same way, but when <literal>OPT</literal> is
+ <emphasis>not</emphasis> selected. For example:</para>
<programlisting>OPTIONS_DEFINE= OPT1
-OPT1_QMAKE_ON= -DTEST:BOOL=true</programlisting>
+OPT1_QMAKE_ON= -DTEST:BOOL=true
+OPT1_QMAKE_OFF= -DPRODUCTION:BOOL=true</programlisting>
<para>is equivalent to:</para>
@@ -4364,29 +4318,8 @@
.if ${PORT_OPTIONS:MOPT1}
QMAKE_ARGS+= -DTEST:BOOL=true
-.endif</programlisting>
- </sect3>
-
- <sect3 xml:id="options-qmake_off">
- <title><varname><replaceable>OPT</replaceable>_QMAKE_OFF</varname></title>
-
- <para>When option <replaceable>OPT</replaceable> <emphasis>is
- not</emphasis> selected, the value of
- <varname><replaceable>OPT</replaceable>_QMAKE_OFF</varname>,
- if defined, is appended to
- <varname>QMAKE_ARGS</varname>. For example:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-OPT1_QMAKE_OFF= -DTEST:BOOL=false</programlisting>
-
- <para>is equivalent to:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-
-.include <bsd.port.options.mk>
-
-.if ! ${PORT_OPTIONS:MOPT1}
-QMAKE_ARGS+= -DTEST:BOOL=false
+.else
+QMAKE_ARGS+= -DPRODUCTION:BOOL=true
.endif</programlisting>
</sect3>
@@ -4497,7 +4430,10 @@
</sect3>
<sect3 xml:id="options-dependencies">
- <title>Dependencies</title>
+ <title>Dependencies,
+ <varname><replaceable>OPT</replaceable>_<replaceable>DEPTYPE</replaceable></varname>
+ and
+ <varname><replaceable>OPT</replaceable>_<replaceable>DEPTYPE</replaceable>_OFF</varname></title>
<para>For any of these dependency types:</para>
@@ -4531,20 +4467,19 @@
</listitem>
</itemizedlist>
- <para>The following variables can be used.</para>
-
- <sect4>
- <title><varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname></title>
-
<para>When option <replaceable>OPT</replaceable> is
selected, the value of
- <varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname>,
+ <varname><replaceable>OPT</replaceable>_<replaceable>DEPTYPE</replaceable></varname>,
if defined, is appended to
- <literal><replaceable>ABOVEVARIABLE</replaceable></literal>.
- For example:</para>
+ <literal><replaceable>DEPTYPE</replaceable></literal>.
+ <varname><replaceable>OPT</replaceable>_<replaceable>DEPTYPE</replaceable>_OFF</varname>
+ works the same, but when <literal>OPT</literal> is
+ <emphasis>not</emphasis>
+ selected. For example:</para>
<programlisting>OPTIONS_DEFINE= OPT1
-OPT1_LIB_DEPENDS= liba.so:${PORTSDIR}/devel/a</programlisting>
+OPT1_LIB_DEPENDS= liba.so:${PORTSDIR}/devel/a
+OPT1_LIB_DEPENDS_OFF= libb.so:${PORTSDIR}/devel/b</programlisting>
<para>is equivalent to:</para>
@@ -4554,37 +4489,16 @@
.if ${PORT_OPTIONS:MOPT1}
LIB_DEPENDS+= liba.so:${PORTSDIR}/devel/a
+.else
+LIB_DEPENDS+= libb.so:${PORTSDIR}/devel/b
.endif</programlisting>
-
- </sect4>
-
- <sect4>
- <title><varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable>_OFF</varname></title>
-
- <para>When option <replaceable>OPT</replaceable>
- <emphasis>is not</emphasis> selected, the value of
- <varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable>_OFF</varname>,
- if defined, is appended to
- <literal><replaceable>ABOVEVARIABLE</replaceable></literal>.
- For example:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-OPT1_LIB_DEPENDS_OFF= liba.so:${PORTSDIR}/devel/a</programlisting>
-
- <para>is equivalent to:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-
-.include <bsd.port.options.mk>
-
-. if ! ${PORT_OPTIONS:MOPT1}
-LIB_DEPENDS+= liba.so:${PORTSDIR}/devel/a
-.endif</programlisting>
- </sect4>
</sect3>
<sect3 xml:id="options-variables">
- <title>Generic Variables Replacement</title>
+ <title>Generic Variables Replacement,
+ <varname><replaceable>OPT</replaceable>_<replaceable>VARIABLE</replaceable></varname>
+ and
+ <varname><replaceable>OPT</replaceable>_<replaceable>VARIABLE</replaceable>_OFF</varname></title>
<para>For any of these variables:</para>
@@ -4730,7 +4644,31 @@
</listitem>
</itemizedlist>
- <para>The following variables can be used.</para>
+ <para>When option <replaceable>OPT</replaceable> is
+ selected, the value of
+ <varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname>,
+ if defined, is appended to
+ <literal><replaceable>ABOVEVARIABLE</replaceable></literal>.
+ <varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable>_OFF</varname>
+ works the same way, but when <literal>OPT</literal> is
+ <emphasis>not</emphasis>
+ selected. For example:</para>
+
+ <programlisting>OPTIONS_DEFINE= OPT1
+OPT1_USES= gmake
+OPT1_CFLAGS_OFF= -DTEST</programlisting>
+
+ <para>is equivalent to:</para>
+
+ <programlisting>OPTIONS_DEFINE= OPT1
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MOPT1}
+USES+= gmake
+.else
+CFLAGS+= -DTEST
+.endif</programlisting>
<note>
<para>Some variables are not in this list, in particular
@@ -4770,59 +4708,13 @@
would have a value of <literal>all</literal>.</para>
</warning>
- <sect4>
- <title><varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname></title>
-
- <para>When option <replaceable>OPT</replaceable> is
- selected, the value of
- <varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable></varname>,
- if defined, is appended to
- <literal><replaceable>ABOVEVARIABLE</replaceable></literal>.
- For example:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-OPT1_USES= gmake
-OPT1_CFLAGS= -DTEST</programlisting>
-
- <para>is equivalent to:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MOPT1}
-USES+= gmake
-CFLAGS+= -DTEST
-.endif</programlisting>
- </sect4>
-
- <sect4>
- <title><varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable>_OFF</varname></title>
-
- <para>When option OPT is not selected, the value of
- <varname><replaceable>OPT</replaceable>_<replaceable>ABOVEVARIABLE</replaceable>_OFF</varname>,
- if defined, is appended to
- <literal><replaceable>ABOVEVARIABLE</replaceable></literal>.
- For example:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-OPT1_USES_OFF= gmake</programlisting>
-
- <para>is equivalent to:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-
-.include <bsd.port.options.mk>
-
-.if ! ${PORT_OPTIONS:MOPT1}
-USES+= gmake
-.endif</programlisting>
-
- </sect4>
</sect3>
<sect3 xml:id="options-targets">
- <title>Additional Build Targets</title>
+ <title>Additional Build Targets,
+ <buildtarget><replaceable>TARGET</replaceable>-<replaceable>OPT</replaceable>-on</buildtarget>
+ and
+ <buildtarget><replaceable>TARGET</replaceable>-<replaceable>OPT</replaceable>-on</buildtarget></title>
<para>These <filename>Makefile</filename> targets can accept
optional extra build targets:</para>
@@ -4917,49 +4809,21 @@
</listitem>
</itemizedlist>
- <para>The additional build targets are listed below.</para>
-
- <sect4 xml:id="options-targets-on">
- <title><buildtarget><replaceable>ABOVETARGET</replaceable>-<replaceable>OPT</replaceable>-on</buildtarget></title>
-
<para>When option <replaceable>OPT</replaceable> is
selected, the target
- <buildtarget><replaceable>ABOVETARGET</replaceable>-<replaceable>OPT</replaceable>-on</buildtarget>,
+ <buildtarget><replaceable>TARGET</replaceable>-<replaceable>OPT</replaceable>-on</buildtarget>,
if defined, is executed after
- <buildtarget><replaceable>ABOVETARGET</replaceable></buildtarget>.
- For example:</para>
+ <buildtarget><replaceable>TARGET</replaceable></buildtarget>.
+ <buildtarget><replaceable>TARGET</replaceable>-<replaceable>OPT</replaceable>-off</buildtarget>
+ works the same way, but when <literal>OPT</literal> is
+ <emphasis>not</emphasis> selected. For example:</para>
<programlisting>OPTIONS_DEFINE= OPT1
post-patch-OPT1-on:
- @${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile</programlisting>
-
- <para>is equivalent to:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-
-.include <bsd.port.options.mk>
-
-post-patch:
-.if ${PORT_OPTIONS:MOPT1}
@${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile
-.endif</programlisting>
- </sect4>
-
- <sect4 xml:id="options-targets-off">
- <title><buildtarget><replaceable>ABOVETARGET</replaceable>-<replaceable>OPT</replaceable>-off</buildtarget></title>
-
- <para>When option <replaceable>OPT</replaceable> is
- not selected, the target
- <buildtarget><replaceable>ABOVETARGET</replaceable>-<replaceable>OPT</replaceable>-off</buildtarget>,
- if defined, is executed after
- <buildtarget><replaceable>ABOVETARGET</replaceable></buildtarget>.
- For example:</para>
-
- <programlisting>OPTIONS_DEFINE= OPT1
-
post-patch-OPT1-off:
- @${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile</programlisting>
+ @${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${LOCALBASE}/bin/|' ${WRKSRC}/Makefile</programlisting>
<para>is equivalent to:</para>
@@ -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</programlisting>
- </sect4>
</sect3>
</sect2>
</sect1>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 11, 6:25 AM (5 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25120717
Default Alt Text
D3516.id.diff (16 KB)
Attached To
Mode
D3516: Add documentation about opt_VARS from D3410.
Attached
Detach File
Event Timeline
Log In to Comment