git: bd181a331d17 - main - emulators/wine-proton: Update 10.0-4 => 11.0-2

From: Vladimir Druzenko <vvd_at_FreeBSD.org>
Date: Tue, 13 Oct 2026 12:27:04 UTC
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bd181a331d1728294a1bce2c51efd1c290c309aa

commit bd181a331d1728294a1bce2c51efd1c290c309aa
Author:     Thibault Payet <monwarez@mailoo.org>
AuthorDate: 2026-10-13 12:12:10 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-10-13 12:12:10 +0000

    emulators/wine-proton: Update 10.0-4 => 11.0-2
    
    Commit log:
    https://github.com/ValveSoftware/wine/compare/proton-wine-10.0-4...proton-wine-11.0-2
    
    PR:             298820
    Sponsored by:   UNIS Labs (vvd, commit patch)
---
 emulators/wine-proton/Makefile                     |   51 +-
 emulators/wine-proton/distinfo                     |    6 +-
 .../wine-proton/files/extra-patch-configure.ac     |   10 -
 emulators/wine-proton/files/patch-configure.ac     |   26 +
 .../wine-proton/files/patch-dlls_dsound_primary.c  |   17 -
 .../files/patch-dlls_ntdll_unix_loader.c           |   42 +-
 .../files/patch-dlls_ntdll_unix_signal__i386.c     |  111 -
 .../files/patch-dlls_ntdll_unix_signal__x86__64.c  |  148 +-
 .../wine-proton/files/patch-dlls_ntdll_unix_sync.c |   16 +
 .../files/patch-dlls_ntdll_unix_system.c           |    8 +-
 .../files/patch-dlls_ntdll_unix_virtual.c          |   50 -
 .../files/patch-dlls_winebus.sys_main.c            |    4 +-
 .../files/patch-dlls_winevulkan_vulkan.c           |   23 -
 .../wine-proton/files/patch-server_inproc__sync.c  |   16 +
 emulators/wine-proton/files/patch-server_ptrace.c  |  209 --
 .../files/patch-tools_winebuild_res32.c            |   77 -
 emulators/wine-proton/files/patch-wow64.patch      |  239 --
 emulators/wine-proton/pkg-plist                    | 2686 ++++++++++----------
 18 files changed, 1612 insertions(+), 2127 deletions(-)

diff --git a/emulators/wine-proton/Makefile b/emulators/wine-proton/Makefile
index ea2eefba7a75..20ada9d9ed0f 100644
--- a/emulators/wine-proton/Makefile
+++ b/emulators/wine-proton/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	wine-proton
-DISTVERSION=	10.0-4
+DISTVERSION=	11.0-2
 CATEGORIES=	emulators
 PKGNAMESUFFIX=	${FLAVOR:N${FLAVORS:[1]}:C/.+/-${FLAVOR}/}
 
@@ -11,7 +11,7 @@ LICENSE=	LGPL21 LGPL3
 LICENSE_COMB=	dual
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-ONLY_FOR_ARCHS=	amd64 i386
+ONLY_FOR_ARCHS=	amd64
 
 BUILD_DEPENDS=	${LOCALBASE}/bin/flex:textproc/flex \
 		${LOCALBASE}/ffmpeg4/include/libavformat/avformat.h:multimedia/ffmpeg4 \
@@ -20,7 +20,8 @@ BUILD_DEPENDS=	${LOCALBASE}/bin/flex:textproc/flex \
 LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
 		libfreetype.so:print/freetype2 \
 		libgnutls.so:security/gnutls \
-		libvulkan.so:graphics/vulkan-loader
+		libvulkan.so:graphics/vulkan-loader \
+		libhwloc.so:devel/hwloc2
 
 # amd_ags_x64.so
 LIB_DEPENDS+=	libdrm.so:graphics/libdrm \
@@ -62,6 +63,7 @@ GNU_CONFIGURE=		yes
 GNU_CONFIGURE_PREFIX=	${PREFIX}/${PORTNAME}
 
 CONFIGURE_ARGS=	--verbose \
+		--enable-archs=i386,x86_64 \
 		--with-mingw CROSSCC="clang" \
 		--libdir=${PREFIX}/${PORTNAME}/lib \
 		--disable-kerberos \
@@ -70,6 +72,7 @@ CONFIGURE_ARGS=	--verbose \
 		--with-freetype \
 		--with-gnutls \
 		--with-gstreamer \
+		--with-hwloc \
 		--with-opengl \
 		--with-oss \
 		--with-pthread \
@@ -94,7 +97,6 @@ CONFIGURE_ARGS=	--verbose \
 		--without-krb5 \
 		--without-netapi \
 		--without-opencl \
-		--without-osmesa \
 		--without-pcap \
 		--without-pcsclite \
 		--without-sane \
@@ -121,26 +123,14 @@ OPTIONS_DEFAULT=	${OPTIONS_DEFAULT_${FLAVOR}}
 OPTIONS_DEFAULT_pulse=	PULSEAUDIO
 OPTIONS_SUB=		yes
 
-PULSEAUDIO_DESC=		Build winepulse.drv
-
 PULSEAUDIO_LIB_DEPENDS=		libpulse.so:audio/pulseaudio
 PULSEAUDIO_CONFIGURE_WITH=	pulse
 
 .include <bsd.port.pre.mk>
 
 .if ${ARCH} == amd64
-CONFIGURE_ARGS+=--enable-archs=i386,x86_64
-PLIST_SUB+=	WINE32="@comment " WINE64="" WINEARCH="x86_64"
-.else
-CONFIGURE_ARGS+=--enable-archs=i386
-PLIST_SUB+=	WINE32="" WINE64="@comment " WINEARCH="i386"
-.endif
-
-.if ${LLVM_VERSION} >= 22
-# include/winnt.h:7065:19: error:
-# incompatible pointer types passing 'LONG *' (aka 'int *') to parameter of type 'volatile long *'
-# [-Wincompatible-pointer-types]
-EXTRA_PATCHES=	${PATCHDIR}/extra-patch-configure.ac
+CONFIGURE_ARGS+=	--enable-win64
+PLIST_SUB+=		WINEARCH="x86_64"
 .endif
 
 pre-configure:
