Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2019 09:45:16 +0000 (UTC)
From:      Niclas Zeising <zeising@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r509895 - in head: Mk Mk/Uses multimedia/gstreamer1-vaapi x11-drivers/xf86-video-intel x11/xscope
Message-ID:  <201908260945.x7Q9jGfC043354@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: zeising
Date: Mon Aug 26 09:45:15 2019
New Revision: 509895
URL: https://svnweb.freebsd.org/changeset/ports/509895

Log:
  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

Added:
  head/Mk/Uses/xorg-cat.mk
     - copied, changed from r509888, head/Mk/bsd.xorg.mk
  head/Mk/Uses/xorg.mk
     - copied, changed from r509888, head/Mk/bsd.xorg.mk
Deleted:
  head/Mk/bsd.xorg.mk
Modified:
  head/Mk/Uses/autoreconf.mk
  head/Mk/Uses/gl.mk
  head/Mk/Uses/motif.mk
  head/Mk/bsd.port.mk
  head/multimedia/gstreamer1-vaapi/Makefile
  head/x11-drivers/xf86-video-intel/Makefile
  head/x11-drivers/xf86-video-intel/distinfo
  head/x11/xscope/Makefile

Modified: head/Mk/Uses/autoreconf.mk
==============================================================================
--- head/Mk/Uses/autoreconf.mk	Mon Aug 26 09:22:07 2019	(r509894)
+++ head/Mk/Uses/autoreconf.mk	Mon Aug 26 09:45:15 2019	(r509895)
@@ -56,13 +56,6 @@
 _INCLUDE_USES_AUTORECONF_MK=	yes
 _USES_POST+=	autoreconf
 
-BUILD_DEPENDS+=	autoconf>=2.69:devel/autoconf \
-		automake>=1.16.1:devel/automake
-
-.if defined(libtool_ARGS) && empty(libtool_ARGS:Mbuild)
-BUILD_DEPENDS+=	libtoolize:devel/libtool
-.endif
-
 AUTORECONF?=	${LOCALBASE}/bin/autoreconf
 AUTORECONF_WRKSRC?=	${WRKSRC}
 
@@ -70,6 +63,13 @@ AUTORECONF_WRKSRC?=	${WRKSRC}
 
 .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_AUTORECONF_POST_MK)
 _INCLUDE_USES_AUTORECONF_POST_MK=	yes
+
+BUILD_DEPENDS+=	autoconf>=2.69:devel/autoconf \
+		automake>=1.16.1:devel/automake
+
+.if defined(libtool_ARGS) && empty(libtool_ARGS:Mbuild)
+BUILD_DEPENDS+=	libtoolize:devel/libtool
+.endif
 
 .if empty(autoreconf_ARGS)
 _USES_configure+=	470:do-autoreconf

Modified: head/Mk/Uses/gl.mk
==============================================================================
--- head/Mk/Uses/gl.mk	Mon Aug 26 09:22:07 2019	(r509894)
+++ head/Mk/Uses/gl.mk	Mon Aug 26 09:45:15 2019	(r509895)
@@ -46,5 +46,10 @@ LIB_DEPENDS+=	${_GL_${_component}_LIB_DEPENDS}
 .endif
 .endfor
 
+# We onlu need USES=xorg if we want USE_XORG modules
+.if defined(USE_XORG) && !empty(USE_XORG)
+.include "${USESDIR}/xorg.mk"
+.endif
+
 # _INCLUDE_USES_GL_MK
 .endif

Modified: head/Mk/Uses/motif.mk
==============================================================================
--- head/Mk/Uses/motif.mk	Mon Aug 26 09:22:07 2019	(r509894)
+++ head/Mk/Uses/motif.mk	Mon Aug 26 09:45:15 2019	(r509895)
@@ -27,4 +27,9 @@ LIB_DEPENDS+=		libXm.so.4:x11-toolkits/open-motif
 MOTIFLIB?=	-L${LOCALBASE}/lib -lXm -lXp
 MAKE_ENV+=	MOTIFLIB="${MOTIFLIB}"
 
