diff options
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/Manifest.gz | bin | 22142 -> 22141 bytes | |||
-rw-r--r-- | dev-lang/bas/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/bas/bas-2.6-r1.ebuild | 2 | ||||
-rw-r--r-- | dev-lang/f2c/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/f2c/f2c-20240312.ebuild | 2 | ||||
-rw-r--r-- | dev-lang/icon/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/icon/icon-9.5.24b.ebuild | 123 | ||||
-rw-r--r-- | dev-lang/luau/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/luau/luau-0.653.ebuild | 57 | ||||
-rw-r--r-- | dev-lang/oorexx/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/oorexx/oorexx-5.0.0.ebuild | 2 | ||||
-rw-r--r-- | dev-lang/pypy/Manifest | 2 | ||||
-rw-r--r-- | dev-lang/pypy/pypy-3.10.7.3.17_p3.ebuild | 238 | ||||
-rw-r--r-- | dev-lang/rust-bin/Manifest | 30 | ||||
-rw-r--r-- | dev-lang/rust-bin/rust-bin-1.83.0.ebuild | 253 | ||||
-rw-r--r-- | dev-lang/rust-common/Manifest | 3 | ||||
-rw-r--r-- | dev-lang/rust-common/rust-common-1.83.0.ebuild | 58 | ||||
-rw-r--r-- | dev-lang/rust/Manifest | 4 | ||||
-rw-r--r-- | dev-lang/rust/files/1.83.0-cross-compile-libz.patch | 21 | ||||
-rw-r--r-- | dev-lang/rust/rust-1.83.0.ebuild | 728 |
20 files changed, 1527 insertions, 6 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz Binary files differindex cd5c7c3a364c..37cbdbfe386d 100644 --- a/dev-lang/Manifest.gz +++ b/dev-lang/Manifest.gz diff --git a/dev-lang/bas/Manifest b/dev-lang/bas/Manifest index 9f803fbe8f77..6edc929cdc27 100644 --- a/dev-lang/bas/Manifest +++ b/dev-lang/bas/Manifest @@ -1,4 +1,4 @@ AUX bas-2.1-makefile.patch 1595 BLAKE2B 4811875d7f498df287d7e12708604acca99b7726f5c9bfb077f1764c1f5846592fd625e77552a179ba3918139ecb1298eca408be43dd162d72fb5978db2a18e1 SHA512 be12b5a79e1ef239b21e6d28a3254e38ca77a0d78c3743adfe70c1189e833543003c831f7c0f07bf08eed7796da2917ae4b0250df93a790a642f8a891bdce4ae DIST bas-2.6.tar.gz 279148 BLAKE2B f04c4dfe453eaf5da8c84093c9b4b57c1554323bd4a8d8b36d14f2c3bedd4ce9ac79bdb609572d81cf2543274626e755b21178c6969cf9ed614ba4d9e067473a SHA512 f340630aa57931674a68c51d151f7eac77e2ea36197e4704ff9cc4f554c2da6c9b66983358e56c1efaee637470402f24ec3901ecbcc26a403d5e72b718390fd0 -EBUILD bas-2.6-r1.ebuild 727 BLAKE2B 078068dc70068950e5ff0f57b5da3f53ad21738e1493e452b48b65585b8c33b722f6cdc06b4cbe4215ddb7b23d3fe9d9ce341c400d5c69ad75ef2c00848e2dd9 SHA512 5f87ba11063c708107185812ea2bf50675144d8475d269afb0a1f75ca45214bc4fdb5644804e9174e25af5a2f28610ac4d60086348d059eafa4eed53dc86b6ab +EBUILD bas-2.6-r1.ebuild 734 BLAKE2B b67e8d52a952a74f6a9bba2e561895d7c61d12ad23069838c1070cb57b2263516f259d8b2bc54ac460d2b9e00a4f21fa41bfdf1c1adfa1d9cf7209de240f9db6 SHA512 0efa1f1034ff2289e0f6b15d51ae864c383735a97eb296ff1d1f64f9c360ffb1f794e2b25b2c8a7e55063965ebf80a9eeb7f69a5fb2cff809926b1f93134eaf4 MISC metadata.xml 934 BLAKE2B b238537e9338a2dfc63c97ee24864eddd2eb87ae1d5cdfc7ac20db84e6a4016a23a9cc46a5ba13c19b1bfac027a7badeee38b46b641b772de322939a0d270276 SHA512 de1888ba383ab6fab077d9541775fcdb401442ee27d88846e3cebba98fde3e6175b23f5f4ef002a9adca96b2ffabd4f529e048618ad91c6b1c07b805685eead5 diff --git a/dev-lang/bas/bas-2.6-r1.ebuild b/dev-lang/bas/bas-2.6-r1.ebuild index 247d63aaeb53..c2350ef50fd4 100644 --- a/dev-lang/bas/bas-2.6-r1.ebuild +++ b/dev-lang/bas/bas-2.6-r1.ebuild @@ -11,7 +11,7 @@ SRC_URI="http://www.moria.de/~michael/bas/${P}.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~x86" +KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~riscv ~x86" RDEPEND=" sys-libs/ncurses:= diff --git a/dev-lang/f2c/Manifest b/dev-lang/f2c/Manifest index 621bbdbff14d..03600be7c59f 100644 --- a/dev-lang/f2c/Manifest +++ b/dev-lang/f2c/Manifest @@ -6,5 +6,5 @@ DIST f2c_20100827-1.debian.tar.gz 15659 BLAKE2B 4773a939e51074df34b48540ed67d0bd DIST f2c_20100827.orig.tar.gz 417930 BLAKE2B 4ccd59762947de9d316520f213d33e095a559dfe914c06d58f4db21a031b6dca332d75473dbaa6a6167ef3f0459c68235fdddac3ed4dcea34e9597a8ab0ae982 SHA512 2c28d8c06e53b569816e7982725133d46e9b145a84ec51771f4cca2409098f894648ebe5b8089a1ddd8468be62394b0edb5985e50baeea8129e4f507236d6c0d EBUILD f2c-20100827-r1.ebuild 1321 BLAKE2B 04c685476e77c4bacb3609b2f84c8b73637dc689b773653f331b9e19c8a77fdcdbed3b8410e9b95cd948f485f823be388229857a12d48e4565f4db475a3efc34 SHA512 ce3733517f430f63d19831cdbb582605502c3b160a31b18cc24db9373dc32682a32fec4ba6f2c71e8a6868a04e9852e5d411cdd40d4556a6e5ff1fd0590fc0e2 EBUILD f2c-20240130.ebuild 886 BLAKE2B 2dd3814296e416e8a5a2e5ab26281db4683e7c64b051f39a0e84aacc3d158f7ddda9fb1ba79fce8a33c52f1bb60e8e39b2ed829b81493aee04156f43f6183da1 SHA512 cec4810974eb37431fef426b48964de8efcece45f6d3cc81d3589bbe429843739b4eebd008ee4b6d47d496a3e103bf60168c28e2b3223c1c39b4433d7ff6b275 -EBUILD f2c-20240312.ebuild 633 BLAKE2B 62edb9e117c86642d65bdd34ab0b8045933d5892c8ec0a1cbf07631e21290d08ebb7d6b5ce3cbfe4d46fb8e85f36b166ed51d83a92d483a2fbe51c95737c2dde SHA512 8705d313b1cc96a8e425e70b06d0e2a2e5a3997a9d7532123edc8037e9674f06a340f266b5f7f1a03511d791786974f8e4a4f6dec86be921312b198721576e70 +EBUILD f2c-20240312.ebuild 631 BLAKE2B c5cd38f348a9c6ac3b936b837c9f39248499d8fb82723ad9435979e4d3814e5a7f1d9837d330ed6de33082e0ec8bb1040600c542d6bf5ddd91b59a5f24ec3e60 SHA512 d191def461b50c56adc92e51963c9459810f813ad7d8b421a588561988c32a5d1be53c98b7a5bce63a4cb20792708fea6b710d9d987343abe6cb9d33ddedb575 MISC metadata.xml 727 BLAKE2B 2cf65d73fcf12da8d2036bbd2293900d2b95fd427efbd579d76b22800d4f4165c4f5f7ec75635380ef1ad814588e00fa99e983cd385c4b93f15b270ea50b5905 SHA512 ff21d43ca87486cfba4f98b1305dcc59f68b6944ae281add33a60ae50ca244465ccc29c462a9fc5c1b9d476a966d94e587d6ffd9fb6d64a622cd763d9e6b7f93 diff --git a/dev-lang/f2c/f2c-20240312.ebuild b/dev-lang/f2c/f2c-20240312.ebuild index 89c0a85ceab8..04f5e3d69d4d 100644 --- a/dev-lang/f2c/f2c-20240312.ebuild +++ b/dev-lang/f2c/f2c-20240312.ebuild @@ -13,7 +13,7 @@ SRC_URI=" LICENSE="HPND" SLOT="0" -KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" +KEYWORDS="~amd64 ppc ppc64 ~x86 ~amd64-linux ~x86-linux" RDEPEND=">=dev-libs/libf2c-20130927-r1" diff --git a/dev-lang/icon/Manifest b/dev-lang/icon/Manifest index 4ba07b1bddf0..37d071a78158 100644 --- a/dev-lang/icon/Manifest +++ b/dev-lang/icon/Manifest @@ -1,3 +1,5 @@ DIST icon-9.5.22e.tar.gz 3088775 BLAKE2B 0f0019f4f4bc0ed695bcb99d927c57e1fe041047d2b2e74590d23b4cb032aa4d459f916e3571a294e6d98d68be16bc55828337320173abfb5220fc4470d54903 SHA512 2a718999e7fc3f1cc2ad745215a06fecb5865f890ff83e8e61c8408df0bec2dea0c3123ab1edc0c3a9ec3cd415ca0fd116c5ff93c8ce0797a5f2abf5ff79003c +DIST icon-9.5.24b.tar.gz 3086266 BLAKE2B 0daed4d04a58b74c6614f5e34e41340e3c2ca70ac8f8678be322b7eda874d177c9795d033e68dbbebe626774c00d805754c750f0762f006cd282e702914977e9 SHA512 0c92dd6f86dc2555accf8f28a485a7f3a38e4f39f41e8edcf936233303608b4eda7bfb608b33a4dde4bd38c22f084385a597f61cf1445b069478654435436584 EBUILD icon-9.5.22e.ebuild 3396 BLAKE2B 6959de0fd113d02fd0ecdf670f11af7b47361763c0f4aac35518bfa5ced2b610dea52d2c911e62c5a81dee8fc59daf2858aeca0158385384dcfa4c922b8fb49b SHA512 7e298383cdfd58ec04d5eaeedfb3ed813892177e45430adb835c284848edc353065530d1aa25d8580d49e90c3bc90c6970dc2eef36ba9a1744df658466ce7875 +EBUILD icon-9.5.24b.ebuild 3403 BLAKE2B 4d992d434876dbdd9262255652b26c19658f5b82368f287d8a5aaa47bca8414a596420386aa101b67f1bb8a63dd66a654cba1bd4225eafb2d2957888a2494996 SHA512 91ef9e1aae76973d7e8fa9101233047ff9639face9f0c892da800ab66bfa1c07ac77ab059831179595667d8dde0f020c4f419f080864939ff354d8823145a802 MISC metadata.xml 410 BLAKE2B 5f65752284d58a7678eb4e338e2d4c03e9e098dd8cbd28aeb7a0276bebe2a925cb4b00325ace7edad24c94e33664c1aafda84f3f4348e57bd02a7b655f7a29ac SHA512 d05b0eaffd002eeb0e9088d43847304bd1346cf4da75c801e3663518a3fbac77bba1b2fed04ac422bedfe1220109f00d1b3809d04a0e7edd4c418088dd010d89 diff --git a/dev-lang/icon/icon-9.5.24b.ebuild b/dev-lang/icon/icon-9.5.24b.ebuild new file mode 100644 index 000000000000..0d4a86ec4c9d --- /dev/null +++ b/dev-lang/icon/icon-9.5.24b.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Very high level language" +HOMEPAGE="https://www.cs.arizona.edu/icon/" + +SRC_URI="https://github.com/gtownsend/icon/archive/v${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/icon-${PV}" + +LICENSE="public-domain HPND" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" + +IUSE="X" + +RDEPEND=" + X? ( + x11-libs/libX11 + x11-libs/libXpm + )" +DEPEND=" + ${RDEPEND} + X? ( x11-libs/libXt )" + +src_prepare() { + default + # Add CFLAGS and LDFLAGS to Makefiles as needed + sed -i -e 's/CFLAGS="$(CFLAGS)"/& LDFLAGS="$(LDFLAGS)"/g' ipl/cfuncs/Makefile || die + sed -i -e 's/^CFLAGS = \(.*\)/CFLAGS = $(CFLAGS) \1/g' ipl/packs/loadfunc/Makefile || die + sed -i -e 's/CFLAGS="$(CFLAGS)"/& LDFLAGS="$(LDFLAGS)"/g' ipl/packs/loadfunc/Makefile || die + sed -i -e 's/-o $LIBNAME $CFLAGS/& $LDFLAGS/g' ipl/cfuncs/mklib.sh || die + sed -i -e 's/$LIBNAME -fPIC/$LIBNAME -fPIC $LDFLAGS/g' ipl/cfuncs/mklib.sh || die + sed -i -e 's/$(RLINK)/& $(LDFLAGS)/g' src/runtime/Makefile || die + + # executables in src/common are only used to prep the build + sed -i -e 's/$(CC) $(CFLAGS)/& $(LDFLAGS)/g' src/common/Makefile || die + # executables in src/rtt are only used to perform the build + sed -i -e 's/$(CC) $(CFLAGS)/& $(LDFLAGS)/g' src/rtt/Makefile || die + + # do not prestrip files + find "src" -name 'Makefile' -exec sed -i -e '/strip/d' '{}' \; || die +} + +src_configure() { + # select the right compile target. Note there are many platforms + # available + local mytarget; + if [[ ${CHOST} == *-darwin* ]]; then + mytarget="macintosh" + else + mytarget="linux" + fi + + # Fails if more then one make job process. + # This is an upstream requirement. + emake -j1 $(usex X X-Configure Configure) name=${mytarget} + + # sanitise the Makedefs file generated by 'make Configure' + sed -i \ + -e 's:-L/usr/X11R6/lib64::g' \ + -e 's:-L/usr/X11R6/lib::g' \ + -e 's:-I/usr/X11R6/include::g' \ + -e 's:-I/usr/X11R6/include::g' \ + -e '/^CFLAGS/d' \ + Makedefs || die "sed of Makedefs failed" + + if use elibc_musl; then + append-flags "-D_MUSL" + fi + append-flags $(test-flags -fno-strict-aliasing -fwrapv) +} + +src_compile() { + # Fails if more then one make job process. + # This is an upstream requirement. + emake -j1 CC="$(tc-getCC)" CFLAGS="${CFLAGS}" +} + +src_test() { + emake Samples + emake Test +} + +src_install() { + # Needed for make Install + dodir /usr/$(get_libdir) + + emake Install dest="${D}/usr/$(get_libdir)/icon" + dosym ../$(get_libdir)/icon/bin/icont /usr/bin/icont + dosym ../$(get_libdir)/icon/bin/iconx /usr/bin/iconx + dosym ../$(get_libdir)/icon/bin/icon /usr/bin/icon + if use X; then + dosym ../$(get_libdir)/icon/bin/vib /usr/bin/vib + fi + + cd "${S}/man/man1" || die + doman "${PN}"t.1 + doman "${PN}".1 + + cd "${S}/doc" || die + local DOCS=( *.txt ../README ) + + local HTML_DOCS=( *.{htm,gif,jpg,css} ) + einstalldocs + + # Clean up items from make Install that get installed elsewhere + rm -r "${ED}"/usr/$(get_libdir)/${PN}/man || die + rm -r "${ED}"/usr/$(get_libdir)/icon/{doc,README} || die + + cd "${S}" || die + + # Install Icon Programming Library files + + # Remove files only needed for building the library before copying + rm -v ipl/{BuildBin,BuildExe,CheckAll,Makefile,cfuncs/*.o} || die + + insinto /usr/$(get_libdir)/icon + doins -r ipl +} diff --git a/dev-lang/luau/Manifest b/dev-lang/luau/Manifest index e58680ca9f8e..119cd07f5893 100644 --- a/dev-lang/luau/Manifest +++ b/dev-lang/luau/Manifest @@ -1,5 +1,7 @@ DIST luau-0.640.tar.gz 1769411 BLAKE2B 5ddf7891fff6006a7fcfe796c753b4ad1cd4a926820cb6a1e34a6f9384b0449ec6b8853c7c0951610bb6cc9f4c0f35f58a42a0faa6a15fb44257acd93fa91d96 SHA512 d7298c4e5a0c0fd7481d83aa179e364f5b6491773677a43b3554e171d47d55f43c8c89049e5ec3a4737f255c4b4902c808a4bfb7559d9e311798dca3043afff1 DIST luau-0.645.tar.gz 1796897 BLAKE2B d6e9bd89386d360ba1627165d178c143bbb4dee52ab12bf3ca74ed8b475bfe7f05f2609a13403228e606b3b81048730c200db69671ef34329387e541e7aaf19e SHA512 11153008ad893a68bf2578a077a7acb9bd148a8ef6146ba50ea34d186744f49bb28dafcf417fbcdd3b8c2d58a9509d5361621f0302b7727c91926cc3bba24da4 +DIST luau-0.653.tar.gz 1858007 BLAKE2B 5e919c2d558f3d9fb44b50c43c063779ef9400bcec7f1881884eccad1f972424ec8c662de3a19c958a00dad0b38dbb295c9ff89b286b39e8d842d102c17346fc SHA512 470cf58a923f0ab3baa36805500100fca16972bea2f87b45fa17ed4d058f3fbc162d4a7802a75a46ad7a46b25630379ac063462751a4d31f65c6df6d0a527c15 EBUILD luau-0.640.ebuild 771 BLAKE2B b2e8a1e32b194ccb1af14657d4271cd1e5c051fd5607faf22b1cf8cb1946da41933466a191c13a9e65fa4cdb70bec4a5b440e97b4e57063e0ae43038c2ac5317 SHA512 b7a3884231d4dd830edb1cb48b279a904764310fa688e508df8a13f52321800ec30a9820df8a163f97e7c118515f6f102eca65a2badd71e6ad0169a85ccf538a EBUILD luau-0.645-r1.ebuild 1219 BLAKE2B 55f1fa83c3ccb28610d55a011b14cd7b6e08945f7b2212b555d3c8b32367a06e487b090839d6ecc76d6053b631d094b966883eaf1ba902ec86444dc47aa0071d SHA512 a832bf1f4ee4adede22113be5b56f8f2fd67253237a715fd95956c3563077d57a85c2aad3cdaf2b12f06242acc6bbd9006611224ac05352006f64ecea3bbbc39 +EBUILD luau-0.653.ebuild 1219 BLAKE2B 55f1fa83c3ccb28610d55a011b14cd7b6e08945f7b2212b555d3c8b32367a06e487b090839d6ecc76d6053b631d094b966883eaf1ba902ec86444dc47aa0071d SHA512 a832bf1f4ee4adede22113be5b56f8f2fd67253237a715fd95956c3563077d57a85c2aad3cdaf2b12f06242acc6bbd9006611224ac05352006f64ecea3bbbc39 MISC metadata.xml 1077 BLAKE2B 922b79785db23ac7301e2e7a0c66834ae4ccb42466c87b92bd4d9db821830c307fac2192d0010ef224ef64fd83e80a62d47b29f9118432f70ed2340ec9bf49c5 SHA512 7d334c02c73ddc2628a5bebf598d79e9216eb5e4195905ba3a38453261cb25f240b41903042a0fdaad7453ed3cfd04ed2ba382746f38c25036095b019ea4b286 diff --git a/dev-lang/luau/luau-0.653.ebuild b/dev-lang/luau/luau-0.653.ebuild new file mode 100644 index 000000000000..d99c1ac2849f --- /dev/null +++ b/dev-lang/luau/luau-0.653.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake edo + +DESCRIPTION="Gradually typed embeddable scripting language derived from Lua" +HOMEPAGE="https://luau.org/ + https://github.com/luau-lang/luau/" + +if [[ "${PV}" == *9999* ]] ; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/luau-lang/${PN}.git" +else + SRC_URI="https://github.com/luau-lang/${PN}/archive/${PV}.tar.gz + -> ${P}.tar.gz" + + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="static-libs test" +RESTRICT="!test? ( test )" + +DOCS=( CONTRIBUTING.md README.md SECURITY.md ) + +src_configure() { + local -a mycmakeargs=( + -DLUAU_BUILD_TESTS="$(usex test)" + ) + cmake_src_configure +} + +src_test() { + edo "${BUILD_DIR}/Luau.UnitTest" --verbose + edo "${BUILD_DIR}/Luau.Conformance" --verbose +} + +src_install() { + exeinto /usr/bin + doexe "${BUILD_DIR}"/luau{,-analyze,-ast,-compile,-reduce} + + insinto /usr/include/Luau + doins ./CodeGen/include/luacodegen.h + doins ./Compiler/include/luacode.h + doins ./VM/include/*.h + doins ./{Config,Common,Compiler,CodeGen,Ast,Analysis,EqSat}/include/Luau/*.h + + if use static-libs ; then + dolib.a "${BUILD_DIR}"/libLuau.*.a + fi + + einstalldocs +} diff --git a/dev-lang/oorexx/Manifest b/dev-lang/oorexx/Manifest index d01bd23a221f..248d4371a264 100644 --- a/dev-lang/oorexx/Manifest +++ b/dev-lang/oorexx/Manifest @@ -1,4 +1,4 @@ AUX oorexx-5.0.0-man.patch 1080 BLAKE2B 17e105f80a5efd4fa28312c1cc81050b57c39357b7fc83ff0b8703970976e4530f03e942f09cfe79fa4dae35a7616be45058355133aa46ebc359f8578800cedf SHA512 530397a95170e08aca60db967af54c4ec22ae322f98ae7c0fb38737067f58cd8409700a00025fa85da05d54b76fc5090c0c0c02ed5502d2a84ae5468d4cefe2a DIST oorexx-5.0.0-12583.tar.gz 6398458 BLAKE2B 3df1eb024eae75f9c29bd46a7c9e0c8fffecf54545e5926f872b6757f0cba56530c4b457e94ec44debbd98e514e1043ba751384dc0f1dabb4812aa52da4381e0 SHA512 141af22e0a99731d50492940d5db55cc59099e5a7fa8acba918d1ae82bcd6e2983fb0ca71bbbf044cc4fc89e740c8a0ac81237eea5812d7a570f825bba5d08b9 -EBUILD oorexx-5.0.0.ebuild 1042 BLAKE2B 38c2787954192717b3fa5373dacd63eb9235afeaaf184d617e99c8889e79caa3399a22d5680e3cf842f20f404cfd50167c4ac9657a02eb7414491c5448b2c013 SHA512 1f9b707aef2128b07e068a26576a660a156e077281199646741c16b59a3d70f15f66ccb202bbf9626846463401918710c0d660fa72fa1602593db41c1f836b50 +EBUILD oorexx-5.0.0.ebuild 1049 BLAKE2B 239791fc8ec124769c5cde2f70c480f9b498bbd5bf570a8732f266ffb3c54d5e2516962378f28b31955e8703f52a4a79a2379427595cd6d4298227d72f044ba5 SHA512 5713f524867901633aaaa52e15102137c87f1edb5958b3cb0615fc17e92f02cb5c177e4a254a40fe9dc770fdea1d575ea2242e998885e208452338ce37534ad1 MISC metadata.xml 791 BLAKE2B 5e8ab7a5472b3864c1f1c66559518072fa4364276afbdb1939b8a81a3fcb8279bfb07c3f929edfc49faf1768d14171a870825e23ffee6e1f8fbf151879c95f8d SHA512 1e7a42ad84daee790eb4bb400365645432c895940fb4a380d575123782b77251d8be4efc108239f5587865434bef3b3f4cb90761e0e7f4425d5387f4f7e31cdc diff --git a/dev-lang/oorexx/oorexx-5.0.0.ebuild b/dev-lang/oorexx/oorexx-5.0.0.ebuild index 27599fb90a30..05e2bf059496 100644 --- a/dev-lang/oorexx/oorexx-5.0.0.ebuild +++ b/dev-lang/oorexx/oorexx-5.0.0.ebuild @@ -14,7 +14,7 @@ SRC_URI="https://downloads.sourceforge.net/project/${PN}/${PN}/${PV}/${P}-${APP_ LICENSE="CPL-1.0" SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ppc64 ~x86" +KEYWORDS="amd64 ~arm ~arm64 ppc64 ~riscv ~x86" RDEPEND=" sys-libs/ncurses:= diff --git a/dev-lang/pypy/Manifest b/dev-lang/pypy/Manifest index dfe6f47f6855..70b454715739 100644 --- a/dev-lang/pypy/Manifest +++ b/dev-lang/pypy/Manifest @@ -1,7 +1,9 @@ DIST pypy2.7-gentoo-patches-7.3.17.tar.xz 5324 BLAKE2B 866f172a6df6f0e94a98c611b37ae58635623e33a47619a5e44658d3908337a3f9029ff7de6997f760c3f1679fc83bfc6ddfb66852c492a581b3336b5eec3ed2 SHA512 6ce5266d0748f3c18a5546aa2bd8479ecb45923eb7df8a140a195e7f7b44999b9167ffdd44f7fd789ddd3a62cd77cb917863b0144180a1127befce1f290e650a DIST pypy2.7-v7.3.17-src.tar.bz2 19907140 BLAKE2B de62ebc4e8102867effdecddca64c19c40458b112a6a56ac0c95247047b9f5437a5da68dffb51c14c21bce463c2ca489c6e6a4f86e8cc597b57df2eca707081e SHA512 82b2b9dbf0ea32c405ddc53d98a3a7a153f494d286e8719a0c40960168aadc0f49c3b313416488338f7f51c8fdb58120de41b1d47a8c8eda7db6d4ec4273b4eb DIST pypy3.10-gentoo-patches-7.3.17_p2.tar.xz 19304 BLAKE2B acc36ad6711eb474341836da94cab425a12720902f66a74432fa03b61618abe43bd3706cba9ed0a763cbda16364d7d6ae45a742047a35599c40759eee85ff90a SHA512 510a3dbcd44d2c261f620bbf6c92d6a96b7f826b9e714ac957b52df9ca91599cc00c1435489e02274f972970c31882ab21360b3fe58ef78966ba11cc7f2cdbc7 +DIST pypy3.10-gentoo-patches-7.3.17_p3.tar.xz 21064 BLAKE2B 474d27520854ff105cd12e1801d81e49f6f3c6cf28d74031f1f4cd7d65c581034f0a2ca3e2e4979dc5ce10572dd133e2b3c93318ec937bc7a869b6bbbc555e35 SHA512 0e6e20f16f7ffd4e592b2427e4018f47a3b880f6026bc875541c8ff920bea123266a8dfbdd3a028a698f3a54588b907be40508aa5bf6e524a8d1c4f3a7dbd8ab DIST pypy3.10-v7.3.17-src.tar.bz2 23350562 BLAKE2B 0a7a091976b352de61057f238fa386f767dd4d2fbcdcc0b4376066c20c2ad35d3818fa6e9e163ab5fd341856802e8ad1e2891decf5948c13cdb26726cd42019e SHA512 46e30845bbc73cf56f5033a24d3583253ce198522f3a28ae4e789884063ba167d401fc08ae7fc8c7769feed9cd942a8ab38961c8b8794d7fae8f9955479faa96 EBUILD pypy-2.7.7.3.17.ebuild 7390 BLAKE2B b840b2c94b60e9d39aae7d5062c56f398428e4d31f1613cda39e34a6de1c279d06eace53774e08c7f5d2ab01f85d9bb30184de5fdbf9374ad276b97f58ac4e5a SHA512 8ffceda18cdc35e932d65ccb2c1962ce13c1fb46585afa9c909b9882e251ee8503822d1d0aac4f1ea669f566e0ae87a527fa467a2fc8578d899e67d58cca07bc EBUILD pypy-3.10.7.3.17_p2.ebuild 7140 BLAKE2B db6bfe1c3d44cdf9f4a1639c6bf8e35253c0ac3687f3a1315bfd52ca82c4a6fa0c3626c2aad938f8bcf2b2b6851db6fa1ed5f1847a891a08800040e0e4c27ea4 SHA512 efe64c07cfbdcb2fafbbbb93adeda1fd3ba22164130cb908d8bf26d0d82713fca179463f44673fb262573dca96a468573b53e67ab97d3f51563e23888afadfff +EBUILD pypy-3.10.7.3.17_p3.ebuild 7142 BLAKE2B b5e91d74131969730bdd91d4bf2055f7e7a213d2916b27ac3fe395b563d6e2b3c5e8a5c59fea3dc8bbee196c9b6a9163037836f07ea86a4ad1bbcf31733279bd SHA512 0fc1f19af204b70f13cbf1f5e1e6d864cea64fee85a0cd41b638a75d8c2f3dc91c840406a121e64dc40ebe79dc1baf210da74fca0c011128f4e3d7b3e9fffdab MISC metadata.xml 1124 BLAKE2B f1d09d26175cf20d1440a9a83352cf6f2f2e514d35d95116caf4a5ee86547f0165a6369e7a6b129ded75d28ba5a0c1c8f4da7d664d7c1e3c1e95153593057b3c SHA512 ae95400c9a1efc75372201c2353b128302355d1d087094953d73c325fa72bc24662d31c7287ae6a2583448ac345bb60744ac19391e07f8da8ef0327627e0e462 diff --git a/dev-lang/pypy/pypy-3.10.7.3.17_p3.ebuild b/dev-lang/pypy/pypy-3.10.7.3.17_p3.ebuild new file mode 100644 index 000000000000..788436ddabcc --- /dev/null +++ b/dev-lang/pypy/pypy-3.10.7.3.17_p3.ebuild @@ -0,0 +1,238 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multiprocessing pax-utils python-utils-r1 toolchain-funcs + +PYVER=$(ver_cut 1-2) +PATCHSET_PV=$(ver_cut 3-) +PYPY_PV=${PATCHSET_PV%_p*} + +MY_P="pypy${PYVER}-v${PYPY_PV/_}" +PATCHSET="pypy${PYVER}-gentoo-patches-${PATCHSET_PV/_rc/rc}" + +DESCRIPTION="A fast, compliant alternative implementation of the Python (${PYVER}) language" +HOMEPAGE=" + https://pypy.org/ + https://github.com/pypy/pypy/ +" +SRC_URI=" + https://downloads.python.org/pypy/${MY_P}-src.tar.bz2 + https://buildbot.pypy.org/pypy/${MY_P}-src.tar.bz2 + https://dev.gentoo.org/~mgorny/dist/python/${PATCHSET}.tar.xz +" +S="${WORKDIR}/${MY_P}-src" + +LICENSE="MIT" +# pypy3 -c 'import sysconfig; print(sysconfig.get_config_var("SOABI"))' +# also check pypy/interpreter/pycode.py -> pypy_incremental_magic +SLOT="${PYVER}/pypy310-pp73-384" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86 ~amd64-linux ~x86-linux" +IUSE="+ensurepip gdbm +jit ncurses sqlite +symlink +test-install tk" +# many tests are failing upstream +# see https://buildbot.pypy.org/summary?branch=py${PYVER} +RESTRICT="test" + +RDEPEND=" + || ( + >=dev-python/pypy3_10-exe-${PYPY_PV}:${PYPY_PV}[bzip2(+),ncurses?] + >=dev-python/pypy3_10-exe-bin-${PYPY_PV}:${PYPY_PV} + ) + dev-lang/python-exec[python_targets_pypy3(-)] + dev-libs/openssl:0= + dev-python/gentoo-common + ensurepip? ( dev-python/ensurepip-wheels ) + gdbm? ( sys-libs/gdbm:0= ) + sqlite? ( dev-db/sqlite:3= ) + tk? ( + dev-lang/tk:0= + dev-tcltk/tix:0= + ) + !dev-python/pypy3_10 + symlink? ( + !<dev-python/pypy3-7.3.17-r100 + ) +" +DEPEND=" + ${RDEPEND} +" + +src_prepare() { + local PATCHES=( + "${WORKDIR}/${PATCHSET}" + ) + + default +} + +src_configure() { + tc-export CC +} + +src_compile() { + mkdir bin || die + # switch to the layout expected for cffi module builds + mkdir "include/pypy${PYVER}" || die + # copy over to make sys.prefix happy + cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" pypy${PYVER}-c || die + cp -p "${BROOT}/usr/include/pypy${PYVER}/${PYPY_PV}"/* include/pypy${PYVER}/ || die + # (not installed by pypy-exe) + rm pypy/module/cpyext/include/_numpypy/numpy/README || die + mv pypy/module/cpyext/include/* "include/pypy${PYVER}/" || die + mv pypy/module/cpyext/parse/*.h "include/pypy${PYVER}/" || die + pax-mark m "pypy${PYVER}-c" + + # verify the subslot + local soabi=$( + "./pypy${PYVER}-c" - <<-EOF + import importlib.util + import sysconfig + soabi = sysconfig.get_config_var("SOABI") + magic = importlib.util._RAW_MAGIC_NUMBER & 0xffff + print(f"{soabi}-{magic}") + EOF + ) + [[ ${soabi} == ${SLOT#*/} ]] || die "update subslot to ${soabi}" + + # Add epython.py to the distribution + echo 'EPYTHON="pypy3"' > lib-python/3/epython.py || die + + einfo "Generating caches and CFFI modules ..." + + # Generate sysconfig data + local host_gnu_type=$(sh pypy/tool/release/config.guess) + local overrides=( + HOST_GNU_TYPE "${host_gnu_type:-unknown}" + INCLUDEPY "${EPREFIX}/usr/include/pypy${PYVER}" + LIBDIR "${EPREFIX}/usr/$(get_libdir)" + TZPATH "${EPREFIX}/usr/share/zoneinfo" + WHEEL_PKG_DIR "${EPREFIX}/usr/lib/python/ensurepip" + ) + "./pypy${PYVER}-c" -m sysconfig --generate-posix-vars "${overrides[@]}" || die + local outdir + outdir=$(<pybuilddir.txt) || die + cp "${outdir}"/_sysconfigdata__*.py lib-python/3/ || die + + # Generate Grammar and PatternGrammar pickles. + "./pypy${PYVER}-c" - <<-EOF || die "Generation of Grammar and PatternGrammar pickles failed" + import lib2to3.pygram + import lib2to3.patcomp + lib2to3.patcomp.PatternCompiler() + EOF + + # Generate cffi modules + # Please keep in sync with lib_pypy/pypy_tools/build_cffi_imports.py! + # (NB: we build CFFI modules first to avoid error log when importing + # build_cffi_imports). + cffi_targets=( + pypy_util blake2/_blake2 sha3/_sha3 ssl + audioop syslog pwdgrp resource lzma posixshmem + ctypes_test testmultiphase + ) + use gdbm && cffi_targets+=( gdbm ) + use ncurses && cffi_targets+=( curses ) + use sqlite && cffi_targets+=( sqlite3 ) + use tk && cffi_targets+=( tkinter/tklib ) + + local t + # all modules except tkinter output to . + # tkinter outputs to the correct dir ... + cd lib_pypy || die + for t in "${cffi_targets[@]}"; do + # tkinter doesn't work via -m + "../pypy${PYVER}-c" "_${t}_build.py" || die "Failed to build CFFI bindings for ${t}" + done + # testcapi does not have a "build" script + "../pypy${PYVER}-c" -c "import _testcapi" || die + + # Verify that CFFI module list is up-to-date + local expected_cksum=a4138e48 + local local_cksum=$( + "../pypy${PYVER}-c" - <<-EOF + import binascii + import json + from pypy_tools.build_cffi_imports import cffi_build_scripts as x + print("%08x" % (binascii.crc32(json.dumps(x).encode()),)) + EOF + ) + if [[ ${local_cksum} != ${expected_cksum} ]]; then + die "Please verify cffi_targets and update checksum to ${local_cksum}" + fi + + # Cleanup temporary objects + find \( -name "*_cffi.c" -o -name '*.o' \) -delete || die + find -type d -empty -delete || die +} + +src_install() { + local dest="/usr/lib/pypy${PYVER}" + einfo "Installing PyPy ..." + dodir /usr/bin + dosym "pypy${PYVER}-c-${PYPY_PV}" "/usr/bin/pypy${PYVER}" + insinto "${dest}" + # preserve mtimes to avoid obsoleting caches + insopts -p + doins -r lib-python/3/. lib_pypy/. + insinto /usr/include + doins -r "include/pypy${PYVER}" + + # replace copied headers with symlinks + for x in "${BROOT}/usr/include/pypy${PYVER}/${PYPY_PV}"/*; do + dosym "${PYPY_PV}/${x##*/}" "/usr/include/pypy${PYVER}/${x##*/}" + done + + dodoc README.rst + + rm -r "${ED}${dest}"/ensurepip/_bundled || die + if ! use ensurepip; then + rm -r "${ED}${dest}"/ensurepip || die + fi + if ! use gdbm; then + rm -r "${ED}${dest}"/_gdbm* || die + fi + if ! use test-install; then + rm -r "${ED}${dest}"/{ctypes,sqlite3,tkinter,unittest}/test \ + "${ED}${dest}"/{distutils,lib2to3}/tests \ + "${ED}${dest}"/idlelib/idle_test || die + fi + if ! use sqlite; then + rm -r "${ED}${dest}"/sqlite3 \ + "${ED}${dest}"/_sqlite3* \ + "${ED}${dest}"/test/test_sqlite.py || die + fi + if ! use tk; then + rm -r "${ED}${dest}"/{idlelib,tkinter} \ + "${ED}${dest}"/_tkinter \ + "${ED}${dest}"/test/test_{tcl,tk,ttk*}.py || die + fi + # remove test last since we have some file removals above + if ! use test-install; then + rm -r "${ED}${dest}"/test || die + fi + dosym ../python/EXTERNALLY-MANAGED "${dest}/EXTERNALLY-MANAGED" + + local -x PYTHON="${ED}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" + # temporarily copy to build tree to facilitate module builds + cp -p "${BROOT}/usr/bin/pypy${PYVER}-c-${PYPY_PV}" "${PYTHON}" || die + + einfo "Byte-compiling Python standard library..." + # exclude list from CPython Makefile.pre.in + "${PYTHON}" -m compileall -j "$(makeopts_jobs)" -o 0 -o 1 -o 2 \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + --hardlink-dupes -q -f -d "${dest}" "${ED}${dest}" || die + + # remove to avoid collisions + rm "${PYTHON}" || die + + if use symlink; then + dosym pypy${PYVER} /usr/bin/pypy3 + + # install symlinks for python-exec + local EPYTHON=pypy3 + local scriptdir=${D}$(python_get_scriptdir) + mkdir -p "${scriptdir}" || die + ln -s "../../../bin/pypy3" "${scriptdir}/python3" || die + ln -s python3 "${scriptdir}/python" || die + fi +} diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest index 8476a9467877..4494b1a77f87 100644 --- a/dev-lang/rust-bin/Manifest +++ b/dev-lang/rust-bin/Manifest @@ -268,6 +268,34 @@ DIST rust-1.82.0-x86_64-unknown-linux-gnu.tar.xz 178075016 BLAKE2B 799dba2583b40 DIST rust-1.82.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0506992a71455ce0d4f76d4e6af6ef687ad772e75f9b251b4ecd1b6482b2abf0f7b32267795d7d87bba07d7f38e1612c0281c87ba0d07156c90e44175ab3a11c SHA512 59c56ceefc1228cff372cc4f3ae40e04da58f90abd6647fe4b0a11e760c21902f58dbafbb48e7ad868ecb26b162ec3641587ff8b5366c16cdd6e28f4f457390b DIST rust-1.82.0-x86_64-unknown-linux-musl.tar.xz 258823060 BLAKE2B 71e284a1a62944677792a8f9b9c78eb1750afea218f9846859de52dfe24a98c467a8d1787a0d5d72f761c36ba20f4000e1ed193e11db28d7ca3ccccbeac51f0b SHA512 eac9e504c3dc230a3923cbfab01d4ce3d5639f7c8213d8c8c3e007fa6045e1f56a4f5e6ddbe2e6259fbbac2a3944e8b351d270d4f8ce20aa8e4843a7572e8931 DIST rust-1.82.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B b96af58187ab367c80c75f3f529e18a4288a5b468c8fb3f61d46fcd69c6fec118db361cf480cfea84c2eb7d3e5a94d2dbee6c5d4291fc0b896073344bc5464ff SHA512 40a95d2b0eb27e9f7340a8a30efd59ee8fc2a310f195978238cc25a38c48db7229fad25bd82433481699e57ba409a84aca0258052c520c94ef6c1687c6b2ac23 +DIST rust-1.83.0-aarch64-unknown-linux-gnu.tar.xz 237502772 BLAKE2B 781f87532f51b7d0fcef09dce5731bab309ff9510371b17da0e389db85962795a180807047b5989a880c5c47fa2ec704e00d240ac7c06a3e0fbed9c4f640e6ba SHA512 8baf5ee185ce0316b108cf9605501a32ceec65a8e00e3b2628d9b535d019c78a4d87fa2c7205a68fb0411f2cd41198320077056d8353d01f5027bdff1b9af950 +DIST rust-1.83.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ff43e0f6d14819222a7e1d67e5a33cadf154554601ab30054b2c7603ef60ee0bc3e1a72f427885a6274567b55fcd23932b5bfe50ca43042a35ffdc2484f67ba3 SHA512 cb9a6b100458399e8257ca01da9073ea1d6a4bd3b1a4cc3d571555b91febd64024a2367a404ec6e2fe0a8264cbfef20ea603372e95745ae578fc1c10727983d5 +DIST rust-1.83.0-aarch64-unknown-linux-musl.tar.xz 214511416 BLAKE2B 3b03b27f6849f0796f9a7bb34c9efc782cd40c38df33635c786cd7b19387c1e9fe22a00600f0c6418b3471cce2e2af37db94b217c64c1efa7c07ee5802bfd648 SHA512 9216e2f7e50bb218c11b1d82cc882eaa2a3c6e32e48a639f0f0a345a9afca5666fe952eac9230f4e7e7dc1d16a3cd4bf348a6edc3197ba778cd2895e58f4b1f3 +DIST rust-1.83.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 844db797957123f0daf3123baa220416ceeb30e9b1b37534526288031967e3c1d19638869eb25a76ca26c14ffbb3294488c16b76230ee1fbd4d43e9c2345f8a2 SHA512 961a543d4213710811b916efa984195f35651fad941104beb7419bf7e29828f1b2ca8a4eb81cd7fc49abd7f3a4c589d6994b97281ec54b42348ee26e07be05af +DIST rust-1.83.0-arm-unknown-linux-gnueabi.tar.xz 199733456 BLAKE2B a3415ae0b6ffccfa695df3de1f8b8f0220619e9e7b76ea8a0bade9c4aaded5c8a2926ebb5f9228f2473ccd086448c05ce0ec330b4da8a6a2a51e23832ccd16da SHA512 5c8aefc5c0863401954caa09f6fe32219826a72e42ae4155ec7c2c47c1ce9ae6fdc3bef8688e3aee279af84fa8ebf2b6ccbb811fb9c2810e6e88fdd9835538c0 +DIST rust-1.83.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B a168a11beaad14e0785c76a813ec225b68d76a35aa94a3e1dc377eedc29130e36d055fa222241d40e680b0d50239a3c9d4bc1826a8c96e6479112f366373bbe5 SHA512 9601272b4c781dfd1c1b1f69f086c313b76d67c20d24dd6165af72e20c70710de2d9f6190226d71adcc99745fd5115d7201d7f81fe8a6191bc648fc5d858f40d +DIST rust-1.83.0-arm-unknown-linux-gnueabihf.tar.xz 199899940 BLAKE2B c6b52ce2469ab65fcd34089bee685f1a5c6c459b9efd5ef7ef91b114e22d81298a2950fbf5464c90a66cf29f3034b5a62f384dc3e03ead99b050f14d29dd6b6b SHA512 5b9bcf769fa2753c840e1ff2c164cee4a002349865aa8a46522d9695d10a50bbe48726cdf7e77d99a739e608adbd3c88320a77a208d4c27a673aee807703424b +DIST rust-1.83.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 1bafb37031c8ff107de0006c6f139f1edad253589f5622daff57b0a0d112100574d00af3a99247b293cd07f75b433e39d6a8fdb9a8b74d30a153da06da36714d SHA512 517e2ae4ac0c06948fd9e265734003208b48dd8da95897fc170eb17f634fab7e7c5ab89acae005e109cf7fac08441210fb799155a59b8e6fb4b4dc0c1693f4e6 +DIST rust-1.83.0-armv7-unknown-linux-gnueabihf.tar.xz 205652804 BLAKE2B 76e29223c7b2dc2e5f0def1d3d40f84786fea90a5982b8fe00536a07092047546b20b523fe41d4a90043c9a391978859addce11ee8f85c8c6e0e8b1e45d33a4e SHA512 9c50ff3ec249f660c1635e3646c198a186aa3c22bffd3c5475796922fe252c44a6cebb2c4b36b4133c93938c7f960186b1c2ff048624249018aeba385b434286 +DIST rust-1.83.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B f59ab3d5eb9c8c45a1bf9d27b7177c0e1f2bb3a22fccbe06932044414d2adb795035fac18e6909e42f0a5f19ed8faf2ac6febd2f861bb4c95b7bda766a02f478 SHA512 a9f845e120a8c6efceef7917117811d56da2b6828d7255aad5204cb8e470f79bfce958b4222d1a8a7f6d79fab2d059bb6876ed184e5495d1435eddc18296a2b2 +DIST rust-1.83.0-i686-unknown-linux-gnu.tar.xz 233693080 BLAKE2B 16a77a02a2a4f337c1fbece019e56f09619623ea3b063529824365f68ac0386a84b5abbe2a2f945b0a820391172b67494c849e3689cf7719ba51a88f1f4db00c SHA512 daec4592507b5ab28185bfb77e41c64110220211c464ca778ce846d5fae6085b129ae9d6d8db4bb7ad586d81dda07c9fae3606cec081dc8bcbe1f6d873b02882 +DIST rust-1.83.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 96b38ba9f35d825723b04395f2d6dae8b652c8c2604d724183c328432a991c9cfe9efe35bdb7a8cb32ce74b29be953cf71f782a369a975272f1a1b311bda74a6 SHA512 875298edf8769158e89b7e2c7fc939dab1e738021b8bfecb9bb1a7b287ff0bd87bf49e1784c567f7c63d7149b8348a06b9222d1071980d3128fe826c42549e2a +DIST rust-1.83.0-loongarch64-unknown-linux-gnu.tar.xz 230967340 BLAKE2B b1356c331f85ca97717dcaab94aded8f20c577bf61051583e03b8530127e5cd3688f92ff920a6b2083d3d59b7d9faeea2a2de4382cf49766a74a71fe76214bd5 SHA512 68ed82264a89c8bed255ecf1b92279c8de1446186223f1d44c16eab263749de06cf1e8e07720f1326abe4663006ee636089db788124f3f0c7c9adabd3f2a68aa +DIST rust-1.83.0-loongarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7aaae04be9c09c8775ce6713f172f3523a7b008c921c68f1cd751f0bfea8144ac2bfb454fa1fa0d5e8486e62839737ad08d3381acaed633dc62c67abea65cd9c SHA512 b55652804fe3e5a574bd84fcf099e5ae733f211c87c5f3352660839f5ad2c29efbc02e553971734bcb6e7cd6f389bc875bfc92043c68339d8eaac797b1b6742e +DIST rust-1.83.0-powerpc-unknown-linux-gnu.tar.xz 222744280 BLAKE2B e32f9066394634d5855395d202256ba67c58d55bbc675bd440ac4d051260e7d2d237d0f8c35d3ef02f33512279aa3298c1993b2084b27fa017e18f1debd1b15a SHA512 ef67f29075d4248361885d0860d3040797d6a7a941e99ad49d6249e78fec00e306153fc28bf907a0cb4c58ecac73d92c4d8287b56132469eeeb18983ee84f01a +DIST rust-1.83.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 16cce0091bc65719fc410e4b76fe3bdf4b3774402d300b72f46dbf1de55ef6ae29adbe0fa2c66aea119536b9446a0eeb70789cc9db2a36b64ba8cbdaae707f16 SHA512 cf94525aa6a868d1825d5fcaadc82190a6866a107aeee8884b7fb56b5ac427436be91737cfcaa0d5f7a44f21833127ff028e9247f8626f38a98e40282feb63f9 +DIST rust-1.83.0-powerpc64-unknown-linux-gnu.tar.xz 218928260 BLAKE2B cdb8b3e0eb20df2ad4415a991c535c4db36fcfd45364adc415c870acfd5c61953d5b95c173213fb6c420a354adaccce2afc60d63c5afa21c77ecbcfecb99245b SHA512 0b39efed4cd9f5d176d81be196948697b72686cec907a075fac8d052197838f0ab536fd995952b56f58ad45bf2a5d89ba46bbd97cc2bf9b166658b508a959c11 +DIST rust-1.83.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B bd67bf4a611f731cb950240811504262d666656a891ee25f61dd12090e6176527c5d68a83c9fba7613e6523397aee4dc5aeb97706f80120e1b66738cd9ca1451 SHA512 fbe15871b6bca6fa89cb47df24e5621046e6ee5b5e008c2a738093c85d8130abee507eeaab5cb83af27dd079094fd6dd6a9597b6eb712eaa00e7f0b8c85aaae8 +DIST rust-1.83.0-powerpc64le-unknown-linux-gnu.tar.xz 231986816 BLAKE2B daf72e5a6382ec93d7222b624ebc8c2f27d4b4a0448ad227615f4f7c9e8d87b2d2a7c182d6f0f61a20b4f737e5f70467a0c2b6024eeeeb248cbfb37d655841f7 SHA512 6735080308340072dc3f258b755889c7a9f6e79b85c46e38de074823b6814289b1f9862a1ac69d3027386560ffe3c2eab339438a536e717f7b099f0de75b6b64 +DIST rust-1.83.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7c88fadadd58fb4e2c63f10f01b1b3b719e1917f5c1217b5a858bf347483f0b71016107045f34916fa53e493b47532a94148c4fe95db6ec23222e8e6f70dd98f SHA512 da5e64c245bc962447384db3876f3d3724ebddacddf35b7fa47e2e7b408ffaaffe303549fba9c07af8a6974ba32da823989d1929068e0eb5c781881511012a6f +DIST rust-1.83.0-riscv64gc-unknown-linux-gnu.tar.xz 218315040 BLAKE2B 91139066f3ac6a652db13985a225547eed242a6efaab0021bcf78b31e9e98fbedcdfe932110fa4c918f5eb3d8336b9b41a15dc2fcd316561d56e5bf205dd1567 SHA512 9bc1b82aff2e2447cb16680a8125378e33b7ceff4fdae7855bd7a79437f2df5b3989e82ffd68f157d50144018a74e6cc2053bda21de31d2c694aef29bf4e8bfc +DIST rust-1.83.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e51ec506c4897e5e57cc94bfd3ba15d64e678a67b50acf48b8c69a5b95223006451d543275fc5291bb69369bead17a01d4934cda5b4744adfae2423200a002d0 SHA512 2d705740d928d49bd0eafe26cccf997f81c1f7ddd72bf6c4a4abe89e1984dca8e1b57af4b997939df355dea19abea2f45d430edafe88e7bb207abc0dc8d8ce3d +DIST rust-1.83.0-s390x-unknown-linux-gnu.tar.xz 221194604 BLAKE2B 5d625e48296c171fe6da8ec70fa4daaf1632f6b63404d30ca0e908d63fcac3abc39f6fd9762d3670aa94f9a2587202d1b66f9751fd04e5e99f00caf8748243d6 SHA512 3aece2baaf66134ca339f3a9239c92ab7969c064eb35ede5dd61a3c2eca5eee4053b581edaab0acd6ba60cb7600b47902697e71c41873357fd53dbbe5c867d8b +DIST rust-1.83.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B bf07a1e0454e46e030918a44bfb04e54bc49266951ee7d88f13f7a66da7fba0b4d65022248fba1e51248a69e1a1975246f81cdecd56cbedb6ecb69e54eabe39f SHA512 6412d9b17f2c1d63c7b2c44a38dbde01670dd96bced6384b826abea8402608f239acb6eaac273f9a02b7f593b58e84ac0cebc854d2213350a000be139cbc5a47 +DIST rust-1.83.0-x86_64-unknown-linux-gnu.tar.xz 180329116 BLAKE2B e2c661061e21c3ea6a75c0c9f43d0558405fe4f16f75d763f5a80c1d0c4d7cacd7bd7136e625872f9c22455439ee070ed9f84d661b9cb2d74b0f436153a34ffa SHA512 d4e05dc817f1fcde4b46b82300a95d79f7d908e804534b223a396ff27b19f195fcdebdc933204fab3e0a45202e394722fdfb217ecbb1c1332394e97200ffe089 +DIST rust-1.83.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 1453c9047b590358731d4ea9e8d6dab0da1ea937fd9b9f6ee2137459d0a426df6333a9dc53dff65f6c82a17b93a98efc5dea33f9218145070a7605baffebc1da SHA512 f6a3636611d0bb5cb41989547388901bed0dbe54fe3d99d94391bc815718a85af52d0110747c3d7f1b6a455ebaa221b74c2c9fe11403b147325b6ec0c4bf46ef +DIST rust-1.83.0-x86_64-unknown-linux-musl.tar.xz 260755616 BLAKE2B 0a61fad7f03645a9b4032fe4ca910663f0406a64a42cd113a09019199e6deceefce2a450ca14bc47745db08a9fe8970897fd01c2121f9b6bcb20b23652ada5de SHA512 2e219eec7b28a60e9bd160972042316460d91fe60f755c625bee30724059f4f9c4a29d567bea54718f9b8d739cc1c81cb4dedff0c868270861c866452d5cf8a3 +DIST rust-1.83.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B f87ab0bb59b5e4fa9078bb973845bf606c61faf2c728db6cc3e9a61907fc2d1c9ea3ede7ec55c3388c53b0ff06ffcbbb89f63b585c36b5bff7637acc8b8f3336 SHA512 20740272925662be9178c9c87f8184c4d0a355051fa85fd8459563bd23bde798b01d53c823726d0788f6311a4f3c7f3c8bb8a2bf4f470c8d3b7d1303090a78ad DIST rust-src-1.71.1.tar.xz 2460244 BLAKE2B e3a5b5bfb808310f96e760aab55310c7a790fa551d248c9c5dbb407e0a80653563d8df73a9e0973aa63d3286aad6c755b78098dd8db2dc1a2ed3cadb926b40e1 SHA512 659cc46e1ece2ddbcf5ab748bae48843bd36353cc633b59e4ac062d843af66919e8d5c39ccb72ebdbf94a0e26a8056ade6bd1c8fe9a936469bd405122a8ae35d DIST rust-src-1.74.1.tar.xz 2544036 BLAKE2B d95431b69f102782f51878ff73ce8802cac6dab7909497c3231d1c479b95dc2a618cc6efd8bac9c6bd59a2b10dc6be05199f1e1bd74e45cc640ee52352c29268 SHA512 11467d0936193c5a5be8c2eba1aefe2b7028af48494698863de2c4057d68ce33dcee1fc66dc2d68b1d32f0202ce49e9b906727849de8f8d904dd07930e76d5a4 DIST rust-src-1.75.0.tar.xz 2570256 BLAKE2B 9db7ccff07ffe6991233e9f530321fd6ba48c561dcf1226537afa70c7d045421d8e83c5300b0866ec6fccfaae96dd67b9f204e9e0e12108c0c766d467cd78909 SHA512 e7565cea2f1658a05237a698e38880df2544319b41b6d8b0805db5f1f94fd3bb4f986967d0440fcdfe3a135e33246f3c747665b964f57ff5942f56133af78cdd @@ -276,6 +304,7 @@ DIST rust-src-1.79.0.tar.xz 2855740 BLAKE2B 2701e3de018e044b5cc83b8d1b8e509127e3 DIST rust-src-1.80.1.tar.xz 2870456 BLAKE2B 9096fab01b38cc3ea2a32a2ab2e9052e5988d25e92965ebf174c4823c7b3c722196ca25e0dabcfc6db208d1c07434f06594d85fc673b6b9d4e0070ed445215e2 SHA512 bb9fdc593f33c6d94c28569a1820f0fd2413c31e650ddf82903214845adec664cac9d7b10b07e096a36432dd815de96c6aec81709ed13e99f381cd53cb87fd89 DIST rust-src-1.81.0.tar.xz 2901440 BLAKE2B 7ad2855c21728cc323108f7e45416a425a222e550c132818b302dc2b9fabc1281e560b0f097e1fc41e682f52b4524c69737096e12cc9e97a677828efab96dc2b SHA512 d38b1afc17a4cc7ba67d2e1b7d3dfbcc2a61ad96e87b130064d6788538817c27bce06c9fd7a4733de5b5862ff5f6aa441bf71ebaaae9ff80a86c354a6ec05e14 DIST rust-src-1.82.0.tar.xz 2966368 BLAKE2B 4162e7393ac21a095ac1541ea7b62fafa561ce2153bdd2b3723d0f2e0130fb2fb1325ac8583d87d64b6cf6b76400d12aaac144c781e89a177483adb46854c81b SHA512 4f7817eb16dbddf15ab09206738569370c42abe117086b085a7cc8f7174f9c2b42571707558642c72597236610eeeca32575b665acbc2cbc4f7709e624c16cc4 +DIST rust-src-1.83.0.tar.xz 2998424 BLAKE2B de758c5bfb29865a3ab7ab02d17b0282272fa7d1cf5da333a6a19d6a16813320317785e9bab02e3ba9ca6ee9f26e0c96b00a117f33b74c82b13ece44133e3130 SHA512 e1f0ccae1fd4202d86cde1f1e2f4491983ec49fafb2b9eaca6260e9173bea0e0cc2567946e48e3ce48f0a620f63dc44d30334f06c935628158de110d43c7d53b EBUILD rust-bin-1.71.1-r100.ebuild 7158 BLAKE2B 27c1760199973c531684c00cfbfca9c33d0537229aad58be007748568cfd8d8e5c42b91d98237b6bb1bc11442ed6b58c6d749a873b78fae81aa4d3b13ee7f323 SHA512 998df612f2e5ceeb9241bc8d87dee62e7ed8f2deb696ae0a24f030e05f5a2da43cb872c52c551deeb14c566d87bfe79a5c63c91ad74f71249db412bde88fb44e EBUILD rust-bin-1.71.1.ebuild 6976 BLAKE2B ab06c32b5859fd3898d88dc3d296d890556849078f1cfb2cb76a56d1437abbde406ef394b07e410ca0965671714b45b8eae832b93e2911ac8bc2aed2d84dee23 SHA512 aeb25676217956ddb976237888c3b6a9891360c39b9acb802e8e9070881d16b34f3dc5c2b884e21554a9986913f8443ffa4aa9cbdaff6ca5600abad3f298c4c7 EBUILD rust-bin-1.74.1-r100.ebuild 7501 BLAKE2B a518a84b9875e1620251817d3b40b522f793f344220d97c6a2bc3166394fb961ac68994acc18701e6a47586cf3cf1f3c38b76c0be45f58407b2734a6b03668a7 SHA512 5d9e28bebf3f3f1476ba8b4b60fff0ec4b7e679ebdde60f9ed90fc2d67cda1e1908dc46fbda7d86b8caeb76256ddc5a7b07a53b372db7ef1fcb74d1fc7c17471 @@ -292,4 +321,5 @@ EBUILD rust-bin-1.81.0-r100.ebuild 7782 BLAKE2B e7758165904e80b42c4c06e452938354 EBUILD rust-bin-1.81.0.ebuild 7589 BLAKE2B 2cc70b0f0fcbd43b23a94c34f2453051b55bf7aa0081a64dcc64fc0da9edcedf780b3be55e8d56ceb0afd6c66f91d8a82e7f91d51ea76a876fee320132c83d10 SHA512 bbb441806791c0816e5216c812f07e0a5269886cf82edd5411bf908dccff68aa8ed06f39052086c48ae6066c982deea521621d98272dc586917e6b271104ff8e EBUILD rust-bin-1.82.0-r100.ebuild 7817 BLAKE2B 843facd6964a8c2a0a1db13a6c849dff9190426631422f8c2573a1f34ad1b120479ef346fad773e87c38f041dab6b54f1e9c93c5e0bf779b3aa42b96356310f9 SHA512 80c56b679a05a428ddf51cc1ab714ec0f3e946e2d4cdfbdf402d87229d05e9ed694da2adf5477aa427ff5258e76ea257e4abfc37f4a8364ca56eda297efafae6 EBUILD rust-bin-1.82.0.ebuild 7624 BLAKE2B 2706be9714c3f62fb9c18d176ab3abc31dce8305cdc137e7d63cf616ea0a7315d4988659ddd10f67dec9c732cf17aec623df9a7c0781f2baf73d4db24689834c SHA512 0ce02301710e059bcca5e6f079ead6a9e9f5642f3fa6a6713615c68f0d0c65dd1b509d65a372cc64d9022287d41a0558a8632d026e4664d0429a9210e527291b +EBUILD rust-bin-1.83.0.ebuild 7822 BLAKE2B 64dfc5d70e26fdeab1cf67f07008b4ba48bbdf6390a3371c381dc6441baba897d93dd974f3eb079607d93ffd2f8a55ebd463d77bf3897808e694fc9eeff5fe6e SHA512 e19ae93a2a278b22a4fd54c4285bd4174d4ab16d6d65c64738b3788200aef2b2c7b465b95ba2ea8c0296bb0b99eaded404b9015bc9c3e623b6ce463ea59d9438 MISC metadata.xml 1220 BLAKE2B 5c4d286e569c929913317d15d37de08db51655ec41c1d3b1d84aeb6982b53afd7ebf3f9adbcd4e3c76fc9b82056648b6af1507a5728388fd2d2e8d743e5225db SHA512 72d32987894268a7b3ac8e8606428cf8315fcf29ce1945c9e55527a5c696742f6f2a44dcfe01bf5abb0cad60b5881a59dedecdc07db4ef2df22ef13e3b2732a8 diff --git a/dev-lang/rust-bin/rust-bin-1.83.0.ebuild b/dev-lang/rust-bin/rust-bin-1.83.0.ebuild new file mode 100644 index 000000000000..6e2baed5498e --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.83.0.ebuild @@ -0,0 +1,253 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( 19 ) +LLVM_OPTIONAL="yes" + +inherit llvm-r1 multilib prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal optfeature + +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%/}/2024-11-28/rust-src-${PV}.tar.xz" +GENTOO_BIN_BASEURI="https://dev.gentoo.org/~arthurzam/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 ) " +#SRC_URI+=" mips? ( +# abi_mips_o32? ( +# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips-unknown-linux-gnu.tar.xz ) +# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mipsel-unknown-linux-gnu.tar.xz ) +# ) +# abi_mips_n64? ( +# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64-unknown-linux-gnuabi64.tar.xz ) +# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-mips64el-unknown-linux-gnuabi64.tar.xz ) +# ) +#)" +#SRC_URI+=" riscv? ( +# elibc_musl? ( ${GENTOO_BIN_BASEURI}/${MY_P}-riscv64gc-unknown-linux-musl.tar.xz ) +#)" +#SRC_URI+=" ppc64? ( elibc_musl? ( +# big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-powerpc64-unknown-linux-musl.tar.xz ) +# !big-endian? ( ${GENTOO_BIN_BASEURI}/${MY_P}-powerpc64le-unknown-linux-musl.tar.xz ) +#) )" + +LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" +SLOT="${PV}" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~x86" +IUSE="big-endian clippy cpu_flags_x86_sse2 doc prefix rust-analyzer rust-src rustfmt" + +RDEPEND=" + >=app-eselect/eselect-rust-20190311 + dev-libs/openssl + sys-apps/lsb-release + sys-devel/gcc:* + !dev-lang/rust:stable + !dev-lang/rust-bin:stable +" +BDEPEND=" + prefix? ( dev-util/patchelf ) + verify-sig? ( sec-keys/openpgp-keys-rust ) +" + +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" + +# stripping rust may break it (at least on x86_64) +# https://github.com/rust-lang/rust/issues/112286 +RESTRICT="strip" + +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="/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 + + docompress /opt/${P}/man/ + + 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-<ver>/bin/rustc-<ver> + 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-bin-${PV}" + MANPATH="${EPREFIX}/usr/lib/rust/man-bin-${PV}" + $(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 + + if has_version dev-debug/gdb || has_version dev-debug/lldb; then + elog "Rust installs helper scripts for calling GDB and LLDB," + elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}." + fi + + if has_version app-editors/emacs; then + optfeature "emacs support for rust" app-emacs/rust-mode + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + optfeature "vim support for rust" app-vim/rust-vim + fi +} + +pkg_postrm() { + eselect rust cleanup +} diff --git a/dev-lang/rust-common/Manifest b/dev-lang/rust-common/Manifest index df6bd992508b..352dd103be18 100644 --- a/dev-lang/rust-common/Manifest +++ b/dev-lang/rust-common/Manifest @@ -2,6 +2,9 @@ DIST rustc-1.81.0-src.tar.xz 216743872 BLAKE2B d9f52da9092d0723c862ebbb2dc351cad DIST rustc-1.81.0-src.tar.xz.asc 801 BLAKE2B 01cd9f386d3fd73f4eb43b14d7d479ebababb8640abbff170e697817b94b8a18edd801c6047ecf3c084a0a51764c5e4f3f4bd6b00e8ae000ef0b850e9506572a SHA512 19c0da9d67f2bd9fd79a2078f0f486ee7fad5646a09a609b7e30d9531851955ae8df0ec69f9ddc09e2fd6e74d529648335b0fda833839c88c54c84494ec1988e DIST rustc-1.82.0-src.tar.xz 219769328 BLAKE2B 611f33e134c2d459c9af1695c0a4d033df93afc986e91a17fceb0dd293fb4ffbd5f7475ef571d36cecf49da6c3fdb3801c98d7f72f9dd1c39e42502f649b192f SHA512 d158c7c71c1814bde2a3ec3cbeabe34949bd3201b730c0d7ec6baad4158bb28dd13696c430a6b99dc38b9d23ad7ddf8dde7d2487cbfbbbe9c3473016994210f0 DIST rustc-1.82.0-src.tar.xz.asc 801 BLAKE2B 8138fb15b8d7ec15be45378fe663207a8e87e3c527348ab079995b1840a771ed6e9d5464eb8855ac9e006c0cfcf54b1a4fea489d31e6c9899cb03e6f4c737b67 SHA512 3cd6b27e72041baf9996efa10f25aca2e04f3e3727b60ecfd90c1bef9c52d216d2dc130802f935b110e35766645a27637a01661aa8d5acf02bf64b02a107c93c +DIST rustc-1.83.0-src.tar.xz 353808388 BLAKE2B 217c85f7351a7c57a2684da2c7c81a32094187b3812dee628b327a5b2faca57235abc54d033c586c071c8bfa0c7360bb28761aaa42fe18414e388db704d81231 SHA512 64db57949c6ac1df6a3f4c6bd0938685a5fb1bc3d318b34ccfcfccb0f9eff1cffd4d8a53a190ef0409eeca9ad12bc6234c2c1de69196cc74ae02d6afa20d0ce6 +DIST rustc-1.83.0-src.tar.xz.asc 801 BLAKE2B 3bacb43d50ebba579dc2d4f1726298a7887e303e15f039ef72b840e30d90bc2cf9cdbe4617a9ee113a2b1a48f1982e72cf30323d72cdfb9a65b5b4d734ca0024 SHA512 84b252ccaddc06cb05858ff64f582dd25823818c81b1e3a00362deeda06f09e6c36948fd316d5f0ca5e24949e6f99bb14a14dbd2af1cfbb85e679e27ab0a813c EBUILD rust-common-1.81.0.ebuild 1442 BLAKE2B 2fca9110584bab02d27116bb7384ef4cdc0cc42323b469473f76fa09bd15fd4dd24a4597769d453d12c8e06b4305614d50120099feaeb142c2aafe29dd610348 SHA512 b948bc84b48deb6249c61d977dde1489374f5e0df679540a254ce4211f148eb5fff00fa4970bc63a07d4d08328fa821cee1172c388ddd8b48c1c0117a1c0259d EBUILD rust-common-1.82.0.ebuild 1449 BLAKE2B 570a7a3b81e3c710e467adf1330e8ae5f9253fa596f6d8239cdecfb76f2f9c179b435fd2ad4030a821dcf1f037cfab97210e5f4b99fb418b4fa03119f9e28ed4 SHA512 530ad49096761be283ec94182e9eea075e6a72a1da94060ef4e77a04d642cac4b3aad571d6eabd47e92b2de18a80c2fb932bce615a8475a8ca92931102e80c8b +EBUILD rust-common-1.83.0.ebuild 1449 BLAKE2B 570a7a3b81e3c710e467adf1330e8ae5f9253fa596f6d8239cdecfb76f2f9c179b435fd2ad4030a821dcf1f037cfab97210e5f4b99fb418b4fa03119f9e28ed4 SHA512 530ad49096761be283ec94182e9eea075e6a72a1da94060ef4e77a04d642cac4b3aad571d6eabd47e92b2de18a80c2fb932bce615a8475a8ca92931102e80c8b MISC metadata.xml 324 BLAKE2B 25e471eacc689a8af7e0251146bf712b020a10d55e3cb48285f174996ec66db8bbd146d4737db15ac3b2abf3e1f0415277b9bdca84d94f9b08a56e9242a4fcbf SHA512 723c102ec7017eeb72bfd6f37c16e2705e61bb626a93e5127eca2275a9367cefbccdd846fe8a699bc1192ae52cafe236f3fb6261fa6db361564b34880a9db2fb diff --git a/dev-lang/rust-common/rust-common-1.83.0.ebuild b/dev-lang/rust-common/rust-common-1.83.0.ebuild new file mode 100644 index 000000000000..285a9a5b8e5f --- /dev/null +++ b/dev-lang/rust-common/rust-common-1.83.0.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc +inherit bash-completion-r1 verify-sig + +DESCRIPTION="Common files shared between multiple slots of Rust" +HOMEPAGE="https://www.rust-lang.org/" + +if [[ ${PV} = *beta* ]]; then + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz" +else + ABI_VER="$(ver_cut 1-2)" + MY_P="rustc-${PV}" + SRC="${MY_P}-src.tar.xz" +fi + +SRC_URI=" + https://static.rust-lang.org/dist/${SRC} + verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc ) +" +S="${WORKDIR}/${MY_P}-src" + +LICENSE="|| ( MIT Apache-2.0 ) BSD BSD-1 BSD-2 BSD-4" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" + +# Legacy non-slotted versions bash completions will collide. +RDEPEND=" + !dev-lang/rust:stable + !dev-lang/rust-bin:stable +" +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-rust )" + +src_unpack() { + if use verify-sig ; then + verify-sig_verify_detached "${DISTDIR}"/${SRC} "${DISTDIR}"/${SRC}.asc + fi + + # Avoid unpacking the whole tarball which would need check-reqs + tar -xf "${DISTDIR}"/${SRC} ${SRC%%.tar.xz}/src/tools/cargo/src/etc/cargo.bashcomp.sh || die +} + +src_configure() { + : +} + +src_compile() { + : +} + +src_install() { + newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo +} diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest index 2625e17d085a..985db296dcce 100644 --- a/dev-lang/rust/Manifest +++ b/dev-lang/rust/Manifest @@ -14,6 +14,7 @@ AUX 1.81.0-backport-bug937164.patch 539 BLAKE2B 6170c5383f7d8ee9d60d22c61f62effc AUX 1.81.0-backport-llvm-pr101761.patch 1171 BLAKE2B 4bbee85a22e894b208caaad10c1fc90dbd279a6541fdcc5ad4f6944fc1381c8c3b6bf461e495f80e68161cc7ce3db8062b80034021709fbe6ab0dfbb3e91bc1c SHA512 c327f78cb2c261ebf3c5706f4861183f3f5608931a36bebeda1bbc6daa3cf3a040780673615df70358c813160c5a0be5e083c29d80ba6dff8be46c1a0fc66dc2 AUX 1.81.0-backport-llvm-pr101766.patch 1247 BLAKE2B fd809b6a7f6f7c4e0d324aa2912261b366c188ba7ff51e7c42a1b6376f1c194b3b10e37aa17ad9ee2dd34bac9162d755ec0636f55815ce11e034c605a31041a4 SHA512 299da1a52abea54a5c6dece1a67585e4f0e9dc83fd20f747e55f6abfecd94a2ecead12bea75fa6d721620b5390a23136da1355f17b95ef646b8cb8b8ea513b52 AUX 1.82.0-i586-baseline.patch 1818 BLAKE2B 59f396cbcc9421ae9394d0bb51053dc9addb8ca895ea8c4d7633b56361782b65f4e7f0699dec2999f2e188b4929f9036991444187f8ef35f6fea176a01999f83 SHA512 898dbde6a2f3acbe7a50023b88d3280ae85125e2bb99d18823174b541972766cf75a3457a34a024cea7348537fa6854af6ffc975abbc19323a20de87cbf5e5fb +AUX 1.83.0-cross-compile-libz.patch 915 BLAKE2B dbb726de09c9c957f245ecce29c597f4c9c26bae0c14901c62ad51349f02d47c69fa687bd926f7ecf47aaab4ac5aac9378dfe7fa0a66dee95ff1765c5aa9b0cc SHA512 b9127b7656b8e5f79db3157d9425f97af0634088fad512e572357797a2f24f9e9c3635e06ab2efc5ad8edf86ffcab53adbf013e29162579642a382d0015ab54e DIST rust-1.70.0-aarch64-unknown-linux-gnu.tar.xz 212261108 BLAKE2B 56e15d01ea0e84c51ca3d4fc292c124536472e9c3e6d9ae13ab524e520865117b36621eca5072b961831ee6ad3077abd84afa9e092483095234b7ab2ddcae769 SHA512 d64eb19417a03452f591bb779042b2b3ff16d2ac48a9a74d293bc7265980280801784f92cdd0ae0dbc21743433388149557da7642871c72f3bb4b3061cf7eeba DIST rust-1.70.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 435383da02632d404ce95ecfc0b0690f18447f22cd82e67cd08e6e8aab072539b33a49c2712bdc35f34a811f8e66bda6bcf9505b41dcdaf4cc66e358df9d7f02 SHA512 634c35b52d85c524a954d0663b6f1507c5aec826768c1a51394bf72bae585afadd3d3af985a9d165a65d178e04813fd592a78d058ed1400bb0fc43b0a1614a27 DIST rust-1.70.0-aarch64-unknown-linux-musl.tar.xz 195626092 BLAKE2B df5ca11b64513c86dbcab93bbc5eee37a1f2c6307ca479c07ef62d683ec1b1f56bd596284b11695d80c8483ba5ffaacb0bf060d7618f5e79f3957bfe8bae042b SHA512 5bcc47e2e791603b419c2d1f3503a60cc9a4a7351d3e8a61e6f3823c53195f58795cfcdc56c0c2011ae40a21ec7819d7dad32f5f9981f3d39e5f28ba85083d07 @@ -260,6 +261,8 @@ DIST rustc-1.81.0-src.tar.xz 216743872 BLAKE2B d9f52da9092d0723c862ebbb2dc351cad DIST rustc-1.81.0-src.tar.xz.asc 801 BLAKE2B 01cd9f386d3fd73f4eb43b14d7d479ebababb8640abbff170e697817b94b8a18edd801c6047ecf3c084a0a51764c5e4f3f4bd6b00e8ae000ef0b850e9506572a SHA512 19c0da9d67f2bd9fd79a2078f0f486ee7fad5646a09a609b7e30d9531851955ae8df0ec69f9ddc09e2fd6e74d529648335b0fda833839c88c54c84494ec1988e DIST rustc-1.82.0-src.tar.xz 219769328 BLAKE2B 611f33e134c2d459c9af1695c0a4d033df93afc986e91a17fceb0dd293fb4ffbd5f7475ef571d36cecf49da6c3fdb3801c98d7f72f9dd1c39e42502f649b192f SHA512 d158c7c71c1814bde2a3ec3cbeabe34949bd3201b730c0d7ec6baad4158bb28dd13696c430a6b99dc38b9d23ad7ddf8dde7d2487cbfbbbe9c3473016994210f0 DIST rustc-1.82.0-src.tar.xz.asc 801 BLAKE2B 8138fb15b8d7ec15be45378fe663207a8e87e3c527348ab079995b1840a771ed6e9d5464eb8855ac9e006c0cfcf54b1a4fea489d31e6c9899cb03e6f4c737b67 SHA512 3cd6b27e72041baf9996efa10f25aca2e04f3e3727b60ecfd90c1bef9c52d216d2dc130802f935b110e35766645a27637a01661aa8d5acf02bf64b02a107c93c +DIST rustc-1.83.0-src.tar.xz 353808388 BLAKE2B 217c85f7351a7c57a2684da2c7c81a32094187b3812dee628b327a5b2faca57235abc54d033c586c071c8bfa0c7360bb28761aaa42fe18414e388db704d81231 SHA512 64db57949c6ac1df6a3f4c6bd0938685a5fb1bc3d318b34ccfcfccb0f9eff1cffd4d8a53a190ef0409eeca9ad12bc6234c2c1de69196cc74ae02d6afa20d0ce6 +DIST rustc-1.83.0-src.tar.xz.asc 801 BLAKE2B 3bacb43d50ebba579dc2d4f1726298a7887e303e15f039ef72b840e30d90bc2cf9cdbe4617a9ee113a2b1a48f1982e72cf30323d72cdfb9a65b5b4d734ca0024 SHA512 84b252ccaddc06cb05858ff64f582dd25823818c81b1e3a00362deeda06f09e6c36948fd316d5f0ca5e24949e6f99bb14a14dbd2af1cfbb85e679e27ab0a813c EBUILD rust-1.71.1-r100.ebuild 20987 BLAKE2B 283d7857619ea1750f83099885616be555b9a737eff04f60088a3e179d2a54d6778b0557d771ab3be4fd870411982f6cf56f999895c9b80d7a1f767e8f3eb06a SHA512 586a5448d5cdd9ecab71fd7f58d7f6d14cb90d0ebe8ed5e0f96bd1eea09ee5e9455bbd8c6bf9b103734ff6113f863efb138377ac4fabaf5da8f24ff519072b8a EBUILD rust-1.71.1.ebuild 23467 BLAKE2B cc179525f8be2375e4bb0651b3210986254d027414bdef178a33309a7d99deba0a656454b5f1c84a852be104c93edaf5eec24c6f65f067365ed0a202d140fde0 SHA512 2a81e2a2c49d19d88c7794d809648a4630ca476410ea3270a772fa8d315b56c1b1698fc523ff5451a4336e23993f76d444c6c3b12d491ed89019f075a6fceb83 EBUILD rust-1.74.1-r100.ebuild 22331 BLAKE2B bb3160476b6a3b0b2ec35487527df6b49dbef09506076daa96d2b4064a8ab1854bd03c35424b3e084b4fc0e7a45898a3ec5ce800dfa1f8bb630ba802aa79315f SHA512 748a534614957abcba347f7f69029fdabe2b826b0f6e4b2cd994d7a16ac61d47b95f91c51554b5cf1dcb9cfcbb46ef18fde0f19ab3013c85d8a2392eb6ec998f @@ -276,4 +279,5 @@ EBUILD rust-1.81.0-r100.ebuild 22752 BLAKE2B e4ab06763fb90ac9c3453f359b56158f342 EBUILD rust-1.81.0.ebuild 25380 BLAKE2B c213ba368f9f49be7e3c6f0260684f9b7c7f1afa7727ca7a7db7802b5a40a9009756464f9fb5a3165cbb5161e3e18181973a67d97a2e1cde13e4d6733ac5f2b9 SHA512 56501ddc2d06c2e7ff98e704a255d850897028d115588bca21ba43530f6d8a39ad684642e802faded8ae83da06dd6d6e503c76759e6d1df9f0fdebc0f6d6ec6c EBUILD rust-1.82.0-r100.ebuild 22905 BLAKE2B dda6c110666a1408a9391cc0437e91a241440077a11c10489d447ff323bfa0cc259c19d43a32e26d34bf5d77dffd6b3cbe9851879e18cb016b75a3a1e00cc901 SHA512 e6dec9b7c6cd384685ca3b2045207661e713bd2278b9e44f8928c9829e5d0ca7c18a635d2970a3d235318e78432b717dd3b75ee39d30e38f6c6fe389778b7b66 EBUILD rust-1.82.0.ebuild 25639 BLAKE2B 276ef627db58d7d7cb85f4f84f0c68ef36da91822d75c83f13c14ac73b35729b2ce354f79506122449cdb8517bb34a6c1f13dc158987e05b088ae96e1ec33f11 SHA512 8dd95a85eff44f5567ab6f038399cddbd111213810a1390dbef0ed9d68284c46368511006158935db3d9b70f06851e7e3a562a9c0044f85a532dc6c812a38c24 +EBUILD rust-1.83.0.ebuild 22905 BLAKE2B 0ba626df3d0cde5727a5c1511db8a39f23b5ba032830044c0e5d9a3844d4a3efd7814494bde9923543bb873203ca62f5c9bce5a727227f2e9e9c4be6839de6c8 SHA512 f9b958dbf0e845e16f72c9dce45c3632bab68d66251ea5580de78ae2dbaa3c0efb7dfa2a3689a9645567d92f5cd8d9bf518555aadc69cfbac64f635574388435 MISC metadata.xml 1945 BLAKE2B cf3ed0b2550564faee94e53e21deb0e905b38cd45c503ba18f55c36f13093fa65c4dac8e544c891c9378b2ce32912cab1a1a0b61a277ff29f5288b672f4a218d SHA512 a28dc5b78e15aaeec5ccf028a053c3df6a12b24bcfb6e8948e2e25b3c04cc8ede5973f1e57c723081355853152baa8c8219e36bb603b714628e71587d2bba45e diff --git a/dev-lang/rust/files/1.83.0-cross-compile-libz.patch b/dev-lang/rust/files/1.83.0-cross-compile-libz.patch new file mode 100644 index 000000000000..12844fd7efc7 --- /dev/null +++ b/dev-lang/rust/files/1.83.0-cross-compile-libz.patch @@ -0,0 +1,21 @@ +https://paste.sr.ht/~kchibisov/682321e0fd4a3ece4a4b7b71591896f5cd3cdb22 +https://github.com/gentoo/gentoo/pull/35246#discussion_r1484525497 + +diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs +index f606fa483ca..8a2e1c40e8b 100644 +--- a/compiler/rustc_llvm/build.rs ++++ b/compiler/rustc_llvm/build.rs +@@ -220,12 +220,7 @@ + let mut cmd = Command::new(&llvm_config); + cmd.arg(llvm_link_arg).arg("--libs"); + +- // Don't link system libs if cross-compiling unless targetting Windows. +- // On Windows system DLLs aren't linked directly, instead import libraries are used. +- // These import libraries are independent of the host. +- if !is_crossed || target.contains("windows") { +- cmd.arg("--system-libs"); +- } ++ cmd.arg("--system-libs"); + + // We need libkstat for getHostCPUName on SPARC builds. + // See also: https://github.com/llvm/llvm-project/issues/64186 diff --git a/dev-lang/rust/rust-1.83.0.ebuild b/dev-lang/rust/rust-1.83.0.ebuild new file mode 100644 index 000000000000..b0585b3218c1 --- /dev/null +++ b/dev-lang/rust/rust-1.83.0.ebuild @@ -0,0 +1,728 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_COMPAT=( 19 ) +PYTHON_COMPAT=( python3_{10..13} ) + +RUST_MAX_VER=${PV} +RUST_MIN_VER="$(ver_cut 1).$(($(ver_cut 2) - 1)).0" + +inherit check-reqs estack flag-o-matic llvm-r1 multiprocessing optfeature \ + multilib multilib-build python-any-r1 rust 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" + SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz" +else + MY_P="rustc-${PV}" + SRC="${MY_P}-src.tar.xz" + KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +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 ) +" +S="${WORKDIR}/${MY_P}-src" + +# keep in sync with llvm ebuild of the same version as bundled one. +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARC ARM AVR BPF CSKY DirectX Hexagon Lanai + LoongArch M68k Mips MSP430 NVPTX PowerPC RISCV Sparc SPIRV SystemZ VE + WebAssembly X86 XCore Xtensa ) +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" +SLOT="${PV}" + +IUSE="big-endian clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind lto miri nightly parallel-compiler rustfmt rust-analyzer rust-src system-llvm test wasm ${ALL_LLVM_TARGETS[*]}" + +LLVM_DEPEND=() +# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation +for _x in "${ALL_LLVM_TARGETS[@]}"; do + LLVM_DEPEND+=( " ${_x}? ( $(llvm_gen_dep "sys-devel/llvm:\${LLVM_SLOT}[${_x}]") )" ) +done +LLVM_DEPEND+=( " wasm? ( $(llvm_gen_dep 'sys-devel/lld:${LLVM_SLOT}') )" ) +LLVM_DEPEND+=( " $(llvm_gen_dep 'sys-devel/llvm:${LLVM_SLOT}')" ) + +BDEPEND="${PYTHON_DEPS} + app-eselect/eselect-rust + || ( + >=sys-devel/gcc-4.7 + >=sys-devel/clang-3.5 + ) + !system-llvm? ( + >=dev-build/cmake-3.13.4 + app-alternatives/ninja + ) + test? ( dev-debug/gdb ) + verify-sig? ( sec-keys/openpgp-keys-rust ) +" + +DEPEND=" + >=app-arch/xz-utils-5.2 + net-misc/curl:=[http2,ssl] + sys-libs/zlib:= + dev-libs/openssl:0= + system-llvm? ( + ${LLVM_DEPEND[*]} + llvm-libunwind? ( sys-libs/llvm-libunwind:= ) + ) + !system-llvm? ( + !llvm-libunwind? ( + elibc_musl? ( sys-libs/libunwind:= ) + ) + ) +" + +RDEPEND="${DEPEND} + app-eselect/eselect-rust + dev-lang/rust-common + sys-apps/lsb-release + !dev-lang/rust:stable + !dev-lang/rust-bin:stable +" + +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} ) + miri? ( nightly ) + parallel-compiler? ( nightly ) + rust-analyzer? ( rust-src ) + test? ( ${ALL_LLVM_TARGETS[*]} ) + wasm? ( llvm_targets_WebAssembly ) + x86? ( cpu_flags_x86_sse2 ) +" + +# we don't use cmake.eclass, but can get a warning +CMAKE_WARN_UNUSED_CLI=no + +QA_FLAGS_IGNORED=" + usr/lib/${PN}/${PV}/bin/.* + usr/lib/${PN}/${PV}/libexec/.* + usr/lib/${PN}/${PV}/lib/lib.*.so + usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.* + usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so +" + +QA_SONAME=" + usr/lib/${PN}/${PV}/lib/lib.*.so.* + usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so +" + +QA_PRESTRIPPED=" + usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp + usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/self-contained/crtn.o +" + +# 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="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta" + +# causes double bootstrap +RESTRICT="test" + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/rust.asc + +PATCHES=( + "${FILESDIR}"/1.78.0-musl-dynamic-linking.patch + "${FILESDIR}"/1.83.0-cross-compile-libz.patch + #"${FILESDIR}"/1.72.0-bump-libc-deps-to-0.2.146.patch # pending refresh + "${FILESDIR}"/1.67.0-doc-wasm.patch +) + +clear_vendor_checksums() { + sed -i 's/\("files":{\)[^}]*/\1/' "vendor/${1}/.cargo-checksum.json" || die +} + +toml_usex() { + usex "${1}" true false +} + +pre_build_checks() { + local M=9216 + # 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 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 <ciso646> +#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 + if tc-is-cross-compiler; then + use system-llvm && die "USE=system-llvm not allowed when cross-compiling" + local cross_llvm_target="$(llvm_tuple_to_target "${CBUILD}")" + use "llvm_targets_${cross_llvm_target}" || \ + die "Must enable LLVM_TARGETS=${cross_llvm_target} matching CBUILD=${CBUILD} when cross-compiling" + fi + + rust_pkg_setup + + if use system-llvm; then + llvm-r1_pkg_setup + + local llvm_config="$(get_llvm_prefix)/bin/llvm-config" + export LLVM_LINK_SHARED=1 + export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)" + fi +} + +src_prepare() { + # Rust baselines to Pentium4 on x86, this patch lowers the baseline to i586 when sse2 is not set. + if use x86; then + if ! use cpu_flags_x86_sse2; then + eapply "${FILESDIR}/1.82.0-i586-baseline.patch" + #grep -rl cmd.args.push\(\"-march=i686\" . | xargs sed -i 's/march=i686/-march=i586/g' || die + fi + fi + + default +} + +src_configure() { + if tc-is-cross-compiler; then + export PKG_CONFIG_ALLOW_CROSS=1 + export PKG_CONFIG_PATH="${ESYSROOT}/usr/$(get_libdir)/pkgconfig" + export OPENSSL_INCLUDE_DIR="${ESYSROOT}/usr/include" + export OPENSSL_LIB_DIR="${ESYSROOT}/usr/$(get_libdir)" + fi + + filter-lto # 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/base/wasm.rs || die + fi + fi + rust_targets="${rust_targets#,}" + + # cargo and rustdoc are mandatory and should always be included + local tools='"cargo","rustdoc"' + use clippy && tools+=',"clippy"' + use miri && tools+=',"miri"' + use rustfmt && tools+=',"rustfmt"' + use rust-analyzer && tools+=',"rust-analyzer","rust-analyzer-proc-macro-srv"' + use rust-src && tools+=',"src"' + + local rust_stage0_root="$(${RUSTC} --print sysroot || die "Can't determine rust's sysroot")" + # 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)" + rust_build="$(rust_abi "${CBUILD}")" + rust_host="$(rust_abi "${CHOST}")" + + local cm_btype="$(usex debug DEBUG RELEASE)" + cat <<- _EOF_ > "${S}"/config.toml + [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) + enable-warnings = false + [llvm.build-config] + CMAKE_VERBOSE_MAKEFILE = "ON" + $(if ! tc-is-cross-compiler; then + # When cross-compiling, LLVM is compiled twice, once for host and + # once for target. Unfortunately, this build configuration applies + # to both, which means any flags applicable to one target but not + # the other will break. Conditionally disable respecting user + # flags when cross-compiling. + echo "CMAKE_C_FLAGS_${cm_btype} = \"${CFLAGS}\"" + echo "CMAKE_CXX_FLAGS_${cm_btype} = \"${CXXFLAGS}\"" + echo "CMAKE_EXE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\"" + echo "CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\"" + echo "CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = \"${LDFLAGS}\"" + echo "CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = \"${ARFLAGS}\"" + fi) + [build] + build-stage = 2 + test-stage = 2 + build = "${rust_build}" + host = ["${rust_host}"] + 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 = true + 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 + $(if ! tc-is-cross-compiler; then + echo "default-linker = \"$(tc-getCC)\"" + fi) + 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 + # See https://github.com/rust-lang/rust/issues/121124 + lto = "$(usex lto thin off)" + [dist] + src-tarball = false + compression-formats = ["xz"] + compression-profile = "balanced" + _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)/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 + musl-root = "$($(tc-getCC) -print-sysroot)/usr" + _EOF_ + fi + done + if use wasm; then + wasm_target="wasm32-unknown-unknown" + export CFLAGS_${wasm_target//-/_}="$(filter-flags '-mcpu*' '-march*' '-mtune*'; echo "$CFLAGS")" + 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/<target> + + # extra targets defined as a bash array + # spec format: <LLVM target>:<rust-target>:<CTARGET> + # 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 <LLVM target>:<rust-target>:<CTARGET> + local cross_llvm_target="${cross_target_spec%%:*}" + # extracts toolchain triples, <rust-target>:<CTARGET> + 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)/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 -vvv --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 + + docompress /usr/lib/${PN}/${PV}/share/man/ + + # 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 + + 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 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/<ver>/bin/rustc-<ver> + # 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}" + use rust-analyzer && 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-${PV}" + MANPATH="${EPREFIX}/usr/lib/rust/man-${PV}" + _EOF_ + + rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die + rm -rf "${ED}/usr/lib/${PN}/${PV}/bin"/*.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/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 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/lib/rust/libexec >> "${T}/provider-${P}" + echo /usr/bin/rust-analyzer >> "${T}/provider-${P}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${P}" + + if use dist; then + "${EPYTHON}" ./x.py dist -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die + insinto "/usr/lib/${PN}/${PV}/dist" + doins -r "${S}/build/dist/." + fi +} + +pkg_preinst() { + # 943308 and friends; basically --keep-going can forget to unmerge old rust + # but the soft blocker allows us to install conflicting files. + # This results in duplicated .{rlib,so} files which confuses rustc and results in + # the need for manual intervention. + if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then + # we need to find all .{rlib,so} files in the old rust lib directory + # and store them in an array for later use + readarray -d '' old_rust_libs < <( + find "${EROOT}/usr/lib/rust/${PV}/lib/rustlib" \ + -type f \( -name '*.rlib' -o -name '*.so' \) -print0) + export old_rust_libs + if [[ ${#old_rust_libs[@]} -gt 0 ]]; then + einfo "Found old .rlib and .so files in the old rust lib directory" + else + die "Found no old .rlib and .so files but old rust version is installed. Bailing!" + fi + fi +} + +pkg_postinst() { + + if has_version -b "dev-lang/rust:stable/$(ver_cut 1-2)"; then + # Be _extra_ careful here as we're removing files from the live filesystem + local f + for f in "${old_rust_libs[@]}"; do + [[ -f ${f} ]] || die "old_rust_libs array contains non-existent file" + local base_name="${f%-*}" + local ext="${f##*.}" + local matching_files=("${base_name}"-*.${ext}) + if [[ ${#matching_files[@]} -ne 2 ]]; then + die "Expected exactly two files matching ${base_name}-\*.rlib, but found ${#matching_files[@]}" + fi + einfo "Removing old .rlib file ${f}" + rm "${f}" || die + done + fi + + eselect rust update + + if has_version dev-debug/gdb || has_version dev-debug/lldb; then + elog "Rust installs helper scripts for calling GDB and LLDB," + elog "for convenience they are installed under /usr/bin/rust-{gdb,lldb}-${PV}." + fi + + if has_version app-editors/emacs; then + optfeature "emacs support for rust" app-emacs/rust-mode + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + optfeature "vim support for rust" app-vim/rust-vim + fi +} + +pkg_postrm() { + eselect rust cleanup +} |