xemu-win64-toolchain: Add libslirp v4.7.0

This commit is contained in:
Matt Borgerson 2023-01-23 03:24:21 -07:00 committed by mborgerson
parent ca6e712ecd
commit c08183c54d
3 changed files with 62 additions and 0 deletions

View File

@ -71,6 +71,15 @@ RUN V=1 MXE_VERBOSE=1 make -C /opt/mxe \
MXE_PLUGIN_DIRS=plugins/gcc10 \
sdl2
COPY libslirp.mk /opt/mxe/src/libslirp.mk
COPY libslirp-1.patch /opt/mxe/src/libslirp-1.patch
RUN V=1 MXE_VERBOSE=1 make -C /opt/mxe \
MXE_TARGETS=x86_64-w64-mingw32.static \
MXE_PLUGIN_DIRS=plugins/gcc10 \
libslirp
RUN find /opt/mxe/usr -executable -type f -exec chmod a+x {} \;
ENV CROSSPREFIX=x86_64-w64-mingw32.static-
ENV CROSSAR=${CROSSPREFIX}gcc-ar
ENV PATH="/opt/mxe/.ccache/bin:/opt/mxe/usr/x86_64-pc-linux-gnu/bin:/opt/mxe/usr/bin:${PATH}"

View File

@ -0,0 +1,34 @@
From d1417aed0b335d03c67c998b17b72933764ccbe3 Mon Sep 17 00:00:00 2001
From: Matt Borgerson <contact@mborgerson.com>
Date: Mon, 23 Jan 2023 03:06:46 -0700
Subject: [PATCH] Rename pingtest's slirp_inet_aton
---
test/pingtest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/pingtest.c b/test/pingtest.c
index 3bb0488..04b63ce 100644
--- a/test/pingtest.c
+++ b/test/pingtest.c
@@ -24,7 +24,7 @@
#ifdef _WIN32
//#include <sys/select.h>
#include <winsock2.h>
-int slirp_inet_aton(const char *cp, struct in_addr *ia)
+int pingtest_inet_aton(const char *cp, struct in_addr *ia)
{
uint32_t addr = inet_addr(cp);
if (addr == 0xffffffff) {
@@ -33,7 +33,7 @@ int slirp_inet_aton(const char *cp, struct in_addr *ia)
ia->s_addr = addr;
return 1;
}
-#define inet_aton slirp_inet_aton
+#define inet_aton pingtest_inet_aton
#else
#include <poll.h>
#endif
--
2.34.1

View File

@ -0,0 +1,19 @@
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := libslirp
$(PKG)_WEBSITE := https://gitlab.freedesktop.org/slirp/libslirp
$(PKG)_IGNORE :=
$(PKG)_VERSION := 4.7.0
$(PKG)_SUBDIR := libslirp-v$($(PKG)_VERSION)
$(PKG)_FILE := libslirp-v$($(PKG)_VERSION).tar.gz
$(PKG)_CHECKSUM := 9398f0ec5a581d4e1cd6856b88ae83927e458d643788c3391a39e61b75db3d3b
$(PKG)_URL := https://gitlab.freedesktop.org/slirp/$(PKG)/-/archive/v$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := cc glib meson-wrapper
define $(PKG)_BUILD
'$(MXE_MESON_WRAPPER)' $(MXE_MESON_OPTS) \
$(PKG_MESON_OPTS) \
--buildtype=plain \
'$(BUILD_DIR)' '$(SOURCE_DIR)'
'$(MXE_NINJA)' -C '$(BUILD_DIR)' -j '$(JOBS)' install
endef