diff options
Diffstat (limited to 'dev-lang')
24 files changed, 1098 insertions, 77 deletions
diff --git a/dev-lang/Manifest.gz b/dev-lang/Manifest.gz Binary files differindex 0270dd898904..403ac3aa6366 100644 --- a/dev-lang/Manifest.gz +++ b/dev-lang/Manifest.gz diff --git a/dev-lang/inform/Manifest b/dev-lang/inform/Manifest index 48e8d30712ef..ccb97fc11e88 100644 --- a/dev-lang/inform/Manifest +++ b/dev-lang/inform/Manifest @@ -1,3 +1,5 @@ DIST inform-6.33.1-b2.tar.gz 1822648 BLAKE2B e2ea59aa310b2f0122d1b834d98b0b827b945a8031a3e61c70bf502f7a746f43b81035cc22805ab351abf6f9df9ba898ea6ea83da863ef9aa313840ed974d725 SHA512 12cc10b7dae4118600a4d19d0aa44c3a7c93dfc8aa17bd56df7b9237f21df0ae99db6840eefaa5b11ff346369c6f6f2f128167b3479c8f540c29e3e36666c368 -EBUILD inform-6.33.1_p2.ebuild 716 BLAKE2B 8dacc53e6cc8aca22ee5d4aae28d1870163acdc4267d22e6bfe6041a4885fdfda39e083a16dcf662da24a335a9a876a9c5c68cdc5d7eeb77d40dc97cd8a648c3 SHA512 1da71e2e8498c3e89c7764c4f5c7d6ac11ff4220f907bf51ffb89ed839b530889c90f97dede5871afb63b03a491df534f0e35eddaad7a4fd4e6dcea9dbb31640 -MISC metadata.xml 2555 BLAKE2B be44edd87ba20e7b4ed8c20f6844f15b327e4f11d36794562501df85bf98b24298d336ae42fc8e7314d19cde4825f59acc8c233e3b582fb6043d53e4c47e1bea SHA512 726f266399f5a374970a22cb6ad34173304e6c20ba60880b5bd083145e0cff58c64107f1bcf71ac0faf2e0d8ad849ff450f44eb6318fd4ea8d061fabae320492 +DIST inform-6.35-r4.tar.gz 2307089 BLAKE2B 9864324fe29fe920e226a239f92f327678ed796e5f5a27b3814f62b1158673b2c14d6771abd7af6f9743bb0949c4c6de75a6b591337b0e99196f8ab4d9f0c9f7 SHA512 c30c7067786845e0c77783f7a03a151ae1238978f648f6036fe9535a33662c76abc11db21bab00fe60c4742cd4da46e4674081711b9b3852520bfb14c1b068a6 +EBUILD inform-6.33.1_p2.ebuild 738 BLAKE2B 57cd9f597bd7c18bd38ec46186f30fcda437c77bd79f450c4cf76d6e62008ac2a0036e84e3eead371cd13f162a1f8924be6de884b59c4a57813c408907e1acc0 SHA512 54f5d0e522bdaa0cb2269e87842e1eb0bf72f8d4e8c20d5fd250aeac62d35567cd604009dad8593c416c5c0389774f0939b53b9cc70cd75ae74d2b94a5192be0 +EBUILD inform-6.35_p4.ebuild 1230 BLAKE2B 20a7adedbbdac392607fb623304a9a7b438cbf4d3608e73f62b949c7924b167be7705a2f784540dbf226ec62548c5fc68dcf6cc2f7412d1de3f7bbe6ac099298 SHA512 b9abe2a03a75b1546a422208b659a5d630414edd864a8748de81f58e41c7f2eb31dfec4ba9bce1edc1376275721e72a6c96f84fa0d6fb3f81d4294d2c98fb5c1 +MISC metadata.xml 435 BLAKE2B 2f4a52609bb35b017249a38e5ef83642a9e6e70eb7fdb2cfdf329f3761c1c580d165d328012293f0fa4480b3004bd44a35209e39ad669fe024c6386eed2ab5e1 SHA512 cd8065b1a6a8206f19fd3f3ce6f99c4900eae4201a3f18c4bdf17d45a167704a4f005553d084cb4e6d310f5999c48f05ebcc86e019f835a2068c8000fe56c11f diff --git a/dev-lang/inform/inform-6.33.1_p2.ebuild b/dev-lang/inform/inform-6.33.1_p2.ebuild index 939c464d7591..f07551c95d98 100644 --- a/dev-lang/inform/inform-6.33.1_p2.ebuild +++ b/dev-lang/inform/inform-6.33.1_p2.ebuild @@ -1,25 +1,31 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 -MY_P=${P/_p/-b} -DESCRIPTION="design system for interactive fiction" -HOMEPAGE="http://www.inform-fiction.org/" -SRC_URI="http://mirror.ifarchive.org/if-archive/infocom/compilers/inform6/source/${MY_P}.tar.gz" +EAPI=8 + +MY_P="${P/_p/-b}" + +DESCRIPTION="Design system for interactive fiction" +HOMEPAGE="https://www.inform-fiction.org/" +SRC_URI="mirror://gentoo/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" LICENSE="Artistic-2 Inform" SLOT="0" KEYWORDS="amd64 ~ppc ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos" IUSE="emacs" -PDEPEND="emacs? ( app-emacs/inform-mode )" -S=${WORKDIR}/${MY_P} +PDEPEND="emacs? ( app-emacs/inform-mode )" src_install() { default + dodoc VERSION + docinto tutorial dodoc tutor/README tutor/*.inf - mv "${ED}"/usr/share/${PN}/manual "${ED}"/usr/share/doc/${PF}/html - rmdir "${ED}"/usr/share/inform/{include,module} + + mv "${ED}"/usr/share/{${PN}/manual,doc/${PF}/html} || die + rmdir "${ED}"/usr/share/inform/{include,module} || die + rm "${ED}"/usr/share/inform/6.33b2/include/SmartCantGo.h || die #723062 } diff --git a/dev-lang/inform/inform-6.35_p4.ebuild b/dev-lang/inform/inform-6.35_p4.ebuild new file mode 100644 index 000000000000..3b193b357e92 --- /dev/null +++ b/dev-lang/inform/inform-6.35_p4.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MY_P="${P/_p/-r}" + +DESCRIPTION="Design system for interactive fiction" +HOMEPAGE="https://www.inform-fiction.org/" +SRC_URI="https://ifarchive.org/if-archive/infocom/compilers/inform6/source/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" + +LICENSE="Artistic-2 Inform" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="emacs tools" +# non-interactive tests use ruby, seem broken, and return true even on failure +RESTRICT="test" + +RDEPEND=" + tools? ( + dev-lang/perl + dev-perl/DateTime + )" +PDEPEND="emacs? ( app-emacs/inform-mode )" + +src_compile() { + tc-export CC + + emake PREFIX="${EPREFIX}"/usr OPTS="${CFLAGS} ${CPPFLAGS}" +} + +src_install() { + local emakeargs=( + PREFIX="${ED}"/usr + REAL_PREFIX="${EPREFIX}"/usr + MANDIR="${ED}"/usr/share/man/man1 + PUNYDOCS="${ED}"/usr/share/doc/${PF}/punyinform + PUNYTESTS="${T}" # don't install tests + ) + + emake -j1 "${emakeargs[@]}" install + + dodoc AUTHORS NEWS README.md VERSION docs/README* + + use tools || rm "${ED}"/usr/bin/*blorb* || die + + find "${ED}"/usr/share/doc \( -name Makefile -o -name 'custom.*' \) -delete || die +} diff --git a/dev-lang/inform/metadata.xml b/dev-lang/inform/metadata.xml index 2396a6450fa3..20f18c5cfb1b 100644 --- a/dev-lang/inform/metadata.xml +++ b/dev-lang/inform/metadata.xml @@ -1,44 +1,14 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer type="project"> - <email>games@gentoo.org</email> - <name>Gentoo Games Project</name> - </maintainer> - <longdescription> -A Design System for Interactive Fiction - -Just as film might be called a form of literature which needs technology to be -read (a cinema projector or a television set) and to be written (a camera), -interactive fiction is read with the aid of a computer. On this analogy, Inform -is a piece of software enabling any modern computer to be used as the camera, or -the film studio, to create works of interactive fiction. To read the resulting -works, you and your audience need only a simpler piece of software called an -interpreter. - -In this genre of fiction, the computer describes a world and the player types -instructions like touch the mirror for the protagonist character to follow; the -computer responds by describing the result, and so on until a story is told. - -Interactive fiction emerged from the old-style "adventure game" (c.1975) and -tends to be a playful genre, which must sometimes be teased out as though it were -a cryptic crossword puzzle. But this doesn't prevent it from being an artistic -medium, which has attracted (for instance) the former U.S. Poet Laureate, Robert -Pinsky, and the novelists Thomas M. Disch and Michael Crichton. An interactive -fiction is not a child's puzzle-book, with a maze on one page and a rebus on the -next, but nor is it a novel. Neither pure interaction nor pure fiction, it lies -in a strange and still largely unexplored land in between. - -Since its invention (by Graham Nelson in 1993), Inform has been used to design -some hundreds of works of interactive fiction, in eight languages, reviewed in -periodicals ranging in specialisation from XYZZYnews to The New York Times. It -accounts for around ten thousand postings per year to Internet newsgroups. -Commercially, Inform has been used as a multimedia games prototyping tool. -Academically, it has turned up in syllabuses and seminars from computer science -to theoretical architecture, and appears in books such as Cybertext: Perspectives -on Ergodic Literature (E. J. Aarseth, Johns Hopkins Press, 1997). Having started -as a revival of the then-disused Infocom adventure game format, the Z-Machine, -Inform came full circle when it produced Infocom's only text game of the 1990s: -Zork: The Undiscovered Underground, by Mike Berlyn and Marc Blank. - </longdescription> + <maintainer type="project"> + <email>games@gentoo.org</email> + <name>Gentoo Games Project</name> + </maintainer> + <use> + <flag name="tools">Install blorbtools for manipulating Blorb files</flag> + </use> + <upstream> + <remote-id type="gitlab">DavidGriffith/inform6unix</remote-id> + </upstream> </pkgmetadata> diff --git a/dev-lang/ispc/Manifest b/dev-lang/ispc/Manifest index f3b1e92dd041..84a159bbf9f4 100644 --- a/dev-lang/ispc/Manifest +++ b/dev-lang/ispc/Manifest @@ -1,7 +1,7 @@ AUX ispc-9999-llvm.patch 1410 BLAKE2B 77027da9032fa230c72d8608c2a6cd63c33601e17acab0260101c64dbb50a0aa3cc30702c4480ae5d63e95ec3e962e28bdbbd90cd72f4e91d30dc364b82367b6 SHA512 116078d5ab99c849584cc4ece8dc3ebc817221a2377e26083071e206b5e83c4f3ed594f84b86c9659ef86a497bd3cd058ee32138238e12e6aa9dac0f11cf1440 DIST ispc-1.16.0.tar.gz 19548153 BLAKE2B 9b6d9329430d59041a76c20332b527560afa47a5585652abdf93aedb7907483d1647c829f2bd3f396cd53301bc79367cd91606b90a543fa8bec2f6ab34452989 SHA512 8469db4e3e9834477345b431162543f1c8e680aa9834c9a50239781dc7febfdde0561c2f13d1387e37f95a18c4376a85cb9cbae33cb614dc8977dfc9f47da215 DIST ispc-1.16.1.tar.gz 19549428 BLAKE2B 742d94208d39f0560c3f2199ee06fc12f3ec2cf47c1039212219c6aa106b20cd58219e5d439c4fd1ce4a0c1a423655d0c2113a2a78152c99b4d77452171acce6 SHA512 89b844a15a888ae7074c4baa47f46d1d7176501f215c9a8c3b4bf9ad1960dc77d53f1f448d5253ad0c6a91e5088af243c3dfd148e619f9abeb6a16f715e3b463 -EBUILD ispc-1.16.0.ebuild 1641 BLAKE2B b4e6feb2095d03e34d62130d70c97ee0179236f78640ed6f027702af41a88f56f9da9cb5a27d005b19b7d9e4cf930774e0ee2df8b313f1be03490f439d869c0f SHA512 8c05ec02c0e8b153674b0cd923c2bd10058c28d52a0c562bcc8fba081fdaf4ed6d3d07c557261d0e0696d0ef00faa047000a66cb9e9c87993b0a7cc203882fb0 +EBUILD ispc-1.16.0.ebuild 1640 BLAKE2B 9ce0305eed03e7746df300fccfa0b34b64dbc332c6994ec001d0e37d8cf62440762b5063e5191f119d5f431b6012770c3bd646c7cb29f20be33b4bb2209d8bda SHA512 c493d3bd8577b7cd880b56e291c03252a7a2d0fffff7dec604b902d4ffbd71a515e35117247d71d5e789c1a5134d6e877bd85b5f923d2b99e0f3027301a5b721 EBUILD ispc-1.16.1.ebuild 1648 BLAKE2B fe5e36cf7555a0dfcaccc9a64434cf8691bbdd5bfdd0db25bc9ae954ac78ccdf292e233a150bbe91febeed6f7dc9efb5546b67d544742adf3b64487c6872cc51 SHA512 c5dd01950694517b53b392da60492ec82e762c6f3e6abe1e3844bf3d8b97064759fb56095299a99ec12b0b6e4a080a34ab0dffe2b21ad909906da2e83363fd1f EBUILD ispc-9999.ebuild 1648 BLAKE2B fe5e36cf7555a0dfcaccc9a64434cf8691bbdd5bfdd0db25bc9ae954ac78ccdf292e233a150bbe91febeed6f7dc9efb5546b67d544742adf3b64487c6872cc51 SHA512 c5dd01950694517b53b392da60492ec82e762c6f3e6abe1e3844bf3d8b97064759fb56095299a99ec12b0b6e4a080a34ab0dffe2b21ad909906da2e83363fd1f MISC metadata.xml 242 BLAKE2B ec655bbb26e5d545a7b25a9906e315b54a18cca56613207ce76c9e002fb8968e269627e75639053d7da3c46d8ba34296129458adcad9a561414628e8957d2d9e SHA512 7702a5b2bfe0d81904e069fa097af3c739a21ffad9b03cf9931e398dc904d10501854cc2605fb34415f3f13e58a990b7ff8c3aa803f981889c53b25cc23c6115 diff --git a/dev-lang/ispc/ispc-1.16.0.ebuild b/dev-lang/ispc/ispc-1.16.0.ebuild index a7fa960167b9..7ea24fc9ecc2 100644 --- a/dev-lang/ispc/ispc-1.16.0.ebuild +++ b/dev-lang/ispc/ispc-1.16.0.ebuild @@ -17,7 +17,7 @@ if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/ispc/ispc.git" else SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" + KEYWORDS="amd64 ~arm ~arm64 ~ppc64 ~x86" fi LICENSE="BSD BSD-2 UoI-NCSA" diff --git a/dev-lang/rust-bin/Manifest b/dev-lang/rust-bin/Manifest index e78488c37c6d..7703598714cd 100644 --- a/dev-lang/rust-bin/Manifest +++ b/dev-lang/rust-bin/Manifest @@ -158,9 +158,42 @@ DIST rust-1.56.0-x86_64-unknown-linux-gnu.tar.xz 147894784 BLAKE2B 6cbdb8a82aba4 DIST rust-1.56.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B e0ed39db46b40631f69fa379a04ec37ba314587a4f081aa1f3251e01b7221ee8732b668cfcc4c24c1a3950f3f8dcfd542a1a73c603cea545b812d5d3a9527055 SHA512 3e9d0b159684a496e29c9e40af11f16f5ef5cadd8bc4852018a953310e77a4e29db6c14ffcc86198908aa4998550c83cfd3f2cc42e007122d56167d664776c44 DIST rust-1.56.0-x86_64-unknown-linux-musl.tar.xz 255010720 BLAKE2B 286e91cbf001de6f888bd82139e6711b32f03d45c599f26b01f60222d98c3521a1933b3b9b7f8c46fa79d481780dc8dc47e5e24985b721a6998d620b446c38b4 SHA512 fb5a914a25ef3cb39393207a75c40f1313740167062feb4cda4084e738f4e93a51624a8a9591acc18553cfd6e2e232984c8c84acc3dfd77fbe38b17085850881 DIST rust-1.56.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B bb7cfc775c1c44569276e687028e9a7ffac31577310052d9c354179a541ee13b0ca00a025e994e03ab17086d0abe6dda6845ed1cb10879425439c7651bdc9269 SHA512 cb23d98cfb1b59fcccaec575145b6f38846f3f49b16a3be199b06d6198b1db13720157ca65a01f6ef76abf742507bba39776d130f0fd03aa228acf5917457f7d -EBUILD rust-bin-1.52.1.ebuild 5378 BLAKE2B 88912dbecd970882f4a6acdc66f4058b2eca20541b77bf98f799354dc3c4e6c1606592e57bac4c05eb5aa44901b4bbd14577bcb3ded25db730bdcdf6d4eca5f6 SHA512 4d2f865a1431b13fe40d40eac7b8bdff6e3da4af094d2fa125369bc864bc6d9669cacf94401e33703284ff8b955818283f659157176a1283fa299555f0a30f34 -EBUILD rust-bin-1.53.0.ebuild 5378 BLAKE2B 88912dbecd970882f4a6acdc66f4058b2eca20541b77bf98f799354dc3c4e6c1606592e57bac4c05eb5aa44901b4bbd14577bcb3ded25db730bdcdf6d4eca5f6 SHA512 4d2f865a1431b13fe40d40eac7b8bdff6e3da4af094d2fa125369bc864bc6d9669cacf94401e33703284ff8b955818283f659157176a1283fa299555f0a30f34 -EBUILD rust-bin-1.54.0.ebuild 5383 BLAKE2B 7c271e76a052a77c4bbdb72969f33be124c3f5a028e70e3797ef2895e50f5b5a4725deac92f7c3fad64c8fbf1be1d9a1b61e91db4d25453de69abab6980a3cb7 SHA512 147596f07d55953ed795ab2e6b6162505a3cac65526e0acc08db1f37094df9471519e143a709e5a410790b17288b24e9d16ab916855891b15b8cb24af9edeb0d -EBUILD rust-bin-1.55.0.ebuild 5383 BLAKE2B 7c271e76a052a77c4bbdb72969f33be124c3f5a028e70e3797ef2895e50f5b5a4725deac92f7c3fad64c8fbf1be1d9a1b61e91db4d25453de69abab6980a3cb7 SHA512 147596f07d55953ed795ab2e6b6162505a3cac65526e0acc08db1f37094df9471519e143a709e5a410790b17288b24e9d16ab916855891b15b8cb24af9edeb0d -EBUILD rust-bin-1.56.0.ebuild 5383 BLAKE2B 7c271e76a052a77c4bbdb72969f33be124c3f5a028e70e3797ef2895e50f5b5a4725deac92f7c3fad64c8fbf1be1d9a1b61e91db4d25453de69abab6980a3cb7 SHA512 147596f07d55953ed795ab2e6b6162505a3cac65526e0acc08db1f37094df9471519e143a709e5a410790b17288b24e9d16ab916855891b15b8cb24af9edeb0d +DIST rust-1.56.1-aarch64-unknown-linux-gnu.tar.xz 223440940 BLAKE2B 9b4256943c4f5c8be83a81bbeb5f61d80b97c9925a2a2a47d8952530253f0e3e85363357a3cef9c425217a8b9572d4f55df3839640a24bf5b1e3c1dc8323f2b0 SHA512 1e612617206f0cb49ddc24352b8c8d344ac4613a71c59532e8df78189fd2ff13d71e4b1fa433e06e4af9b50292558b00f2118ffb8efff31359c28ac2fd5f5044 +DIST rust-1.56.1-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 008a4eebe92b3403f863ab7bbb023292d267c6084513104ed1d6f401a806abbe3c97a4346d2b01c2c78ea0efd44292fe563f5a7cde959e23b309f492d388d04f SHA512 09180d201ed196105651d7fbe009df96a333ef2326309428db0b10b2c7e0a8fd3e013a63b287e27e7a04441f70cd5ff8abb8a32ac109495d9c4aa4f80ba777f3 +DIST rust-1.56.1-aarch64-unknown-linux-musl.tar.xz 220094692 BLAKE2B b70936cfe4af636cee40bac700f043b1839bdd6f547eb3e9c781b51fb6ab426dded80ecd0c347a9c13d6930041a674f6b53a335a1be538d801eeebee0d98b3fd SHA512 ad9e0725bf570e04f5f439b231480b26a1cbd75eb770397ce2872895ff5705a5025eca06bfe6a60247b7071b0bc810bebe30f2ff99a68a252452e058c72d535e +DIST rust-1.56.1-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 8cf6a20edb6f4f53f6169f63031b259d02491a494c3110aecc791d80bc90aa9a7d90987e789946680b7ecac1bcf7f0a29c6208af5e29ac971c55a017252d99e2 SHA512 d4d4b04ea3c0f2c435186098b7889da008fbcf6205aff8e10d3b1c64e72aaa49520a9d781e9fc01c064d5bea471bb67af3a64e510ba4406151a52fdaa3640e77 +DIST rust-1.56.1-arm-unknown-linux-gnueabi.tar.xz 202697992 BLAKE2B e4f4e68792699aa5a52e53414529309aef309533c3955a38a1de6a32ba13e8f4742693c7ca9ad0c1609a8e827200a8abc23c706d8dab302e9ce67ba493b81fa5 SHA512 afef90ce4e438e1383025642541bc2cdb383f1716b51484ad8a0ec7df4ce0dd635362b892bd009bb389b537d4d56ff876fbc1544af52c8d26d7e39842ab8b99b +DIST rust-1.56.1-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 19808e687f5c24f7a4d63441fecfb80a2eed5c7cac448a34b2e049a6bf8656b9a145656066cb381ba0ba163a191c1a6fe99389fa0bb9e6937ef31f1514b8f0ae SHA512 7dc83b332ffe654ea811b4e0a8280cae7cac997592b8011a014ce8c13e33696e4a08fe062dad1e95b6577d41680281394b0d7757376a9fe7c91b6648b27673a5 +DIST rust-1.56.1-arm-unknown-linux-gnueabihf.tar.xz 199832312 BLAKE2B 547f24f17e99b365855d52fc4eeec60d268b1fd039a551266328d553b8a5f4159c7fa466b2eadd340a4e66bd184fecbef5422a9168bbbf51f256c84273f9b6cc SHA512 2c498d84fd6ac68f11e7751c6bf4ed694b53ba1605b7c77a9d25f0d443443268bdbc9f1cb68bf19af0b22c928c4f3e261baa2c7ed360561820cb4926a5e9d88b +DIST rust-1.56.1-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B ecd6e8641f899f3f3a05d7a9b8cdab820d0cc7f7a03cb37df9302d6f40cd4f1cafa4b78b0341289bfe798c8cb4778c471337563a5248e2e369dfb5cf82d1a57c SHA512 1848a554df193a2ac799fe021fef0f5ccd7288576b7370bb11202595c1706cfad30debccea90bc8678e83ab5050671e99de7b6bae2581935f669718f2dfebb60 +DIST rust-1.56.1-armv7-unknown-linux-gnueabihf.tar.xz 205164704 BLAKE2B fb2b1c21561e35898a70a590dcf917f38eb0771c2902fa8e58d6e2a5c634ade52c893027ea22f00be350c249ab5336135ac462bd3495c9722b17576f0e39b7f9 SHA512 fd890ad58a346896a282b78b5138523c0ac06d177f9ec7c6df5262f24e9226be0e0f7a5d67d93d989e73c9380c0292fb7b3c977627cb5b57f48c8621a9b1444a +DIST rust-1.56.1-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B 810674d02b026ac9a768ed1bae893c62d25311c3316eae6a97e9b885b55a896acc286c1f039af040ebad8de80795eb3c8a2e476fc71e11485340240361b74800 SHA512 e1a0f9b8e22725634e96c42fe8e6f950836baf077ea578f099120c9eb77b8e075f6317df730849f3577d320253ce90b15a4a5803c47b33c340b104533f66aa76 +DIST rust-1.56.1-i686-unknown-linux-gnu.tar.xz 215749044 BLAKE2B 5aa6b03f77ba632ac43d972d70e40c4f81e40607ad691f789829ca307acb167e164978a11aade4e89a7b2a4ebaf76833c9f59de9c2b7f7387a3a726fd62da638 SHA512 56e9fa266c0cb668695c202c80b768aba9443b8e594530a3fbdef9ddaff6a37251eca5de584423b51fbee9f0b7712e5de59f6cd0892da4ed036fef5b9e74f27c +DIST rust-1.56.1-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 4b16a978a6b8a10fd23a280351f37bee1bba23f437e613d2059a3c735ee472700a82fab973c2570f36eab730d000c27c0356ffd68a1784cc3dacf3366b211916 SHA512 b702a4f8953867b205f872ca8c886ad6e45a0794a955c878f18fe087d6d3d181221fa44e87e6f9913a683139707ade2f084558ade7475438f3c2a25be009a715 +DIST rust-1.56.1-mips-unknown-linux-gnu.tar.xz 160905644 BLAKE2B 28fe08b7b80666d36c9f31f885778b3710a443ba2ca2b42d26ccb8172c6035e75badb49e0947f728648d68f1b10620088178568c5b9c847eb57e60233f3a91a8 SHA512 d805115ca963035bbefa619b20c756159983653746d1e7b6f239a9ea694fcc5fef39dda362c138a2951c739be8e3dc1c982a5317d646c332be9203408f80b43c +DIST rust-1.56.1-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B d9a6aa5a05dd6266007c779a16bdae01c23f34433e3e53e5937f67e0905bd59f67ee9d986a53f22d88e8f1a3eb5cf627314b5f1e504d55163f2bf18f206d8455 SHA512 3e32d3b95fbc95b41eee9bb95946f94336ad6edde58c2eba1a89674beaa544c00fb1de3ccfd7336109bae2b20ae590691062eeba198ed5ff0272db4a073aed55 +DIST rust-1.56.1-mips64-unknown-linux-gnuabi64.tar.xz 165745828 BLAKE2B c79f54e19d2cf8fe06ee796787880ef1946f737174a18e9b0ddd1b5b8770421c6d0339bc18970abc1c0cb18055c3ef78ff2fda51083175d875f38664a2a467c2 SHA512 be7c3d341f0217015ccb4c0221feec6612e10bac826e3b0d35c1a6cb09499ef1fe7ee1b44e131e91ae569a4b6ac02f533b7ee4f3b0a4c048c2a02f95d1f68797 +DIST rust-1.56.1-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B 97ea8d84db8d68d821d2bfec3bac1fff1e30554447bf5e9e5e1e27efce095b26ea5df8dc41087edccfbd2a57a58aa225423a597ee04c15c49fa8f74d59faf022 SHA512 91acab66759833b31d46f757d6d482dff3fc85b305a682aa8bcaecfbd0072df3cb4b0544b32c52ef79a6ed1096997172ecf35bc07e1ae6ff207b60f8ff6933d4 +DIST rust-1.56.1-mipsel-unknown-linux-gnu.tar.xz 165019404 BLAKE2B f452b04048250ad9e4bdd5797b4c0d0c45cc2e8be72b25b1e5b8421d8b6e240ed05e5573569dd0aea450ccc2fae6cb463814e7795af50477cdda86db807a19b1 SHA512 6b4ea1b864ce57d7796c1c268fff23184cf669de47f5b54775bff3062d7862f4a7d98f5ff84387b76b10088c36eda15a4073847687305b5e290c18ed47d2e11f +DIST rust-1.56.1-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 07c3a01b9daadc6ea952ec3a7110ee1a3c4dfddd69cd9e5339165f76c91902d634908ec0beb0dc0fb5bdfe42406901d0039f28861f6662a18555e289e8aab05d SHA512 b09a18fc1e4e2fe181895e41e62896bfcffc2ce46a03204455f9b7beb19771af4e79000d16ef07f7fa4a06eb018dbaf3d8b8b1385a4dfaa147ad2b693efe1334 +DIST rust-1.56.1-powerpc-unknown-linux-gnu.tar.xz 174988436 BLAKE2B b1adae448adff47283b0761c9923d78dd6cf2aa608e9f53f9e156f41cdf5c29358236222c65e3d6202f98a08c2199e9f3ea7cd5838c259f8ff07b0ea276aa408 SHA512 680e0a4e5b3cda2ea89c4ab35a2fcf6210f2b829f284090ba5c793d9e76cb58f7cf6f60dcfcf1e26eba836690fa48be40b902a4f3599446be7be98b57d8ea20b +DIST rust-1.56.1-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 10f35bc23dd39a1e3f924e472ad0a0dfff4b30060c5b41868688541a80da7d47c5ea3a16684fe980fb83e8c72b6b6ca7d6f7c349d9c869f8300f042be2cc8e4a SHA512 765f0f9ef47568b8bba751b788ff9baa837c7d5e25da52e18b99ae6cb613ce19a725b7fdd6d6adaada18c24fdb308f73b18ad13b6abeaf34be91748fe78173b6 +DIST rust-1.56.1-powerpc64-unknown-linux-gnu.tar.xz 186458276 BLAKE2B 3510ca7e2356f2101dc8e6a22de2d68fe48d4c1892e26b23eab18d7f0f1218499e41d325be267fb0284369567243c7e2fae9bb1ba62035fea1ad1c8ee1d57cba SHA512 34db35c1543239a4641eba4ee7d5435ac5383863fce843163ce1fa22c7aeb48199a696ccac199719d308eacd9c626922cf50a918869ae88cc2ae63dd0de9f5b5 +DIST rust-1.56.1-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5755d15be9df74576abf0ec4db1ead6a7bf3069d8ce2edcb834da971ad0dadc0a41fecddecbf06b653b4ca71dbb799bd7a02126a00c294c0f0c2b9fb76fc69ab SHA512 27a57ad6aade3ba6453f3e98b8c456bea61ce9ccc6d8682721edad3b7747f2aac8dba87c419db2c5e049e005e3ccc708cc9a5f1d84e6a7daf6d90ec2d39c7bc5 +DIST rust-1.56.1-powerpc64le-unknown-linux-gnu.tar.xz 196128248 BLAKE2B 7e5e5cb32496f2aa5f2dfbca37c53db92741ab7e56ee42c092046a96effead9819c906d22552159ddee9d7fbc4cf98b6e02aa53d39a3e58bc28a145304bb80d5 SHA512 603e9232879e5b9f79f91807f64e088cf657449bd8884c37218585d78c8b6e1919ac8f0aa7b6d38cbe844a89f837170a1bb8e0b4062c8b4aa9cca457eff89bdf +DIST rust-1.56.1-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7e0822d38d7a6de478441c97d0f0d7506a750cb2bbe8c80f3bd210e74c2b2a0523b417c6b3070ec1f0131e0b9375f7a10a1b97588aaf8a1a73dc4ba110237c2f SHA512 cc5eca73c067b0802081c2469857d85a2853a1dd7a42a604400c150e91df1a0baae0a4a612f9a3e11fdc5de745598ae160f1606787ef251186db9b1f121cac3d +DIST rust-1.56.1-riscv64gc-unknown-linux-gnu.tar.xz 192592824 BLAKE2B 77d786d652978b7a6c93c290b5be49e69986858eb388e8325e40b7bdf5659b4e8bdaeef1b2654955ca0a4cb66fab83a788db2299fda9938a281ff534dd901191 SHA512 7d2431b173b48f8411a7e10d4c3b8880ded7330b14709d847f50b0b974f2cc261c942d729b663b86f2b4b637dd7c30f6d10976da037d0d4215c798407d418efe +DIST rust-1.56.1-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 210d69dc7c7cfba3ca4ecc8070e2ab193ce6abfe927779f3a55fe30b6cd6c588a2e4c8c18dcfa2014830c087fe97896fb1907b2a639c953cb6056d49107e34a9 SHA512 774f917e1145db0c9164d97937d486916334ccfb8dcb6bf859cfb49585f82e34185e755a105b7b811e74e6a3d629e3343d7620094b1d6aa43428525508368871 +DIST rust-1.56.1-s390x-unknown-linux-gnu.tar.xz 194367060 BLAKE2B 33820048a10e83754b09bb8c99ac876fd9dd7a36377dfc6802b906b1fab4669a711d1ac4e2b59e8cba3ae0ad3cd96d10fb00cb1324e8cd2ebde5d0805a58861a SHA512 aa0231187d3f096bfb223707e08262ff79f1b6fb9969814fc2385d3a134efc456bb43030723e614163ff27e6d6a779d27b77ad7ed05c80ab24b22fd10f9bc183 +DIST rust-1.56.1-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c3c5e9678c61a1ec80aca4620d13bbe2164bb648895d25c90e61ac4a2b31c059445cb851417fa3477906cb5ea52c2318f6b6974916d59a3ab41444d419edbb64 SHA512 a5372dd48b9b65a9c4aa74dfe6f5294b1fe12149d6fdc15a6b23b132c8b05d634211dd9a4be3a916aecc7bfbc6710ea1116681876d547ecc4c1de6958fd6f26e +DIST rust-1.56.1-x86_64-unknown-linux-gnu.tar.xz 147853396 BLAKE2B 1d1318c9f076f1488d94eb345f01b511ed956b29511fa64706603aa141a18b1a937459b95f1354507a31ef8dc795ebff06f0006431088792e629a0534b9beabf SHA512 129c619c3a27b6be903b953efa033731b29436cf83c5229ad1137d2d26571379e5d6e2b3a5704e3002547560e47ae1fa7b6c98990bd2ea482299ad94099bb4b0 +DIST rust-1.56.1-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ff984dfa092ff3c1c5a3d1a5849b8dc5807c5885dff5eca020d0b1c404484197adb8e1ea5802886b15e2b8846d0f3aa4bb161e49dc39adc151ca7d57a988ff24 SHA512 53b57ceaf621248fff020de75434c8fe60657335852c88d14ea399c7935206caaff61ce159cb2f487510336981aa1d839b91153b9764ea21ced1fb6455a16bdd +DIST rust-1.56.1-x86_64-unknown-linux-musl.tar.xz 255304020 BLAKE2B c379fb419b6fa1c73b9c426a4f6e46328ce2ac1beddffb1ed25922b3387147eaf0217d3904ccc14ce2b97952f1035760264ae5fc7a575f92bea84d9581d8b315 SHA512 b26d4b9f6396be87aadfbb4777d91c80cfe656570e2bf1a0350788ca45caa7178d4b91966e77c8cc4873e017fd99649ae6a82abad64b32a4eb1f5dfb3a20d45e +DIST rust-1.56.1-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B aed2703ef8cdcdf076d6538fb968f465c0a884b4c11916470324116e56a5b93fd7118b8b167ab19007ac71201044789f58de3a7ee1b60dffc47c3d123db1b4a5 SHA512 32c042982da7bde6c36bcb33fd3d9ebcb469667c880214b703e7b2cf89467e7e2bf37282cbc128d0207b9e433b7f2bd028e0d2614b657b544a552aa401bc98c8 +EBUILD rust-bin-1.52.1.ebuild 5664 BLAKE2B 16e4c51664da8266a87e0c562d1e556de386d19ad757f52258d1304253ef2afe0ceb59fcac0e91a663b6c38a0f4d7488e58828a957a89460f4a352323287ecdf SHA512 5b4b3da47378dd9369af0f19caea74d932036ece72fed8b602668584db0c0801a78ef65a98f8d9fa9feace9b040fbb86943f9d2fde2d20f74de13226f31e69c4 +EBUILD rust-bin-1.53.0.ebuild 5664 BLAKE2B 16e4c51664da8266a87e0c562d1e556de386d19ad757f52258d1304253ef2afe0ceb59fcac0e91a663b6c38a0f4d7488e58828a957a89460f4a352323287ecdf SHA512 5b4b3da47378dd9369af0f19caea74d932036ece72fed8b602668584db0c0801a78ef65a98f8d9fa9feace9b040fbb86943f9d2fde2d20f74de13226f31e69c4 +EBUILD rust-bin-1.54.0.ebuild 5669 BLAKE2B e20feafc001ad5ea01d4cc6729fc02d80bf4a3a23ae7ccb436c2eb702de4adf9adfb94150f794e5140787c0c7ec11eb3a2ccb3954ba0f8e709642c98b2935f0b SHA512 30c4641ac1244a03096fe6d089607ea67674cf8f1c9e397287eb1349a728cc78a58b4cf5b82d4205c5ebc91667e84bff01bd92f5c523e002129075f9c3b1f76e +EBUILD rust-bin-1.55.0.ebuild 5669 BLAKE2B e20feafc001ad5ea01d4cc6729fc02d80bf4a3a23ae7ccb436c2eb702de4adf9adfb94150f794e5140787c0c7ec11eb3a2ccb3954ba0f8e709642c98b2935f0b SHA512 30c4641ac1244a03096fe6d089607ea67674cf8f1c9e397287eb1349a728cc78a58b4cf5b82d4205c5ebc91667e84bff01bd92f5c523e002129075f9c3b1f76e +EBUILD rust-bin-1.56.0.ebuild 5669 BLAKE2B e20feafc001ad5ea01d4cc6729fc02d80bf4a3a23ae7ccb436c2eb702de4adf9adfb94150f794e5140787c0c7ec11eb3a2ccb3954ba0f8e709642c98b2935f0b SHA512 30c4641ac1244a03096fe6d089607ea67674cf8f1c9e397287eb1349a728cc78a58b4cf5b82d4205c5ebc91667e84bff01bd92f5c523e002129075f9c3b1f76e +EBUILD rust-bin-1.56.1.ebuild 5669 BLAKE2B e20feafc001ad5ea01d4cc6729fc02d80bf4a3a23ae7ccb436c2eb702de4adf9adfb94150f794e5140787c0c7ec11eb3a2ccb3954ba0f8e709642c98b2935f0b SHA512 30c4641ac1244a03096fe6d089607ea67674cf8f1c9e397287eb1349a728cc78a58b4cf5b82d4205c5ebc91667e84bff01bd92f5c523e002129075f9c3b1f76e MISC metadata.xml 490 BLAKE2B 91056b5357c6d4a4bb86d867114272211ffd3bc8299e89fd1fe5f83f4809687c9f79dcca87df02d2d4e0d820df8de7457fac7869ba1e12d8a02b54fd0bde8ad4 SHA512 1052d99d16e2bcd4dc37c94966cee016e11ab020137dd4d73839b305ce58b158ee1df5e4315ee9657c530d2ef8f5a1c44ecccee49e4968cb69a1216da6203178 diff --git a/dev-lang/rust-bin/rust-bin-1.52.1.ebuild b/dev-lang/rust-bin/rust-bin-1.52.1.ebuild index 8ae41adca726..74e467bd616b 100644 --- a/dev-lang/rust-bin/rust-bin-1.52.1.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.52.1.ebuild @@ -33,6 +33,11 @@ QA_PREBUILT=" opt/${P}/lib/rustlib/.*/lib/.* " +# An rmeta file is custom binary format that contains the metadata for the crate. +# rmeta files do not support linking, since they do not contain compiled object files. +# so we can safely silence the warning for this QA check. +QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta" + VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc pkg_pretend() { diff --git a/dev-lang/rust-bin/rust-bin-1.53.0.ebuild b/dev-lang/rust-bin/rust-bin-1.53.0.ebuild index 8ae41adca726..74e467bd616b 100644 --- a/dev-lang/rust-bin/rust-bin-1.53.0.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.53.0.ebuild @@ -33,6 +33,11 @@ QA_PREBUILT=" opt/${P}/lib/rustlib/.*/lib/.* " +# An rmeta file is custom binary format that contains the metadata for the crate. +# rmeta files do not support linking, since they do not contain compiled object files. +# so we can safely silence the warning for this QA check. +QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta" + VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc pkg_pretend() { diff --git a/dev-lang/rust-bin/rust-bin-1.54.0.ebuild b/dev-lang/rust-bin/rust-bin-1.54.0.ebuild index 64f7fa3d9544..2796cb0698b1 100644 --- a/dev-lang/rust-bin/rust-bin-1.54.0.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.54.0.ebuild @@ -33,6 +33,11 @@ QA_PREBUILT=" opt/${P}/lib/rustlib/.*/lib/.* " +# An rmeta file is custom binary format that contains the metadata for the crate. +# rmeta files do not support linking, since they do not contain compiled object files. +# so we can safely silence the warning for this QA check. +QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta" + VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc pkg_pretend() { diff --git a/dev-lang/rust-bin/rust-bin-1.55.0.ebuild b/dev-lang/rust-bin/rust-bin-1.55.0.ebuild index 64f7fa3d9544..2796cb0698b1 100644 --- a/dev-lang/rust-bin/rust-bin-1.55.0.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.55.0.ebuild @@ -33,6 +33,11 @@ QA_PREBUILT=" opt/${P}/lib/rustlib/.*/lib/.* " +# An rmeta file is custom binary format that contains the metadata for the crate. +# rmeta files do not support linking, since they do not contain compiled object files. +# so we can safely silence the warning for this QA check. +QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta" + VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc pkg_pretend() { diff --git a/dev-lang/rust-bin/rust-bin-1.56.0.ebuild b/dev-lang/rust-bin/rust-bin-1.56.0.ebuild index 64f7fa3d9544..2796cb0698b1 100644 --- a/dev-lang/rust-bin/rust-bin-1.56.0.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.56.0.ebuild @@ -33,6 +33,11 @@ QA_PREBUILT=" opt/${P}/lib/rustlib/.*/lib/.* " +# An rmeta file is custom binary format that contains the metadata for the crate. +# rmeta files do not support linking, since they do not contain compiled object files. +# so we can safely silence the warning for this QA check. +QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta" + VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc pkg_pretend() { diff --git a/dev-lang/rust-bin/rust-bin-1.56.1.ebuild b/dev-lang/rust-bin/rust-bin-1.56.1.ebuild new file mode 100644 index 000000000000..2796cb0698b1 --- /dev/null +++ b/dev-lang/rust-bin/rust-bin-1.56.1.ebuild @@ -0,0 +1,192 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit bash-completion-r1 prefix rust-toolchain toolchain-funcs verify-sig multilib-minimal + +MY_P="rust-${PV}" + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" +SRC_URI="$(rust_all_arch_uris ${MY_P})" + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" +SLOT="stable" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~riscv ~x86" +IUSE="clippy cpu_flags_x86_sse2 doc prefix rls rustfmt" + +DEPEND="" +RDEPEND=">=app-eselect/eselect-rust-20190311" +BDEPEND=" + prefix? ( dev-util/patchelf ) + verify-sig? ( app-crypt/openpgp-keys-rust ) +" + +REQUIRED_USE="x86? ( cpu_flags_x86_sse2 )" + +QA_PREBUILT=" + opt/${P}/bin/.* + opt/${P}/lib/.*.so + opt/${P}/libexec/.* + opt/${P}/lib/rustlib/.*/bin/.* + opt/${P}/lib/rustlib/.*/lib/.* +" + +# An rmeta file is custom binary format that contains the metadata for the crate. +# rmeta files do not support linking, since they do not contain compiled object files. +# so we can safely silence the warning for this QA check. +QA_EXECSTACK="opt/${P}/lib/rustlib/*/lib*.rlib:lib.rmeta" + +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc + +pkg_pretend() { + if [[ "$(tc-is-softfloat)" != "no" ]] && [[ ${CHOST} == armv7* ]]; then + die "${CHOST} is not supported by upstream Rust. You must use a hard float version." + fi +} + +src_unpack() { + verify-sig_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 rls && components="${components},rls-preview,${analysis}" + use rustfmt && components="${components},rustfmt-preview" + ./install.sh \ + --components="${components}" \ + --disable-verify \ + --prefix="${ED}/opt/${P}" \ + --mandir="${ED}/opt/${P}/man" \ + --disable-ldconfig \ + || die + + if use prefix; then + local interpreter=$(patchelf --print-interpreter ${EPREFIX}/bin/bash) + ebegin "Changing interpreter to ${interpreter} for Gentoo prefix at ${ED}/opt/${P}/bin" + find "${ED}/opt/${P}/bin" -type f -print0 | \ + while IFS= read -r -d '' filename; do + patchelf_for_bin ${filename} ${interpreter} \; || die + done + eend $? + fi + + local symlinks=( + cargo + rustc + rustdoc + rust-gdb + rust-gdbgui + rust-lldb + ) + + use clippy && symlinks+=( clippy-driver cargo-clippy ) + use rls && symlinks+=( rls ) + use rustfmt && symlinks+=( rustfmt cargo-fmt ) + + 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}" + 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}" + + # musl logic can be improved a bit, but fine as is for now + cat <<-_EOF_ > "${T}/50${P}" + LDPATH="${EPREFIX}/usr/lib/rust/lib" + MANPATH="${EPREFIX}/usr/lib/rust/man" + $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') + $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_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 rls; then + echo /usr/bin/rls >> "${T}/provider-${P}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${P}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${P}" + popd >/dev/null || die + #end native abi install + + else + local rust_target + rust_target="$(rust_abi $(get_abi_CHOST ${v##*.}))" + dodir "/opt/${P}/lib/rustlib" + cp -vr "${WORKDIR}/rust-${PV}-${rust_target}/rust-std-${rust_target}/lib/rustlib/${rust_target}"\ + "${ED}/opt/${P}/lib/rustlib" || die + fi + + # BUG: installs x86_64 binary on other arches + rm -f "${ED}/opt/${P}/lib/rustlib/"*/bin/rust-llvm-dwp || die +} + +pkg_postinst() { + eselect rust update + + elog "Rust installs a helper script for calling GDB now," + elog "for your convenience it is installed under /usr/bin/rust-gdb-bin-${PV}." + + if has_version app-editors/emacs; then + elog "install app-emacs/rust-mode to get emacs support for rust." + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + elog "install app-vim/rust-vim to get vim support for rust." + fi +} + +pkg_postrm() { + eselect rust cleanup +} diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest index e516e0159e03..571dd3118032 100644 --- a/dev-lang/rust/Manifest +++ b/dev-lang/rust/Manifest @@ -175,9 +175,12 @@ DIST rustc-1.55.0-src.tar.xz 117197580 BLAKE2B 8d9739ce7571146aee0e07c6287de9a8c DIST rustc-1.55.0-src.tar.xz.asc 801 BLAKE2B 5b4ba951ed7ed56c7bd9c71df89cc1e966485d77411016ad71a811ad8e21b88295deec08f24f65afdb163e69ee0fe19288bcc64d18fe272bea51319caddb66b2 SHA512 9bc858ce26cc069cafaefe6165cb15a07e144ad6d6312bcbe115a0a51fec6e281d3e8a7977e958d7fa10e77139548d57396b1552a2802ec74b7bc6ac641e7ae4 DIST rustc-1.56.0-src.tar.xz 121802340 BLAKE2B aa471fd0785d6ceb75d4b661d466a450c960f6df19018a74732f2bab6ec176ea95e247e7cd44d550345bfa723bfc1b6088f0436287bed3752558654198856003 SHA512 2daa365524b47dcc48e49a0e9c8c45988af44c0845e2695dc5053f18e768e49acf3dbdd77f808dbf260546ef608eb47c593544012dd05675cb7e6b6223900315 DIST rustc-1.56.0-src.tar.xz.asc 801 BLAKE2B 75bd829e457b6cefb2fcdfd04ef835487c295420d9d9c8fd7af800b405fe1113c14be01ad3540fea7ed7c743397e337ce1d3b0e757c73292d7f342f352e89791 SHA512 e81cf3d8b1c97803138d4487c32c1463526d53513112b4fa170a81ba947280613fb3260b43d0629a45c859519ea094e467ce0cc0def722577febc3cc34ce5ed8 -EBUILD rust-1.52.1.ebuild 20520 BLAKE2B ae12faa245d6043afb9dd9b62db207d89eae1655940369a9663d7ac9388f2390b854c32a459256f843b35b8eccdf4d7ee78170c14d6565b2c2ad28d72cdf4202 SHA512 e4bb2c8ab8bec76d6881b8aec1008e7a5f1a49ce16175137b4eaf4e3052a01ddb77304d44a30e344e90953ace280df1dd13172317d662b989c5cce6f27aa1375 -EBUILD rust-1.53.0.ebuild 20802 BLAKE2B 97c59e812e197158a9a0b9bdcf8a41417298bf80afee1642526ed396b087da6d990d3559efcb3d50898374a0bd06ebd0764a9325c3268c6a40926ae33b015894 SHA512 a5bab41380d0d122fa2b81012af04cc9e4cb1b1299e20c14d05cf989a437f63b9a7939e7a80cb910328ce0ae1543efc3765252c9a837b9bec5ef5b149aea1a26 -EBUILD rust-1.54.0.ebuild 20806 BLAKE2B cde615998a6281dd6e823d55549c56ee3b23c5e26b92358516cd20665d406317a3f1333271ebcdb000660fd84e540574109b398a12882c0ba655ca978c3a8579 SHA512 1fe3d61af31ce9ef9e6c97ea694965115b41982f1d95285483838e861762115bf9abc863b2466c6eb927b56a2ed22aff6784a0af0983f56ffd76da83c40b0335 -EBUILD rust-1.55.0.ebuild 20713 BLAKE2B e43e75effdb0de4f007cbd4be21931d14cc08aad92226cf13e076c653dd2144f35ddd90beca0b2f078f446585eb805484e3e1f7c9b583d9d03846e1bda33b042 SHA512 97866c0bb0e3f31796b67cfaa246ec769e307eeb46474207ad02850157a05d5a643086ec3020d351a0b067be7862a9b39384718da91cdb3b6e3e499cd01583ae -EBUILD rust-1.56.0-r1.ebuild 20625 BLAKE2B 7e669a0e7d6988fcf5fd7635e3da348b4883f8e8426951a01ceaa34869349ff294fa9579c593f72c8eb17ab2b5535e3a5786633b0ec58d0635c512080efa03f2 SHA512 cb3086d79a852790f635232baa1fa6059920f1fa2a98088cda5b3e0c0775ee55e9e4f5b29b2724b8e6642a82359c1e9b8b3e327fb0938e05f3dbb94e233866d4 +DIST rustc-1.56.1-src.tar.xz 121798264 BLAKE2B 09677b0332022f28a0d80949a6735929dbf64276f7eb57195d8c33e6c80f13c903432ff77d8834093ab551677618fb1d385f2300e2b1b4c064f9c245c696be32 SHA512 193468e211cde9ebc5f6e30b8e3733b79bd8710fe6dd45c7ed8d4392f91010d30466787afd4d0b2041cd7dd994924fee8ad111048824e248bd994959e55bf15f +DIST rustc-1.56.1-src.tar.xz.asc 801 BLAKE2B 70ed1c26971e864aa6cc9b05eb52c4a140d0d0cccb3ff66d4a13e1b1dbac958c5369f76524c4702311566ed26aff635f5e3d35d9da71d96e070f5f0e978dc2ba SHA512 f997e7962ef8b283c19c97d8b898f3642f1a58c89a9cc5470cf88682263a42e2054d670c12bf93c41e81edf8324a5b51453f402a74bccb7744c7f463cf689aa8 +EBUILD rust-1.52.1.ebuild 20495 BLAKE2B e22c6f77ae8cf31db3f0125f2203296ab0ca71591c841d8b6432eeaf7caa6b65971728458ada6d75102b0dc705f974caa20673b24e443c7dc3b6420706094611 SHA512 cb85e8792485644c713e3f51e3a42a03e08be437f04b976f7a17cc55c0b5be2c0a3f2aac46f8c1dedcbd989bfcbafc5cee10215a0b06bb68c1912eff052de5d3 +EBUILD rust-1.53.0.ebuild 20777 BLAKE2B 3f01634c94243453b6a46215e3beea8853aaabb84c0a24107db942c097a484c8344d023ee9758fa70defe2ed2717a2e5881e50434310498466fac87bf0ef0d50 SHA512 77f6059bbd1ede0b87a819d5439c3641576a91bed88a63cca97ce14242e3e8dc3e0eb39b1f1b0b6ddb060dc8a486d0f6b8240544f9ceb559290ce50f1149c85e +EBUILD rust-1.54.0.ebuild 20781 BLAKE2B 0193014be971bb8b0f89aebd99babd687663cf53c83c8e5bad17abc1f63793f6344956d147de20bfa100f45306bb309ed1fa67b7493ee655b8c9fed42dbee077 SHA512 5a36d442b09340f9d348a4a05727aba447c80d989596bbd01abeee99da049347901b1514c32cf5a77cf0ce5189f9685c7c44019ef7aea2af7705720520fbce83 +EBUILD rust-1.55.0.ebuild 20688 BLAKE2B fc8d61fa97b433d12bad0e2fa8e9cd140834eed18f5a0624a0f8443a0f00917ec8911daaaf9e627a8377e7cfff9ca77a04def7b840ca61790b349dc209eb3d8b SHA512 574316e65953bed2c2f8ff7f36a58d95e82775a946778e9b1753fb4be272c0c4dcecbd589e4fd42aa6cb71e777a302579569229595e9c675cf483597098f6a7b +EBUILD rust-1.56.0-r1.ebuild 20600 BLAKE2B 2f6b1bd36fa20ca5930145dbf40664d0e66df9d31eaab6f7356ff5755d9d8e1395e33289d8c22a1dd4c3ae2c5e3f0465be7c6e365b0405b08cdb1be89ac52266 SHA512 92d824b841d3e0604df8654db4ca829afb9594f1dcc33524f160689683b2a8d6e4b0d5c4517544e2a0354649a1834419bf0a2cd7468604eb1a9cfbdb52dea0da +EBUILD rust-1.56.1.ebuild 20601 BLAKE2B 839521fb74949c86a9619b93357d57b93eb7d1a1a9594ee195af3b0fb16cc0233598d931a04b35112c7ef3de3b8c5393aac4ce8725a3b692dded9a00cc0479a1 SHA512 fb728d1d0b7f7328badea922cc266ccc0b600cd3516ea4d6df3c285a8cf1e473559eb5599e79f4a053a1204508008574c67f45c083a82d6c887226939ba6180c MISC metadata.xml 1123 BLAKE2B 3a4e817eda9e998275741d9b3e313369bfb3d4ee8ba3b701f2a26ea3fd8b5564e8ee5dca29574693e0361d56d1b91aa1b8791fc46a3533b5e5a98bbd6991cb01 SHA512 dbd9646a10e11b9ee8a87e4785f06530758dd611e58da3b16fde927dd0e7f858710e246a0401e09e7500ff5c301c84f5606f4fce85c21f0f8a5579f0bb4ea8ab diff --git a/dev-lang/rust/rust-1.52.1.ebuild b/dev-lang/rust/rust-1.52.1.ebuild index 30db42404e6a..9957b7ceb23d 100644 --- a/dev-lang/rust/rust-1.52.1.ebuild +++ b/dev-lang/rust/rust-1.52.1.ebuild @@ -141,8 +141,7 @@ QA_SONAME=" # 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_WX_LOAD="usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/.*:lib.rmeta" -QA_EXECSTACK="${QA_WX_LOAD}" +QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta" # causes double bootstrap RESTRICT="test" diff --git a/dev-lang/rust/rust-1.53.0.ebuild b/dev-lang/rust/rust-1.53.0.ebuild index aeb7bd1f11c8..fa79d5221f5f 100644 --- a/dev-lang/rust/rust-1.53.0.ebuild +++ b/dev-lang/rust/rust-1.53.0.ebuild @@ -143,8 +143,7 @@ QA_SONAME=" # 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_WX_LOAD="usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/.*:lib.rmeta" -QA_EXECSTACK="${QA_WX_LOAD}" +QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta" # causes double bootstrap RESTRICT="test" diff --git a/dev-lang/rust/rust-1.54.0.ebuild b/dev-lang/rust/rust-1.54.0.ebuild index 0b2c51587d67..0d1daa9be3c5 100644 --- a/dev-lang/rust/rust-1.54.0.ebuild +++ b/dev-lang/rust/rust-1.54.0.ebuild @@ -143,8 +143,7 @@ QA_SONAME=" # 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_WX_LOAD="usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/.*:lib.rmeta" -QA_EXECSTACK="${QA_WX_LOAD}" +QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta" # causes double bootstrap RESTRICT="test" diff --git a/dev-lang/rust/rust-1.55.0.ebuild b/dev-lang/rust/rust-1.55.0.ebuild index 366d1e5149b8..99d6951548d7 100644 --- a/dev-lang/rust/rust-1.55.0.ebuild +++ b/dev-lang/rust/rust-1.55.0.ebuild @@ -143,8 +143,7 @@ QA_SONAME=" # 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_WX_LOAD="usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/.*:lib.rmeta" -QA_EXECSTACK="${QA_WX_LOAD}" +QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta" # causes double bootstrap RESTRICT="test" diff --git a/dev-lang/rust/rust-1.56.0-r1.ebuild b/dev-lang/rust/rust-1.56.0-r1.ebuild index a388d0a00694..b12ed45601fe 100644 --- a/dev-lang/rust/rust-1.56.0-r1.ebuild +++ b/dev-lang/rust/rust-1.56.0-r1.ebuild @@ -143,8 +143,7 @@ QA_SONAME=" # 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_WX_LOAD="usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/.*:lib.rmeta" -QA_EXECSTACK="${QA_WX_LOAD}" +QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta" # causes double bootstrap RESTRICT="test" diff --git a/dev-lang/rust/rust-1.56.1.ebuild b/dev-lang/rust/rust-1.56.1.ebuild new file mode 100644 index 000000000000..690bbad18071 --- /dev/null +++ b/dev-lang/rust/rust-1.56.1.ebuild @@ -0,0 +1,682 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..10} ) + +inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \ + multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig + +if [[ ${PV} = *beta* ]]; then + betaver=${PV//*beta} + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}" + MY_P="rustc-beta" + SLOT="beta/${PV}" + SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz" +else + ABI_VER="$(ver_cut 1-2)" + SLOT="stable/${ABI_VER}" + MY_P="rustc-${PV}" + SRC="${MY_P}-src.tar.xz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +fi + +RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0" + +DESCRIPTION="Systems programming language from Mozilla" +HOMEPAGE="https://www.rust-lang.org/" + +SRC_URI=" + https://static.rust-lang.org/dist/${SRC} + verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc ) + !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) ) +" + +# keep in sync with llvm ebuild of the same version as bundled one. +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 + NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore ) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) +LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?} + +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA" + +IUSE="clippy cpu_flags_x86_sse2 debug doc miri nightly parallel-compiler rls rustfmt system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}" + +# Please keep the LLVM dependency block separate. Since LLVM is slotted, +# we need to *really* make sure we're not pulling more than one slot +# simultaneously. + +# How to use it: +# List all the working slots in LLVM_VALID_SLOTS, newest first. +LLVM_VALID_SLOTS=( 13 ) +LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}" + +# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation +# (-) usedep needed because we may build with older llvm without that target +LLVM_DEPEND="|| ( " +for _s in ${LLVM_VALID_SLOTS[@]}; do + LLVM_DEPEND+=" ( " + for _x in ${ALL_LLVM_TARGETS[@]}; do + LLVM_DEPEND+=" + ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )" + done + LLVM_DEPEND+=" )" +done +unset _s _x +LLVM_DEPEND+=" ) + <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):= + wasm? ( sys-devel/lld ) +" + +# to bootstrap we need at least exactly previous version, or same. +# most of the time previous versions fail to bootstrap with newer +# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok, +# but it fails to bootstrap with 1.48.x +# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt +RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*" +RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*" +BOOTSTRAP_DEPEND="|| + ( + =dev-lang/rust-"${RUST_DEP_PREV}" + =dev-lang/rust-bin-"${RUST_DEP_PREV}" + =dev-lang/rust-"${RUST_DEP_CURR}" + =dev-lang/rust-bin-"${RUST_DEP_CURR}" + ) +" + +BDEPEND="${PYTHON_DEPS} + app-eselect/eselect-rust + || ( + >=sys-devel/gcc-4.7 + >=sys-devel/clang-3.5 + ) + system-bootstrap? ( ${BOOTSTRAP_DEPEND} ) + !system-llvm? ( + >=dev-util/cmake-3.13.4 + dev-util/ninja + ) + test? ( sys-devel/gdb ) + verify-sig? ( app-crypt/openpgp-keys-rust ) +" + +DEPEND=" + >=app-arch/xz-utils-5.2 + net-misc/curl:=[http2,ssl] + sys-libs/zlib:= + dev-libs/openssl:0= + elibc_musl? ( sys-libs/libunwind:= ) + system-llvm? ( ${LLVM_DEPEND} ) +" + +# we need to block older versions due to layout changes. +RDEPEND="${DEPEND} + app-eselect/eselect-rust + !<dev-lang/rust-1.47.0-r1 + !<dev-lang/rust-bin-1.47.0-r1 +" + +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} ) + miri? ( nightly ) + parallel-compiler? ( nightly ) + test? ( ${ALL_LLVM_TARGETS[*]} ) + wasm? ( llvm_targets_WebAssembly ) + x86? ( cpu_flags_x86_sse2 ) +" + +# we don't use cmake.eclass, but can get a warnings +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 +" + +# 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=${BROOT}/usr/share/openpgp-keys/rust.asc + +PATCHES=( + "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch + "${FILESDIR}"/1.49.0-gentoo-musl-target-specs.patch +) + +S="${WORKDIR}/${MY_P}-src" + +toml_usex() { + usex "${1}" true false +} + +bootstrap_rust_version_check() { + # never call from pkg_pretend. eselect-rust may be not installed yet. + [[ ${MERGE_TYPE} == binary ]] && return + local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))" + local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))" + local rustc_version=( $(eselect --brief rust show 2>/dev/null) ) + rustc_version=${rustc_version[0]#rust-bin-} + rustc_version=${rustc_version#rust-} + + [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output" + + if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then + eerror "Rust >=${rustc_wanted} is required" + eerror "please run 'eselect rust' and set correct rust version" + die "selected rust version is too old" + elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then + eerror "Rust <${rustc_toonew} is required" + eerror "please run 'eselect rust' and set correct rust version" + die "selected rust version is too new" + else + einfo "Using rust ${rustc_version} to build" + fi +} + +pre_build_checks() { + local M=4096 + # multiply requirements by 1.5 if we are doing x86-multilib + if use amd64; then + M=$(( $(usex abi_x86_32 15 10) * ${M} / 10 )) + fi + M=$(( $(usex clippy 128 0) + ${M} )) + M=$(( $(usex miri 128 0) + ${M} )) + M=$(( $(usex rls 512 0) + ${M} )) + M=$(( $(usex rustfmt 256 0) + ${M} )) + # add 2G if we compile llvm and 256M per llvm_target + if ! use system-llvm; then + M=$(( 2048 + ${M} )) + local ltarget + for ltarget in ${ALL_LLVM_TARGETS[@]}; do + M=$(( $(usex ${ltarget} 256 0) + ${M} )) + done + fi + M=$(( $(usex wasm 256 0) + ${M} )) + M=$(( $(usex debug 2 1) * ${M} )) + eshopts_push -s extglob + if is-flagq '-g?(gdb)?([1-9])'; then + M=$(( 15 * ${M} / 10 )) + fi + eshopts_pop + M=$(( $(usex system-bootstrap 0 1024) + ${M} )) + M=$(( $(usex doc 256 0) + ${M} )) + CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE} +} + +llvm_check_deps() { + has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]" +} + +pkg_pretend() { + pre_build_checks +} + +pkg_setup() { + pre_build_checks + python-any-r1_pkg_setup + + export LIBGIT2_NO_PKG_CONFIG=1 #749381 + + use system-bootstrap && bootstrap_rust_version_check + + if use system-llvm; then + llvm_pkg_setup + + local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" + export LLVM_LINK_SHARED=1 + export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)" + fi +} + +src_prepare() { + if ! use system-bootstrap; then + local rust_stage0_root="${WORKDIR}"/rust-stage0 + local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)" + + "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \ + --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die + fi + + default +} + +src_configure() { + 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_targets},\"$(rust_abi $(get_abi_CHOST ${v##*.}))\"" + done + if use wasm; then + rust_targets="${rust_targets},\"wasm32-unknown-unknown\"" + if use system-llvm; then + # un-hardcode rust-lld linker for this target + # https://bugs.gentoo.org/715348 + sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die + fi + fi + rust_targets="${rust_targets#,}" + + local tools="\"cargo\"," + if use clippy; then + tools="\"clippy\",$tools" + fi + if use miri; then + tools="\"miri\",$tools" + fi + if use rls; then + tools="\"rls\",\"analysis\",\"src\",$tools" + fi + if use rustfmt; then + tools="\"rustfmt\",$tools" + fi + + local rust_stage0_root + if use system-bootstrap; then + local printsysroot + printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")" + rust_stage0_root="${printsysroot}" + else + rust_stage0_root="${WORKDIR}"/rust-stage0 + fi + # in case of prefix it will be already prefixed, as --print sysroot returns full path + [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory" + + rust_target="$(rust_abi)" + + cat <<- _EOF_ > "${S}"/config.toml + changelog-seen = 2 + [llvm] + download-ci-llvm = false + optimize = $(toml_usex !debug) + release-debuginfo = $(toml_usex debug) + assertions = $(toml_usex debug) + ninja = true + targets = "${LLVM_TARGETS// /;}" + experimental-targets = "" + link-shared = $(toml_usex system-llvm) + [build] + build-stage = 2 + test-stage = 2 + doc-stage = 2 + build = "${rust_target}" + host = ["${rust_target}"] + target = [${rust_targets}] + cargo = "${rust_stage0_root}/bin/cargo" + rustc = "${rust_stage0_root}/bin/rustc" + rustfmt = "${rust_stage0_root}/bin/rustfmt" + docs = $(toml_usex doc) + compiler-docs = false + submodules = false + python = "${EPYTHON}" + locked-deps = true + vendor = true + extended = true + tools = [${tools}] + verbose = 2 + sanitizers = false + profiler = false + cargo-native-static = false + [install] + prefix = "${EPREFIX}/usr/lib/${PN}/${PV}" + sysconfdir = "etc" + docdir = "share/doc/rust" + bindir = "bin" + libdir = "lib" + mandir = "share/man" + [rust] + # https://github.com/rust-lang/rust/issues/54872 + codegen-units-std = 1 + optimize = true + debug = $(toml_usex debug) + debug-assertions = $(toml_usex debug) + debug-assertions-std = $(toml_usex debug) + debuginfo-level = $(usex debug 2 0) + debuginfo-level-rustc = $(usex debug 2 0) + debuginfo-level-std = $(usex debug 2 0) + debuginfo-level-tools = $(usex debug 2 0) + debuginfo-level-tests = 0 + backtrace = true + incremental = false + default-linker = "$(tc-getCC)" + parallel-compiler = $(toml_usex parallel-compiler) + channel = "$(usex nightly nightly stable)" + description = "gentoo" + rpath = false + verbose-tests = true + optimize-tests = $(toml_usex !debug) + codegen-tests = true + dist-src = false + remap-debuginfo = true + lld = $(usex system-llvm false $(toml_usex wasm)) + # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it + # https://github.com/rust-lang/rust/issues/74976 + # https://github.com/rust-lang/rust/issues/76526 + deny-warnings = $(usex wasm $(usex doc false true) true) + backtrace-on-ice = true + jemalloc = false + [dist] + src-tarball = false + compression-formats = ["gz"] + _EOF_ + + for v in $(multilib_get_enabled_abi_pairs); do + rust_target=$(rust_abi $(get_abi_CHOST ${v##*.})) + arch_cflags="$(get_abi_CFLAGS ${v##*.})" + + cat <<- _EOF_ >> "${S}"/config.env + CFLAGS_${rust_target}=${arch_cflags} + _EOF_ + + cat <<- _EOF_ >> "${S}"/config.toml + [target.${rust_target}] + cc = "$(tc-getBUILD_CC)" + cxx = "$(tc-getBUILD_CXX)" + linker = "$(tc-getCC)" + ar = "$(tc-getAR)" + _EOF_ + # librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true; + if use elibc_musl; then + cat <<- _EOF_ >> "${S}"/config.toml + crt-static = false + _EOF_ + fi + if use system-llvm; then + cat <<- _EOF_ >> "${S}"/config.toml + llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" + _EOF_ + fi + done + if use wasm; then + cat <<- _EOF_ >> "${S}"/config.toml + [target.wasm32-unknown-unknown] + linker = "$(usex system-llvm lld rust-lld)" + _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}] + cc = "${cross_toolchain}-gcc" + cxx = "${cross_toolchain}-g++" + linker = "${cross_toolchain}-gcc" + ar = "${cross_toolchain}-ar" + _EOF_ + if use system-llvm; then + cat <<- _EOF_ >> "${S}"/config.toml + llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config" + _EOF_ + fi + if [[ "${cross_toolchain}" == *-musl* ]]; then + cat <<- _EOF_ >> "${S}"/config.toml + musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr" + _EOF_ + fi + + # append cross target to "normal" target list + # example 'target = ["powerpc64le-unknown-linux-gnu"]' + # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]' + + rust_targets="${rust_targets},\"${cross_rust_target}\"" + sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die + + ewarn + ewarn "Enabled ${cross_rust_target} rust target" + ewarn "Using ${cross_toolchain} cross toolchain" + ewarn + if ! has_version -b 'sys-devel/binutils[multitarget]' ; then + ewarn "'sys-devel/binutils[multitarget]' is not installed" + ewarn "'strip' will be unable to strip cross libraries" + ewarn "cross targets will be installed with full debug information" + ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files" + ewarn + ewarn "Alternatively llvm-strip can be used, it supports stripping any target" + ewarn "define STRIP=\"llvm-strip\" to use it (experimental)" + ewarn + fi + done + fi # I_KNOW_WHAT_I_AM_DOING_CROSS + + einfo "Rust configured with the following flags:" + echo + echo RUSTFLAGS="${RUSTFLAGS:-}" + echo RUSTFLAGS_BOOTSTRAP="${RUSTFLAGS_BOOTSTRAP:-}" + echo RUSTFLAGS_NOT_BOOTSTRAP="${RUSTFLAGS_NOT_BOOTSTRAP:-}" + env | grep "CARGO_TARGET_.*_RUSTFLAGS=" + cat "${S}"/config.env || die + echo + einfo "config.toml contents:" + cat "${S}"/config.toml || die + echo +} + +src_compile() { + # we need \n IFS to have config.env with spaces loaded properly. #734018 + ( + IFS=$'\n' + env $(cat "${S}"/config.env) RUST_BACKTRACE=1\ + "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die + ) +} + +src_test() { + # https://rustc-dev-guide.rust-lang.org/tests/intro.html + + # those are basic and codegen tests. + local tests=( + codegen + codegen-units + compile-fail + incremental + mir-opt + pretty + run-make + ) + + # fails if llvm is not built with ALL targets. + # and known to fail with system llvm sometimes. + use system-llvm || tests+=( assembly ) + + # fragile/expensive/less important tests + # or tests that require extra builds + # TODO: instead of skipping, just make some nonfatal. + if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then + tests+=( + rustdoc + rustdoc-js + rustdoc-js-std + rustdoc-ui + run-make-fulldeps + ui + ui-fulldeps + ) + fi + + local i failed=() + einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}" + for i in "${tests[@]}"; do + local t="src/test/${i}" + einfo "rust_src_test: running ${t}" + if ! ( + IFS=$'\n' + env $(cat "${S}"/config.env) 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() { + ( + IFS=$'\n' + env $(cat "${S}"/config.env) DESTDIR="${D}" \ + "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die + ) + + # bug #689562, #689160 + rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die + rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die + newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo + + local symlinks=( + cargo + rustc + rustdoc + rust-gdb + rust-gdbgui + rust-lldb + ) + + use clippy && symlinks+=( clippy-driver cargo-clippy ) + use miri && symlinks+=( miri cargo-miri ) + use rls && symlinks+=( rls ) + use rustfmt && symlinks+=( rustfmt cargo-fmt ) + + 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}" + dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}" + dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}" + dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}" + dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}" + + newenvd - "50${P}" <<-_EOF_ + LDPATH="${EPREFIX}/usr/lib/rust/lib" + MANPATH="${EPREFIX}/usr/lib/rust/man" + $(use amd64 && usex elibc_musl 'CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') + $(use arm64 && usex elibc_musl 'CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static"' '') + _EOF_ + + rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die + rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die + + # note: eselect-rust adds EROOT to all paths below + cat <<-_EOF_ > "${T}/provider-${P}" + /usr/bin/cargo + /usr/bin/rustdoc + /usr/bin/rust-gdb + /usr/bin/rust-gdbgui + /usr/bin/rust-lldb + /usr/lib/rustlib + /usr/lib/rust/lib + /usr/lib/rust/libexec + /usr/lib/rust/man + /usr/share/doc/rust + _EOF_ + + if use clippy; then + echo /usr/bin/clippy-driver >> "${T}/provider-${P}" + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}" + fi + if use miri; then + echo /usr/bin/miri >> "${T}/provider-${P}" + echo /usr/bin/cargo-miri >> "${T}/provider-${P}" + fi + if use rls; then + echo /usr/bin/rls >> "${T}/provider-${P}" + fi + if use rustfmt; then + echo /usr/bin/rustfmt >> "${T}/provider-${P}" + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}" + fi + + insinto /etc/env.d/rust + doins "${T}/provider-${P}" +} + +pkg_postinst() { + eselect rust update + + if has_version sys-devel/gdb || has_version dev-util/lldb; then + elog "Rust installs a helper script for calling GDB and LLDB," + elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}." + fi + + if has_version app-editors/emacs; then + elog "install app-emacs/rust-mode to get emacs support for rust." + fi + + if has_version app-editors/gvim || has_version app-editors/vim; then + elog "install app-vim/rust-vim to get vim support for rust." + fi +} + +pkg_postrm() { + eselect rust cleanup +} diff --git a/dev-lang/zig/Manifest b/dev-lang/zig/Manifest index 2d4987705cc9..f94082340e8b 100644 --- a/dev-lang/zig/Manifest +++ b/dev-lang/zig/Manifest @@ -1,6 +1,8 @@ DIST zig-0.7.1.tar.gz 16082917 BLAKE2B 401bb079f2d0e2ad26837940e3b79c14237a492bd0b4df616f91b8b454ebd4ac3de36b2c988369c9eaaf7c2df4f95d4b1bb97760629f813ac8c7220e9542e12b SHA512 ad0b36f7b40481aca03940adfd42d34a724922993fc29a23a80412dc087ca6ce4876a400dc9bb7da455564521a88ea205c218988759ff6c56251a08232bfa41a DIST zig-0.8.0.tar.gz 19596459 BLAKE2B 7b688fdd201ce7b0b1e12127c4b1bf898699de18f410021e09bb056a56666aa8de512688a0048d6ac0ea8d6b7dfdb86e1a5416d2fab0a4911e16269d7b6be2a4 SHA512 2082810d5ab0560167766e80f0853e5ff99e32b1935836a6a0029b8e1c88061c55dd0c285cbcc506f4c38aac8477ec7162b771537699be9b3d387de94e3baa57 +DIST zig-0.8.1.tar.gz 19643170 BLAKE2B bc52f3399b3355a1fc7675329870dd107b21798fc562a9e55cd4a7c838cfdb2ed58ae3a01e3841a1a58c82fe27bec8758703b654b7548b9e431728aaabcd7ea6 SHA512 36bea566eee3dc5c00f2713cbc6616258dbadd3ee994749339f124f8b70c691cfe7fdce6a00194f879679ea417dadb3bcc244f8b79153957a426fea2d52caaf5 EBUILD zig-0.7.1.ebuild 1399 BLAKE2B 082b8b334ff914edfecdf59ed73201fa4a2b7988e97652304d3ef2f38545aacf1f2d03285c31139798140b8a119e4eea0bc39fecf2238ff3c2e159fdd9123275 SHA512 abbd6231a5090f6f37bd12a762864eb1d19fdc425570ea4e77c2314be5eb364839a644da38873d22429fbefeba53c289e045f693975002a414aa340da9698e4f EBUILD zig-0.8.0.ebuild 1399 BLAKE2B 997269a639e0993cceab1bf48ea8b395d8644228461bd548b404e6dbe7d69a4dc30e4dbc7ecd1142993c9c67f850b972d3419ca65dd3c24947326544b66d4464 SHA512 ef53ad8dad89c7f1a3805b8a7be38ed09879c0c28e0766cca1037b1e19f1a18015a0cb2da7d1229b8e0c380bab42f4a67299391d43cb672ad893e950681b2889 -EBUILD zig-9999.ebuild 1399 BLAKE2B 997269a639e0993cceab1bf48ea8b395d8644228461bd548b404e6dbe7d69a4dc30e4dbc7ecd1142993c9c67f850b972d3419ca65dd3c24947326544b66d4464 SHA512 ef53ad8dad89c7f1a3805b8a7be38ed09879c0c28e0766cca1037b1e19f1a18015a0cb2da7d1229b8e0c380bab42f4a67299391d43cb672ad893e950681b2889 +EBUILD zig-0.8.1.ebuild 1399 BLAKE2B 997269a639e0993cceab1bf48ea8b395d8644228461bd548b404e6dbe7d69a4dc30e4dbc7ecd1142993c9c67f850b972d3419ca65dd3c24947326544b66d4464 SHA512 ef53ad8dad89c7f1a3805b8a7be38ed09879c0c28e0766cca1037b1e19f1a18015a0cb2da7d1229b8e0c380bab42f4a67299391d43cb672ad893e950681b2889 +EBUILD zig-9999.ebuild 1399 BLAKE2B a8a6f6ea504e45f2f8a27928f96d0cb98e3fb0332db97b1b07d2da1493693857d7d09de3cb50c6093e62956d40cca0fc09382ec6fe7da31ae8a369fab322d6a5 SHA512 8de677ce41e6fcd9c7bacaaf9ad1e71af71173999bd14dab1447051870d920d5fc2ddda77336c1b999c046da618d6c6939ab0388a4e9bb281f9a2fdecb28b52d MISC metadata.xml 585 BLAKE2B bd9a71f32f597bc21f40810ae479a9f5704c42a399973b20d30db67c1d9918f09e19770434cabda5d1382ea79917dc450fba7c88b31f4476ff6b54e39a448679 SHA512 c16bc81942d575d47f103328cd9623b61127fbfceb7f66a93c79692d88e4e29fffc0662a5dd273295a1b4b866a79aa88f9132ec1bab06ad979b32529e5614a1d diff --git a/dev-lang/zig/zig-0.8.1.ebuild b/dev-lang/zig/zig-0.8.1.ebuild new file mode 100644 index 000000000000..3a6741c72cdc --- /dev/null +++ b/dev-lang/zig/zig-0.8.1.ebuild @@ -0,0 +1,60 @@ +# Copyright 2019-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake llvm + +DESCRIPTION="A robust, optimal, and maintainable programming language" +HOMEPAGE="https://ziglang.org/" +LICENSE="MIT" +SLOT="0" +IUSE="+experimental test" +RESTRICT="!test? ( test )" + +if [[ ${PV} == 9999 ]]; then + EGIT_REPO_URI="https://github.com/ziglang/zig.git" + inherit git-r3 +else + SRC_URI="https://github.com/ziglang/zig/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64" +fi + +BUILD_DIR="${S}/build" + +# According to zig's author, zig builds that do not support all targets are not +# supported by the upstream project. +ALL_LLVM_TARGETS=( + AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430 NVPTX + PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore +) +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) +LLVM_TARGET_USEDEPS="${ALL_LLVM_TARGETS[@]}" + +LLVM_MAX_SLOT=12 + +RDEPEND=" + sys-devel/clang:${LLVM_MAX_SLOT} + >=sys-devel/lld-12.0.0 + <sys-devel/lld-13.0.0 + sys-devel/llvm:${LLVM_MAX_SLOT} + !experimental? ( sys-devel/llvm:${LLVM_MAX_SLOT}[${LLVM_TARGET_USEDEPS// /,}] ) +" +DEPEND="${RDEPEND}" + +llvm_check_deps() { + has_version "sys-devel/clang:${LLVM_SLOT}" +} + +src_configure() { + local mycmakeargs=( + -DZIG_USE_CCACHE=OFF + -DZIG_PREFER_CLANG_CPP_DYLIB=ON + ) + cmake_src_configure +} + +src_test() { + cd "${BUILD_DIR}" || die + ./zig build test || die +} diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild index 3a6741c72cdc..ecb9704d75a2 100644 --- a/dev-lang/zig/zig-9999.ebuild +++ b/dev-lang/zig/zig-9999.ebuild @@ -31,12 +31,12 @@ ALL_LLVM_TARGETS=( ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" ) LLVM_TARGET_USEDEPS="${ALL_LLVM_TARGETS[@]}" -LLVM_MAX_SLOT=12 +LLVM_MAX_SLOT=13 RDEPEND=" sys-devel/clang:${LLVM_MAX_SLOT} >=sys-devel/lld-12.0.0 - <sys-devel/lld-13.0.0 + <sys-devel/lld-14.0.0 sys-devel/llvm:${LLVM_MAX_SLOT} !experimental? ( sys-devel/llvm:${LLVM_MAX_SLOT}[${LLVM_TARGET_USEDEPS// /,}] ) " |