cargo: update to 0.47.0
This commit is contained in:
parent
6d6416793c
commit
85a2548d41
1 changed files with 13 additions and 54 deletions
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'cargo'
|
||||
pkgname=cargo
|
||||
version=0.45.0
|
||||
revision=2
|
||||
version=0.47.0
|
||||
revision=1
|
||||
wrksrc="cargo-${version}"
|
||||
build_helper=rust
|
||||
hostmakedepends="rust python curl cmake pkg-config"
|
||||
|
@ -12,11 +12,9 @@ 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=304b2abb13ca0219a3485466625f2a38e6011f898199272ee76ad03d4c8c68b0
|
||||
checksum=e0eb4e72a6ba4d39040500ce24a12975379c1ddd39c04f23a0e4739e520965de
|
||||
replaces="cargo-tree>=0"
|
||||
_cargo_dist_version=0.44.0
|
||||
_curl_sys_ver=0.4.35
|
||||
_curl_ver=7.71.1
|
||||
_cargo_dist_version=0.46.1
|
||||
|
||||
build_options="static bindist"
|
||||
desc_option_bindist="Generate a tarball for bootstrap"
|
||||
|
@ -27,13 +25,6 @@ fi
|
|||
|
||||
if [ -z "$_build_static" ]; then
|
||||
makedepends+=" libgit2-devel"
|
||||
else
|
||||
distfiles+="
|
||||
https://github.com/alexcrichton/curl-rust/archive/curl-sys-${_curl_sys_ver}.tar.gz
|
||||
https://github.com/curl/curl/releases/download/curl-${_curl_ver//./_}/curl-${_curl_ver}.tar.gz"
|
||||
checksum+="
|
||||
305eba92fcc5005864b429f7b7801a96af2cb8cfeb57701c3047f679e33970d2
|
||||
59ef1f73070de67b87032c72ee6037cedae71dcb1d7ef2d7f59487704aec069d"
|
||||
fi
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
|
@ -54,78 +45,48 @@ else
|
|||
case "$XBPS_MACHINE" in
|
||||
i686)
|
||||
checksum+="
|
||||
c7b4045b2001be2e97b0b08dfaee02097aea0e8a9983b42585d733cfa1e69683"
|
||||
8931dba1c23405fe630aa4ca2aceaba7de74c21cc03947c757b349d004d6a4d6"
|
||||
;;
|
||||
x86_64)
|
||||
checksum+="
|
||||
84ba23058542691dae8157beec6a7679a420643eb6a708134bb1dfb01cbdebea"
|
||||
a27eb5d47b520ef2c554605bf789f80652af63531b4f6a1195d61b3dfd0f6e9c"
|
||||
;;
|
||||
x86_64-musl)
|
||||
checksum+="
|
||||
653cb60214d6f1000c9a7775111dccd093c0118e7f7bf5f2f1f53a7e5e2420b3"
|
||||
895a3b6928a5bf7b1ac28c339a85ddd078dd719f54245b8d845370baf8255368"
|
||||
;;
|
||||
ppc64le)
|
||||
checksum+="
|
||||
4f90cd6cbcf9e9d6ba11830e093092e4e6c3d156ffde2e729933869b7a039ff9"
|
||||
93354ae5cedaa75d44928d5e232cd9a57a9164cadf47d4a30493c05e60b59b7f"
|
||||
;;
|
||||
ppc64le-musl)
|
||||
checksum+="
|
||||
a85e8c9714a8bb7c17cd23993c677f51d9e0d6f5e85ab10f53ec1639b19bbbd4"
|
||||
12da677338f860362e00089fe5b67ecd619c0ae4a4ca2bd14e500df32f598f49"
|
||||
;;
|
||||
ppc64)
|
||||
checksum+="
|
||||
983e2fbec9c4bfe66bab37ad64cdd5b47918378e421d9bf639e938f120650199"
|
||||
eab0c2d96f863e3c87afc46d43c54df6614af333b98ee881278acf56d9bf3fe8"
|
||||
;;
|
||||
ppc64-musl)
|
||||
checksum+="
|
||||
f974893d1cac6c799345bece08c7f796eb50e1a77c4b9bc2a6451d161a57c660"
|
||||
48770d0f7941005c87c0ddf303a7eca2fcff4c56cfdaaf60b5d862dfeee2a59d"
|
||||
;;
|
||||
ppc)
|
||||
checksum+="
|
||||
48f4419300fe758ebe024e6449a5ca1dff07803047a815b3d3909170baa7adcc"
|
||||
034af894e980f642e31d35978d8cbb8839fe9c8f1119083a720a58f7ad7fb881"
|
||||
;;
|
||||
ppc-musl)
|
||||
checksum+="
|
||||
bbb93a757e75d09cb5f6d6dd837e32212acd8888426406352eccf52f329386f1"
|
||||
aac08878b9ce3bf7dff4247e988fdaddeaa410cccc8559f8e7e0fd45d8f2ece5"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# since curl-sys is somehow totally broken, we need to work around it
|
||||
#
|
||||
# the problem is basically that at least with curl-sys 0.4.35, the static-curl
|
||||
# option will make the build.rs copy curl source files from inside curl/ in the
|
||||
# source tree, but the directory is empty; there is logic in the build.rs that
|
||||
# checks for existence of '.git' inside curl/, and if it doesn't exist, it
|
||||
# runs 'git submodule update', which is supposed to clone a copy of curl into
|
||||
# the source tree from git, but a curl-sys release tarball is not a git repo
|
||||
# and does not contain .git or .gitmodules at all, so that just fails anyway
|
||||
#
|
||||
# so work around the whole mess by fetching our own curl-sys, our own copy of
|
||||
# curl itself, then arrange things appropriately, create the .git inside curl/
|
||||
# to fool build.rs into not trying to run git, and then patch Cargo.toml inside
|
||||
# cargo to use our patched tree...
|
||||
post_extract() {
|
||||
if [ -z "$CROSS_BUILD" ]; then
|
||||
mkdir -p target/snapshot
|
||||
cp ../cargo-${_cargo_dist_version}-${RUST_TARGET}/cargo/bin/cargo cargo
|
||||
fi
|
||||
if [ -n "$_build_static" ]; then
|
||||
mv ${XBPS_BUILDDIR}/curl-rust-curl-sys-${_curl_sys_ver} .
|
||||
mv curl-rust-curl-sys-${_curl_sys_ver}/curl-sys .
|
||||
rm -rf curl-sys/curl
|
||||
mv ${XBPS_BUILDDIR}/curl-${_curl_ver} curl-sys/curl
|
||||
mkdir curl-sys/curl/.git
|
||||
fi
|
||||
}
|
||||
|
||||
# see above
|
||||
post_patch() {
|
||||
[ -z "$_build_static" ] && return 0
|
||||
cat >> Cargo.toml <<- EOF
|
||||
[patch.crates-io]
|
||||
curl-sys = { path = './curl-sys' }
|
||||
EOF
|
||||
}
|
||||
|
||||
do_build() {
|
||||
|
@ -147,8 +108,6 @@ do_build() {
|
|||
|
||||
if [ -n "$_build_static" ]; then
|
||||
cargs+=" --features=all-static"
|
||||
$cargo update
|
||||
$cargo update --package curl-sys --precise ${_curl_sys_ver}
|
||||
fi
|
||||
|
||||
$cargo build --release ${cargs}
|
||||
|
|
Loading…
Reference in a new issue