package/cargo-bin: install if rust-bin selected
authorEric Le Bihan <eric.le.bihan.dev@free.fr>
Fri, 7 Feb 2020 18:08:22 +0000 (19:08 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 27 Jul 2020 11:31:00 +0000 (13:31 +0200)
If host-rust-bin, the pre-built Rust compiler, is selected as a rustc
provider, then also install the pre-built cargo binary to be coherent.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com>
[Arnout: don't install cargo config, alread moved]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: David Pierret <david.pierret@smile.fr>
Tested-by: David Pierret <david.pierret@smile.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/cargo-bin/cargo-bin.mk

index 3614f7a53df68fc7a09d0055888d3f6a387b3614..3eaf417531091d26dbd2ba2081a062d7444c410d 100644 (file)
@@ -10,4 +10,10 @@ CARGO_BIN_SOURCE = cargo-$(CARGO_BIN_VERSION)-$(RUSTC_HOST_NAME).tar.xz
 CARGO_BIN_LICENSE = Apache-2.0 or MIT
 CARGO_BIN_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT
 
+ifeq ($(BR2_PACKAGE_HOST_RUST_BIN),y)
+define HOST_CARGO_BIN_INSTALL_CMDS
+       $(@D)/install.sh --prefix=$(HOST_DIR) --disable-ldconfig
+endef
+endif
+
 $(eval $(host-generic-package))