diff options
Diffstat (limited to 'app-emulation/wine-proton/files')
11 files changed, 232 insertions, 0 deletions
diff --git a/app-emulation/wine-proton/files/README.gentoo b/app-emulation/wine-proton/files/README.gentoo new file mode 100644 index 000000000000..48f3d568a013 --- /dev/null +++ b/app-emulation/wine-proton/files/README.gentoo @@ -0,0 +1,52 @@ +While this version of Wine is usable independently, it does contain some +Steam-oriented changes that may be unexpected. Notably C:\users\steamuser +is used rather than C:\users\<user-name> and it may be necessary to move +files if converting from non-proton Wine prefixes (like games' save files). + +To keep a low maintenance cost, these changes are not reverted in Gentoo +with the exception of re-enabling winemenubuilder for desktop entries. + +Also, given this Wine variant is oriented toward running games, some +normally unrelated features (e.g. cups) may not have real upstream +(Valve) support. Because of this, some are left always disabled. + +If needed, use other variants for the more expected Wine behavior. + +--- + +Given Proton is not creating the Wine prefixes, some features are not +enabled by default and PROTON_* variables to control them are unrecognized. + +To (optionally) setup some notable defaults of Proton: +- export WINEFSYNC=1 +. Often improves performance for CPU-bound applications, recommended +. but should be left disabled if get crashes mentioning fsync errors. +. >Requires linux kernel >=5.16 if unpatched. +- export WINE_LARGE_ADDRESS_AWARE=1 +. Allows 32bit applications to access more memory, notably helps +. prevent crashes on memory-heavy applications while using dxvk below. +- WINEPREFIX=/path/to setup_dxvk.sh install --symlink +. Vulkan-based d3d9/10/11 that often provides both better performance +. and compatibility (strongly recommended). +. >Requires app-emulation/dxvk +- WINEPREFIX=/path/to setup_vkd3d_proton.sh install --symlink +. Like above, but for d3d12. Wine also supports vkd3d as-is but this +. is the modified fork used by Proton (may or may not be better). +. Intended to work with dxvk's dxgi.dll so, if used, install both. +. >Requires app-emulation/vkd3d-proton + +For some applications it may be better to disable these or do other +workarounds, see https://www.protondb.com/ for specific information. + +Many other proton-specific improvements / fixes are always enabled, and +some game-specific quirks are auto-enabled as needed (can see a few from +running winecfg). + +If have audio/video playback issues, note to look at GStreamer plugins. +Notably USE=ffmpeg on media-plugins/gst-plugins-meta which Proton normally +provide by default. + +--- + +If have other Wine variants installed, remember to either use `eselect wine` +to select this variant or call it as wine-proton. diff --git a/app-emulation/wine-proton/files/wine-proton-7.0.4-musl.patch b/app-emulation/wine-proton/files/wine-proton-7.0.4-musl.patch new file mode 100644 index 000000000000..0776df12f241 --- /dev/null +++ b/app-emulation/wine-proton/files/wine-proton-7.0.4-musl.patch @@ -0,0 +1,17 @@ +Wrongly assumes that futex_waitv is missing if no glibc-only __NR_futex_waitv. +https://bugs.gentoo.org/868747 +--- a/configure.ac ++++ b/configure.ac +@@ -2153,2 +2153,5 @@ + ++dnl Check for futex_waitv structure members ++AC_CHECK_MEMBERS(struct futex_waitv.val,,,[#include <linux/futex.h>]) ++ + dnl Check for socket structure members +--- a/dlls/ntdll/unix/fsync.c ++++ b/dlls/ntdll/unix/fsync.c +@@ -67,2 +67,4 @@ + # define __NR_futex_waitv 449 ++#endif ++#ifndef HAVE_STRUCT_FUTEX_WAITV_VAL + # define FUTEX_32 2 diff --git a/app-emulation/wine-proton/files/wine-proton-7.0.4-noexecstack.patch b/app-emulation/wine-proton/files/wine-proton-7.0.4-noexecstack.patch new file mode 100644 index 000000000000..92aa0b4b5c5d --- /dev/null +++ b/app-emulation/wine-proton/files/wine-proton-7.0.4-noexecstack.patch @@ -0,0 +1,7 @@ +Also write GNU-stack note on dummy files used for stub libraries. +--- a/tools/winebuild/import.c ++++ b/tools/winebuild/import.c +@@ -1675,2 +1675,3 @@ + output( "\t.text\n" ); ++ output_gnu_stack_note(); + } diff --git a/app-emulation/wine-proton/files/wine-proton-7.0.4-restore-menubuilder.patch b/app-emulation/wine-proton/files/wine-proton-7.0.4-restore-menubuilder.patch new file mode 100644 index 000000000000..760340791060 --- /dev/null +++ b/app-emulation/wine-proton/files/wine-proton-7.0.4-restore-menubuilder.patch @@ -0,0 +1,14 @@ +Without Steam there is no launcher by default, users with more custom +setups may not need this but others will want access to desktop entries. +--- a/configure.ac ++++ b/configure.ac +@@ -3683,2 +3683,3 @@ + WINE_CONFIG_MAKEFILE(programs/winefile) ++WINE_CONFIG_MAKEFILE(programs/winemenubuilder) + WINE_CONFIG_MAKEFILE(programs/winemine) +--- a/loader/wine.inf.in ++++ b/loader/wine.inf.in +@@ -5630,2 +5630,3 @@ + [Services] ++HKLM,%CurrentVersion%\RunServices,"winemenubuilder",2,"%11%\winemenubuilder.exe -a -r" + HKLM,"System\CurrentControlSet\Services\Eventlog\Application",,16 diff --git a/app-emulation/wine-proton/files/wine-proton-7.0.4-unwind.patch b/app-emulation/wine-proton/files/wine-proton-7.0.4-unwind.patch new file mode 100644 index 000000000000..372def52ba0c --- /dev/null +++ b/app-emulation/wine-proton/files/wine-proton-7.0.4-unwind.patch @@ -0,0 +1,40 @@ +Fix build with llvm-libunwind, and also fix for non-llvm libunwind +when using clang+bfd given clang doesn't have _Unwind_Find_FDE in +its rtlib and expects it from llvm-libunwind. + +The _CONFIG_H_ check is for <llvm-libunwind-15 (adds _VERSION). +--- a/dlls/ntdll/unix/signal_x86_64.c ++++ b/dlls/ntdll/unix/signal_x86_64.c +@@ -646,7 +646,9 @@ + unsigned int cie_offset; + }; + ++#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__) + extern const struct dwarf_fde *_Unwind_Find_FDE (void *, struct dwarf_eh_bases *); ++#endif + + static unsigned char dwarf_get_u1( const unsigned char **p ) + { +@@ -1368,7 +1370,7 @@ + unw_proc_info_t info; + int rc; + +-#ifdef __APPLE__ ++#if defined(__APPLE__) || defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) + rc = unw_getcontext( &unw_context ); + if (rc == UNW_ESUCCESS) + rc = unw_init_local( &cursor, &unw_context ); +@@ -1491,11 +1493,13 @@ + NTSTATUS CDECL unwind_builtin_dll( ULONG type, DISPATCHER_CONTEXT *dispatch, CONTEXT *context ) + { + struct dwarf_eh_bases bases; ++#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__) + const struct dwarf_fde *fde = _Unwind_Find_FDE( (void *)(context->Rip - 1), &bases ); + + if (fde) + return dwarf_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context, fde, + &bases, &dispatch->LanguageHandler, &dispatch->HandlerData ); ++#endif + #ifdef HAVE_LIBUNWIND + return libunwind_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context, + &dispatch->LanguageHandler, &dispatch->HandlerData ); diff --git a/app-emulation/wine-proton/files/wine-proton-7.0.6-mingw64-11.0.0.patch b/app-emulation/wine-proton/files/wine-proton-7.0.6-mingw64-11.0.0.patch new file mode 100644 index 000000000000..54ecc49c7235 --- /dev/null +++ b/app-emulation/wine-proton/files/wine-proton-7.0.6-mingw64-11.0.0.patch @@ -0,0 +1,20 @@ +Hack: this does not actually need stdarg.h, but including it ensures +that _mingw.h will be loaded before the rest of Wine's winnt.h avoiding +issues with mingw64-runtime-11.0.0, e.g.: + + _mingw.h:602:60: error: redefinition of ‘__fastfail’ + make[1]: *** [Makefile:5900: dlls/advapi32/crypt_des.cross.o] Error 1 + +(other crypt_*.c happen to include stdarg.h first and don't fail, but this +one does not, same for several other files in dlls/) + +Not an issue with non-proton Wine 7.0 as Wine did not define __fastfail +until ~wine-7.10. Wine 8 does define it but does not seem to be a problem +there (perhaps due to different header layout). A more "right" fix would +be welcome, but given Proton-7 seems EOL it is not judged important. +--- a/include/winnt.h ++++ b/include/winnt.h +@@ -32,2 +32,3 @@ + #include <string.h> ++#include <stdarg.h> + #endif diff --git a/app-emulation/wine-proton/files/wine-proton-7.0.6-vulkan-libm.patch b/app-emulation/wine-proton/files/wine-proton-7.0.6-vulkan-libm.patch new file mode 100644 index 000000000000..b81778fb957c --- /dev/null +++ b/app-emulation/wine-proton/files/wine-proton-7.0.6-vulkan-libm.patch @@ -0,0 +1,12 @@ +Valve's patches add use of "ceil" without using libm, it works +by accident with -O2 but fails with -Os. + +ld: dlls/winevulkan/vulkan.o: in function `fshack_vk_queue_present': +vulkan.c:(.text+0x12f46): undefined reference to `ceil' +--- a/dlls/winevulkan/Makefile.in ++++ b/dlls/winevulkan/Makefile.in +@@ -4,3 +4,3 @@ + IMPORTS = user32 gdi32 advapi32 setupapi win32u +-EXTRALIBS = $(PTHREAD_LIBS) ++EXTRALIBS = -lm $(PTHREAD_LIBS) + diff --git a/app-emulation/wine-proton/files/wine-proton-8.0.1c-unwind.patch b/app-emulation/wine-proton/files/wine-proton-8.0.1c-unwind.patch new file mode 100644 index 000000000000..50fc5be57abc --- /dev/null +++ b/app-emulation/wine-proton/files/wine-proton-8.0.1c-unwind.patch @@ -0,0 +1,36 @@ +Fix build with llvm-libunwind, and also fix for non-llvm libunwind +when using clang+bfd given clang doesn't have _Unwind_Find_FDE in +its rtlib and expects it from llvm-libunwind. + +The _CONFIG_H_ check is for <llvm-libunwind-15 (adds _VERSION). +--- a/dlls/ntdll/unix/dwarf.h ++++ b/dlls/ntdll/unix/dwarf.h +@@ -257,5 +257,7 @@ + }; + ++#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__) + extern const struct dwarf_fde *_Unwind_Find_FDE (void *, struct dwarf_eh_bases *); ++#endif + + static unsigned char dwarf_get_u1( const unsigned char **p ) +--- a/dlls/ntdll/unix/signal_x86_64.c ++++ b/dlls/ntdll/unix/signal_x86_64.c +@@ -648,5 +648,5 @@ + int rc; + +-#ifdef __APPLE__ ++#if defined(__APPLE__) || defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) + rc = unw_getcontext( &unw_context ); + if (rc == UNW_ESUCCESS) +@@ -774,4 +774,5 @@ + CONTEXT *context = params->context; + struct dwarf_eh_bases bases; ++#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__) + const struct dwarf_fde *fde = _Unwind_Find_FDE( (void *)(context->Rip - 1), &bases ); + +@@ -779,4 +780,5 @@ + return dwarf_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context, fde, + &bases, &dispatch->LanguageHandler, &dispatch->HandlerData ); ++#endif + #ifdef HAVE_LIBUNWIND + return libunwind_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context, diff --git a/app-emulation/wine-proton/files/wine-proton-8.0.4-restore-menubuilder.patch b/app-emulation/wine-proton/files/wine-proton-8.0.4-restore-menubuilder.patch new file mode 100644 index 000000000000..f278a2cbc264 --- /dev/null +++ b/app-emulation/wine-proton/files/wine-proton-8.0.4-restore-menubuilder.patch @@ -0,0 +1,8 @@ +Without Steam there is no launcher by default, users with more custom +setups may not need this but others will want access to desktop entries. +--- a/loader/wine.inf.in ++++ b/loader/wine.inf.in +@@ -5630,2 +5630,3 @@ + [Services] ++HKLM,%CurrentVersion%\RunServices,"winemenubuilder",2,"%11%\winemenubuilder.exe -a -r" + HKLM,"System\CurrentControlSet\Services\Eventlog\Application",,16 diff --git a/app-emulation/wine-proton/files/wine-proton-8.0.5c-vulkan-libm.patch b/app-emulation/wine-proton/files/wine-proton-8.0.5c-vulkan-libm.patch new file mode 100644 index 000000000000..c3d9794fbbfe --- /dev/null +++ b/app-emulation/wine-proton/files/wine-proton-8.0.5c-vulkan-libm.patch @@ -0,0 +1,12 @@ +Valve's patches add use of "ceil" without using libm, it works +by accident with -O2 but fails with -Os. + +ld: dlls/winevulkan/vulkan.o: in function `fshack_vk_queue_present': +vulkan.c:(.text+0x12f46): undefined reference to `ceil' +--- a/dlls/winevulkan/Makefile.in ++++ b/dlls/winevulkan/Makefile.in +@@ -4,3 +4,3 @@ + IMPORTS = user32 gdi32 advapi32 setupapi win32u +-UNIX_LIBS = -lwin32u $(PTHREAD_LIBS) ++UNIX_LIBS = -lm -lwin32u $(PTHREAD_LIBS) + diff --git a/app-emulation/wine-proton/files/wine-proton-9.0-rpath.patch b/app-emulation/wine-proton/files/wine-proton-9.0-rpath.patch new file mode 100644 index 000000000000..78e4393d390d --- /dev/null +++ b/app-emulation/wine-proton/files/wine-proton-9.0-rpath.patch @@ -0,0 +1,14 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -813,8 +813,11 @@ + ;; + esac + ;; + esac ++ ++ # do this at the end because it needs double dollar for makefile ++ WINE_TRY_CFLAGS([-Wl,-rpath,\\\$ORIGIN],[UNIXLDFLAGS="$UNIXLDFLAGS '-Wl,-rpath,\$\$ORIGIN'"]) + ;; + esac + + enable_winecoreaudio_drv=${enable_winecoreaudio_drv:-no} |