Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F169199451
D19554.id54969.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
D19554.id54969.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
@@ -6389,6 +6389,10 @@
<literal>no</literal>, use <xref
linkend="options-meson_yes"/>.</para>
+ <para>For arguments that take <literal>enabled</literal>
+ or <literal>disabled</literal>, see <xref
+ linkend="options-meson_enabled"/>.</para>
+
<para>For all other cases, use <xref
linkend="options-meson_on"/>.</para>
</listitem>
@@ -6711,7 +6715,7 @@
<literal>-D<replaceable>entry</replaceable>:BOOL=false</literal>
is appended to <varname>CONFIGURE_ARGS</varname>.
<varname><replaceable>OPT</replaceable>_CMAKE_BOOL_OFF</varname>
- is the oposite,
+ is the opposite,
<literal>-D<replaceable>entry</replaceable>:BOOL=false</literal>
is appended to <varname>CMAKE_ARGS</varname> when the
option is selected, and
@@ -6782,15 +6786,15 @@
<varname><replaceable>OPT</replaceable>_MESON_TRUE</varname>
then
<literal>-D<replaceable>entry</replaceable>=true</literal>
- is appended to <varname>CMAKE_ARGS</varname>. When option
+ is appended to <varname>MESON_ARGS</varname>. When option
<replaceable>OPT</replaceable> is <emphasis>not</emphasis>
selected,
<literal>-D<replaceable>entry</replaceable>=false</literal>
- is appended to <varname>CONFIGURE_ARGS</varname>.
+ is appended to <varname>MESON_ARGS</varname>.
<varname><replaceable>OPT</replaceable>_MESON_FALSE</varname>
- is the oposite,
+ is the opposite,
<literal>-D<replaceable>entry</replaceable>=false</literal>
- is appended to <varname>CMAKE_ARGS</varname> when the
+ is appended to <varname>MESON_ARGS</varname> when the
option is selected, and
<literal>-D<replaceable>entry</replaceable>=true</literal>
when the option is <emphasis>not</emphasis> selected. For
@@ -6825,15 +6829,15 @@
<varname><replaceable>OPT</replaceable>_MESON_YES</varname>
then
<literal>-D<replaceable>entry</replaceable>=yes</literal>
- is appended to <varname>CMAKE_ARGS</varname>. When option
+ is appended to <varname>MESON_ARGS</varname>. When option
<replaceable>OPT</replaceable> is <emphasis>not</emphasis>
selected,
<literal>-D<replaceable>entry</replaceable>=no</literal>
- is appended to <varname>CONFIGURE_ARGS</varname>.
+ is appended to <varname>MESON_ARGS</varname>.
<varname><replaceable>OPT</replaceable>_MESON_NO</varname>
- is the oposite,
+ is the opposite,
<literal>-D<replaceable>entry</replaceable>=no</literal>
- is appended to <varname>CMAKE_ARGS</varname> when the
+ is appended to <varname>MESON_ARGS</varname> when the
option is selected, and
<literal>-D<replaceable>entry</replaceable>=yes</literal>
when the option is <emphasis>not</emphasis> selected. For
@@ -6850,11 +6854,52 @@
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MOPT1}
-CMAKE_ARGS+= -Dtest=yes -Ddebug=yes \
+MESON_ARGS+= -Dtest=yes -Ddebug=yes \
-Doptimize=no
.else
-CMAKE_ARGS+= -Dtest=no -Ddebug=no \
+MESON_ARGS+= -Dtest=no -Ddebug=no \
-Doptimize=yes
+.endif</programlisting>
+ </sect4>
+
+ <sect4 xml:id="options-meson_enabled">
+ <title><varname><replaceable>OPT</replaceable>_MESON_ENABLED</varname>
+ and
+ <varname><replaceable>OPT</replaceable>_MESON_DISABLED</varname></title>
+
+ <para>When option <replaceable>OPT</replaceable> is
+ selected, for each <replaceable>entry</replaceable> in
+ <varname><replaceable>OPT</replaceable>_MESON_ENABLED</varname>
+ then
+ <literal>-D<replaceable>entry</replaceable>=enabled</literal>
+ is appended to <varname>MESON_ARGS</varname>. When option
+ <replaceable>OPT</replaceable> is <emphasis>not</emphasis>
+ selected,
+ <literal>-D<replaceable>entry</replaceable>=disabled</literal>
+ is appended to <varname>MESON_ARGS</varname>.
+ <varname><replaceable>OPT</replaceable>_MESON_DISABLED</varname>
+ is the opposite,
+ <literal>-D<replaceable>entry</replaceable>=disabled</literal>
+ is appended to <varname>MESON_ARGS</varname> when the
+ option is selected, and
+ <literal>-D<replaceable>entry</replaceable>=enabled</literal>
+ when the option is <emphasis>not</emphasis> selected. For
+ example:</para>
+
+ <programlisting>OPTIONS_DEFINE= OPT1
+OPT1_MESON_ENABLED= test
+OPT1_MESON_DISABLED= debug</programlisting>
+
+ <para>is equivalent to:</para>
+
+ <programlisting>OPTIONS_DEFINE= OPT1
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MOPT1}
+MESON_ARGS+= -Dtest=enabled -Ddebug=disabled
+.else
+MESON_ARGS+= -Dtest=disabled -Ddebug=enabled
.endif</programlisting>
</sect4>
</sect3>
Index: head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
+++ head/en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
@@ -1164,6 +1164,53 @@
</note>
</example>
</sect2>
+
+ <sect2 xml:id="using-meson">
+ <title>Using <command>meson</command></title>
+
+ <para>For ports that use <application>Meson</application>,
+ define <literal>USES=meson</literal>.</para>
+
+ <table frame="none" xml:id="using-meson-variables">
+ <title>Variables for Ports That Use
+ <command>meson</command></title>
+
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Variable</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><varname>MESON_ARGS</varname></entry>
+ <entry>Port specific <application>Meson</application>
+ flags to be passed to the <command>meson</command>
+ binary.</entry>
+ </row>
+
+ <row>
+ <entry><varname>MESON_BUILD_DIR</varname></entry>
+ <entry>Path to the build directory relative to
+ <varname>WRKSRC</varname>. Default is
+ <literal>_build</literal>.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <example xml:id="using-meson-example">
+ <title><literal>USES=meson</literal> Example</title>
+
+ <para>This snippet demonstrates the use of
+ <application>Meson</application> for a port.</para>
+
+ <programlisting>USES= meson
+MESON_ARGS= -Dfoo=enabled</programlisting>
+ </example>
+ </sect2>
</sect1>
<sect1 xml:id="using-autotools">
Index: head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
+++ head/en_US.ISO8859-1/books/porters-handbook/uses/chapter.xml
@@ -1965,7 +1965,8 @@
<para>Possible arguments: (none)</para>
- <para>Provide support for Meson based projects.</para>
+ <para>Provide support for Meson based projects. For more
+ information see <xref linkend="using-meson" />.</para>
</sect1>
<sect1 xml:id="uses-metaport">
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Sep 1, 7:26 PM (4 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37821331
Default Alt Text
D19554.id54969.diff (7 KB)
Attached To
Mode
D19554: Porter's Handbook: Add Meson section, fix examples, document new opt_MESON_{DIS,EN}ABLED helpers
Attached
Detach File
Event Timeline
Log In to Comment