Signed-off-by: Zhao Liu <zhao1....@intel.com>
---
 scripts/archive-source.sh                     |  3 ++-
 scripts/make-release                          |  3 ++-
 subprojects/.gitignore                        |  1 +
 .../meson.build                               | 20 +++++++++++++++++++
 .../winapi-i686-pc-windows-gnu-0.4-rs.wrap    | 10 ++++++++++
 5 files changed, 35 insertions(+), 2 deletions(-)
 create mode 100644 
subprojects/packagefiles/winapi-i686-pc-windows-gnu-0.4-rs/meson.build
 create mode 100644 subprojects/winapi-i686-pc-windows-gnu-0.4-rs.wrap

diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh
index 3ae064f65263..2dff5d3d89fe 100755
--- a/scripts/archive-source.sh
+++ b/scripts/archive-source.sh
@@ -31,7 +31,8 @@ subprojects="keycodemapdb libvfio-user berkeley-softfloat-3
   bilge-impl-0.2-rs either-1-rs foreign-0.3-rs itertools-0.11-rs
   libc-0.2-rs proc-macro2-1-rs
   proc-macro-error-1-rs proc-macro-error-attr-1-rs quote-1-rs
-  syn-2-rs thiserror-1-rs thiserror-impl-1-rs unicode-ident-1-rs"
+  syn-2-rs thiserror-1-rs thiserror-impl-1-rs unicode-ident-1-rs
+  winapi-i686-pc-windows-gnu-0.4-rs"
 sub_deinit=""
 
 function cleanup() {
diff --git a/scripts/make-release b/scripts/make-release
index 73a14c12bdeb..f7a1481f856a 100755
--- a/scripts/make-release
+++ b/scripts/make-release
@@ -44,7 +44,8 @@ SUBPROJECTS="libvfio-user keycodemapdb berkeley-softfloat-3
   bilge-impl-0.2-rs either-1-rs foreign-0.3-rs itertools-0.11-rs
   libc-0.2-rs proc-macro2-1-rs
   proc-macro-error-1-rs proc-macro-error-attr-1-rs quote-1-rs
-  syn-2-rs thiserror-1-rs thiserror-impl-1-rs unicode-ident-1-rs"
+  syn-2-rs thiserror-1-rs thiserror-impl-1-rs unicode-ident-1-rs
+  winapi-i686-pc-windows-gnu-0.4-rs"
 
 src="$1"
 version="$2"
diff --git a/subprojects/.gitignore b/subprojects/.gitignore
index 3b09ab42da08..838409353fca 100644
--- a/subprojects/.gitignore
+++ b/subprojects/.gitignore
@@ -22,3 +22,4 @@
 /thiserror-1.0.65
 /thiserror-impl-1.0.65
 /unicode-ident-1.0.12
+/winapi-i686-pc-windows-gnu-0.4.0
diff --git 
a/subprojects/packagefiles/winapi-i686-pc-windows-gnu-0.4-rs/meson.build 
b/subprojects/packagefiles/winapi-i686-pc-windows-gnu-0.4-rs/meson.build
new file mode 100644
index 000000000000..5ae1b87403d2
--- /dev/null
+++ b/subprojects/packagefiles/winapi-i686-pc-windows-gnu-0.4-rs/meson.build
@@ -0,0 +1,20 @@
+project('winapi-i686-pc-windows-gnu-0.4-rs', 'rust',
+ meson_version: '>=1.5.0',
+ version: '0.4.0',
+ license: 'MIT OR Apache-2.0',
+ default_options: [])
+
+lib = static_library(
+  'winapi-i686-pc-windows-gnu',
+  'src/lib.rs',
+  override_options : ['rust_std=2021', 'build.rust_std=2021'],
+  rust_abi : 'rust',
+  rust_args: ['--cap-lints', 'allow'],
+  dependencies: [thiserror_rs],
+)
+
+dep = declare_dependency(
+  link_with : [lib],
+)
+
+meson.override_dependency('winapi-i686-pc-windows-gnu-0.4-rs', dep)
diff --git a/subprojects/winapi-i686-pc-windows-gnu-0.4-rs.wrap 
b/subprojects/winapi-i686-pc-windows-gnu-0.4-rs.wrap
new file mode 100644
index 000000000000..8ec2f2351d9e
--- /dev/null
+++ b/subprojects/winapi-i686-pc-windows-gnu-0.4-rs.wrap
@@ -0,0 +1,10 @@
+[wrap-file]
+directory = winapi-i686-pc-windows-gnu-0.4.0
+source_url = 
https://crates.io/api/v1/crates/winapi-i686-pc-windows-gnu/0.4.0/download
+source_filename = winapi-i686-pc-windows-gnu-0.4.0.tar.gz
+source_hash = ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6
+#method = cargo
+patch_directory = winapi-i686-pc-windows-gnu-0.4-rs
+
+# bump this version number on every change to meson.build or the patches:
+# v2
-- 
2.34.1


Reply via email to