host-cargo: select host-rustc
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sun, 10 Jun 2018 13:38:56 +0000 (15:38 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 10 Jun 2018 13:57:55 +0000 (15:57 +0200)
Buildroot documentation specifies that cargo-based package should only
depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS and selects
BR2_PACKAGE_HOST_CARGO but this fails with the following error:

warning: (BR2_PACKAGE_LIBRSVG) selects BR2_PACKAGE_HOST_CARGO which has
unmet direct dependencies (BR2_PACKAGE_HAS_HOST_RUSTC)

Indeed, host-cargo depends on
BR2_PACKAGE_HAS_HOST_RUSTC which is selected only when host-rustc is
selected.

So instead of having to select both cargo and rustc in each cargo-based
package, replace BR2_PACKAGE_HAS_HOST_RUSTC dependency by
BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS and select
BR2_PACKAGE_HOST_RUSTC

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/cargo/Config.in.host

index 0f1ca305c6d054d57416cdde0938a422ab18ddfb..c33c6851f2b2018aeab75a9657527a80ec4c4921 100644 (file)
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_HOST_CARGO
        bool "host cargo"
-       depends on BR2_PACKAGE_HAS_HOST_RUSTC
+       depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS
+       select BR2_PACKAGE_HOST_RUSTC
        help
          Cargo is the package manager for the Rust programming
          language.