aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorNiclas Zeising <zeising@FreeBSD.org>2019-08-26 09:45:15 +0000
committerNiclas Zeising <zeising@FreeBSD.org>2019-08-26 09:45:15 +0000
commit9d1b6274661c1e47b8767c9ee72a0b45fe7f185d (patch)
tree1069a726cdd785c2d041671de933662492dc7b52 /Mk/bsd.port.mk
parent0c5e0fd5eaad561ed44d0fa0e0fa39fefb0fba62 (diff)
downloadports-9d1b6274661c1e47b8767c9ee72a0b45fe7f185d.tar.gz
ports-9d1b6274661c1e47b8767c9ee72a0b45fe7f185d.zip
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
Notes
Notes: svn path=/head/; revision=509895
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk31
1 files changed, 15 insertions, 16 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 5cdc0051e2ca..52e2325925f4 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -396,9 +396,6 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# Implies NO_LICENSES_INSTALL=yes, NO_MTREE=yes, and causes
# Linux ldconfig to be used when USE_LDCONFIG is defined.
##
-# USE_XORG - Set to a list of X.org module dependencies.
-# Implies inclusion of bsd.xorg.mk.
-##
# USE_TEX - A list of the TeX dependencies the port has.
#
##
@@ -1331,10 +1328,6 @@ DISTNAME?= ${PORTNAME}-${DISTVERSIONFULL}
INDEXFILE?= INDEX-${OSVERSION:C/([0-9]*)[0-9]{5}/\1/}
-.if defined(USE_XORG) || defined(XORG_CAT)
-.include "${PORTSDIR}/Mk/bsd.xorg.mk"
-.endif
-
PACKAGES?= ${PORTSDIR}/packages
TEMPLATES?= ${PORTSDIR}/Templates
KEYWORDS?= ${PORTSDIR}/Keywords
@@ -1352,6 +1345,18 @@ PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg
.include "${PORTSDIR}/Mk/bsd.local.mk"
.endif
+.if defined(USE_XORG) && (!defined(USES) || !${USES:Mxorg})
+DEV_WARNING+= "Using USE_XORG alone is deprecated, please use USES=xorg"
+USES+= xorg
+.endif
+
+.if defined(XORG_CAT)
+DEV_WARNING+= "Using XORG_CAT is deprecated, please use USES=xorg-cat:category"
+.if !defined(USES) || !${USES:Mxorg-cat*}
+USES+= xorg-cat:${XORG_CAT}
+.endif
+.endif
+
.if defined(USE_PHP) && (!defined(USES) || ( defined(USES) && !${USES:Mphp*} ))
DEV_WARNING+= "Using USE_PHP alone is deprecated, please use USES=php"
USES+= php
@@ -1914,8 +1919,9 @@ _FORCE_POST_PATTERNS= rmdir kldxref mkfontscale mkfontdir fc-cache \
.include "${PORTSDIR}/Mk/bsd.local.mk"
.endif
-.if defined(USE_XORG) || defined(XORG_CAT)
-.include "${PORTSDIR}/Mk/bsd.xorg.mk"
+.if defined(USE_XORG) && (!defined(USES) || ( defined(USES) && !${USES:Mxorg} ))
+DEV_WARNING+= "Using USE_XORG alone is deprecated, please use USES=xorg"
+_USES_POST+= xorg
.endif
.if defined(WANT_GSTREAMER) || defined(USE_GSTREAMER) || defined(USE_GSTREAMER1)
@@ -1968,13 +1974,6 @@ CONFIGURE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE}
MAKE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE}
.endif
-.if defined(USE_XORG)
-# Add explicit X options to avoid problems with false positives in configure
-.if defined(GNU_CONFIGURE)
-CONFIGURE_ARGS+=--x-libraries=${LOCALBASE}/lib --x-includes=${LOCALBASE}/include
-.endif
-.endif
-
# Macro for doing in-place file editing using regexps
REINPLACE_ARGS?= -i.bak
REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS}