ports/emulators/wine-devel/files/wine.sh
Gerald Pfeifer 27ae28dd24 emulators/wine-devel: Invoke with LD_BIND_NOW and revampe WoW
Forward port 1d2af6e089 and its
two follow-up fixes ad15b0e748 and
1b5885c463 from emulators/wine:

   Wine 6.0 and later need LD_BIND_NOW / LD_32_BIND_NOW on FreeBSD,
   cf. https://bugs.winehq.org/show_bug.cgi?id=50257 and
   https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252307
   so move the actual binaries to wine64.bin / wine.bin and invoke
   them via a script that does those settings. [1]

   Also revamp the WoW handling/packging which combines 32-bit/i386
   Wine into 64-bit/amd64 Wine. [1]

Submitted by:   Alex S <iwtcex@gmail.com> [1]
PR:             257284 [1], 252307 [1], 255336, 257020
2021-08-02 21:40:19 +00:00

14 lines
276 B
Bash

#!/bin/sh
TARGET="$(realpath "$0")"
if [ -z "$WINESERVER" ] && [ -f "${TARGET}server32" ]
then
export WINESERVER="${TARGET}server32"
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" "$@"