1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-14 03:10:47 +00:00
freebsd-ports/Mk/Uses/xorg-cat.mk

192 lines
5.4 KiB
Makefile
Raw Normal View History

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 09:45:15 +00:00
# xorg ports categories and other things needed to build xorg ports.
# This is intended only for ports of xorg and freedesktop.org applications.
#
# Use USES=xorg and USE_XORG to depend on various xorg components.
#
# Feature: xorg-cat
# Usage: USES=xorg-cat:category[,buildsystem]
#
# category is one of:
# * app Installs applications, no shared libraries.
# * data Installs only data.
# * doc no particular notes
# * driver depends on xorgproto at least
# * font don't install .pc file
# * lib various dependencies, install .pc file, needs
# pathfix
# * proto install .pc file, needs pathfix, most only needed at
# build time.
# * util no particular notes
# * xserver xorg x servers
#
# These categories has to match upstream categories. Don't invent
# your own.
#
# builsystem is one of:
# * autotools (default)
# * meson (experimental)
#
#
# By defining USE_GITLAB and GL_COMMIT, it is possible to pull code straight
# from the freedesktop.org gitlab, instead of official release tarballs.
#
#.MAINTAINER: x11@FreeBSD.org
.if !defined(_INCLUDE_USES_XORG_CAT_MK)
_INCLUDE_USES_XORG_CAT_MK=yes
_XORG_CATEGORIES= app data doc driver font lib proto util xserver
_XORG_BUILDSYSTEMS= autotools meson
_XORG_CAT= # empty
_XORG_BUILDSYS= # empty
. if empty(xorg-cat_ARGS)
IGNORE= no arguments specified to xorg-cat
. endif
. for _arg in ${xorg-cat_ARGS}
. if ${_XORG_CATEGORIES:M${_arg}}
. if empty(_XORG_CAT)
_XORG_CAT= ${_arg}
. else
IGNORE= multipe xorg categories specified via xorg-cat:${xorg-cat_ARGS:ts,}
. endif
. elif ${_XORG_BUILDSYSTEMS:M${_arg}}
. if empty(_XORG_BUILDSYS)
_XORG_BUILDSYS= ${_arg}
. else
IGNORE= multipe xorg build systems specified via xorg-cat:${xorg-cat_ARGS:ts,}
. endif
. else
IGNORE= unknown argument specified via xorg-cat:${xorg-cat_ARGS:ts,}
. endif
. endfor
# Default to the autotools build system
. if empty(_XORG_BUILDSYS)
_XORG_BUILDSYS= autotools
. endif
# Default variables, common to all new modular xorg ports.
. if empty(USES:Mtar)
EXTRACT_SUFX?= .tar.bz2
. endif
DIST_SUBDIR= xorg/${_XORG_CAT}
. if ${_XORG_BUILDSYS} == meson
IGNORE= meson build not supported yet
.include "${USESDIR}/meson.mk"
. elif ${_XORG_BUILDSYS} == autotools
GNU_CONFIGURE= yes
. else
# This should not happen
IGNORE= unknown build system specified via xorg-cat:${xorg-cat_ARGS:ts,}
. endif
. if defined(USE_GITLAB)
# Set up things for fetching from freedesktop.org gitlab.
# This can be overridden using normal GL_* macros in the ports Makefile.
# We make a best guess for GL_ACCOUNT and GL_PROJECT.
GL_SITE?= https://gitlab.freedesktop.org/xorg
GL_ACCOUNT?= ${_XORG_CAT}
GL_PROJECT?= ${PORTNAME:tl}
. if ${_XORG_BUILDSYS} == meson
# set up meson stuff here
. else
# Things from GL doesn't come with pre-generated configure, add dependency on
# autoreconf and run it, if we're using autotools.
.include "${USESDIR}/autoreconf.mk"
. endif
. else
MASTER_SITES?= XORG/individual/${_XORG_CAT}
. endif
#
## All xorg ports needs pkgconfig to build, but some ports look for pkgconfig
## and then continues the build.
.include "${USESDIR}/pkgconfig.mk"
#
## All xorg ports needs xorg-macros.
. if ${PORTNAME} != xorg-macros
USE_XORG+= xorg-macros
. endif
. if ${_XORG_CAT} == app
# Nothing at the moment
. elif ${_XORG_CAT} == data
# Nothing at the moment.
. elif ${_XORG_CAT} == driver
USE_XORG+= xi xorg-server xorgproto
CFLAGS+= -Werror=uninitialized
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 09:45:15 +00:00
. if ${_XORG_BUILDSYS} == meson
# Put special stuff for meson here
. else
CONFIGURE_ENV+= DRIVER_MAN_SUFFIX=4x DRIVER_MAN_DIR='$$(mandir)/man4'
libtool_ARGS?= # empty
.include "${USESDIR}/libtool.mk"
INSTALL_TARGET= install-strip
. endif
. elif ${_XORG_CAT} == font
FONTNAME?= ${PORTNAME:C/.*-//g:S/type/Type/:S/ttf/TTF/:S/speedo/Speedo/}
. if ${_XORG_BUILDSYS} == meson
# Put special stuff for meson here
. else
CONFIGURE_ARGS+= --with-fontrootdir=${PREFIX}/share/fonts
CONFIGURE_ENV+= FONTROOTDIR=${PREFIX}/share/fonts
. endif
. if !defined(NOFONT)
.include "${USESDIR}/fonts.mk"
BUILD_DEPENDS+= mkfontscale>=0:x11-fonts/mkfontscale \
bdftopcf:x11-fonts/bdftopcf
PLIST_FILES+= "@comment ${FONTSDIR}/fonts.dir" \
"@comment ${FONTSDIR}/fonts.scale"
. endif
. elif ${_XORG_CAT} == lib
CFLAGS+= -Werror=uninitialized
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 09:45:15 +00:00
.include "${USESDIR}/pathfix.mk"
. if ${_XORG_BUILDSYS} == meson
# put meson stuff here
. else
libtool_ARGS?= # empty
.include "${USESDIR}/libtool.mk"
USE_LDCONFIG= yes
CONFIGURE_ARGS+=--enable-malloc0returnsnull
. endif
. elif ${_XORG_CAT} == proto
.include "${USESDIR}/pathfix.mk"
. elif ${_XORG_CAT} == xserver
DISTNAME?= xorg-server-${PORTVERSION}
CFLAGS+= -Werror=uninitialized
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 09:45:15 +00:00
.include "${USESDIR}/pathfix.mk"
. if ${_XORG_BUILDSYS} == meson
# put meson stuff here
. else
CONFIGURE_ARGS+= --with-xkb-path=${LOCALBASE}/share/X11/xkb \
--with-fontrootdir=${LOCALBASE}/share/fonts
libtool_ARGS?= # empty
.include "${USESDIR}/libtool.mk"
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 09:45:15 +00:00
. endif
LIB_PC_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri
USE_XORG+= fontutil
. endif # ${_XORG_CAT} == <category>
# We only need to include xorg.mk if we want USE_XORG modules
# USES+=xorg does not provide any functionality, it just silences an error
# message about USES=xorg not being set
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 09:45:15 +00:00
. if defined(USE_XORG) && !empty(USE_XORG)
USES+= 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 09:45:15 +00:00
.include "${USESDIR}/xorg.mk"
. endif
.endif