diff --git a/.gitignore b/.gitignore index d8a0db4..b9678b6 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /cxxbridge-macro-1.0.57.crate /cxxbridge-macro-1.0.60.crate /cxxbridge-macro-1.0.62.crate +/cxxbridge-macro-1.0.63.crate diff --git a/fix-variants-from-headers-build.patch b/fix-variants-from-headers-build.patch new file mode 100644 index 0000000..89b3e9f --- /dev/null +++ b/fix-variants-from-headers-build.patch @@ -0,0 +1,28 @@ +From cf5bbe629ee54649e5ccb195bfd10e3c3b03ae53 Mon Sep 17 00:00:00 2001 +From: David Tolnay +Date: Tue, 18 Jan 2022 17:21:08 -0800 +Subject: [PATCH] Fix variants_from_header build + +--- + macro/src/load.rs | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/macro/src/load.rs b/macro/src/load.rs +index d769ebf6..baf88413 100644 +--- a/macro/src/load.rs ++++ b/macro/src/load.rs +@@ -1,5 +1,6 @@ + use crate::clang::{Clang, Node}; + use crate::syntax::attrs::OtherAttrs; ++use crate::syntax::cfg::CfgExpr; + use crate::syntax::namespace::Namespace; + use crate::syntax::report::Errors; + use crate::syntax::{Api, Discriminant, Doc, Enum, EnumRepr, ForeignName, Pair, Variant}; +@@ -207,6 +208,7 @@ fn traverse<'a>( + } + }; + enm.variants.push(Variant { ++ cfg: CfgExpr::Unconditional, + doc: Doc::new(), + attrs: OtherAttrs::none(), + name: Pair { diff --git a/rust-cxxbridge-macro.spec b/rust-cxxbridge-macro.spec index fe47f3e..c0e3ac8 100644 --- a/rust-cxxbridge-macro.spec +++ b/rust-cxxbridge-macro.spec @@ -5,7 +5,7 @@ %global crate cxxbridge-macro Name: rust-%{crate} -Version: 1.0.62 +Version: 1.0.63 Release: %autorelease Summary: Implementation detail of the cxx crate @@ -14,6 +14,10 @@ License: MIT or ASL 2.0 URL: https://crates.io/crates/cxxbridge-macro Source: %{crates_source} +# Backports: Remove on update +# https://github.com/dtolnay/cxx/commit/cf5bbe629ee54649e5ccb195bfd10e3c3b03ae53.patch +Patch: fix-variants-from-headers-build.patch + ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging @@ -121,7 +125,7 @@ use the "serde_json" feature of the "%{crate}" crate. %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml %prep -%autosetup -n %{crate}-%{version_no_tilde} -p1 +%autosetup -n %{crate}-%{version_no_tilde} -p2 %cargo_prep %generate_buildrequires diff --git a/sources b/sources index 15ab09c..2012086 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cxxbridge-macro-1.0.62.crate) = 14f4f68f1d8cd1e0a708ca2387244d18c59021bf011812825dc96eea5df5b297cca91f9497c1a2afd4815a9367e8302941eb5c70507a9cfc60405760f7ddaf56 +SHA512 (cxxbridge-macro-1.0.63.crate) = ce804528bc33e783da9daf7a6d48efd8a5ae3f9ba08a1b3c16e6b6b4f8c6b979def354755bbd5161dadb9ab0f971c9398516f9d52bd86c432a86f30f53330639