+# We onlu need USES=xorg if we want USE_XORG modules
+.if defined(USE_XORG) && !empty(USE_XORG)
+.include "${USESDIR}/xorg.mk"
+.endif
+
 .endif

Copied and modified: head/Mk/Uses/xorg-cat.mk (from r509888, head/Mk/bsd.xorg.mk)
==============================================================================
--- head/Mk/bsd.xorg.mk	Mon Aug 26 08:00:04 2019	(r509888, copy source)
+++ head/Mk/Uses/xorg-cat.mk	Mon Aug 26 09:45:15 2019	(r509895)
@@ -1,239 +1,185 @@
-#-*- tab-width: 4; -*-
-# ex:ts=4
+# $FreeBSD$
+# 
+# xorg ports categories and other things needed to build xorg ports.
+# This is intended only for ports of xorg and freedesktop.org applications.
 #
-# bsd.xorg.mk - Support for X.Org ports and dependencies
+# Use USES=xorg and USE_XORG to depend on various xorg components.
 #
-# Created by: Florent Thoumie <flz@FreeBSD.org>
+# Feature:	xorg-cat
+# Usage:	USES=xorg-cat:category[,buildsystem]
 #
-# !!! Here be dragons !!! (yeah, here as well...)
+# 		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
 #
-# $FreeBSD$
+# 		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(_POSTMKINCLUDED) && !defined(Xorg_Pre_Include)
+.if !defined(_INCLUDE_USES_XORG_CAT_MK)
+_INCLUDE_USES_XORG_CAT_MK=yes
 
-Xorg_Include_MAINTAINER=	x11@FreeBSD.org
-Xorg_Pre_Include=		bsd.xorg.mk
+_XORG_CATEGORIES=	app data doc driver font lib proto util xserver
+_XORG_BUILDSYSTEMS=	autotools meson
 
-# Some notes:
-#
-# 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.
-# xserver - there's only one atm, I guess everything can fit into the port itself
+_XORG_CAT=		# empty
+_XORG_BUILDSYS=		# empty
 
-.if defined(XORG_CAT)
+.  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 !defined(USES) || ! ${USES:Mtar*}
-USES+=		tar:bzip2
-.endif
-GNU_CONFIGURE= 	yes
-# for some reason this makes mkfontscale and others fail in the install target
-#INSTALL_TARGET=	install-strip
-DIST_SUBDIR=	xorg/${XORG_CAT}
+.  if empty(USES:Mtar)
+EXTRACT_SUFX?=		.tar.bz2
+.  endif
 
-MASTER_SITES?=	${MASTER_SITE_XORG}
-MASTER_SITE_SUBDIR?=	individual/${XORG_CAT}
+DIST_SUBDIR=	xorg/${_XORG_CAT}
 
-# All xorg ports needs pkgconfig to build, but some ports look for pkgconfig and
-# then continues the build.
-USES+=		pkgconfig
+.  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
 
-# All xorg ports needs xorg-macros.
-. if ${PORTNAME} != xorg-macros
+.  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
+.  endif
 
-. if ${XORG_CAT} == "app"
+.  if ${_XORG_CAT} == app
 # Nothing at the moment
-. endif
 
-. if ${XORG_CAT} == "data"
+.  elif ${_XORG_CAT} == data
 # Nothing at the moment.
-. endif
 
-. if ${XORG_CAT} == "driver"
-USE_XORG+=	xorg-server xorgproto xi
+.  elif ${_XORG_CAT} == driver
+USE_XORG+=	xi xorg-server xorgproto
+.    if ${_XORG_BUILDSYS} == meson
+# Put special stuff for meson here
+.    else
 CONFIGURE_ENV+=	DRIVER_MAN_SUFFIX=4x DRIVER_MAN_DIR='$$(mandir)/man4'
-USES+=		libtool
+libtool_ARGS?=	# empty
+.include "${USESDIR}/libtool.mk"
 INSTALL_TARGET=	install-strip
-. endif
+.    endif
 
