From d4f65848c7ecabb56e2f93889cbd20078cd347f7 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 2 Dec 2024 02:07:07 +0000 Subject: gentoo auto-resync : 02:12:2024 - 02:07:07 --- dev-lang/Manifest.gz | Bin 22142 -> 22141 bytes dev-lang/bas/Manifest | 2 +- dev-lang/bas/bas-2.6-r1.ebuild | 2 +- dev-lang/f2c/Manifest | 2 +- dev-lang/f2c/f2c-20240312.ebuild | 2 +- dev-lang/icon/Manifest | 2 + dev-lang/icon/icon-9.5.24b.ebuild | 123 ++++ dev-lang/luau/Manifest | 2 + dev-lang/luau/luau-0.653.ebuild | 57 ++ dev-lang/oorexx/Manifest | 2 +- dev-lang/oorexx/oorexx-5.0.0.ebuild | 2 +- dev-lang/pypy/Manifest | 2 + dev-lang/pypy/pypy-3.10.7.3.17_p3.ebuild | 238 +++++++ dev-lang/rust-bin/Manifest | 30 + dev-lang/rust-bin/rust-bin-1.83.0.ebuild | 253 +++++++ dev-lang/rust-common/Manifest | 3 + dev-lang/rust-common/rust-common-1.83.0.ebuild | 58 ++ dev-lang/rust/Manifest | 4 + .../rust/files/1.83.0-cross-compile-libz.patch | 21 + dev-lang/rust/rust-1.83.0.ebuild | 728 +++++++++++++++++++++ 20 files changed, 1527 insertions(+), 6 deletions(-) create mode 100644 dev-lang/icon/icon-9.5.24b.ebuild create mode 100644 dev-lang/luau/luau-0.653.ebuild create mode 100644 dev-lang/pypy/pypy-3.10.7.3.17_p3.ebuild create mode 100644 dev-lang/rust-bin/rust-bin-1.83.0.ebuild create mode 100644 dev-lang/rust-common/rust-common-1.83.0.ebuild create mode 100644 dev-lang/rust/files/1.83.0-cross-compile-libz.patch create mode 100644 dev-lang/rust/rust-1.83.0.ebuild (limited to 'dev-lang') diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz index cd5c7c3a364c..37cbdbfe386d 100644 Binary files a/dev-lang/Manifest.gz and b/dev-lang/Manifest.gz differ 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? ( + ! 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=$(/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-/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-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 +#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/ + + # 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)/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//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}" + 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 +} -- cgit v1.2.3