build: cross-compilation for macos, patch openpnp-capture-rs

This commit is contained in:
ardocrat 2024-06-18 13:25:23 +03:00
parent 3c5f9b8e3a
commit 5f56042dc8
2 changed files with 8 additions and 43 deletions

44
Cargo.lock generated
View file

@ -1373,9 +1373,6 @@ name = "built"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6a6c0b39c38fd754ac338b00a88066436389c0f029da5d37d1e01091d9b7c17"
dependencies = [
"git2",
]
[[package]]
name = "bumpalo"
@ -3654,19 +3651,6 @@ version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"
[[package]]
name = "git2"
version = "0.18.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "232e6a7bfe35766bf715e55a88b39a700596c0ccfd88cd3680b4cdb40d66ef70"
dependencies = [
"bitflags 2.5.0",
"libc",
"libgit2-sys",
"log",
"url",
]
[[package]]
name = "gl_generator"
version = "0.14.0"
@ -3888,6 +3872,7 @@ dependencies = [
"local-ip-address",
"log",
"nokhwa",
"openpnp_capture_sys",
"openssl-sys",
"parking_lot 0.12.3",
"qrcode",
@ -5414,18 +5399,6 @@ dependencies = [
"once_cell",
]
[[package]]
name = "libgit2-sys"
version = "0.16.2+1.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8"
dependencies = [
"cc",
"libc",
"libz-sys",
"pkg-config",
]
[[package]]
name = "liblmdb-sys"
version = "0.2.2"
@ -5508,18 +5481,6 @@ dependencies = [
"vcpkg",
]
[[package]]
name = "libz-sys"
version = "1.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e"
dependencies = [
"cc",
"libc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "linked-hash-map"
version = "0.5.6"
@ -6590,8 +6551,7 @@ dependencies = [
[[package]]
name = "openpnp_capture_sys"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "210344540125153a623f5b0c8a3880a2aef08bb7c70e92a159574047d7319507"
source = "git+https://github.com/ardocrat/openpnp-capture-rs?branch=cross_compilation_support#d03e36b804b2f3f83f4cd977bdcf3c62cdf82e8c"
dependencies = [
"bindgen 0.60.1",
"cc",

View file

@ -105,7 +105,7 @@ tokio-util = { version = "0.7.8", features = ["codec"] }
#grin_store = { path = "../grin-store" }
[build-dependencies]
built = { version = "0.7.0", features = ["git2"]}
built = "0.7.0"
[target.'cfg(all(not(target_os = "windows"), not(target_os = "android")))'.dependencies]
eye = { version = "0.5.0", default-features = false }
@ -115,6 +115,11 @@ nokhwa = { version = "0.10.4", default-features = false, features = ["input-msmf
[target.'cfg(target_os = "macos")'.dependencies]
tls-api-openssl = "0.9.0"
openpnp_capture_sys = "0.4.0"
[patch.crates-io]
### fix cross-compilation support for macos
openpnp_capture_sys = { git = "https://github.com/ardocrat/openpnp-capture-rs", branch = "cross_compilation_support" }
[target.'cfg(not(target_os = "android"))'.dependencies]
env_logger = "0.11.3"