Changeset View
Changeset View
Standalone View
Standalone View
en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
Show First 20 Lines • Show All 813 Lines • ▼ Show 20 Lines | this:</para> | ||||
<programlisting>env = Environment(**ARGUMENTS)</programlisting> | <programlisting>env = Environment(**ARGUMENTS)</programlisting> | ||||
<para>It may be then modified with | <para>It may be then modified with | ||||
<literal>env.Append</literal> and | <literal>env.Append</literal> and | ||||
<literal>env.Replace</literal>.</para> | <literal>env.Replace</literal>.</para> | ||||
</sect2> | </sect2> | ||||
<sect2 xml:id="using-cargo"> | <sect2 xml:id="using-cargo"> | ||||
<title>Using <command>cargo</command></title> | <title>Building <application>Rust</application> Applications | ||||
with <command>cargo</command></title> | |||||
<para>For ports that use <application>Cargo</application>, | <para>For ports that use <application>Cargo</application>, | ||||
define <literal>USES=cargo</literal>.</para> | define <literal>USES=cargo</literal>.</para> | ||||
<table frame="none" xml:id="using-cargo-user-variables"> | <table frame="none" xml:id="using-cargo-user-variables"> | ||||
<title>Variables the Users Can Define for | <title>Variables the Users Can Define for | ||||
<command>cargo</command> Builds</title> | <command>cargo</command> Builds</title> | ||||
▲ Show 20 Lines • Show All 269 Lines • ▼ Show 20 Lines | |||||
=> Attempting to fetch https://crates.io/api/v1/crates/arrayvec/0.4.7/download?dummy=/rust/crates/arrayvec-0.4.7.tar.gz | => Attempting to fetch https://crates.io/api/v1/crates/arrayvec/0.4.7/download?dummy=/rust/crates/arrayvec-0.4.7.tar.gz | ||||
rust/crates/arrayvec-0.4.7.tar.gz 100% of 22 kB 3237 kBps 00m00s | rust/crates/arrayvec-0.4.7.tar.gz 100% of 22 kB 3237 kBps 00m00s | ||||
=> rust/crates/atty-0.2.9.tar.gz doesn't seem to exist in /usr/ports/distfiles/. | => rust/crates/atty-0.2.9.tar.gz doesn't seem to exist in /usr/ports/distfiles/. | ||||
=> Attempting to fetch https://crates.io/api/v1/crates/atty/0.2.9/download?dummy=/rust/crates/atty-0.2.9.tar.gz | => Attempting to fetch https://crates.io/api/v1/crates/atty/0.2.9/download?dummy=/rust/crates/atty-0.2.9.tar.gz | ||||
rust/crates/atty-0.2.9.tar.gz 100% of 5898 B 81 MBps 00m00s | rust/crates/atty-0.2.9.tar.gz 100% of 5898 B 81 MBps 00m00s | ||||
=> rust/crates/bitflags-1.0.1.tar.gz doesn't seem to exist in /usr/ports/distfiles/. | => rust/crates/bitflags-1.0.1.tar.gz doesn't seem to exist in /usr/ports/distfiles/. | ||||
[...]</screen> | [...]</screen> | ||||
<para>The working directory currently only contains the | |||||
application sources we extracted as part of the | |||||
<command>make cargo-crates</command> step. Before | |||||
attempting to build the port the working directory | |||||
must be cleaned, so that the crate sources can be | |||||
extracted into <varname>CARGO_VENDOR_DIR</varname>:</para> | |||||
<screen>&prompt.user; <userinput>make clean</userinput> | |||||
===> Cleaning for tokei-7.0.2</screen> | |||||
<para>The port is now ready for a test build and further | <para>The port is now ready for a test build and further | ||||
adjustments like creating a plist, writing a description, | adjustments like creating a plist, writing a description, | ||||
adding license information, options, etc. as normal.</para> | adding license information, options, etc. as normal.</para> | ||||
<para>If you are not testing your port in a clean environment | |||||
like with <application>Poudriere</application>, remember to | |||||
run <command>make clean</command> before any testing.</para> | |||||
</example> | </example> | ||||
<example xml:id="cargo-ex2"> | <example xml:id="cargo-ex2"> | ||||
<title>Enabling Additional Application Features</title> | <title>Enabling Additional Application Features</title> | ||||
<para>Some applications define additional features in their | <para>Some applications define additional features in their | ||||
<filename>Cargo.toml</filename>. They can be compiled in | <filename>Cargo.toml</filename>. They can be compiled in | ||||
by setting <varname>CARGO_FEATURES</varname> in the | by setting <varname>CARGO_FEATURES</varname> in the | ||||
▲ Show 20 Lines • Show All 6,308 Lines • Show Last 20 Lines |