rust-cbindgen-0.19-antioxidant-compatibility.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From beabb5f2ea590f1af5c8fa58c401b53d71ea663c Mon Sep 17 00:00:00 2001
  2. From: Maxime Devos <maximedevos@telenet.be>
  3. Date: Sat, 11 Jun 2022 10:26:47 +0000
  4. Subject: [PATCH] TODO
  5. ---
  6. src/bindgen/cargo/cargo_metadata.rs | 15 +--------------
  7. 1 file changed, 1 insertion(+), 14 deletions(-)
  8. diff --git a/src/bindgen/cargo/cargo_metadata.rs b/src/bindgen/cargo/cargo_metadata.rs
  9. index 0b977d4..29aca50 100644
  10. --- a/src/bindgen/cargo/cargo_metadata.rs
  11. +++ b/src/bindgen/cargo/cargo_metadata.rs
  12. @@ -184,20 +184,6 @@ pub fn metadata(
  13. - let output;
  14. let metadata = match existing_metadata_file {
  15. Some(path) => Cow::Owned(std::fs::read_to_string(path)?),
  16. - None => {
  17. - let cargo = env::var("CARGO").unwrap_or_else(|_| String::from("cargo"));
  18. - let mut cmd = Command::new(cargo);
  19. - cmd.arg("metadata");
  20. - cmd.arg("--all-features");
  21. - cmd.arg("--format-version").arg("1");
  22. - cmd.arg("--manifest-path");
  23. - cmd.arg(manifest_path);
  24. - output = cmd.output()?;
  25. - if !output.status.success() {
  26. - return Err(Error::Metadata(output));
  27. - }
  28. - Cow::Borrowed(std::str::from_utf8(&output.stdout)?)
  29. - }
  30. + None => Cow::Owned(std::fs::read_to_string(env::var("ANTIOXIDANT_CBINDGEN_METADATA").expect("add the generate-cbindgen-metadata phase to the package definition"))?)
  31. };
  32. let meta: Metadata = serde_json::from_str(&*metadata)?;
  33. base-commit: d9e490ce8b836194595bd30611253a7028059da2
  34. --
  35. 2.30.2