diff options
Diffstat (limited to 'user/rust/APKBUILD')
-rw-r--r-- | user/rust/APKBUILD | 151 |
1 files changed, 55 insertions, 96 deletions
diff --git a/user/rust/APKBUILD b/user/rust/APKBUILD index 71c68ec18..ede75b2d8 100644 --- a/user/rust/APKBUILD +++ b/user/rust/APKBUILD @@ -1,21 +1,27 @@ # Maintainer: Samuel Holland <samuel@sholland.org> pkgname=rust -pkgver=1.60.0 -_bootver=1.60.0 -_llvmver=14 +pkgver=1.80.0 +_bootver=1.79.0-r0 +_llvmver=18 pkgrel=0 pkgdesc="The Rust Programming Language" url="https://www.rust-lang.org" arch="all" -options="!check" # Failures on aarch64 and ppc64. +#options="!check" # Failures on aarch64 and ppc64. license="(Apache-2.0 OR MIT) AND (NCSA OR MIT) AND BSD-2-Clause AND BSD-3-Clause" depends="$pkgname-std=$pkgver-r$pkgrel gcc musl-dev" +# debuginfo-gdb tests fail due to security settings +# node makes Rust think it can do rustdoc-gui tests which require many NPM pkgs +checkdepends="!gdb !node" makedepends=" curl-dev llvm$_llvmver-dev llvm$_llvmver-test-utils openssl-dev python3 + cargo-bootstrap=$_bootver + rust-bootstrap=$_bootver + rustfmt-bootstrap=$_bootver zlib-dev " provides="$pkgname-bootstrap=$pkgver-r$pkgrel" @@ -33,66 +39,43 @@ subpackages=" cargo-doc:_cargo_doc:noarch cargo-bash-completion:_cargo_bashcomp:noarch cargo-zsh-completion:_cargo_zshcomp:noarch - rls rustfmt " -_targets=" - aarch64-foxkit-linux-musl - armv7-foxkit-linux-musleabihf - i586-foxkit-linux-musl - powerpc-foxkit-linux-musl - powerpc64-foxkit-linux-musl - x86_64-foxkit-linux-musl - " source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.xz 0001-Fix-LLVM-build.patch 0002-Fix-linking-to-zlib-when-cross-compiling.patch 0003-Fix-rustdoc-when-cross-compiling-on-musl.patch - 0004-Use-static-native-libraries-when-linking-static-exec.patch - 0005-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch - 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch - 0007-Link-libssp_nonshared.a-on-all-musl-targets.patch - 0008-test-failed-doctest-output-Fix-normalization.patch - 0009-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch - 0010-test-use-extern-for-plugins-Don-t-assume-multilib.patch - 0011-Ignore-broken-and-non-applicable-tests.patch - 0012-Link-stage-2-tools-dynamically-to-libstd.patch - 0013-Move-debugger-scripts-to-usr-share-rust.patch - 0014-Add-foxkit-target-specs.patch - 0015-Use-OpenPOWER-ABI-on-BE-PowerPC-64-musl.patch - 0040-rls-atomics.patch + 0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch + 0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch + 0006-Link-libssp_nonshared.a-on-all-musl-targets.patch + 0007-test-failed-doctest-output-Fix-normalization.patch + 0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch + 0009-Ignore-broken-and-non-applicable-tests.patch + 0010-Link-stage-2-tools-dynamically-to-libstd.patch + 0011-Move-debugger-scripts-to-usr-share-rust.patch + 0012-Add-foxkit-target-specs.patch + mir-opt-tests-endianness.patch powerpc-atomics.patch + ppc64-abi.patch + stdarch-ppc.patch + test-be.patch + ui-test-strings.patch " -for t in $_targets; do - source="$source - https://distfiles.adelielinux.org/source/rust/cargo-$_bootver-$t.tar.xz - https://distfiles.adelielinux.org/source/rust/rust-std-$_bootver-$t.tar.xz - https://distfiles.adelielinux.org/source/rust/rustc-$_bootver-$t.tar.xz - " -done builddir="$srcdir/rustc-$pkgver-src" _rlibdir="/usr/lib/rustlib/$CTARGET/lib" prepare() { default_prepare + # These tests require Node and various NPM packages. + rm -rf "$builddir"/tests/rustdoc-* - $srcdir/cargo-$_bootver-$CBUILD/install.sh \ - --destdir=$srcdir/prebuilt \ - --prefix=/ \ - --disable-ldconfig - $srcdir/rust-std-$_bootver-$CBUILD/install.sh \ - --destdir=$srcdir/prebuilt \ - --prefix=/ \ - --disable-ldconfig - $srcdir/rustc-$_bootver-$CBUILD/install.sh \ - --destdir=$srcdir/prebuilt \ - --prefix=/ \ - --disable-ldconfig + # Tests depend on FP precision that can't be given on i586: #1259 + rm -f "$builddir"/tests/ui/traits/object/print_vtable_sizes.rs + rm -f "$builddir"/tests/ui/traits/object/print_vtable_sizes.stdout } build() { cat > config.toml <<- EOF - changelog-seen = 2 [build] doc-stage = 2 build-stage = 2 @@ -100,9 +83,9 @@ build() { build = "$CBUILD" host = [ "$CHOST" ] target = [ "$CTARGET" ] - cargo = "$srcdir/prebuilt/bin/cargo" - rustc = "$srcdir/prebuilt/bin/rustc" - rustfmt = "$srcdir/prebuilt/bin/rustfmt" + cargo = "/usr/bin/cargo" + rustc = "/usr/bin/rustc" + rustfmt = "/usr/bin/rustfmt" docs = true compiler-docs = false submodules = false @@ -110,7 +93,7 @@ build() { locked-deps = true vendor = true extended = true - tools = [ "analysis", "cargo", "clippy", "rls", "rustfmt", "src" ] + tools = [ "analysis", "cargo", "clippy", "rustfmt", "src" ] verbose = 1 sanitizers = false profiler = false @@ -121,7 +104,7 @@ build() { optimize = true debug = false codegen-units = 1 - debuginfo-level = 2 + debuginfo-level = 1 debuginfo-level-rustc = 0 debuginfo-level-tests = 0 backtrace = true @@ -162,7 +145,7 @@ build() { check() { LLVM_LINK_SHARED=1 \ - python3 x.py test -j ${JOBS:-2} --no-doc --no-fail-fast + python3 x.py test -j ${JOBS:-2} --no-doc tests/ui } package() { @@ -294,16 +277,9 @@ _cargo_doc() { "$subpkgdir"/usr/share/man/man1 } -rls() { - pkgdesc="The Rust language server" - license="Apache-2.0 OR MIT" - depends="$pkgname-std=$pkgver-r$pkgrel" - - _mv "$pkgdir"/usr/bin/rls "$subpkgdir"/usr/bin -} - rustfmt() { pkgdesc="Format Rust code" + provides="rustfmt-bootstrap=$pkgver-r$pkgrel" depends="$pkgname-std=$pkgver-r$pkgrel" _mv "$pkgdir"/usr/bin/rustfmt "$subpkgdir"/usr/bin @@ -315,39 +291,22 @@ _mv() { mv "$@" } -sha512sums="d0c113e8c2c67bf10773c9403dc4c4700c4deb2fb287bfec51e565d3473d2b481d8ae2c90b272cd67b3a87d7443ea25a34c7b40ba8cd7106bf5d71126ab141c3 rustc-1.60.0-src.tar.xz -c65d52bbc3745fcc5c4fd314cc7f00be6778579983002d3f8d173611d034686293f318b07e3327d2d09d2e81f092c2f287d6aede7494e94f12e99d2575875e27 0001-Fix-LLVM-build.patch -e28d0f44ab0b4af68ed8fbef394ca362bdbbfee7011342bfd5e4195069e716b581bd50e21494ce51f6d8f7a4797d1342fb807c910a275fb394ca503f345a8664 0002-Fix-linking-to-zlib-when-cross-compiling.patch -7d174cd27e618212e534459455b9017636f56e9a9db81413a714f718a988a9d1fc7b4c0b98d4a2f0b1971d662c7df98be370e0d10e81d3e50d37589fe3b671fa 0003-Fix-rustdoc-when-cross-compiling-on-musl.patch -0ea1605f7e7b94a317cead8b2552fa0d95b6bd41a4727d892fa284ccb5b718aa32a625abcaa4c651a324437c4c06e53da464c6cb21518663bda05ded4ba12815 0004-Use-static-native-libraries-when-linking-static-exec.patch -dad4fc3ece2e093ed90e10b04a7c1fcdcec3e6fcfc5818401db19ec20365f581dc2ed1f771abca64e24edf3e6bc9c67fbecb85e1470a00359a00a47eab3b45f6 0005-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch -65116731811c178e980b1d980d524645897bc3f81e9f9ad8051235fa4bad7bbf20519173057e9d7b3f9c8459cc35dd2902c7ccd9e5070587848ea9886793ea35 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch -21550b68581c46847ccd5fb20551441b8ce41e948a596bfaffa6f81fcb1a273756e76bcf7ac033241b248b93661a09a9962ae7ffd93b7850d13e5e51695ec705 0007-Link-libssp_nonshared.a-on-all-musl-targets.patch -9242b001e8c4a9ae5a7a726e43724c3e07813e3105fae50efab5f289f15fb6493cb6f15694f5a0289d5a7effc0704f2fe715af981c50d54a805393c0c72e2cf7 0008-test-failed-doctest-output-Fix-normalization.patch -45bcce759138df475f8fbeb8089420bd38a399f5a018ebdf6d5a79e7c714c9ec770c765c32dda0ab4e368c5dd226f474b6894d70b14e41bea57284eeeb1a2f58 0009-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch -23f622841ba2030b02f52ed560c4be6800469e8021aa71842a702860c97b90edadf5de593ea4f6b9a158d7d0e4c83b52b419f770a8dac2b69633d643468c54d5 0010-test-use-extern-for-plugins-Don-t-assume-multilib.patch -73282af6c50155a29c2c98117a1ce6d28be42d04c25dc8ea2388de6923361fb7ae44d16bb81c57bb3d326d434f11ae6cdf72b8a0293421e8d0eaa931398e52d3 0011-Ignore-broken-and-non-applicable-tests.patch -2f139d1d544b2f1248f352bf3cadb93ca5935338a671480045979579ebab8f0f6b8f7509256fb0f31083291c58310f83c32b9034ca2229dd6dbacb6a743eae74 0012-Link-stage-2-tools-dynamically-to-libstd.patch -62b08c73e62da98fa02c26f47a5009f9ebcab95090d51cc55ae005827f366de5b556c32c995f55f9025fadeff4e0485ed0908526845a02abe5ae8b1b86839130 0013-Move-debugger-scripts-to-usr-share-rust.patch -530bae858f9db0049f4b4666afb05cadf25f37181597274a7a456fc51b32f04523da75ee7ab9ab1d8226c7e7ddd2b771bb9d2052cab430e482d2d1ee6b34eafc 0014-Add-foxkit-target-specs.patch -7fee0667793d5d5ee5cb600e24129c81de50511814e8f1a2f16bb47350087c5f42a01671415b10b01e414e9ff03008892a35c6cb616737175217bdccd1fa3f1e 0015-Use-OpenPOWER-ABI-on-BE-PowerPC-64-musl.patch -a2a05a64ca57dcde23c11ed8bd6ce530d80b99464c895c256b4e9cba02997121205a091de43f516563d5d618ea522d89639507ba94961807ada743a3099fe8d8 0040-rls-atomics.patch -99db0614b821a1ef767f68396253f7a620a491adf29ea01887cf4614e4dbb63c2544e1d7a6ad63a629995a2093cb26b4013f9a321dab65a235187e825c51c6a8 powerpc-atomics.patch -d9140531c720f128371a7abe1b15dcafd44859e52ef64c18cbebad16fa60bb928671eced22ef2b6ec46e2826bc7a1f4e1eeffcd5f187b26b74b41e543d515a01 cargo-1.60.0-aarch64-foxkit-linux-musl.tar.xz -b620eb8855190bb6d56d79decfef1bc90f073fb11f61cf236443c43b774502499735cc18b778886df226bdffbb834bc39ef8c910877849600377c97d0ba33cee rust-std-1.60.0-aarch64-foxkit-linux-musl.tar.xz -d436a1b5bccac1917ba8ef3110c66e81d146369833729081ffb56004fbbde2becee871dc636f13b722517fb443e74d8f532c7eaa92f8e1f65608c9f5bd2d5ab3 rustc-1.60.0-aarch64-foxkit-linux-musl.tar.xz -114063a3624c2c7bc65f4176209baa13cf633a64b75fc7c962cc999f5caf3ee5b9f60e3ad2c6a93df3ea1e00ac45259ad076d8ec04a0e4d9511b21c804ae5eb5 cargo-1.60.0-armv7-foxkit-linux-musleabihf.tar.xz -9819a4f9e7c8125896cd42fed02e84678218937cd0a8758e5b16011d4486305211b777c191cc1f9ac68f3100b7b94bd6a874a3f5f63400851bac90db055c9f6b rust-std-1.60.0-armv7-foxkit-linux-musleabihf.tar.xz -40a57b5a05e31145e7664db674c8793ab874cd651bcd7577aea9225904413f085086102abfe244bdc78b19b8d6e6d0bc3a7009294b9021a1befa8f2f0216f68d rustc-1.60.0-armv7-foxkit-linux-musleabihf.tar.xz -9c8679b6611a4b356e500fe4f4b1b3523db09ddf9abec9b39ca2e0436a0b34558790348f7594132a8a5d6b8d4390a24252ae9afa7c16962f7b3609fa970c9775 cargo-1.60.0-i586-foxkit-linux-musl.tar.xz -a37fa51e63cfbb357b197f8c4d0ba3673e8eee5bd788cca8a79836248451f6e34304bc93960b758848089e2c99d6ae8fd20ad9f9838af53b2243d396666f6ea9 rust-std-1.60.0-i586-foxkit-linux-musl.tar.xz -b66f58da3a9f72a051342df3e57e4a204f44570c5e05c2bd2e00d22051403fac57f0edbaf595d05f1d57ac91dcb5bdab01a32c081b9b4d45c9768f58fff85a0e rustc-1.60.0-i586-foxkit-linux-musl.tar.xz -649c554666a2ed39db0176daf1f76ea51093cf2aa56c692830cff22c9e79ce622be9117c1026efed5a0fdcbe65efe57f5233cc2e88126dc708527f8ee9d03687 cargo-1.60.0-powerpc-foxkit-linux-musl.tar.xz -f262de70c936bc33ec4836a66f0320ca0a99b19c8996174dba2596a4d373cfe6e19acfe12b255fbd0fe54fe2a8a5ca31e85f7974c3504d58b219f6bca6164efa rust-std-1.60.0-powerpc-foxkit-linux-musl.tar.xz -f52d03674577fca4b48f9ea3d5d60170a63a4f378ab8cdffca62bb3c6e9850371ad37d125bdf155e15edae1ca7a86ef7bef6ec02216755a96cef35f3a98cdb50 rustc-1.60.0-powerpc-foxkit-linux-musl.tar.xz -8a70eec1ccbad10022b6bbdd4c2be096130fdccad776f21608c074653afc3dc68aee0ee2475d9df877c447109584d36f94936dc22eead3700b6cee59ac5ae7e8 cargo-1.60.0-powerpc64-foxkit-linux-musl.tar.xz -72848344807e1dff8b872848c7449631397f8167619a6916ffeb4e0a43ecc394ec32c407cf2c7a85613690abba1d39087568a307f99e0e5a9afe656133c85765 rust-std-1.60.0-powerpc64-foxkit-linux-musl.tar.xz -7ce9d9b10e50e96b377fe1e3e1bab2b422432b234fe217c2df5bbd766d384bdeceb015e0a847a45ab2906144e09cdd2d95857941a4f46ede78597d04438e7aa5 rustc-1.60.0-powerpc64-foxkit-linux-musl.tar.xz -249322775192152da6578122cd608cc2649edbbb9df54ea1132b2ec0b353b4ad9e2ac3295c8fb32777b3a255a4a8569feca4a63f5e1723299f53265a9d32945a cargo-1.60.0-x86_64-foxkit-linux-musl.tar.xz -c55fb5896fdabd091f14dfdb872cec249358dfffe8a5fd8987a3ee193cdfc741dd47e5577718e00386abf4015e0717747cc377d11a467f8774a4d0e9cd4657a9 rust-std-1.60.0-x86_64-foxkit-linux-musl.tar.xz -f63c79a5f51c5369747d2bc3bccd06ddac3d2c36b68fd058f499217d64abddad00902c5b59be4601bd587ff9761fc95f9af8a6182868b125d9a9fdae80db4ade rustc-1.60.0-x86_64-foxkit-linux-musl.tar.xz" +sha512sums="548522599122bdff739472c1d120dcff8de171d6f4155c2fb73e47c7d80431694ceceb0439f36ef2a7bea23ac5a76de8e1f75fcade1f3ff2c3fca0ab21e6197a rustc-1.80.0-src.tar.xz +b701f9ae32c4e62dde7ecaef40a9083f6253d83dcd3821c6ce86784fb439b11c5b908e42b4d9eff9ebe8860b3b4673c489ff8e6b4828e15df02756e4c8985c94 0001-Fix-LLVM-build.patch +1f976da43d99ff58b7d8716e594485e191c2df43ab4c75123a223ae0cfcca0c129281575d2bee5996faf10f9008357d30c48876a491b62bdd722c83c4f3d35d2 0002-Fix-linking-to-zlib-when-cross-compiling.patch +619a0150bdc59ef8d844e9eff907e51015003164d17012b38bcac642618efb65e25ea4b1ead06d4b023caf02d4eb8dbd481daa04b42d0002a9986f05854c0ca4 0003-Fix-rustdoc-when-cross-compiling-on-musl.patch +cfd8cfc1a8af2a8319ae9bd4ed14b1ef22d429e99da4237ea7d037d6fa556174db6b47e9268c8c258e08b7a71d8c2370cce8445c3dd994a07e4699705f2ae2de 0004-Remove-musl_root-and-CRT-fallback-from-musl-targets.patch +6868fe48b7424d39c94ea560037ab4154a0b8f20a027617433d912a5ec60cf0bf1a49da165009345b75f8aedf7d0f81dd23135f9bb28d3f5cd081b56aa74a986 0005-Prefer-libgcc_eh-over-libunwind-for-musl.patch +b34187a82cd3db02b8aac8f18147d653a7191b841e145460dfbff518a7747a6aa1c08721703929bfc7e446c9ed9512383a5eefaad2cb5c02d16e8f00d12627db 0006-Link-libssp_nonshared.a-on-all-musl-targets.patch +e13020274290c1149b7fcf3a119cc34d7f6b64abaa69d6ac9a8780569c4f44041c40b915da6e9675cc7e0ee05d42b13e14608fbab6eac6d3547428bf21f4e9f2 0007-test-failed-doctest-output-Fix-normalization.patch +6850174cebb3dfb2f41e277b0b46db9cabe18c904f39a6775f8cd12dc6c237a7de820a5dc8c538f9b965c069b4197141f0613add096574a7df4ca2d1ae01ab4d 0008-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch +f98ae741a9f33a0e3541c6c43a3eb86b653b202d70783435ea2cc1b35c1da8b6db796e9217e243050de05b9ea2520600c5e890481d2366a1da742aad3482fab2 0009-Ignore-broken-and-non-applicable-tests.patch +6b68d068d7653b81590f7a0bd5359868c0ce48fa3eda467cac9dbfcead7b566ab27489ee923b024e71294130a17b1f2efc1a06a8effc93ea4a4d5a43ec8d091d 0010-Link-stage-2-tools-dynamically-to-libstd.patch +c6d94cbb80394d270302a2389c22b528583c4ad7298c7b3f657175912e0abd075b45ec847daa2c8e6e4eb38536a8a37461cd15d78c0f83771d816f11e1cf2e01 0011-Move-debugger-scripts-to-usr-share-rust.patch +690d12d2b983f82fadad1ff661887852227871787d8b4f5dff7de96ac94dbb7d64887e19258fa146e8cf1e6356cffa6e5954739e9e133165e8d2c970c6f47a84 0012-Add-foxkit-target-specs.patch +e8561c9ceadf121239ad13496e4baeca6a93e29bb99bc2d37d9e1919caaf0e2456219a0e3d3cd88af281b2b9d23c735597f1ee05cc99daa690961397aa28efa6 mir-opt-tests-endianness.patch +5d57a7a18e0a7f8b7755de89255f97642e4fe585a02465de70227867ac99db84766cd25e702ae13c3a4488504bd4c84eb7e9ceb3a83fdf8f2df0eacf64cc16c1 powerpc-atomics.patch +4d21e0e04768e19f1d93ee54d787ed1c4c6fe1e7cab91c92413caa22765f96843f9d98ccb014210d893b3a6bb3246b6fba60b8d6d8a832fedbeff50803225b81 ppc64-abi.patch +63592425a6f68046b75148a25289ff1b8b6a7db02ca0aa7c97d35697f18267a6adeb8be3136c8fd930704352d5528e70b0d57f79bac39b9331953174f76d5919 stdarch-ppc.patch +07591c0b6731349093aee868723ab526391a6dda946e9dd442428d878e3d5f23223277778ea71860f0101cac23f47e7973f36d4fd88cf5d3e3ad95e9d6b07b27 test-be.patch +c1cdcff68504e5b7b9d5f3081c83c8d8855d9523cc3539bd727f3dc78b7db70b4ce40c76852dd62fc50423128faf86ed8af1c65f7955134af85bc494dd376001 ui-test-strings.patch" |