View | Details | Raw Unified | Return to bug 275677 | Differences between
and this patch

Collapse All | Expand All

(-)b/emulators/wine/Makefile (+1 lines)
Lines 1-5 Link Here
1
PORTNAME=	wine
1
PORTNAME=	wine
2
DISTVERSION=	8.0.2
2
DISTVERSION=	8.0.2
3
PORTREVISION=1
3
PORTEPOCH=	1
4
PORTEPOCH=	1
4
CATEGORIES=	emulators
5
CATEGORIES=	emulators
5
MASTER_SITES=	https://dl.winehq.org/wine/source/8.0/
6
MASTER_SITES=	https://dl.winehq.org/wine/source/8.0/
(-)b/emulators/wine/files/patch-dlls_ntdll_unix_loader.c (+24 lines)
Added Link Here
1
--- dlls/ntdll/unix/loader.c.orig	2023-07-19 15:29:22 UTC
2
+++ dlls/ntdll/unix/loader.c
3
@@ -694,6 +694,21 @@ static NTSTATUS loader_exec( char **argv, WORD machine
4
 {
5
     if (machine != current_machine)
6
     {
7
+        char* wineserver_path = getenv("WINESERVER");
8
+        if (wineserver_path != NULL && wineserver_path[0] == '/') {
9
+            char* s = remove_tail(wineserver_path, "server");
10
+            if (s != NULL) {
11
+                if (machine == IMAGE_FILE_MACHINE_AMD64) {
12
+                    argv[1] = malloc(strlen(s) + 3);
13
+                    strcpy(argv[1], s);
14
+                    strcat(argv[1], "64");
15
+                } else {
16
+                    argv[1] = s;
17
+                }
18
+                preloader_exec(argv);
19
+            }
20
+        }
21
+
22
         if (machine == IMAGE_FILE_MACHINE_AMD64)  /* try the 64-bit loader */
23
         {
24
             size_t len = strlen(wineloader);
(-)b/emulators/wine/files/wine.sh (-3 / +9 lines)
Lines 2-10 Link Here
2
2
3
TARGET="$(realpath "$0")"
3
TARGET="$(realpath "$0")"
4
4
5
if [ -z "$WINESERVER" ] && [ -f "${TARGET}server32" ]
5
if [ -z "$WINESERVER" ]
6
then
6
then
7
  export WINESERVER="${TARGET}server32"
7
  if [ -f "${TARGET%/*}/wineserver" ]
8
  then
9
    export WINESERVER="${TARGET%/*}/wineserver"
10
  fi
11
  if [ -f "${TARGET%/*}/wineserver32" ]
12
  then
13
    export WINESERVER="${TARGET%/*}/wineserver32"
14
  fi
8
fi
15
fi
9
16
10
# Workaround for https://bugs.winehq.org/show_bug.cgi?id=50257
17
# Workaround for https://bugs.winehq.org/show_bug.cgi?id=50257
11
- 

Return to bug 275677