diff options
author | zeising <zeising@FreeBSD.org> | 2018-09-11 03:56:32 +0800 |
---|---|---|
committer | zeising <zeising@FreeBSD.org> | 2018-09-11 03:56:32 +0800 |
commit | 4a0709dc7775b65d1515295ed022528466929cfb (patch) | |
tree | d997362158dfb564d710a8f557c25564a49d9a49 /Mk | |
parent | 7401c0db08e9ad3e80dfc4427e0eef676385c2d0 (diff) | |
download | freebsd-ports-gnome-4a0709dc7775b65d1515295ed022528466929cfb.tar.gz freebsd-ports-gnome-4a0709dc7775b65d1515295ed022528466929cfb.tar.zst freebsd-ports-gnome-4a0709dc7775b65d1515295ed022528466929cfb.zip |
Change USE_GL to become USES=gl.
Change USE_GL to become USES=gl. You still need to specify USE_GL as well,
to specify which gl components you need, such as egl glesv2 glut glu glw gl.
Only specifying USE_GL is supported for now, to ease in transition. It is
however deprecated, and will be removed eventually.
Specifying USES=gl without USE_GL is an error.
USE_GL=yes is also deprecated, but supported for now. It implies USE_GL=glu.
Fix fallout from this change.
PR: 230692
Approved by: portmgr (antoine)
exp-run by: antoine
Reviewed by: mat
Differential Revision: https://reviews.freebsd.org/D16774
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Uses/gl.mk | 50 | ||||
-rw-r--r-- | Mk/bsd.port.mk | 40 |
2 files changed, 55 insertions, 35 deletions
diff --git a/Mk/Uses/gl.mk b/Mk/Uses/gl.mk new file mode 100644 index 000000000000..bced5b41c55e --- /dev/null +++ b/Mk/Uses/gl.mk @@ -0,0 +1,50 @@ +# $FreeBSD$ +# +# Use OpenGL and related libraries and ports +# +# Feature: gl +# Usage: USES=gl +# USE_GL=egl glesv2 glut glu glw gl +# +# 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 +# +# 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) +IGNORE= USES=gl takes no arguments +.endif + +.if !defined(USE_GL) +IGNORE= need to specify gl component with USE_GL +.elif ${USE_GL:tl} == yes +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 diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index fde95e8bb0ec..688a38c2cdd2 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -363,11 +363,6 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org # CXXFLAGS_${ARCH} # Append the cxxflags to CXXFLAGS only on the specified architecture ## -# USE_GL - A list of Mesa or GL related dependencies needed by the port. -# Supported components are: egl, glesv2, glut, glu, glw, and gl. -# If set to "yes", this is equivalent to "glu". Note that -# glew and glut depend on glu, glw and glu depend on gl. -## # USE_SDL - If set, this port uses the sdl libraries. # See bsd.sdl.mk for more information. ## @@ -1426,6 +1421,11 @@ DEV_WARNING+= "Using USE_MATE alone is deprecated, please add USES=mate." USES+= mate .endif +.if defined(USE_GL) && (!defined(USES) || !${USES:Mgl}) +DEV_WARNING+= "Setting USE_GL without USES=gl is deprecated" +USES+= gl +.endif + .if defined(USE_MYSQL) USE_MYSQL:= ${USE_MYSQL:N[yY][eE][sS]:Nclient} .if defined(WANT_MYSQL_VER) @@ -1890,36 +1890,6 @@ IGNORE= has USE_LDCONFIG32 set to yes, which is not correct PKG_IGNORE_DEPENDS?= 'this_port_does_not_exist' -_GL_gbm_LIB_DEPENDS= libgbm.so:graphics/mesa-libs -_GL_glesv2_BUILD_DEPENDS= ${LOCALBASE}/lib/libGLESv2.so:graphics/mesa-libs -_GL_glesv2_RUN_DEPENDS= ${LOCALBASE}/lib/libGLESv2.so:graphics/mesa-libs -_GL_egl_BUILD_DEPENDS= ${LOCALBASE}/lib/libEGL.so:graphics/mesa-libs -_GL_egl_RUN_DEPENDS= ${LOCALBASE}/lib/libEGL.so:graphics/mesa-libs -_GL_gl_BUILD_DEPENDS= ${LOCALBASE}/lib/libGL.so:graphics/mesa-libs -_GL_gl_RUN_DEPENDS= ${LOCALBASE}/lib/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 defined(USE_GL) -. if ${USE_GL:tl} == "yes" -USE_GL= glu -. endif -. for _component in ${USE_GL} -. if !defined(_GL_${_component}_LIB_DEPENDS) && \ - !defined(_GL_${_component}_RUN_DEPENDS) -IGNORE= uses unknown GL component -. else -USE_XORG+= ${_GL_${_component}_USE_XORG} -BUILD_DEPENDS+= ${_GL_${_component}_BUILD_DEPENDS} -LIB_DEPENDS+= ${_GL_${_component}_LIB_DEPENDS} -RUN_DEPENDS+= ${_GL_${_component}_RUN_DEPENDS} -. endif -. endfor -.endif - .if defined(_DESTDIR_VIA_ENV) MAKE_ENV+= ${DESTDIRNAME}=${STAGEDIR} .else |