-. if ${XORG_CAT} == "font"
+.  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)
-USES+=	fonts
+.include "${USESDIR}/fonts.mk"
 BUILD_DEPENDS+=	mkfontscale>=0:x11-fonts/mkfontscale \
-				bdftopcf:x11-fonts/bdftopcf
+		bdftopcf:x11-fonts/bdftopcf
 PLIST_FILES+=	"@comment ${FONTSDIR}/fonts.dir" \
-				"@comment ${FONTSDIR}/fonts.scale"
+		"@comment ${FONTSDIR}/fonts.scale"
 .    endif
-.  endif
 
-. if ${XORG_CAT} == "lib"
-USES+=		pathfix libtool
+.  elif ${_XORG_CAT} == lib
+.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
+.    endif
 
-. if ${XORG_CAT} == "proto"
-USES+=	pathfix
-. endif
+.  elif ${_XORG_CAT} == proto
+.include "${USESDIR}/pathfix.mk"
 
-. if ${XORG_CAT} == "xserver"
-DISTFILES?=	xorg-server-${PORTVERSION}.tar.bz2
-WRKSRC=		${WRKDIR}/xorg-server-${PORTVERSION}
-USES+=	pathfix
+.  elif ${_XORG_CAT} == xserver
+DISTNAME?=	xorg-server-${PORTVERSION}
+.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
-
+			--with-fontrootdir=${LOCALBASE}/share/fonts
+.    endif
 LIB_PC_DEPENDS+=	${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri
-USE_XORG+=	fontutil:build
-. endif
+USE_XORG+=	fontutil
 
-.endif
+.  endif # ${_XORG_CAT} == <category>
 
-.endif
-
-.if defined(_POSTMKINCLUDED) && !defined(Xorg_Post_Include)
-
-Xorg_Post_Include=		bsd.xorg.mk
-
-# Register all xorg .pc files here.
-# foo_LIB_PC_DEPENDS means it should go to BUILD_DEPENDS *and* RUN_DEPENDS.
-
-XORG_MODULES=	dmx \
-				fontenc \
-				fontutil \
-				ice \
-				libfs \
-				oldx \
-				pciaccess \
-				pixman \
-				sm \
-				x11 \
-				xau \
-				xaw \
-				xaw6 \
-				xaw7 \
-				xbitmaps \
-				xcb \
-				xcomposite \
-				xcursor \
-				xdamage \
-				xdmcp \
-				xevie \
-				xext \
-				xfixes \
-				xfont \
-				xfont2 \
-				xfontcache \
-				xft \
-				xi \
-				xinerama \
-				xkbfile \
-				xkbui \
-				xmu \
-				xmuu \
-				xorg-macros \
-				xorg-server \
-				xorgproto \
-				xp \
-				xpm \
-				xprintapputil \
-				xprintutil \
-				xrandr \
-				xrender \
-				xres \
-				xscrnsaver \
-				xshmfence \
-				xt \
-				xtrans \
-				xtrap \
-				xtst \
-				xv \
-				xvmc \
-				xxf86dga \
-				xxf86misc \
-				xxf86vm
-
-dmx_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/dmx.pc:x11/libdmx
-fontenc_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/fontenc.pc:x11-fonts/libfontenc
-fontutil_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/fontutil.pc:x11-fonts/font-util
-ice_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/ice.pc:x11/libICE
-libfs_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/libfs.pc:x11-fonts/libFS
-oldx_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/oldx.pc:x11/liboldX
-pciaccess_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/pciaccess.pc:devel/libpciaccess
-pixman_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/pixman-1.pc:x11/pixman
-sm_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/sm.pc:x11/libSM
-x11_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/x11.pc:x11/libX11
-xau_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xau.pc:x11/libXau
-xaw_LIB_PC_DEPENDS=		${xaw7_LIB_PC_DEPENDS}
-xaw6_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xaw6.pc:x11-toolkits/libXaw
-xaw7_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xaw7.pc:x11-toolkits/libXaw
-xbitmaps_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xbitmaps.pc:x11/xbitmaps
-xcb_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xcb.pc:x11/libxcb
-xcomposite_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xcomposite.pc:x11/libXcomposite
-xcursor_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xcursor.pc:x11/libXcursor
-xdamage_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xdamage.pc:x11/libXdamage
-xdmcp_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xdmcp.pc:x11/libXdmcp
-xevie_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xevie.pc:x11/libXevie
-xext_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xext.pc:x11/libXext
-xfixes_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xfixes.pc:x11/libXfixes
-xfont_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xfont.pc:x11-fonts/libXfont
-xfont2_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xfont2.pc:x11-fonts/libXfont2
-xfontcache_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xfontcache.pc:x11-fonts/libXfontcache
-xft_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xft.pc:x11-fonts/libXft
-xi_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xi.pc:x11/libXi
-xinerama_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xinerama.pc:x11/libXinerama
-xkbfile_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xkbfile.pc:x11/libxkbfile
-xkbui_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xkbui.pc:x11/libxkbui
-xmu_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xmu.pc:x11-toolkits/libXmu
-xmuu_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xmuu.pc:x11-toolkits/libXmu
-xorg-macros_BUILD_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xorg-macros.pc:devel/xorg-macros
-xorg-server_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xorg-server.pc:x11-servers/xorg-server
-xorgproto_BUILD_DEPENDS=		xorgproto>=0:x11/xorgproto
-xp_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xp.pc:x11/libXp
-xpm_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xpm.pc:x11/libXpm
-xprintapputil_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xprintapputil.pc:x11/libXprintAppUtil
-xprintutil_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xprintutil.pc:x11/libXprintUtil
-xrandr_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xrandr.pc:x11/libXrandr
-xrender_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xrender.pc:x11/libXrender
-xres_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xres.pc:x11/libXres
-xscrnsaver_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xscrnsaver.pc:x11/libXScrnSaver
-xt_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xt.pc:x11-toolkits/libXt
-xshmfence_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xshmfence.pc:x11/libxshmfence
-xtrans_BUILD_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xtrans.pc:x11/xtrans
-xtrap_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xtrap.pc:x11/libXTrap
-xtst_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xtst.pc:x11/libXtst
-xv_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xv.pc:x11/libXv
-xvmc_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xvmc.pc:x11/libXvMC
-xxf86dga_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xxf86dga.pc:x11/libXxf86dga
-xxf86misc_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xxf86misc.pc:x11/libXxf86misc
-xxf86vm_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xxf86vm.pc:x11/libXxf86vm
-
-.for _module in ${USE_XORG:M*\:both:C/\:.*//g}
-. if ${XORG_MODULES:M${_module}} == ""
-IGNORE=				requires unknown xorg module (${_module})
-. endif
-RUN_DEPENDS+=			${${_module}_BUILD_DEPENDS}
-.endfor
-
-.for _module in ${USE_XORG:C/\:.*//g}
-. if ${XORG_MODULES:M${_module}} == ""
-IGNORE=				requires unknown xorg module (${_module})
-. endif
-LIB_PC_DEPENDS+=		${${_module}_LIB_PC_DEPENDS}
-BUILD_DEPENDS+=			${${_module}_BUILD_DEPENDS}
-.endfor
-
-RUN_DEPENDS+=			${LIB_PC_DEPENDS}
-BUILD_DEPENDS+=			${LIB_PC_DEPENDS}
+# We onlu need USES=xorg if we want USE_XORG modules
+.  if defined(USE_XORG) && !empty(USE_XORG)
+.include "${USESDIR}/xorg.mk"
+.  endif
 
 .endif

Copied and modified: head/Mk/Uses/xorg.mk (from r509888, head/Mk/bsd.xorg.mk)
==============================================================================
--- head/Mk/bsd.xorg.mk	Mon Aug 26 08:00:04 2019	(r509888, copy source)
+++ head/Mk/Uses/xorg.mk	Mon Aug 26 09:45:15 2019	(r509895)
@@ -1,171 +1,101 @@
-#-*- tab-width: 4; -*-
-# ex:ts=4
+# $FreeBSD$
 #
-# bsd.xorg.mk - Support for X.Org ports and dependencies
-#
+# Originally from bsd.xorg.mk
 # Created by: Florent Thoumie <flz@FreeBSD.org>
 #
-# !!! Here be dragons !!! (yeah, here as well...)
+# Feature:		xorg
+# Usage:		USES=xorg
+# 			USE_XORG=<component>
 #
-# $FreeBSD$
+# 			Not specifying USE_XORG with USES=xorg is an error.
+#			
+#			Components can be found in the XORG_MODULES list below.
 #
-
-.if !defined(_POSTMKINCLUDED) && !defined(Xorg_Pre_Include)
-
-Xorg_Include_MAINTAINER=	x11@FreeBSD.org
-Xorg_Pre_Include=		bsd.xorg.mk
-
-# Some notes:
 #
-# 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.
-# xserver - there's only one atm, I guess everything can fit into the port itself
+# If you feel something is missing from the list, please let us know.
+#
+# MAINTAINER:	x11@FreeBSD.org
 
-.if defined(XORG_CAT)
-# Default variables, common to all new modular xorg ports.
-.if !defined(USES) || ! ${USES:Mtar*}
-USES+=		tar:bzip2
+.if !defined(_INCLUDE_USES_XORG_MK)
+_INCLUDE_USES_XORG_MK=		yes
+_USES_POST+=	xorg
 .endif
-GNU_CONFIGURE= 	yes
-# for some reason this makes mkfontscale and others fail in the install target
-#INSTALL_TARGET=	install-strip
-DIST_SUBDIR=	xorg/${XORG_CAT}
 
-MASTER_SITES?=	${MASTER_SITE_XORG}
-MASTER_SITE_SUBDIR?=	individual/${XORG_CAT}
+# Set up things after bsd.port.post.mk.
+# This way ports can add things to USE_XORG even after bsd.port.pre.mk is
+# included.
+.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_XORG_POST_MK)
+_INCLUDE_USES_XORG_POST_MK=	yes
 
-# All xorg ports needs pkgconfig to build, but some ports look for pkgconfig and
-# then continues the build.
-USES+=		pkgconfig
+.  if !empty(xorg_ARGS)
+IGNORE=		USES=xorg takes no arguments
+.  endif
 
-# All xorg ports needs xorg-macros.
-. if ${PORTNAME} != xorg-macros
-USE_XORG+=      xorg-macros
-. endif
-
-. if ${XORG_CAT} == "app"
-# Nothing at the moment
-. endif
-
-. if ${XORG_CAT} == "data"
-# Nothing at the moment.
-. endif
-
-. if ${XORG_CAT} == "driver"
-USE_XORG+=	xorg-server xorgproto xi
-CONFIGURE_ENV+=	DRIVER_MAN_SUFFIX=4x DRIVER_MAN_DIR='$$(mandir)/man4'
-USES+=		libtool
-INSTALL_TARGET=	install-strip
-. endif
-
-. if ${XORG_CAT} == "font"
-FONTNAME?=	${PORTNAME:C/.*-//g:S/type/Type/:S/ttf/TTF/:S/speedo/Speedo/}
-CONFIGURE_ARGS+=	--with-fontrootdir=${PREFIX}/share/fonts
-CONFIGURE_ENV+=	FONTROOTDIR=${PREFIX}/share/fonts
-.    if !defined(NOFONT)
-USES+=	fonts
-BUILD_DEPENDS+=	mkfontscale>=0:x11-fonts/mkfontscale \
-				bdftopcf:x11-fonts/bdftopcf
-PLIST_FILES+=	"@comment ${FONTSDIR}/fonts.dir" \
-				"@comment ${FONTSDIR}/fonts.scale"
-.    endif
+.  if !defined(USE_XORG)
+IGNORE=		need to specify xorg modules with USE_XORG
 .  endif
 
-. if ${XORG_CAT} == "lib"
-USES+=		pathfix libtool
-USE_LDCONFIG=	yes
-CONFIGURE_ARGS+=--enable-malloc0returnsnull
-. endif
+# List of xorg modules
+XORG_MODULES=	dmx \
+		fontenc \
+		fontutil \
+		ice \
+		libfs \
+		oldx \
+		pciaccess \
+		pixman \
+		sm \
+		x11 \
+		xau \
+		xaw \
+		xaw6 \
+		xaw7 \
+		xbitmaps \
+		xcb \
+		xcomposite \
+		xcursor \
+		xdamage \
+		xdmcp \
+		xevie \
+		xext \
+		xfixes \
+		xfont \
+		xfont2 \
+		xfontcache \
+		xft \
+		xi \
+		xinerama \
+		xkbfile \
+		xkbui \
+		xmu \
+		xmuu \
+		xorg-macros \
+		xorg-server \
+		xorgproto \
+		xp \
+		xpm \
+		xprintapputil \
+		xprintutil \
+		xrandr \
+		xrender \
+		xres \
+		xscrnsaver \
+		xshmfence \
+		xt \
+		xtrans \
+		xtrap \
+		xtst \
+		xv \
+		xvmc \
+		xxf86dga \
+		xxf86misc \
+		xxf86vm
 
-. if ${XORG_CAT} == "proto"
-USES+=	pathfix
-. endif
-
-. if ${XORG_CAT} == "xserver"
-DISTFILES?=	xorg-server-${PORTVERSION}.tar.bz2
-WRKSRC=		${WRKDIR}/xorg-server-${PORTVERSION}
-USES+=	pathfix
-CONFIGURE_ARGS+=	--with-xkb-path=${LOCALBASE}/share/X11/xkb \
-					--with-fontrootdir=${LOCALBASE}/share/fonts
-
-LIB_PC_DEPENDS+=	${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri
-USE_XORG+=	fontutil:build
-. endif
-
-.endif
-
-.endif
-
-.if defined(_POSTMKINCLUDED) && !defined(Xorg_Post_Include)
-
-Xorg_Post_Include=		bsd.xorg.mk
-
 # Register all xorg .pc files here.
 # foo_LIB_PC_DEPENDS means it should go to BUILD_DEPENDS *and* RUN_DEPENDS.
-
-XORG_MODULES=	dmx \
-				fontenc \
-				fontutil \
-				ice \
-				libfs \
-				oldx \
-				pciaccess \
-				pixman \
-				sm \
-				x11 \
-				xau \
-				xaw \
-				xaw6 \
-				xaw7 \
-				xbitmaps \
-				xcb \
-				xcomposite \
-				xcursor \
-				xdamage \
-				xdmcp \
-				xevie \
-				xext \
-				xfixes \
-				xfont \
-				xfont2 \
-				xfontcache \
-				xft \
-				xi \
-				xinerama \
-				xkbfile \
-				xkbui \
-				xmu \
-				xmuu \
-				xorg-macros \
-				xorg-server \
-				xorgproto \
-				xp \
-				xpm \
-				xprintapputil \
-				xprintutil \
-				xrandr \
-				xrender \
-				xres \
-				xscrnsaver \
-				xshmfence \
-				xt \
-				xtrans \
-				xtrap \
-				xtst \
-				xv \
-				xvmc \
-				xxf86dga \
-				xxf86misc \
-				xxf86vm
-
 dmx_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/dmx.pc:x11/libdmx
 fontenc_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/fontenc.pc:x11-fonts/libfontenc
-fontutil_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/fontutil.pc:x11-fonts/font-util
+fontutil_BUILD_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/fontutil.pc:x11-fonts/font-util
 ice_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/ice.pc:x11/libICE
 libfs_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/libfs.pc:x11-fonts/libFS
 oldx_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/oldx.pc:x11/liboldX
@@ -198,7 +128,7 @@ xmu_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xm
 xmuu_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xmuu.pc:x11-toolkits/libXmu
 xorg-macros_BUILD_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xorg-macros.pc:devel/xorg-macros
 xorg-server_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xorg-server.pc:x11-servers/xorg-server
-xorgproto_BUILD_DEPENDS=		xorgproto>=0:x11/xorgproto
+xorgproto_BUILD_DEPENDS=	xorgproto>=0:x11/xorgproto
 xp_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xp.pc:x11/libXp
 xpm_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xpm.pc:x11/libXpm
 xprintapputil_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xprintapputil.pc:x11/libXprintAppUtil
@@ -218,22 +148,27 @@ xxf86dga_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfi
 xxf86misc_LIB_PC_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/xxf86misc.pc:x11/libXxf86misc
 xxf86vm_LIB_PC_DEPENDS=		${LOCALBASE}/libdata/pkgconfig/xxf86vm.pc:x11/libXxf86vm
 
-.for _module in ${USE_XORG:M*\:both:C/\:.*//g}
-. if ${XORG_MODULES:M${_module}} == ""
-IGNORE=				requires unknown xorg module (${_module})
-. endif
-RUN_DEPENDS+=			${${_module}_BUILD_DEPENDS}
-.endfor
+# 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
 
-.for _module in ${USE_XORG:C/\:.*//g}
-. if ${XORG_MODULES:M${_module}} == ""
-IGNORE=				requires unknown xorg module (${_module})
-. endif
-LIB_PC_DEPENDS+=		${${_module}_LIB_PC_DEPENDS}
-BUILD_DEPENDS+=			${${_module}_BUILD_DEPENDS}
-.endfor
+.  for _module in ${USE_XORG:M*\:both:C/\:.*//g}
+.    if ${XORG_MODULES:M${_module}} == ""
+IGNORE=		requires unknown xorg module (${_module})
+.    endif
+RUN_DEPENDS+=	${${_module}_BUILD_DEPENDS}
+.  endfor
 
-RUN_DEPENDS+=			${LIB_PC_DEPENDS}
-BUILD_DEPENDS+=			${LIB_PC_DEPENDS}
+.  for _module in ${USE_XORG:C/\:both$//g}
+.    if ${XORG_MODULES:M${_module}} == ""
+IGNORE=		requires unknown xorg module (${_module})
+.    endif
+LIB_PC_DEPENDS+=${${_module}_LIB_PC_DEPENDS}
+BUILD_DEPENDS+=	${${_module}_BUILD_DEPENDS}
+.  endfor
+
+RUN_DEPENDS+=	${LIB_PC_DEPENDS}
+BUILD_DEPENDS+=	${LIB_PC_DEPENDS}
 
 .endif

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Mon Aug 26 09:22:07 2019	(r509894)
+++ head/Mk/bsd.port.mk	Mon Aug 26 09:45:15 2019	(r509895)
@@ -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 mkfont
 .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)
@@ -1966,13 +1972,6 @@ ${_f}_ARGS:=	${f:C/^[^\:]*(\:|\$)//:S/,/ /g}
 .if defined(USE_LOCALE)
 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

Modified: head/multimedia/gstreamer1-vaapi/Makefile
==============================================================================
--- head/multimedia/gstreamer1-vaapi/Makefile	Mon Aug 26 09:22:07 2019	(r509894)
+++ head/multimedia/gstreamer1-vaapi/Makefile	Mon Aug 26 09:45:15 2019	(r509895)
@@ -18,12 +18,12 @@ LIB_DEPENDS=	libva.so:multimedia/libva
 GNU_CONFIGURE=	yes
 INSTALL_TARGET=	install-strip
 USES=		compiler:c11 gettext-runtime gmake gnome libtool \
-		pkgconfig tar:xz
+		pkgconfig tar:xz xorg
 USE_LDCONFIG=	yes
 USE_GNOME=	glib20
 USE_GSTREAMER1=	bad gl
 USE_GL=		gl
-USE_XORG=	x11 xrandr xrender xorgproto:build
+USE_XORG=	x11 xrandr xrender xorgproto
 
 OPTIONS_DEFINE=	DRM WAYLAND
 

Modified: head/x11-drivers/xf86-video-intel/Makefile
==============================================================================
--- head/x11-drivers/xf86-video-intel/Makefile	Mon Aug 26 09:22:07 2019	(r509894)
+++ head/x11-drivers/xf86-video-intel/Makefile	Mon Aug 26 09:45:15 2019	(r509895)
@@ -4,8 +4,6 @@
 PORTNAME=	xf86-video-intel
 PORTVERSION=	2.99.917.20181203
 CATEGORIES=	x11-drivers
-MASTER_SITES=	http://cgit.freedesktop.org/xorg/${XORG_CAT}/${PORTNAME}/snapshot/
-DISTNAME=	${PORTNAME}-${COMMIT_ID}
 
 MAINTAINER=	x11@FreeBSD.org
 COMMENT=	Driver for Intel integrated graphics chipsets
@@ -13,21 +11,19 @@ COMMENT=	Driver for Intel integrated graphics chipsets
 LICENSE=	MIT	# various
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-LIB_DEPENDS=	libxcb-util.so:x11/xcb-util \
-		libdrm.so:graphics/libdrm
-
-COMMIT_ID=	e5ff8e1828f97891c819c919d7115c6e18b2eb1f
-
 ONLY_FOR_ARCHS=	amd64 i386
 ONLY_FOR_ARCHS_REASON=	Intel integrated GPU only exists in Intel x86 processors/chipsets
 
-USE_GL=		gl
+LIB_DEPENDS=	libxcb-util.so:x11/xcb-util \
+		libdrm.so:graphics/libdrm
 
-USE_LDCONFIG=	yes
-XORG_CAT=	driver
+USES=		cpe xorg xorg-cat:driver
+USE_GITLAB=	yes
+GL_COMMIT=	e5ff8e1828f97891c819c919d7115c6e18b2eb1f
+USE_GL=		gl
 USE_XORG=	pciaccess pixman x11 xcb xext xrender xv xvmc
+USE_LDCONFIG=	yes
 
-USES+=		cpe autoreconf
 CPE_VENDOR=	x
 
 OPTIONS_SINGLE=	ACCEL

Modified: head/x11-drivers/xf86-video-intel/distinfo
==============================================================================
--- head/x11-drivers/xf86-video-intel/distinfo	Mon Aug 26 09:22:07 2019	(r509894)
+++ head/x11-drivers/xf86-video-intel/distinfo	Mon Aug 26 09:45:15 2019	(r509895)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1543827685
-SHA256 (xorg/driver/xf86-video-intel-e5ff8e1828f97891c819c919d7115c6e18b2eb1f.tar.bz2) = 11b7e70c6efecad6540eda24c7370b47597f92dea9b24ca031d83b89eb6a8337
-SIZE (xorg/driver/xf86-video-intel-e5ff8e1828f97891c819c919d7115c6e18b2eb1f.tar.bz2) = 1247314
+TIMESTAMP = 1561472772
+SHA256 (xorg/driver/driver-xf86-video-intel-e5ff8e1828f97891c819c919d7115c6e18b2eb1f_GL0.tar.gz) = cbb6a10695b9e8b41fef1bafe5c4d9ddf710acb1ccba8e141378493bacda982e
+SIZE (xorg/driver/driver-xf86-video-intel-e5ff8e1828f97891c819c919d7115c6e18b2eb1f_GL0.tar.gz) = 1693563

Modified: head/x11/xscope/Makefile
==============================================================================
--- head/x11/xscope/Makefile	Mon Aug 26 09:22:07 2019	(r509894)
+++ head/x11/xscope/Makefile	Mon Aug 26 09:45:15 2019	(r509895)
@@ -4,14 +4,13 @@ PORTNAME=	xscope
 PORTVERSION=	1.4.1
 PORTREVISION=	2
 CATEGORIES=	x11
-MASTER_SITES=	XORG/individual/${XORG_CAT}/
 
 MAINTAINER=	x11@FreeBSD.org
 COMMENT=	X Window Protocol Viewer
 
 LICENSE=	MIT
 
-XORG_CAT=	app
+USES=		xorg xorg-cat:app
 USE_XORG=	xorgproto x11 xext
 
 PLIST_FILES=	bin/xscope man/man1/xscope.1.gz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908260945.x7Q9jGfC043354>