Repository: bitcoin/bitcoin (language: cpp)

Issue:
Unable to cross compile Zeromq Dependency for arm64-apple-darwin
<!-- Describe the issue -->

Trying to compile starting with dependencies fails with 

checking build system type... x86_64-pc-linux-gnu
checking host system type... Invalid configuration `arm64-apple-darwin': machine `arm64-apple' not recognized
configure: error: /bin/bash config/config.sub arm64-apple-darwin failed

**Expected behavior**

<!--- What behavior did you expect? -->

**Actual behavior**

checking for arm64-apple-darwin-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for xmlto... no
checking for asciidoc... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... Invalid configuration `arm64-apple-darwin': machine `arm64-apple' not recognized
configure: error: /bin/bash config/config.sub arm64-apple-darwin failed
make: *** [funcs.mk:289: /home/bitcoin/Downloads/bitcoin-master/depends/work/build/arm64-apple-darwin/zeromq/4.3.4-0f6f30942e0/./.stamp_configured] Error 1


**To reproduce**

command : make HOST=arm64-apple-darwin -j 8

**System information**

Master Branch
Ubuntu 20.04 
Core i5 intel 16GB RAM



Discussion / hints:
Depends has it's own config.guess and config.sub, that does recognise `arm64-apple-darwin` (which it converts to `aarch64-apple-darwin`), which we [copy and use](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/zeromq.mk#L24) when building zeromq. I can't recreate your issue using the details you've provided, so you'll have to provide more information.
Not sure what other info i can possibly provide. I just cloned the git, go into depends and run 

``` make HOST=arm64-apple-darwin ```

With the optional -j 8 for number of threads to use. 

I tested other builds namely ``` x86_64-apple-darwin ```  and ``` x86_64-w64-mingw32 ```

Those worked just fine 

Fix patch:
diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk
index 267ed11253186..d7152327934fb 100644
--- a/depends/packages/zeromq.mk
+++ b/depends/packages/zeromq.mk
@@ -20,12 +20,12 @@ endef
 
 define $(package)_preprocess_cmds
   patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch && \
-  patch -p1 < $($(package)_patch_dir)/netbsd_kevent_void.patch && \
-  cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config
+  patch -p1 < $($(package)_patch_dir)/netbsd_kevent_void.patch
 endef
 
 define $(package)_config_cmds
   ./autogen.sh && \
+  cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config && \
   $($(package)_autoconf)
 endef
 


Test patch: