From 1fda2a37c284114233c6f4d11a681134c07e319e Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 5 Mar 2024 19:04:41 -0500 Subject: [PATCH] patch v4l2-sys-mit, nettle-sys, fix keyfork-zbar-sys --- Cargo.lock | 52 ++++++++++------------- Cargo.toml | 3 ++ crates/qrcode/keyfork-zbar-sys/Cargo.toml | 2 +- crates/qrcode/keyfork-zbar/Cargo.toml | 7 +-- crates/qrcode/keyfork-zbar/src/image.rs | 1 - vendor/nettle-sys-2.3.0/Cargo.toml | 1 - vendor/v4l2-sys-mit-0.3.0/Cargo.toml | 3 +- 7 files changed, 33 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 48430d9..3c65f88 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -367,7 +367,6 @@ dependencies = [ "clang-sys", "lazy_static", "lazycell", - "log", "peeking_take_while", "prettyplease", "proc-macro2", @@ -376,7 +375,6 @@ dependencies = [ "rustc-hash", "shlex", "syn 2.0.48", - "which", ] [[package]] @@ -399,6 +397,26 @@ dependencies = [ "syn 2.0.48", ] +[[package]] +name = "bindgen" +version = "0.69.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" +dependencies = [ + "bitflags 2.4.2", + "cexpr", + "clang-sys", + "itertools", + "lazy_static", + "lazycell", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "syn 2.0.48", +] + [[package]] name = "bip39" version = "2.0.0" @@ -1486,15 +1504,6 @@ dependencies = [ "digest", ] -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "iana-time-zone" version = "0.1.59" @@ -1864,6 +1873,7 @@ dependencies = [ name = "keyfork-zbar" version = "0.1.0" dependencies = [ + "bindgen 0.69.4", "image", "keyfork-zbar-sys", "thiserror", @@ -2130,10 +2140,8 @@ dependencies = [ [[package]] name = "nettle-sys" version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b495053a10a19a80e3a26bf1212e92e29350797b5f5bdc58268c3f3f818e66ec" dependencies = [ - "bindgen 0.68.1", + "bindgen 0.65.1", "cc", "libc", "pkg-config", @@ -3501,10 +3509,8 @@ dependencies = [ [[package]] name = "v4l2-sys-mit" version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6779878362b9bacadc7893eac76abe69612e8837ef746573c4a5239daf11990b" dependencies = [ - "bindgen 0.65.1", + "bindgen 0.68.1", ] [[package]] @@ -3619,18 +3625,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix 0.38.31", -] - [[package]] name = "winapi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index 062acbe..e707c2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,3 +29,6 @@ members = [ opt-level = 3 debug = true +[patch.crates-io] +nettle-sys = { path = "vendor/nettle-sys-2.3.0" } +v4l2-sys-mit = { path = "vendor/v4l2-sys-mit-0.3.0" } diff --git a/crates/qrcode/keyfork-zbar-sys/Cargo.toml b/crates/qrcode/keyfork-zbar-sys/Cargo.toml index a0e0aab..22a2f49 100644 --- a/crates/qrcode/keyfork-zbar-sys/Cargo.toml +++ b/crates/qrcode/keyfork-zbar-sys/Cargo.toml @@ -10,5 +10,5 @@ license = "MIT" [dependencies] [build-dependencies] -bindgen = { version = "0.68", default-features = false, features = ["runtime"] } +bindgen = { version = "0.68", default-features = false } pkg-config = "0.3" diff --git a/crates/qrcode/keyfork-zbar/Cargo.toml b/crates/qrcode/keyfork-zbar/Cargo.toml index d1efa96..216f0da 100644 --- a/crates/qrcode/keyfork-zbar/Cargo.toml +++ b/crates/qrcode/keyfork-zbar/Cargo.toml @@ -8,13 +8,14 @@ license = "MIT" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -default = ["image"] -image = ["dep:image"] +link-runtime = ["bindgen/runtime"] +link-static = ["bindgen/static"] [dependencies] keyfork-zbar-sys = { version = "0.1.0", path = "../keyfork-zbar-sys", registry = "distrust" } -image = { version = "0.24.7", default-features = false, optional = true } +image = { version = "0.24.7", default-features = false } thiserror = "1.0.56" +bindgen = { version = "0.69.4", default-features = false, optional = true } [dev-dependencies] v4l = "0.14.0" diff --git a/crates/qrcode/keyfork-zbar/src/image.rs b/crates/qrcode/keyfork-zbar/src/image.rs index f49f580..3a266d1 100644 --- a/crates/qrcode/keyfork-zbar/src/image.rs +++ b/crates/qrcode/keyfork-zbar/src/image.rs @@ -55,7 +55,6 @@ impl Image { } } -#[cfg(feature = "image")] mod impls { use super::*; use image::{DynamicImage, GenericImageView}; diff --git a/vendor/nettle-sys-2.3.0/Cargo.toml b/vendor/nettle-sys-2.3.0/Cargo.toml index 4ad78c4..7c81f82 100644 --- a/vendor/nettle-sys-2.3.0/Cargo.toml +++ b/vendor/nettle-sys-2.3.0/Cargo.toml @@ -43,7 +43,6 @@ version = "0.2" [build-dependencies.bindgen] version = ">= 0.58.0, < 0.69.0" -features = ["runtime"] default-features = false [build-dependencies.cc] diff --git a/vendor/v4l2-sys-mit-0.3.0/Cargo.toml b/vendor/v4l2-sys-mit-0.3.0/Cargo.toml index 8a4cbfd..d8d39dc 100644 --- a/vendor/v4l2-sys-mit-0.3.0/Cargo.toml +++ b/vendor/v4l2-sys-mit-0.3.0/Cargo.toml @@ -19,4 +19,5 @@ description = "Raw v4l2 bindings (MIT licensed)" license = "MIT" [build-dependencies.bindgen] -version = "0.65.1" +version = "0.68.1" +default-features = false