On 2/21/23 13:47, marcandre.lur...@redhat.com wrote:
From: Marc-André Lureau <marcandre.lur...@redhat.com>

This allows to build with --enable-slirp / -D slirp=enabled, even when
libslirp is not installed on the system. Meson will pull it from git in
that case.

RFC because this is very convenient, for a developper targetting
different environments, but might not be considered appropriate, as it
is "a kind of" git submodule (without git submodule integration issues
though, afaik, experience should tell).

Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>

I have no objections to using wraps for slirp and especially libfdt (though the latter is not yet part of wrapdb).

However, right now meson will do network access without respecting --with-git-submodule= or something like that, i.e. with no way to avoid the fallback.

As a start, configure could hardcode --wrap-mode=nodownload, so that wraps would be used only after a conscious decision of the user to use "meson subprojects download".

Paolo

---
  .gitignore             | 2 ++
  subprojects/slirp.wrap | 6 ++++++
  2 files changed, 8 insertions(+)
  create mode 100644 subprojects/slirp.wrap

diff --git a/.gitignore b/.gitignore
index 61fa39967b..1ea59f4819 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,5 @@ GTAGS
  *.swp
  *.patch
  *.gcov
+
+/subprojects/slirp
diff --git a/subprojects/slirp.wrap b/subprojects/slirp.wrap
new file mode 100644
index 0000000000..87cdd8dcd8
--- /dev/null
+++ b/subprojects/slirp.wrap
@@ -0,0 +1,6 @@
+[wrap-git]
+url = https://gitlab.freedesktop.org/slirp/libslirp
+revision = 15c52d69
+
+[provide]
+slirp = libslirp_dep


Reply via email to