Skip to content

Commit

Permalink
Merge pull request msys2#17979 from mati865/simplify-rust-packaging
Browse files Browse the repository at this point in the history
Rust: upgrade to 1.71.1 and replace patch with config options
  • Loading branch information
lazka authored Aug 7, 2023
2 parents 748578f + 881e535 commit ae4f068
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 61 deletions.
46 changes: 0 additions & 46 deletions mingw-w64-rust/0004-unbundle-gcc.patch

This file was deleted.

25 changes: 10 additions & 15 deletions mingw-w64-rust/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-rust-docs")
pkgver=1.71.0
pkgver=1.71.1
pkgrel=1
pkgdesc="Systems programming language focused on safety, speed and concurrency (mingw-w64)"
arch=('any')
Expand All @@ -35,19 +35,19 @@ options=('staticlibs' 'strip')
noextract=(${_realname}c-${pkgver}-src.tar.gz)
source=("https://static.rust-lang.org/dist/${_realname}c-${pkgver}-src.tar.gz"{,.asc}
"0001-rustc-llvm-fix-libs.patch"
"0004-unbundle-gcc.patch"
"0005-win32-config.patch"
"0007-clang-subsystem.patch"
"0008-disable-self-contained.patch"
"0011-disable-uac-for-installer.patch")
sha256sums=('a667e4abdc5588ebfea35c381e319d840ffbf8d2dbfb79771730573642034c96'
"0011-disable-uac-for-installer.patch"
"https://github.com/rust-lang/rust/commit/cf4fcf82e17987949f422b8a26ae8425f87f4022.patch")
sha256sums=('6fa90d50d1d529a75f6cc349784de57d7ec0ba2419b09bde7d335c25bd4e472e'
'SKIP'
'7cb1773c288ffb1c1e751edc49b1890c84bf9c362742bc5225d19d474edb73a0'
'15d897850d474afd004b071926a81f1f72b13330d0b56d565090b10f868cc766'
'7d1c4e49524b835a8eadc961b39f5594b12a522a1e24368999be2c7e85399e4e'
'3388c413fffeeaa84f775a176b1653b360ffba7b0c0a6f5baa0c3a95aec8827a'
'a214cd8394ab7416fd170c7fa05daf701a5357d38e4e54149370e6efff208e50'
'951f6278ce661136912be343ef50047ef46c409313050c711978651b301e80dd')
'951f6278ce661136912be343ef50047ef46c409313050c711978651b301e80dd'
'b93c75580caadee58ff28601d8ed4aa83e9ba37f3aa2dd7215e09f71cdee3fe6')
validpgpkeys=('108F66205EAEB0AAA8DD5E1C85AB96E6FA1BE5FE' # Rust Language (Tag and Release Signing Key) <rust-key@rust-lang.org>
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard <tstellar@redhat.com>
'B6C8F98282B944E3B0D5C2530FC3042E345AD05D') # Hans Wennborg <hans@chromium.org>
Expand All @@ -59,9 +59,6 @@ if [[ $_bootstrapping != "no" && $MINGW_PACKAGE_PREFIX == *-clang-aarch64 ]]; th
source+=("https://github.com/mati865/rust-gnullvm-builds/releases/download/${_stage0version}-v2/cargo-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz"
"https://github.com/mati865/rust-gnullvm-builds/releases/download/${_stage0version}-v2/rust-std-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz"
"https://github.com/mati865/rust-gnullvm-builds/releases/download/${_stage0version}-v2/rustc-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz")
sha256sums+=('5a72ff6d89277c96f72cb7de7f35c4a3b4686b3dc6ea0d4966883e83179db0a8'
'0a5087acf06faa2a02ff7f41afb7be42b22575a2ff0b3f790b6bb64418f3ea5d'
'96c7877b4821fe7bb4aaa35aa8f2056d19d622902d6583d0aef8a35f3fef8dbb')
noextract+=("cargo-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz"
"rust-std-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz"
"rustc-${_stage0version}-dev-aarch64-pc-windows-gnullvm.tar.xz")
Expand All @@ -85,9 +82,9 @@ prepare() {
cd ${srcdir}/${_realname}c-${pkgver}-src
apply_patch_with_msg \
0001-rustc-llvm-fix-libs.patch \
0004-unbundle-gcc.patch \
0005-win32-config.patch \
0008-disable-self-contained.patch
0008-disable-self-contained.patch \
cf4fcf82e17987949f422b8a26ae8425f87f4022.patch

if [[ $MINGW_PACKAGE_PREFIX == *-clang-i686 || $MINGW_PACKAGE_PREFIX == *-clang-x86_64 ]]; then
apply_patch_with_msg \
Expand Down Expand Up @@ -171,6 +168,7 @@ build() {
--enable-extended \
--disable-llvm-static-stdcpp \
--disable-codegen-tests \
--set='dist.include-mingw-linker=false' \
--llvm-root=${MINGW_PREFIX} \
--python=${MINGW_PREFIX}/bin/python \
"${_rust_conf[@]}"
Expand All @@ -190,9 +188,6 @@ build() {
# move docs out of the way for splitting
mv dest-rust/${MINGW_PREFIX}/share/doc dest-doc

rm -f dest-rust/${MINGW_PREFIX}/bin/libgcc*.dll
rm -f dest-rust/${MINGW_PREFIX}/bin/libstd*.dll
rm -f dest-rust/${MINGW_PREFIX}/bin/libwinpthread*.dll
rm -f dest-rust/${MINGW_PREFIX}/lib/rustlib/$OSTYPE/lib/self-contained/*
}

Expand Down Expand Up @@ -222,7 +217,7 @@ package_rust() {
rm components install.log manifest-* rust-installer-version uninstall.sh

install -d "$pkgdir/${MINGW_PREFIX}/share/bash-completion/completions"
mv "${pkgdir}${MINGW_PREFIX}/src/etc/bash_completion.d/cargo" \
mv "${pkgdir}${MINGW_PREFIX}/etc/bash_completion.d/cargo" \
"${pkgdir}${MINGW_PREFIX}/share/bash-completion/completions/cargo"

}
Expand Down

0 comments on commit ae4f068

Please sign in to comment.