diff options
author | o01eg <o01eg@yandex.ru> | 2018-02-12 18:48:58 +0300 |
---|---|---|
committer | o01eg <o01eg@yandex.ru> | 2018-02-12 18:48:58 +0300 |
commit | 0dfed7a3853406be8bafa64c3dfe349cb5f81bd6 (patch) | |
tree | ddbf36e422dd3e8b7630f092e027d07309099940 /dev-util | |
parent | Merge pull request #322 from gentoo90/geckodriver (diff) | |
download | rust-0dfed7a3853406be8bafa64c3dfe349cb5f81bd6.tar.gz rust-0dfed7a3853406be8bafa64c3dfe349cb5f81bd6.tar.bz2 rust-0dfed7a3853406be8bafa64c3dfe349cb5f81bd6.zip |
Remove cargo and rustfmt from rust installation.
Change USE flag `tools` to `extended`.
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/cargo/cargo-9999.ebuild | 51 |
1 files changed, 45 insertions, 6 deletions
diff --git a/dev-util/cargo/cargo-9999.ebuild b/dev-util/cargo/cargo-9999.ebuild index 3b284df..07bfb07 100644 --- a/dev-util/cargo/cargo-9999.ebuild +++ b/dev-util/cargo/cargo-9999.ebuild @@ -1,17 +1,56 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 -DESCRIPTION="The Rust's package manager (virtual package)" +inherit eutils bash-completion-r1 git-r3 + +DESCRIPTION="The Rust's package manager" HOMEPAGE="http://crates.io/" -SRC_URI="" LICENSE="|| ( MIT Apache-2.0 )" SLOT="0" KEYWORDS="" -DEPEND="" -RDEPEND="" -PDEPEND=">=dev-lang/rust-9999[tools]" +IUSE="libressl" + +EGIT_REPO_URI="https://github.com/rust-lang/cargo.git" +BIN_CARGO_URI="https://static.rust-lang.org/dist/cargo-nightly" + +COMMON_DEPEND=">=virtual/rust-999 + sys-libs/zlib + !libressl? ( dev-libs/openssl:* ) + libressl? ( dev-libs/libressl:0 ) + net-libs/libssh2 + net-libs/http-parser" +RDEPEND="${COMMON_DEPEND} + net-misc/curl[ssl]" +DEPEND="${COMMON_DEPEND} + dev-util/cmake" + +DOCS="LICENSE-APACHE LICENSE-MIT LICENSE-THIRD-PARTY README.md" + +pkg_setup() { + local postfix + use amd64 && postfix=x86_64-unknown-linux-gnu + use x86 && postfix=i686-unknown-linux-gnu + + # Download nightly cargo to bootstrap from it + + wget "${BIN_CARGO_URI}-${postfix}.tar.gz" || die + unpack "./cargo-nightly-${postfix}.tar.gz" + mv "./cargo-nightly-${postfix}" "./cargo" +} + +src_compile() { + "$HOME/cargo/cargo/bin/cargo" build --release || die +} +src_install() { + default + dobin target/release/${PN} + doman src/etc/man/${PN}*.1 + newbashcomp src/etc/cargo.bashcomp.sh cargo + insinto /usr/share/zsh/site-functions + doins src/etc/_cargo +} |