cargo: update to 0.58.0

This commit is contained in:
q66 2022-01-04 04:56:26 +01:00
parent ce3b8aef99
commit f8990aeee2

View file

@ -1,11 +1,11 @@
# Template file for 'cargo' # Template file for 'cargo'
pkgname=cargo pkgname=cargo
version=0.54.0 version=0.58.0
revision=1 revision=1
wrksrc="cargo-${version}" wrksrc="cargo-${version}"
build_helper=rust build_helper=rust
hostmakedepends="rust python3 curl cmake pkg-config zlib-devel" hostmakedepends="cargo-bootstrap rust python3 curl cmake pkg-config zlib-devel"
makedepends="rust libcurl-devel" makedepends="rust libcurl-devel openssl-devel"
depends="rust" depends="rust"
short_desc="Rust package manager" short_desc="Rust package manager"
maintainer="Enno Boland <gottox@voidlinux.org>" maintainer="Enno Boland <gottox@voidlinux.org>"
@ -13,27 +13,13 @@ license="MIT, Apache-2.0"
homepage="https://crates.io/" homepage="https://crates.io/"
distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz
https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.5.tar.gz" https://github.com/crossbeam-rs/crossbeam/archive/refs/tags/crossbeam-utils-0.8.5.tar.gz"
checksum="4627e7eb0be3150d878ed695a1ef874885ff84325019499af61f5e3ade410d4b checksum="e1d6f55414a29906d24b13c687996b5220e08ccce9c682e4c02851138fc7093f
57db07eb38b0aaf7951c79b4639819cb84bc4269507091afea7267e10a54e079" 57db07eb38b0aaf7951c79b4639819cb84bc4269507091afea7267e10a54e079"
replaces="cargo-tree>=0" replaces="cargo-tree>=0"
build_options="static bindist" build_options="static bindist"
desc_option_bindist="Generate a tarball for bootstrap" desc_option_bindist="Generate a tarball for bootstrap"
# rust upstream no longer ships cargo-versioned tarballs
# need to use the corresponding rust version instead
_bootstrap_url="https://static.rust-lang.org/dist"
_cargo_dist_version="1.53.0"
case "$XBPS_MACHINE" in
x86_64*|i686|ppc64le) ;;
ppc*)
# custom bootstrap tarballs still use cargo versioning, so override
_bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles"
_cargo_dist_version="0.54.0"
;;
esac
if [ -n "$build_option_static" -o -n "$build_option_bindist" ]; then if [ -n "$build_option_static" -o -n "$build_option_bindist" ]; then
_build_static=yes _build_static=yes
fi fi
@ -42,51 +28,7 @@ if [ -z "$_build_static" ]; then
makedepends+=" libgit2-devel" makedepends+=" libgit2-devel"
fi fi
distfiles+=" ${_bootstrap_url}/cargo-${_cargo_dist_version}-${RUST_BUILD}.tar.xz"
case "$XBPS_MACHINE" in
i686)
checksum+="
deebb4a4de22a60f0dec5d5b84e8dfe6ce039835935dae96477a79468aefd927"
;;
x86_64)
checksum+="
e4437f6c83574fc60e183f4df439190f7610e4a669476802795645da66fbb83b"
;;
x86_64-musl)
checksum+="
ca236408cb2c35b8c3f7c2b4e9f1e69422ed24153f445192eafb6462351e5c2b"
;;
ppc64le)
checksum+="
ca1d94161c3a4021bca170ba4ca059b5606fcd70934aca89d8cea43746880ba7"
;;
ppc64le-musl)
checksum+="
1181b721addeb2aa471bf71549a7fb09f27167c382b480cefba272f770b9f039"
;;
ppc64)
checksum+="
7d9b0428d4cd8cdd76582b3113476228013ec0b674802f18b4b5e8bbefcd3ab2"
;;
ppc64-musl)
checksum+="
695d687c19a729504ac8b57a42e395258a8b801753baf1b0b17755d7f38f7eaa"
;;
ppc)
checksum+="
176f178b9e55f399311edb4888d931e5f696766f655cc9648ae4b6ef1bdc8369"
;;
ppc-musl)
checksum+="
234cf0792407065f4c5c4276886846cee2ecfb37eea1171c2c6e4a0fba7d324c"
;;
*) broken="bootstrap binary unavailable for ${XBPS_MACHINE}";;
esac
post_extract() { post_extract() {
mkdir -p target/snapshot
cp ../cargo-${_cargo_dist_version}-${RUST_BUILD}/cargo/bin/cargo cargo
mv ../crossbeam-* crossbeam-utils mv ../crossbeam-* crossbeam-utils
} }
@ -115,7 +57,7 @@ do_build() {
cargs+=" --features=all-static" cargs+=" --features=all-static"
fi fi
./cargo build --release ${cargs} cargo build --release ${cargs}
} }
do_install() { do_install() {