depends: Add support for unpackaged Rust crates

This commit is contained in:
Jack Grigg 2018-04-11 08:00:23 -06:00
parent b123b9bb79
commit c63c9f20e4
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
2 changed files with 6 additions and 3 deletions

View File

@ -10,4 +10,4 @@ sed 's|^|"|' | # 'A":"H(A)' -> '"A":"H(A)'
sed 's|$|"|' | # '"A":"H(A)' -> '"A":"H(A)"'
tr '\n' ',' | # Concatenate lines with commas
sed 's|,$||' # Remove any trailing comma (to fit JSON spec)
)},\"package\":\"$3\"}" > .cargo-checksum.json
)},\"package\":$3}" > .cargo-checksum.json

View File

@ -31,8 +31,11 @@ define fetch_file
endef
define generate_crate_checksum
rm .gitignore && \
$(BASEDIR)/cargo-checksum.sh "$($(1)_file_name)" "$(build_SHA256SUM)" "$($(1)_sha256_hash)"
$(BASEDIR)/cargo-checksum.sh "$($(1)_file_name)" "$(build_SHA256SUM)" "\"$($(1)_sha256_hash)\""
endef
define generate_unpackaged_crate_checksum
$(BASEDIR)/cargo-checksum.sh "$($(1)_file_name)" "$(build_SHA256SUM)" "null"
endef
define vendor_crate_source