cargo: convert recipe to cargo-bitbake
Generate the Cargo recipe with cargo-bitbake instead of having a handcrafted recipe. This should make future version bumps easier. Three known issues: - license checksum of the Apache license is a generateme value due to the license file having a difference name then what's in Cargo.toml. - branch= value was wrong for tags. Pointed to HEAD instead of the branch that the underlying tag commit came from. - Use https protocol when the repo is publicly accessible.
This commit is contained in:
@@ -1,17 +1,18 @@
|
|||||||
inherit cargo
|
require cargo-snapshot.inc
|
||||||
inherit patch
|
|
||||||
|
|
||||||
SUMMARY = "Cargo downloads your Rust project's dependencies and builds your project"
|
|
||||||
HOMEPAGE = "http://crates.io"
|
|
||||||
SECTION = "devel"
|
SECTION = "devel"
|
||||||
LICENSE = "MIT | Apache-2.0"
|
|
||||||
|
|
||||||
DEPENDS = "openssl zlib libgit2 curl ca-certificates libssh2"
|
DEPENDS = "openssl zlib libgit2 curl ca-certificates libssh2"
|
||||||
|
|
||||||
SRC_URI = "\
|
SRC_URI += "\
|
||||||
http://static-rust-lang-org.s3.amazonaws.com/cargo-dist/${CARGO_SNAPSHOT} \
|
http://static-rust-lang-org.s3.amazonaws.com/cargo-dist/${CARGO_SNAPSHOT} \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
LIC_FILES_CHKSUM += " \
|
||||||
|
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
||||||
|
file://LICENSE-THIRD-PARTY;md5=892ea68b169e69cfe75097fc38a15b56 \
|
||||||
|
"
|
||||||
|
|
||||||
# Used in libgit2-sys's build.rs, needed for pkg-config to be used
|
# Used in libgit2-sys's build.rs, needed for pkg-config to be used
|
||||||
export LIBGIT2_SYS_USE_PKG_CONFIG = "1"
|
export LIBGIT2_SYS_USE_PKG_CONFIG = "1"
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,21 @@
|
|||||||
require cargo-snapshot.inc
|
# Auto-Generated by cargo-bitbake 0.3.6
|
||||||
require cargo.inc
|
#
|
||||||
|
inherit cargo
|
||||||
|
|
||||||
|
# If this is git based prefer versioned ones if they exist
|
||||||
|
# DEFAULT_PREFERENCE = "-1"
|
||||||
|
|
||||||
|
# how to get cargo could be as easy as but default to a git checkout:
|
||||||
|
# SRC_URI += "crate://crates.io/cargo/0.16.0"
|
||||||
|
SRC_URI += "git://git@github.com/rust-lang/cargo.git;protocol=https;branch=rust-1.15.1"
|
||||||
|
SRCREV = "6e0c18cccc8b0c06fba8a8d76486f81a792fb420"
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
CARGO_SRC_DIR=""
|
||||||
|
|
||||||
|
|
||||||
|
# please note if you have entries that do not begin with crate://
|
||||||
|
# you must change them to how that package can be fetched
|
||||||
SRC_URI += " \
|
SRC_URI += " \
|
||||||
git://github.com/rust-lang/cargo.git;protocol=https;name=cargo;branch=rust-1.15.1 \
|
|
||||||
crate://crates.io/advapi32-sys/0.2.0 \
|
crate://crates.io/advapi32-sys/0.2.0 \
|
||||||
crate://crates.io/aho-corasick/0.5.3 \
|
crate://crates.io/aho-corasick/0.5.3 \
|
||||||
crate://crates.io/bitflags/0.7.0 \
|
crate://crates.io/bitflags/0.7.0 \
|
||||||
@@ -72,12 +85,17 @@ SRC_URI += " \
|
|||||||
crate://crates.io/ws2_32-sys/0.2.1 \
|
crate://crates.io/ws2_32-sys/0.2.1 \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRCREV_cargo = "6e0c18cccc8b0c06fba8a8d76486f81a792fb420"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
LIC_FILES_CHKSUM=" \
|
LIC_FILES_CHKSUM=" \
|
||||||
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
|
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
|
||||||
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
|
||||||
file://LICENSE-THIRD-PARTY;md5=892ea68b169e69cfe75097fc38a15b56 \
|
|
||||||
"
|
"
|
||||||
|
|
||||||
|
SUMMARY = "Cargo, a package manager for Rust."
|
||||||
|
HOMEPAGE = "https://crates.io"
|
||||||
|
LICENSE = "MIT | Apache-2.0"
|
||||||
|
|
||||||
|
# includes this file if it exists but does not fail
|
||||||
|
# this is useful for anything you may want to override from
|
||||||
|
# what cargo-bitbake generates.
|
||||||
|
include cargo.inc
|
||||||
|
|||||||
Reference in New Issue
Block a user