FreeBSD Bugzilla – Attachment 246955 Details for
Bug 275677
emulators/wine: Unbreak WOW64
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-emulators-wine-Unbreak-WOW64.patch
0001-emulators-wine-Unbreak-WOW64.patch (text/plain), 2.68 KB, created by
Alexander Vereeken
on 2023-12-10 17:10:37 UTC
(
hide
)
Description:
0001-emulators-wine-Unbreak-WOW64.patch
Filename:
MIME Type:
Creator:
Alexander Vereeken
Created:
2023-12-10 17:10:37 UTC
Size:
2.68 KB
patch
obsolete
>From f842098c914cf9e09d62f67e5caa0bc7d371502e Mon Sep 17 00:00:00 2001 >From: Alexander Vereeken <Alexander88207@protonmail.com> >Date: Sun, 10 Dec 2023 18:03:32 +0100 >Subject: [PATCH] emulators/wine: Unbreak WOW64 > >Picked from: 1f07ec6014a3c3380a731efdc74a3cf88b91ca29 >--- > emulators/wine/Makefile | 1 + > .../wine/files/patch-dlls_ntdll_unix_loader.c | 24 +++++++++++++++++++ > emulators/wine/files/wine.sh | 11 +++++++-- > 3 files changed, 34 insertions(+), 2 deletions(-) > create mode 100644 emulators/wine/files/patch-dlls_ntdll_unix_loader.c > >diff --git a/emulators/wine/Makefile b/emulators/wine/Makefile >index e5ac5f97ad35..52aacf7fccdd 100644 >--- a/emulators/wine/Makefile >+++ b/emulators/wine/Makefile >@@ -1,5 +1,6 @@ > PORTNAME= wine > DISTVERSION= 8.0.2 >+PORTREVISION=1 > PORTEPOCH= 1 > CATEGORIES= emulators > MASTER_SITES= https://dl.winehq.org/wine/source/8.0/ >diff --git a/emulators/wine/files/patch-dlls_ntdll_unix_loader.c b/emulators/wine/files/patch-dlls_ntdll_unix_loader.c >new file mode 100644 >index 000000000000..c290524821a4 >--- /dev/null >+++ b/emulators/wine/files/patch-dlls_ntdll_unix_loader.c >@@ -0,0 +1,24 @@ >+--- dlls/ntdll/unix/loader.c.orig 2023-07-19 15:29:22 UTC >++++ dlls/ntdll/unix/loader.c >+@@ -694,6 +694,21 @@ static NTSTATUS loader_exec( char **argv, WORD machine >+ { >+ if (machine != current_machine) >+ { >++ 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) { >++ argv[1] = malloc(strlen(s) + 3); >++ strcpy(argv[1], s); >++ strcat(argv[1], "64"); >++ } else { >++ argv[1] = s; >++ } >++ preloader_exec(argv); >++ } >++ } >++ >+ if (machine == IMAGE_FILE_MACHINE_AMD64) /* try the 64-bit loader */ >+ { >+ size_t len = strlen(wineloader); >diff --git a/emulators/wine/files/wine.sh b/emulators/wine/files/wine.sh >index 96a350fce615..057406196371 100644 >--- a/emulators/wine/files/wine.sh >+++ b/emulators/wine/files/wine.sh >@@ -2,9 +2,16 @@ > > TARGET="$(realpath "$0")" > >-if [ -z "$WINESERVER" ] && [ -f "${TARGET}server32" ] >+if [ -z "$WINESERVER" ] > then >- export WINESERVER="${TARGET}server32" >+ if [ -f "${TARGET%/*}/wineserver" ] >+ then >+ export WINESERVER="${TARGET%/*}/wineserver" >+ fi >+ if [ -f "${TARGET%/*}/wineserver32" ] >+ then >+ export WINESERVER="${TARGET%/*}/wineserver32" >+ fi > fi > > # Workaround for https://bugs.winehq.org/show_bug.cgi?id=50257 >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 275677
:
246955
|
246956