mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-19 03:52:17 +00:00
5c3b6d77f9
nvidia-driver port in the same fashion it was done as the conflict with the libGL port. Mesa ports: Add pkg-[de]install scripts to handle the symlinks in the libEGL and libglesv2 port. Move pkg-[de]install scripts of libGL out of files/ Put the real mesa libraries into lib/.mesa so we don't have each port create a directory for it own use. Nvidia-driver: Only apply the libEGL.so and libGLESv2.so alternative install directory if nvidia-driver actually ships them. Copied from PR submitter, since it was much cleaner then my initial attempt. Make pkg-install script check if the nvidia-driver port installed the libEGL/libglesv2 libraries and only then make the symlinks. This should allow the script to work with the slave ports which don't install these libraries. Make the pkg-deinstall script check if the mesa version of the libEGL/libGLESv2 libraries are installed before trying to recreate the symlinks of those ports. PR: 194924 Submitted by: Gerard Seibert <gerard_seibert@outlook.com> Approved by: portmgr (angrybapt)
20 lines
522 B
Bash
20 lines
522 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PREFIX="${PKG_PREFIX-/usr/local}"
|
|
|
|
case $2 in
|
|
POST-INSTALL)
|
|
if [ -f ${PREFIX}/lib/.nvidia/libGL.so.1 ]; then
|
|
/bin/ln -f ${PREFIX}/lib/.nvidia/libGL.so.1 ${PREFIX}/lib/libGL.so
|
|
/bin/ln -f ${PREFIX}/lib/.nvidia/libGL.so.1 ${PREFIX}/lib/libGL.so.1
|
|
else
|
|
/bin/ln -f ${PREFIX}/lib/.mesa/libGL.so.1.2.0 ${PREFIX}/lib/libGL.so
|
|
/bin/ln -f ${PREFIX}/lib/.mesa/libGL.so.1.2.0 ${PREFIX}/lib/libGL.so.1
|
|
/bin/ln -f ${PREFIX}/lib/.mesa/libGL.so.1.2.0 ${PREFIX}/lib/libGL.so.1.2.0
|
|
fi
|
|
;;
|
|
esac
|