From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 30 Jul 2021 19:42:33 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m9WWn-0001Tl-Pt for lore@lore.pengutronix.de; Fri, 30 Jul 2021 19:42:33 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m9WWn-0005Dw-DS; Fri, 30 Jul 2021 19:42:33 +0200 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m9WWI-0005Dg-Ft for ptxdist@pengutronix.de; Fri, 30 Jul 2021 19:42:03 +0200 Received: by mail-wm1-x333.google.com with SMTP id m20-20020a05600c4f54b029024e75a15716so6927880wmq.2 for ; Fri, 30 Jul 2021 10:42:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=y2UbEIFQ5DuNVtPQRm2p2bQuLKWH/931blr3U6vyIAY=; b=F1joSJsDuu9bF7ma5yvZVJvadop2ETSsTClg+GvjHMYLP2xaW7RBOTFKSuJTnHEQys mmd98QuItiObq4HscpzYgZSy1BJS9n/i8zYyBwhSc3E1kn+Ddf01G5rHreoVJukqhio0 Ag5+gh/XGEYn8WaiXIjnkG+37Ju0eloswvzvXqv0YboLr044JLi12XR2ZJhc+LVCTHDk BGDddFTzqHS1nQTw/Gbjw1ZmJybq/l2/PyQGAjHTe5TeoATUMRSejWtXPwW4nK/KxPpZ 7RnNbU25E5knv8akFyTvcoVBjaHDLLE7rsGvqKD9NPjlQR/Av7a5xtdT7KUdUkM0bU0t urAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=y2UbEIFQ5DuNVtPQRm2p2bQuLKWH/931blr3U6vyIAY=; b=UKftjyyL0PpcHPZ8biFjs2eBHns/ucl9Xu8TCQYCPpdovA/rFNnZo2OmNDcWEWVVrY vo8+OZCJmBTIcQkjoOPJSxRI7jTPtJQCQlN2K4hsVFHSJ4nibPCjcqFSm0YtjXdV5eV6 tRnzYL71WO1dgKIasc1RQRsWRe5L/RpLkLGPCjA2u2JtmLDmnQl6LSpjNddnOXygwbVE 1eszTLrR1FqcKMe9lOMeziwZ1GoC36fV+rT4zqn5Vi3Qxoo9fuKk13XkdV464SbdFZmH CsHF00bzn6RA7LD5md0zFkyfyP6JSGBcxHSW8ifAVHIwSK9DsfF1zyco+pq+T4Nqb0lL GJwQ== X-Gm-Message-State: AOAM533ZY5XcX5Bch3RQSOaA4nYHfQzpTvlas7hWndo/GVHOBvXhlInd kXHzy1U8MNOOpV6LMN/U90DiqpyFBsI= X-Google-Smtp-Source: ABdhPJxVqFeVNhobxw8wEx5zYuPEijldLzPZfDlux5jqbMeD/MrL+PtB/FVa+wOrntMMlpfg9HFi1g== X-Received: by 2002:a1c:a4c1:: with SMTP id n184mr4119925wme.8.1627666921185; Fri, 30 Jul 2021 10:42:01 -0700 (PDT) Received: from localhost.localdomain ([46.37.82.163]) by smtp.googlemail.com with ESMTPSA id f26sm2408050wrd.41.2021.07.30.10.42.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jul 2021 10:42:00 -0700 (PDT) From: avazquez.dev@gmail.com To: ptxdist@pengutronix.de Date: Fri, 30 Jul 2021 19:41:56 +0200 Message-Id: <20210730174156.187572-1-avazquez.dev@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=4.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH] rust: new package X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Alejandro Vazquez Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false From: Alejandro Vazquez - host-rust: This package provides a pre-built version of rustc, cargo and standard library for the host. - host-rust-std-target: A pre-built version of the standard library for the target. Signed-off-by: Alejandro Vazquez --- rules/host-rust-std-target.in | 18 ++++++++ rules/host-rust-std-target.make | 81 +++++++++++++++++++++++++++++++++ rules/host-rust.in | 8 ++++ rules/host-rust.make | 80 ++++++++++++++++++++++++++++++++ 4 files changed, 187 insertions(+) create mode 100644 rules/host-rust-std-target.in create mode 100644 rules/host-rust-std-target.make create mode 100644 rules/host-rust.in create mode 100644 rules/host-rust.make diff --git a/rules/host-rust-std-target.in b/rules/host-rust-std-target.in new file mode 100644 index 000000000..ed47f8c89 --- /dev/null +++ b/rules/host-rust-std-target.in @@ -0,0 +1,18 @@ +## SECTION=hosttools + +menuconfig HOST_RUST_STD_TARGET + bool + select HOST_RUST + prompt "host-rust-std-target (pre-built)" + help + This package will install pre-built versions of + the Rust standard library for the target. + +if HOST_RUST_STD_TARGET + +config HOST_RUST_STD_TARGET_ARCH + string + default "armv7-unknown-linux-gnueabihf" + prompt "Target Architecture" + +endif diff --git a/rules/host-rust-std-target.make b/rules/host-rust-std-target.make new file mode 100644 index 000000000..f41c2caa1 --- /dev/null +++ b/rules/host-rust-std-target.make @@ -0,0 +1,81 @@ +# -*-makefile-*- +# +# Copyright (C) 2021 by Alejandro Vazquez +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_HOST_RUST_STD_TARGET) += host-rust-std-target + +# +# Paths and names +# +HOST_RUST_STD_TARGET_VERSION := 1.53.0 +HOST_RUST_STD_TARGET_MD5 := 6eeb959f5a9294adc8220e79502b00df +HOST_RUST_STD_TARGET_SUFFIX := tar.xz +HOST_RUST_STD_TARGET_SPEC := $(call remove_quotes, $(PTXCONF_HOST_RUST_STD_TARGET_ARCH)) +HOST_RUST_STD_TARGET := rust-std-$(HOST_RUST_STD_TARGET_VERSION) +HOST_RUST_STD_TARGET_NAME := $(HOST_RUST_STD_TARGET)-$(HOST_RUST_STD_TARGET_SPEC) +HOST_RUST_STD_TARGET_URL := https://static.rust-lang.org/dist/$(HOST_RUST_STD_TARGET_NAME).$(HOST_RUST_STD_TARGET_SUFFIX) +HOST_RUST_STD_TARGET_DIR := $(HOST_BUILDDIR)/$(HOST_RUST_STD_TARGET) +HOST_RUST_STD_TARGET_SOURCE := $(SRCDIR)/$(HOST_RUST_STD_TARGET_NAME).$(HOST_RUST_STD_TARGET_SUFFIX) +HOST_RUST_STD_TARGET_LICENSE := Apache-2.0 AND MIT +HOST_RUST_STD_TARGET_LICENSE_FILES := \ + file://COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0 \ + file://LICENSE-APACHE;md5=22a53954e4e0ec258dfce4391e905dac \ + file://LICENSE-MIT;md5=b377b220f43d747efdec40d69fcaa69d + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +HOST_RUST_STD_TARGET_DEVPKG := NO +HOST_RUST_STD_TARGET_CONF_TOOL := NO + +HOST_RUST_STD_TARGET_INSTALL_COMPONENTS = --components=rust-std-$(HOST_RUST_STD_TARGET_SPEC) + +HOST_RUST_STD_TARGET_INSTALL_OPTS = \ + --prefix=$(PTXDIST_SYSROOT_HOST) \ + --without=rust-docs \ + --disable-ldconfig \ + $(HOST_RUST_STD_TARGET_INSTALL_COMPONENTS) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +$(STATEDIR)/host-rust-std-target.compile: + @$(call targetinfo) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/host-rust-std-target.install.post: + @$(call targetinfo) + + @cd "$(HOST_RUST_STD_TARGET_DIR)" && sh install.sh $(HOST_RUST_STD_TARGET_INSTALL_OPTS) + @cd "$(PTXDIST_SYSROOT_HOST)/lib/rustlib/" && mv uninstall.sh uninstall-target.sh + + @$(call world/install, HOST_RUST_STD_TARGET) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +$(STATEDIR)/host-rust-std-target.clean: + @$(call targetinfo) + + sh $(PTXDIST_SYSROOT_HOST)/lib/rustlib/uninstall-host.sh \ + --uninstall \ + --prefix=$(PTXDIST_SYSROOT_HOST) \ + $(HOST_RUST_STD_TARGET_INSTALL_COMPONENTS) + @$(call clean_pkg, HOST_RUST_STD_TARGET) + +# vim: syntax=make diff --git a/rules/host-rust.in b/rules/host-rust.in new file mode 100644 index 000000000..4f73dae6c --- /dev/null +++ b/rules/host-rust.in @@ -0,0 +1,8 @@ +## SECTION=hosttools + +config HOST_RUST + tristate + prompt "host-rust (pre-built)" + help + This package will install pre-built versions of the compiler + and the Rust standard library for the host. diff --git a/rules/host-rust.make b/rules/host-rust.make new file mode 100644 index 000000000..e750a1352 --- /dev/null +++ b/rules/host-rust.make @@ -0,0 +1,80 @@ +# -*-makefile-*- +# +# Copyright (C) 2021 by Alejandro Vazquez +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_HOST_RUST) += host-rust + +# +# Paths and names +# +HOST_RUST_VERSION := 1.53.0 +HOST_RUST_MD5 := 3f2ea3d908dac317d6006a117463f18e +HOST_RUST := rust-$(HOST_RUST_VERSION) +HOST_RUST_SUFFIX := tar.xz +HOST_RUST_NAME := $(HOST_RUST)-$(subst host,unknown,$(GNU_HOST)) +HOST_RUST_URL := https://static.rust-lang.org/dist/$(HOST_RUST_NAME).$(HOST_RUST_SUFFIX) +HOST_RUST_DIR := $(HOST_BUILDDIR)/$(HOST_RUST_NAME) +HOST_RUST_SOURCE := $(SRCDIR)/$(HOST_RUST_NAME).$(HOST_RUST_SUFFIX) +HOST_RUST_LICENSE := Apache-2.0 AND MIT +HOST_RUST_LICENSE_FILES := \ + file://COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0 \ + file://LICENSE-APACHE;md5=22a53954e4e0ec258dfce4391e905dac \ + file://LICENSE-MIT;md5=b377b220f43d747efdec40d69fcaa69d + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +HOST_RUST_DEVPKG := NO +HOST_RUST_CONF_TOOL := NO + +HOST_RUST_INSTALL_COMPONENTS = --components=rustc,cargo,rust-std-$(subst host,unknown,$(GNU_HOST)) + +HOST_RUST_INSTALL_OPTS = \ + --prefix=$(PTXDIST_SYSROOT_HOST) \ + --without=rust-docs \ + --disable-ldconfig \ + $(HOST_RUST_INSTALL_COMPONENTS) + +# ---------------------------------------------------------------------------- +# Compile +# ---------------------------------------------------------------------------- + +$(STATEDIR)/host-rust.compile: + @$(call targetinfo) + @$(call touch) + +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/host-rust.install.post: + @$(call targetinfo) + + @cd "$(HOST_RUST_DIR)" && sh install.sh $(HOST_RUST_INSTALL_OPTS) + @cd "$(PTXDIST_SYSROOT_HOST)/lib/rustlib/" && mv uninstall.sh uninstall-host.sh + + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +$(STATEDIR)/host-rust.clean: + @$(call targetinfo) + + sh $(PTXDIST_SYSROOT_HOST)/lib/rustlib/uninstall-host.sh \ + --uninstall \ + --prefix=$(PTXDIST_SYSROOT_HOST) \ + $(HOST_RUST_INSTALL_COMPONENTS) + + @$(call clean_pkg, HOST_RUST) + +# vim: syntax=make -- 2.25.1 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de