diff options
author | 2017-06-26 16:52:41 +0400 | |
---|---|---|
committer | 2017-06-26 16:52:41 +0400 | |
commit | b02df91aaae9810ccafaedd5f7e0d9636e38d7a3 (patch) | |
tree | 7f2dae896d9ef5abf44ede40b59a3aed7d726389 /eclass | |
parent | Merge pull request #273 from laomaiweng/patch-1 (diff) | |
download | rust-b02df91aaae9810ccafaedd5f7e0d9636e38d7a3.tar.gz rust-b02df91aaae9810ccafaedd5f7e0d9636e38d7a3.tar.bz2 rust-b02df91aaae9810ccafaedd5f7e0d9636e38d7a3.zip |
clean up eclass and old cargo ebuilds/patches
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/cargo.eclass | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass deleted file mode 100644 index f674181..0000000 --- a/eclass/cargo.eclass +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -# @ECLASS: cargo.eclass -# @MAINTAINER: -# rust@gentoo.org -# @AUTHOR: -# Doug Goldstein <cardoe@gentoo.org> -# @BLURB: common functions and variables for cargo builds - -if [[ -z ${_CARGO_ECLASS} ]]; then -_CARGO_ECLASS=1 - -case ${EAPI} in - 6) : ;; - *) die "EAPI=${EAPI:-0} is not supported" ;; -esac - -EXPORT_FUNCTIONS src_unpack - -ECARGO_HOME="${WORKDIR}/cargo_home" -ECARGO_REPO="github.com-88ac128001ac3a9a" -ECARGO_INDEX="${ECARGO_HOME}/registry/index/${ECARGO_REPO}" -ECARGO_SRC="${ECARGO_HOME}/registry/src/${ECARGO_REPO}" -ECARGO_CACHE="${ECARGO_HOME}/registry/cache/${ECARGO_REPO}" - -# @FUNCTION: cargo_crate_uris -# @DESCRIPTION: -# Generates the URIs to put in SRC_URI to help fetch dependencies. -cargo_crate_uris() { - for crate in $*; do - local name version url - name="${crate%-*}" - version="${crate##*-}" - url="https://crates.io/api/v1/crates/${name}/${version}/download -> ${crate}.crate" - echo $url - done -} - -# @FUNCTION: cargo_src_unpack -# @DESCRIPTION: -# Unpacks the package and the cargo registry -cargo_src_unpack() { - debug-print-function ${FUNCNAME} "$@" - - mkdir -p "${ECARGO_INDEX}" || die - mkdir -p "${ECARGO_CACHE}" || die - mkdir -p "${ECARGO_SRC}" || die - mkdir -p "${S}" || die - - local archive - for archive in ${A}; do - case "${archive}" in - *.crate) - ebegin "Unpacking ${archive}" - cp "${DISTDIR}"/${archive} "${ECARGO_CACHE}/" || die - tar -xf "${DISTDIR}"/${archive} -C "${ECARGO_SRC}/" || die - eend $? - ;; - cargo-snapshot*) - ebegin "Unpacking ${archive}" - mkdir -p "${S}"/target/snapshot - tar -xzf "${DISTDIR}"/${archive} -C "${S}"/target/snapshot --strip-components 2 || die - # cargo's makefile needs this otherwise it will try to - # download it - touch "${S}"/target/snapshot/bin/cargo || die - eend $? - ;; - cargo-registry*) - ebegin "Unpacking ${archive}" - tar -xzf "${DISTDIR}"/${archive} -C "${ECARGO_INDEX}" --strip-components 1 || die - # prevent cargo from attempting to download this again - touch "${ECARGO_INDEX}"/.cargo-index-lock || die - eend $? - ;; - *) - unpack ${archive} - ;; - esac - done -} - - -fi |