Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/gl.mk
# Use OpenGL and related libraries and ports | # Use OpenGL and related libraries and ports | ||||
# | # | ||||
# Feature: gl | # Feature: gl | ||||
# Usage: USES=gl | # Usage: USES=gl | ||||
# USE_GL=egl gbm gl glesv1 glesv2 glew glu glut opengl | # USE_GL=egl gbm gl glesv1 glesv2 glew glu glut opengl | ||||
# | # | ||||
# USE_GL specifies which GL components to add as dependencies. | # USE_GL specifies which GL components to add as dependencies. | ||||
# Not specifying USE_GL with USES=gl is an error. | # Not specifying USE_GL with USES=gl is an error. | ||||
# USE_GL=yes implies USE_GL=glu. This is deprecated | # USE_GL=yes implies USE_GL=glu. This is deprecated | ||||
# | # | ||||
# MAINTAINER: x11@FreeBSD.org | # MAINTAINER: x11@FreeBSD.org | ||||
.if !defined(_INCLUDE_USES_GL_MK) | .if !defined(_INCLUDE_USES_GL_MK) | ||||
_INCLUDE_USES_GL_MK=yes | _INCLUDE_USES_GL_MK=yes | ||||
_GL_egl_LIB_DEPENDS= libEGL.so:graphics/${GL_DEFAULT:S/,/ /g:[1]} | _GL_egl_LIB_DEPENDS= libEGL.so:graphics/libglvnd | ||||
_GL_gbm_LIB_DEPENDS= libgbm.so:graphics/${GL_DEFAULT:S/,/ /g:[-1]} | _GL_gbm_LIB_DEPENDS= libgbm.so:graphics/${GL_DEFAULT} | ||||
jbeich: mesa-dri isn't handled by `USE_GL` yet, so use `GL_DEFAULT` directly. | |||||
_GL_gl_LIB_DEPENDS= libGL.so:graphics/${GL_DEFAULT:S/,/ /g:[1]} | _GL_gl_LIB_DEPENDS= libGL.so:graphics/libglvnd | ||||
_GL_gl_USE_XORG= xorgproto | _GL_gl_USE_XORG= xorgproto | ||||
_GL_glesv1_LIB_DEPENDS= libGLESv1_CM.so:graphics/${GL_DEFAULT:S/,/ /g:[1]} | _GL_glesv1_LIB_DEPENDS= libGLESv1_CM.so:graphics/libglvnd | ||||
_GL_glesv2_LIB_DEPENDS= libGLESv2.so:graphics/${GL_DEFAULT:S/,/ /g:[1]} | _GL_glesv2_LIB_DEPENDS= libGLESv2.so:graphics/libglvnd | ||||
Not Done Inline Actions^ silly question [tm] -- do we really need to have such fine-grained USE_GL if everything is coming from graphics/libglvnd? tcberner: ^ silly question [tm] -- do we really need to have such fine-grained `USE_GL` if everything is… | |||||
Not Done Inline ActionsIt's an interesting question. One thing this does do is provide a little bit of end to end check for the primary .so of each API since there is optionality within the libglvnd port. Although it seems the only one we expose from the underlying stacks is through OPTIONS X11, so we could just flatten this down to "gl" and "opengl" and go clean up all the consumers to use the right one. There are other foot guns around all this but the USE can provide a simple check and cognitive offload within the capabilities of the ports framework once we agree what we are trying to do kbowling: It's an interesting question.
One thing this does do is provide a little bit of end to end… | |||||
_GL_glew_LIB_DEPENDS= libGLEW.so:graphics/glew | _GL_glew_LIB_DEPENDS= libGLEW.so:graphics/glew | ||||
_GL_glu_LIB_DEPENDS= libGLU.so:graphics/libGLU | _GL_glu_LIB_DEPENDS= libGLU.so:graphics/libGLU | ||||
_GL_glu_USE_XORG= xorgproto | _GL_glu_USE_XORG= xorgproto | ||||
_GL_glut_LIB_DEPENDS= libglut.so:graphics/freeglut | _GL_glut_LIB_DEPENDS= libglut.so:graphics/freeglut | ||||
_GL_opengl_LIB_DEPENDS= libOpenGL.so:graphics/libglvnd | _GL_opengl_LIB_DEPENDS= libOpenGL.so:graphics/libglvnd | ||||
.if !empty(gl_ARGS) | .if !empty(gl_ARGS) | ||||
IGNORE= USES=gl takes no arguments | IGNORE= USES=gl takes no arguments | ||||
Show All 28 Lines |
mesa-dri isn't handled by USE_GL yet, so use GL_DEFAULT directly.