freebsd-ports/Mk/Uses/gl.mk

55 lines
1.6 KiB
Makefile
Raw Normal View History

# Use OpenGL and related libraries and ports
#
# Feature: gl
# Usage: USES=gl
# USE_GL=egl gbm gl glesv1 glesv2 glew glu glut opengl
#
# 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_egl_LIB_DEPENDS= libEGL.so:graphics/libglvnd
_GL_gbm_LIB_DEPENDS= libgbm.so:graphics/${GL_DEFAULT}
_GL_gl_LIB_DEPENDS= libGL.so:graphics/libglvnd
_GL_gl_USE_XORG= xorgproto
_GL_glesv1_LIB_DEPENDS= libGLESv1_CM.so:graphics/libglvnd
_GL_glesv2_LIB_DEPENDS= libGLESv2.so:graphics/libglvnd
_GL_glew_LIB_DEPENDS= libGLEW.so:graphics/glew
_GL_glu_LIB_DEPENDS= libGLU.so:graphics/libGLU
_GL_glu_USE_XORG= xorgproto
_GL_glut_LIB_DEPENDS= libglut.so:graphics/freeglut
_GL_opengl_LIB_DEPENDS= libOpenGL.so:graphics/libglvnd
. 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
# We only need to include xorg.mk if we want USE_XORG modules
. if defined(USE_XORG) && !empty(USE_XORG)
Change bsd.xorg.mk to USES=xorg and USES=xorg-cat Change the handling of xorg dependencies to use the USES framework instead of bsd.xorg.mk. bsd.xorg.mk is split into two parts: * USES=xorg for ports depending on xorg ports with USE_XORG * USES=xorg-cat for xorg ports with XORG_CAT USES=xorg is fairly straight forward. The components needed are specified with USE_XORG, and USES=xorg is needed to pull in this part of the framework. USES=xorg-cat requires that the category, previously specified with XORG_CAT, now be passed as an argument to xorg-cat, like this USES=xorg-cat:category. Not specifying a category is an error. Further, it is also possible to specify which build system to use. The default if nothing is specified is autoconf, but meson will also be supported. This is added with a second argument: USES=xorg-cat:category[,buildsystem]. Detailed changelog: * Add support in Uses/xorg-cat.mk to specify build system. Previously, only autoconf was supported for xorg ports, but with this change, it's possible to use meson instead. Autoconf is still the defaultx, if nothing else is specified. The meson support is still disabled, and requires more testing. * Add support in Uses/xorg-cat.mk to pull sources from freedesktop.org gitlab. When specifying USE_GITLAB in a port using xorg-cat, then various GL_* variables will be set up automatically, as well as needed changes to the build. * Switch x11-drivers/xf86-video-intel to use the USE_GITLAB framework. * While touching xf86-video-intel, switch to USES=xorg xorg-cat:driver, and pet portlint. * Add compat shims and warnings to bsd.port.mk, which will handle the old style ports Makefiles. * Change Uses/gl.mk and Uses/motif.mk to use this new framework. * Change Uses/autoreconf.mk to check and add dependencies later. This is needed because xorg-cat uses autoreconf, and without this fix dependencies were not added properly. * Be stricter about checking for arguments in USE_XORG, previously, :build and :run were accepted, but not supported. Only the default or :both supported. * Change multimedia/gstreamer1-vaapi to handle the stricter argument checking in USE_XORG, and add USES=xorg * change x11/xscope to get distinfo from xorg-cat, instead of rolling it's own, and add USES=xorg-cat PR: 238988 (exp-run) Reviewed by: antoine, tcberner, tijl, mat, tobik Approved by: portmgr (antoine) Obtained from: FreeBSD Graphics Team development repo https://github.com/FreeBSDDesktop/freebsd-ports/tree/feature/usesxorg Sponsored by: B3 Init (zeising) Differential Revision: https://reviews.freebsd.org/D20724
2019-08-26 11:45:15 +02:00
.include "${USESDIR}/xorg.mk"
. endif
Change bsd.xorg.mk to USES=xorg and USES=xorg-cat Change the handling of xorg dependencies to use the USES framework instead of bsd.xorg.mk. bsd.xorg.mk is split into two parts: * USES=xorg for ports depending on xorg ports with USE_XORG * USES=xorg-cat for xorg ports with XORG_CAT USES=xorg is fairly straight forward. The components needed are specified with USE_XORG, and USES=xorg is needed to pull in this part of the framework. USES=xorg-cat requires that the category, previously specified with XORG_CAT, now be passed as an argument to xorg-cat, like this USES=xorg-cat:category. Not specifying a category is an error. Further, it is also possible to specify which build system to use. The default if nothing is specified is autoconf, but meson will also be supported. This is added with a second argument: USES=xorg-cat:category[,buildsystem]. Detailed changelog: * Add support in Uses/xorg-cat.mk to specify build system. Previously, only autoconf was supported for xorg ports, but with this change, it's possible to use meson instead. Autoconf is still the defaultx, if nothing else is specified. The meson support is still disabled, and requires more testing. * Add support in Uses/xorg-cat.mk to pull sources from freedesktop.org gitlab. When specifying USE_GITLAB in a port using xorg-cat, then various GL_* variables will be set up automatically, as well as needed changes to the build. * Switch x11-drivers/xf86-video-intel to use the USE_GITLAB framework. * While touching xf86-video-intel, switch to USES=xorg xorg-cat:driver, and pet portlint. * Add compat shims and warnings to bsd.port.mk, which will handle the old style ports Makefiles. * Change Uses/gl.mk and Uses/motif.mk to use this new framework. * Change Uses/autoreconf.mk to check and add dependencies later. This is needed because xorg-cat uses autoreconf, and without this fix dependencies were not added properly. * Be stricter about checking for arguments in USE_XORG, previously, :build and :run were accepted, but not supported. Only the default or :both supported. * Change multimedia/gstreamer1-vaapi to handle the stricter argument checking in USE_XORG, and add USES=xorg * change x11/xscope to get distinfo from xorg-cat, instead of rolling it's own, and add USES=xorg-cat PR: 238988 (exp-run) Reviewed by: antoine, tcberner, tijl, mat, tobik Approved by: portmgr (antoine) Obtained from: FreeBSD Graphics Team development repo https://github.com/FreeBSDDesktop/freebsd-ports/tree/feature/usesxorg Sponsored by: B3 Init (zeising) Differential Revision: https://reviews.freebsd.org/D20724
2019-08-26 11:45:15 +02:00
# _INCLUDE_USES_GL_MK
.endif