forked from Lainports/freebsd-ports
emulators/wine-proton: add wow64 wrapper.
PR: 255381
This commit is contained in:
parent
1c2c1dec44
commit
d8fafe84bd
5 changed files with 77 additions and 6 deletions
|
|
@ -106,8 +106,13 @@ pre-build:
|
|||
post-install:
|
||||
.if ${ARCH} == i386
|
||||
${MV} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wineserver ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wineserver32
|
||||
${MV} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine32
|
||||
${MV} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine.bin
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine
|
||||
.else
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/pkg32.sh ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/pkg32.sh
|
||||
${MV} ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine64 ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine64.bin
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine64
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/wine-wow64.sh ${STAGEDIR}${PREFIX}/${PORTNAME}/bin/wine
|
||||
.endif
|
||||
${RM} -r ${STAGEDIR}${PREFIX}/${PORTNAME}/include
|
||||
${RM} -r ${STAGEDIR}${MANPREFIX}/man
|
||||
|
|
|
|||
13
emulators/wine-proton/files/pkg32.sh
Normal file
13
emulators/wine-proton/files/pkg32.sh
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#!/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/)
|
||||
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" "$@"
|
||||
34
emulators/wine-proton/files/wine-wow64.sh
Normal file
34
emulators/wine-proton/files/wine-wow64.sh
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/sh -e
|
||||
TARGET="$(realpath "$0")"
|
||||
PREFIX="${TARGET%/*/*}"
|
||||
LOCALBASE="${PREFIX%/*}"
|
||||
|
||||
I386_ROOT="${WINE_i386_ROOT:-$HOME/.i386-wine-pkg}"
|
||||
|
||||
export LIBGL_DRIVERS_PATH="${LIBGL_DRIVERS_PATH:+$LIBGL_DRIVERS_PATH:}$LOCALBASE/lib/dri:$LOCALBASE/lib32/dri:$I386_ROOT/$LOCALBASE/lib/dri"
|
||||
export LD_32_LIBRARY_PATH="${LD_32_LIBRARY_PATH:+$LD_32_LIBRARY_PATH:}$I386_ROOT/$PREFIX/lib/wine:$LOCALBASE/lib32:$I386_ROOT/$LOCALBASE/lib:$I386_ROOT/$LOCALBASE/llvm10/lib:$I386_ROOT/$LOCALBASE/llvm11/lib"
|
||||
export LD_32_LIBRARY_PATH_RPATH=y
|
||||
|
||||
if [ -z "$WINE_NO_WOW64" ]
|
||||
then
|
||||
export PATH="${TARGET%/*}:${PATH}"
|
||||
export WINESERVER="${TARGET}server"
|
||||
fi
|
||||
|
||||
if [ ! -f "$I386_ROOT/$PREFIX/bin/wine" ]
|
||||
then
|
||||
printf "%s doesn't exist!\n\n" "$I386_ROOT/$PREFIX/bin/wine"
|
||||
printf "Try installing 32-bit wine with\n\t%s\n" "$PREFIX/bin/pkg32.sh install wine-proton mesa-dri"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WINE32_VERSION=$(env -u WINELOADERNOEXEC "$I386_ROOT/$PREFIX/bin/wine" --version)
|
||||
WINE64_VERSION=$(env -u WINELOADERNOEXEC "${TARGET}64" --version)
|
||||
if [ "$WINE32_VERSION" != "$WINE64_VERSION" ]
|
||||
then
|
||||
printf "wine [%s] and wine64 [%s] versions do not match!\n\n" "$WINE32_VERSION" "$WINE64_VERSION"
|
||||
printf "Try updating 32-bit wine with\n\t%s\n" "$PREFIX/bin/pkg32.sh upgrade"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "$I386_ROOT/$PREFIX/bin/wine" "$@"
|
||||
|
|
@ -1,4 +1,21 @@
|
|||
#!/bin/sh
|
||||
TARGET="`realpath $0`"
|
||||
export WINESERVER=${WINESERVER-${TARGET}server32}
|
||||
exec "${TARGET}32" "$@"
|
||||
TARGET="$(realpath "$0")"
|
||||
|
||||
if [ -z "$WINESERVER" ] && [ -f "${TARGET}server32" ]
|
||||
then
|
||||
export WINESERVER="${TARGET}server32"
|
||||
fi
|
||||
|
||||
export GST_PLUGIN_SYSTEM_PATH_1_0="${TARGET%/*/*/*}/lib/gstreamer-1.0"
|
||||
|
||||
# workaround for https://bugs.winehq.org/show_bug.cgi?id=50257
|
||||
export LD_BIND_NOW=1
|
||||
export LD_32_BIND_NOW=1
|
||||
|
||||
# workaround for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255336
|
||||
if [ "$(uname -p)" = amd64 ]
|
||||
then
|
||||
export LD_LIBMAP="libgcc_s.so.1=/lib/libgcc_s.so.1,${LD_LIBMAP}"
|
||||
fi
|
||||
|
||||
exec "${TARGET}.bin" "$@"
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@
|
|||
%%DOCSDIR%%/ANNOUNCE
|
||||
%%DOCSDIR%%/AUTHORS
|
||||
%%DOCSDIR%%/README
|
||||
%%WINE32%%wine-proton/bin/wine
|
||||
%%WINE32%%wine-proton/bin/wine32
|
||||
%%WINE32%%wine-proton/bin/wine.bin
|
||||
%%WINE32%%wine-proton/bin/wineserver32
|
||||
%%WINE32%%wine-proton/lib/wine/avifile.dll16.so
|
||||
%%WINE32%%wine-proton/lib/wine/comm.drv16.so
|
||||
|
|
@ -140,7 +139,9 @@
|
|||
%%WINE32%%wine-proton/lib/wine/winsock.dll16.so
|
||||
%%WINE32%%wine-proton/lib/wine/wintab.dll16.so
|
||||
%%WINE32%%wine-proton/lib/wine/wow32.dll.so
|
||||
%%WINE64%%wine-proton/bin/pkg32.sh
|
||||
%%WINE64%%wine-proton/bin/wine64
|
||||
%%WINE64%%wine-proton/bin/wine64.bin
|
||||
%%WINE64%%wine-proton/bin/wineserver
|
||||
wine-proton/bin/function_grep.pl
|
||||
wine-proton/bin/msidb
|
||||
|
|
@ -149,6 +150,7 @@ wine-proton/bin/notepad
|
|||
wine-proton/bin/regedit
|
||||
wine-proton/bin/regsvr32
|
||||
wine-proton/bin/widl
|
||||
wine-proton/bin/wine
|
||||
wine-proton/bin/wineboot
|
||||
wine-proton/bin/winebuild
|
||||
wine-proton/bin/winecfg
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue