From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BC2D2138359 for ; Wed, 23 Sep 2020 02:47:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E552AE0845; Wed, 23 Sep 2020 02:47:26 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C8C4CE0845 for ; Wed, 23 Sep 2020 02:47:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7CCBB340DF1 for ; Wed, 23 Sep 2020 02:47:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F1E86355 for ; Wed, 23 Sep 2020 02:47:23 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1600828713.3498f32e4906a6952c4f0853a6fb8e4f01fc2457.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/rustup/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/rustup/rustup-9999.ebuild X-VCS-Directories: dev-util/rustup/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 3498f32e4906a6952c4f0853a6fb8e4f01fc2457 X-VCS-Branch: master Date: Wed, 23 Sep 2020 02:47:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b8371c02-5314-448a-aac4-8ed136c54dcb X-Archives-Hash: 64953d079240481677fab3c96fdb2524 commit: 3498f32e4906a6952c4f0853a6fb8e4f01fc2457 Author: Georgy Yakovlev gentoo org> AuthorDate: Wed Sep 23 02:38:33 2020 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Wed Sep 23 02:38:33 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3498f32e dev-util/rustup: add live ebuild Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Georgy Yakovlev gentoo.org> dev-util/rustup/rustup-9999.ebuild | 80 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/dev-util/rustup/rustup-9999.ebuild b/dev-util/rustup/rustup-9999.ebuild new file mode 100644 index 00000000000..17de8dc6319 --- /dev/null +++ b/dev-util/rustup/rustup-9999.ebuild @@ -0,0 +1,80 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CRATES="" + +inherit bash-completion-r1 cargo prefix + +DESCRIPTION="Rust toolchain installer" +HOMEPAGE="https://rust-lang.github.io/rustup/" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/rust-lang/${PN}.git" +else + SRC_URI="https://github.com/rust-lang/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz + $(cargo_crate_uris ${CRATES})" + KEYWORDS="~amd64 ~ppc64" +fi + +LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD Boost-1.0 CC0-1.0 MIT Unlicense ZLIB" +SLOT="0" +IUSE="" + +DEPEND=" + app-arch/xz-utils + net-misc/curl:=[http2,ssl] + dev-libs/openssl:0= +" +RDEPEND="${DEPEND}" +BDEPEND="virtual/rust" + +QA_FLAGS_IGNORED="usr/bin/.*" + +# uses network +RESTRICT="test" + +src_unpack() { + if [[ "${PV}" == *9999* ]]; then + git-r3_src_unpack + cargo_live_src_unpack + else + cargo_src_unpack + fi +} + +src_compile() { + export OPENSSL_NO_VENDOR=true + cargo_src_compile --features no-self-update +} + +src_install() { + cargo_src_install --features no-self-update + einstalldocs + exeinto /usr/share/rustup + newexe "$(prefixify_ro "${FILESDIR}"/symlink_rustup.sh)" symlink_rustup + + ln -s "${ED}/usr/bin/rustup-init" rustup || die + ./rustup completions bash rustup > "${T}/rustup" || die + ./rustup completions zsh rustup > "${T}/_rustup" || die + + dobashcomp "${T}/rustup" + + insinto /usr/share/zsh/site-functions + doins "${T}/_rustup" +} + +src_test() { + cargo_src_test --features no-self-update +} + +pkg_postinst() { + einfo "No rustup toolchains installed by default" + einfo "system rust toolchain can be added to rustup by running" + einfo "helper script installed to ${EPREFIX}/usr/share/rustup/symlink_rustup" + einfo "it will create proper symlinks in user home directory" + einfo "and rustup updates will be managed by portage" + einfo "please delete current rustup installation (if any) before running the script" +}