aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Pfeifer <gerald@FreeBSD.org>2024-05-16 08:29:14 +0000
committerGerald Pfeifer <gerald@FreeBSD.org>2024-05-16 08:30:07 +0000
commit3f7e010b24f898f6f4128cc81ee9cb90b1a78277 (patch)
treed7996953ad0b897779a35bb6db01ac0fa630f111
parent1b08b51b7e64b23dc56f7aa6585fa9e73b050e5b (diff)
downloadports-3f7e010b24f898f6f4128cc81ee9cb90b1a78277.tar.gz
ports-3f7e010b24f898f6f4128cc81ee9cb90b1a78277.zip
emulators/wine-devel: Unbreak WoW64 again
Restore files/patch-dlls_ntdll_unix_loader.c which we "lost" with the update to Wine 9.0 by means of an adjusted version. PR: 278427 Obtained from: Alex S <iwtcex@gmail.com> in PR 278525
-rw-r--r--emulators/wine-devel/Makefile1
-rw-r--r--emulators/wine-devel/files/patch-dlls_ntdll_unix_loader.c24
2 files changed, 25 insertions, 0 deletions
diff --git a/emulators/wine-devel/Makefile b/emulators/wine-devel/Makefile
index 5939a449dc25..a081b90e8ab5 100644
--- a/emulators/wine-devel/Makefile
+++ b/emulators/wine-devel/Makefile
@@ -1,5 +1,6 @@
PORTNAME= wine
DISTVERSION= 9.8
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= emulators
MASTER_SITES= https://dl.winehq.org/wine/source/9.x/
diff --git a/emulators/wine-devel/files/patch-dlls_ntdll_unix_loader.c b/emulators/wine-devel/files/patch-dlls_ntdll_unix_loader.c
new file mode 100644
index 000000000000..97f237d79c30
--- /dev/null
+++ b/emulators/wine-devel/files/patch-dlls_ntdll_unix_loader.c
@@ -0,0 +1,24 @@
+--- dlls/ntdll/unix/loader.c.orig 2024-04-05 17:03:05 UTC
++++ dlls/ntdll/unix/loader.c
+@@ -480,6 +480,21 @@ char *get_alternate_wineloader( WORD machine )
+
+ if (machine == current_machine) return NULL;
+
++ 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)
+ {