From patchwork Tue Nov 5 21:12:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Le Bihan X-Patchwork-Id: 1189964 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4772T803KMz9sP3 for ; Wed, 6 Nov 2019 08:13:31 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E985289F3F; Tue, 5 Nov 2019 21:13:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ENOwLwO35C0Q; Tue, 5 Nov 2019 21:13:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 48A4C8A03A; Tue, 5 Nov 2019 21:13:25 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id EA4391BF988 for ; Tue, 5 Nov 2019 21:13:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B067A22219 for ; Tue, 5 Nov 2019 21:13:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QKW6WZSSPbH2 for ; Tue, 5 Nov 2019 21:13:07 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by silver.osuosl.org (Postfix) with ESMTPS id AEBFB204C5 for ; Tue, 5 Nov 2019 21:13:07 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:174:1c70:221a:6ff:fec6:f80a]) (Authenticated sender: eric.le.bihan.dev) by smtp1-g21.free.fr (Postfix) with ESMTPSA id D441AB0051E for ; Tue, 5 Nov 2019 22:13:03 +0100 (CET) From: Eric Le Bihan To: buildroot@buildroot.org Date: Tue, 5 Nov 2019 22:12:54 +0100 Message-Id: <20191105211259.27673-3-eric.le.bihan.dev@free.fr> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191105211259.27673-1-eric.le.bihan.dev@free.fr> References: <20191105211259.27673-1-eric.le.bihan.dev@free.fr> MIME-Version: 1.0 Subject: [Buildroot] [RFC PATCH 2/7] package/cargo-bin: install if rust-bin selected X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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. Also install configuration file, reusing the one from rust package. Signed-off-by: Eric Le Bihan --- package/cargo-bin/cargo-bin.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/cargo-bin/cargo-bin.mk b/package/cargo-bin/cargo-bin.mk index 3614f7a53d..4a3d52e43b 100644 --- a/package/cargo-bin/cargo-bin.mk +++ b/package/cargo-bin/cargo-bin.mk @@ -10,4 +10,11 @@ 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 +HOST_CARGO_BIN_POST_INSTALL_HOOKS += HOST_RUST_INSTALL_CARGO_CONFIG +endif + $(eval $(host-generic-package))