Index: en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
===================================================================
--- en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
+++ en_US.ISO8859-1/books/porters-handbook/special/chapter.xml
@@ -857,7 +857,14 @@
CARGO_FEATURES
List of application features to build (space
- separated list).
+ separated list). To deactivate all default
+ features add the special token
+ --no-default-features
+ to CARGO_FEATURES. Manually
+ passing it to CARGO_BUILD_ARGS,
+ CARGO_INSTALL_ARGS, and
+ CARGO_TEST_ARGS is not
+ needed.
@@ -1127,6 +1134,35 @@
yaml features:
CARGO_FEATURES= json yaml
+
+
+
+ Encoding Application Features As Port Options
+
+ An example [features] section
+ in Cargo.toml could look like
+ this:
+
+ [features]
+pulseaudio_backend = ["librespot-playback/pulseaudio-backend"]
+portaudio_backend = ["librespot-playback/portaudio-backend"]
+default = ["pulseaudio_backend"]
+
+ pulseaudio_backend is a default
+ feature. It is always enabled unless we explicitly turn
+ off default features by adding
+ --no-default-features to
+ CARGO_FEATURES. Here we turn the
+ portaudio_backend
+ and pulseaudio_backend features into
+ port options:
+
+ CARGO_FEATURES= --no-default-features
+
+OPTIONS_DEFINE= PORTAUDIO PULSEAUDIO
+
+PORTAUDIO_VARS= CARGO_FEATURES+=portaudio_backend
+PULSEAUDIO_VARS= CARGO_FEATURES+=pulseaudio_backend