<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../general.ent">
  %general-entities;
]>

<sect1 id="ch-system-meson" role="wrap">
  <?dbhtml filename="meson.html"?>

  <sect1info condition="script">
    <productname>meson</productname>
    <productnumber>&meson-version;</productnumber>
    <address>&meson-url;</address>
  </sect1info>

  <title>Meson-&meson-version;</title>

  <indexterm zone="ch-system-meson">
    <primary sortas="a-Meson">Meson</primary>
  </indexterm>

  <sect2 role="package">
    <title/>

    <para>Meson 是一个开放源代码构建系统，它的设计保证了非常快的执行速度，
    同时更注重用户友好性。</para>

    <segmentedlist>
      <segtitle>&buildtime;</segtitle>
      <segtitle>&diskspace;</segtitle>
      <seglistitem>
        <seg>&meson-ch6-sbu;</seg>
        <seg>&meson-ch6-du;</seg>
      </seglistitem>
    </segmentedlist>

  </sect2>

  <sect2 role="installation">
    <title>安装 Meson</title>

    <para>应用一个来自上游的修补：</para>

<screen><userinput remap="pre">sed -i '309 s/os.getcwd/-C, &amp;/' mesonbuild/minstall.py</userinput></screen>

    <para>执行以下命令编译 Meson：</para>

<screen><userinput remap="make">python3 setup.py build</userinput></screen>

    <para>该软件包不包含测试套件。</para>

    <para>安装该软件包：</para>

<screen><userinput remap="install">python3 setup.py install --root=dest
cp -rv dest/* /</userinput></screen>
<!--
    <para>At last, move Meson man pages to correct location:</para>

<screen><userinput remap="install">mv -v /usr/lib/python&python-minor;/site-packages/meson-&meson-version;-py&python-minor;.egg/share/man/man1/*.1 \
      /usr/share/man/man1
rm -r /usr/lib/python&python-minor;/site-packages/meson-&meson-version;-py&python-minor;.egg/share</userinput></screen>
-->

    <variablelist>
      <title>安装选项的含义：</title>
      
      <varlistentry>
        <term><parameter>--root=dest</parameter></term>
        <listitem>
          <para>默认情况下 <command>python3 setup.py install</command>
          将若干文件（如 man 页面）安装到 Python Eggs 中。
          在指定了根目录位置时，<command>setup.py</command>
		  将这些文件安装到符合标准的目录树中。
		  我们即可直接复制该目录树，使得这些文件位于标准指定的位置。
          </para>
        </listitem>
      </varlistentry>

    </variablelist>
  </sect2>

  <sect2 id="contents-meson" role="content">
    <title>Meson 的内容</title>

    <segmentedlist>
      <segtitle>安装的程序</segtitle>
      <segtitle>安装的目录</segtitle>

      <seglistitem>
        <seg>meson, mesonconf, mesonintrospect, mesontest, 以及 wraptool</seg>
		<seg>/usr/lib/python&python-minor;/site-packages/meson-&meson-version;-py&python-minor;.egg</seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">简要描述</bridgehead>
      <?dbfo list-presentation="list"?>
      <?dbhtml list-presentation="table"?>

      <varlistentry id="meson">
		<term><command>meson</command></term>
        <listitem>
          <para>一个高产出的构建系统</para>
          <indexterm zone="ch-system-meson meson">
            <primary sortas="b-meson">meson</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mesonconf">
		<term><command>mesonconf</command></term>
        <listitem>
          <para>一个配置 Meson 构建的工具</para>
          <indexterm zone="ch-system-meson mesonconf">
            <primary sortas="b-mesonconf">mesonconf</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mesonintrospect">
		<term><command>mesonintrospect</command></term>
        <listitem>
          <para>一个提取 Meson 构建相关信息的工具</para>
          <indexterm zone="ch-system-meson mesonintrospect">
            <primary sortas="b-mesonintrospect">mesonintrospect</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="mesontest">
		<term><command>mesontest</command></term>
        <listitem>
          <para>Meson 构建系统的测试工具</para>
          <indexterm zone="ch-system-meson mesontest">
            <primary sortas="b-mesontest">mesontest</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="wraptool">
		<term><command>wraptool</command></term>
        <listitem>
          <para>源代码依赖项下载器</para>
          <indexterm zone="ch-system-meson wraptool">
            <primary sortas="b-wraptool">wraptool</primary>
          </indexterm>
        </listitem>
      </varlistentry>
    </variablelist>

  </sect2>

</sect1>

