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
This commit is contained in:
Niclas Zeising 2018-09-10 19:56:32 +00:00
parent fae7aa4fea
commit 87e2a6b841
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=479445
3 changed files with 58 additions and 36 deletions

50
Mk/Uses/gl.mk Normal file
View File

@ -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

View File

@ -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

View File

@ -36,7 +36,7 @@ DEDICATED_DESC= Build dedicated server
GAMELIBS_DESC= Force building game libraries
SMP_CLIENT_DESC= Build SMP (threaded) client
.include <bsd.port.pre.mk>
.include <bsd.port.options.mk>
.if ${ARCH} == "i386"
BUILD_DEPENDS+= nasm:devel/nasm
@ -80,6 +80,8 @@ MAKE_ENV+= SMP=YES
Q3BIN+= quake3-smp
.endif
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -e 's|botlib\.log|/dev/null|' \
${WRKSRC}/code/botlib/be_interface.c