@@ -153,26 +143,11 @@ pre-build:
 	cd ${WRKSRC} && ${PERL5} tools/make_requests
 
 post-install:
-.if ${ARCH} == i386
-	${MV} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wineserver ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wineserver32
-	${MV} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine       ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine.bin
-	-${ELFCTL} -e +noaslr                                 ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine.bin
-	${INSTALL_SCRIPT} ${FILESDIR}/wine.sh                 ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine
-.else
-	${INSTALL_SCRIPT} ${FILESDIR}/pkg32.sh                ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/pkg32.sh
-	${MV} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine       ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine64.bin
-	${INSTALL_SCRIPT} ${FILESDIR}/wine.sh                 ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine64
-	${INSTALL_SCRIPT} ${FILESDIR}/wine-wow64.sh           ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine
-	${MKDIR} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin-wow64
-	${CP} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/msidb      ${STAGEDIR}${PREFIX}/${PORTNAME}/bin-wow64/msidb
-	${CP} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine64.bin ${STAGEDIR}${PREFIX}/${PORTNAME}/bin-wow64/wine
-	${CP} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wineserver ${STAGEDIR}${PREFIX}/${PORTNAME}/bin-wow64/wineserver
-.endif
-	${RM} -r ${STAGEDIR}${PREFIX}/${PORTNAME}/include
-	${RM} -r ${STAGEDIR}${PREFIX}/share/man
+	${ELFCTL} -e +noaslr	${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine
+	${RM} -r ${STAGEDIR}${PREFIX}/${PORTNAME}/include \
+		 ${STAGEDIR}${PREFIX}/share/man
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
-.for i in README.md ANNOUNCE.md AUTHORS
-	${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
-.endfor
+	${INSTALL_DATA} ${ANNOUNCE.md AUTHORS README.md:L:S|^|${WRKSRC}/|} \
+		${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.post.mk>
diff --git a/emulators/wine-proton/distinfo b/emulators/wine-proton/distinfo
index 91fcc393483e..bc2b17050a99 100644
--- a/emulators/wine-proton/distinfo
+++ b/emulators/wine-proton/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1772374415
-SHA256 (ValveSoftware-wine-10.0-4-proton-wine-10.0-4_GH0.tar.gz) = 51b2e9e42829ba6791626e52f6d5fe4f0e82a376beaa64c9631486b5e1584c5d
-SIZE (ValveSoftware-wine-10.0-4-proton-wine-10.0-4_GH0.tar.gz) = 52736432
+TIMESTAMP = 1788704366
+SHA256 (ValveSoftware-wine-11.0-2-proton-wine-11.0-2_GH0.tar.gz) = c02269323d484befe3bc7628f13b445d6e1c6f44df9c4b97bc96bd4f96101f3a
+SIZE (ValveSoftware-wine-11.0-2-proton-wine-11.0-2_GH0.tar.gz) = 56570548
diff --git a/emulators/wine-proton/files/extra-patch-configure.ac b/emulators/wine-proton/files/extra-patch-configure.ac
deleted file mode 100644
index 87709cea8d62..000000000000
--- a/emulators/wine-proton/files/extra-patch-configure.ac
+++ /dev/null
@@ -1,10 +0,0 @@
---- configure.ac.orig	2026-01-19 21:07:17 UTC
-+++ configure.ac
-@@ -969,6 +969,7 @@ This is an error since --enable-archs=$wine_arch was r
-     WINE_TRY_PE_CFLAGS([-Wabsolute-value])
-     WINE_TRY_PE_CFLAGS([-Wenum-enum-conversion],[:],WINE_TRY_PE_CFLAGS([-Wenum-conversion]))
-     WINE_TRY_PE_CFLAGS([-ffunction-sections])
-+    WINE_TRY_PE_CFLAGS([-Wno-incompatible-pointer-types])
- 
-     dnl clang had broken -fms-hotpatch support before version 18 (https://github.com/llvm/llvm-project/pull/77245)
-     WINE_TRY_PE_CFLAGS([-fms-hotpatch -DMIN_CLANG_VERSION=18],
diff --git a/emulators/wine-proton/files/patch-configure.ac b/emulators/wine-proton/files/patch-configure.ac
new file mode 100644
index 000000000000..4a3434fe3800
--- /dev/null
+++ b/emulators/wine-proton/files/patch-configure.ac
@@ -0,0 +1,26 @@
+The intention of this patch is to keep FreeBSD shared libs out of the first 4 GiB of memory in a non-aslr mode (rtld seems to always place them after the executable).
+In aslr-mode the system does that implicitly (probably because that benefits randomization).
+The downside is that we fix the entry main address in the aslr-mode as well, making it entirely predictable, which is against the spirit of aslr.
+
+--- configure.ac.orig	2026-08-03 08:08:29 UTC
++++ configure.ac
+@@ -1062,6 +1062,19 @@ case $host_os in
+             ;;
+         esac
+         ;;
++       freebsd*)
++        case $HOST_ARCH in
++          i386|arm)
++            WINE_TRY_CFLAGS([-Wl,-Ttext-segment=0x60000000],
++                            [AS_VAR_APPEND([WINELOADER_LDFLAGS],[" -Wl,-Ttext-segment=0x60000000"])],
++                            [WINE_TRY_CFLAGS([-Wl,--section-start,.interp=0x60000400],
++                                [AS_VAR_APPEND([WINELOADER_LDFLAGS],[" -Wl,--section-start,.interp=0x60000400"])])])
++            ;;
++          *)
++            AS_VAR_APPEND([WINELOADER_LDFLAGS],[" -Wl,-Ttext-segment=0x240000000 -pie"])
++            ;;
++        esac
++        ;;
+       *)
+         case $HOST_ARCH in
+           i386|arm)
diff --git a/emulators/wine-proton/files/patch-dlls_dsound_primary.c b/emulators/wine-proton/files/patch-dlls_dsound_primary.c
deleted file mode 100644
index dd462af4d284..000000000000
--- a/emulators/wine-proton/files/patch-dlls_dsound_primary.c
+++ /dev/null
@@ -1,17 +0,0 @@
---- dlls/dsound/primary.c.orig	2025-11-06 09:54:15 UTC
-+++ dlls/dsound/primary.c
-@@ -194,10 +194,10 @@ static HRESULT DSOUND_WaveFormat(DirectSoundDevice *de
-         if (FAILED(hr))
-             return hr;
- 
--        if (device->num_speakers == 0 || mixwfe->Format.nChannels < device->num_speakers) {
--            device->speaker_config = DSOUND_FindSpeakerConfig(device->mmdevice, mixwfe->Format.nChannels);
--            DSOUND_ParseSpeakerConfig(device);
--        } else if (mixwfe->Format.nChannels > device->num_speakers) {
-+        device->speaker_config = DSOUND_FindSpeakerConfig(device->mmdevice, mixwfe->Format.nChannels);
-+        DSOUND_ParseSpeakerConfig(device);
-+
-+        if (mixwfe->Format.nChannels > device->num_speakers) {
-             mixwfe->Format.nChannels = device->num_speakers;
-             mixwfe->Format.nBlockAlign = mixwfe->Format.nChannels * mixwfe->Format.wBitsPerSample / 8;
-             mixwfe->Format.nAvgBytesPerSec = mixwfe->Format.nSamplesPerSec * mixwfe->Format.nBlockAlign;
diff --git a/emulators/wine-proton/files/patch-dlls_ntdll_unix_loader.c b/emulators/wine-proton/files/patch-dlls_ntdll_unix_loader.c
index 9f05a2b90d91..6c15caa828dd 100644
--- a/emulators/wine-proton/files/patch-dlls_ntdll_unix_loader.c
+++ b/emulators/wine-proton/files/patch-dlls_ntdll_unix_loader.c
@@ -1,24 +1,24 @@
---- dlls/ntdll/unix/loader.c.orig	2025-11-06 09:54:15 UTC
+Disable for now mallopt feature on FreeBSD
+
+--- dlls/ntdll/unix/loader.c.orig	2026-08-03 08:08:29 UTC
 +++ dlls/ntdll/unix/loader.c
-@@ -557,6 +557,21 @@ char *get_alternate_wineloader( WORD machine )
+@@ -2451,7 +2451,9 @@ static void start_main_thread(void)
+     set_thread_teb( teb );
+ #endif
  
-     if (machine == current_machine) return NULL;
++#if !defined(__FreeBSD__)
+     mallopt( M_PERTURB, 0xff );
++#endif
+     init_startup_info();
+     *(ULONG_PTR *)&peb->CloudFileFlags = get_image_address();
+     set_load_order_app_name( main_wargv[0] );
+@@ -2460,7 +2462,9 @@ static void start_main_thread(void)
+     load_ntdll();
+     load_wow64_ntdll( main_image_info.Machine );
+     load_apiset_dll();
++#if !defined(__FreeBSD__)
+     mallopt( M_PERTURB, 0 );
++#endif
+     server_init_process_done();
+ }
  
-+    char* wineserver_path = getenv("WINESERVER");
-+    if (wineserver_path != NULL && wineserver_path[0] == '/') {
-+        char* s = remove_tail(wineserver_path, "server");
-+        if (s != NULL) {
-+            if (machine == IMAGE_FILE_MACHINE_AMD64) {
-+                ret = malloc(strlen(s) + 3);
-+                strcpy(ret, s);
-+                strcat(ret, "64");
-+            } else {
-+                ret = s;
-+            }
-+            return ret;
-+        }
-+    }
-+
-     /* try the 64-bit loader */
-     if (current_machine == IMAGE_FILE_MACHINE_I386 && machine == IMAGE_FILE_MACHINE_AMD64)
-     {
diff --git a/emulators/wine-proton/files/patch-dlls_ntdll_unix_signal__i386.c b/emulators/wine-proton/files/patch-dlls_ntdll_unix_signal__i386.c
deleted file mode 100644
index 43f0dd264038..000000000000
--- a/emulators/wine-proton/files/patch-dlls_ntdll_unix_signal__i386.c
+++ /dev/null
@@ -1,111 +0,0 @@
-From 0d7b26b169761d63198c4700764d08224137d99c Mon Sep 17 00:00:00 2001
-From: Alexandre Julliard <julliard@winehq.org>
-Date: Wed, 5 Nov 2025 17:06:48 +0100
-Subject: [PATCH] ntdll: Treat FPU_sig and FPUX_sig as void* on i386.
-
-Similar to d320a992cf881d0bf62347a28631713cff9e6844.
-
---- dlls/ntdll/unix/signal_i386.c.orig	2026-01-19 21:07:17 UTC
-+++ dlls/ntdll/unix/signal_i386.c
-@@ -149,9 +149,9 @@ typedef struct ucontext
- #define TRAP_sig(context)    ((context)->uc_mcontext.gregs[REG_TRAPNO])
- #define ERROR_sig(context)   ((context)->uc_mcontext.gregs[REG_ERR])
- 
--#define FPU_sig(context)     ((FLOATING_SAVE_AREA*)((context)->uc_mcontext.fpregs))
--#define FPUX_sig(context)    (FPU_sig(context) && !((context)->uc_mcontext.fpregs->status >> 16) ? (XSAVE_FORMAT *)(FPU_sig(context) + 1) : NULL)
--#define XState_sig(fpu)      (((unsigned int *)fpu->Reserved4)[12] == FP_XSTATE_MAGIC1 ? (XSAVE_AREA_HEADER *)(fpu + 1) : NULL)
-+#define FPU_sig(context)     ((void *)(context)->uc_mcontext.fpregs)
-+#define FPUX_sig(context)    (FPU_sig(context) && !((context)->uc_mcontext.fpregs->status >> 16) ? (void *)((FLOATING_SAVE_AREA *)FPU_sig(context) + 1) : NULL)
-+#define XState_sig(fpu)      (((unsigned int *)((XSAVE_FORMAT *)(fpu))->Reserved4)[12] == FP_XSTATE_MAGIC1 ? (XSAVE_AREA_HEADER *)((XSAVE_FORMAT *)(fpu) + 1) : NULL)
- 
- #ifdef __ANDROID__
- /* custom signal restorer since we may have unmapped the one in vdso, and bionic doesn't check for that */
-@@ -317,7 +317,7 @@ static inline int set_thread_area( struct modify_ldt_s
- #define TRAP_sig(context)    ((context)->uc_mcontext->__es.__trapno)
- #define ERROR_sig(context)   ((context)->uc_mcontext->__es.__err)
- #define FPU_sig(context)     NULL
--#define FPUX_sig(context)    ((XSAVE_FORMAT *)&(context)->uc_mcontext->__fs.__fpu_fcw)
-+#define FPUX_sig(context)    ((void *)&(context)->uc_mcontext->__fs.__fpu_fcw)
- #define XState_sig(context)  NULL  /* FIXME */
- 
- #elif defined(__NetBSD__)
-@@ -347,7 +347,7 @@ static inline int set_thread_area( struct modify_ldt_s
- #define ERROR_sig(context)     ((context)->uc_mcontext.__gregs[_REG_ERR])
- 
- #define FPU_sig(context)     NULL
--#define FPUX_sig(context)    ((XSAVE_FORMAT *)&((context)->uc_mcontext.__fpregs))
-+#define FPUX_sig(context)    ((void *)&((context)->uc_mcontext.__fpregs))
- #define XState_sig(context)  NULL  /* FIXME */
- 
- #define T_MCHK T_MCA
-@@ -797,7 +797,7 @@ static inline void save_context( struct xcontext *xcon
- static inline void save_context( struct xcontext *xcontext, const ucontext_t *sigcontext )
- {
-     FLOATING_SAVE_AREA *fpu = FPU_sig(sigcontext);
--    XSAVE_FORMAT *fpux = FPUX_sig(sigcontext);
-+    void *fpux = FPUX_sig(sigcontext);
-     CONTEXT *context = &xcontext->c;
- 
-     memset(context, 0, sizeof(*context));
-@@ -835,7 +835,7 @@ static inline void save_context( struct xcontext *xcon
-         XSAVE_AREA_HEADER *xs;
- 
-         context->ContextFlags |= CONTEXT_FLOATING_POINT | CONTEXT_EXTENDED_REGISTERS;
--        memcpy( context->ExtendedRegisters, fpux, sizeof(*fpux) );
-+        memcpy( context->ExtendedRegisters, fpux, sizeof(context->ExtendedRegisters) );
-         if (!fpu) fpux_to_fpu( &context->FloatSave, fpux );
-         if (xstate_extended_features() && (xs = XState_sig(fpux))) context_init_xstate( context, xs );
-     }
-@@ -854,23 +854,25 @@ static void fixup_frame_fpu_state( struct syscall_fram
-  */
- static void fixup_frame_fpu_state( struct syscall_frame *frame, const ucontext_t *sigcontext )
- {
-+    I386_FLOATING_SAVE_AREA fsave_buf, *fsave = FPU_sig(sigcontext);
-+    void *fpux = FPUX_sig(sigcontext);
-+
-     memset( &frame->xstate, 0, sizeof(frame->xstate) );
-     if (user_shared_data->XState.CompactionEnabled)
-         frame->xstate.CompactionMask = 0x8000000000000000 | user_shared_data->XState.EnabledFeatures;
--    if (FPUX_sig(sigcontext))
-+    if (fpux)
-     {
--        if (user_shared_data->ProcessorFeatures[PF_XMMI_INSTRUCTIONS_AVAILABLE])
--            frame->u.xsave = *FPUX_sig(sigcontext);
--        else
--            fpux_to_fpu( &frame->u.fsave, FPUX_sig(sigcontext) );
-+        memcpy( &frame->u.xsave, fpux, sizeof(frame->u.xsave) );
-+        if (!user_shared_data->ProcessorFeatures[PF_XMMI_INSTRUCTIONS_AVAILABLE])
-+        {
-+            fpux_to_fpu( &fsave_buf, &frame->u.xsave );
-+            frame->u.fsave = fsave_buf;
-+        }
-         frame->xstate.Mask = XSTATE_MASK_LEGACY;
-     }
-     else
-     {
--        I386_FLOATING_SAVE_AREA *fsave, fsave_buf;
--
--        if (FPU_sig(sigcontext)) fsave = FPU_sig(sigcontext);
--        else
-+        if (!fsave)
-         {
-             save_fpu( &fsave_buf );
-             fsave = &fsave_buf;
-@@ -902,7 +904,7 @@ static inline void restore_context( const struct xcont
- static inline void restore_context( const struct xcontext *xcontext, ucontext_t *sigcontext )
- {
-     FLOATING_SAVE_AREA *fpu = FPU_sig(sigcontext);
--    XSAVE_FORMAT *fpux = FPUX_sig(sigcontext);
-+    void *fpux = FPUX_sig(sigcontext);
-     const CONTEXT *context = &xcontext->c;
- 
-     x86_thread_data()->dr0 = context->Dr0;
-@@ -929,7 +931,7 @@ static inline void restore_context( const struct xcont
-     SS_sig(sigcontext)  = context->SegSs;
- 
-     if (fpu) *fpu = context->FloatSave;
--    if (fpux) memcpy( fpux, context->ExtendedRegisters, sizeof(*fpux) );
-+    if (fpux) memcpy( fpux, context->ExtendedRegisters, sizeof(context->ExtendedRegisters) );
-     if (!fpu && !fpux) restore_fpu( context );
- }
- 
diff --git a/emulators/wine-proton/files/patch-dlls_ntdll_unix_signal__x86__64.c b/emulators/wine-proton/files/patch-dlls_ntdll_unix_signal__x86__64.c
index 86aa63311236..a80346a47db4 100644
--- a/emulators/wine-proton/files/patch-dlls_ntdll_unix_signal__x86__64.c
+++ b/emulators/wine-proton/files/patch-dlls_ntdll_unix_signal__x86__64.c
@@ -1,6 +1,49 @@
---- dlls/ntdll/unix/signal_x86_64.c.orig	2025-11-06 09:54:15 UTC
+--- dlls/ntdll/unix/signal_x86_64.c.orig	2026-08-03 08:08:29 UTC
 +++ dlls/ntdll/unix/signal_x86_64.c
-@@ -2933,7 +2933,11 @@ void set_thread_teb( TEB *teb )
+@@ -207,6 +207,7 @@ __ASM_GLOBAL_FUNC( modify_ldt,
+ 
+ #elif defined(__FreeBSD__) || defined (__FreeBSD_kernel__)
+ 
++#include <machine/segments.h>
+ #include <machine/trap.h>
+ 
+ #define RAX_sig(context)     ((context)->uc_mcontext.mc_rax)
+@@ -1832,7 +1833,7 @@ __ASM_GLOBAL_FUNC( call_user_mode_callback,
+                    "1:\tmovq %rdi,%rsp\n\t"    /* user_rsp */
+                    "movq 0x98(%r14),%rbp\n\t"  /* prev_frame->rbp */
+                    "ldmxcsr 0xd8(%r14)\n\t"    /* prev_frame->xsave.MxCsr */
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__)
+                    "movw 0x338(%r13),%ax\n"    /* amd64_thread_data()->fs */
+                    "testw %ax,%ax\n\t"
+                    "jz 1f\n\t"
+@@ -3038,6 +3039,16 @@ void ldt_set_entry( WORD sel, LDT_ENTRY entry )
+     if ((ret = modify_ldt( &ldt_info ))) ERR( "modify_ldt failed %d\n", ret );
+ #elif defined(__APPLE__)
+     if (i386_set_ldt(sel >> 3, (union ldt_entry *)&entry, 1) < 0) perror("i386_set_ldt");
++#elif defined(__FreeBSD__)
++    struct i386_ldt_args p;
++    p.start = sel >> 3;
++    p.descs = (struct user_segment_descriptor *)&entry;
++    p.num   = 1;
++    if (sysarch(I386_SET_LDT, &p) == -1)
++    {
++        perror("i386_set_ldt");
++        exit(1);
++    }
+ #else
+     fprintf( stderr, "No LDT support on this platform\n" );
+     exit(1);
+@@ -3159,6 +3170,8 @@ void signal_init_process(void)
+         fs32_sel = alloc_fs_sel( -1, wow_teb );
+ #elif defined(__APPLE__)
+         cs32_sel = ldt_alloc_entry( ldt_make_cs32_entry() );
++#elif defined(__FreeBSD__)
++        cs32_sel = GSEL(GUCODE32_SEL, SEL_UPL);
+ #endif
+     }
+ 
+@@ -3197,7 +3210,11 @@ void set_thread_teb( TEB *teb )
  
  void set_thread_teb( TEB *teb )
  {
@@ -12,3 +55,104 @@
  }
  
  /***********************************************************************
+@@ -3223,6 +3240,7 @@ void init_syscall_frame( LPTHREAD_START_ROUTINE entry,
+     }
+ #elif defined (__FreeBSD__) || defined (__FreeBSD_kernel__)
+     amd64_set_gsbase( teb );
++    amd64_get_fsbase( &thread_data->pthread_teb );
+ #elif defined(__NetBSD__)
+     sysarch( X86_64_SET_GSBASE, &teb );
+ #elif defined (__APPLE__)
+@@ -3448,6 +3466,28 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
+                    "syscall\n\t"
+                    "leaq -0x98(%rbp),%rcx\n"
+                    "2:\n\t"
++#elif defined(__FreeBSD__)
++                   "movq 0x320(%r13),%rsi\n\t"     /* amd64_thread_data()->pthread_teb */
++                   "testq %rsi,%rsi\n\t"
++                   "jz 2f\n\t"
++                   "cmpb $0,0x7ffe028a\n\t"        /* user_shared_data->ProcessorFeatures[PF_RDWRFSGSBASE_AVAILABLE] */
++                   "jz 1f\n\t"
++                   "wrfsbase %rsi\n\t"
++                   "jmp 2f\n"
++                   "1:\n\t"
++                   "pushq %r8\n\t"
++                   "pushq %r9\n\t"
++                   "pushq %r10\n\t"
++                   "pushq %r11\n\t"
++                   "movq $0xa5,%rax\n\t"           /* sysarch */
++                   "movq $0x81,%rdi\n\t"           /* AMD64_SET_FSBASE */
++                   "syscall\n\t"
++                   "popq %r11\n\t"
++                   "popq %r10\n\t"
++                   "popq %r9\n\t"
++                   "popq %r8\n\t"
++                   "leaq -0x98(%rbp),%rcx\n"
++                   "2:\n\t"
+ #elif defined __APPLE__
+                    "movq 0x320(%r13),%rdi\n\t"     /* amd64_thread_data()->pthread_teb */
+                    "xorl %esi,%esi\n\t"
+@@ -3494,11 +3534,16 @@ __ASM_GLOBAL_FUNC( __wine_syscall_dispatcher,
+                    __ASM_CFI(".cfi_remember_state\n\t")
+                    __ASM_CFI_CFA_IS_AT2(rcx, 0xa8, 0x01) /* frame->syscall_cfa */
+                    "leaq 0x70(%rcx),%rsp\n\t"      /* %rsp > frame means no longer inside syscall */
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__)
+                    "movw 0x338(%r13),%dx\n"        /* amd64_thread_data()->fs */
+                    "testw %dx,%dx\n\t"
+                    "jz 1f\n\t"
+                    "movw %dx,%fs\n"
++# ifdef __FreeBSD__
++                   /* reset %ss (after sysret) for AMD */
++                   "movw $0x3b,%dx\n\t"           /* GSEL(GUDATA_SEL, SEL_UPL) */
++                   "movw %dx,%ss\n\t"
++# endif
+                    "1:\n\t"
+ #elif defined __APPLE__
+                    "movq %rax,%r8\n\t"
+@@ -3736,6 +3781,27 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher,
+                    "mov $158,%eax\n\t"             /* SYS_arch_prctl */
+                    "syscall\n\t"
+                    "2:\n\t"
++#elif defined(__FreeBSD__)
++                   "movq 0x320(%r13),%rsi\n\t"     /* amd64_thread_data()->pthread_teb */
++                   "testq %rsi,%rsi\n\t"
++                   "jz 2f\n\t"
++                   "cmpb $0,0x7ffe028a\n\t"        /* user_shared_data->ProcessorFeatures[PF_RDWRFSGSBASE_AVAILABLE] */
++                   "jz 1f\n\t"
++                   "wrfsbase %rsi\n\t"
++                   "jmp 2f\n"
++                   "1:\n\t"
++                   "pushq %r8\n\t"
++                   "pushq %r9\n\t"
++                   "pushq %r10\n\t"
++                   "pushq %r11\n\t"
++                   "movq $0xa5,%rax\n\t"           /* sysarch */
++                   "movq $0x81,%rdi\n\t"           /* AMD64_SET_FSBASE */
++                   "syscall\n\t"
++                   "popq %r11\n\t"
++                   "popq %r10\n\t"
++                   "popq %r9\n\t"
++                   "popq %r8\n\t"
++                   "2:\n\t"
+ #elif defined __APPLE__
+                    "movq 0x320(%r13),%rdi\n\t"     /* amd64_thread_data()->pthread_teb */
+                    "xorl %esi,%esi\n\t"
+@@ -3762,11 +3828,16 @@ __ASM_GLOBAL_FUNC( __wine_unix_call_dispatcher,
+                    /* switch to user stack */
+                    "movq 0x88(%rcx),%rsp\n\t"
+                    __ASM_CFI(".cfi_restore_state\n\t")
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__)
+                    "movw 0x338(%r13),%dx\n"        /* amd64_thread_data()->fs */
+                    "testw %dx,%dx\n\t"
+                    "jz 1f\n\t"
+                    "movw %dx,%fs\n"
++# ifdef __FreeBSD__
++                   /* reset %ss (after sysret) for AMD */
++                   "movw $0x3b,%dx\n\t"           /* GSEL(GUDATA_SEL, SEL_UPL) */
++                   "movw %dx,%ss\n\t"
++# endif
+                    "1:\n\t"
+ #elif defined __APPLE__
+                    "movq %rax,%rdx\n\t"
diff --git a/emulators/wine-proton/files/patch-dlls_ntdll_unix_sync.c b/emulators/wine-proton/files/patch-dlls_ntdll_unix_sync.c
new file mode 100644
index 000000000000..6e7d25dfa411
--- /dev/null
+++ b/emulators/wine-proton/files/patch-dlls_ntdll_unix_sync.c
@@ -0,0 +1,16 @@
+This revert wine-proton use of an ntsync.h header incompatible with any other OS than Linux
+
+--- dlls/ntdll/unix/sync.c.orig	2026-08-03 08:08:29 UTC
++++ dlls/ntdll/unix/sync.c
+@@ -60,8 +60,9 @@
+ #ifdef HAVE_KQUEUE
+ # include <sys/event.h>
+ #endif
+-
+-# include "ntsync_tmp.h"
++#ifdef HAVE_LINUX_NTSYNC_H
++# include <linux/ntsync.h>
++#endif
+ 
+ #include "ntstatus.h"
+ #define WIN32_NO_STATUS
diff --git a/emulators/wine-proton/files/patch-dlls_ntdll_unix_system.c b/emulators/wine-proton/files/patch-dlls_ntdll_unix_system.c
index 81ecd536fc12..ebccdb2f4e93 100644
--- a/emulators/wine-proton/files/patch-dlls_ntdll_unix_system.c
+++ b/emulators/wine-proton/files/patch-dlls_ntdll_unix_system.c
@@ -1,6 +1,6 @@
---- dlls/ntdll/unix/system.c.orig	2025-11-06 09:54:15 UTC
+--- dlls/ntdll/unix/system.c.orig	2026-08-03 08:08:29 UTC
 +++ dlls/ntdll/unix/system.c
-@@ -681,6 +681,7 @@ static void get_cpuinfo( SYSTEM_CPU_INFORMATION *info 
+@@ -765,6 +765,7 @@ void init_shared_data_cpuinfo( KUSER_SHARED_DATA *data
  
  #endif /* End architecture specific feature detection for CPUs */
  
@@ -8,7 +8,7 @@
  static void fill_performance_core_info(void);
  static BOOL sysfs_parse_bitmap(const char *filename, ULONG_PTR *mask);
  
-@@ -848,6 +849,12 @@ error:
+@@ -974,6 +975,12 @@ error:
      cpu_override.mapping.cpu_count = 0;
      ERR("Invalid WINE_CPU_TOPOLOGY string %s (%s).\n", debugstr_a(env_override), debugstr_a(s));
  }
@@ -21,7 +21,7 @@
  
  struct cpu_topology_override *get_cpu_topology_override(void)
  {
-@@ -1548,6 +1555,98 @@ static NTSTATUS create_logical_proc_info(void)
+@@ -1674,6 +1681,98 @@ static NTSTATUS create_logical_proc_info(void)
      }
  
      /* OSX doesn't support NUMA, so just make one NUMA node for all CPUs */
diff --git a/emulators/wine-proton/files/patch-dlls_ntdll_unix_virtual.c b/emulators/wine-proton/files/patch-dlls_ntdll_unix_virtual.c
deleted file mode 100644
index 2ae013dd2b79..000000000000
--- a/emulators/wine-proton/files/patch-dlls_ntdll_unix_virtual.c
+++ /dev/null
@@ -1,50 +0,0 @@
---- dlls/ntdll/unix/virtual.c.orig	2025-11-06 09:54:15 UTC
-+++ dlls/ntdll/unix/virtual.c
-@@ -72,9 +72,11 @@
- 
- #include <sys/uio.h>
- 
-+#ifdef __linux__
- #include <linux/userfaultfd.h>
- #include <sys/ioctl.h>
- #include "uffd_tmp_defs.h"
-+#endif
- 
- #include "ntstatus.h"
- #define WIN32_NO_STATUS
-@@ -385,6 +387,7 @@ void *anon_mmap_alloc( size_t size, int prot )
-     return mmap( NULL, size, prot, MAP_PRIVATE | MAP_ANON, -1, 0 );
- }
- 
-+#ifdef __linux__
- static void kernel_writewatch_softdirty_init(void)
- {
-     if ((pagemap_reset_fd = open( "/proc/self/pagemap_reset", O_RDONLY | O_CLOEXEC )) == -1) return;
-@@ -621,7 +624,27 @@ static NTSTATUS kernel_get_write_watches( void *base, 
-     }
-     return STATUS_SUCCESS;
- }
-+#else
-+static void kernel_writewatch_init(void)
-+{
-+    use_kernel_writewatch = 0;
-+}
- 
-+static void kernel_writewatch_register_range(struct file_view*, void*, size_t)
-+{
-+    /* do nothing */
-+}
-+
-+static void kernel_writewatch_reset(void*, SIZE_T)
-+{
-+    abort();
-+}
-+
-+static NTSTATUS kernel_get_write_watches(void*, SIZE_T, void**, ULONG_PTR*, BOOL)
-+{
-+    abort();
-+}
-+#endif
- 
- static void mmap_add_reserved_area( void *addr, SIZE_T size )
- {
diff --git a/emulators/wine-proton/files/patch-dlls_winebus.sys_main.c b/emulators/wine-proton/files/patch-dlls_winebus.sys_main.c
index 29432910a6ac..38f01469e279 100644
--- a/emulators/wine-proton/files/patch-dlls_winebus.sys_main.c
+++ b/emulators/wine-proton/files/patch-dlls_winebus.sys_main.c
@@ -1,6 +1,6 @@
---- dlls/winebus.sys/main.c.orig	2026-01-19 21:07:17 UTC
+--- dlls/winebus.sys/main.c.orig	2026-08-03 08:08:29 UTC
 +++ dlls/winebus.sys/main.c
-@@ -598,7 +598,7 @@ static BOOL is_hidraw_enabled(WORD vid, WORD pid, cons
+@@ -606,7 +606,7 @@ static BOOL is_hidraw_enabled(WORD vid, WORD pid, cons
  
      if (options.disable_sdl && options.disable_input) prefer_hidraw = TRUE;
      if (is_dualshock4_gamepad(vid, pid)) prefer_hidraw = TRUE;
diff --git a/emulators/wine-proton/files/patch-dlls_winevulkan_vulkan.c b/emulators/wine-proton/files/patch-dlls_winevulkan_vulkan.c
deleted file mode 100644
index ee623b9a500c..000000000000
--- a/emulators/wine-proton/files/patch-dlls_winevulkan_vulkan.c
+++ /dev/null
@@ -1,23 +0,0 @@
---- dlls/winevulkan/vulkan.c.orig	2025-11-06 09:54:15 UTC
-+++ dlls/winevulkan/vulkan.c
-@@ -29,6 +29,7 @@
- #include <stdio.h>
- #include <assert.h>
- #include <limits.h>
-+#include <pthread_np.h>
- #ifdef HAVE_SYS_SYSCALL_H
- # include <sys/syscall.h>
- #endif
-@@ -3598,11 +3599,7 @@ void *signaller_worker(void *arg)
- 
- void *signaller_worker(void *arg)
- {
--#ifdef HAVE_SYS_SYSCALL_H
--    int unix_tid = syscall( __NR_gettid );
--#else
--    int unix_tid = -1;
--#endif
-+    int unix_tid = pthread_getthreadid_np();
-     struct vulkan_device *device = arg;
-     struct wine_semaphore *sem;
-     VkSemaphoreWaitInfo wait_info = { 0 };
diff --git a/emulators/wine-proton/files/patch-server_inproc__sync.c b/emulators/wine-proton/files/patch-server_inproc__sync.c
new file mode 100644
index 000000000000..8e2f40ec4b28
--- /dev/null
+++ b/emulators/wine-proton/files/patch-server_inproc__sync.c
@@ -0,0 +1,16 @@
+This revert wine-proton use of an ntsync.h header incompatible with any other OS than Linux
+
+--- server/inproc_sync.c.orig	2026-08-03 08:08:29 UTC
++++ server/inproc_sync.c
+@@ -35,8 +35,9 @@
+ #include "user.h"
+ 
+ #include "fsync.h"
+-
+-#include "ntsync_tmp.h"
++#ifdef HAVE_LINUX_NTSYNC_H
++# include <linux/ntsync.h> 
++#endif
+ 
+ #ifdef NTSYNC_IOC_EVENT_READ
+ 
diff --git a/emulators/wine-proton/files/patch-server_ptrace.c b/emulators/wine-proton/files/patch-server_ptrace.c
deleted file mode 100644
index 05ec36e9673a..000000000000
--- a/emulators/wine-proton/files/patch-server_ptrace.c
+++ /dev/null
@@ -1,209 +0,0 @@
-Split ptrace between high and low for 64 bit,
-revert https://github.com/ValveSoftware/wine/commit/9890af7bb352f93645bb0c7c705ff536c78efb02
---- server/ptrace.c.orig	2025-11-06 09:54:15 UTC
-+++ server/ptrace.c
-@@ -314,7 +314,34 @@ static int read_thread_long( struct thread *thread, vo
- /* read a long from a thread address space */
- static int read_thread_long( struct thread *thread, void *addr, unsigned long *data )
- {
-+#if defined(__FreeBSD__) && defined(__x86_64__)
-+
-+    int lo, hi;
-+
-     errno = 0;
-+
-+    lo = ptrace(PTRACE_PEEKDATA, get_ptrace_pid(thread), (caddr_t)addr, 0);
-+    if (lo == -1 && errno)
-+    {
-+      *data = -1;
-+      file_set_error();
-+      return -1;
-+    }
-+
-+    hi = ptrace(PTRACE_PEEKDATA, get_ptrace_pid(thread), (caddr_t)addr + 4, 0);
-+    if (hi == -1 && errno)
-+    {
-+      *data = -1;
-+      file_set_error();
-+      return -1;
-+    }
-+
-+    *data = hi;
-+    *data = (*data << 32) + lo;
-+
-+    return 0;
-+#else
-+    errno = 0;
-     *data = ptrace( PTRACE_PEEKDATA, get_ptrace_pid(thread), (caddr_t)addr, 0 );
-     if ( *data == -1 && errno)
-     {
-@@ -322,6 +349,7 @@ static int read_thread_long( struct thread *thread, vo
-         return -1;
-     }
-     return 0;
-+#endif
- }
- 
- static int read_thread_int( struct thread *thread, void *addr, unsigned int *data )
-@@ -334,6 +362,34 @@ static int read_thread_int( struct thread *thread, voi
-     return ret;
- }
- 
-+#if !defined(linux)
-+/* write a long to a thread address space */
-+static long write_thread_long( struct thread *thread, void *addr, unsigned long data, unsigned long mask )
-+{
-+    unsigned long old_data;
-+    int res;
-+
-+    if (mask != ~0ul)
-+    {
-+        if (read_thread_long( thread, addr, &old_data ) == -1) return -1;
-+        data = (data & mask) | (old_data & ~mask);
-+    }
-+
-+#if defined(__FreeBSD__) && defined(__x86_64__)
-+    if ((res = ptrace(PTRACE_POKEDATA, get_ptrace_pid(thread), (caddr_t)addr,     data))       == -1 ||
-+        (res = ptrace(PTRACE_POKEDATA, get_ptrace_pid(thread), (caddr_t)addr + 4, data >> 32)) == -1)
-+    {
-+        file_set_error();
-+    }
-+#else
-+    if ((res = ptrace( PTRACE_POKEDATA, get_ptrace_pid(thread), (caddr_t)addr, data )) == -1)
-+        file_set_error();
-+#endif
-+
-+    return res;
-+}
-+#endif
-+
- /* return a thread of the process suitable for ptracing */
- static struct thread *get_ptrace_thread( struct process *process )
- {
-@@ -414,11 +470,30 @@ int read_process_memory( struct process *process, clie
-     return !len;
- }
- 
-+#if !defined(linux)
-+/* make sure we can write to the whole address range */
-+/* len is the total size (in longs) */
-+static int check_process_write_access( struct thread *thread, long *addr, data_size_t len )
-+{
-+    int page = get_page_size() / sizeof(long);
-+
-+    for (;;)
-+    {
-+        if (write_thread_long( thread, addr, 0, 0 ) == -1) return 0;
-+        if (len <= page) break;
-+        addr += page;
-+        len -= page;
-+    }
-+    return (write_thread_long( thread, addr + len - 1, 0, 0 ) != -1);
-+}
-+#endif
-+
- /* write data to a process memory space */
- int write_process_memory( struct process *process, client_ptr_t ptr, data_size_t size, const char *src,
-                           data_size_t *written )
- {
-     struct thread *thread = get_ptrace_thread( process );
-+#if defined(linux)
-     struct iovec local, remote;
-     ssize_t len;
- 
-@@ -446,6 +521,95 @@ int write_process_memory( struct process *process, cli
-         return 0;
-     }
-     return 1;
-+#else
-+    int ret = 0;
-+    long data = 0;
-+    data_size_t len;
-+    long *addr;
-+    unsigned long first_mask, first_offset, last_mask, last_offset;
-+
-+    if (!thread) return 0;
-+
-+    if ((unsigned long)ptr != ptr)
-+    {
-+        set_error( STATUS_ACCESS_DENIED );
-+        return 0;
-+    }
-+
-+    /* compute the mask for the first long */
-+    first_mask = ~0;
-+    first_offset = ptr % sizeof(long);
-+    memset( &first_mask, 0, first_offset );
-+
-+    /* compute the mask for the last long */
-+    last_offset = (size + first_offset) % sizeof(long);
-+    if (!last_offset) last_offset = sizeof(long);
-+    last_mask = 0;
-+    memset( &last_mask, 0xff, last_offset );
-+
-+    addr = (long *)(unsigned long)(ptr - first_offset);
-+    len = (size + first_offset + sizeof(long) - 1) / sizeof(long);
-+
-+    if (written)
-+    {
-+        written = len;
-+    }
-+
-+    if (suspend_for_ptrace( thread ))
-+    {
-+        if (!check_process_write_access( thread, addr, len ))
-+        {
-+            set_error( STATUS_ACCESS_DENIED );
-+            goto done;
-+        }
-+
-+        if (len > 3)
-+        {
-+            char procmem[24];
-+            int fd;
-+
-+            snprintf( procmem, sizeof(procmem), "/proc/%u/mem", process->unix_pid );
-+            if ((fd = open( procmem, O_WRONLY )) != -1)
-+            {
-+                ssize_t r = pwrite( fd, src, size, ptr );
-+                close( fd );
-+                if (r == size)
-+                {
-+                    ret = 1;
-+                    goto done;
-+                }
-+            }
-+        }
-+
-+        /* first word is special */
-+        if (len > 1)
-+        {
-+            memcpy( (char *)&data + first_offset, src, sizeof(long) - first_offset );
-+            src += sizeof(long) - first_offset;
-+            if (write_thread_long( thread, addr++, data, first_mask ) == -1) goto done;
-+            first_offset = 0;
-+            len--;
-+        }
-+        else last_mask &= first_mask;
-+
-+        while (len > 1)
-+        {
-+            memcpy( &data, src, sizeof(long) );
-+            src += sizeof(long);
-+            if (write_thread_long( thread, addr++, data, ~0ul ) == -1) goto done;
-+            len--;
-+        }
-+
-+        /* last word is special too */
-+        memcpy( (char *)&data + first_offset, src, last_offset - first_offset );
-+        if (write_thread_long( thread, addr, data, last_mask ) == -1) goto done;
-+        ret = 1;
-+
-+    done:
-+        resume_after_ptrace( thread );
-+    }
-+    return ret;
-+#endif
- }
- 
- /* retrieve an LDT selector entry */
diff --git a/emulators/wine-proton/files/patch-tools_winebuild_res32.c b/emulators/wine-proton/files/patch-tools_winebuild_res32.c
deleted file mode 100644
index e256d3f68cd7..000000000000
--- a/emulators/wine-proton/files/patch-tools_winebuild_res32.c
+++ /dev/null
@@ -1,77 +0,0 @@
---- tools/winebuild/res32.c.orig	2025-11-06 09:54:15 UTC
-+++ tools/winebuild/res32.c
-@@ -44,8 +44,6 @@ struct resource
- {
-     struct string_id type;
-     struct string_id name;
--    const char      *input_name;
--    unsigned int     input_offset;
-     const void      *data;
-     unsigned int     data_size;
-     unsigned int     data_offset;
-@@ -158,6 +156,28 @@ static void put_string( const struct string_id *str )
-     }
- }
- 
-+static void dump_res_data( const struct resource *res )
-+{
-+    unsigned int i = 0;
-+    unsigned int size = (res->data_size + 3) & ~3;
-+
-+    if (!size) return;
-+
-+    input_buffer = res->data;
-+    input_buffer_pos  = 0;
-+    input_buffer_size = size;
-+
-+    output( "\t.long " );
-+    while (size > 4)
-+    {
*** 3240 LINES SKIPPED ***