mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
cargo: update to 0.31.0.
This commit is contained in:
parent
ebb2e7e34d
commit
ae12bb9978
1 changed files with 7 additions and 23 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'cargo'
|
# Template file for 'cargo'
|
||||||
pkgname=cargo
|
pkgname=cargo
|
||||||
version=0.30.0
|
version=0.31.0
|
||||||
revision=1
|
revision=1
|
||||||
hostmakedepends="rust python curl cmake pkg-config"
|
hostmakedepends="rust python curl cmake pkg-config"
|
||||||
makedepends="libcurl-devel libgit2-devel"
|
makedepends="libcurl-devel libgit2-devel"
|
||||||
|
@ -10,7 +10,7 @@ maintainer="Enno Boland <gottox@voidlinux.eu>"
|
||||||
license="MIT, Apache-2.0"
|
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"
|
||||||
checksum=82f3ba49192b74b115b8aeca9db24deca022ee5e6351292611ab5b50e4455251
|
checksum=96c4ce9a3db4748680e613e4f3bce7de84329e50b6074a1fa7adb43359ff270e
|
||||||
_cargo_dist_version=0.30.0
|
_cargo_dist_version=0.30.0
|
||||||
|
|
||||||
if [ "$CROSS_BUILD" ]; then
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
@ -34,44 +34,28 @@ else
|
||||||
distfiles+="
|
distfiles+="
|
||||||
https://static.rust-lang.org/dist/cargo-${_cargo_dist_version}-i686-unknown-linux-gnu.tar.gz"
|
https://static.rust-lang.org/dist/cargo-${_cargo_dist_version}-i686-unknown-linux-gnu.tar.gz"
|
||||||
checksum+="
|
checksum+="
|
||||||
2fc5f7f5b128de456a9e1e3f5f4ef2c6d3169dbfe078931d9fcf38c9aa9b45ba"
|
bc0f79a757601e0386e98bbbf870bf2a9f999d0085a9a2982d954833f8c519d5"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $XBPS_TARGET_MACHINE in
|
|
||||||
i686) _host_triplet=i686-unknown-linux-gnu;;
|
|
||||||
x86_64) _host_triplet=x86_64-unknown-linux-gnu;;
|
|
||||||
x86_64-musl) _host_triplet=x86_64-unknown-linux-musl;;
|
|
||||||
armv6l) _host_triplet=arm-unknown-linux-gnueabihf;;
|
|
||||||
armv6l-musl) _host_triplet=arm-unknown-linux-musleabihf;;
|
|
||||||
armv7l) _host_triplet=armv7-unknown-linux-gnueabihf;;
|
|
||||||
armv7l-musl) _host_triplet=armv7-unknown-linux-musleabihf;;
|
|
||||||
aarch64) _host_triplet=aarch64-unknown-linux-gnu;;
|
|
||||||
aarch64-musl) _host_triplet=aarch64-unknown-linux-musl;;
|
|
||||||
*) broken="Please add your triplet to the cargo template!";;
|
|
||||||
esac
|
|
||||||
|
|
||||||
post_extract() {
|
post_extract() {
|
||||||
if [ -z "$CROSS_BUILD" ]; then
|
if [ -z "$CROSS_BUILD" ]; then
|
||||||
mkdir -p target/snapshot
|
mkdir -p target/snapshot
|
||||||
case "$XBPS_MACHINE" in
|
case "$XBPS_MACHINE" in
|
||||||
x86_64-musl) cp ../cargo cargo;;
|
x86_64-musl) cp ../cargo cargo;;
|
||||||
*) cp ../cargo-${_cargo_dist_version}-${_host_triplet}/cargo/bin/cargo cargo;;
|
*) cp ../cargo-${_cargo_dist_version}-${RUST_TARGET}/cargo/bin/cargo cargo;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
do_configure() {
|
do_configure() {
|
||||||
# Actually use the config we set below
|
|
||||||
export CARGO_HOME="$wrksrc/.cargo"
|
|
||||||
|
|
||||||
mkdir -p .cargo
|
mkdir -p .cargo
|
||||||
|
|
||||||
cat >> .cargo/config <<EOF
|
cat >> .cargo/config <<EOF
|
||||||
[build]
|
[build]
|
||||||
jobs = ${makejobs#*j}
|
jobs = ${makejobs#*j}
|
||||||
target = "${_host_triplet}"
|
target = "${RUST_TARGET}"
|
||||||
[target.${_host_triplet}]
|
[target.${RUST_TARGET}]
|
||||||
linker = "${CC}"
|
linker = "${CC}"
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
@ -89,7 +73,7 @@ do_build() {
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
vbin target/${_host_triplet}/release/cargo
|
vbin target/${RUST_TARGET}/release/cargo
|
||||||
for f in src/etc/man/*.?; do
|
for f in src/etc/man/*.?; do
|
||||||
vman $f
|
vman $f
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Reference in a new issue