freebsd-ports/emulators/i386-wine-devel/files/pkg-install
David Naylor d2e0f93fef Improve 3D acceleration for emulators/i386-wine-devel.
- Install the dri library drivers that are required by mesaGL
 - Teach binbounce about LIBGL_LIBRARY_PATH
 - Prevent recursive definitions by binbounce
 - Follow the example of mesagl/nvidia-driver wrt library handing
 - Lay initial ground work to handle "old" and "new" xorg

WARNING: there appears to be a problem with FREEBSD32 which prevents
    3D-acceleration support from working, further investigation is required
    HELP WANTED TO SOLVE THIS PROBLEM

Approved by:	eadler,bdrewery (mentors, implicit)
2013-06-09 17:42:57 +00:00

53 lines
1.4 KiB
Bash

#!/bin/sh
export PREFIX=${PKG_PREFIX:-/usr/local}
export WINE=$1
if [ -d ${PREFIX}/lib32/.libGL-new ]
then
LIBGLDIR=.libGL-new
else
LIBGLDIR=.libGL
fi
case "$2" in
DEINSTALL)
sh ${PREFIX}/share/wine/patch-nvidia.sh -d
rm -r ${PREFIX}/lib32/libGL.so.1 ${PREFIX}/lib32/dri
;;
POST-INSTALL)
ln -s ${LIBGLDIR}/libGL.so.1 ${PREFIX}/lib32/libGL.so.1
mkdir -p ${PREFIX}/lib32/dri
for dri in $(cd ${PREFIX}/lib32/${LIBGLDIR}/dri/; echo *.so)
do
ln -s ../${LIBGLDIR}/dri/${dri} ${PREFIX}/lib32/dri/${dri}
done
sh ${PREFIX}/share/wine/patch-nvidia.sh -n > /dev/null 2>&1
case $? in
0)
cat << _EOF
$1 has been patched for use with nvidia graphics driver. If
the version of the installed nvidia graphics driver changes execute (as root):
_EOF
;;
1)
cat << _EOF
This system does not appear to use a nvidia graphics driver. If this changes
and then every time the driver's version changes execute (as root)
_EOF
;;
*)
cat << _EOF
A NVIDIA GRAPHICS DRIVER HAS BEEN DETECTED ON THIS SYSTEM AND THE AUTOMATED
PATCHING HAS FAILED, execute (as root)
_EOF
;;
esac
cat << _EOF
sh ${PREFIX}/share/wine/patch-nvidia.sh
to get 2D/3D acceleration to work with the nvidia driver. Without this wine
will crash when a program requires 2D/3D graphics acceleration.
_EOF
;;
esac