mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-14 11:03:49 +02:00
cargo: update to 0.49.0 + refactoring
always use a fetched bootstrap tarball now: we have no real reason to self-depend in cargo's case (in rust this is necessary to avoid having to build stage0) so simplify the template that way also, it seems since this release rust no longer ships separate binary tarballs of cargo that use cargo's own versioning, which is a bit of a pain in the ass also switch to python3
This commit is contained in:
parent
c4426b14b8
commit
82ca7bf467
1 changed files with 62 additions and 70 deletions
|
@ -1,24 +1,37 @@
|
|||
# Template file for 'cargo'
|
||||
pkgname=cargo
|
||||
version=0.47.0
|
||||
version=0.49.0
|
||||
revision=1
|
||||
wrksrc="cargo-${version}"
|
||||
build_helper=rust
|
||||
hostmakedepends="rust python curl cmake pkg-config"
|
||||
makedepends="libcurl-devel"
|
||||
hostmakedepends="rust python3 curl cmake pkg-config"
|
||||
makedepends="rust libcurl-devel"
|
||||
depends="rust"
|
||||
short_desc="Rust package manager"
|
||||
maintainer="Enno Boland <gottox@voidlinux.org>"
|
||||
license="MIT, Apache-2.0"
|
||||
homepage="https://crates.io/"
|
||||
distfiles="https://github.com/rust-lang/cargo/archive/${version}.tar.gz"
|
||||
checksum=e0eb4e72a6ba4d39040500ce24a12975379c1ddd39c04f23a0e4739e520965de
|
||||
checksum=59ba1ce05becb4a5e0772d334d75f9dce3d5487ca288ac986e786241bb1cbac5
|
||||
replaces="cargo-tree>=0"
|
||||
_cargo_dist_version=0.46.1
|
||||
|
||||
build_options="static bindist"
|
||||
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.48.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.49.0"
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$build_option_static" -o -n "$build_option_bindist" ]; then
|
||||
_build_static=yes
|
||||
fi
|
||||
|
@ -27,70 +40,55 @@ if [ -z "$_build_static" ]; then
|
|||
makedepends+=" libgit2-devel"
|
||||
fi
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
hostmakedepends+=" cargo"
|
||||
makedepends+=" rust"
|
||||
else
|
||||
_bootstrap_url="https://static.rust-lang.org/dist"
|
||||
distfiles+=" ${_bootstrap_url}/cargo-${_cargo_dist_version}-${RUST_BUILD}.tar.xz"
|
||||
|
||||
case "$XBPS_MACHINE" in
|
||||
x86_64*|i686|ppc64le) ;;
|
||||
ppc*) _bootstrap_url="https://alpha.de.repo.voidlinux.org/distfiles" ;;
|
||||
*) broken="unsupported host: ${XBPS_MACHINE}" ;;
|
||||
esac
|
||||
|
||||
distfiles+="
|
||||
${_bootstrap_url}/cargo-${_cargo_dist_version}-${RUST_BUILD}.tar.xz"
|
||||
|
||||
case "$XBPS_MACHINE" in
|
||||
i686)
|
||||
checksum+="
|
||||
8931dba1c23405fe630aa4ca2aceaba7de74c21cc03947c757b349d004d6a4d6"
|
||||
;;
|
||||
x86_64)
|
||||
checksum+="
|
||||
a27eb5d47b520ef2c554605bf789f80652af63531b4f6a1195d61b3dfd0f6e9c"
|
||||
;;
|
||||
x86_64-musl)
|
||||
checksum+="
|
||||
895a3b6928a5bf7b1ac28c339a85ddd078dd719f54245b8d845370baf8255368"
|
||||
;;
|
||||
ppc64le)
|
||||
checksum+="
|
||||
93354ae5cedaa75d44928d5e232cd9a57a9164cadf47d4a30493c05e60b59b7f"
|
||||
;;
|
||||
ppc64le-musl)
|
||||
checksum+="
|
||||
12da677338f860362e00089fe5b67ecd619c0ae4a4ca2bd14e500df32f598f49"
|
||||
;;
|
||||
ppc64)
|
||||
checksum+="
|
||||
eab0c2d96f863e3c87afc46d43c54df6614af333b98ee881278acf56d9bf3fe8"
|
||||
;;
|
||||
ppc64-musl)
|
||||
checksum+="
|
||||
48770d0f7941005c87c0ddf303a7eca2fcff4c56cfdaaf60b5d862dfeee2a59d"
|
||||
;;
|
||||
ppc)
|
||||
checksum+="
|
||||
034af894e980f642e31d35978d8cbb8839fe9c8f1119083a720a58f7ad7fb881"
|
||||
;;
|
||||
ppc-musl)
|
||||
checksum+="
|
||||
aac08878b9ce3bf7dff4247e988fdaddeaa410cccc8559f8e7e0fd45d8f2ece5"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case "$XBPS_MACHINE" in
|
||||
i686)
|
||||
checksum+="
|
||||
1eab76df91e87198632605752d0dd66f3d84b502cbd1f982f6db3d0d8d943cdb"
|
||||
;;
|
||||
x86_64)
|
||||
checksum+="
|
||||
b11d595581e2580c069b5039214e1031a0e4f87ff6490ac39f92f77857e37055"
|
||||
;;
|
||||
x86_64-musl)
|
||||
checksum+="
|
||||
8728cb7515e593f6fcf3c7afba826a92cd227a35b8e936bae892b95482d4fb90"
|
||||
;;
|
||||
ppc64le)
|
||||
checksum+="
|
||||
675321cf812a132ce707261d03aab2f5ff64788ae66b45d03bc281514f5d53ec"
|
||||
;;
|
||||
ppc64le-musl)
|
||||
checksum+="
|
||||
cf02e057f04e40458b63326e443c48924c78fc33dcb6b892643d47feb1496b09"
|
||||
;;
|
||||
ppc64)
|
||||
checksum+="
|
||||
1e7612ea1900b76924429fa04fa2c194f4213167933b481001290dd4fef27939"
|
||||
;;
|
||||
ppc64-musl)
|
||||
checksum+="
|
||||
88ffadd53e79055ba266f1303d502bcf1ef863783b121aa017930cadcd0e398d"
|
||||
;;
|
||||
ppc)
|
||||
checksum+="
|
||||
cacacdec7bfd24345804efdd1bd1682084880c3c6a086bcab85cd1186b6cd230"
|
||||
;;
|
||||
ppc-musl)
|
||||
checksum+="
|
||||
bad4a5d22da3c7548fd440d0d5a0b98e4de9894dedb35bfb58aaa5f141c23adb"
|
||||
;;
|
||||
*) broken="bootstrap binary unavailable for ${XBPS_MACHINE}";;
|
||||
esac
|
||||
|
||||
post_extract() {
|
||||
if [ -z "$CROSS_BUILD" ]; then
|
||||
mkdir -p target/snapshot
|
||||
cp ../cargo-${_cargo_dist_version}-${RUST_TARGET}/cargo/bin/cargo cargo
|
||||
fi
|
||||
mkdir -p target/snapshot
|
||||
cp ../cargo-${_cargo_dist_version}-${RUST_TARGET}/cargo/bin/cargo cargo
|
||||
}
|
||||
|
||||
do_build() {
|
||||
local cargo cargs
|
||||
local cargs
|
||||
|
||||
if [ -n "$_build_static" ]; then
|
||||
unset LIBSSH2_SYS_USE_PKG_CONFIG
|
||||
|
@ -100,17 +98,11 @@ do_build() {
|
|||
export OPENSSL_DIR="${XBPS_CROSS_BASE}/usr"
|
||||
fi
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
cargo="cargo"
|
||||
else
|
||||
cargo="./cargo"
|
||||
fi
|
||||
|
||||
if [ -n "$_build_static" ]; then
|
||||
cargs+=" --features=all-static"
|
||||
fi
|
||||
|
||||
$cargo build --release ${cargs}
|
||||
./cargo build --release ${cargs}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
|
|
Loading…
Add table
Reference in a new issue