fetch cargo deps with new-style

some packages weren't updated in a while.
after migrating CLANG envs to gnullvm targets build fail with something like
``error: failed to download `windows_x86_64_gnullvm v0.48.5```
as old-style fetching assumes that only CLANGARM64 use gnullvm target
This commit is contained in:
Maksim Bondarenkov 2024-10-04 07:54:42 +03:00
parent a177e9ef50
commit f27dac25e7
9 changed files with 9 additions and 45 deletions

View File

@ -24,11 +24,7 @@ b2sums=('1c2ccbb21c7aad1d2c1daca7ed99009ec2e2a02a96dd8a73d6ba11d00291f0e81afdd79
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
local _target="${CARCH}-pc-windows-gnu"
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
_target="${CARCH}-pc-windows-gnullvm"
fi
cargo fetch --locked --target "${_target}"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {

View File

@ -20,11 +20,7 @@ sha256sums=('fea7b92922117ed04b9c84bb9998026264346768804f66baa40743c5528bed6b')
prepare() {
cd "${_realname}-${pkgver}"
local _target="${CARCH}-pc-windows-gnu"
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
_target="${CARCH}-pc-windows-gnullvm"
fi
cargo fetch --locked --target "${_target}"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {

View File

@ -26,11 +26,7 @@ prepare() {
sed -e "s/https:\/\/raw.githubusercontent.com\/podsvirov\/mdbook-pikchr\/master\///" -i README.md
sed -e "s/debug/release/" -i book.toml
local _target="${CARCH}-pc-windows-gnu"
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
_target="${CARCH}-pc-windows-gnullvm"
fi
"${MINGW_PREFIX}/bin/cargo.exe" fetch --locked --target "${_target}"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {

View File

@ -23,11 +23,7 @@ sha256sums=('550da7ff02ef62c60db6e813b6dbae65b9ed3d491186ea74929536feaceea94b')
prepare() {
cd "${srcdir}/${_realName}-${pkgver}"
local _target="${CARCH}-pc-windows-gnu"
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
_target="${CARCH}-pc-windows-gnullvm"
fi
cargo fetch --locked --target "${_target}"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {

View File

@ -25,13 +25,9 @@ prepare() {
cp -r "${_projectname}-${pkgver}" "build-${MSYSTEM}"
cd "build-${MSYSTEM}/minidump-stackwalk"
local _target="${CARCH}-pc-windows-gnu"
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
_target="${CARCH}-pc-windows-gnullvm"
fi
cargo fetch \
--locked \
--target "${_target}" \
--target "$(rustc -vV | sed -n 's/host: //p')" \
--manifest-path "../Cargo.toml"
}

View File

@ -25,11 +25,7 @@ sha256sums=('24e8b317cda9fb7df6fa7e596708145ca4052380d680fe712cc5871d25b7d485'
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
local _target="${CARCH}-pc-windows-gnu"
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
_target="${CARCH}-pc-windows-gnullvm"
fi
cargo fetch --locked --target "${_target}"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
patch -Np1 -i "${srcdir}/asciidoctor-use-full-path.patch"

View File

@ -31,11 +31,7 @@ prepare() {
# - ...and eventually it failes (problems with compiling using MSVC)
rm -f rust-toolchain.toml
local _target="${CARCH}-pc-windows-gnu"
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
_target="${CARCH}-pc-windows-gnullvm"
fi
cargo fetch --locked --target "${_target}"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {

View File

@ -26,11 +26,7 @@ prepare() {
tar -xzf "${_realname}-${pkgver}.tar.gz" || true
cd "${srcdir}/${_realname}-${pkgver}"
local _target="${CARCH}-pc-windows-gnu"
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
_target="${CARCH}-pc-windows-gnullvm"
fi
cargo fetch --locked --target "${_target}"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {

View File

@ -22,11 +22,7 @@ sha256sums=('2adc1dec0d2c63cbffa94204b212926f2735a59753494fca72c3cfe4001d472f')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
local _target="${CARCH}-pc-windows-gnu"
if [[ $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; then
_target="${CARCH}-pc-windows-gnullvm"
fi
cargo fetch --locked --target "${_target}"
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {