Migrate to current librustzcash

The only upstream change relative to the previous commit is that the
various Zcash-specific dependencies have been pulled into a cargo
workspace. The dependecies in the workspace use the same commits as the
crates we had previously vendored.

The patches are necessary to handle the fact that cargo requires that
dev dependencies are available even if not used, and we would otherwise
need to vendor all the underlying crates.
This commit is contained in:
Jack Grigg
2018-10-27 17:03:47 +13:00
parent 186874bb83
commit eff2938e46
6 changed files with 686 additions and 14 deletions

View File

@@ -1,9 +1,9 @@
package=crate_aesni
$(package)_crate_name=aesni
$(package)_version=0.4.0
$(package)_version=0.4.1
$(package)_download_path=https://static.crates.io/crates/$($(package)_crate_name)
$(package)_file_name=$($(package)_crate_name)-$($(package)_version).crate
$(package)_sha256_hash=f2838c142db62c0c6aea0a24054c46d35488532fdaea0f51dbeba430f0985df5
$(package)_sha256_hash=6810b7fb9f2bb4f76f05ac1c170b8dde285b6308955dc3afd89710268c958d9e
$(package)_crate_versioned_name=$($(package)_crate_name)
define $(package)_preprocess_cmds

View File

@@ -1,9 +1,9 @@
package=crate_stream_cipher
$(package)_crate_name=stream-cipher
$(package)_version=0.1.0
$(package)_version=0.1.1
$(package)_download_path=https://static.crates.io/crates/$($(package)_crate_name)
$(package)_file_name=$($(package)_crate_name)-$($(package)_version).crate
$(package)_sha256_hash=ac49bc6cb2847200d18bfb738ce89448570f4aa1c34ac0348db6205ee69a0777
$(package)_sha256_hash=30dc6118470d69ce0fdcf7e6f95e95853f7f4f72f80d835d4519577c323814ab
$(package)_crate_versioned_name=$($(package)_crate_name)
define $(package)_preprocess_cmds

View File

@@ -3,10 +3,10 @@ $(package)_version=0.1
$(package)_download_path=https://github.com/zcash/$(package)/archive/
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
$(package)_download_file=$($(package)_git_commit).tar.gz
$(package)_sha256_hash=e9a488a8bbecf7fb237a32dadd65133211ef61616d44cf55609e029837a41004
$(package)_git_commit=f5e5cb24e1bd756a02fc4a3fd2b824238ccd15ad
$(package)_sha256_hash=d2f0d93876b490f9c20060d28dcad833eb85e0609163a1106f540153e1b459c9
$(package)_git_commit=041671f6425563bdef43c7c907a8396da76f8f21
$(package)_dependencies=rust $(rust_crates)
$(package)_patches=cargo.config
$(package)_patches=cargo.config 0001-Start-using-cargo-clippy-for-CI.patch remove-dev-dependencies.diff
ifeq ($(host_os),mingw32)
$(package)_library_file=target/x86_64-pc-windows-gnu/release/rustzcash.lib
@@ -20,17 +20,21 @@ $(package)_build_opts_mingw32=--target=x86_64-pc-windows-gnu
endef
define $(package)_preprocess_cmds
patch -p1 -d pairing < $($(package)_patch_dir)/0001-Start-using-cargo-clippy-for-CI.patch && \
patch -p1 < $($(package)_patch_dir)/remove-dev-dependencies.diff && \
mkdir .cargo && \
cat $($(package)_patch_dir)/cargo.config | sed 's|CRATE_REGISTRY|$(host_prefix)/$(CRATE_REGISTRY)|' > .cargo/config
endef
define $(package)_build_cmds
cargo build $($(package)_build_opts)
cd librustzcash && \
cargo build $($(package)_build_opts) && \
cd ..
endef
define $(package)_stage_cmds
mkdir $($(package)_staging_dir)$(host_prefix)/lib/ && \
mkdir $($(package)_staging_dir)$(host_prefix)/include/ && \
cp $($(package)_library_file) $($(package)_staging_dir)$(host_prefix)/lib/ && \
cp include/librustzcash.h $($(package)_staging_dir)$(host_prefix)/include/
cp librustzcash/include/librustzcash.h $($(package)_staging_dir)$(host_prefix)/include/
endef

View File

@@ -3,7 +3,6 @@ rust_crates := \
crate_aesni \
crate_aes_soft \
crate_arrayvec \
crate_bellman \
crate_bitflags \
crate_bit_vec \
crate_blake2_rfc \
@@ -27,15 +26,12 @@ rust_crates := \
crate_num_integer \
crate_num_traits \
crate_opaque_debug \
crate_pairing \
crate_rand \
crate_sapling_crypto \
crate_stream_cipher \
crate_typenum \
crate_winapi_i686_pc_windows_gnu \
crate_winapi \
crate_winapi_x86_64_pc_windows_gnu \
crate_zip32
crate_winapi_x86_64_pc_windows_gnu
rust_packages := rust $(rust_crates) librustzcash
proton_packages := proton
zcash_packages := libgmp libsodium