From: Marc-André Lureau <[email protected]> Some dependencies introduced in the following patches require thiserror. Since 2.0.17, it "Use differently named __private module per patch release", using build.rs time generated code. This is not handled by meson.
Signed-off-by: Marc-André Lureau <[email protected]> --- .../packagefiles/syn-2-rs/meson/meson.build | 3 +++ .../packagefiles/thiserror-2.0.17-include.patch | 14 ++++++++++++++ .../thiserror-impl-2.0.17-include.patch | 13 +++++++++++++ subprojects/syn-2-rs.wrap | 11 ++++++----- subprojects/thiserror-2-rs.wrap | 10 ++++++++++ subprojects/thiserror-impl-2-rs.wrap | 10 ++++++++++ 6 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 subprojects/packagefiles/syn-2-rs/meson/meson.build create mode 100644 subprojects/packagefiles/thiserror-2.0.17-include.patch create mode 100644 subprojects/packagefiles/thiserror-impl-2.0.17-include.patch create mode 100644 subprojects/thiserror-2-rs.wrap create mode 100644 subprojects/thiserror-impl-2-rs.wrap diff --git a/subprojects/packagefiles/syn-2-rs/meson/meson.build b/subprojects/packagefiles/syn-2-rs/meson/meson.build new file mode 100644 index 0000000000..02439c2b58 --- /dev/null +++ b/subprojects/packagefiles/syn-2-rs/meson/meson.build @@ -0,0 +1,3 @@ +extra_args += [ + '--cfg', 'feature="full"', +] diff --git a/subprojects/packagefiles/thiserror-2.0.17-include.patch b/subprojects/packagefiles/thiserror-2.0.17-include.patch new file mode 100644 index 0000000000..a061aeea57 --- /dev/null +++ b/subprojects/packagefiles/thiserror-2.0.17-include.patch @@ -0,0 +1,14 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 155272d..7683f4c 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -288,4 +288,8 @@ pub use thiserror_impl::*; + + mod private; + +-include!(concat!(env!("OUT_DIR"), "/private.rs")); ++#[doc(hidden)] ++pub mod __private_MESON { ++ #[doc(hidden)] ++ pub use crate::private::*; ++} diff --git a/subprojects/packagefiles/thiserror-impl-2.0.17-include.patch b/subprojects/packagefiles/thiserror-impl-2.0.17-include.patch new file mode 100644 index 0000000000..372862dffa --- /dev/null +++ b/subprojects/packagefiles/thiserror-impl-2.0.17-include.patch @@ -0,0 +1,13 @@ +diff --git a/impl/src/lib.rs b/impl/src/lib.rs +index 25890f2..1559a41 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -48,7 +48,7 @@ struct private; + impl ToTokens for private { + fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) { + tokens.append(Ident::new( +- concat!("__private", env!("CARGO_PKG_VERSION_PATCH")), ++ concat!("__private", "_MESON"), + Span::call_site(), + )); + } diff --git a/subprojects/syn-2-rs.wrap b/subprojects/syn-2-rs.wrap index 8ec7fd0052..82675e8723 100644 --- a/subprojects/syn-2-rs.wrap +++ b/subprojects/syn-2-rs.wrap @@ -1,9 +1,10 @@ [wrap-file] -directory = syn-2.0.104 -source_url = https://crates.io/api/v1/crates/syn/2.0.104/download -source_filename = syn-2.0.104.0.tar.gz -source_hash = 17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40 +directory = syn-2.0.110 +source_url = https://crates.io/api/v1/crates/syn/2.0.110/download +source_filename = syn-2.0.110.tar.gz +source_hash = a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea method = cargo +patch_directory = syn-2-rs # bump this version number on every change to meson.build or the patches: -# v3 +# v4 diff --git a/subprojects/thiserror-2-rs.wrap b/subprojects/thiserror-2-rs.wrap new file mode 100644 index 0000000000..432d99d937 --- /dev/null +++ b/subprojects/thiserror-2-rs.wrap @@ -0,0 +1,10 @@ +[wrap-file] +directory = thiserror-2.0.17 +source_url = https://crates.io/api/v1/crates/thiserror/2.0.17/download +source_filename = thiserror-2.0.17.tar.gz +source_hash = f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8 +method = cargo +diff_files = thiserror-2.0.17-include.patch + +# bump this version number on every change to meson.build or the patches: +# v2 diff --git a/subprojects/thiserror-impl-2-rs.wrap b/subprojects/thiserror-impl-2-rs.wrap new file mode 100644 index 0000000000..f0eb263607 --- /dev/null +++ b/subprojects/thiserror-impl-2-rs.wrap @@ -0,0 +1,10 @@ +[wrap-file] +directory = thiserror-impl-2.0.17 +source_url = https://crates.io/api/v1/crates/thiserror-impl/2.0.17/download +source_filename = thiserror-impl-2.0.17.tar.gz +source_hash = 3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913 +method = cargo +diff_files = thiserror-impl-2.0.17-include.patch + +# bump this version number on every change to meson.build or the patches: +# v2 -- 2.51.1
