Changeset View
Standalone View
Mk/Uses/gl.mk
# $FreeBSD$ | |||||
# | |||||
# Use OpenGL and related libraries and ports | |||||
# | |||||
# Feature: gl | |||||
# Usage: USES=gl | |||||
# USE_GL=egl glesv2 glut glu glw gl | |||||
matthew: Spelling: 'component' | |||||
Done Inline Actionsfurther more this comment contradicts the statement later on the USES=gl takes no arguments. matthew: further more this comment contradicts the statement later on the USES=gl takes no arguments. | |||||
Done Inline ActionsCould you maybe expand component and argument a bit, as just afterwards yo say the script does not take any. mat: Could you maybe expand component and argument a bit, as just afterwards yo say the script does… | |||||
# | |||||
# USE_GL specifies which GL components to add as dependencies. | |||||
# Not specifying USE_GL with USES=gl is an error. | |||||
# USE_GL=yes implies USE_GL=glu. This is deprecated | |||||
# | |||||
Done Inline Actionss/gl/glu/ mat: s/gl/glu/ | |||||
Done Inline ActionsDoh. Will fix. zeising: Doh. Will fix. | |||||
# MAINTAINER: x11@FreeBSD.org | |||||
.if !defined(_INCLUDE_USES_GL_MK) | |||||
_INCLUDE_USES_GL_MK=yes | |||||
_GL_gbm_LIB_DEPENDS= libgbm.so:graphics/mesa-libs | |||||
_GL_glesv2_LIB_DEPENDS= libGLESv2.so:graphics/mesa-libs | |||||
_GL_egl_LIB_DEPENDS= libEGL.so:graphics/mesa-libs | |||||
_GL_gl_LIB_DEPENDS= libGL.so:graphics/mesa-libs | |||||
_GL_gl_USE_XORG= xorgproto | |||||
_GL_glew_LIB_DEPENDS= libGLEW.so:graphics/glew | |||||
_GL_glu_LIB_DEPENDS= libGLU.so:graphics/libGLU | |||||
_GL_glu_USE_XORG= xorgproto | |||||
_GL_glw_LIB_DEPENDS= libGLw.so:graphics/libGLw | |||||
_GL_glut_LIB_DEPENDS= libglut.so:graphics/freeglut | |||||
.if !empty(gl_ARGS) | |||||
Done Inline ActionsRemove quotes around yes. mat: Remove quotes around `yes`. | |||||
IGNORE= USES=gl takes no arguments | |||||
.endif | |||||
Done Inline ActionsUSE_GL=yes should generate a DEV_WARNING too, as this is now only an optional argument to the USES. mat: `USE_GL=yes` should generate a `DEV_WARNING` too, as this is now only an optional argument to… | |||||
.if !defined(USE_GL) | |||||
IGNORE= need to specify gl component with USE_GL | |||||
.elif ${USE_GL:tl} == yes | |||||
Done Inline ActionsThis should be glu too. mat: This should be glu too. | |||||
Done Inline ActionsNo, this is the case when USES=gl but USE_GL is not defined at all, then we should use gl. The case when USE_GL is yes is handled below, and defaults to glu, just like before. zeising: No, this is the case when USES=gl but USE_GL is not defined at all, then we should use gl. The… | |||||
Done Inline ActionsHaving
is really really a bad idea. yes and not defined should mean the same thing. mat: Having
1. `USE_GL=yes` -> `USE_GL=glu`
2. `USE_GL` is not defined -> `USE_GL=gl`
is really… | |||||
Done Inline ActionsI do not agree. zeising: I do not agree.
No port today has USES=gl and USE_GL not defined, so there is no backwards… | |||||
Done Inline ActionsShould say something about having to set USE_GL. mat: Should say something about having to set `USE_GL`. | |||||
Done Inline ActionsNoted, will fix. zeising: Noted, will fix. | |||||
DEV_WARNING+= "USE_GL=yes is deprecated, please add USE_GL=glu (default) or specify component" | |||||
USE_GL= glu | |||||
.endif | |||||
.for _component in ${USE_GL} | |||||
.if !defined(_GL_${_component}_LIB_DEPENDS) | |||||
IGNORE= uses unknown GL component | |||||
.else | |||||
USE_XORG+= ${_GL_${_component}_USE_XORG} | |||||
LIB_DEPENDS+= ${_GL_${_component}_LIB_DEPENDS} | |||||
.endif | |||||
.endfor | |||||
# _INCLUDE_USES_GL_MK | |||||
.endif |
Spelling: 'component'