Split up the Options Helpers section into subsections.
Sponsored by: Absolight
This commit is contained in:
parent
85ecdde282
commit
4e4c00d703
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44089
1 changed files with 54 additions and 0 deletions
|
@ -3630,6 +3630,9 @@ CONFIGURE_ARGS+= --disable-foo
|
|||
<para>There are some macros to help simplify conditional values
|
||||
which differ based on the options set.</para>
|
||||
|
||||
<sect3>
|
||||
<title>OPTIONS_SUB</title>
|
||||
|
||||
<para>If <varname>OPTIONS_SUB</varname> is set to
|
||||
<literal>yes</literal> then each of the options added to
|
||||
<varname>OPTIONS_DEFINE</varname> will be added to
|
||||
|
@ -3649,6 +3652,10 @@ PLIST_SUB+= OPT1="" NO_OPT1="@comment "
|
|||
.else
|
||||
PLIST_SUB+= OPT1="@comment " NO_OPT1=""
|
||||
.endif</programlisting>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>X_CONFIGURE_ENABLE</title>
|
||||
|
||||
<para>If <varname>X_CONFIGURE_ENABLE</varname> is set then
|
||||
<literal>--enable-${X_CONFIGURE_ENABLE}</literal> or
|
||||
|
@ -3670,6 +3677,10 @@ CONFIGURE_ARGS+= --enable-test
|
|||
.else
|
||||
CONFIGURE_ARGS+= --disable-test
|
||||
.endif</programlisting>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>X_CONFIGURE_WITH</title>
|
||||
|
||||
<para>If <varname>X_CONFIGURE_WITH</varname> is set then
|
||||
<literal>--with-${X_CONFIGURE_WITH}</literal> or
|
||||
|
@ -3691,6 +3702,10 @@ CONFIGURE_ARGS+= --with-test
|
|||
.else
|
||||
CONFIGURE_ARGS+= --without-test
|
||||
.endif</programlisting>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>X_CONFIGURE_ON</title>
|
||||
|
||||
<para>If <varname>X_CONFIGURE_ON</varname> is set then its
|
||||
value will be appended to <varname>CONFIGURE_ARGS</varname>
|
||||
|
@ -3709,6 +3724,10 @@ OPT1_CONFIGURE_ON= --add-test</programlisting>
|
|||
.if ${PORT_OPTIONS:MOPT1}
|
||||
CONFIGURE_ARGS+= --add-test
|
||||
.endif</programlisting>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>X_CONFIGURE_OFF</title>
|
||||
|
||||
<para>If <varname>X_CONFIGURE_OFF</varname> is set then its
|
||||
value will be appended to <varname>CONFIGURE_ARGS</varname>
|
||||
|
@ -3727,6 +3746,10 @@ OPT1_CONFIGURE_OFF= --no-test</programlisting>
|
|||
.if ! ${PORT_OPTIONS:MOPT1}
|
||||
CONFIGURE_ARGS+= --no-test
|
||||
.endif</programlisting>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>X_CMAKE_ON</title>
|
||||
|
||||
<para>If <varname>X_CMAKE_ON</varname> is set then its value
|
||||
will be appended to <varname>CMAKE_ARGS</varname> depending on
|
||||
|
@ -3745,6 +3768,10 @@ OPT1_CMAKE_ON= -DTEST:BOOL=true</programlisting>
|
|||
.if ${PORT_OPTIONS:MOPT1}
|
||||
CMAKE_ARGS+= -DTEST:BOOL=true
|
||||
.endif</programlisting>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>X_CMAKE_OFF</title>
|
||||
|
||||
<para>If <varname>X_CMAKE_OFF</varname> is set then its value
|
||||
will be appended to <varname>CMAKE_ARGS</varname> depending on
|
||||
|
@ -3763,6 +3790,10 @@ OPT1_CMAKE_OFF= -DTEST:BOOL=false</programlisting>
|
|||
.if ! ${PORT_OPTIONS:MOPT1}
|
||||
CMAKE_ARGS+= -DTEST:BOOL=false
|
||||
.endif</programlisting>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>Generic Variables Replacement</title>
|
||||
|
||||
<para>For any of the following variables:</para>
|
||||
|
||||
|
@ -3840,6 +3871,9 @@ CMAKE_ARGS+= -DTEST:BOOL=false
|
|||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<sect4>
|
||||
<title>X_ABOVEVARIABLE</title>
|
||||
|
||||
<para>If <varname>X_ABOVEVARIABLE</varname> is defined then
|
||||
its value will be appended to
|
||||
<varname>ABOVEVARIABLE</varname> depending on the status of
|
||||
|
@ -3859,6 +3893,10 @@ OPT1_CFLAGS= -DTEST</programlisting>
|
|||
USES+= gmake
|
||||
CFLAGS+= -DTEST
|
||||
.endif</programlisting>
|
||||
</sect4>
|
||||
|
||||
<sect4>
|
||||
<title>X_ABOVEVARIABLE_OFF</title>
|
||||
|
||||
<para>If <varname>X_ABOVEVARIABLE_OFF</varname> is set then a
|
||||
flag <literal>ABOVEVARIABLE</literal> will be automatically
|
||||
|
@ -3878,6 +3916,12 @@ OPT1_USES_OFF=gmake</programlisting>
|
|||
USES+= gmake
|
||||
.endif</programlisting>
|
||||
|
||||
</sect4>
|
||||
</sect3>
|
||||
|
||||
<sect3>
|
||||
<title>Dependencies</title>
|
||||
|
||||
<para>For any of the following dependency type:</para>
|
||||
|
||||
<itemizedlist>
|
||||
|
@ -3910,6 +3954,9 @@ USES+= gmake
|
|||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<sect4>
|
||||
<title>X_ABOVEVARIABLE</title>
|
||||
|
||||
<para>If <varname>X_ABOVEVARIABLE</varname> is defined then
|
||||
its value will be appended to
|
||||
<varname>ABOVEVARIABLE</varname> depending on the status
|
||||
|
@ -3928,6 +3975,11 @@ OPT1_LIB_DEPENDS= liba.so:${PORTSDIR}/devel/a</programlisting>
|
|||
LIB_DEPENDS+= liba.so:${PORTSDIR}/devel/a
|
||||
.endif</programlisting>
|
||||
|
||||
</sect4>
|
||||
|
||||
<sect4>
|
||||
<title>X_ABOVEVARIABLE_OFF</title>
|
||||
|
||||
<para>If <varname>X_ABOVEVARIABLE_OFF</varname> is set then a
|
||||
dependency of type <literal>ABOVEVARIABLE</literal> will be
|
||||
added when option <literal>X</literal> is not selected. For
|
||||
|
@ -3945,6 +3997,8 @@ OPT1_LIB_DEPENDS_OFF= liba.so:${PORTSDIR}/devel/a</programlisting>
|
|||
. if ! ${PORT_OPTIONS:MOPT1}
|
||||
LIB_DEPENDS+= liba.so:${PORTSDIR}/devel/a
|
||||
.endif</programlisting>
|
||||
</sect4>
|
||||
</sect3>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
|
|
Loading…
Reference in a new issue