# Template file for 'rust' pkgname=rust version=1.15.0 revision=1 # NB. if you push any(!) new version, don't forget to put a build # output of musl to https://repo.voidlinux.eu/distfiles/ wrksrc="rustc-${version}-src" lib32disabled=yes patch_args="-Np1" build_style=configure make_build_args="dist VERBOSE=1" only_for_archs="i686 x86_64 x86_64-musl" hostmakedepends="cmake curl pkg-config python" makedepends="libffi-devel lld-devel llvm ncurses-devel zlib-devel" short_desc="Safe, concurrent, practical systems language" maintainer="Leah Neukirchen " homepage="http://www.rust-lang.org/" license="MIT, Apache-2.0" distfiles="https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz" checksum=33f3747d231ede34b56c6cc0ae6be8cbaa29d2fdb39d86f25693dceb9fc5f164 case "$XBPS_MACHINE" in x86_64-musl) distfiles+=" https://repo.voidlinux.eu/distfiles/rustc-1.14.0-x86_64-unknown-linux-musl.tar.gz https://repo.voidlinux.eu/distfiles/rust-std-1.14.0-x86_64-unknown-linux-musl.tar.gz https://alpine.geeknet.cz/distfiles/cargo-0.11.0-nightly-x86_64-alpine-linux-musl.tar.gz" checksum+=" 0976d4d64a4b6c61d0706239880ec8c35cb4a3c46919474019c2e1d51900222b 51147baa27f5eef372fe946f695df3f269ede92559ac3e519a794397c0fff347 587172026c0565e839d96b0c1d4c68c000927817398241f96682dca47fa8c3b9" ;; x86_64) # extract from src/stage0.txt distfiles+=" https://static.rust-lang.org/dist/2016-12-18/rustc-1.14.0-x86_64-unknown-linux-gnu.tar.gz https://static.rust-lang.org/dist/2016-12-18/rust-std-1.14.0-x86_64-unknown-linux-gnu.tar.gz https://static.rust-lang.org/cargo-dist/2016-11-28/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz" checksum+=" 3df0ba1f65366e9220788b13ff0b91a2c3e46bfde196d54b233038157d040a9e 08f8cde5c305ba22052871292336d63cb493cbf38bb050ab0b8496a3536cac1c 8ecf9bca3ece59ee291afda5fd8c371739d0d52771912c5da0d909fd9d130b3f" ;; i686) # extract from src/stage0.txt distfiles+=" https://static.rust-lang.org/dist/2016-12-18/rustc-1.14.0-i686-unknown-linux-gnu.tar.gz https://static.rust-lang.org/dist/2016-12-18/rust-std-1.14.0-i686-unknown-linux-gnu.tar.gz https://static.rust-lang.org/cargo-dist/2016-11-28/cargo-nightly-i686-unknown-linux-gnu.tar.gz" checksum+=" af22508823865245dc1c451d79679c33898092573608017b5b4b764b1dfe205e 6ddbcb00893645d9c06ef2f82d60e516e618cfed03abe6deb0a18be7914d3394 8fb0cacdd2ab32b8dbdf74ae63914e1f97baf8bac0e8c1db1414a57677b93f88" ;; esac post_extract() { rm -rf src/llvm mkdir -p stage0 cp -flr ../rustc-*/rustc/* stage0 cp -flr ../rust-std-*/rust-std-*/* stage0 cp -flr ../cargo-*/cargo/* stage0 # XXX: Cheat Rust build system so we can build rustc using different # version of (prebuilt) stable rustc than preconfigured. It's hack-ish, # but since we're basically rebuilding rustc with the same version, # it's actually safe. # Note: --enable-local-rebuild from #33787 didn't work, don't know why. export LD_LIBRARY_PATH="$wrksrc/stage0/lib" rustc_ver="$($wrksrc/stage0/bin/rustc --version | cut -f2 -d ' ')" rustc_key="$(printf "$rustc_ver" | md5sum | cut -c1-8)" sed -Ei \ -e "s/^(rustc):.*/\1: $rustc_ver-1970-01-01/" \ -e "s/^(rustc_key):.*/\1: $rustc_key/" \ src/stage0.txt # Generate config for bootstrap.py to use our prebuilt rustc and cargo # for bootstrapping instead of downloading snapshot from internet. cat > config.toml <