From 37446570eb4bba17bacf18e46572bd4dbeb80c3f Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Tue, 22 Feb 2022 11:49:40 +0100 Subject: [PATCH] rustup: generate shell completions for cargo --- srcpkgs/rustup/template | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/srcpkgs/rustup/template b/srcpkgs/rustup/template index b55cbe09d868..d16d8fc26f4b 100644 --- a/srcpkgs/rustup/template +++ b/srcpkgs/rustup/template @@ -1,7 +1,7 @@ # Template file for 'rustup' pkgname=rustup version=1.24.3 -revision=1 +revision=2 # rustup doesn't recognize this target archs="~armv*-musl" build_style=cargo @@ -23,6 +23,12 @@ case "$XBPS_TARGET_MACHINE" in ;; esac +post_patch() { + # fix for https://github.com/void-linux/void-packages/issues/34889 + cargo update --package autocfg:1.0.1 --precise 1.1.0 + cargo update --package autocfg:0.1.7 --precise 0.1.8 +} + post_build() { RUSTUP="target/${RUST_TARGET}/release/rustup-init" ln -sf "$RUSTUP" rustup @@ -31,6 +37,10 @@ post_build() { vtargetrun ./rustup completions zsh >rustup.zsh vtargetrun ./rustup completions bash >rustup.bash vtargetrun ./rustup completions fish >rustup.fish + + # generate cargo completions + vtargetrun ./rustup completions bash cargo >cargo.bash + vtargetrun ./rustup completions zsh cargo >cargo.zsh } do_install() { @@ -40,6 +50,9 @@ do_install() { vcompletion rustup.fish fish vcompletion rustup.zsh zsh + vcompletion cargo.bash bash cargo + vcompletion cargo.zsh zsh cargo + vdoc README.md vlicense LICENSE-APACHE vlicense LICENSE-MIT