Date: Sun, 4 Sep 2005 03:47:28 +0200 (CEST) From: Jean-Yves Lefort <jylefort@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/85704: Add WITH_GL user variable to bsd.port.mk Message-ID: <20050904014728.84E52C555@jsite.lefort.net> Resent-Message-ID: <200509040150.j841oAjM022856@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 85704 >Category: ports >Synopsis: Add WITH_GL user variable to bsd.port.mk >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Sep 04 01:50:10 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Jean-Yves Lefort >Release: FreeBSD 5.4-RELEASE i386 >Organization: >Environment: System: FreeBSD jsite.lefort.net 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Wed Jul 27 11:27:58 CEST 2005 jylefort@jsite.lefort.net:/usr/obj/usr/src/sys/JSITE i386 >Description: The following patch adds a WITH_GL user variable (meant to be set in /etc/make.conf), and makes USE_GL pull in the appropriate dependency based on the value of WITH_GL. It supports USE_LINUX in the same way USE_X_PREFIX does. Caveats: - nvidia-driver conditionally provides the linux libGL using a port option; a linux-nvidia-driver slave port should be created instead. - graphics/linux_mesa3 has an expiration date (2005-10-01) >How-To-Repeat: >Fix: --- bsd.port.mk.orig Sun Sep 4 03:02:15 2005 +++ bsd.port.mk Sun Sep 4 03:31:20 2005 @@ -284,8 +284,16 @@ # case the linux X libraries are referenced. # # USE_FREETYPE - If set, this port uses the freetype print libraries. -# USE_GL - If set, this port uses libGL (not needed with XFree86 4.x -# which already includes this functionality). +## +# USE_GL - If set, this port uses libGL. In the USE_LINUX case the +# linux GL libraries are referenced. +# WITH_GL - Specify the libGL implementation to use. +# Legal values for X_WINDOW_SYSTEM=xfree86-3 are: +# glx (default), mesa +# Legal values for other values of X_WINDOW_SYSTEM are: +# dri (default), nvidia +# If set to an unknown value, the port is marked BROKEN. +## # USE_MESA - If set, this port uses libGL/libglut (deprecated). # USE_MOTIF - If set, this port uses a Motif toolkit. Implies USE_XPM. # NO_OPENMOTIF - If set, this port uses a custom Motif toolkit @@ -1364,6 +1372,12 @@ X_WINDOW_SYSTEM ?= xfree86-3 .endif +.if ${X_WINDOW_SYSTEM:L} == xfree86-3 +WITH_GL?= glx +.else +WITH_GL?= dri +.endif + # Location of mounted CDROM(s) to search for files CD_MOUNTPTS?= /cdrom ${CD_MOUNTPT} @@ -1645,21 +1659,53 @@ BUILD_DEPENDS+= imake:${X_IMAKE_PORT} .endif +.if defined(USE_GL) +. if ${X_WINDOW_SYSTEM:L} == xfree86-3 +. if ${WITH_GL} == glx +. if defined(USE_LINUX) +RUN_DEPENDS+= ${LINUXBASE}/lib/libGL.so.1:${PORTSDIR}/graphics/linux_glx +. else +LIB_DEPENDS+= GL.14:${PORTSDIR}/graphics/utah-glx +. endif +. elif ${WITH_GL} == mesa +. if defined(USE_LINUX) +RUN_DEPENDS+= ${LINUXBASE}/usr/lib/libGL.so.1:${PORTSDIR}/graphics/linux_mesa3 +. else +LIB_DEPENDS+= GL.14:${PORTSDIR}/graphics/mesagl +. endif +. else +BROKEN= "unknown GL implementation for X_WINDOW_SYSTEM=${X_WINDOW_SYSTEM}: ${WITH_GL}" +. endif +. else +. if ${WITH_GL} == dri +. if defined(USE_LINUX) +RUN_DEPENDS+= ${LINUXBASE}/usr/X11R6/lib/libGL.so.1:${PORTSDIR}/graphics/linux_dri +. else +USE_XLIB= yes +. endif +. elif ${WITH_GL} == nvidia +. if defined(USE_LINUX) +RUN_DEPENDS+= ${LINUXBASE}/usr/lib/libGL.so.1:${PORTSDIR}/x11/nvidia-driver +. else +LIB_DEPENDS+= GL.1:${PORTSDIR}/x11/nvidia-driver +. endif +. else +BROKEN= "unknown GL implementation for X_WINDOW_SYSTEM=${X_WINDOW_SYSTEM}: ${WITH_GL}" +. endif +.endif + .if ${X_WINDOW_SYSTEM:L} == xfree86-3 .if defined(USE_XPM) LIB_DEPENDS+= Xpm.4:${PORTSDIR}/graphics/xpm .endif -.if defined(USE_GL) -LIB_DEPENDS+= GL.14:${PORTSDIR}/graphics/mesagl -.endif XAWVER= 6 PKG_IGNORE_DEPENDS?= '^XFree86-3\.' .else -.if defined(USE_XPM) || defined(USE_GL) +.if defined(USE_XPM) USE_XLIB= yes .endif >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050904014728.84E52C555>