Skip to content

Commit

Permalink
fetch cargo deps with new-style
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ognevny committed Oct 4, 2024
1 parent a177e9e commit f27dac2
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 45 deletions.
6 changes: 1 addition & 5 deletions mingw-w64-hexyl/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 1 addition & 5 deletions mingw-w64-hyperfine/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 1 addition & 5 deletions mingw-w64-mdbook-pikchr/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 1 addition & 5 deletions mingw-w64-mdbook/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 1 addition & 5 deletions mingw-w64-minidump-stackwalk/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
6 changes: 1 addition & 5 deletions mingw-w64-repgrep/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
6 changes: 1 addition & 5 deletions mingw-w64-ripgrep-all/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 1 addition & 5 deletions mingw-w64-ripgrep/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 1 addition & 5 deletions mingw-w64-sd/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

1 comment on commit f27dac2

@ognevny
Copy link
Collaborator Author

@ognevny ognevny commented on f27dac2 Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no rebuild, just to prevent future confusions

Please sign in to comment.