Reapply "rust: rebuild with itself (#5574)"

This reverts commit 3852bfa99e.

now it's the time
This commit is contained in:
Maksim Bondarenkov
2025-08-19 09:08:09 +03:00
parent df438d69c8
commit 0de5e49e40
2 changed files with 6 additions and 23 deletions

View File

@@ -7,7 +7,7 @@ rust_dist_server=https://static.rust-lang.org/dist
pkgname=rust
pkgver=1.89.0
pkgrel=1
pkgrel=2
pkgdesc="Systems programming language focused on safety, speed and concurrency"
arch=('x86_64')
url="https://www.rust-lang.org/"
@@ -32,37 +32,22 @@ makedepends=('gcc'
'libzstd-devel'
'zlib-devel'
'libcurl-devel'
# TODO: rebuild with our Rust
#$([[ "$_bootstrapping" == "no" ]] && echo 'rust')
)
$([[ "$_bootstrapping" == "no" ]] && echo 'rust'))
source=("${rust_dist_server}/${pkgname}c-${pkgver}-src.tar.gz"{,.asc}
"bootstrap.toml")
noextract=(${pkgname}c-${pkgver}-src.tar.gz)
sha256sums=('2576f9f440dd99b0151bd28f59aa0ac6102d5c4f3ed4ef8a810c8dd05057250d'
'SKIP'
'66de9b211c5b5e4d211909ba127a57ed3fbf6b78dbaff266cbbb9e025ce72a3d')
'b6e07703a723efa0e59ef2dac0fae62473d14d67afab606a514a9555ab45b56e')
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>
# temporarily download stage0
if [[ ${_bootstrapping} == "no" ]]; then
_stage0_source="https://github.com/jeremyd2019/cygwin-rust-bootstrap/releases/download/rust-1.89.0-msys2"
source+=("${_stage0_source}/rust-1.89.0-x86_64-pc-cygwin.tar.xz")
sha256sums+=('448203e01a5bbe18e7f813dd5c029808ae4799330ef50d0791c94eb5a0220891')
fi
prepare() {
# workaround strange symlinking error during a build
export MSYS=winsymlinks:nativestrict
plain "Extracting ${pkgname}c-${pkgver}-src.tar.gz"
tar -xzf ${pkgname}c-${pkgver}-src.tar.gz || true
# copy binaries and library into a single location
if [[ ${_bootstrapping} == "no" ]]; then
mkdir -p stage0/{bin,lib}
cp -r rust-1.89.0-x86_64-pc-cygwin/{rustc,cargo,rustfmt-preview}/bin/* stage0/bin
cp -r rust-1.89.0-x86_64-pc-cygwin/{rustc,rust-std-x86_64-pc-cygwin}/lib/* stage0/lib
fi
}
build() {
@@ -73,9 +58,7 @@ build() {
cd "${pkgname}c-${pkgver}-src"
# substitute the values in bootstrap.toml
#export USR="/usr"
export PKGREL="${pkgrel}"
export SRCDIR="${srcdir}"
envsubst < ../bootstrap.toml > bootstrap.toml
if [ "${_bootstrapping}" = "no" ]; then

View File

@@ -8,9 +8,9 @@ change-id = 142379
link-shared = true
[build]
#cargo = "$SRCDIR/stage0/bin/cargo"
#rustc = "$SRCDIR/stage0/bin/rustc"
#rustfmt = "$SRCDIR/stage0/bin/rustfmt"
#cargo = "/usr/bin/cargo"
#rustc = "/usr/bin/rustc"
#rustfmt = "/usr/bin/rustfmt"
description = "Rev$PKGREL, Built by MSYS2 project"
submodules = false
build = "x86_64-pc-cygwin"