# Maintainer: PktSurf app=rust version=1.90.0 build=1sml homepage="https://rust-lang.org" download="https://static.rust-lang.org/dist/rustc-$version-src.tar.xz" desc="A safe, concurrent, practical language" requires="gcc-libs bash llvm clang gdb" # We don't want .rlib files to be removed preservestaticlibs=1 prepbuilddir() { arch="$HOSTTYPE" export arch mkandenterbuilddir rm -rf rustc-$version-src tar xf $srcdir/rustc-$version-src.tar.?z* cd rustc-$version-src fixbuilddirpermissions # If a rust toolchain does not already exist, extract and install one of the provided ready-to-use toolchains if [ ! -x /usr/bin/rustc ] ; then # Create a temporary directory that will house a prebuilt architecture-specific rust toolchain provided by rust developers for bootstrapping mkdir -p temp-toolchain cd temp-toolchain # Extract the toolchain into it tar xf $srcdir/$app-$version-$arch-unknown-linux-musl.tar.?z cd $app-$version-$arch-unknown-linux-musl # Now install the toolchain ./install.sh --prefix=/usr || true # Go back to the temporary build directory cd ../../ fi applypatch $srcdir/alpine-move-py-scripts-to-share.patch applypatch $srcdir/do-not-install-libunwind-source.patch applypatch $srcdir/gcc-eh-libunwind.patch applypatch $srcdir/need-rpath.patch applypatch $srcdir/need-ssp_nonshared.patch applypatch $srcdir/no-export-ld-library-path.patch cp $srcdir/config.toml . } build() { export RUST_BACKTRACE=1 export OPENSSL_NO_VENDOR=1 export RUSTFLAGS="-C opt-level=1" unset MAKEFLAGS python3 ./x.py dist -v -j4 DESTDIR="$pkg" python3 ./x.py install cp LICENSES/* LICENSE-* COPYRIGHT $pkgdocs/ find $pkg/usr/lib -name "*.so" -exec chmod 755 "{}" \+ if [[ -x /usr/bin/rustc ]] && [[ -d temp-toolchain ]]; then # Remove the temporary toolchain cd temp-toolchain/$app-$version-$arch-unknown-linux-musl ./install.sh --uninstall --prefix=/usr fi mkfinalpkg } sha512sums=" eac9e504c3dc230a3923cbfab01d4ce3d5639f7c8213d8c8c3e007fa6045e1f56a4f5e6ddbe2e6259fbbac2a3944e8b351d270d4f8ce20aa8e4843a7572e8931 rust-1.82.0-x86_64-unknown-linux-musl.tar.xz 2e219eec7b28a60e9bd160972042316460d91fe60f755c625bee30724059f4f9c4a29d567bea54718f9b8d739cc1c81cb4dedff0c868270861c866452d5cf8a3 rust-1.83.0-x86_64-unknown-linux-musl.tar.xz fffdfd588b20aa518f361f6e4f6c32844d377356d520f8bd1b9f8a7e062be5c2db5e736a2b93619b2d0f182f49eeeaa22075e4692c7683c0ecb4a231522d4cbd rust-1.90.0-x86_64-unknown-linux-musl.tar.xz 64db57949c6ac1df6a3f4c6bd0938685a5fb1bc3d318b34ccfcfccb0f9eff1cffd4d8a53a190ef0409eeca9ad12bc6234c2c1de69196cc74ae02d6afa20d0ce6 rustc-1.83.0-src.tar.xz fb0798b4c7450754db2fcbb641202909d209c6db2d9181d7df7282217b8320dc52f5e9853de9d7bdb79177f1f920389450cab07674dea5fb5501eaab5816662a rustc-1.90.0-src.tar.xz 9de9d7ad05584e3cafddedcac409a4605a1d67e82260220deb3efd965603ee3148062b081c0cd736e50d82daad3a723fb6a7493fdf4dddfe36288645425a7946 alpine-move-py-scripts-to-share.patch 0d9e5ee4ebf647d3c44dc59b8991d330f2eb0cfa788768c5c9c5f5b57327c3a46b26e93641753a32335d0e3e76a0ab95bb6ad8279913b0c76c752624b139c5c1 do-not-install-libunwind-source.patch ed434a60a1d1e4c73718d44f81b871da7daaeef484a23061bb3f5d1d302cb9aaf641451584b8b24b71e7b379c332880ee646b53b5ac74d20df2d2c214144ce92 gcc-eh-libunwind.patch 70ae2a84704c0329014889948520cb6562349ab8894caa13e80cdd766ef071a017649b5f0983aade50b97fc235f37010c2a9399dc55500aa0176366f82bc938d need-rpath.patch ed79be7188505f6706d868ae9dfbf97b61d9fd014a97db1664a85dc4538684bdfe252060d4b71d834fc43672b4f1e0d6406a121a40df8425ac7e074d32bd62ca need-ssp_nonshared.patch 946cf1978a7dd225ad0468d96912c5e585ae6cb7bcc2fb2ee228965517d6581afc303dafce80c06a62250823f37fd5c8d2dbc5927bfac650a4da16bf90415dc2 no-export-ld-library-path.patch 74c0d14a68c2d7355f15ec3704d387556ad337e4991831e94951906d17aeb60387d20586a63cf6cdc62b46c60e1874340a250196ec2b3e75c268af1c41fae7e9 revert-rustc_codegen_ssa-use-try_canonicalize-in-rpath.patch "