kumquat-buildroot/package/rust-bin/rust-bin.mk
Nicolas Tran b77600f508 package/{rust, rust-bin}: bump to version 1.60.0
Link to Rust 1.60.0: https://blog.rust-lang.org/2022/04/07/Rust-1.60.0.html

    Packages relying on Rust have been updated to support version 1.60.0:
    package/rust
    package/rust-bin

    Newest version of the source archives have been retrieved with their hash values, and the signature of the .asc files have been verified as follows:
    $ curl -fsSL https://static.rust-lang.org/rust-key.gpg.ascii | gpg --import
    $ gpg --verify <filename.asc> <filename>

    The signatures were recognized but the ownership from https://static.rust-lang.org could not be verified. Because this URL can be trusted, it has been considered to blindly sign the corresponding key:
    $ gpg --lsign-key 85AB96E6FA1BE5FE

    There is no typographical error in the packages according to the check-pakage utility:
    $ ./utils/check-package package/rust-bin/*
    $ ./utils/check-package package/rust/*

    The testsuites for the rust-bin and rust packages to test the Rust toolchain under 1.60.0 were successful:
    $ ./support/testing/run-tests -k -d dl/ -o testsuite tests.package.test_rust.TestRustBin
    $ ./support/testing/run-tests -k -d dl/ -o testsuite tests.package.test_rust.TestRust

    In order to verify the compatibility of Rust 1.60.0 with packages relying on it, tests using `./utils/test-pkg` were run.
    For example, running the following command with `.conf` file enabling the corresponding BR2_PACKAGE:
    $ ./utils/test-pkg -d test-pkg -c ripgrep.config -p ripgrep

    Results:
    package/ripgrep: OK
    package/librsvg : OK
    package/suricata: OK
    package/bat: OK

Notes:
- For all the mentionned packages, the successful build was made on the toolchain bootlin-armv7-glibc (except package/bat, for which it was bootlin-x86-64-musl).
- A redundant build fail was witnessed for the bootlin-x86-64-musl toolchain for all the packages tested (except for package/bat). The same tests were redone in the master branch and it was already the case with Rust 1.58.1.

Signed-off-by: Nicolas Tran <nicolas.tran@smile.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-04-21 19:32:05 +02:00

63 lines
1.9 KiB
Makefile

################################################################################
#
# rust-bin
#
################################################################################
RUST_BIN_VERSION = 1.60.0
RUST_BIN_SITE = https://static.rust-lang.org/dist
RUST_BIN_LICENSE = Apache-2.0 or MIT
RUST_BIN_LICENSE_FILES = LICENSE-APACHE LICENSE-MIT
HOST_RUST_BIN_PROVIDES = host-rustc
HOST_RUST_BIN_SOURCE = rust-$(RUST_BIN_VERSION)-$(RUSTC_HOST_NAME).tar.xz
ifeq ($(BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS),y)
HOST_RUST_BIN_EXTRA_DOWNLOADS += rust-std-$(RUST_BIN_VERSION)-$(RUSTC_TARGET_NAME).tar.xz
endif
HOST_RUST_BIN_LIBSTD_HOST_PREFIX = rust-std-$(RUSTC_HOST_NAME)
define HOST_RUST_BIN_LIBSTD_EXTRACT
mkdir -p $(@D)/std
$(foreach f,$(HOST_RUST_BIN_EXTRA_DOWNLOADS), \
$(call suitable-extractor,$(f)) $(HOST_RUST_BIN_DL_DIR)/$(f) | \
$(TAR) -C $(@D)/std $(TAR_OPTIONS) -
)
mkdir -p $(@D)/rustc/lib/rustlib/$(RUSTC_HOST_NAME)/lib
cd $(@D)/rustc/lib/rustlib/$(RUSTC_HOST_NAME)/lib; \
ln -sf ../../../../../$(HOST_RUST_BIN_LIBSTD_HOST_PREFIX)/lib/rustlib/$(RUSTC_HOST_NAME)/lib/* .
endef
HOST_RUST_BIN_POST_EXTRACT_HOOKS += HOST_RUST_BIN_LIBSTD_EXTRACT
HOST_RUST_BIN_INSTALL_COMMON_OPTS = \
--prefix=$(HOST_DIR) \
--disable-ldconfig
HOST_RUST_BIN_INSTALL_OPTS = \
$(HOST_RUST_BIN_INSTALL_COMMON_OPTS) \
--components=rustc,cargo,rust-std-$(RUSTC_HOST_NAME)
define HOST_RUST_BIN_INSTALL_RUSTC
(cd $(@D); \
./install.sh $(HOST_RUST_BIN_INSTALL_OPTS))
endef
ifeq ($(BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS),y)
define HOST_RUST_BIN_INSTALL_LIBSTD_TARGET
(cd $(@D)/std/rust-std-$(RUST_BIN_VERSION)-$(RUSTC_TARGET_NAME); \
./install.sh $(HOST_RUST_BIN_INSTALL_COMMON_OPTS))
endef
endif
define HOST_RUST_BIN_INSTALL_CMDS
$(HOST_RUST_BIN_INSTALL_RUSTC)
$(HOST_RUST_BIN_INSTALL_LIBSTD_TARGET)
endef
HOST_RUST_BIN_POST_INSTALL_HOOKS += HOST_RUST_INSTALL_CARGO_CONFIG
$(eval $(host-generic-package))