mirror of
https://git.freebsd.org/ports.git
synced 2025-05-02 03:26:41 -04:00
This forward ports the following two commits from emulators/wine as far as files/wine.sh goes: commitef11261971
Author: Gerald Pfeifer <gerald@FreeBSD.org> Date: Wed Jan 31 12:27:21 2024 +0000 emulators/wine: Simplify the logic in wine.sh and commit0f2052c378
Author: Alexander Vereeken <Alexander88207@protonmail.com> Date: Sun Dec 17 22:58:41 2023 +0000 emulators/wine: Unbreak WoW64 This is an excerpt of1f07ec6014
by Alex S <iwtcex@gmail.com> for emulators/wine-proton. PR: 275677, 279927 Reported by: scf
17 lines
402 B
Bash
17 lines
402 B
Bash
#!/bin/sh
|
|
|
|
TARGET="$(realpath "$0")"
|
|
|
|
if [ -z "$WINESERVER" ]; then
|
|
if [ -f "${TARGET%/*}/wineserver32" ]; then
|
|
export WINESERVER="${TARGET%/*}/wineserver32"
|
|
elif [ -f "${TARGET%/*}/wineserver" ]; then
|
|
export WINESERVER="${TARGET%/*}/wineserver"
|
|
fi
|
|
fi
|
|
|
|
# Workaround for https://bugs.winehq.org/show_bug.cgi?id=50257
|
|
export LD_BIND_NOW=1
|
|
export LD_32_BIND_NOW=1
|
|
|
|
exec "${TARGET}.bin" "$@"
|