aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/libGL
diff options
context:
space:
mode:
authorkwm <kwm@FreeBSD.org>2012-08-31 23:44:41 +0800
committerkwm <kwm@FreeBSD.org>2012-08-31 23:44:41 +0800
commit5fb75889ff78049c1801014ae2d2eb32fb4d68cb (patch)
treec01d4117663fc9a9ef270f7ff40505d240224275 /graphics/libGL
parent2db20fbac3f6c934dc2fb1dcd8c2a9c6d38da27c (diff)
downloadfreebsd-ports-gnome-5fb75889ff78049c1801014ae2d2eb32fb4d68cb.tar.gz
freebsd-ports-gnome-5fb75889ff78049c1801014ae2d2eb32fb4d68cb.tar.zst
freebsd-ports-gnome-5fb75889ff78049c1801014ae2d2eb32fb4d68cb.zip
Solve libGL.so and libglx.so conflict situation between libGL, xorg-server and
the nvidia-driver. Install the libraries in port specific directories. Use pkg-install and pkg-deinstall scripts to update the hardlinks to the default locations of these files. While here clean up some @dirrmtry lines in xorg-server plist for directories that aren.t created by xorg-server. Motivator: pkgng Inspiration: irc, freebsd-x11@ mailinglist discussion (sorry can't find it anymore to give credit the people) Reviewed by: danfe@ (for nvidia parts), bapt@ Approved by: danfe@ (for nvidia parts) With hat: x11@
Diffstat (limited to 'graphics/libGL')
-rw-r--r--graphics/libGL/Makefile6
-rw-r--r--graphics/libGL/files/patch-src_mesa_Makefile15
-rw-r--r--graphics/libGL/files/pkg-deinstall.in12
-rw-r--r--graphics/libGL/files/pkg-install.in18
-rw-r--r--graphics/libGL/pkg-plist5
5 files changed, 54 insertions, 2 deletions
diff --git a/graphics/libGL/Makefile b/graphics/libGL/Makefile
index b1f0d35b7d19..1ed64ebf10ac 100644
--- a/graphics/libGL/Makefile
+++ b/graphics/libGL/Makefile
@@ -7,6 +7,7 @@
PORTNAME= libGL
PORTVERSION= ${MESAVERSION}
+PORTREVISION= 1
CATEGORIES= graphics
COMMENT= OpenGL library that renders using GLX or DRI
@@ -16,10 +17,15 @@ LIB_DEPENDS+= drm:${PORTSDIR}/graphics/libdrm \
USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto:both
+SUB_FILES= pkg-install pkg-deinstall
+
do-install:
${RM} -f ${WRKSRC}/include/GL/glu*.h
cd ${WRKSRC}/src/mesa; ${GMAKE} install-libgl
+post-install:
+ @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
.include "${.CURDIR}/bsd.mesalib.mk"
.include <bsd.port.pre.mk>
diff --git a/graphics/libGL/files/patch-src_mesa_Makefile b/graphics/libGL/files/patch-src_mesa_Makefile
new file mode 100644
index 000000000000..fe2624bae8a7
--- /dev/null
+++ b/graphics/libGL/files/patch-src_mesa_Makefile
@@ -0,0 +1,15 @@
+--- src/mesa/Makefile.orig 2012-04-22 18:34:50.000000000 +0200
++++ src/mesa/Makefile 2012-04-22 18:35:00.000000000 +0200
+@@ -183,10 +183,10 @@
+ $(DESTDIR)$(INSTALL_INC_DIR)/GL
+
+ install-libgl: default gl.pc install-headers
+- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
++ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/.libGL
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \
+- $(DESTDIR)$(INSTALL_LIB_DIR)
++ $(DESTDIR)$(INSTALL_LIB_DIR)/.libGL
+ $(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+
+ install-osmesa: default osmesa.pc
diff --git a/graphics/libGL/files/pkg-deinstall.in b/graphics/libGL/files/pkg-deinstall.in
new file mode 100644
index 000000000000..37d895397fcb
--- /dev/null
+++ b/graphics/libGL/files/pkg-deinstall.in
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+PREFIX="${PKG_PREFIX-/usr/local}"
+
+case $2 in
+DEINSTALL)
+ /bin/rm -f ${PREFIX}/lib/libGL.so*
+ ;;
+esac
diff --git a/graphics/libGL/files/pkg-install.in b/graphics/libGL/files/pkg-install.in
new file mode 100644
index 000000000000..280922c0bbfc
--- /dev/null
+++ b/graphics/libGL/files/pkg-install.in
@@ -0,0 +1,18 @@
+#!/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/.libGL/libGL.so.1 ${PREFIX}/lib/libGL.so
+ /bin/ln -f ${PREFIX}/lib/.libGL/libGL.so.1 ${PREFIX}/lib/libGL.so.1
+ fi
+ ;;
+esac
diff --git a/graphics/libGL/pkg-plist b/graphics/libGL/pkg-plist
index 4125f7491219..3204b097462c 100644
--- a/graphics/libGL/pkg-plist
+++ b/graphics/libGL/pkg-plist
@@ -14,7 +14,8 @@ include/GL/osmesa.h
include/GL/vms_x_fix.h
include/GL/wglext.h
include/GL/wmesa.h
-lib/libGL.so
-lib/libGL.so.1
+lib/.libGL/libGL.so
+lib/.libGL/libGL.so.1
libdata/pkgconfig/gl.pc
+@dirrm lib/.libGL
@dirrmtry include/GL