cargo.eclass: add cargo_live_src_unpack()
authorGeorgy Yakovlev <gyakovlev@gentoo.org>
Thu, 29 Aug 2019 05:13:47 +0000 (22:13 -0700)
committerGeorgy Yakovlev <gyakovlev@gentoo.org>
Thu, 29 Aug 2019 18:27:27 +0000 (11:27 -0700)
commit0d640ada691b569aa2037e3f66f1ed4066efda3a
treed402f89dd6cc83b36618cd0178a7389bc90be0d4
parentb70609d6e3b3ca0c2b24b480a9074dd69ad84999
cargo.eclass: add cargo_live_src_unpack()

This function will allow using 'cargo fetch' during src_unpack
Since only new cargo supports vendoring, all live packages will
have to depend on >=rust-1.37.0

This enables us to ship live rust packages,
cargo fetch will download all crates and vendor them for offline
phases.

here's an example of src_unpack()

src_unpack() {
        if [[ "${PV}" == *9999* ]]; then
                git-r3_src_unpack
                cargo_live_src_unpack
        else
                cargo_src_unpack
        fi
}

Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
eclass/cargo.eclass