From 7051f2e58b6bbc371b2c94cead2715bf06310adb Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 11 Jan 2023 23:45:17 +0000 Subject: gentoo auto-resync : 11:01:2023 - 23:45:17 --- dev-lang/Manifest.gz | Bin 19520 -> 19519 bytes dev-lang/go/Manifest | 4 + dev-lang/go/go-1.18.10.ebuild | 196 ++++++++ dev-lang/go/go-1.19.5.ebuild | 201 ++++++++ dev-lang/rust-bin/Manifest | 68 +-- dev-lang/rust-bin/rust-bin-1.66.0.ebuild | 224 --------- dev-lang/rust-bin/rust-bin-1.66.1.ebuild | 224 +++++++++ dev-lang/rust/Manifest | 6 +- dev-lang/rust/rust-1.66.0.ebuild | 754 ------------------------------- dev-lang/rust/rust-1.66.1.ebuild | 754 +++++++++++++++++++++++++++++++ 10 files changed, 1416 insertions(+), 1015 deletions(-) create mode 100644 dev-lang/go/go-1.18.10.ebuild create mode 100644 dev-lang/go/go-1.19.5.ebuild delete mode 100644 dev-lang/rust-bin/rust-bin-1.66.0.ebuild create mode 100644 dev-lang/rust-bin/rust-bin-1.66.1.ebuild delete mode 100644 dev-lang/rust/rust-1.66.0.ebuild create mode 100644 dev-lang/rust/rust-1.66.1.ebuild (limited to 'dev-lang') diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz index 66e13725512e..70474c55dcb8 100644 Binary files a/dev-lang/Manifest.gz and b/dev-lang/Manifest.gz differ diff --git a/dev-lang/go/Manifest b/dev-lang/go/Manifest index 38d585903476..0933271de792 100644 --- a/dev-lang/go/Manifest +++ b/dev-lang/go/Manifest @@ -1,7 +1,11 @@ AUX go-sets.conf 313 BLAKE2B 03e94776e317d34b72bfb8385b8b0dfa6a599a6086e4d0c9214e7b49293768947c21d9afb323ffcc7fd85ba0af72d9cb243dbb571eee9eb81de9400fd5f5e79c SHA512 7d01b98bc8d1b609183682dd942bd4c9fa757a98243c7de3cf6c497c7bc20b8cdbe59dd669ce4bb11f914a0e9b6d100e65cea2dffd99f38be50b18e0ecf66315 +DIST go1.18.10.src.tar.gz 22880022 BLAKE2B e458ecd02a4d77b77f2b6b65ecac45195c0f567782542ee65b9857e87d992b58082b7d45b9ff191cc6dea83de9f3d5abaffdd72edf60d7f229284bdaa5d190bb SHA512 5ae4c054a9e7c5fe159a27d46a37517797d8a1545f0920dc50234cc229977d02ecebf2445da5d4c641fbab574546d2c92c0ccb9cddc99be250967e2bb2ad9287 DIST go1.18.9.src.tar.gz 22878625 BLAKE2B 47a379642080506ecdc9094cff78ac6ac1c1cc501959b11ad0f5066b5a0e6d3dd050afa5df118fa614ef02f828b8ee9ebb3e976a338f696f2d0cb2d0e6174d94 SHA512 5f47442cc8ffbbc8c709ed5e8a6f3c5e19fc7979a21dc9883bb27096ffd165a08106ed01e2239c95c9276517081f967be9581f7c45272f9b2dcfced096eb8a67 DIST go1.19.4.src.tar.gz 26542047 BLAKE2B 8373cbbad542cb5ccb54677e2a7d01ba62a2a15630a6aa49e4494debb308a8959191f67691e452cf447187e40b8edb1b75bf9b9e5eac299e64e97f4561a81433 SHA512 00866e171d73170583e292439beecdaaee1b8fa907b6ab03013390b0cd7eaebfbe8cb9f9222f1af86933b50602e584677bc3aa25993c02d07a11625a62db263b +DIST go1.19.5.src.tar.gz 26545858 BLAKE2B da4d77fdcde28bc6e27ddbe013bed4c02cbb17db878ff0d935051daaf7277e2cdfe30d0e6917d4ec2df62ded08117815f2eb12830cef48056f56188ac5eb92fb SHA512 26754f2a4870d0a5484162b626dad5109a33c116675898c84de46155659dadeff2b3fa9ea3dd0c7da8d23c8ff0974cfe42bdd07484e6f784617de3a577b3c883 +EBUILD go-1.18.10.ebuild 4803 BLAKE2B c780e8df63e21966b8f7514ffeb07d5a34647c31eb0c437b12d4550abd36e9db258749b22eaae9a45efac1402fd1229981f3d4f3dfc05dad9d077f4eeb9da070 SHA512 8b3f0228714aded05e287dd0239ced3125306028aa99596be76d31e543f0e542df430f0908802aeca202008a2d76287ae034ff40f4ae3195e0a24a25f0f57cd4 EBUILD go-1.18.9.ebuild 4798 BLAKE2B 8857c2432424a27febc299a46ca61bfd267d9a1d2fad7116096e5938a519410d35bf90b61a1827e2ad769986b9406ecd0bf1b9197e64b8a176e0a8d9dbb600eb SHA512 9e2efbcb8652fd203e239626f2ace311dba12c591829ce00e4204f28c3d908adeca69d1a17855c2544f2f8bc5d88a636a3d1c806d36542788c1949204b5535b8 EBUILD go-1.19.4.ebuild 5054 BLAKE2B bfbc428b87f2e9f73850027eca19f0b4ea1faf02d25b73e45cf7b60a4c517b3aa84eebf8ce7134fd43a14084f56c8117c3327d67a642ee825e8a9f61a90d1e9a SHA512 f48209444e188c0d44a133f9a983787fbe99b8a6eadcd9c16d2e131683f0bcf88cb2299315c2aaff5c5e70ffb0e5ecc49f7f87697fd8dbae7c852b54678d50eb +EBUILD go-1.19.5.ebuild 5059 BLAKE2B 5a5c1e72de140981024dbe35a52da05ff1a116f815b105ca9d5c858ea10ffb6817374c6fed9a1b4b4a7d4ef11c6e85bd7ef2d5f3bf5f7becdea1f29a2bd6be6e SHA512 97d3158448c4926d7fbe3de4527513543da0774bf916f3e20f91f670ef3a03dda26dca80c97d11ea2a07b08a1dae7973179b959b57a9198f0ca62fa7d270db3d EBUILD go-9999.ebuild 4798 BLAKE2B 50daca174e8bc89f747432e96bc7d66e6c7dd50320d0b4c97754bb90267d62b700d34c250a892fdf60c907fa5eb881dd7adb3e64eba7ceb240740bd90c399f83 SHA512 051671c9a99efe554f9ed66423a20d053546ba68fdbf8a900e4ef0a365622bf8fcc976c678e393ade4a5475e01ccc53668d61d98e1b976e69de030662498273a MISC metadata.xml 590 BLAKE2B 56da63bdc350df5c6ef3b511a386627f4020f655027ca88da6a83ecb09581d3c3055c836eb8fe98a383412b3d431a77a9935ad753fe2d8392afa37cd613c15b0 SHA512 5d78adbae30c3a805194567bbb1af2ad59b78487819e7841a040d2a4d5db02f5b5d1d58f7cfc7a37f39e5e9bcf332dda4d336456e33e36c33caef792ac45d48b diff --git a/dev-lang/go/go-1.18.10.ebuild b/dev-lang/go/go-1.18.10.ebuild new file mode 100644 index 000000000000..4a7e8b7405a4 --- /dev/null +++ b/dev-lang/go/go-1.18.10.ebuild @@ -0,0 +1,196 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} + +MY_PV=${PV/_/} + +inherit toolchain-funcs + +case ${PV} in +*9999*) + EGIT_REPO_URI="https://github.com/golang/go.git" + inherit git-r3 + ;; +*) + SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " + S="${WORKDIR}"/go + case ${PV} in + *_beta*|*_rc*) ;; + *) + KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" + ;; + esac +esac + +DESCRIPTION="A concurrent garbage collected and typesafe programming language" +HOMEPAGE="https://go.dev" + +LICENSE="BSD" +SLOT="0/${PV}" +IUSE="cpu_flags_x86_sse2" + +BDEPEND="|| ( + dev-lang/go + dev-lang/go-bootstrap )" + +# the *.syso files have writable/executable stacks +QA_EXECSTACK='*.syso' + +# Do not complain about CFLAGS, etc, since Go doesn't use them. +QA_FLAGS_IGNORED='.*' + +# The tools in /usr/lib/go should not cause the multilib-strict check to fail. +QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" + +# This package triggers "unrecognized elf file(s)" notices on riscv. +# https://bugs.gentoo.org/794046 +QA_PREBUILT='.*' + +# Do not strip this package. Stripping is unsupported upstream and may +# fail. +RESTRICT+=" strip" + +DOCS=( +AUTHORS +CONTRIBUTING.md +CONTRIBUTORS +PATENTS +README.md +) + +go_arch() { + # By chance most portage arch names match Go + local tc_arch=$(tc-arch $@) + case "${tc_arch}" in + x86) echo 386;; + x64-*) echo amd64;; + ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; + riscv) echo riscv64 ;; + s390) echo s390x ;; + *) echo "${tc_arch}";; + esac +} + +go_arm() { + case "${1:-${CHOST}}" in + armv5*) echo 5;; + armv6*) echo 6;; + armv7*) echo 7;; + *) + die "unknown GOARM for ${1:-${CHOST}}" + ;; + esac +} + +go_os() { + case "${1:-${CHOST}}" in + *-linux*) echo linux;; + *-darwin*) echo darwin;; + *-freebsd*) echo freebsd;; + *-netbsd*) echo netbsd;; + *-openbsd*) echo openbsd;; + *-solaris*) echo solaris;; + *-cygwin*|*-interix*|*-winnt*) + echo windows + ;; + *) + die "unknown GOOS for ${1:-${CHOST}}" + ;; + esac +} + +go_tuple() { + echo "$(go_os $@)_$(go_arch $@)" +} + +go_cross_compile() { + [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] +} + +src_compile() { + if has_version -b dev-lang/go; then + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go" + elif has_version -b dev-lang/go-bootstrap; then + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap" + else + eerror "Go cannot be built without go or go-bootstrap installed" + die "Should not be here, please report a bug" + fi + + export GOROOT_FINAL="${EPREFIX}"/usr/lib/go + export GOROOT="${PWD}" + export GOBIN="${GOROOT}/bin" + + # Go's build script does not use BUILD/HOST/TARGET consistently. :( + export GOHOSTARCH=$(go_arch ${CBUILD}) + export GOHOSTOS=$(go_os ${CBUILD}) + export CC=$(tc-getBUILD_CC) + + export GOARCH=$(go_arch) + export GOOS=$(go_os) + export CC_FOR_TARGET=$(tc-getCC) + export CXX_FOR_TARGET=$(tc-getCXX) + use arm && export GOARM=$(go_arm) + use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat') + + cd src + bash -x ./make.bash || die "build failed" +} + +src_test() { + go_cross_compile && return 0 + + cd src + PATH="${GOBIN}:${PATH}" \ + ./run.bash -no-rebuild || die "tests failed" + cd .. + rm -fr pkg/*_race || die + rm -fr pkg/obj/go-build || die +} + +src_install() { + # There is a known issue which requires the source tree to be installed [1]. + # Once this is fixed, we can consider using the doc use flag to control + # installing the doc and src directories. + # The use of cp is deliberate in order to retain permissions + # [1] https://golang.org/issue/2775 + dodir /usr/lib/go + cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go + einstalldocs + + # testdata directories are not needed on the installed system + rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print) + + local bin_path + if go_cross_compile; then + bin_path="bin/$(go_tuple)" + else + bin_path=bin + fi + local f x + for x in ${bin_path}/*; do + f=${x##*/} + dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} + done + + # install the @golang-rebuild set for Portage + insinto /usr/share/portage/config/sets + newins "${FILESDIR}"/go-sets.conf go.conf +} + +pkg_postinst() { + [[ -z ${REPLACING_VERSIONS} ]] && return + elog "After ${CATEGORY}/${PN} is updated it is recommended to rebuild" + elog "all packages compiled with previous versions of ${CATEGORY}/${PN}" + elog "due to the static linking nature of go." + elog "If this is not done, the packages compiled with the older" + elog "version of the compiler will not be updated until they are" + elog "updated individually, which could mean they will have" + elog "vulnerabilities." + elog "Run 'emerge @golang-rebuild' to rebuild all 'go' packages" + elog "See https://bugs.gentoo.org/752153 for more info" +} diff --git a/dev-lang/go/go-1.19.5.ebuild b/dev-lang/go/go-1.19.5.ebuild new file mode 100644 index 000000000000..2cd60e3b05d0 --- /dev/null +++ b/dev-lang/go/go-1.19.5.ebuild @@ -0,0 +1,201 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} + +MY_PV=${PV/_/} + +inherit toolchain-funcs + +case ${PV} in +*9999*) + EGIT_REPO_URI="https://github.com/golang/go.git" + inherit git-r3 + ;; +*) + SRC_URI="https://storage.googleapis.com/golang/go${MY_PV}.src.tar.gz " + S="${WORKDIR}"/go + case ${PV} in + *_beta*|*_rc*) ;; + *) + KEYWORDS="-* ~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~s390 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris" + ;; + esac +esac + +DESCRIPTION="A concurrent garbage collected and typesafe programming language" +HOMEPAGE="https://go.dev" + +LICENSE="BSD" +SLOT="0/${PV}" +IUSE="abi_mips_o32 abi_mips_n64 cpu_flags_x86_sse2" + +BDEPEND="|| ( + dev-lang/go + dev-lang/go-bootstrap )" + +# the *.syso files have writable/executable stacks +QA_EXECSTACK='*.syso' + +# Do not complain about CFLAGS, etc, since Go doesn't use them. +QA_FLAGS_IGNORED='.*' + +# The tools in /usr/lib/go should not cause the multilib-strict check to fail. +QA_MULTILIB_PATHS="usr/lib/go/pkg/tool/.*/.*" + +# This package triggers "unrecognized elf file(s)" notices on riscv. +# https://bugs.gentoo.org/794046 +QA_PREBUILT='.*' + +# Do not strip this package. Stripping is unsupported upstream and may +# fail. +RESTRICT+=" strip" + +DOCS=( + CONTRIBUTING.md + PATENTS + README.md + SECURITY.md +) + +go_arch() { + # By chance most portage arch names match Go + local tc_arch=$(tc-arch $@) + case "${tc_arch}" in + x86) echo 386;; + x64-*) echo amd64;; + loong) echo loong64;; + mips) if use abi_mips_o32; then + [[ $(tc-endian $@) = big ]] && echo mips || echo mipsle + elif use abi_mips_n64; then + [[ $(tc-endian $@) = big ]] && echo mips64 || echo mips64le + fi ;; + ppc64) [[ $(tc-endian $@) = big ]] && echo ppc64 || echo ppc64le ;; + riscv) echo riscv64 ;; + s390) echo s390x ;; + *) echo "${tc_arch}";; + esac +} + +go_arm() { + case "${1:-${CHOST}}" in + armv5*) echo 5;; + armv6*) echo 6;; + armv7*) echo 7;; + *) + die "unknown GOARM for ${1:-${CHOST}}" + ;; + esac +} + +go_os() { + case "${1:-${CHOST}}" in + *-linux*) echo linux;; + *-darwin*) echo darwin;; + *-freebsd*) echo freebsd;; + *-netbsd*) echo netbsd;; + *-openbsd*) echo openbsd;; + *-solaris*) echo solaris;; + *-cygwin*|*-interix*|*-winnt*) + echo windows + ;; + *) + die "unknown GOOS for ${1:-${CHOST}}" + ;; + esac +} + +go_tuple() { + echo "$(go_os $@)_$(go_arch $@)" +} + +go_cross_compile() { + [[ $(go_tuple ${CBUILD}) != $(go_tuple) ]] +} + +src_compile() { + if has_version -b dev-lang/go; then + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go" + elif has_version -b dev-lang/go-bootstrap; then + export GOROOT_BOOTSTRAP="${BROOT}/usr/lib/go-bootstrap" + else + eerror "Go cannot be built without go or go-bootstrap installed" + die "Should not be here, please report a bug" + fi + + export GOROOT_FINAL="${EPREFIX}"/usr/lib/go + export GOROOT="${PWD}" + export GOBIN="${GOROOT}/bin" + + # Go's build script does not use BUILD/HOST/TARGET consistently. :( + export GOHOSTARCH=$(go_arch ${CBUILD}) + export GOHOSTOS=$(go_os ${CBUILD}) + export CC=$(tc-getBUILD_CC) + + export GOARCH=$(go_arch) + export GOOS=$(go_os) + export CC_FOR_TARGET=$(tc-getCC) + export CXX_FOR_TARGET=$(tc-getCXX) + use arm && export GOARM=$(go_arm) + use x86 && export GO386=$(usex cpu_flags_x86_sse2 '' 'softfloat') + + cd src + bash -x ./make.bash || die "build failed" +} + +src_test() { + go_cross_compile && return 0 + + cd src + PATH="${GOBIN}:${PATH}" \ + ./run.bash -no-rebuild || die "tests failed" + cd .. + rm -fr pkg/*_race || die + rm -fr pkg/obj/go-build || die +} + +src_install() { + # There is a known issue which requires the source tree to be installed [1]. + # Once this is fixed, we can consider using the doc use flag to control + # installing the doc and src directories. + # The use of cp is deliberate in order to retain permissions + # [1] https://golang.org/issue/2775 + dodir /usr/lib/go + cp -R api bin doc lib pkg misc src test "${ED}"/usr/lib/go + einstalldocs + + # testdata directories are not needed on the installed system + rm -fr $(find "${ED}"/usr/lib/go -iname testdata -type d -print) + + local bin_path + if go_cross_compile; then + bin_path="bin/$(go_tuple)" + else + bin_path=bin + fi + local f x + for x in ${bin_path}/*; do + f=${x##*/} + dosym ../lib/go/${bin_path}/${f} /usr/bin/${f} + done + + # install the @golang-rebuild set for Portage + insinto /usr/share/portage/config/sets + newins "${FILESDIR}"/go-sets.conf go.conf +} + +pkg_postinst() { + [[ -z ${REPLACING_VERSIONS} ]] && return + elog "After ${CATEGORY}/${PN} is updated it is recommended to rebuild" + elog "all packages compiled with previous versions of ${CATEGORY}/${PN}" + elog "due to the static linking nature of go." + elog "If this is not done, the packages compiled with the older" + elog "version of the compiler will not be updated until they are" + elog "updated individually, which could mean they will have" + elog "vulnerabilities." + elog "Run 'emerge @golang-rebuild' to rebuild all 'go' packages" + elog "See https://bugs.gentoo.org/752153 for more info" +} diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest index 47d63550fda6..91025c79524a 100644 --- a/dev-lang/rust-bin/Manifest +++ b/dev-lang/rust-bin/Manifest @@ -31,40 +31,40 @@ DIST rust-1.65.0-x86_64-unknown-linux-gnu.tar.xz 162028064 BLAKE2B 8c572cc304c16 DIST rust-1.65.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7a9287b6125eab2c14a026d6b4d8a3e980b9fedac0436b75b1bf314b093b5e39de0d70045e183a2e823d729d24f43f6251a2fc28b072e3caa1950fbbddf149e6 SHA512 16abed6d7a17b9e5f3e399865ed5fee01272c8e6696ea2e784a6fb149df16da2c4123572dfb56c3c44d407d388033e52b552cd164600629cf61b33c011e4e415 DIST rust-1.65.0-x86_64-unknown-linux-musl.tar.xz 266683288 BLAKE2B 4312a53bca3e33f6633fd5eed1b17754813e54d688185ff4cca6c5d6b24713994fb5fc424113ab08c121319cc79da3d7d89518d18dbb1b491bc8ba2ec831c12e SHA512 6c7ddc98da3227b23dd681615bb8f8ea883f3bdd9547e35733cf6acaf2a625301c53449b1a3ddf88dad9a5c940f8324c3e1bb31d871092fc848b863256c85935 DIST rust-1.65.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 054f1b773518a9640f3d9226510cb0b00a7f8dc4a9046c325b82d038a50c699a8bd84f71ed62790e9b96b4d65ad12ea631f6a8bc18b3bafd66db3d21137cd378 SHA512 39aa000c2a1359cfd7d2eda2b22a9b10c0fe4aa024862b7ea67bd488e06fdee6f5cc4e98db7486b84ce53f1c299bbd5391f63e25df0358184533a5fdced4ce61 -DIST rust-1.66.0-aarch64-unknown-linux-gnu.tar.xz 250306224 BLAKE2B 205998bfbddd3783253e83ee405017e48d8ca9910ed354682cecdb5f01db6a770b1ec74d1f205c9d44285c689ef7e7dcd659e76c07f636a48556672ee6369db1 SHA512 1457357d66cf6324ff40b83a5c3a5fa65ad4a09ee29865f8199b7b1048d54f6a5eea5dda22dff7a68327cd43cc79b23d7d37f18652fd5037cb98e7f6309a29f7 -DIST rust-1.66.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B eddada436122349cf3c2d95f722c4737d2ccd913f240552eb614b61f3d1d0c79112d8b02abf18a0669b556f244c7cf23d1ace142fea6a18fdfde8d00788e92d9 SHA512 0d6cc9c4d320b2b1237d4efeab44b47ed5a299040fc0ff872b1fae691117add5b5269fe36e964808644a4da3e43160e88c25f2d45ba28b793dc17873c4f7cf6b -DIST rust-1.66.0-aarch64-unknown-linux-musl.tar.xz 227790456 BLAKE2B 2fca4abf3d1d515d740b1903eae6eb5d5430c324f0764afeb599658767703ddba7260484bddf352b11624e2a42d47369ea57c3f94a1755e9b14511f837d2401a SHA512 357513686ce65b6f374b348b110e8bd390b854d7474227f9a0a7606915f7d72207e80a79eafc94e9f168e4f7641fdbbcc664968654c29f128ce5d0b9c9f8c0c8 -DIST rust-1.66.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 5cc0d92045f3025eab53e6d9c07d25863edc7d1ad43417d7265a7bc61d3a9533ffdf8a93b2155deea8a5ed93389fdfe70fdc42b48df23b1000d8930778800226 SHA512 767de3ab4720a8213aa119fa58b8886552eafa1d44f533236a95069cc02b64a112859f0458560cec85ca67e5857dd43d605d1b097a947935e9ebf7d042e13414 -DIST rust-1.66.0-arm-unknown-linux-gnueabi.tar.xz 206684752 BLAKE2B 5366b741fb75127aa19b742847f46d3e289eb515958a0574840cef5407596da6ba6e480adabe392ef93dacde4a6b58e016849926403f559c6d70dc5c9e188864 SHA512 93e0d9014e84f52b995f5177d1ada0233b00309a5e32e11c8df2d90787051262911cd0a533809feb8b0b26f5fe6345334a11afc40d64cc62a9ccbbf62951a17e -DIST rust-1.66.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 2d73b120e8c923ff5132c1eda16d6cbcbbb1ceb6545ab1ce0f11ecdd382752e830115ddd8ff69a5d8d8d9cf6b4fdc3744556bf68ad9ca3c2e6af88985daeb52f SHA512 ec06451225c4a3eeadb250975c371c15b6d84a3ec03ff055932cfb8eb8340de63bde5ff82be895af469b9150b681d543dfd1ad69987cc8a2b21c88a2c880683f -DIST rust-1.66.0-arm-unknown-linux-gnueabihf.tar.xz 207933932 BLAKE2B effb357539d17ab41b6820f25897c3c0e402e196aca7d7f360952f98a8586b58de6726b94e3a678d4004bbd9781991dc120e5c976f9d829ae171a1d9ef39283b SHA512 e69837015254865aeb44fa2884d5df3b6022823780ebe67d25ff8691bd5ce4221c2b8c06f7dcc7c4151233f5cf69f36b7349c339dfd39621c753ec38f7ff47ee -DIST rust-1.66.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 96c61bf79503201d63906cdf7f30775cab4574f677a2edbcf29335318b67cddba5aa176febaaadf073938e93dbce402b1622fd82319cf571186d43387dad8f49 SHA512 97219548f6cd3144f89eb436c4c3d6b11ca921cce1837cfcfd7cf61389921eeedf18db6aceb63092ea8b70dae07c01b1e4a91c9c8cffac465607ea8bac950a65 -DIST rust-1.66.0-armv7-unknown-linux-gnueabihf.tar.xz 213498964 BLAKE2B 2d8f3eb28daf2acb2ebd9adffe793840606e02e47fd1771b5d5f09382fb99b16d30695ecde3be1ad0207c22e216a51d4d55a83759793950ecd40398b8877eef3 SHA512 d04ac6b8cec1122eab78a6041700c59b00b14a953d3c32752af3d5dfee41b8adc720b27d77d846ffc96191d1cb97aa783606017402e41a235c26507cc2f3f5ae -DIST rust-1.66.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 694ddd2d37d3317e31165804e11789d8311a6a0c7a5eea76d10597aa3909eb373aa1a2412f6e47d76fa947034aec5206c6cad1ec42b3149fdb961b1a0edbfc96 SHA512 c3974eee82b23c7aa12b7d4b4ffafea7346dd763d06488bc8d3ebb5434e1e5dcfcba8a7895b91bf9483f85e1c033a36c64930edacf875e961c2113685231232e -DIST rust-1.66.0-i686-unknown-linux-gnu.tar.xz 235321612 BLAKE2B 3b969184a6a2d50eefbee80418d27bc3066c36828e81aee4972f6b8a4fb1c15832d89595ee4e5e710bf929b1582e1be4ca8b042813f5ec18a855335d5a627648 SHA512 9b2dd00a0148fd21420a710b7385e47a5a005986960692a379db8d9d1ea6b362c32c5df784e800b4eb0d93470aad169f33525bb05fed14468e9f020b1df5372e -DIST rust-1.66.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5f4280de5b0fe9bf33009b014031aadcd3a440caef238c193e2ee1f97bbd9b4ee6fa81be9ed47ee6ea7b93c54904fea9c002beae4e48cc548acce81d1a14087a SHA512 de5c8b8b3e58dd0bf1e2650f0ad596a20688d1f1cfa91180d04d2c3d8bbecad03efe914ecb3acd1b052e3f4083e1340784b83b585fd32d599125be5bc076d561 -DIST rust-1.66.0-mips-unknown-linux-gnu.tar.xz 187239428 BLAKE2B f58a7fe638de637d98cd4bfd4404fed77196a63ab3dc566f1c4b7357a7055e913c19f31146b919274d63e4c057784e10bab7a77cc28b054862c23ca841ec6992 SHA512 1f886fb49cf539d3cd176462b1b61936f675a43794b94c93a7b0f044724b42539c2dc1affbafabbfea739e57a32bf7a212d4fc6a62aaac59f0bf9cfd33aae70a -DIST rust-1.66.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 82fe584254200b093ad6f857daabe7a17e77da0f2fd5e616107caa0020cd84a28bf95d8d74c28a9d40d9f072de9df129e3b504e691675c48a81c79f486e39544 SHA512 d414b87276e27fa577ddf4647b1a0c361fd98cd51ddd8ef5cda06e5935dfc7e0aaed21307a121a80fbc64fad8bb8e33a4161101bb7aba40516b607064315ba27 -DIST rust-1.66.0-mips64-unknown-linux-gnuabi64.tar.xz 185301272 BLAKE2B 578478e19b11719a433170e3c7784fbee16aac12fdc219bbcd9adffc89496d03e845037bff6b4ad39ab8d70b3a191cf83ca4ea8fe2962b9b6e16831b0d704932 SHA512 030ddaf736b60d0b7b0ac151531ed200a12614f794f50d5e392205364a1781f0f3026443c1e346e35d81437551c3ef913c12d76e3ce2fbb4718d157466d3ad3e -DIST rust-1.66.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B ecfcc2d792cf3d24689f3dd6916e6aefa2b2f366dba810587b632f1536d1c9304bf7faf483c64c389b3d37d14a2007bbfbb4e9fa54a2c1f5bdff3064fd128fe0 SHA512 dc6ba8509cbb74c93290a94da67a6057655bd6b879cd955e6decb5b30b20babedf66ce445ebdd486bdf6f1940fa19d0af435460b7e7ede4a98acaad150cadc85 -DIST rust-1.66.0-mipsel-unknown-linux-gnu.tar.xz 190443604 BLAKE2B 439e5b81dc7776b47113229d9f1c0049dfaaaac8d8db8e9d77f0329c20352d5a1284aba2e666a5fb5119629bbcadc4de3289c4942cb3594df6ee82b169717949 SHA512 1e921dafbd757116a19893070949edd42af81e2b164be97d4db2eb7f446ad63088b7f251392ab8a3dc827034d336c42325f4be1c8e56c6910372c526b031f926 -DIST rust-1.66.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B df2999713a1d39d4bd40d4c942f4a446f6089162cd32eeea533af6b32caee6d6d3b94ba6bc9334948819800304522edfaf7ffe06b2645ce2012524c103df5160 SHA512 a8eedbe60a02de62a43122355a93b63a63cf41027b7bec6b11a69d1f6f75eb18dca614b749bc1098a9a9e7102030834a926352c5015a95c16a1576b357c95d17 -DIST rust-1.66.0-powerpc-unknown-linux-gnu.tar.xz 209788340 BLAKE2B be962079fadf12c4a2125531c296bdc34ae5d84b7054331c6eb81881eae700929151837be537964e588def58ba0977ece65f93579414475de064664f0bf11048 SHA512 4842c0f8a83e29341fc5b18c8e3faa1085a37a2c18de6939c71b15763e3279941f0960a3143ed3b59f56bc8219433fcefa02e11d96fc003ce5d1f91c81536d48 -DIST rust-1.66.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4a3657202716613c40c793c2f59e0c38e29fd5dfedd33ac21a2406cd72e8b0df1231fd5ee064cde81065c07994ac0503df7dbf0cb22b27727c4866ae3977d436 SHA512 0436e22910abe2f8676ff4069672af64e2af9a0a274b811b23a0cb0623012e1b921c2a79618a6d89d704cbbd7e3d46c8637ad8cd35014187826908ffe37cd86e -DIST rust-1.66.0-powerpc64-unknown-linux-gnu.tar.xz 209992020 BLAKE2B ae25f7fa7096af8a8e7085f303902c7bd5a953fff334cb05fa87a2ff8d49abf5e06381629d8e5fe5093c97b6dd3d1273000605e29b3f683986211f68cf72bf9e SHA512 f43c3f85ff25a03245614305f7a7c86e2bfe63c6bbfb52198a4dfc75e8a1707864bc444a2d9fe2d4e22b566b48f2bdebe25a3bb7bef042d3c5715f9f4fb9204d -DIST rust-1.66.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a5a8636105f6520c2cc8b2fc900a6803c2e23cfd80c62876d7e089e1228c11671ff3794142e968a84acd1ec9e53128375b00c1b6d2dbbbf05fc5cea92c248823 SHA512 2a8c90b3fca12ba263bc0b5aa44a7a86b4be0c91b14fdb9f9fc09dabbf07ad4b02d47409a45d92a503d8fc25072dc4cfecd86c9dda2f5e6307d6d7beb109727a -DIST rust-1.66.0-powerpc64le-unknown-linux-gnu.tar.xz 222462340 BLAKE2B efa36b10ae76925fccca25974af6907a898a14a197c853f9b19c25ef1081ca3877d2bd176913c75d20825a15387f34d74b3eb142bbb738bfb257de961e9b1048 SHA512 9322adaeb4d3acc9c1f422d4171730bc43fbbe272ab982f849264b65f28656662dc622b01a0ee609a512417bebc184d79beef60ca8f755df79678dca511cb9fc -DIST rust-1.66.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d20cb20ac58a0107fe901088f36c95054523b0773d3fa61794b75c4116a5f7d72c277bfce4c39930fe7d51f148860911547b95f133f78b43d0bedfc55fdd2386 SHA512 8f52e04b83ebeaac0f4afcfe7e678d4fe938973c26833f091fbf6922536886bce1351afc9ee6f29f5be7e7587b2c25c4b25c00381603a25dfa6713fad2cfddfb -DIST rust-1.66.0-riscv64gc-unknown-linux-gnu.tar.xz 189347880 BLAKE2B fe0c10ad8e21712779b765c2d1c5346541ae75024e7afda830e9859b0c82c595de85403169b9a10b56b64f833ad53014a4c711c71c61a1cc6cdfc0428e8a3191 SHA512 64f4ca1720c4fa045920795b8643d1c6979a31362148d4586e50663697567cc6a80aceb1f7f432bee61ae48125e7630a2ccfdaed0d68af00820842cfedacfa4d -DIST rust-1.66.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0e0203f92aa9fd488df0301f0a53e64326ee5fb40caa36fcec438325f7eb09fe7667ebc646961a5066e7a9b2470aa126ab5c758e6cb630354e89883dd62e1a97 SHA512 12f6269648ee9cc2e58eff706e36dac5c22f77a23742e5f3b993b46832216d838dfa66dd0011c766be4a949f67edb0b8e3b8e5e383dd7539c2f81d2d645a4322 -DIST rust-1.66.0-s390x-unknown-linux-gnu.tar.xz 226686692 BLAKE2B e5f67e79bc2e2e8ad4c235d9fdabddb66fd184f78704d9cac4ec1b74164f70c6a4f8d39405ba5213cc785f2b899109371c94fad12c4f422c651fab902680ae27 SHA512 aeb5d80985eba6615e5c7ccd2e2645fee0090fc9f5811dc5fa8a17a6439f9f4e9e24595ff95367972f58d3c109e96becb819448bbb14412a55a40302a0290bdb -DIST rust-1.66.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c3e71e63d7c4621553f6281bf1d3116608bcc9e6b322f34d2e70d5cebb0be740d962b201755a1de87c3cec46faf8d3d9ca4ece0654c9726d2604b094097d0140 SHA512 10df7ee6235f21fc2013ce976ea089205854cd82c14d856e2097ee870f90aaaff26a06d978ac70a07e5381d59cfc84c5ce61e9039c5990a64e04b780d606b3ce -DIST rust-1.66.0-x86_64-unknown-linux-gnu.tar.xz 187045868 BLAKE2B 69044ba6dd1968fa72bbdef5d30c4d9e3fdc31784154f8f298dc5848d80c7c265ee794ac0b2e399583d89a3f92e3621216efa820dd6b13f3a3821e509bfb7152 SHA512 016ddbc4a96282ce24ce54c088fb0d0304d8b75530a98d05616cae4b7c3766d1795a5cfb03e323a9be2bd8c8cce82a437deae27e304fd066a4e02ae8b5a39a8e -DIST rust-1.66.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 2c525f102b34cd041f9b77e66bd07e0a2f82e5802e55dbb396cd774a9f0c123e26b519ac94268102c0aee7e39914f168f102fc9f19b8d6f7191e5ec8df6ba4af SHA512 00248dc2fb19bb7c27c9ea365315e5edaa41a47f37adbac6bc2ff4a4f800f240dac225c2f46e792fb66493e06899ec0549510bb7eaa8410f9775b7d54e54dfb1 -DIST rust-1.66.0-x86_64-unknown-linux-musl.tar.xz 270575908 BLAKE2B e842a4ec715e274e787c7082105bc75e110c1d3c9d2142d9712f61cac3be1ac70fcde1107f71ef66d4f4ee3c7c8ad743ecf1d663f392631a1f30a85a66ea6017 SHA512 3fb4b75cdd449f02248147cc7ffba8c7b5d80fbcc5bcf101d6bb6816388cd26383abe7889f42f4e1dc38ef1f006f3fc7fc3f5d80060259863ad7b5a3628f7c90 -DIST rust-1.66.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B b3ac84b16a7188d1842baf8a52f80404fd95d47e0e77d1014f2bd955458ad04c5c47804d6f6275c410f2887f87c2cf0323e428905847141795ffd51dfaa3692a SHA512 2e61d09ad53afdc1849f9bd88a8a506fdfaaa3c5b8322fc92d0acd8e78ec51e48e94d049d1f469105c95d986aeaf370cfaa023a788781a77f9d6417edf06224a +DIST rust-1.66.1-aarch64-unknown-linux-gnu.tar.xz 248806760 BLAKE2B fc5474257221705de7a8220029a406145b886914e59a3ae1ca4048b5789d4bdfa1b11506f7473590efb65c36463d0c34b2a185a407fb31247714eab715a9e3f0 SHA512 3f6f0f03d88c7f175efdf9ed541a4e1965df5473a7865e7611ad8df51cf53a12b27e3493c4b2021749e0c912dd844f9117616d2c740a5e9242872f07d3978c48 +DIST rust-1.66.1-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4fdbf4edaf4a346557996faceda168bbd74064566a902811c52772ba832f4ab96b3128dbe06e06de4e54cceb642b837e1cb1ff7e30ff9c0739f9ec44aedec8a9 SHA512 7e59bba51666275559362515f31fcbb0635055de7d85f3e3d6598b2caa9fe2c5656032c221327debc2d174592cb981c86212ec7860d5b73d55e90c02a0258c58 +DIST rust-1.66.1-aarch64-unknown-linux-musl.tar.xz 228044080 BLAKE2B 8cb2341e84c2f8df44a0484a6a559148260c1300e81e6ab145bb57920d65fd44af8144cd0150ab9c203aa2a000f09e0696a53668e7b8d0984f9fd4710012b736 SHA512 6bb116af95b7946609017afa68eebb5278e568f852d879fd0f068d4ef10afdc7638ced0a87683080240a24f7e52f119cbe0268639906984ef8bddbe4c5dcd43d +DIST rust-1.66.1-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 6b7ff46ef90437ca89322d66c0ec78d549d65d0d206704ac6e72c9f427e9d7224162291b37dde40b35954795c8879a3f380dfbf1de38da0c979b33ee315d5aea SHA512 935055c5dc28e4b2b44a5b1279d401a0b939ba576c1d8157de083d8a726fed678b5420cfd090e94dc1e9a309cc070329590515c4110fc241f9b5be7f8df2d493 +DIST rust-1.66.1-arm-unknown-linux-gnueabi.tar.xz 207170588 BLAKE2B 0c3a52fb3549c63ccbb43109cf54cb676812d49461344629b1c0f8d4747a40c9f6b6d050c9e27da6dad5914cf491fa7653a107b9f9e3a7f851ebecef2a98588c SHA512 6e4e385caf95a3ddc2fe4a05ecec745b721bf2eac9846d61e8ffaef749b1db2e506b7face55aa72cc7ffcda340f69185f30eb1d456a9f063c7a7c7ed7fd4eb9b +DIST rust-1.66.1-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 8068dac7f1078470cabdeadfde8722bc96a1271e5572a4b84b7d108b173d87d1be32eef9b9be67b2c6bb3ab72dfc6a524476bfa46e222c29bc93724a183410c6 SHA512 ab3e4c7e470d4f7736e452c7118ab945747db5566b7e6d1c81359c3e224ec348b18193d4cd054772e878f791308dce792630fd4f10f750efc7e0e23b150c16d2 +DIST rust-1.66.1-arm-unknown-linux-gnueabihf.tar.xz 208535556 BLAKE2B cd1454141cd89f63d401047801b88421d9a2906425bfc4482a24fa1b468d2db382a939cb64b836808a1d0438f464d28a83b7e8097e2f97f1053a5fac7bc6de29 SHA512 92abac3fd13319b9edc6daee72689ae29e463bb317ed08580e04ff6f31b0ba5816052b8d26914d9c224ea47399517b388db78ce8ec17629795ea3988c353e2c6 +DIST rust-1.66.1-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B f828310aecad4d96c9074688f0211ba7e5286f0b3e669cb6fb1b9e3ae3adc776d6fdfda0702103cc571771eb404307df6f55c498fbd8dd006e02338cbc14893e SHA512 d3b88b83efd4303b5fde991672594d25c253b0fc6d66875dc217808190903f28a6afe8977a9ac436542c42675a12c0e244bba9aafb239c15f2ffcfe533ed92b2 +DIST rust-1.66.1-armv7-unknown-linux-gnueabihf.tar.xz 212774560 BLAKE2B 4bad7755067da0a99135cc8212928b78ff254e143908712c1cb77d41ce7a8db1c7d2eed3b12b916214d03f0bf0be17d81b2669ddb5f3722fee921f2d65aec491 SHA512 4cd871dd6cdf379c71290287ae2125ef57c2d5d52753285f064a6d96e8cb586cb263ee49f7b099ede8f3e15f1bbc5b286628acf242de4fb3ba8e5d80323c08bf +DIST rust-1.66.1-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 56504503b1b45a43f10b01f3e470667c93fc12036506b94cefb66f4241bf457d537899c2db4894027ef7f649eec627ad7bef8e1989523aa8ab67ba3f51976f23 SHA512 0a7de37872ac1a8c07ad1ac02d2bec9fb614175a5f394d603ca0c894d3d6cb12a35877e38c807da29ef89c7465a27080cfa0d5fd8ac21884fa5bc3f3c47fbe9b +DIST rust-1.66.1-i686-unknown-linux-gnu.tar.xz 234959096 BLAKE2B 0e0583c460092539e8813feaa0f65a026f4f52357571be5bcaef114f062c598ac5d2e3f4f22c88514b9b0a9e53e256a25eb2f18353642a8e40c6156df4309b54 SHA512 19cafc7763b40aa48543c5678f3c4d23b552f091bf6dc592f57ec950856802b3e7dee98d06b73ead0861630ff101260d741082fc1cc65c7f256e4591b821068b +DIST rust-1.66.1-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B dd2c75d23caac69aa5e8cc965d5de9705f9f8e5f0be53cdd87e51deb07875579cf948bd6a7a02f10de3fcdbc70fb1cc46a4b616af44f3296787e5d9a32557490 SHA512 9364bf48b262c797815cc3f38188bdbe595cd39839b5bdcd43f7da07fdd421c61ab93ff4fa65d6b20f7d15e8eff190cb0d8a92a806878b1db5ccb62e80eddfeb +DIST rust-1.66.1-mips-unknown-linux-gnu.tar.xz 187966796 BLAKE2B 193f18a9c56465d297ee2b3f1d9a8a67d8a6b1d07565503e6f5b31d4bd5b05782f45e95ee50a93e6d1b91275e9769a9d56518349a456f55392dc28b9d3a1ee82 SHA512 8f23b47f38ca42af3dccb395fa183edee3f18a478bdf1f7de2135e5afc6dd87d14508f7e2ada938dd64eb51f5acee27d0417fae6e3b1c114c6c812006206d89c +DIST rust-1.66.1-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a04c0f9320d663658b758e6b89709645433a0d16548c511945c439ce134617c8a05d7e9ff988e8f7a1ef62a726284548bf8b259648f614c3a2205ee9c02b3a91 SHA512 4b581b997a643c0ee6105c141c7859e86d9b2cb6dda85d867593829978911dc5a6c343a11712a334b94188078c0d3b1e7e734334b8b4a16b38afab228172bc6b +DIST rust-1.66.1-mips64-unknown-linux-gnuabi64.tar.xz 184874416 BLAKE2B 64d96a026634cce03496be36ea7a42986e0fedc75d6c61e0f9a6ffe5cd3432bacd353276636c58989d02328be62f760bc0157c5999262bbac5c570dbc049635a SHA512 ce4b5ff464e358b085c18c21697cf7f339c19db163a873bf68b24e2febf42e69e582bbfc9f95cc38a6c96610a8ccfe6ec431cb2f98be10c48f9c1cbf027456a0 +DIST rust-1.66.1-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B fdcc56efc4f7df5d13595661d59354e4fcc757e966360fccf8a86d42f31f952334b9cedd107d23e4132b90e3082013cc26076a0754455d2759e2bb878afe023e SHA512 c5918b76fdfa39ba89c980ec2d252b3755439c8baece26d27f3515e800061370c2715620a052d3f22bd57412d058f5e3f53084bee08b5026b0f50112e6c41b93 +DIST rust-1.66.1-mipsel-unknown-linux-gnu.tar.xz 191073888 BLAKE2B b88ebb699e97e7e243138bf5674956afac0204bcc19882efd59340bd45256e9ba07b7e160895faffd81c62b533b2d305b088c08d3a99060e91025627ec8b7c7b SHA512 9afe6b80df0e24f2cedd65e7ab5fb25cd28be69b3e442c80a8f92291c7ad7ff7c2f8ec2e901bdeeb8084467700db4c19055edfe4ca8ccf7f6ffbf69e5c20426f +DIST rust-1.66.1-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 9a8c4eb0683465c63d1d5f25eedbc2ee96331960cbb2704d67a806852a05544f646cfe8220a3582d6e05dd30e63fdb736d176c0467166192501d168e5a0fb7d2 SHA512 e35e0e6b94feb551dc1a06e36ad0c70fe2641dc5671fc74fe99baede8c40cbca828259eafbf790af43cb8775fcf8c38442d2ca3349277b07bacbb508676b25d3 +DIST rust-1.66.1-powerpc-unknown-linux-gnu.tar.xz 209784584 BLAKE2B d582f2efaf7401dfc8ece24026653dd52acd3bd5f3a87d12eaf1be5170909ebf009189312d59d5508beb6a68bb88545ce97af1d87049dd61b2736ddd9fbb9ffc SHA512 b8a9f4115864e0e6262c603e11b2dd9a66706c120aecbd0e7b0acc79ff1675f0dbbd2c6c0095d21be664a04408e610f07b4e09adc31f73b0fc92dbb2083f9b13 +DIST rust-1.66.1-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 1bf9e84765268fd89e4e18adc5584dc5b7517217e2c042e6a4b4b68d9716f0502df83115308451792d800458c71535f9bebcd1254f0d26e0359cc19e398d651d SHA512 93b7bc720dd9f0324a6a3a066e26d218236f8a87e50d4ee827d1f785eacc1e289d3635d7653d38197294c4ab4bbf6e15acd2341517f1a75c1e48a2034f5bdd3e +DIST rust-1.66.1-powerpc64-unknown-linux-gnu.tar.xz 211414032 BLAKE2B fcd16f3cffc4a8fa4d42daa75562d48c1a9aeb487b72a461a7a300fc15a51ef478afd8a129a34681c9035b3b846c3fc713e9f128e55ec0f3688022bf92ee2529 SHA512 8acd1e8b4ebd25d31652cbaca0173c87499fce233525d516279557d63c50cbf36d4bdce0bd73ab4b69d9dd95d0f3a91b7b80f77ae3a3f23de7660ee38b5e6b59 +DIST rust-1.66.1-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d07e572b2dd85f47c7cde4d6e328ba35f20f143d637a5b0b9d295f24b9bc3bccd72282718351419784a32c5d26189557beb2fd143792e3115aea4640650b4371 SHA512 dcc1708cb37bcf2820c7f6280fedfbfebc8a85ed76f6e5acc64f6b1f768b32f2895d737f7209ef8a7f81f339047531e28675f3a31e3f648d382359550f255095 +DIST rust-1.66.1-powerpc64le-unknown-linux-gnu.tar.xz 223088628 BLAKE2B 1627b274c35596e7fa932e42d8a14e6487fc74d34b1d8e2c4661d6346bcf3dc6adbea86ad62de8c9901b3cf7616e92e07d5d9f7002ef39d20a0c2a418e2533a5 SHA512 4834a7a794967b32c3daf633c4627e3ae9adb60268bb409f8886607ba8799f98fc8774a8652a41bba1e8147fd51e8a30ceb569cc22ac1f29e23d335974374aa2 +DIST rust-1.66.1-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 105e598220ad4c82ea4822b3b09744f6445e962dc4c9d9c01846f2e51586d2d18c71ed9ec9ed3c3e4d76715879e8e714d3ea47628fa9bad2ceca1c0f34faaa6a SHA512 cc368e40e09fe42df2c01d124912e7dd90b14c694512d6761e4c25cd183998bb1b5426916087ed05488260e916f4ac97f53dac27e278b53ae1f8387c086e384e +DIST rust-1.66.1-riscv64gc-unknown-linux-gnu.tar.xz 189480332 BLAKE2B 98f9cd36895a415967f4392ec58ff290850bbb094c473ec8a7956888b22dd9cec412f540f73acaa99c17ceb3c2255d6745f1072f7e170ff5e28fb6475ee396fa SHA512 ce35e57cbe0e92a33e9efac4be3c8f650615197728654f775a3784ff28d823907f59fef0743d63d65d034cff8079cbc000a98531f2fcfbeb8f33de66d772a4be +DIST rust-1.66.1-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ab78efea869dd2233cfa9929995546c33146ee0d92b262549a44d2b5bfa6e1309cb32c831f8a3be4baeb0e27f1abc044e03d87de23eb28c6057f5ac383d4d9b7 SHA512 c9f5764c78031bdaf8106c53a4774f55acf6308be057bd8acdf1c07863daeb5fbf2a5bc8fcefdf9fc0391a2984e7b1b7aaa11d89402938575df2ca38a3758739 +DIST rust-1.66.1-s390x-unknown-linux-gnu.tar.xz 226436776 BLAKE2B a45528d58550b51a0e5d589e3f44ae5bde739e58e9172d83822068235f753007094129da606b034aa534aa9e5bb85c020adc8f7054d59b61f1fe0fbdece2e894 SHA512 ce22b52c9ea4dd3ac9f8ac84a6a50f7a2c031c485ae01fc57be1ce922b927f2e138862b620dd6a538375a0e6c5ca4d693b32643b26f9f647d0ec1d6eee8a799c +DIST rust-1.66.1-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e705dc1a56d686c540e9a3667a0e14bff66f27f789f7a4022fb9a7d3919deca0cb264eee8da4fb0d54d625bf86798a2926176c0f148218a97bc4cd94f3c2d192 SHA512 5a657456f75aea4246fb3b7ec8c43ba2ace111ee41ee22ff26c05f246b699eb7ad76703168aafc1ebd88673390e13ac03caf7dcfbf270eef2cb5f943bdd5296f +DIST rust-1.66.1-x86_64-unknown-linux-gnu.tar.xz 186651920 BLAKE2B de89dd720320da6a8f27f5499e90d417eb3d3a9a934deddda8fdda279694ff33312af14c4c5be1c8b4e22333d5663b4c51c2d1d22914876bc4ab6e39dbf16476 SHA512 8bcbbd4a9246dd48c4109b9c91852b3a470036a8c0ac31b77cb4c05a205644a5829c5c38977240ab51e25778d1f9c7c3cda303da3f6b50a98d6a4eccb0f73782 +DIST rust-1.66.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d313eafed62763b0905636ff22d6c736696c55e55d2442512a95e239b5b37199fdb125d312284b2a249782fa61d552284c8eb3ef8c9aa9ea36283a9fb975dd66 SHA512 c491f07c77baeac6b92c2425092c1b3694e72c49d4e6e511597aac03d51930cd414a95b0d691a9b23df266fba8df3dd90bf7d30624383bd213403fe0cbc83ffb +DIST rust-1.66.1-x86_64-unknown-linux-musl.tar.xz 270294752 BLAKE2B b068a9400f29e9318e8d52f2c37df72f1b8fd91ca0bba342e6681544595a7f2697bf10437be6c4612a36d2781cc915920b498273ab12dbe1163c41d9d4e9b438 SHA512 df03ef29b03924346ef2a4b5dbf1c7ce6e33fb1f357eb04b0fa80e48a607b29f5929ce587412c9dd3f385d6382f0229c19d0ce78d6c060ddc0539429d3cfc606 +DIST rust-1.66.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B a262a2a020a142ea8e3906a9c93d9294906ee51f5d22efd4ef041b6032524d2714e0b511f7deb366c0ee3337ecd52f1e091b6bfed01615eaa9026996100afe2d SHA512 f390b3a788c5b15b1acee01505b6501ad4a3170cd2f23ec490b02294ce0a62c3f708f1e66c0ba8258a1042dea0401a1e09d31d34e99558f50b0f65b359354182 DIST rust-src-1.65.0.tar.xz 2488012 BLAKE2B d48f5591e72e14084f2fb0d66c1365f1648060d514af23c0498e02adfd7223b1a79bd1f512859b058f9cabc4b88b9230d15960df7c30762a5263d1785b877a68 SHA512 247f822a9c2f16d1de29d1cf6fa7ff393b7c7fe01da66a7c0b4add6259d72403922b8b1bd1b511ed8a9cc0b2c12ff574945aa7fc76c731fba620b466bcdc2eac -DIST rust-src-1.66.0.tar.xz 2512544 BLAKE2B f5f116669083a941bfd8611e10dd6b3e010221567c2a6395634e3c1e327b46979d190a32b61be27db1c3ec5518e9b9aa028ba275a68170b4ed08971bb520bd59 SHA512 c635cf97ddc43eb98a54377f6336fdaf3765022a81422acd5c9c7b64d9def5dc1b44f5b7b645ffe875a926bae5f7832e26f8c50188418476a84378c206ea5488 +DIST rust-src-1.66.1.tar.xz 2512096 BLAKE2B 514b8f9170d8a0e9b9deeeda27c5b83c18b7f038cb27a867fc4df1a0375b5c492793e67d0f0a2c26354ed1b58c699e1ff3e19f536dec10fc8b8211325dd4999a SHA512 3b77e29bf0803278d46aa5a484a2d74f242bf7f1ce6f5a6d1e84107630aa238620c91459f385f1b9f1bfb67c593ea5a274950a4db2975307cabc3a009b89f157 EBUILD rust-bin-1.65.0.ebuild 6730 BLAKE2B 0f0bf58c8401dbcc858d22585a57e96988e3ee5d9dab120b4e9f955c630aa61d12e15b9deba0f4edf62a1e6c4dc869980081fa21537b014fb9cc897c3881858b SHA512 ec04fa1da0481714bf7b9d43f175f456d01eae4d70f0d914f6911bb7b809c3c133df0b614243a0f1bb0c0c2fa8345b0b6d19e269b5017cbd36252c85fdb4a176 -EBUILD rust-bin-1.66.0.ebuild 6731 BLAKE2B 1482dd0c9487d7c8bd1a1911b9e51e026c06db1399ec39008ad3457a3e033af84f3874727af2815812df6a31466fa101ce7aa68585a3da51a616b95e187358ea SHA512 8b8bc16e8d92f98c9fef066d26fea0b13df7573176632deaceddea1c69edc9680f47f09839567c49aea4a24789e049328545c511ad95f50096da46df591beebe +EBUILD rust-bin-1.66.1.ebuild 6734 BLAKE2B 5e204672826f7df6d384640c8aca9ee0d966abbae24732de3900643f3f893b1f802de67ade795495e2a088b27451a5f43956f418278197eac05d254299b39fdf SHA512 f2746ef70015b5a4693cf002e0a77faa83fc91e940ea77476b928be3b8366e93f795ddb7dd33603e9068f7911f38460cf5acdd4bf4f7b196e03ae6f420385125 MISC metadata.xml 602 BLAKE2B 8e74f441d22eeb8b276d77ed0a9c5bde01540a3f34d6053185b2be77dd9188b80c01c536f8bb18c4c60214bd0bf366a504c1f3627110a213332120b533f7ddd2 SHA512 5f120deec600c7453d503b6acb9460d1c765a567954c79749654365721b1b6fa2dd48d60d5f3fc86191e79d5f7f78d7aa1e9634e6127f333f81e546f9b0f74ac diff --git a/dev-lang/rust-bin/rust-bin-1.66.0.ebuild b/dev-lang/rust-bin/rust-bin-1.66.0.ebuild deleted file mode 100644 index 70c7cb0f2c4f..000000000000 --- a/dev-lang/rust-bin/rust-bin-1.66.0.ebuild +++ /dev/null @@ -1,224 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit multilib prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal - -MY_P="rust-${PV}" -# curl -L static.rust-lang.org/dist/channel-rust-${PV}.toml 2>/dev/null | grep "xz_url.*rust-src" -MY_SRC_URI="${RUST_TOOLCHAIN_BASEURL%/}/2022-12-15/rust-src-${PV}.tar.xz" -GENTOO_BIN_BASEURI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}" # omit leading slash - -DESCRIPTION="Systems programming language from Mozilla" -HOMEPAGE="https://www.rust-lang.org/" -SRC_URI="$(rust_all_arch_uris ${MY_P}) - rust-src? ( ${MY_SRC_URI} ) -" -# Keep this separate to allow easy commenting out if not yet built -#SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/${MY_P}-sparc64-unknown-linux-gnu.tar.xz ) " - -LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" -SLOT="stable" -KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86" -IUSE="clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" - -DEPEND="" - -RDEPEND=" - >=app-eselect/eselect-rust-20190311 - sys-apps/lsb-release -" - -BDEPEND=" - prefix? ( dev-util/patchelf ) - verify-sig? ( sec-keys/openpgp-keys-rust ) -" - -REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" - -QA_PREBUILT=" - opt/${P}/bin/.* - opt/${P}/lib/.*.so - opt/${P}/libexec/.* - opt/${P}/lib/rustlib/.*/bin/.* - opt/${P}/lib/rustlib/.*/lib/.* -" - -# An rmeta file is custom binary format that contains the metadata for the crate. -# rmeta files do not support linking, since they do not contain compiled object files. -# so we can safely silence the warning for this QA check. -QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta" - -VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/rust.asc" - -pkg_pretend() { - if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then - die "${CHOST} is not supported by upstream Rust. You must use a hard float version." - fi -} - -src_unpack() { - # sadly rust-src tarball does not have corresponding .asc file - # so do partial verification - if use verify-sig; then - for f in ${A}; do - if [[ -f ${DISTDIR}/${f}.asc ]]; then - verify-sig_verify_detached "${DISTDIR}/${f}" "${DISTDIR}/${f}.asc" - fi - done - fi - - default_src_unpack - - mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die -} - -patchelf_for_bin() { - local filetype=$(file -b ${1}) - if [[ ${filetype} == *ELF*interpreter* ]]; then - einfo "${1}'s interpreter changed" - patchelf ${1} --set-interpreter ${2} || die - elif [[ ${filetype} == *script* ]]; then - hprefixify ${1} - fi -} - -multilib_src_install() { - if multilib_is_native_abi; then - - # start native abi install - pushd "${S}" >/dev/null || die - local analysis std - analysis="$(grep 'analysis' ./components)" - std="$(grep 'std' ./components)" - local components="rustc,cargo,${std}" - use doc && components="${components},rust-docs" - use clippy && components="${components},clippy-preview" - use rustfmt && components="${components},rustfmt-preview" - use rust-analyzer && components="${components},rust-analyzer-preview,${analysis}" - # Rust component 'rust-src' is extracted from separate archive - if use rust-src; then - einfo "Combining rust and rust-src installers" - mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die - echo rust-src >> ./components || die - components="${components},rust-src" - fi - ./install.sh \ - --components="${components}" \ - --disable-verify \ - --prefix="${ED}/opt/${P}" \ - --mandir="${ED}/opt/${P}/man" \ - --disable-ldconfig \ - || die - - if use prefix; then - local interpreter=$(patchelf --print-interpreter ${EPREFIX}/bin/bash) - ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin" - find "${ED}/opt/${P}/bin" -type f -print0 | \ - while IFS= read -r -d '' filename; do - patchelf_for_bin ${filename} ${interpreter} \; || die - done - eend $? - fi - - local symlinks=( - cargo - rustc - rustdoc - rust-gdb - rust-gdbgui - rust-lldb - ) - - use clippy && symlinks+=( clippy-driver cargo-clippy ) - use rustfmt && symlinks+=( rustfmt cargo-fmt ) - use rust-analyzer && symlinks+=( rust-analyzer ) - - einfo "installing eselect-rust symlinks and paths" - local i - for i in "${symlinks[@]}"; do - # we need realpath on /usr/bin/* symlink return version-appended binary path. - # so /usr/bin/rustc should point to /opt/rust-bin-/bin/rustc- - local ver_i="${i}-bin-${PV}" - ln -v "${ED}/opt/${P}/bin/${i}" "${ED}/opt/${P}/bin/${ver_i}" || die - dosym "../../opt/${P}/bin/${ver_i}" "/usr/bin/${ver_i}" - done - - # symlinks to switch components to active rust in eselect - dosym "../../../opt/${P}/lib" "/usr/lib/rust/lib-bin-${PV}" - dosym "../../../opt/${P}/man" "/usr/lib/rust/man-bin-${PV}" - dosym "../../opt/${P}/lib/rustlib" "/usr/lib/rustlib-bin-${PV}" - dosym "../../../opt/${P}/share/doc/rust" "/usr/share/doc/${P}" - - # make all capital underscored variable - local CARGO_TRIPLET="$(rust_abi)" - CARGO_TRIPLET="${CARGO_TRIPLET//-/_}" - CARGO_TRIPLET="${CARGO_TRIPLET^^}" - cat <<-_EOF_ > "${T}/50${P}" - LDPATH="${EPREFIX}/usr/lib/rust/lib" - MANPATH="${EPREFIX}/usr/lib/rust/man" - $(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTFLAGS=\"-C target-feature=-crt-static\"") - _EOF_ - doenvd "${T}/50${P}" - - # note: eselect-rust adds EROOT to all paths below - cat <<-_EOF_ > "${T}/provider-${P}" - /usr/bin/cargo - /usr/bin/rustdoc - /usr/bin/rust-gdb - /usr/bin/rust-gdbgui - /usr/bin/rust-lldb - /usr/lib/rustlib - /usr/lib/rust/lib - /usr/lib/rust/man - /usr/share/doc/rust - _EOF_ - - if use clippy; then - echo /usr/bin/clippy-driver >> "${T}/provider-${P}" - echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" - fi - if use rustfmt; then - echo /usr/bin/rustfmt >> "${T}/provider-${P}" - echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" - fi - if use rust-analyzer; then - echo /usr/bin/rust-analyzer >> "${T}/provider-${P}" - fi - - insinto /etc/env.d/rust - doins "${T}/provider-${P}" - popd >/dev/null || die - #end native abi install - - else - local rust_target - rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))" - dodir "/opt/${P}/lib/rustlib" - cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\ - "${ED}/opt/${P}/lib/rustlib" || die - fi - - # BUG: installs x86_64 binary on other arches - rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die -} - -pkg_postinst() { - eselect rust update - - elog "Rust installs a helper script for calling GDB now," - elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV}." - - 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-bin/rust-bin-1.66.1.ebuild b/dev-lang/rust-bin/rust-bin-1.66.1.ebuild new file mode 100644 index 000000000000..68228033254e --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.66.1.ebuild @@ -0,0 +1,224 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal + +MY_P="rust-${PV}" +# curl -L static.rust-lang.org/dist/channel-rust-${PV}.toml 2>/dev/null | grep "xz_url.*rust-src" +MY_SRC_URI="${RUST_TOOLCHAIN_BASEURL%/}/2023-01-10/rust-src-${PV}.tar.xz" +GENTOO_BIN_BASEURI="https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}" # omit leading slash + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" +SRC_URI="$(rust_all_arch_uris ${MY_P}) + rust-src? ( ${MY_SRC_URI} ) +" +# Keep this separate to allow easy commenting out if not yet built +#SRC_URI+=" sparc? ( ${GENTOO_BIN_BASEURI}/${MY_P}-sparc64-unknown-linux-gnu.tar.xz ) " + +LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4 UoI-NCSA" +SLOT="stable" +KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ppc64 ~riscv ~s390 ~x86" +IUSE="clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" + +DEPEND="" + +RDEPEND=" + >=app-eselect/eselect-rust-20190311 + sys-apps/lsb-release +" + +BDEPEND=" + prefix? ( dev-util/patchelf ) + verify-sig? ( sec-keys/openpgp-keys-rust ) +" + +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" + +QA_PREBUILT=" + opt/${P}/bin/.* + opt/${P}/lib/.*.so + opt/${P}/libexec/.* + opt/${P}/lib/rustlib/.*/bin/.* + opt/${P}/lib/rustlib/.*/lib/.* +" + +# An rmeta file is custom binary format that contains the metadata for the crate. +# rmeta files do not support linking, since they do not contain compiled object files. +# so we can safely silence the warning for this QA check. +QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta" + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/rust.asc" + +pkg_pretend() { + if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then + die "${CHOST} is not supported by upstream Rust. You must use a hard float version." + fi +} + +src_unpack() { + # sadly rust-src tarball does not have corresponding .asc file + # so do partial verification + if use verify-sig; then + for f in ${A}; do + if [[ -f ${DISTDIR}/${f}.asc ]]; then + verify-sig_verify_detached "${DISTDIR}/${f}" "${DISTDIR}/${f}.asc" + fi + done + fi + + default_src_unpack + + mv "${WORKDIR}/${MY_P}-$(rust_abi)" "${S}" || die +} + +patchelf_for_bin() { + local filetype=$(file -b ${1}) + if [[ ${filetype} == *ELF*interpreter* ]]; then + einfo "${1}'s interpreter changed" + patchelf ${1} --set-interpreter ${2} || die + elif [[ ${filetype} == *script* ]]; then + hprefixify ${1} + fi +} + +multilib_src_install() { + if multilib_is_native_abi; then + + # start native abi install + pushd "${S}" >/dev/null || die + local analysis std + analysis="$(grep 'analysis' ./components)" + std="$(grep 'std' ./components)" + local components="rustc,cargo,${std}" + use doc && components="${components},rust-docs" + use clippy && components="${components},clippy-preview" + use rustfmt && components="${components},rustfmt-preview" + use rust-analyzer && components="${components},rust-analyzer-preview,${analysis}" + # Rust component 'rust-src' is extracted from separate archive + if use rust-src; then + einfo "Combining rust and rust-src installers" + mv -v "${WORKDIR}/rust-src-${PV}/rust-src" "${S}" || die + echo rust-src >> ./components || die + components="${components},rust-src" + fi + ./install.sh \ + --components="${components}" \ + --disable-verify \ + --prefix="${ED}/opt/${P}" \ + --mandir="${ED}/opt/${P}/man" \ + --disable-ldconfig \ + || die + + if use prefix; then + local interpreter=$(patchelf --print-interpreter ${EPREFIX}/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin" + find "${ED}/opt/${P}/bin" -type f -print0 | \ + while IFS= read -r -d '' filename; do + patchelf_for_bin ${filename} ${interpreter} \; || die + done + eend $? + fi + + local symlinks=( + cargo + rustc + rustdoc + rust-gdb + rust-gdbgui + rust-lldb + ) + + use clippy && symlinks+=( clippy-driver cargo-clippy ) + use rustfmt && symlinks+=( rustfmt cargo-fmt ) + use rust-analyzer && symlinks+=( rust-analyzer ) + + einfo "installing eselect-rust symlinks and paths" + local i + for i in "${symlinks[@]}"; do + # we need realpath on /usr/bin/* symlink return version-appended binary path. + # so /usr/bin/rustc should point to /opt/rust-bin-/bin/rustc- + local ver_i="${i}-bin-${PV}" + ln -v "${ED}/opt/${P}/bin/${i}" "${ED}/opt/${P}/bin/${ver_i}" || die + dosym "../../opt/${P}/bin/${ver_i}" "/usr/bin/${ver_i}" + done + + # symlinks to switch components to active rust in eselect + dosym "../../../opt/${P}/lib" "/usr/lib/rust/lib-bin-${PV}" + dosym "../../../opt/${P}/man" "/usr/lib/rust/man-bin-${PV}" + dosym "../../opt/${P}/lib/rustlib" "/usr/lib/rustlib-bin-${PV}" + dosym "../../../opt/${P}/share/doc/rust" "/usr/share/doc/${P}" + + # make all capital underscored variable + local CARGO_TRIPLET="$(rust_abi)" + CARGO_TRIPLET="${CARGO_TRIPLET//-/_}" + CARGO_TRIPLET="${CARGO_TRIPLET^^}" + cat <<-_EOF_ > "${T}/50${P}" + LDPATH="${EPREFIX}/usr/lib/rust/lib" + MANPATH="${EPREFIX}/usr/lib/rust/man" + $(usev elibc_musl "CARGO_TARGET_${CARGO_TRIPLET}_RUSTFLAGS=\"-C target-feature=-crt-static\"") + _EOF_ + doenvd "${T}/50${P}" + + # note: eselect-rust adds EROOT to all paths below + cat <<-_EOF_ > "${T}/provider-${P}" + /usr/bin/cargo + /usr/bin/rustdoc + /usr/bin/rust-gdb + /usr/bin/rust-gdbgui + /usr/bin/rust-lldb + /usr/lib/rustlib + /usr/lib/rust/lib + /usr/lib/rust/man + /usr/share/doc/rust + _EOF_ + + if use clippy; then + echo /usr/bin/clippy-driver >> "${T}/provider-${P}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${P}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" + fi + if use rust-analyzer; then + echo /usr/bin/rust-analyzer >> "${T}/provider-${P}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${P}" + popd >/dev/null || die + #end native abi install + + else + local rust_target + rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))" + dodir "/opt/${P}/lib/rustlib" + cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\ + "${ED}/opt/${P}/lib/rustlib" || die + fi + + # BUG: installs x86_64 binary on other arches + rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die +} + +pkg_postinst() { + eselect rust update + + elog "Rust installs a helper script for calling GDB now," + elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV}." + + 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/Manifest b/dev-lang/rust/Manifest index 1b8e4b17cc37..856260f9e007 100644 --- a/dev-lang/rust/Manifest +++ b/dev-lang/rust/Manifest @@ -67,8 +67,8 @@ DIST rust-1.65.0-x86_64-unknown-linux-musl.tar.xz 266683288 BLAKE2B 4312a53bca3e DIST rust-1.65.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 054f1b773518a9640f3d9226510cb0b00a7f8dc4a9046c325b82d038a50c699a8bd84f71ed62790e9b96b4d65ad12ea631f6a8bc18b3bafd66db3d21137cd378 SHA512 39aa000c2a1359cfd7d2eda2b22a9b10c0fe4aa024862b7ea67bd488e06fdee6f5cc4e98db7486b84ce53f1c299bbd5391f63e25df0358184533a5fdced4ce61 DIST rustc-1.65.0-src.tar.xz 139674928 BLAKE2B a218263fb67e306b153f5a6dae95b5ec653acaa5eb4b833862d6f0fd4685a8cec097dadc1b8a934e1bf6055672c7a617f9a0ad4a7dbf2e78084297f10b7ada04 SHA512 3d0369ed3028209c4ecb9b9e7b5f5e3a20be8cc05199675df4f091d62a96c0734bc1dbd7630928fe162792392ec6d0daf9ceed10771531ce022200c7b631e3be DIST rustc-1.65.0-src.tar.xz.asc 801 BLAKE2B 43ff92011cd6f7f34ce0495fa341379e5907d032ea90f91e533e5edaec6ad518aad50a9d8b2694074d6909ee96aa779403b16e95792e962e79c1b967542ae26f SHA512 75b9be53363022c81333117876cbcc573bbd4733edf767cbb164218644efb1a9c4bfc2aa73aaa1e39f248a84f1adacb1930a94a6e63f60093ff760fb9ae02efc -DIST rustc-1.66.0-src.tar.xz 141582844 BLAKE2B f07a71763158da3e1c4c328d5423a9353dc6b7d3fd167b6417bd1dd9ef32081d5f634be1bd946d2fabb75808759cbd67cddc75f768ba610a687a417342fff023 SHA512 df329bcabce309846e44d92a118758dfc65b63f06857226799c75568a2a018a96500fd07cd38c1927e3486d190a6f57340ee794c733bbbb69cf80a99855ced73 -DIST rustc-1.66.0-src.tar.xz.asc 801 BLAKE2B adffb348d20594e49364c14489c8479630e0d2b4431d6a63a4c5486e9d01c7994913f4fe09c21aa336d3f2b2d2f62c4504f6930b23fcad3e06e13058c15f1eb1 SHA512 c8a524e83a86bb0c3ab813f45687e92a3ef7bc57943a62c3a6ae211314d9889a8123272b1c0aa763262435f2a51fc39a98a731931727faea9d6e2a0da0facd2e +DIST rustc-1.66.1-src.tar.xz 141692940 BLAKE2B 3fae45345998386fda1b11ec896fac4613b8e3f0092bc0df29c9685f4a4012c0bd1b600911c2d19bcfa8f5a84b8a3c39d4c9e062a62cd61925b59129e1cd72b9 SHA512 1944c024c603140d0a9236043a3bd1d0d211dd8d368d6d82a3a620f1ff43b29624755b0943f2b38b40a188c7eee77a840238ea757eaf435e2a3fa6a0e6b82832 +DIST rustc-1.66.1-src.tar.xz.asc 801 BLAKE2B 18e27c88b39eed29147854733c5533b7fffc417ff0b3bd5982174ffa2c5f6d217e2e28ced4da75863a4557800e7ad7a124a4bbb0def4c20da7ed543602185941 SHA512 4511f41ad3d098a339ea3173e3ffa692d1d3cd3ec9dd45af68e4491471f9a72a2e866f6924090eb366bdf6f856650d981eabe1cd851843a17f4a6e4f1dfbc8a9 EBUILD rust-1.65.0.ebuild 23818 BLAKE2B 7e0dd9a64bffb501886337b0eb3423c8db8a3628ec23450228be35d6d706a09d520785eda2bbfcae0c90461db976da624ebd960444e0b11b0e1fff35a4662d7a SHA512 99fb9f3dcb53461f5df39d646cce061fbe4762d8ad9d275f09501fd60b7fe32491a3a81cee513644a9876f5bb73edf88c4dcd6c844df25807d0573bd4d26bc96 -EBUILD rust-1.66.0.ebuild 23824 BLAKE2B 8c3957c48ce6313e313391a625b46977b81200681e5ca683596723aa6eee77b1f6e9d5644362eff400221a5794cac2ff8e3031f253ee2691df7e559cecf9de3d SHA512 aa98c7cc308627fcc6c68ebb6d83cd22a3698c9342a12c315ad107d9afeb5c8fefb57d073673e3146cc03b1fd85b1184edfe3e5458f3a4eb50d9c65cf7bc5073 +EBUILD rust-1.66.1.ebuild 23827 BLAKE2B 52674a80025367027f265af567e871fcd89bc8b83cbecb21c1f741721e7b14033138bb43fa42b56a1941d55778e2706496b7c3e0135eafadbc3197bcf8e763d6 SHA512 345c569d35ffb26d28bc771780ec26cc13344e0d62fa6771df9326a8810dbc4731f9b8d785247252cb8855a1a35328d2f59de3903e5c27e29459e4bd27110e56 MISC metadata.xml 1676 BLAKE2B 37d026b952e72914faf51b5258c6a3da77aa088974094af5533a029abe3975beaba4efd8894cd419577f00b871c45ca3efa80195d90a42c9d1be1fb4befbe5eb SHA512 9a5e30977be9d76e60cab5a0698d5cc544240a6b0c54350aa0bd6aeff0e864f14d97a90ae5e3024e9b7bed54f7b2c7f561f46ad97ff99928f454af44f420d17c diff --git a/dev-lang/rust/rust-1.66.0.ebuild b/dev-lang/rust/rust-1.66.0.ebuild deleted file mode 100644 index f6d845e03f07..000000000000 --- a/dev-lang/rust/rust-1.66.0.ebuild +++ /dev/null @@ -1,754 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{8..11} ) - -inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \ - multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig - -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 -> rustc-${PV}-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 ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" -fi - -RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0" - -DESCRIPTION="Systems programming language from Mozilla" -HOMEPAGE="https://www.rust-lang.org/" - -SRC_URI=" - https://static.rust-lang.org/dist/${SRC} - verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc ) - !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) ) -" - -# keep in sync with llvm ebuild of the same version as bundled one. -ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR 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 dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${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: -# List all the working slots in LLVM_VALID_SLOTS, newest first. -LLVM_VALID_SLOTS=( 15 ) -LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}" - -# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation -# (-) usedep needed because we may build with older llvm without that target -LLVM_DEPEND="|| ( " -for _s in ${LLVM_VALID_SLOTS[@]}; do - LLVM_DEPEND+=" ( " - for _x in ${ALL_LLVM_TARGETS[@]}; do - LLVM_DEPEND+=" - ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] ) - wasm? ( sys-devel/lld:${_s} )" - done - LLVM_DEPEND+=" )" -done -unset _s _x -LLVM_DEPEND+=" ) - /dev/null) ) - rustc_version=${rustc_version[0]#rust-bin-} - rustc_version=${rustc_version#rust-} - - [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output" - - if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then - eerror "Rust >=${rustc_wanted} is required" - eerror "please run 'eselect rust' and set correct rust version" - die "selected rust version is too old" - elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then - eerror "Rust <${rustc_toonew} is required" - eerror "please run 'eselect rust' and set correct rust version" - die "selected rust version is too new" - else - einfo "Using rust ${rustc_version} to build" - fi -} - -pre_build_checks() { - local M=8192 - # multiply requirements by 1.3 if we are doing x86-multilib - if use amd64; then - M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 )) - fi - M=$(( $(usex clippy 128 0) + ${M} )) - M=$(( $(usex miri 128 0) + ${M} )) - M=$(( $(usex rustfmt 256 0) + ${M} )) - # add 2G if we compile llvm and 256M per llvm_target - if ! use system-llvm; then - M=$(( 2048 + ${M} )) - local ltarget - for ltarget in ${ALL_LLVM_TARGETS[@]}; do - M=$(( $(usex ${ltarget} 256 0) + ${M} )) - done - fi - M=$(( $(usex wasm 256 0) + ${M} )) - M=$(( $(usex debug 2 1) * ${M} )) - eshopts_push -s extglob - if is-flagq '-g?(gdb)?([1-9])'; then - M=$(( 15 * ${M} / 10 )) - fi - eshopts_pop - M=$(( $(usex system-bootstrap 0 1024) + ${M} )) - M=$(( $(usex doc 256 0) + ${M} )) - CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} -} - -llvm_check_deps() { - has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]" -} - -# Is LLVM being linked against libc++? -is_libcxx_linked() { - local code='#include -#if defined(_LIBCPP_VERSION) - HAVE_LIBCXX -#endif -' - local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 - [[ ${out} == *HAVE_LIBCXX* ]] -} - -pkg_pretend() { - pre_build_checks -} - -pkg_setup() { - pre_build_checks - python-any-r1_pkg_setup - - export LIBGIT2_NO_PKG_CONFIG=1 #749381 - - use system-bootstrap && bootstrap_rust_version_check - - if use system-llvm; then - llvm_pkg_setup - - local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" - export LLVM_LINK_SHARED=1 - export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)" - fi -} - -esetup_unwind_hack() { - # https://bugs.gentoo.org/870280 - # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system. - # it should trigger for internal bootstrap or system-bootstrap with rust-bin. - # the whole idea is for stage0 to bootstrap with fake libgcc_s. - # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler. - local fakelib="${T}/fakelib" - mkdir -p "${fakelib}" || die - # we need both symlinks, one for cargo runtime, other for linker. - ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die - ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die - export LD_LIBRARY_PATH="${fakelib}" - export RUSTFLAGS+=" -L${fakelib}" - # this is a literally magic variable that gets through cargo cache, without it some - # crates ignore RUSTFLAGS. - # this variable can not contain leading space. - export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}" -} - -src_prepare() { - # this supidity is needed because patch is too large to be in filesdir - # and if we move it to devspace - it lacks checksum for sig verification - if [[ "${PV}" == 1.66.0 ]]; then - sed -i \ - -e 's/516ba32a547b46a8e80ad20d4a17bf24a00bff0b69b74f56df119f770f3dfff6/fc7eb88c2f5104865379128b76767d36ce5b5fdb9f3483e683d150e514ebc3a3/' \ - -e 's/fba10dc8ca9eaf4d481cb82bd1540cf5c05620533c44f917c09a22ea55ef408c/9cc4d1b4511a1f0d91231eb0f11c67ae5e8e38e4becd0bf5eb9e26d043796056/' \ - vendor/rustix/.cargo-checksum.json || die - else - die "remove sed mr forgetful maintainer" - fi - if ! use system-bootstrap; then - has_version sys-devel/gcc || esetup_unwind_hack - local rust_stage0_root="${WORKDIR}"/rust-stage0 - local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)" - - "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \ - --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die - fi - - default -} - -src_configure() { - filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231 - - local rust_target="" rust_targets="" arch_cflags - - # Collect rust target names to compile standard libs for all ABIs. - for v in $(multilib_get_enabled_abi_pairs); do - rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\"" - done - if use wasm; then - rust_targets+=",\"wasm32-unknown-unknown\"" - if use system-llvm; then - # un-hardcode rust-lld linker for this target - # https://bugs.gentoo.org/715348 - sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die - fi - fi - rust_targets="${rust_targets#,}" - - local tools='"cargo"' - use clippy && tools+=',"clippy"' - use miri && tools+=',"miri"' - use profiler && tools+=',"rust-demangler"' - use rustfmt && tools+=',"rustfmt"' - use rust-analyzer && tools+=',"rust-analyzer","analysis"' - use rust-src && tools+=',"src"' - - local rust_stage0_root - if use system-bootstrap; then - local printsysroot - printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")" - rust_stage0_root="${printsysroot}" - else - rust_stage0_root="${WORKDIR}"/rust-stage0 - fi - # in case of prefix it will be already prefixed, as --print sysroot returns full path - [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory" - - rust_target="$(rust_abi)" - - local cm_btype="$(usex debug DEBUG RELEASE)" - cat <<- _EOF_ > "${S}"/config.toml - changelog-seen = 2 - [llvm] - download-ci-llvm = false - optimize = $(toml_usex !debug) - release-debuginfo = $(toml_usex debug) - assertions = $(toml_usex debug) - ninja = true - targets = "${LLVM_TARGETS// /;}" - experimental-targets = "" - link-shared = $(toml_usex system-llvm) - $(if is_libcxx_linked; then - # https://bugs.gentoo.org/732632 - echo "use-libcxx = true" - echo "static-libstdcpp = false" - fi) - $(case "${rust_target}" in - i586-*-linux-*) - # https://github.com/rust-lang/rust/issues/93059 - echo 'cflags = "-fcf-protection=none"' - echo 'cxxflags = "-fcf-protection=none"' - echo 'ldflags = "-fcf-protection=none"' - ;; - *) - ;; - esac) - [llvm.build-config] - CMAKE_VERBOSE_MAKEFILE = "ON" - CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}" - CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}" - CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}" - CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}" - CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}" - CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}" - [build] - build-stage = 2 - test-stage = 2 - build = "${rust_target}" - host = ["${rust_target}"] - target = [${rust_targets}] - cargo = "${rust_stage0_root}/bin/cargo" - rustc = "${rust_stage0_root}/bin/rustc" - rustfmt = "${rust_stage0_root}/bin/rustfmt" - docs = $(toml_usex doc) - compiler-docs = false - submodules = false - python = "${EPYTHON}" - locked-deps = true - vendor = true - extended = true - tools = [${tools}] - verbose = 2 - sanitizers = false - profiler = $(toml_usex profiler) - cargo-native-static = false - [install] - prefix = "${EPREFIX}/usr/lib/${PN}/${PV}" - sysconfdir = "etc" - docdir = "share/doc/rust" - bindir = "bin" - libdir = "lib" - mandir = "share/man" - [rust] - # https://github.com/rust-lang/rust/issues/54872 - codegen-units-std = 1 - optimize = true - debug = $(toml_usex debug) - debug-assertions = $(toml_usex debug) - debug-assertions-std = $(toml_usex debug) - debuginfo-level = $(usex debug 2 0) - debuginfo-level-rustc = $(usex debug 2 0) - debuginfo-level-std = $(usex debug 2 0) - debuginfo-level-tools = $(usex debug 2 0) - debuginfo-level-tests = 0 - backtrace = true - incremental = false - default-linker = "$(tc-getCC)" - parallel-compiler = $(toml_usex parallel-compiler) - channel = "$(usex nightly nightly stable)" - description = "gentoo" - rpath = false - verbose-tests = true - optimize-tests = $(toml_usex !debug) - codegen-tests = true - dist-src = false - remap-debuginfo = true - lld = $(usex system-llvm false $(toml_usex wasm)) - # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it - # https://github.com/rust-lang/rust/issues/74976 - # https://github.com/rust-lang/rust/issues/76526 - deny-warnings = $(usex wasm $(usex doc false true) true) - backtrace-on-ice = true - jemalloc = false - [dist] - src-tarball = false - compression-formats = ["xz"] - _EOF_ - - for v in $(multilib_get_enabled_abi_pairs); do - rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) - arch_cflags="$(get_abi_CFLAGS ${v##*.})" - - export CFLAGS_${rust_target//-/_}="${arch_cflags}" - - cat <<- _EOF_ >> "${S}"/config.toml - [target.${rust_target}] - ar = "$(tc-getAR)" - cc = "$(tc-getCC)" - cxx = "$(tc-getCXX)" - linker = "$(tc-getCC)" - ranlib = "$(tc-getRANLIB)" - llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)" - _EOF_ - if use system-llvm; then - cat <<- _EOF_ >> "${S}"/config.toml - llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" - _EOF_ - fi - # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true; - # but we patch it and set to false here as well - if use elibc_musl; then - cat <<- _EOF_ >> "${S}"/config.toml - crt-static = false - _EOF_ - fi - done - if use wasm; then - cat <<- _EOF_ >> "${S}"/config.toml - [target.wasm32-unknown-unknown] - linker = "$(usex system-llvm lld rust-lld)" - # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483 - profiler = false - _EOF_ - fi - - if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below - # experimental cross support - # discussion: https://bugs.gentoo.org/679878 - # TODO: c*flags, clang, system-llvm, cargo.eclass target support - # it would be much better if we could split out stdlib - # complilation to separate ebuild and abuse CATEGORY to - # just install to /usr/lib/rustlib/ - - # extra targets defined as a bash array - # spec format: :: - # best place would be /etc/portage/env/dev-lang/rust - # Example: - # RUST_CROSS_TARGETS=( - # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu" - # ) - # no extra hand holding is done, no target transformations, all - # values are passed as-is with just basic checks, so it's up to user to supply correct values - # valid rust targets can be obtained with - # rustc --print target-list - # matching cross toolchain has to be installed - # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one) - # only gcc toolchains installed with crossdev are checked for now. - - # BUG: we can't pass host flags to cross compiler, so just filter for now - # BUG: this should be more fine-grained. - filter-flags '-mcpu=*' '-march=*' '-mtune=*' - - local cross_target_spec - for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do - # extracts first element form :: - local cross_llvm_target="${cross_target_spec%%:*}" - # extracts toolchain triples, : - local cross_triples="${cross_target_spec#*:}" - # extracts first element after before : separator - local cross_rust_target="${cross_triples%%:*}" - # extracts last element after : separator - local cross_toolchain="${cross_triples##*:}" - use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled" - command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain" - - cat <<- _EOF_ >> "${S}"/config.toml - [target.${cross_rust_target}] - ar = "${cross_toolchain}-ar" - cc = "${cross_toolchain}-gcc" - cxx = "${cross_toolchain}-g++" - linker = "${cross_toolchain}-gcc" - ranlib = "${cross_toolchain}-ranlib" - _EOF_ - if use system-llvm; then - cat <<- _EOF_ >> "${S}"/config.toml - llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" - _EOF_ - fi - if [[ "${cross_toolchain}" == *-musl* ]]; then - cat <<- _EOF_ >> "${S}"/config.toml - musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr" - _EOF_ - fi - - # append cross target to "normal" target list - # example 'target = ["powerpc64le-unknown-linux-gnu"]' - # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]' - - rust_targets="${rust_targets},\"${cross_rust_target}\"" - sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die - - ewarn - ewarn "Enabled ${cross_rust_target} rust target" - ewarn "Using ${cross_toolchain} cross toolchain" - ewarn - if ! has_version -b 'sys-devel/binutils[multitarget]' ; then - ewarn "'sys-devel/binutils[multitarget]' is not installed" - ewarn "'strip' will be unable to strip cross libraries" - ewarn "cross targets will be installed with full debug information" - ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files" - ewarn - ewarn "Alternatively llvm-strip can be used, it supports stripping any target" - ewarn "define STRIP=\"llvm-strip\" to use it (experimental)" - ewarn - fi - done - fi # I_KNOW_WHAT_I_AM_DOING_CROSS - - einfo "Rust configured with the following flags:" - echo - echo RUSTFLAGS="\"${RUSTFLAGS}\"" - echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\"" - echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\"" - echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\"" - env | grep "CARGO_TARGET_.*_RUSTFLAGS=" - env | grep "CFLAGS_.*" - echo - einfo "config.toml contents:" - cat "${S}"/config.toml || die - echo -} - -src_compile() { - RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die -} - -src_test() { - # https://rustc-dev-guide.rust-lang.org/tests/intro.html - - # those are basic and codegen tests. - local tests=( - codegen - codegen-units - compile-fail - incremental - mir-opt - pretty - run-make - ) - - # fails if llvm is not built with ALL targets. - # and known to fail with system llvm sometimes. - use system-llvm || tests+=( assembly ) - - # fragile/expensive/less important tests - # or tests that require extra builds - # TODO: instead of skipping, just make some nonfatal. - if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then - tests+=( - rustdoc - rustdoc-js - rustdoc-js-std - rustdoc-ui - run-make-fulldeps - ui - ui-fulldeps - ) - fi - - local i failed=() - einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}" - for i in "${tests[@]}"; do - local t="src/test/${i}" - einfo "rust_src_test: running ${t}" - if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \ - -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}" - then - failed+=( "${t}" ) - eerror "rust_src_test: ${t} failed" - fi - done - - if [[ ${#failed[@]} -ne 0 ]]; then - eerror "rust_src_test: failure summary: ${failed[@]}" - die "aborting due to test failures" - fi -} - -src_install() { - DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die - - # bug #689562, #689160 - rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die - rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die - newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo - - local symlinks=( - cargo - rustc - rustdoc - rust-gdb - rust-gdbgui - rust-lldb - ) - - use clippy && symlinks+=( clippy-driver cargo-clippy ) - use miri && symlinks+=( miri cargo-miri ) - use profiler && symlinks+=( rust-demangler ) - use rustfmt && symlinks+=( rustfmt cargo-fmt ) - use rust-analyzer && symlinks+=( rust-analyzer ) - - einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}" - local i - for i in "${symlinks[@]}"; do - # we need realpath on /usr/bin/* symlink return version-appended binary path. - # so /usr/bin/rustc should point to /usr/lib/rust//bin/rustc- - # need to fix eselect-rust to remove this hack. - local ver_i="${i}-${PV}" - if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then - einfo "Installing ${i} symlink" - ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die - else - ewarn "${i} symlink requested, but source file not found" - ewarn "please report this" - fi - dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}" - done - - # symlinks to switch components to active rust in eselect - dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}" - dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}" - dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}" - dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}" - dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}" - - newenvd - "50${P}" <<-_EOF_ - LDPATH="${EPREFIX}/usr/lib/rust/lib" - MANPATH="${EPREFIX}/usr/lib/rust/man" - _EOF_ - - rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die - rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die - - # note: eselect-rust adds EROOT to all paths below - cat <<-_EOF_ > "${T}/provider-${P}" - /usr/bin/cargo - /usr/bin/rustdoc - /usr/bin/rust-gdb - /usr/bin/rust-gdbgui - /usr/bin/rust-lldb - /usr/lib/rustlib - /usr/lib/rust/lib - /usr/lib/rust/libexec - /usr/lib/rust/man - /usr/share/doc/rust - _EOF_ - - if use clippy; then - echo /usr/bin/clippy-driver >> "${T}/provider-${P}" - echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" - fi - if use miri; then - echo /usr/bin/miri >> "${T}/provider-${P}" - echo /usr/bin/cargo-miri >> "${T}/provider-${P}" - fi - if use profiler; then - echo /usr/bin/rust-demangler >> "${T}/provider-${P}" - fi - if use rustfmt; then - echo /usr/bin/rustfmt >> "${T}/provider-${P}" - echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" - fi - if use rust-analyzer; then - echo /usr/bin/rust-analyzer >> "${T}/provider-${P}" - fi - - insinto /etc/env.d/rust - doins "${T}/provider-${P}" - - if use dist; then - insinto "/usr/lib/${PN}/${PV}/dist" - doins -r "${S}/build/dist/." - fi -} - -pkg_postinst() { - eselect rust update - - if has_version sys-devel/gdb || has_version dev-util/lldb; then - 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}." - fi - - 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.66.1.ebuild b/dev-lang/rust/rust-1.66.1.ebuild new file mode 100644 index 000000000000..7bc0f6c1cd3c --- /dev/null +++ b/dev-lang/rust/rust-1.66.1.ebuild @@ -0,0 +1,754 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) + +inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \ + multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig + +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 -> rustc-${PV}-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 ~mips ~ppc ppc64 ~riscv ~sparc ~x86" +fi + +RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0" + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" + +SRC_URI=" + https://static.rust-lang.org/dist/${SRC} + verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc ) + !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) ) +" + +# keep in sync with llvm ebuild of the same version as bundled one. +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR 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 BSD-1 BSD-2 BSD-4 UoI-NCSA" + +IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${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: +# List all the working slots in LLVM_VALID_SLOTS, newest first. +LLVM_VALID_SLOTS=( 15 ) +LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}" + +# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation +# (-) usedep needed because we may build with older llvm without that target +LLVM_DEPEND="|| ( " +for _s in ${LLVM_VALID_SLOTS[@]}; do + LLVM_DEPEND+=" ( " + for _x in ${ALL_LLVM_TARGETS[@]}; do + LLVM_DEPEND+=" + ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] ) + wasm? ( sys-devel/lld:${_s} )" + done + LLVM_DEPEND+=" )" +done +unset _s _x +LLVM_DEPEND+=" ) + /dev/null) ) + rustc_version=${rustc_version[0]#rust-bin-} + rustc_version=${rustc_version#rust-} + + [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output" + + if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then + eerror "Rust >=${rustc_wanted} is required" + eerror "please run 'eselect rust' and set correct rust version" + die "selected rust version is too old" + elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then + eerror "Rust <${rustc_toonew} is required" + eerror "please run 'eselect rust' and set correct rust version" + die "selected rust version is too new" + else + einfo "Using rust ${rustc_version} to build" + fi +} + +pre_build_checks() { + local M=8192 + # multiply requirements by 1.3 if we are doing x86-multilib + if use amd64; then + M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 )) + fi + M=$(( $(usex clippy 128 0) + ${M} )) + M=$(( $(usex miri 128 0) + ${M} )) + M=$(( $(usex rustfmt 256 0) + ${M} )) + # add 2G if we compile llvm and 256M per llvm_target + if ! use system-llvm; then + M=$(( 2048 + ${M} )) + local ltarget + for ltarget in ${ALL_LLVM_TARGETS[@]}; do + M=$(( $(usex ${ltarget} 256 0) + ${M} )) + done + fi + M=$(( $(usex wasm 256 0) + ${M} )) + M=$(( $(usex debug 2 1) * ${M} )) + eshopts_push -s extglob + if is-flagq '-g?(gdb)?([1-9])'; then + M=$(( 15 * ${M} / 10 )) + fi + eshopts_pop + M=$(( $(usex system-bootstrap 0 1024) + ${M} )) + M=$(( $(usex doc 256 0) + ${M} )) + CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} +} + +llvm_check_deps() { + has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]" +} + +# Is LLVM being linked against libc++? +is_libcxx_linked() { + local code='#include +#if defined(_LIBCPP_VERSION) + HAVE_LIBCXX +#endif +' + local out=$($(tc-getCXX) ${CXXFLAGS} ${CPPFLAGS} -x c++ -E -P - <<<"${code}") || return 1 + [[ ${out} == *HAVE_LIBCXX* ]] +} + +pkg_pretend() { + pre_build_checks +} + +pkg_setup() { + pre_build_checks + python-any-r1_pkg_setup + + export LIBGIT2_NO_PKG_CONFIG=1 #749381 + + use system-bootstrap && bootstrap_rust_version_check + + if use system-llvm; then + llvm_pkg_setup + + local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" + export LLVM_LINK_SHARED=1 + export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)" + fi +} + +esetup_unwind_hack() { + # https://bugs.gentoo.org/870280 + # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system. + # it should trigger for internal bootstrap or system-bootstrap with rust-bin. + # the whole idea is for stage0 to bootstrap with fake libgcc_s. + # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler. + local fakelib="${T}/fakelib" + mkdir -p "${fakelib}" || die + # we need both symlinks, one for cargo runtime, other for linker. + ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die + ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die + export LD_LIBRARY_PATH="${fakelib}" + export RUSTFLAGS+=" -L${fakelib}" + # this is a literally magic variable that gets through cargo cache, without it some + # crates ignore RUSTFLAGS. + # this variable can not contain leading space. + export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}" +} + +src_prepare() { + # this supidity is needed because patch is too large to be in filesdir + # and if we move it to devspace - it lacks checksum for sig verification + if [[ "${PV}" == 1.66.1 ]]; then + sed -i \ + -e 's/516ba32a547b46a8e80ad20d4a17bf24a00bff0b69b74f56df119f770f3dfff6/fc7eb88c2f5104865379128b76767d36ce5b5fdb9f3483e683d150e514ebc3a3/' \ + -e 's/fba10dc8ca9eaf4d481cb82bd1540cf5c05620533c44f917c09a22ea55ef408c/9cc4d1b4511a1f0d91231eb0f11c67ae5e8e38e4becd0bf5eb9e26d043796056/' \ + vendor/rustix/.cargo-checksum.json || die + else + die "remove sed mr forgetful maintainer" + fi + if ! use system-bootstrap; then + has_version sys-devel/gcc || esetup_unwind_hack + local rust_stage0_root="${WORKDIR}"/rust-stage0 + local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)" + + "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \ + --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die + fi + + default +} + +src_configure() { + filter-flags '-flto*' # https://bugs.gentoo.org/862109 https://bugs.gentoo.org/866231 + + local rust_target="" rust_targets="" arch_cflags + + # Collect rust target names to compile standard libs for all ABIs. + for v in $(multilib_get_enabled_abi_pairs); do + rust_targets+=",\"$(rust_abi $(get_abi_CHOST ${v##*.}))\"" + done + if use wasm; then + rust_targets+=",\"wasm32-unknown-unknown\"" + if use system-llvm; then + # un-hardcode rust-lld linker for this target + # https://bugs.gentoo.org/715348 + sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die + fi + fi + rust_targets="${rust_targets#,}" + + local tools='"cargo"' + use clippy && tools+=',"clippy"' + use miri && tools+=',"miri"' + use profiler && tools+=',"rust-demangler"' + use rustfmt && tools+=',"rustfmt"' + use rust-analyzer && tools+=',"rust-analyzer","analysis"' + use rust-src && tools+=',"src"' + + local rust_stage0_root + if use system-bootstrap; then + local printsysroot + printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")" + rust_stage0_root="${printsysroot}" + else + rust_stage0_root="${WORKDIR}"/rust-stage0 + fi + # in case of prefix it will be already prefixed, as --print sysroot returns full path + [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory" + + rust_target="$(rust_abi)" + + local cm_btype="$(usex debug DEBUG RELEASE)" + cat <<- _EOF_ > "${S}"/config.toml + changelog-seen = 2 + [llvm] + download-ci-llvm = false + optimize = $(toml_usex !debug) + release-debuginfo = $(toml_usex debug) + assertions = $(toml_usex debug) + ninja = true + targets = "${LLVM_TARGETS// /;}" + experimental-targets = "" + link-shared = $(toml_usex system-llvm) + $(if is_libcxx_linked; then + # https://bugs.gentoo.org/732632 + echo "use-libcxx = true" + echo "static-libstdcpp = false" + fi) + $(case "${rust_target}" in + i586-*-linux-*) + # https://github.com/rust-lang/rust/issues/93059 + echo 'cflags = "-fcf-protection=none"' + echo 'cxxflags = "-fcf-protection=none"' + echo 'ldflags = "-fcf-protection=none"' + ;; + *) + ;; + esac) + [llvm.build-config] + CMAKE_VERBOSE_MAKEFILE = "ON" + CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}" + CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}" + CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}" + CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}" + CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}" + CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}" + [build] + build-stage = 2 + test-stage = 2 + build = "${rust_target}" + host = ["${rust_target}"] + target = [${rust_targets}] + cargo = "${rust_stage0_root}/bin/cargo" + rustc = "${rust_stage0_root}/bin/rustc" + rustfmt = "${rust_stage0_root}/bin/rustfmt" + docs = $(toml_usex doc) + compiler-docs = false + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = true + tools = [${tools}] + verbose = 2 + sanitizers = false + profiler = $(toml_usex profiler) + cargo-native-static = false + [install] + prefix = "${EPREFIX}/usr/lib/${PN}/${PV}" + sysconfdir = "etc" + docdir = "share/doc/rust" + bindir = "bin" + libdir = "lib" + mandir = "share/man" + [rust] + # https://github.com/rust-lang/rust/issues/54872 + codegen-units-std = 1 + optimize = true + debug = $(toml_usex debug) + debug-assertions = $(toml_usex debug) + debug-assertions-std = $(toml_usex debug) + debuginfo-level = $(usex debug 2 0) + debuginfo-level-rustc = $(usex debug 2 0) + debuginfo-level-std = $(usex debug 2 0) + debuginfo-level-tools = $(usex debug 2 0) + debuginfo-level-tests = 0 + backtrace = true + incremental = false + default-linker = "$(tc-getCC)" + parallel-compiler = $(toml_usex parallel-compiler) + channel = "$(usex nightly nightly stable)" + description = "gentoo" + rpath = false + verbose-tests = true + optimize-tests = $(toml_usex !debug) + codegen-tests = true + dist-src = false + remap-debuginfo = true + lld = $(usex system-llvm false $(toml_usex wasm)) + # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it + # https://github.com/rust-lang/rust/issues/74976 + # https://github.com/rust-lang/rust/issues/76526 + deny-warnings = $(usex wasm $(usex doc false true) true) + backtrace-on-ice = true + jemalloc = false + [dist] + src-tarball = false + compression-formats = ["xz"] + _EOF_ + + for v in $(multilib_get_enabled_abi_pairs); do + rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) + arch_cflags="$(get_abi_CFLAGS ${v##*.})" + + export CFLAGS_${rust_target//-/_}="${arch_cflags}" + + cat <<- _EOF_ >> "${S}"/config.toml + [target.${rust_target}] + ar = "$(tc-getAR)" + cc = "$(tc-getCC)" + cxx = "$(tc-getCXX)" + linker = "$(tc-getCC)" + ranlib = "$(tc-getRANLIB)" + llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)" + _EOF_ + if use system-llvm; then + cat <<- _EOF_ >> "${S}"/config.toml + llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" + _EOF_ + fi + # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true; + # but we patch it and set to false here as well + if use elibc_musl; then + cat <<- _EOF_ >> "${S}"/config.toml + crt-static = false + _EOF_ + fi + done + if use wasm; then + cat <<- _EOF_ >> "${S}"/config.toml + [target.wasm32-unknown-unknown] + linker = "$(usex system-llvm lld rust-lld)" + # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483 + profiler = false + _EOF_ + fi + + if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below + # experimental cross support + # discussion: https://bugs.gentoo.org/679878 + # TODO: c*flags, clang, system-llvm, cargo.eclass target support + # it would be much better if we could split out stdlib + # complilation to separate ebuild and abuse CATEGORY to + # just install to /usr/lib/rustlib/ + + # extra targets defined as a bash array + # spec format: :: + # best place would be /etc/portage/env/dev-lang/rust + # Example: + # RUST_CROSS_TARGETS=( + # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu" + # ) + # no extra hand holding is done, no target transformations, all + # values are passed as-is with just basic checks, so it's up to user to supply correct values + # valid rust targets can be obtained with + # rustc --print target-list + # matching cross toolchain has to be installed + # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one) + # only gcc toolchains installed with crossdev are checked for now. + + # BUG: we can't pass host flags to cross compiler, so just filter for now + # BUG: this should be more fine-grained. + filter-flags '-mcpu=*' '-march=*' '-mtune=*' + + local cross_target_spec + for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do + # extracts first element form :: + local cross_llvm_target="${cross_target_spec%%:*}" + # extracts toolchain triples, : + local cross_triples="${cross_target_spec#*:}" + # extracts first element after before : separator + local cross_rust_target="${cross_triples%%:*}" + # extracts last element after : separator + local cross_toolchain="${cross_triples##*:}" + use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled" + command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain" + + cat <<- _EOF_ >> "${S}"/config.toml + [target.${cross_rust_target}] + ar = "${cross_toolchain}-ar" + cc = "${cross_toolchain}-gcc" + cxx = "${cross_toolchain}-g++" + linker = "${cross_toolchain}-gcc" + ranlib = "${cross_toolchain}-ranlib" + _EOF_ + if use system-llvm; then + cat <<- _EOF_ >> "${S}"/config.toml + llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" + _EOF_ + fi + if [[ "${cross_toolchain}" == *-musl* ]]; then + cat <<- _EOF_ >> "${S}"/config.toml + musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr" + _EOF_ + fi + + # append cross target to "normal" target list + # example 'target = ["powerpc64le-unknown-linux-gnu"]' + # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]' + + rust_targets="${rust_targets},\"${cross_rust_target}\"" + sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die + + ewarn + ewarn "Enabled ${cross_rust_target} rust target" + ewarn "Using ${cross_toolchain} cross toolchain" + ewarn + if ! has_version -b 'sys-devel/binutils[multitarget]' ; then + ewarn "'sys-devel/binutils[multitarget]' is not installed" + ewarn "'strip' will be unable to strip cross libraries" + ewarn "cross targets will be installed with full debug information" + ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files" + ewarn + ewarn "Alternatively llvm-strip can be used, it supports stripping any target" + ewarn "define STRIP=\"llvm-strip\" to use it (experimental)" + ewarn + fi + done + fi # I_KNOW_WHAT_I_AM_DOING_CROSS + + einfo "Rust configured with the following flags:" + echo + echo RUSTFLAGS="\"${RUSTFLAGS}\"" + echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\"" + echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\"" + echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\"" + env | grep "CARGO_TARGET_.*_RUSTFLAGS=" + env | grep "CFLAGS_.*" + echo + einfo "config.toml contents:" + cat "${S}"/config.toml || die + echo +} + +src_compile() { + RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die +} + +src_test() { + # https://rustc-dev-guide.rust-lang.org/tests/intro.html + + # those are basic and codegen tests. + local tests=( + codegen + codegen-units + compile-fail + incremental + mir-opt + pretty + run-make + ) + + # fails if llvm is not built with ALL targets. + # and known to fail with system llvm sometimes. + use system-llvm || tests+=( assembly ) + + # fragile/expensive/less important tests + # or tests that require extra builds + # TODO: instead of skipping, just make some nonfatal. + if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then + tests+=( + rustdoc + rustdoc-js + rustdoc-js-std + rustdoc-ui + run-make-fulldeps + ui + ui-fulldeps + ) + fi + + local i failed=() + einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}" + for i in "${tests[@]}"; do + local t="src/test/${i}" + einfo "rust_src_test: running ${t}" + if ! RUST_BACKTRACE=1 "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \ + -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}" + then + failed+=( "${t}" ) + eerror "rust_src_test: ${t} failed" + fi + done + + if [[ ${#failed[@]} -ne 0 ]]; then + eerror "rust_src_test: failure summary: ${failed[@]}" + die "aborting due to test failures" + fi +} + +src_install() { + DESTDIR="${D}" "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die + + # bug #689562, #689160 + rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die + rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die + newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo + + local symlinks=( + cargo + rustc + rustdoc + rust-gdb + rust-gdbgui + rust-lldb + ) + + use clippy && symlinks+=( clippy-driver cargo-clippy ) + use miri && symlinks+=( miri cargo-miri ) + use profiler && symlinks+=( rust-demangler ) + use rustfmt && symlinks+=( rustfmt cargo-fmt ) + use rust-analyzer && symlinks+=( rust-analyzer ) + + einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}" + local i + for i in "${symlinks[@]}"; do + # we need realpath on /usr/bin/* symlink return version-appended binary path. + # so /usr/bin/rustc should point to /usr/lib/rust//bin/rustc- + # need to fix eselect-rust to remove this hack. + local ver_i="${i}-${PV}" + if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then + einfo "Installing ${i} symlink" + ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die + else + ewarn "${i} symlink requested, but source file not found" + ewarn "please report this" + fi + dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}" + done + + # symlinks to switch components to active rust in eselect + dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}" + dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}" + dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}" + dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}" + dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}" + + newenvd - "50${P}" <<-_EOF_ + LDPATH="${EPREFIX}/usr/lib/rust/lib" + MANPATH="${EPREFIX}/usr/lib/rust/man" + _EOF_ + + rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die + rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die + + # note: eselect-rust adds EROOT to all paths below + cat <<-_EOF_ > "${T}/provider-${P}" + /usr/bin/cargo + /usr/bin/rustdoc + /usr/bin/rust-gdb + /usr/bin/rust-gdbgui + /usr/bin/rust-lldb + /usr/lib/rustlib + /usr/lib/rust/lib + /usr/lib/rust/libexec + /usr/lib/rust/man + /usr/share/doc/rust + _EOF_ + + if use clippy; then + echo /usr/bin/clippy-driver >> "${T}/provider-${P}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" + fi + if use miri; then + echo /usr/bin/miri >> "${T}/provider-${P}" + echo /usr/bin/cargo-miri >> "${T}/provider-${P}" + fi + if use profiler; then + echo /usr/bin/rust-demangler >> "${T}/provider-${P}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${P}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" + fi + if use rust-analyzer; then + echo /usr/bin/rust-analyzer >> "${T}/provider-${P}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${P}" + + if use dist; then + insinto "/usr/lib/${PN}/${PV}/dist" + doins -r "${S}/build/dist/." + fi +} + +pkg_postinst() { + eselect rust update + + if has_version sys-devel/gdb || has_version dev-util/lldb; then + 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}." + fi + + 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 +} -- cgit v1.2.3