ports/emulators/wine-devel/files/pkg32.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

15 lines
446 B
Bash

#!/bin/sh -e
if [ "$(id -u)" = 0 ]
then
echo "Don't run this script as root!"
exit 1
fi
I386_ROOT="${WINE_i386_ROOT:-$HOME/.i386-wine-pkg}"
mkdir -p "$I386_ROOT"
ABI=$(pkg config ABI | sed s/amd64/i386/)
# Show what we're going to do, then do it.
echo pkg -o ABI="$ABI" -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@"
exec pkg -o ABI="$ABI" -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@"