From 4f5d31f1b7a0873aaf405dfb2ffd3f1512d2db99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 14 Nov 2021 18:01:10 +0000 Subject: [PATCH] Add new rust versions. --- dev-lang/rust/Manifest | 6 + dev-lang/rust/rust-1.53.0.ebuild | 289 +++++++++++++++++++++++++++++++ dev-lang/rust/rust-1.54.0.ebuild | 289 +++++++++++++++++++++++++++++++ dev-lang/rust/rust-1.55.0.ebuild | 289 +++++++++++++++++++++++++++++++ virtual/rust/Manifest | 5 + virtual/rust/rust-1.51.0.ebuild | 15 ++ virtual/rust/rust-1.52.1.ebuild | 15 ++ virtual/rust/rust-1.53.0.ebuild | 15 ++ virtual/rust/rust-1.54.0.ebuild | 15 ++ virtual/rust/rust-1.55.0.ebuild | 15 ++ 10 files changed, 953 insertions(+) create mode 100644 dev-lang/rust/rust-1.53.0.ebuild create mode 100644 dev-lang/rust/rust-1.54.0.ebuild create mode 100644 dev-lang/rust/rust-1.55.0.ebuild create mode 100644 virtual/rust/rust-1.51.0.ebuild create mode 100644 virtual/rust/rust-1.52.1.ebuild create mode 100644 virtual/rust/rust-1.53.0.ebuild create mode 100644 virtual/rust/rust-1.54.0.ebuild create mode 100644 virtual/rust/rust-1.55.0.ebuild diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest index bbf17c5..17b84c2 100644 --- a/dev-lang/rust/Manifest +++ b/dev-lang/rust/Manifest @@ -13,6 +13,9 @@ DIST rustc-1.49.0-src.tar.xz 108330280 BLAKE2B 65e36253482ded2df225cbbf15253b6c9 DIST rustc-1.50.0-src.tar.xz 108666272 BLAKE2B abb1b6f57093334bae5892dd99c964ffaf5e2b906cc92f0b92d5786cf80484cff923643169f24f4f92a5724c21b8bd671c72531c2cd1f6fbe0ea7107b5bd923b SHA512 df3c83c0fdc9ebce6fdccddda781dea0cdbd88d2b2a8220cac40cc3a8fa957923ae834d1fa45283d4ad227b334bd9e220e37a4a1ad7a1c7aeb806ed9ed387245 DIST rustc-1.51.0-src.tar.xz 109596164 BLAKE2B c1ac89655adfe7db8005476d42c748cf1896f52888141229fd6dda43855dbb08c21c8e1f11398d2f1f9dd5f8d508d9158a3bda4f1b282d1b184ea4c701100837 SHA512 ded91468ddf3e6627f00e7ec3d44452aa24eb727a183c0de9d90264f593119a54300d56b09251a88260db480b48554181ae195c538996a32d68d48b6587ac0df DIST rustc-1.52.1-src.tar.xz 115109508 BLAKE2B c5d73f5884037d287d88ba9fdaf63a36678b692e1b510920045797ab29f1660f05cda901e19411ff83ec3084c4130034c269976b1056220f3e629cff116d07f0 SHA512 55f5053ce40d4eba4663052817aef6a6275139ca229c89cd1ec44711458b412720203301d8c7975aac5720a91fcaf21847f8184f641cbb0004f722520283c73c +DIST rustc-1.53.0-src.tar.xz 115686332 BLAKE2B fa068f89d42f927fdc79ee31aad1386eaf2aa596a060e059c5a1a73fe48c48d008fc952cd6c7912b743e41d77a94b205639eed0f728b2539b62f18a772cabfe3 SHA512 70485cf7a0f7fc36ee31644e546374079dc387a85b44e5e793707fd0a4d7ca05d311291e78b86db955485d8f21c47ff9e1908acc4da68ba04929287213a40c24 +DIST rustc-1.54.0-src.tar.xz 116286856 BLAKE2B 5ac47822646a0b6205f09282168b4d4ddcace9f6bc8f242c890327ca4074626f129514f8bcae5c5556015745f718990cce490658076f5cd3526623439540416b SHA512 5162f85b43ca2c5af93fdbfb2597d75df8a838f7fcc025a5298499ce1043db50f1ea2fbba753e47ce5daad3d80d4b612acf6527ef902c34117763e687fdbbcfa +DIST rustc-1.55.0-src.tar.xz 117197580 BLAKE2B 8d9739ce7571146aee0e07c6287de9a8c4f1a914606cd47819eb1ef118b15772ecf22d0d43d7732f03c234a013fa54a4a7f0578a3f136af518f71bf64a03305d SHA512 7522f2fa95d5af92472404ecc97d7d9e745e88c933196a83fa373ce1efff6db3c295e0e2afdbfa1ff00644554efa0c3c7f6c11f9119ecf9010cb440b3f27c2da EBUILD rust-1.39.0.ebuild 2854 BLAKE2B df06652e7ac1b634ab1058a76cedcb1655ade481b85e97334639c68a8adc8c9f49f84057c71220680067a6b6a87c19d96f6281603fc711453167d290a302037a SHA512 5d06aa318dedef654ab75362cfbc075e6e526a75fb7927a998e20d8d5ac4de062e6373087c6e56e522b1e1b24cdfc5ea1c69fe2e16c9b452394731e759ba71de EBUILD rust-1.40.0.ebuild 7700 BLAKE2B 05d38ecd23c889dbbeff398ae0eaf002d2bd4e58f6bdd1b538f8f15694d257932b3cbbf305b9d550021b4fe71eefd31b0e7a87475160676a35d85196817c1d64 SHA512 b847237e1f35ddb3b9af51e859bfdcaf0f79ffa0b10e9cf2cbfedaa0edb6902f8fe334f12505d7c1d52e0c61770bad797704f776c6d866dd86444ee99640465e EBUILD rust-1.41.1.ebuild 7700 BLAKE2B 05d38ecd23c889dbbeff398ae0eaf002d2bd4e58f6bdd1b538f8f15694d257932b3cbbf305b9d550021b4fe71eefd31b0e7a87475160676a35d85196817c1d64 SHA512 b847237e1f35ddb3b9af51e859bfdcaf0f79ffa0b10e9cf2cbfedaa0edb6902f8fe334f12505d7c1d52e0c61770bad797704f776c6d866dd86444ee99640465e @@ -27,3 +30,6 @@ EBUILD rust-1.49.0.ebuild 7661 BLAKE2B bdd2b8665b452afc54702481d7bd50e84c016ab61 EBUILD rust-1.50.0.ebuild 7655 BLAKE2B c3f6b1815c3ebed28f5c71085898c33861c0732075d9a1ee97b2178def3fc188f82ec49e51f6a44e97d6d93d68c002029365826ccb661639d108435a25822ebd SHA512 99d21d428fe31e7439c0b02e3450d58576b4d49db791f8223f1382c9a503b2e55ae1f6a8881b00a84d0b95b9b08f742c3019cda70eb83628d5e5d9efa0bb00ba EBUILD rust-1.51.0.ebuild 7655 BLAKE2B c3f6b1815c3ebed28f5c71085898c33861c0732075d9a1ee97b2178def3fc188f82ec49e51f6a44e97d6d93d68c002029365826ccb661639d108435a25822ebd SHA512 99d21d428fe31e7439c0b02e3450d58576b4d49db791f8223f1382c9a503b2e55ae1f6a8881b00a84d0b95b9b08f742c3019cda70eb83628d5e5d9efa0bb00ba EBUILD rust-1.52.1.ebuild 7655 BLAKE2B c3f6b1815c3ebed28f5c71085898c33861c0732075d9a1ee97b2178def3fc188f82ec49e51f6a44e97d6d93d68c002029365826ccb661639d108435a25822ebd SHA512 99d21d428fe31e7439c0b02e3450d58576b4d49db791f8223f1382c9a503b2e55ae1f6a8881b00a84d0b95b9b08f742c3019cda70eb83628d5e5d9efa0bb00ba +EBUILD rust-1.53.0.ebuild 7655 BLAKE2B c3f6b1815c3ebed28f5c71085898c33861c0732075d9a1ee97b2178def3fc188f82ec49e51f6a44e97d6d93d68c002029365826ccb661639d108435a25822ebd SHA512 99d21d428fe31e7439c0b02e3450d58576b4d49db791f8223f1382c9a503b2e55ae1f6a8881b00a84d0b95b9b08f742c3019cda70eb83628d5e5d9efa0bb00ba +EBUILD rust-1.54.0.ebuild 7655 BLAKE2B c3f6b1815c3ebed28f5c71085898c33861c0732075d9a1ee97b2178def3fc188f82ec49e51f6a44e97d6d93d68c002029365826ccb661639d108435a25822ebd SHA512 99d21d428fe31e7439c0b02e3450d58576b4d49db791f8223f1382c9a503b2e55ae1f6a8881b00a84d0b95b9b08f742c3019cda70eb83628d5e5d9efa0bb00ba +EBUILD rust-1.55.0.ebuild 7655 BLAKE2B c3f6b1815c3ebed28f5c71085898c33861c0732075d9a1ee97b2178def3fc188f82ec49e51f6a44e97d6d93d68c002029365826ccb661639d108435a25822ebd SHA512 99d21d428fe31e7439c0b02e3450d58576b4d49db791f8223f1382c9a503b2e55ae1f6a8881b00a84d0b95b9b08f742c3019cda70eb83628d5e5d9efa0bb00ba diff --git a/dev-lang/rust/rust-1.53.0.ebuild b/dev-lang/rust/rust-1.53.0.ebuild new file mode 100644 index 0000000..2bb4bbd --- /dev/null +++ b/dev-lang/rust/rust-1.53.0.ebuild @@ -0,0 +1,289 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) + +inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs + +if [[ ${PV} = *beta* ]]; then + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + MY_P="rustc-beta" + SLOT="beta/${PV}" + SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz" +else + ABI_VER="$(ver_cut 1-2)" + SLOT="stable/${ABI_VER}" + MY_P="rustc-${PV}" + SRC="${MY_P}-src.tar.xz" + KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~x86" +fi + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" + +SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz" + +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 + NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) +LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" + +IUSE="clippy cpu_flags_x86_sse2 debug doc libressl rls rustfmt ${ALL_LLVM_TARGETS[*]}" + +# Please keep the LLVM dependency block separate. Since LLVM is slotted, +# we need to *really* make sure we're not pulling more than one slot +# simultaneously. + +# How to use it: +# 1. List all the working slots (with min versions) in ||, newest first. +# 2. Update the := to specify *max* version, e.g. < 10. +# 3. Specify LLVM_MAX_SLOT, e.g. 9. +LLVM_DEPEND=" + || ( + sys-devel/llvm:9[llvm_targets_WebAssembly?] + ) + "${S}"/config.toml + [llvm] + optimize = $(toml_usex !debug) + release-debuginfo = $(toml_usex debug) + assertions = $(toml_usex debug) + targets = "${LLVM_TARGETS// /;}" + experimental-targets = "" + [build] + build = "${rust_target}" + host = ["${rust_target}"] + target = [${rust_targets}] + cargo = "${rust_stage0_root}/bin/cargo" + rustc = "${rust_stage0_root}/bin/rustc" + docs = $(toml_usex doc) + compiler-docs = $(toml_usex doc) + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = ${extended} + tools = [${tools}] + verbose = 2 + [install] + prefix = "${EPREFIX}/usr" + libdir = "lib" + docdir = "share/doc/${PF}" + mandir = "share/man" + [rust] + optimize = $(toml_usex !debug) + debug = $(toml_usex debug) + debug-assertions = $(toml_usex debug) + default-linker = "$(tc-getCC)" + channel = "stable" + rpath = false + lld = false + [dist] + src-tarball = false + EOF + + for v in $(multilib_get_enabled_abi_pairs); do + rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) + arch_cflags="$(get_abi_CFLAGS ${v##*.})" + + cat <<- EOF >> "${S}"/config.env + CFLAGS_${rust_target}=${arch_cflags} + EOF + + cat <<- EOF >> "${S}"/config.toml + [target.${rust_target}] + cc = "$(tc-getBUILD_CC)" + cxx = "$(tc-getBUILD_CXX)" + linker = "$(tc-getCC)" + ar = "$(tc-getAR)" + EOF + done +} + +src_compile() { + env $(cat "${S}"/config.env)\ + "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ + --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305 +} + +src_install() { + env DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml \ + --exclude src/tools/miri || die + + # bug #689562, #689160 + rm "${D}/etc/bash_completion.d/cargo" || die + rmdir "${D}"/etc{/bash_completion.d,} || die + newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo + + mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die + mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die + mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die + mv "${ED}/usr/bin/rust-gdbgui" "${ED}/usr/bin/rust-gdbgui-${PV}" || die + mv "${ED}/usr/bin/rust-lldb" "${ED}/usr/bin/rust-lldb-${PV}" || die + mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die + if use clippy; then + mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${PV}" || die + mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die + fi + if use rls; then + mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die + fi + if use rustfmt; then + mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die + mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die + fi + + # Move public shared libs to abi specific libdir + # Private and target specific libs MUST stay in /usr/lib/rustlib/${rust_target}/lib + if [[ $(get_libdir) != lib ]]; then + dodir /usr/$(get_libdir) + mv "${ED}/usr/lib"/*.so "${ED}/usr/$(get_libdir)/" || die + fi + + dodoc COPYRIGHT + + # note: eselect-rust adds EROOT to all paths below + cat <<-EOF > "${T}/provider-${P}" + /usr/bin/rustdoc + /usr/bin/rust-gdb + /usr/bin/rust-gdbgui + /usr/bin/rust-lldb + EOF + echo /usr/bin/cargo >> "${T}/provider-${P}" + if use clippy; then + echo /usr/bin/clippy-driver >> "${T}/provider-${P}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" + fi + if use rls; then + echo /usr/bin/rls >> "${T}/provider-${P}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${P}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" + fi + dodir /etc/env.d/rust + insinto /etc/env.d/rust + doins "${T}/provider-${P}" +} + +pkg_postinst() { + eselect rust update --if-unset + + elog "Rust installs a helper script for calling GDB and LLDB," + elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}." + + ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo." + ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some" + ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'." + + if has_version app-editors/emacs; then + elog "install app-emacs/rust-mode to get emacs support for rust." + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + elog "install app-vim/rust-vim to get vim support for rust." + fi +} + +pkg_postrm() { + eselect rust cleanup +} diff --git a/dev-lang/rust/rust-1.54.0.ebuild b/dev-lang/rust/rust-1.54.0.ebuild new file mode 100644 index 0000000..2bb4bbd --- /dev/null +++ b/dev-lang/rust/rust-1.54.0.ebuild @@ -0,0 +1,289 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) + +inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs + +if [[ ${PV} = *beta* ]]; then + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + MY_P="rustc-beta" + SLOT="beta/${PV}" + SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz" +else + ABI_VER="$(ver_cut 1-2)" + SLOT="stable/${ABI_VER}" + MY_P="rustc-${PV}" + SRC="${MY_P}-src.tar.xz" + KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~x86" +fi + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" + +SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz" + +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 + NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) +LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" + +IUSE="clippy cpu_flags_x86_sse2 debug doc libressl rls rustfmt ${ALL_LLVM_TARGETS[*]}" + +# Please keep the LLVM dependency block separate. Since LLVM is slotted, +# we need to *really* make sure we're not pulling more than one slot +# simultaneously. + +# How to use it: +# 1. List all the working slots (with min versions) in ||, newest first. +# 2. Update the := to specify *max* version, e.g. < 10. +# 3. Specify LLVM_MAX_SLOT, e.g. 9. +LLVM_DEPEND=" + || ( + sys-devel/llvm:9[llvm_targets_WebAssembly?] + ) + "${S}"/config.toml + [llvm] + optimize = $(toml_usex !debug) + release-debuginfo = $(toml_usex debug) + assertions = $(toml_usex debug) + targets = "${LLVM_TARGETS// /;}" + experimental-targets = "" + [build] + build = "${rust_target}" + host = ["${rust_target}"] + target = [${rust_targets}] + cargo = "${rust_stage0_root}/bin/cargo" + rustc = "${rust_stage0_root}/bin/rustc" + docs = $(toml_usex doc) + compiler-docs = $(toml_usex doc) + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = ${extended} + tools = [${tools}] + verbose = 2 + [install] + prefix = "${EPREFIX}/usr" + libdir = "lib" + docdir = "share/doc/${PF}" + mandir = "share/man" + [rust] + optimize = $(toml_usex !debug) + debug = $(toml_usex debug) + debug-assertions = $(toml_usex debug) + default-linker = "$(tc-getCC)" + channel = "stable" + rpath = false + lld = false + [dist] + src-tarball = false + EOF + + for v in $(multilib_get_enabled_abi_pairs); do + rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) + arch_cflags="$(get_abi_CFLAGS ${v##*.})" + + cat <<- EOF >> "${S}"/config.env + CFLAGS_${rust_target}=${arch_cflags} + EOF + + cat <<- EOF >> "${S}"/config.toml + [target.${rust_target}] + cc = "$(tc-getBUILD_CC)" + cxx = "$(tc-getBUILD_CXX)" + linker = "$(tc-getCC)" + ar = "$(tc-getAR)" + EOF + done +} + +src_compile() { + env $(cat "${S}"/config.env)\ + "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ + --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305 +} + +src_install() { + env DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml \ + --exclude src/tools/miri || die + + # bug #689562, #689160 + rm "${D}/etc/bash_completion.d/cargo" || die + rmdir "${D}"/etc{/bash_completion.d,} || die + newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo + + mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die + mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die + mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die + mv "${ED}/usr/bin/rust-gdbgui" "${ED}/usr/bin/rust-gdbgui-${PV}" || die + mv "${ED}/usr/bin/rust-lldb" "${ED}/usr/bin/rust-lldb-${PV}" || die + mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die + if use clippy; then + mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${PV}" || die + mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die + fi + if use rls; then + mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die + fi + if use rustfmt; then + mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die + mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die + fi + + # Move public shared libs to abi specific libdir + # Private and target specific libs MUST stay in /usr/lib/rustlib/${rust_target}/lib + if [[ $(get_libdir) != lib ]]; then + dodir /usr/$(get_libdir) + mv "${ED}/usr/lib"/*.so "${ED}/usr/$(get_libdir)/" || die + fi + + dodoc COPYRIGHT + + # note: eselect-rust adds EROOT to all paths below + cat <<-EOF > "${T}/provider-${P}" + /usr/bin/rustdoc + /usr/bin/rust-gdb + /usr/bin/rust-gdbgui + /usr/bin/rust-lldb + EOF + echo /usr/bin/cargo >> "${T}/provider-${P}" + if use clippy; then + echo /usr/bin/clippy-driver >> "${T}/provider-${P}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" + fi + if use rls; then + echo /usr/bin/rls >> "${T}/provider-${P}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${P}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" + fi + dodir /etc/env.d/rust + insinto /etc/env.d/rust + doins "${T}/provider-${P}" +} + +pkg_postinst() { + eselect rust update --if-unset + + elog "Rust installs a helper script for calling GDB and LLDB," + elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}." + + ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo." + ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some" + ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'." + + if has_version app-editors/emacs; then + elog "install app-emacs/rust-mode to get emacs support for rust." + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + elog "install app-vim/rust-vim to get vim support for rust." + fi +} + +pkg_postrm() { + eselect rust cleanup +} diff --git a/dev-lang/rust/rust-1.55.0.ebuild b/dev-lang/rust/rust-1.55.0.ebuild new file mode 100644 index 0000000..2bb4bbd --- /dev/null +++ b/dev-lang/rust/rust-1.55.0.ebuild @@ -0,0 +1,289 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) + +inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing multilib-build python-any-r1 rust-toolchain toolchain-funcs + +if [[ ${PV} = *beta* ]]; then + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + MY_P="rustc-beta" + SLOT="beta/${PV}" + SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz" +else + ABI_VER="$(ver_cut 1-2)" + SLOT="stable/${ABI_VER}" + MY_P="rustc-${PV}" + SRC="${MY_P}-src.tar.xz" + KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~x86" +fi + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" + +SRC_URI="https://static.rust-lang.org/dist/${SRC} -> rustc-${PV}-src.tar.xz" + +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 + NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) +LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/?} + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" + +IUSE="clippy cpu_flags_x86_sse2 debug doc libressl rls rustfmt ${ALL_LLVM_TARGETS[*]}" + +# Please keep the LLVM dependency block separate. Since LLVM is slotted, +# we need to *really* make sure we're not pulling more than one slot +# simultaneously. + +# How to use it: +# 1. List all the working slots (with min versions) in ||, newest first. +# 2. Update the := to specify *max* version, e.g. < 10. +# 3. Specify LLVM_MAX_SLOT, e.g. 9. +LLVM_DEPEND=" + || ( + sys-devel/llvm:9[llvm_targets_WebAssembly?] + ) + "${S}"/config.toml + [llvm] + optimize = $(toml_usex !debug) + release-debuginfo = $(toml_usex debug) + assertions = $(toml_usex debug) + targets = "${LLVM_TARGETS// /;}" + experimental-targets = "" + [build] + build = "${rust_target}" + host = ["${rust_target}"] + target = [${rust_targets}] + cargo = "${rust_stage0_root}/bin/cargo" + rustc = "${rust_stage0_root}/bin/rustc" + docs = $(toml_usex doc) + compiler-docs = $(toml_usex doc) + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = ${extended} + tools = [${tools}] + verbose = 2 + [install] + prefix = "${EPREFIX}/usr" + libdir = "lib" + docdir = "share/doc/${PF}" + mandir = "share/man" + [rust] + optimize = $(toml_usex !debug) + debug = $(toml_usex debug) + debug-assertions = $(toml_usex debug) + default-linker = "$(tc-getCC)" + channel = "stable" + rpath = false + lld = false + [dist] + src-tarball = false + EOF + + for v in $(multilib_get_enabled_abi_pairs); do + rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) + arch_cflags="$(get_abi_CFLAGS ${v##*.})" + + cat <<- EOF >> "${S}"/config.env + CFLAGS_${rust_target}=${arch_cflags} + EOF + + cat <<- EOF >> "${S}"/config.toml + [target.${rust_target}] + cc = "$(tc-getBUILD_CC)" + cxx = "$(tc-getBUILD_CXX)" + linker = "$(tc-getCC)" + ar = "$(tc-getAR)" + EOF + done +} + +src_compile() { + env $(cat "${S}"/config.env)\ + "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) \ + --exclude src/tools/miri || die # https://github.com/rust-lang/rust/issues/52305 +} + +src_install() { + env DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml \ + --exclude src/tools/miri || die + + # bug #689562, #689160 + rm "${D}/etc/bash_completion.d/cargo" || die + rmdir "${D}"/etc{/bash_completion.d,} || die + newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo + + mv "${ED}/usr/bin/rustc" "${ED}/usr/bin/rustc-${PV}" || die + mv "${ED}/usr/bin/rustdoc" "${ED}/usr/bin/rustdoc-${PV}" || die + mv "${ED}/usr/bin/rust-gdb" "${ED}/usr/bin/rust-gdb-${PV}" || die + mv "${ED}/usr/bin/rust-gdbgui" "${ED}/usr/bin/rust-gdbgui-${PV}" || die + mv "${ED}/usr/bin/rust-lldb" "${ED}/usr/bin/rust-lldb-${PV}" || die + mv "${ED}/usr/bin/cargo" "${ED}/usr/bin/cargo-${PV}" || die + if use clippy; then + mv "${ED}/usr/bin/clippy-driver" "${ED}/usr/bin/clippy-driver-${PV}" || die + mv "${ED}/usr/bin/cargo-clippy" "${ED}/usr/bin/cargo-clippy-${PV}" || die + fi + if use rls; then + mv "${ED}/usr/bin/rls" "${ED}/usr/bin/rls-${PV}" || die + fi + if use rustfmt; then + mv "${ED}/usr/bin/rustfmt" "${ED}/usr/bin/rustfmt-${PV}" || die + mv "${ED}/usr/bin/cargo-fmt" "${ED}/usr/bin/cargo-fmt-${PV}" || die + fi + + # Move public shared libs to abi specific libdir + # Private and target specific libs MUST stay in /usr/lib/rustlib/${rust_target}/lib + if [[ $(get_libdir) != lib ]]; then + dodir /usr/$(get_libdir) + mv "${ED}/usr/lib"/*.so "${ED}/usr/$(get_libdir)/" || die + fi + + dodoc COPYRIGHT + + # note: eselect-rust adds EROOT to all paths below + cat <<-EOF > "${T}/provider-${P}" + /usr/bin/rustdoc + /usr/bin/rust-gdb + /usr/bin/rust-gdbgui + /usr/bin/rust-lldb + EOF + echo /usr/bin/cargo >> "${T}/provider-${P}" + if use clippy; then + echo /usr/bin/clippy-driver >> "${T}/provider-${P}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" + fi + if use rls; then + echo /usr/bin/rls >> "${T}/provider-${P}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${P}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" + fi + dodir /etc/env.d/rust + insinto /etc/env.d/rust + doins "${T}/provider-${P}" +} + +pkg_postinst() { + eselect rust update --if-unset + + elog "Rust installs a helper script for calling GDB and LLDB," + elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}." + + ewarn "cargo is now installed from dev-lang/rust{,-bin} instead of dev-util/cargo." + ewarn "This might have resulted in a dangling symlink for /usr/bin/cargo on some" + ewarn "systems. This can be resolved by calling 'sudo eselect rust set ${P}'." + + if has_version app-editors/emacs; then + elog "install app-emacs/rust-mode to get emacs support for rust." + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + elog "install app-vim/rust-vim to get vim support for rust." + fi +} + +pkg_postrm() { + eselect rust cleanup +} diff --git a/virtual/rust/Manifest b/virtual/rust/Manifest index 8e1e763..06a3ee1 100644 --- a/virtual/rust/Manifest +++ b/virtual/rust/Manifest @@ -8,3 +8,8 @@ EBUILD rust-1.47.0.ebuild 341 BLAKE2B 46814889235011806589f1ab14dd1c3714469299c4 EBUILD rust-1.48.0.ebuild 341 BLAKE2B 46814889235011806589f1ab14dd1c3714469299c42ddec516ec0fea24aace127fad72775a7cebc3e81d75be24e18418d0d30d94ac81351eb25e81fb1565cf6b SHA512 fdb6978acd346022383cca79f2e61433504ac3626b8ac335f52553aff36aa53888afc94492016f368976754a8c1e3c719184e1634e7b81ce7f2e086f15e2ff6a EBUILD rust-1.49.0.ebuild 341 BLAKE2B 46814889235011806589f1ab14dd1c3714469299c42ddec516ec0fea24aace127fad72775a7cebc3e81d75be24e18418d0d30d94ac81351eb25e81fb1565cf6b SHA512 fdb6978acd346022383cca79f2e61433504ac3626b8ac335f52553aff36aa53888afc94492016f368976754a8c1e3c719184e1634e7b81ce7f2e086f15e2ff6a EBUILD rust-1.50.0.ebuild 341 BLAKE2B 46814889235011806589f1ab14dd1c3714469299c42ddec516ec0fea24aace127fad72775a7cebc3e81d75be24e18418d0d30d94ac81351eb25e81fb1565cf6b SHA512 fdb6978acd346022383cca79f2e61433504ac3626b8ac335f52553aff36aa53888afc94492016f368976754a8c1e3c719184e1634e7b81ce7f2e086f15e2ff6a +EBUILD rust-1.51.0.ebuild 341 BLAKE2B 46814889235011806589f1ab14dd1c3714469299c42ddec516ec0fea24aace127fad72775a7cebc3e81d75be24e18418d0d30d94ac81351eb25e81fb1565cf6b SHA512 fdb6978acd346022383cca79f2e61433504ac3626b8ac335f52553aff36aa53888afc94492016f368976754a8c1e3c719184e1634e7b81ce7f2e086f15e2ff6a +EBUILD rust-1.52.1.ebuild 341 BLAKE2B 46814889235011806589f1ab14dd1c3714469299c42ddec516ec0fea24aace127fad72775a7cebc3e81d75be24e18418d0d30d94ac81351eb25e81fb1565cf6b SHA512 fdb6978acd346022383cca79f2e61433504ac3626b8ac335f52553aff36aa53888afc94492016f368976754a8c1e3c719184e1634e7b81ce7f2e086f15e2ff6a +EBUILD rust-1.53.0.ebuild 341 BLAKE2B 46814889235011806589f1ab14dd1c3714469299c42ddec516ec0fea24aace127fad72775a7cebc3e81d75be24e18418d0d30d94ac81351eb25e81fb1565cf6b SHA512 fdb6978acd346022383cca79f2e61433504ac3626b8ac335f52553aff36aa53888afc94492016f368976754a8c1e3c719184e1634e7b81ce7f2e086f15e2ff6a +EBUILD rust-1.54.0.ebuild 341 BLAKE2B 46814889235011806589f1ab14dd1c3714469299c42ddec516ec0fea24aace127fad72775a7cebc3e81d75be24e18418d0d30d94ac81351eb25e81fb1565cf6b SHA512 fdb6978acd346022383cca79f2e61433504ac3626b8ac335f52553aff36aa53888afc94492016f368976754a8c1e3c719184e1634e7b81ce7f2e086f15e2ff6a +EBUILD rust-1.55.0.ebuild 341 BLAKE2B 46814889235011806589f1ab14dd1c3714469299c42ddec516ec0fea24aace127fad72775a7cebc3e81d75be24e18418d0d30d94ac81351eb25e81fb1565cf6b SHA512 fdb6978acd346022383cca79f2e61433504ac3626b8ac335f52553aff36aa53888afc94492016f368976754a8c1e3c719184e1634e7b81ce7f2e086f15e2ff6a diff --git a/virtual/rust/rust-1.51.0.ebuild b/virtual/rust/rust-1.51.0.ebuild new file mode 100644 index 0000000..a9b74cc --- /dev/null +++ b/virtual/rust/rust-1.51.0.ebuild @@ -0,0 +1,15 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib-build + +DESCRIPTION="Virtual for Rust language compiler" + +LICENSE="" +SLOT="0" +KEYWORDS="amd64 arm arm64 ppc64 x86" + +BDEPEND="" +RDEPEND="|| ( =dev-lang/rust-${PV}*[${MULTILIB_USEDEP}] =dev-lang/rust-bin-${PV}* )" diff --git a/virtual/rust/rust-1.52.1.ebuild b/virtual/rust/rust-1.52.1.ebuild new file mode 100644 index 0000000..a9b74cc --- /dev/null +++ b/virtual/rust/rust-1.52.1.ebuild @@ -0,0 +1,15 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib-build + +DESCRIPTION="Virtual for Rust language compiler" + +LICENSE="" +SLOT="0" +KEYWORDS="amd64 arm arm64 ppc64 x86" + +BDEPEND="" +RDEPEND="|| ( =dev-lang/rust-${PV}*[${MULTILIB_USEDEP}] =dev-lang/rust-bin-${PV}* )" diff --git a/virtual/rust/rust-1.53.0.ebuild b/virtual/rust/rust-1.53.0.ebuild new file mode 100644 index 0000000..a9b74cc --- /dev/null +++ b/virtual/rust/rust-1.53.0.ebuild @@ -0,0 +1,15 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib-build + +DESCRIPTION="Virtual for Rust language compiler" + +LICENSE="" +SLOT="0" +KEYWORDS="amd64 arm arm64 ppc64 x86" + +BDEPEND="" +RDEPEND="|| ( =dev-lang/rust-${PV}*[${MULTILIB_USEDEP}] =dev-lang/rust-bin-${PV}* )" diff --git a/virtual/rust/rust-1.54.0.ebuild b/virtual/rust/rust-1.54.0.ebuild new file mode 100644 index 0000000..a9b74cc --- /dev/null +++ b/virtual/rust/rust-1.54.0.ebuild @@ -0,0 +1,15 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib-build + +DESCRIPTION="Virtual for Rust language compiler" + +LICENSE="" +SLOT="0" +KEYWORDS="amd64 arm arm64 ppc64 x86" + +BDEPEND="" +RDEPEND="|| ( =dev-lang/rust-${PV}*[${MULTILIB_USEDEP}] =dev-lang/rust-bin-${PV}* )" diff --git a/virtual/rust/rust-1.55.0.ebuild b/virtual/rust/rust-1.55.0.ebuild new file mode 100644 index 0000000..a9b74cc --- /dev/null +++ b/virtual/rust/rust-1.55.0.ebuild @@ -0,0 +1,15 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib-build + +DESCRIPTION="Virtual for Rust language compiler" + +LICENSE="" +SLOT="0" +KEYWORDS="amd64 arm arm64 ppc64 x86" + +BDEPEND="" +RDEPEND="|| ( =dev-lang/rust-${PV}*[${MULTILIB_USEDEP}] =dev-lang/rust-bin-${PV}* )"