diff options
Diffstat (limited to 'user/rust/APKBUILD')
-rw-r--r-- | user/rust/APKBUILD | 121 |
1 files changed, 76 insertions, 45 deletions
diff --git a/user/rust/APKBUILD b/user/rust/APKBUILD index 393f2ce98..50608079b 100644 --- a/user/rust/APKBUILD +++ b/user/rust/APKBUILD @@ -3,9 +3,9 @@ # Contributor: Jeizsm <jeizsm@gmail.com> # Maintainer: Samuel Holland <samuel@sholland.org> pkgname=rust -pkgver=1.35.0 -_bootcargover=0.35.0 -_bootver=1.34.2 +pkgver=1.37.0 +_bootcargover=0.37.0 +_bootver=1.36.0 _llvmver=8 pkgrel=0 pkgdesc="The Rust Programming Language" @@ -23,6 +23,7 @@ makedepends=" python3 zlib-dev " +provides="$pkgname-bootstrap=$pkgver-r$pkgrel" subpackages=" $pkgname-dbg $pkgname-stdlib @@ -37,6 +38,7 @@ subpackages=" cargo-doc:_cargo_doc:noarch cargo-bash-completion:_cargo_bashcomp:noarch cargo-zsh-completion:_cargo_zshcomp:noarch + miri rls rustfmt " @@ -50,13 +52,16 @@ source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.xz 0004-Require-static-native-libraries-when-linking-static-.patch 0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch - 0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch - 0008-test-use-extern-for-plugins-Don-t-assume-multilib.patch - 0009-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch - 0010-Ignore-broken-and-non-applicable-tests.patch - 0011-Link-stage-2-tools-dynamically-to-libstd.patch - 0012-Move-debugger-scripts-to-usr-share-rust.patch - 0013-Add-foxkit-target-specs.patch + 0007-Fix-C-aggregate-passing-ABI-on-powerpc.patch + 0008-Fix-zero-sized-aggregate-ABI-on-powerpc.patch + 0009-compiletest-Match-suffixed-environments.patch + 0010-test-c-variadic-Fix-patterns-on-powerpc64.patch + 0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch + 0012-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch + 0013-Ignore-broken-and-non-applicable-tests.patch + 0014-Link-stage-2-tools-dynamically-to-libstd.patch + 0015-Move-debugger-scripts-to-usr-share-rust.patch + 0016-Add-foxkit-target-specs.patch 0030-libc-linkage.patch 0031-typenum-pmmx.patch 0040-rls-atomics.patch @@ -65,8 +70,6 @@ builddir="$srcdir/rustc-$pkgver-src" _rlibdir="/usr/lib/rustlib/$CTARGET/lib" prepare() { - cd "$builddir" - default_prepare $srcdir/cargo-$_bootcargover-$CBUILD/install.sh \ @@ -84,8 +87,6 @@ prepare() { } build() { - cd "$builddir" - cat > config.toml <<- EOF [build] build = "$CBUILD" @@ -103,31 +104,39 @@ build() { prefix = "/usr" [rust] codegen-units = 1 - debuginfo = true - debuginfo-lines = true - debuginfo-only-std = true - debuginfo-tools = true + codegen-units-std = 1 + debug-assertions = false + debuginfo-level = 2 + debuginfo-level-rustc = 0 + debuginfo-level-tests = 0 backtrace = true + incremental = false + parallel-compiler = false channel = "stable" rpath = false + verbose-tests = true + dist-src = false jemalloc = false + llvm-libunwind = false [target.$CTARGET] cc = "$CTARGET-gcc" cxx = "$CTARGET-g++" linker = "$CTARGET-gcc" llvm-config = "/usr/lib/llvm$_llvmver/bin/llvm-config" crt-static = false + [dist] + src-tarball = false EOF LIBGIT2_SYS_USE_PKG_CONFIG=1 \ LLVM_LINK_SHARED=1 \ RUST_BACKTRACE=1 \ - python3 x.py build -j ${JOBS:-2} + python3 x.py dist -j ${JOBS:-2} } check() { - cd "$builddir" - + LIBGIT2_SYS_USE_PKG_CONFIG=1 \ + LLVM_LINK_SHARED=1 \ RUST_BACKTRACE=1 \ python3 x.py test -j ${JOBS:-2} --no-doc --no-fail-fast \ src/test/codegen \ @@ -149,17 +158,26 @@ check() { } package() { - cd "$builddir" + cd "$builddir"/build/dist - DESTDIR="$pkgdir" python3 x.py install + tar xf rust-$pkgver-$CTARGET.tar.gz + rust-$pkgver-$CTARGET/install.sh \ + --destdir="$pkgdir" \ + --prefix=/usr \ + --sysconfdir="$pkgdir"/etc \ + --disable-ldconfig + tar xf rust-src-$pkgver.tar.gz + rust-src-$pkgver/install.sh \ + --destdir="$pkgdir" \ + --prefix=/usr \ + --disable-ldconfig rm "$pkgdir"/usr/lib/*.so \ "$pkgdir"/usr/lib/rustlib/components \ "$pkgdir"/usr/lib/rustlib/install.log \ "$pkgdir"/usr/lib/rustlib/manifest-* \ "$pkgdir"/usr/lib/rustlib/rust-installer-version \ - "$pkgdir"/usr/lib/rustlib/uninstall.sh \ - "$pkgdir"/usr/share/doc/rust/*.old + "$pkgdir"/usr/lib/rustlib/uninstall.sh } stdlib() { @@ -187,7 +205,7 @@ gdb() { _mv "$pkgdir"/usr/bin/rust-gdb "$subpkgdir"/usr/bin _mv "$pkgdir"/usr/bin/rust-gdbgui "$subpkgdir"/usr/bin - _mv "$pkgdir"/usr/share/rust/gdb_*.py "$subpkgdir"/usr/share/rust || true + _mv "$pkgdir"/usr/share/rust/gdb_*.py "$subpkgdir"/usr/share/rust } lldb() { @@ -197,7 +215,7 @@ lldb() { install_if="$pkgname=$pkgver-r$pkgrel lldb" _mv "$pkgdir"/usr/bin/rust-lldb "$subpkgdir"/usr/bin - _mv "$pkgdir"/usr/share/rust/lldb_*.py "$subpkgdir"/usr/share/rust || true + _mv "$pkgdir"/usr/share/rust/lldb_*.py "$subpkgdir"/usr/share/rust } src() { @@ -213,6 +231,7 @@ src() { cargo() { pkgdesc="The Rust package manager" + provides="cargo-bootstrap=$pkgver-r$pkgrel" depends="$pkgname-stdlib=$pkgver-r$pkgrel $pkgname" _mv "$pkgdir"/usr/bin/cargo "$subpkgdir"/usr/bin @@ -268,6 +287,14 @@ _cargo_doc() { "$subpkgdir"/usr/share/man/man1 } +miri() { + pkgdesc="An interpreter for Rust's mid-level intermediate representation" + license="Apache-2.0 OR MIT" + depends="$pkgname-stdlib=$pkgver-r$pkgrel" + + _mv "$pkgdir"/usr/bin/miri "$subpkgdir"/usr/bin +} + rls() { pkgdesc="The Rust language server" license="Apache-2.0 OR MIT" @@ -288,23 +315,27 @@ _mv() { mkdir -p "$dest" mv "$@" } -sha512sums="477c10b780bd54776be7ecbda0ab970416253e4a87c3e701825a7d07bcbcd91601b8e61129c5d04d4259e89c2e81e87cdbdee853375a8de5c9cf8372be2c9129 rustc-1.35.0-src.tar.xz -042b4c8a45cc803a202517dd376a2eb2daca50e1da43e96c32b07270afbdce4daa7091c3f11479f908e92d1031c1503a27ac37c007c1fa24743a82abcf765a29 cargo-0.35.0-powerpc-foxkit-linux-musl.tar.xz -a25de7843a512b79d214066cb2f01c4e414ae17c053314c103261e3ac805700dcb2ebc6aa28801cb74dcb6211cc57181d3c266d2b8988e2d8835df4b409929bb rust-std-1.34.2-powerpc-foxkit-linux-musl.tar.xz -9988037ebe219a30faf5740e479c34b464feabd37c192a2a37330f04d67dfed8f8a26439cdf8de4e255fa4fb17959bee7e78d5f6de040522131fdc70ccce8af1 rustc-1.34.2-powerpc-foxkit-linux-musl.tar.xz -dbc74b875e9fab4fdcb815dea4ef855a59361215c291ea11013587340f9e3cabece4b6cc94a0e118e862b47f9ee27447e385c2c524bcb8847a3d775ae2f76fb3 0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch -456c247b50936a2594024b5cec493e8ddbc3159196ce2cc8ae5134f1c3ac2f0928ae3ffe4f3f4154fcc2bf596846b6b3b39005ad76d51076796a9d3988f1df62 0002-Fix-LLVM-build.patch -d20a03a06315c114c61eedfd1b536169d64bd428beb352a4d04abb0358f0b1a75a1c1108e2429c80f715536bd67ef16597f47bd61e75f0e1ddd9681b43197763 0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch -a6a413a0e2435697fb66b6a11e4d9da8365b2c2d51d10eccbcac32fba09579199dc8bcd13fff1fd74212d1724292db5607827b2c546d2c06122e6f1fb70d8c16 0004-Require-static-native-libraries-when-linking-static-.patch -2bf5696f493c8b11da77f27348498338ca0f094f69f357077d5507b1f96b6066fa86b711c5c30737d82f217a7eb1afc8a4ce9d25f0491830a800a034607e0c6a 0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch -fedd9f54ae8d0780091dadac2364595abfc7ef13ac21a3489b91de5ad29efa477179f42ef59cb9a2e0264e15f88164f72843fc176180cd72e54052f3b305703c 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch -19e17358f738c982bb7a393e0b12173de8b79f905a677fdc5c183d54219b58a1618607e993cfe12d3eb69a2cb25a0b7b52313eb8e60a91ec9d37bb5b0c140b43 0007-runtest-Fix-proc-macro-tests-on-musl-hosts.patch -0c943ddb3fbacfa47adfa43e8ec41137d0e9c719e59af3ff1e3e1a2a6576c8eeed2b1db77f3f6f252eea273f9f1320c573ecde22e56800dbffac3e2ef18862f3 0008-test-use-extern-for-plugins-Don-t-assume-multilib.patch -22429c5dbbfda30cc2f08ed5591124fc8346d63d6ef200607be3d051e2524fdaf8a32264bef4e99f9186b22c05c805bf82e7c6d6d814a602dcefd9d4d8d708fd 0009-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch -ec851207a03d4b3bf2711e2db677170f520217f19de9f4f9817e62b5f9d10573eb468ced5e13c540bb5cda8c7006b259a0a0241cfa70e1f6f08386e656c86b79 0010-Ignore-broken-and-non-applicable-tests.patch -2a459b55386a4e3419b22efe1c5b5b37d75e2d1a11db4670ee5217ad5404df055eb6510378c74f5ff5662e940155c58d094f41b5738021f608c807f94a498e94 0011-Link-stage-2-tools-dynamically-to-libstd.patch -9e698d01cdb535beb364827d2a0bc87b543db65973c88a7fa64e8e19c671d1cf4cc4c8756018bff261a7581df102c8180599c434b347463a63c5ab2f575ad4c2 0012-Move-debugger-scripts-to-usr-share-rust.patch -a403a032180ee7d3c0d034d97b8de175426d8dd3368ebfcab5ad9c7202f9a0ca0197a72adc1eff13f422ecaed9c0a7e4cd22daf85061159ddaa12c335fd00914 0013-Add-foxkit-target-specs.patch -6c3aaa27adbe361cb354c9a7139b9da949f4acba81af6107e5972fa5c32fa47a972b5ad4567b9b54f4383650dbb3a3c590dfe6f23a5af16d7ff4ad3fb334e997 0030-libc-linkage.patch + +sha512sums="bfee43f578e6d44ead950b870b9fd31087e1bd3f917611f5dce7ad56504b83185edf43e297e8d1304e9e97b9a580d1e6adf6608ab8ed6dee0dc8c5153cdbc5d4 rustc-1.37.0-src.tar.xz +ab0711dafeae76d9718a0c6aaf118f512d295c66191d96198acc3591f5412d4ee6c50ad5cc56df8f1f32a2be3c4d9bb5ead798c6b9f4089c0a624e09825dd6be cargo-0.37.0-powerpc-foxkit-linux-musl.tar.xz +aa97abeccf03d3368b60731845d23ff74fb962818b7d1e6ada2e9a647b442a1b824541402f3a883c9be6e1f8db94ca98244fc4009ff0386403c57f999bd6d263 rust-std-1.36.0-powerpc-foxkit-linux-musl.tar.xz +5078bdd341b145119ba3396892cd8f63c65fafb1b041674e350b2cc02376fd2c32799baca85e916522c34c416a6c67d9d92bf8f44abb575a1ae1fedc4726516e rustc-1.36.0-powerpc-foxkit-linux-musl.tar.xz +5b765a47a49cbab26e5093ebf6dce5b8e3463ebdb0e404b9c952fef7993fd57e9a0d9f7d301c97b76b8bd35e4ea8b72c8768aa384cd215c2a12ddd45727343f8 0001-Don-t-pass-CFLAGS-to-the-C-compiler.patch +9b711ee16eed20a0293c1ca6d96c48db3fae5f2f60fdcb04ae2d1acfdc8036fa3b41ca799717aa14279fd7b7db0090861bceddeafd8d41f70433039e4983d9c8 0002-Fix-LLVM-build.patch +7f61bdc7c754379e1675d2f102f1f60f4c29ca2a2293d70741db46a0f29d61008d067166c7576cd0e5fa3c26e811e711e851b22f7df69974a7b53fa316c33777 0003-Allow-rustdoc-to-work-when-cross-compiling-on-musl.patch +0f1989e4db3a48fe8718002a58aaecf359bc65bf5a6dae327c062fce0b8a3176a6b70c80c72118d5fcabbc16b67b986ce67ab1fda13ca52899ca320716f3e606 0004-Require-static-native-libraries-when-linking-static-.patch +b27045eb7809438db988979843f68ddfee46a6f889b0fbaaed401b249d6e224940e9d15143e55f8b2df911a8fa24dfec81da0f064b47a86f3ed24010aee309e3 0005-Remove-nostdlib-and-musl_root-from-musl-targets.patch +4662f036e037b99178bb24c32524211eb5fc10ac711d16f13ddb933db84811eab3149cbe943521536d00c765eade1c1df01ca7e8f4fee69fca540546c0fbe806 0006-Prefer-libgcc_eh-over-libunwind-for-musl.patch +8742ff1c442dc2c7baad528fd6c51e202d091f24fbd7ac1350241a729a20f6f90818b76bb4de0b36b09afdeaad89b54843f08fb474e2232854cb68cd3d6a57b5 0007-Fix-C-aggregate-passing-ABI-on-powerpc.patch +8eb5c08701cfcdc14ece1c40fa2276e760283ce9228c96ff1dedb5256dcec307c3705a8e27ac1bd767184d0acfc835b9b0b4f02d5fa7ec24a75f04014e67ec61 0008-Fix-zero-sized-aggregate-ABI-on-powerpc.patch +20f794339f7a9c048dad2f39b5a3dad9293b07ba0b130354c0e74ec71088d2f2c24f6630543e8e5a41b244c8c1013249403ce8acf1fc2c2b4ab5065049f7f04e 0009-compiletest-Match-suffixed-environments.patch +d3d3250d762b482c93679cbc7a1d5ccf2eb803e271b840a5d426cf77d58d2cb53fd76baf46bfbaf7674c5ef9f18133cf0b48be08864c002171f3547aaa377bd6 0010-test-c-variadic-Fix-patterns-on-powerpc64.patch +d01d27d6f344fd30f75e7acd8f1b967eda382f7ee6387f8b0c52aa1ab083d5d86fa9d8d424c3e2b792502e75df03bacc58bd24ed4e448cfefe6bbfbb57586b06 0011-test-use-extern-for-plugins-Don-t-assume-multilib.patch +e25a4ba32b3b6fbc774c341bb3bda481a9f86917204e7c9bd69f34e2a72b4b3e58256d0619a94ce1d0f4cc17913d7216974b86fe96a776ba4260d0a01dcacaa9 0012-test-sysroot-crates-are-unstable-Fix-test-when-rpath.patch +68f7b35980c7b4b7088e28a7350c847656d4ffecbcec125ac6790a057a8a735563739f0ade8a7cf0283844cd1655114fa7ad6be106993e34b66e520aed34dd6d 0013-Ignore-broken-and-non-applicable-tests.patch +b6d4ce58e540373da797c89ed2ca3b23a8504511ee6bb6d0c52bd04273498aab10c99baf6f4633bb5a246c2612a7a538cbfed494bf901afdc6688f937234b4ac 0014-Link-stage-2-tools-dynamically-to-libstd.patch +fc10130544f7ceda378a9e7fb03a0dc4ea32a6d031061eada60af2d1c688d94f38ab31aad74f8f11b8aec2614415befa2c5e9789eeaf73b998f39b9677886155 0015-Move-debugger-scripts-to-usr-share-rust.patch +2c11c4bee3c6d10de6c2a9937bf3901f4c60dd1d9c50fcf57daa182a9b4d7b40d27632d3ef31ef083ae7903fcd49fdd41413ab8de1021f7d857884b9ac53c724 0016-Add-foxkit-target-specs.patch +7642e95d7f5e5d167a2f3e1300fc63f7bf34b6c0667b4e43e7c2378acd8c293f82d7c5651dfb75b03d717c0c5c369911f595dc641a629024e615d443244e6da1 0030-libc-linkage.patch 0cb12e9165d198c1e04b258454dbaf5459e192ad24d64c9fa132ebe0f1bcd5da3550eae8dfdaa792fa809b505af62964ecf0219dc4373420ee8ad3e111539a09 0031-typenum-pmmx.patch ab35bacf45ef5e46be110a8d27867fd4d5deb23cd5cbe8dc7f1da2177469945f9254f2a7915ee4fc430468a4421623429f0a01eb9eba14e047384efe3d3ec152 0040-rls-atomics.patch" |