commit: 8e5a5aac6f54405df004e342cf207b5baa120953 Author: Dirkjan Ochtman <djc <AT> gentoo <DOT> org> AuthorDate: Fri Sep 30 18:53:16 2016 +0000 Commit: Dirkjan Ochtman <djc <AT> gentoo <DOT> org> CommitDate: Fri Sep 30 18:53:16 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e5a5aac
dev-util/cargo: require rust-1.9.0 (fixes bug 591942) Also updates the crates.io registry index to something more recent. Package-Manager: portage-2.3.0 dev-util/cargo/Manifest | 1 + dev-util/cargo/cargo-0.13.0-r1.ebuild | 174 ++++++++++++++++++++++++++++++++++ 2 files changed, 175 insertions(+) diff --git a/dev-util/cargo/Manifest b/dev-util/cargo/Manifest index 5d8dee1..51adff4 100644 --- a/dev-util/cargo/Manifest +++ b/dev-util/cargo/Manifest @@ -7,6 +7,7 @@ DIST bitflags-0.7.0.crate 10851 SHA256 aad18937a628ec6abcd26d1489012cc0e18c21798 DIST bufstream-0.1.1.crate 7437 SHA256 7e493de6a8aed51697088e36dc5245ea3edd34e6872e32c732e5f996ed5b23b2 SHA512 e1d378a5dd9d6b096f9b8d9de018c17652615ff373d1644b0978b74325f22fba2157ce0aa9fba423e1f452119af1485a72c2e44f7b3b8c5350dfd3f8f2e93436 WHIRLPOOL de26e042bbb6323946d8570c682fa9ea08292508910ca7c928206935d6c1f6c888d3cb04bf285f1404b59c109cf813cc79ecbc64a6d16dfabf72412aabfc6be9 DIST cargo-0.12.0.tar.gz 574902 SHA256 4080d76b56b8202f7df271b4bb7d7d22abea5ff8c261aef42e6e5d248ca5972b SHA512 6fba348b068c07d49a6a263f143b31c3dff1e0aa399b90193830ad1823a3c07c5097fb39ff09fcc7713e78e85cfa1b5d8825db75055c49e2c3237fe4bffad3bc WHIRLPOOL dceacc324bf167276c0f3163c1a476064362679220e0c310c97021e69b691d3c03fc6b6f967b66290c7c63512ca70ac78c09642585ef5f96264bffd50603c832 DIST cargo-0.13.0.tar.gz 610125 SHA256 90429180d3724385acb094f2896feea0c73690451a92215d6054d05edf4a5c49 SHA512 04b5ad177fb58696534eeee9a11da36a1fff0d883ff2b21e783a6163c0c5497d559c44c9fb98e201eb7e5dc0e72608f83f9990e239df3a23824c961e305cced7 WHIRLPOOL 8d40be025f04097ec34866ecf242bd31734a9820c3955b936099266f89b7f0a1d94ce4ac5b87b64ec8a43b40160ffe196deb225359279b9bf426f9c90ba040bd +DIST cargo-registry-2aed1d5050840971fd1527e2a2961e05dd392e04.tar.gz 2340078 SHA256 7739c0aeb11da985849240e86fc3df17c5494a01b79311400a268f368d66f341 SHA512 f7f001813811c1734238fdeb766537e8fdb2c79d57f6e434ef662c96c7b4ee3ca4c8afd751e7e24a39a22181676ef4a07ac0c9f3d1797a1c9b764a25fcc0b9fb WHIRLPOOL 80101bc037e4402dc8ae3ea1446c0fe3f85b77935b82b043f79b4074d00cba63f5d5bb03cfc0700e93b974189072035f75d7804993586a5dbb79c26a427d7c88 DIST cargo-registry-64a9f2f594cefc2ca652e0cecf7ce6e41c0279ee.tar.gz 2149630 SHA256 3c0f6e30fa266e39975e8b983d325f34c0d34e6b9bfb82ad93c625b33f2adc82 SHA512 57341ef04e747ddb67d1105b7599ad59fbb386b71ae885158c5163654d409933e086bc55cc5bc15735afdb1013e3fe127df474269073c9d800c598af026592cc WHIRLPOOL d2eb55b69f5fc7163672a43e626d475b1bf4d15ddf0a66e6a0b8fa7dce2deb7bf5ed4aa5754db5761d483b6516bf97c2ad6b70e887473e036272725e749f0c1b DIST cargo-snapshot-amd64-2016-03-21.tar.gz 4163903 SHA256 55ad9a8929303b4e06c18d0dd30b0d6296da784606d9c55cce98d5d7fc39a0b2 SHA512 475087ff1905fc42bd875488696d8f67fc68f9fb3e48ef9f25bbd6d8f949aa9a3984f61a8bd1741ce8c98e33c6910e020ea7fd5cb67cf2b7fc1703947561ae0e WHIRLPOOL ddda8983c38f238237fbb78fd8242e08df44c31bd0c29d2e75b53dcb0ecc601660f4c765b00e066781da6feb9ccccf8df494b99228b126f3cdd89d028253c2c5 DIST cargo-snapshot-x86-2016-03-21.tar.gz 3889095 SHA256 b2a1c4c33fb9274771c8d830cd8ac07f7ae96af341fa30399d6929ffd6c8b425 SHA512 3c6d6a9c6ee2a93abec5c9c3d79f86a623db6429e192d028729279c07d5769548d6f716afbd8e984ab2f6449f75cd24efb32b87f97b6b90c0e7b3b25779e8624 WHIRLPOOL 8bafd298e6cf54d22c420859c105be98047b556802494d2ccf9b13b06837f85902cf61fd1846dcff3e527d0ce0ee188723f44f4cb598cc34e0fedb6c2f2b3d41 diff --git a/dev-util/cargo/cargo-0.13.0-r1.ebuild b/dev-util/cargo/cargo-0.13.0-r1.ebuild new file mode 100644 index 00000000..5f12386 --- /dev/null +++ b/dev-util/cargo/cargo-0.13.0-r1.ebuild @@ -0,0 +1,174 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +CARGO_SNAPSHOT_DATE="2016-03-21" +CARGO_INDEX_COMMIT="2aed1d5050840971fd1527e2a2961e05dd392e04" +CRATES="advapi32-sys-0.2.0 +aho-corasick-0.5.2 +bitflags-0.1.1 +bitflags-0.7.0 +cfg-if-0.1.0 +cmake-0.1.17 +crates-io-0.4.0 +crossbeam-0.2.9 +curl-0.3.2 +curl-sys-0.2.1 +docopt-0.6.82 +env_logger-0.3.4 +filetime-0.1.10 +flate2-0.2.14 +fs2-0.2.5 +gcc-0.3.32 +gdi32-sys-0.2.0 +git2-0.4.4 +git2-curl-0.5.0 +glob-0.2.11 +idna-0.1.0 +kernel32-sys-0.2.2 +lazy_static-0.2.1 +libc-0.2.15 +libgit2-sys-0.4.5 +libressl-pnacl-sys-2.1.6 +libssh2-sys-0.1.38 +libz-sys-1.0.5 +log-0.3.6 +matches-0.1.2 +memchr-0.1.11 +miniz-sys-0.1.7 +miow-0.1.3 +net2-0.2.26 +nom-1.2.4 +num-0.1.34 +num-bigint-0.1.33 +num-complex-0.1.33 +num-integer-0.1.32 +num-iter-0.1.32 +num-rational-0.1.32 +num-traits-0.1.34 +num_cpus-1.0.0 +openssl-0.7.14 +openssl-sys-0.7.14 +openssl-sys-extras-0.7.14 +pkg-config-0.3.8 +pnacl-build-helper-1.4.10 +rand-0.3.14 +regex-0.1.73 +regex-syntax-0.3.4 +rustc-serialize-0.3.19 +semver-0.2.3 +strsim-0.3.0 +tar-0.4.8 +tempdir-0.3.5 +term-0.4.4 +thread-id-2.0.0 +thread_local-0.2.6 +toml-0.2.0 +unicode-bidi-0.2.3 +unicode-normalization-0.1.2 +url-1.2.0 +user32-sys-0.2.0 +utf8-ranges-0.1.3 +winapi-0.2.8 +winapi-build-0.1.1 +ws2_32-sys-0.2.1 +" + +inherit cargo bash-completion-r1 + +DESCRIPTION="The Rust's package manager" +HOMEPAGE="http://crates.io" +SRC_URI="https://github.com/rust-lang/cargo/archive/${PV}.tar.gz -> ${P}.tar.gz + https://github.com/rust-lang/crates.io-index/archive/${CARGO_INDEX_COMMIT}.tar.gz -> cargo-registry-${CARGO_INDEX_COMMIT}.tar.gz + $(cargo_crate_uris ${CRATES}) + x86? ( + https://static.rust-lang.org/cargo-dist/${CARGO_SNAPSHOT_DATE}/cargo-nightly-i686-unknown-linux-gnu.tar.gz -> + cargo-snapshot-x86-${CARGO_SNAPSHOT_DATE}.tar.gz + ) + amd64? ( + https://static.rust-lang.org/cargo-dist/${CARGO_SNAPSHOT_DATE}/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz -> + cargo-snapshot-amd64-${CARGO_SNAPSHOT_DATE}.tar.gz + )" + +RESTRICT="mirror" +LICENSE="|| ( MIT Apache-2.0 )" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="doc" + +COMMON_DEPEND="sys-libs/zlib + dev-libs/openssl:0= + net-libs/libssh2 + net-libs/http-parser" +RDEPEND="${COMMON_DEPEND} + !dev-util/cargo-bin + net-misc/curl[ssl]" +DEPEND="${COMMON_DEPEND} + >=dev-lang/rust-1.9.0:stable + dev-util/cmake + sys-apps/coreutils + sys-apps/diffutils + sys-apps/findutils + sys-apps/sed" + +src_configure() { + # Cargo only supports these GNU triples: + # - Linux: <arch>-unknown-linux-gnu + # - MacOS: <arch>-apple-darwin + # - Windows: <arch>-pc-windows-gnu + # where <arch> could be 'x86_64' (amd64) or 'i686' (x86) + use amd64 && CTARGET="x86_64-unknown-linux-gnu" + use x86 && CTARGET="i686-unknown-linux-gnu" + + # NOTE: 'disable-nightly' is used by crates (such as 'matches') to entirely + # skip their internal libraries that make use of unstable rustc features. + # Don't use 'enable-nightly' with a stable release of rustc as DEPEND, + # otherwise you could get compilation issues. + # see: github.com/gentoo/gentoo-rust/issues/13 + local myeconfargs=( + --host=${CTARGET} + --build=${CTARGET} + --target=${CTARGET} + --enable-optimize + --disable-nightly + --disable-verify-install + --disable-debug + --disable-cross-tests + ) + econf "${myeconfargs[@]}" +} + +src_compile() { + # Building sources + export CARGO_HOME="${ECARGO_HOME}" + emake VERBOSE=1 PKG_CONFIG_PATH="" + + # Building HTML documentation + use doc && emake doc +} + +src_install() { + emake prepare-image-${CTARGET} IMGDIR_${CTARGET}="${ED}/usr" + + # Install HTML documentation + use doc && HTML_DOCS=("target/doc") + einstalldocs + + dobashcomp "${ED}"/usr/etc/bash_completion.d/cargo + rm -rf "${ED}"/usr/etc || die +} + +src_test() { + # Running unit tests + # NOTE: by default 'make test' uses the copy of cargo (v0.0.1-pre-nighyly) + # from the installer snapshot instead of the version just built, so the + # ebuild needs to override the value of CFG_LOCAL_CARGO to avoid false + # positives from unit tests. + emake test \ + CFG_ENABLE_OPTIMIZE=1 \ + VERBOSE=1 \ + CFG_LOCAL_CARGO="${WORKDIR}"/${P}/target/${CTARGET}/release/cargo +}