diff --git Mk/Scripts/qa.sh Mk/Scripts/qa.sh
index e01ed5ee18ae..b5301ded0c93 100644
--- Mk/Scripts/qa.sh
+++ Mk/Scripts/qa.sh
@@ -551,12 +551,10 @@ proxydeps_suggest_uses() {
 		warn "you need USE_XORG+=pixman"
 	# Qt4
 	elif expr ${pkg} : '.*/qt4-.*' > /dev/null; then
-		warn "you need USE_QT4+=$(echo ${pkg} | sed -E 's|.*/qt4-||')"
-	elif expr ${pkg} : '.*/.*-qt4' > /dev/null; then
-		warn "you need USE_QT4+=$(echo ${pkg} | sed -E 's|.*/(.*)-qt4|\1|')"
+		warn "you need USES=qt:4 and USE_QT+=$(echo ${pkg} | sed -E 's|.*/qt4-||')"
 	# Qt5
 	elif expr ${pkg} : '.*/qt5-.*' > /dev/null; then
-		warn "you need USE_QT5+=$(echo ${pkg} | sed -E 's|.*/qt5-||')"
+		warn "you need USES=qt:5 and USE_QT+=$(echo ${pkg} | sed -E 's|.*/qt5-||')"
 	# MySQL
 	elif expr ${lib_file} : "${LOCALBASE}/lib/mysql/[^/]*$" > /dev/null; then
 		warn "you need USES+=mysql"
diff --git Mk/Uses/qmake.mk Mk/Uses/qmake.mk
index 41b0da9c6d0f..ce9b0ebc4646 100644
--- Mk/Uses/qmake.mk
+++ Mk/Uses/qmake.mk
@@ -1,5 +1,13 @@
 # $FreeBSD$
 #
+# There are three Qt related USES files with different access to Qt.
+#   - qmake: The port requires Qt's qmake to build -- creates the configure target
+#            - auto includes qt.mk
+#   - qt-dist: The port is a port for an part of Qt4 or Qt5
+#            - auto inclues qt.mk
+#   - qt.mk  - Dependency handling. USE_QT=foo bar
+#
+#
 # Provide support for qmake-based projects
 #
 # Feature:		qmake
@@ -9,6 +17,9 @@
 # ARGS description:
 # norecursive		Don't pass -recursive argument to qmake binary
 # outsource		Perform an out-of-source build
+# no_env		Suppress modification of configure and make environment.
+# no_configure		Don't add the configure target -- this is implied by 
+#			HAS_CONFIGURE=yes and GNU_CONFIGURE=yes
 #
 #
 # Variables for ports:
@@ -33,77 +44,97 @@
 .if !defined(_INCLUDE_USES_QMAKE_MK)
 _INCLUDE_USES_QMAKE_MK=	yes
 
-# _QT_VERSION is defined in bsd.qt.mk, only if a correct Qt version was selected
-# via USE_QT*.
-.if empty(_QT_VERSION)
-IGNORE=	'USES+= qmake' must be accompanied with 'USE_QT[${_QT_SUPPORTED:S/ //g}]= #'
-.endif
+# Suck in qt.mk
+.include "${USESDIR}/qt.mk"
 
-# _env is a private argument used only by bsd.qt.mk to get variables and custom
-# targets (currently, only qmake-configure), without qmake being added to the
-# configure stage.
-_VALID_ARGS=	norecursive outsource _env
+_VALID_ARGS=		norecursive outsource no_env no_configure
 
-.for arg in ${qmake_ARGS}
-.  if empty(_VALID_ARGS:M${arg})
-IGNORE=	Incorrect 'USES+= qmake' usage: argument '${arg}' is not recognized
-.  endif
-.endfor
+.  for arg in ${qmake_ARGS}
+.    if empty(_VALID_ARGS:M${arg})
+IGNORE=			Incorrect 'USES+= qmake' usage: argument '${arg}' is not recognized
+.    endif
+.  endfor
 
-.if ! ${qmake_ARGS:M_env}
-USE_QT${_QT_VERSION:R:R}+=	qmake_build
-.endif
+# Check whether we need to add the configure target
+_ADD_CONFIGURE_TARGET=	yes
+.  if !empty(qmake_ARGS:Mno_configure) || defined(HAS_CONFIGURE) || defined(GNU_CONFIGURE)
+_ADD_CONFIGURE_TARGET=	# unset
+.  endif
 
 # QMAKESPEC belongs to bsd.qt.mk.
-QMAKE_ENV?=	${CONFIGURE_ENV}
-QMAKE_ARGS+=	-spec ${QMAKESPEC} \
-		QMAKE_CC="${CC}" QMAKE_CXX="${CXX}" \
-		QMAKE_LINK_C="${CC}" QMAKE_LINK_C_SHLIB="${CC}" \
-		QMAKE_LINK="${CXX}" QMAKE_LINK_SHLIB="${CXX}" \
-		QMAKE_CFLAGS="${CFLAGS}" \
-		QMAKE_CXXFLAGS="${CXXFLAGS}" \
-		QMAKE_LFLAGS="${LDFLAGS}" \
-		QMAKE_LIBS="${LIBS}" \
-		QMAKE_CFLAGS_DEBUG="" \
-		QMAKE_CFLAGS_RELEASE="" \
-		QMAKE_CXXFLAGS_DEBUG="" \
-		QMAKE_CXXFLAGS_RELEASE="" \
-		PREFIX="${PREFIX}"
-
-.if defined(WITH_DEBUG)
-QMAKE_ARGS+=	CONFIG+="debug" \
-		CONFIG-="release"
-.else
-QMAKE_ARGS+=	CONFIG+="release" \
-		CONFIG-="debug separate_debug_info"
-.endif # defined(WITH_DEBUG)
+QMAKE_ENV?=		${CONFIGURE_ENV}
+QMAKE_ARGS+=		-spec ${QMAKESPEC} \
+			QMAKE_CC="${CC}" QMAKE_CXX="${CXX}" \
+			QMAKE_LINK_C="${CC}" QMAKE_LINK_C_SHLIB="${CC}" \
+			QMAKE_LINK="${CXX}" QMAKE_LINK_SHLIB="${CXX}" \
+			QMAKE_CFLAGS="${CFLAGS}" \
+			QMAKE_CXXFLAGS="${CXXFLAGS}" \
+			QMAKE_LFLAGS="${LDFLAGS}" \
+			QMAKE_LIBS="${LIBS}" \
+			QMAKE_CFLAGS_DEBUG="" \
+			QMAKE_CFLAGS_RELEASE="" \
+			QMAKE_CXXFLAGS_DEBUG="" \
+			QMAKE_CXXFLAGS_RELEASE="" \
+			PREFIX="${PREFIX}"
+
+.  if defined(WITH_DEBUG)
+PLIST_SUB+=		DEBUG=""
+QMAKE_ARGS+=		CONFIG+="debug" \
+			CONFIG-="release"
+.  else
+PLIST_SUB+=		DEBUG="@comment "
+QMAKE_ARGS+=		CONFIG+="release" \
+			CONFIG-="debug separate_debug_info"
+.  endif # defined(WITH_DEBUG)
 
 # We set -recursive by default to keep qmake from running in the build stage.
-.if ! ${qmake_ARGS:Mnorecursive}
-QMAKE_ARGS+=	-recursive
-.endif
+.  if ! ${qmake_ARGS:Mnorecursive}
+QMAKE_ARGS+=		-recursive
+.  endif
 
-.if defined(QMAKE_VERBOSE)
-QMAKE_ARGS+=	-d
-.endif
+.  if defined(QMAKE_VERBOSE)
+QMAKE_ARGS+=		-d
+.  endif
 
 # _QMAKE_WRKSRC (and _QMAKE, below) are needed to abstract the qmake target and
 # use it for both qtbase and USES=qmake ports. They are private, not supposed to
 # be used anywhere else.
 _QMAKE_WRKSRC?=	${CONFIGURE_WRKSRC}
-.if ${qmake_ARGS:Moutsource}
+.  if ${qmake_ARGS:Moutsource}
 CONFIGURE_WRKSRC=	${WRKDIR}/.build
 BUILD_WRKSRC=		${CONFIGURE_WRKSRC}
 INSTALL_WRKSRC=		${BUILD_WRKSRC}
 TEST_WRKSRC=		${BUILD_WRKSRC}
 QMAKE_SOURCE_PATH?=	${WRKSRC}
-.else
+.  else
 QMAKE_SOURCE_PATH?=	# empty
-.endif
+.  endif
 
-.if ! ${qmake_ARGS:M_env}
-DESTDIRNAME=	INSTALL_ROOT
-.endif
+# Add qmake to USE_QT -- unless it's qmake itself
+.  if !${PORTNAME} == qmake
+USE_QT+=		qmake_build
+.  endif
+
+.  if empty(qmake_ARGS:Mno_env)
+DESTDIRNAME=		INSTALL_ROOT
+CONFIGURE_ENV+=		QTDIR="${QT_ARCHDIR}" QMAKE="${QMAKE}" \
+			MOC="${MOC}" RCC="${RCC}" UIC="${UIC}" \
+			QMAKESPEC="${QMAKESPEC}"
+CONFIGURE_ARGS+=	--with-qt-includes=${QT_INCDIR} \
+			--with-qt-libraries=${QT_LIBDIR} \
+			--with-extra-includes=${LOCALBASE}/include \
+			--with-extra-libs=${LOCALBASE}/lib
+.  endif
+
+_USES_POST+=		qmake
+.endif # _QMAKE_MK_INCLUDED
+
+# =============================================================================
+#
+# =============================================================================
+
+.if defined(_POSTMKINCLUDED) && !defined(_QMAKE_MK_POST_INCLUDED)
+_QMAKE_MK_POST_INCLUDED=	qmake.mk
 
 # Define a custom target to make it usable by bsd.qt.mk for internal Qt
 # configuration.
@@ -114,8 +145,8 @@ qmake-configure:
 			${QMAKE_SOURCE_PATH} \
 			${QMAKE_CONFIGURE_ARGS:?--:} ${QMAKE_CONFIGURE_ARGS}
 
-.if !target(do-configure) && ! ${qmake_ARGS:M_env}
+.  if !target(do-configure) && !empty(_ADD_CONFIGURE_TARGET)
 _USES_configure+=	450:qmake-configure
-.endif
+.  endif
 
 .endif # !defined(_INCLUDE_USES_QMAKE_MK)
diff --git Mk/Uses/qt-dist.mk Mk/Uses/qt-dist.mk
new file mode 100644
index 000000000000..87575bf3618b
--- /dev/null
+++ Mk/Uses/qt-dist.mk
@@ -0,0 +1,377 @@
+# $FreeBSD$
+#
+# There are three Qt related USES files with different access to Qt.
+#   - qmake: The port requires Qt's qmake to build -- creates the configure target
+#            - auto includes qt.mk
+#   - qt-dist: The port is a port for an part of Qt4 or Qt5
+#            - auto inclues qt.mk
+#   - qt.mk  - Dependency handling. USE_QT=foo bar
+#
+#
+# Usage
+#    qt-dist:<version>[,yes|modulename]
+
+.if !defined(_QT_DIST_MK_INCLUDED)
+_QT_DIST_MK_INCLUDED=	qt-dist.mk
+
+# Suck in qt.mk and qmake.mk
+qt_ARGS?=	# empty
+.include "${USESDIR}/qt.mk"
+qmake_ARGS?=	# empty
+.include "${USESDIR}/qmake.mk"
+
+# Supported distribution arguments
+_QT4_DISTS=		yes
+_QT5_DISTS=		3d activeqt androidextras base canvas3d charts connectivity \
+			datavis3d declarative doc gamepad graphicaleffects imageformats \
+			location macextras multimedia networkauth purchasing \
+			quickcontrols2 quickcontrols remoteobjects script scxml sensors \
+			serialbus serialport speech svg tools translations \
+			virtualkeyboard wayland webchannel webengine websockets webview \
+			winextras x11extras xmlpatterns
+_QT_DISTS=		${_QT${_QT_VER}_DISTS}
+
+# We only accept one item as an argument. The fetch target further below works
+# around this.
+_QT_DIST=		# empty
+.  for dist in ${_QT_DISTS:O:u}
+.    if ${qt-dist_ARGS:M${dist}}
+.      if empty(_QT_DIST)
+_QT_DIST=		${dist}
+.      else
+IGNORE=		cannot be installed: different Qt dists specified via qt-dist:[${qt-dist_ARGS:S/ /,/g}]
+.      endif
+.    endif
+.  endfor
+
+# Fall back to sensible defaults for _QT_DIST
+.  if empty(_QT_DIST)
+.    if ${_QT_VER:M4}
+_QT_DIST=		yes # don't force qt-dist to be set for Qt4 ports which all have 'yes'.
+.    endif
+.    if ${_QT_VER:M5}
+_QT_DIST=		${PORTNAME} # don't force qt-dist to be set for Qt5 ports which 75% of time are ${PORTNAME}
+.    endif
+.  endif
+
+# Check validitiy
+.  if empty(_QT_DISTS:M${_QT_DIST})
+IGNORE=			Unsupported qt-dist ${_QT_DIST} for qt:${_QT_VER}
+.  endif
+################################################################################
+
+# Set standard bsd.port.mk variables
+MASTER_SITES=		${MASTER_SITE_QT}
+DISTINFO_FILE?=		${PORTSDIR}/devel/${_QT_RELNAME}/distinfo
+
+LICENSE?=		LGPL21
+
+.  if !exists(${PKGDIR}/pkg-descr)
+DESCR?=			${PORTSDIR}/devel/${_QT_RELNAME}/pkg-descr
+.  endif
+
+# Stage support.
+DESTDIRNAME=		INSTALL_ROOT
+
+.  if ${_QT_VER:M4}
+MASTER_SITE_SUBDIR?=	official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/
+DISTNAME=		qt-everywhere-opensource-src-${_QT_VERSION}
+DIST_SUBDIR=		KDE
+.  else
+MASTER_SITE_SUBDIR?=	official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules/
+# www/qt5-webengine hackery: The tarballs of 5.9.5 had a different naming scheme.
+.    if ${QT5_VERSION} == "5.9.5"
+DISTNAME=		${_QT_DIST:S,^,qt,:S,$,-opensource-src-${DISTVERSION},}
+.    else
+DISTNAME=		${_QT_DIST:S,^,qt,:S,$,-everywhere-src-${DISTVERSION},}
+.    endif
+DISTFILES=		${DISTNAME:S,$,${EXTRACT_SUFX},}
+DIST_SUBDIR=		KDE/Qt/${_QT_VERSION}
+
+# Qt (at least when used with qmake) has a tendency to overlink: some libraries
+# have dependencies on others in the mkspec configurations and the latter are
+# always passed to the linker even if they are not actually used. By passing
+# --as-needed to the linker by default when building the Qt ports we do not
+# have to declare a lot of unnecessary dependencies in USE_QT5.
+# This could arguably work for Qt4 too, but since it is maintenance mode it is
+# better not to fix what is not explicitly broken there.
+LDFLAGS+=		-Wl,--as-needed
+
+.    if ${.TARGETS:Mmakesum} || ${.TARGETS:Mfetch} && \
+	defined(DISABLE_SIZE) && defined(NO_CHECKSUM)
+# Ensure that the "makesum" target (with its inner "fetch" one) uses
+# devel/qt*/distinfo for every port.
+.      if ${DISTINFO_FILE:H} == ${PORTSDIR}/devel/${_QT_RELNAME}
+_QT_DIST=		${_QT5_DISTS}
+.      endif
+.    endif
+
+# Qt5's tarballs are xz compressed.
+.    if empty(USES:Mtar)
+EXTRACT_SUFX?=		.tar.xz
+.    endif
+
+.    if ${_QT_DIST} == "base" && ${PORTNAME} != "qmake"
+# Qt configure requires pkg-config to detect dependencies.
+.include "${USESDIR}/pkgconfig.mk"
+.    endif
+
+# -nomake is only used by qtbase's configure script.
+# Other ports from other Qt modules will automatically build examples and
+# tests if the directories exist because of mkspecs/features/qt_parts.prf.
+EXTRACT_AFTER_ARGS?=	${DISTNAME:S,$,/examples,:S,^,--exclude ,} \
+			${DISTNAME:S,$,/tests,:S,^,--exclude ,}
+.  endif # ! ${_QT_VER:M4}
+
+CONFIGURE_ENV+=		MAKE="${MAKE:T}"
+
+CONFIGURE_ARGS+=	-opensource -confirm-license \
+			-no-pch \
+			-prefix ${PREFIX} \
+			-bindir ${PREFIX}/${QT_BINDIR_REL} \
+			-headerdir ${PREFIX}/${QT_INCDIR_REL} \
+			-libdir ${PREFIX}/${QT_LIBDIR_REL} \
+			-plugindir ${PREFIX}/${QT_PLUGINDIR_REL} \
+			-importdir ${PREFIX}/${QT_IMPORTDIR_REL} \
+			-datadir ${PREFIX}/${QT_DATADIR_REL} \
+			-docdir ${PREFIX}/${QT_DOCDIR_REL} \
+			-translationdir ${PREFIX}/${QT_L10NDIR_REL} \
+			-sysconfdir ${PREFIX}/${QT_ETCDIR_REL}
+
+.  if ${_QT_VER:M4}
+CONFIGURE_ARGS+=	-fast \
+			-platform ${QMAKESPEC} \
+			-system-libjpeg -system-libpng \
+			-system-libmng -system-libtiff -system-zlib \
+			-no-phonon-backend \
+			-examplesdir ${PREFIX}/${QT_EXAMPLEDIR_REL}/examples \
+			-demosdir ${PREFIX}/${QT_EXAMPLEDIR_REL}/demos
+.  else
+CONFIGURE_ARGS+=	-nomake examples -nomake tests \
+			-platform ${QMAKESPECNAME} \
+			-archdatadir ${PREFIX}/${QT_ARCHDIR_REL} \
+			-libexecdir ${PREFIX}/${QT_LIBEXECDIR_REL} \
+			-qmldir ${PREFIX}/${QT_QMLDIR_REL} \
+			-examplesdir ${PREFIX}/${QT_EXAMPLEDIR_REL} \
+			-testsdir ${PREFIX}/${QT_TESTDIR_REL}
+
+.    if ${ARCH} == i386 && empty(MACHINE_CPU:Msse2)
+CONFIGURE_ARGS+=	-no-sse2
+.    endif
+
+# Work around a bug in current binutils, where the gold linker creates
+# duplicate symbols. See pr 218187. Disable the gold-linker for Qt5 ports.
+CONFIGURE_ARGS+=	-no-use-gold-linker
+# Pass -recheck-all so that multiple calls to the configure script really
+# re-run all checks.
+CONFIGURE_ARGS+=	-recheck-all
+.  endif # ${_QT_VER:M4}
+
+.  if defined(WANT_QT_DEBUG) || defined(WITH_DEBUG)
+WITH_DEBUG=		yes
+STRIP=			# It's done prior to bsd.qt.mk inclusion.
+CONFIGURE_ARGS+=	-debug -separate-debug-info
+# Override configuration in global qconfig.pri.
+QMAKE_ARGS+=		QT_CONFIG+="debug separate_debug_info" \
+			QT_CONFIG-="release"
+.  else
+CONFIGURE_ARGS+=	-release -no-separate-debug-info
+QMAKE_ARGS+=		QT_CONFIG+="release" \
+			QT_CONFIG-="debug separate_debug_info"
+.  endif # defined(WANT_QT_DEBUG) || defined(WITH_DEBUG)
+
+.  if defined(WANT_QT_VERBOSE_CONFIGURE)
+CONFIGURE_ARGS+=	-verbose
+.  endif
+
+.  if ${_QT_DIST} == "base" || ${_QT_VER:M4}
+.    if ${_QT_VER:M4}
+_EXTRA_PATCHES_QT4=	${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-src-corelib-global-qglobal.h \
+			${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-libtool \
+			${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-config.tests-unix-compile.test
+# Patch in proper name for armv6 architecture: https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01679.html
+_EXTRA_PATCHES_QT4+=	${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-armv6
+_EXTRA_PATCHES_QT4+=	${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-aarch64
+.    else
+_EXTRA_PATCHES_QT5=	${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_features_create__cmake.prf \
+			${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_features_qt__module.prf \
+			${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_common_bsd_bsd.conf
+.    endif
+EXTRA_PATCHES?=		${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-configure \
+			${_EXTRA_PATCHES_QT4} ${_EXTRA_PATCHES_QT5}
+.  endif #  ${_QT_DIST} == "base" || ${_QT_VER:M4}
+
+# Override settings installed in qconfig.h and *.pri files. The flags will be
+# installed along with the port, but have to be passed as arguments while
+# building the port itself. Flags prefixed with "-" (e.g., "-CUPS" and "-cups")
+# are needed to disable some features.
+.  if !defined(${QT_MODNAME}) || empty(${QT_MODNAME})
+# Used for both qconfig-*.h and qt_config_*.pri; it can't be empty.
+QT_MODNAME=		${PORTNAME}
+.  endif
+QT_DEFINES?=		# For qconfig.h flags (without "QT_" prefix).
+QT_CONFIG?=		# For *.pri files QT_CONFIG flags.
+.  if ${QT_DEFINES}
+QMAKE_ARGS+=		DEFINES+="${QT_DEFINES:O:u:C/^([^-])/QT_\1/:C/^-/QT_NO_/:O}"
+.    if ${QT_DEFINES:N-*}
+# Use a script to cleanup qconfig-modules.h (see qt-post-install).
+PKGDEINSTALL=		${WRKDIR}/pkg-deinstall
+.    endif
+.  endif #  ${QT_DEFINES}
+.  if ${QT_CONFIG:N-*}
+QMAKE_ARGS+=		QT_CONFIG+="${QT_CONFIG:N-*:O:u}"
+.  endif
+.  if ${QT_CONFIG:M-*}
+QMAKE_ARGS+=		QT_CONFIG-="${QT_CONFIG:M-*:O:u:C/^-//}"
+.  endif
+
+# Add a RUN_DEPENDS on misc/qtchooser to select the binaries.
+# The binaries of both supported Qt versions are installed to
+# ${LOCALBASE}/lib/qt[45]/bin. The port misc/qtchooser installs
+# wrapper binaries into ${LOCALBASE}/bin, and chooses the correct
+# one depending on the value of QT_SELECT (which we pass to both
+# CONFIGURE_ENV and MAKE_ENV). Therefore make all QT_DIST ports
+# RUN_DEPEND on it.
+RUN_DEPENDS+=		qtchooser:misc/qtchooser
+
+PLIST_SUB+=		SHORTVER=${DISTVERSION:R} \
+			FULLVER=${DISTVERSION:C/-.*//}
+
+# Handle additional PLIST directories, which should only be used for Qt-dist ports.
+.  for dir in CMAKE ETC
+# Export QT_CMAKEDIR and QT_ETCDIR.
+PLIST_SUB+=		QT_${dir}DIR="${QT_${dir}DIR_REL}"
+.  endfor
+
+
+.  if ! ${_QT_VER:M4}
+.    if ${_QT_DIST} == "base"
+# qtbase requires some tools to be symlinked to the build directory.
+_QT_TOOLS=		# empty
+.      if ${PORTNAME} != "qmake"
+_QT_TOOLS+=		${QMAKE}
+.      endif
+.      if ${PORTNAME} != "buildtools"
+_QT_TOOLS+=		${MOC} ${RCC}
+.      endif
+.      if ${PORTNAME} != "qdoc"
+_QT_TOOLS+=		qdoc
+.      endif
+.      if ${PORTNAME} != "dbus"
+_QT_TOOLS+=		qdbuscpp2xml qdbusxml2cpp
+.      endif
+.      if ${PORTNAME} != "widgets"
+_QT_TOOLS+=		${UIC}
+.      endif
+
+# The list of QtBase components that need to be linked into WRKSRC/lib for
+# other QtBase ports. See below.
+_QT5_BASE=		core dbus gui network sql widgets
+
+pre-configure: qtbase-pre-configure
+qtbase-pre-configure:
+.      for tool in ${_QT_TOOLS}
+	@${TEST} -e ${QT_BINDIR}/${tool:T} && \
+		${LN} -sf ${QT_BINDIR}/${tool:T} ${CONFIGURE_WRKSRC}/bin/${tool:T} || \
+		${TRUE}
+.      endfor
+
+# The following is a fix for the inplace upgrade problem we faced (see
+# QTBUG-40825 and ports bugs 194088, 195105 and 198720) previously,
+# which previously was adressed by making sure, that ${LOCALBASE}/lib, which
+# would often gets added by pkgconf for the dependencies, was passed after
+# ${WRKSRC}/lib.
+# * We fix the inplace upgrade problem by moving the Qt5 libraries into
+#   ${LOCALBASE}/lib/qt5. Therefore a -L${LOCALBASE}/lib does no harm anymore.
+# * However, this means, that the ports belonging to the split up QtBase package
+#   now no longer can find their depending QtBase libraries. We fix this by
+#   linking these into ${CONFIGURE_WRKSRC}/lib if the given QtBase port depends
+#   on them.
+.      if ${_QT_DIST:Mbase}
+.        for basedep in ${_QT5_BASE}
+.          if ! empty(USE_QT:M${basedep})
+	${LN} -sf ${QT_LIBDIR}/${${basedep}_LIB} ${CONFIGURE_WRKSRC}/lib
+.          endif
+.        endfor
+.      endif
+
+#
+# **** THIS PART IS OBSOLETE FOR THE NEXT QT UPGRADE ****
+#
+# Add ${LOCALBASE}/lib to DEFAULT_LIBDIRS, which we use to filter out
+# certain paths from pkg-config calls (see the explanation in
+# devel/qt5/files/patch-configure) as well as for setting
+# QMAKE_DEFAULT_LIBDIR in mkspecs/qconfig.pri. Part of the solution for
+# ports/194088.
+post-patch: qtbase-post-patch
+qtbase-post-patch:
+	${REINPLACE_CMD} -e "/DEFAULT_LIBDIRS=/ s,\\\\\"\\\\n,\\\\n${LOCALBASE}/lib&," \
+		${WRKSRC}/configure
+
+.      if ${PORTNAME} != "qmake"
+_QMAKE=			${CONFIGURE_WRKSRC}/bin/qmake
+.      endif
+.    endif
+
+pre-configure: qt5-pre-configure
+qt5-pre-configure:
+# Qt 5.3.2 introduced a check in mkspecs/features/create_cmake.prf that
+# requires tests/auto/cmake to be present, otherwise the configure stage will
+# fail.
+# Since we cannot extract tests/auto/cmake/ and exclude tests/ at the same
+# time, we have to disable the check in a cache file (the only way to get this
+# value through to the configure script in qtbase).
+	${MKDIR} ${CONFIGURE_WRKSRC}
+	${ECHO_CMD} 'CMAKE_MODULE_TESTS = -' > ${CONFIGURE_WRKSRC}/.qmake.cache
+#
+# **** THIS PART IS OBSOLETE FOR THE NEXT QT UPGRADE ****
+#
+# We piggyback on QMAKE_LIBDIR_FLAGS to make sure -L${WRKSRC}/lib is passed to
+# the linker before -L/usr/local/lib. By default, the opposite happens, which
+# is a problem when a Qt port is being upgraded, since an existing library
+# would end up being picked up instead of those built in ${WRKSRC}/lib. Since
+# qmake appends the value of QMAKE_LIBDIR to QMAKE_LIBDIR_FLAGS, we can use the
+# latter to get the linker path order right. qmake is smart enough to strip
+# occurrences of ${WRKSRC}/lib from .pc and .prl files when installing them.
+# See QTBUG-40825 and ports bugs 194088, 195105 and 198720.
+	${ECHO_CMD} 'QMAKE_LIBDIR_FLAGS = -L${CONFIGURE_WRKSRC}/lib' >> ${CONFIGURE_WRKSRC}/.qmake.cache
+
+post-install: qt-post-install
+qt-post-install:
+.    if ${QT_DEFINES:N-*}
+# We can't use SUB_FILES with a shared pkg-deinstall.in.
+# We need it to be a script instead of a group of @unexecs, otherwise
+# qconfig-modules.h cleanup will be run in pre-deinstall stage, which is
+# useless. This will probably be replaced by a Keywords/ script in the future.
+	@${SED} -e 's,%%QT_MODNAME%%,${QT_MODNAME},g' \
+		-e 's,%%QT_INCDIR%%,${QT_INCDIR},g' \
+		${PORTSDIR}/devel/${_QT_RELNAME}/${FILESDIR:T}/${PKGDEINSTALL:T}.in > \
+		${PKGDEINSTALL}
+	@${MKDIR} ${STAGEDIR}${QT_INCDIR}/QtCore/modules
+	@${ECHO_CMD} -n \
+		> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
+.      for def in ${QT_DEFINES:N-*:O:u:C/=.*$//}
+	@${ECHO_CMD} "#if !defined(QT_${def}) && !defined(QT_NO_${def})" \
+		>> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
+	${ECHO_CMD} "# define QT_${def}" \
+		>> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
+	@${ECHO_CMD} "#endif" \
+		>> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
+	@${ECHO_CMD} \
+		>> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
+.      endfor
+	@${ECHO_CMD} "${PREFIX}/${QT_INCDIR_REL}/QtCore/modules/qconfig-${QT_MODNAME}.h" \
+		>> ${TMPPLIST}
+	@${ECHO_CMD} "@exec echo '#include <QtCore/modules/qconfig-${QT_MODNAME}.h>' >> ${PREFIX}/${QT_INCDIR_REL}/QtCore/qconfig-modules.h" \
+		>> ${TMPPLIST}
+.    endif # ${QT_DEFINES:N-*}
+.    if ${QT_CONFIG:N-*}
+	@${MKDIR} ${STAGEDIR}${QT_MKSPECDIR}/modules
+	${ECHO_CMD} "QT_CONFIG += ${QT_CONFIG:N-*:O:u}" \
+		> ${STAGEDIR}${QT_MKSPECDIR}/modules/qt_config_${QT_MODNAME}.pri
+	@${ECHO_CMD} "${PREFIX}/${QT_MKSPECDIR_REL}/modules/qt_config_${QT_MODNAME}.pri" \
+		>> ${TMPPLIST}
+.    endif # ${QT_CONFIG:N-*}
+.  endif # M4
+
+.endif # defined(_QT_DIST_MK_INCLUDED)
diff --git Mk/Uses/qt.mk Mk/Uses/qt.mk
new file mode 100644
index 000000000000..f22b32d9a177
--- /dev/null
+++ Mk/Uses/qt.mk
@@ -0,0 +1,500 @@
+# $FreeBSD$
+#
+# There are three Qt related USES files with different access to Qt.
+#   - qmake: The port requires Qt's qmake to build -- creates the configure target
+#            - auto includes qt.mk
+#   - qt-dist: The port is a port for an part of Qt4 or Qt5
+#            - auto includes qt.mk and qmake.mk
+#   - qt.mk  - Dependency handling. USE_QT=foo bar
+#
+# Usage:
+#   USES=qt:<version>[,no_env]
+#
+#   Versions:		4 5
+#
+# Port variables:
+# USE_QT		- List of Qt modules to depend on, with optional '_build'
+#			  and '_run' suffixes. Define it empty to include this file
+#			  without depending on Qt ports.
+# Global switches (for inclusion into /etc/make.conf):
+# QT4_OPTIONS		- A list of (Qt 4-only) global options; can be CUPS, NAS
+#					  and/or QGTKSTYLE. If set, Qt will be built with support
+#					  for:
+#					   * Common UNIX Printing System (CUPS);
+#					   * Network Audio System (NAS);
+#					   * GTK+-based Qt theme (QGTKSTYLE).
+
+.if !defined(_QT_MK_INCLUDED)
+_QT_MK_INCLUDED=	qt.mk
+
+# Qt versions currently supported by the framework.
+_QT_SUPPORTED?=		4 5
+QT4_VERSION?=		4.8.7
+QT5_VERSION?=		5.10.1
+
+# We accept the Qt version to be passed by either or all of the three mk files.
+.  if empty(qt_ARGS) && empty(qmake_ARGS) && empty(qt-dist_ARGS)
+IGNORE=			qt needs a version (${_QT_SUPPORTED}) passed via qt, qmake or qt-dist.
+.  endif
+
+# Gather all the args together
+_QT_GLOBAL_ARGS=	${qt_ARGS} ${qmake_ARGS} ${qt-dist_ARGS}
+
+# Check fo the Qt version to be used
+_QT_VER=		# empty
+.  for ver in ${_QT_SUPPORTED:O:u}
+.    if ${_QT_GLOBAL_ARGS:M${ver}}
+.      if !defined(_QT_VERSION)
+_QT_VER=		${ver}
+.      else
+.        if ${_QT_VERSION} != ${ver}
+IGNORE?=		cannot be installed: different Qt versions specified via qt:[${_QT_SUPPORTED:S/ //g}], qmake:[${_QT_SUPPORTED:S/ //g}] a qt-dist:[${_QT_SUPPORTED:S/ //g}]
+.        endif
+.      endif
+.    endif
+.  endfor
+
+.  if empty(_QT_VER)
+IGNORE?=		cannot decide what Qt version to use: specify one via qt:[${_QT_SUPPORTED:S/ //g}], qmake:[${_QT_SUPPORTED:S/ //g}] or qt-dist:[${_QT_SUPPORTED:S/ //g}]
+.  endif
+
+# Set the shortcuts used from now on
+_QT_RELNAME=		qt${_QT_VER}
+_QT_VERSION=		${QT${_QT_VER}_VERSION}
+
+# A wrapper (qtchooser) is used to invoke binaries.
+QT_BINDIR_REL?=		${QT_ARCHDIR_REL}/bin
+QT_INCDIR_REL?=		include/${_QT_RELNAME}
+QT_LIBDIR_REL?=		lib/${_QT_RELNAME}
+QT_ARCHDIR_REL?=	${QT_LIBDIR_REL}
+QT_PLUGINDIR_REL?=	${QT_ARCHDIR_REL}/plugins
+QT_LIBEXECDIR_REL?=	libexec/${_QT_RELNAME}
+QT_IMPORTDIR_REL?=	${QT_ARCHDIR_REL}/imports
+QT_QMLDIR_REL?=		${QT_ARCHDIR_REL}/qml
+QT_DATADIR_REL?=	share/${_QT_RELNAME}
+QT_DOCDIR_REL?=		share/doc/${_QT_RELNAME}
+QT_L10NDIR_REL?=	${QT_DATADIR_REL}/translations
+QT_ETCDIR_REL?=		etc/xdg
+QT_EXAMPLEDIR_REL?=	share/examples/${_QT_RELNAME}
+QT_TESTDIR_REL?=	${QT_DATADIR_REL}/tests
+QT_CMAKEDIR_REL?=	lib/cmake
+QT_QTCHOOSERDIR_REL?=	${QT_ETCDIR_REL}/qtchooser
+
+# Not customizable.
+.  if ${_QT_VERSION:M4*}
+QT_MKSPECDIR_REL=	${QT_DATADIR_REL}/mkspecs
+_QT_LIBVER=		# empty
+.  else
+QT_MKSPECDIR_REL=	${QT_ARCHDIR_REL}/mkspecs
+_QT_LIBVER=		${_QT_VERSION:R:R}
+.  endif
+
+LRELEASE?=		${QT_BINDIR}/lrelease
+LUPDATE?=		${QT_BINDIR}/lupdate
+MOC?=			${QT_BINDIR}/moc
+RCC?=			${QT_BINDIR}/rcc
+UIC?=			${QT_BINDIR}/uic
+QMAKE?=			${QT_BINDIR}/qmake
+# Needed to redefine the qmake target for internal Qt configuration.
+_QMAKE?=		${QMAKE}
+QMAKESPECNAME?=		freebsd-${QMAKE_COMPILER}
+QMAKESPEC?=		${QT_MKSPECDIR}/${QMAKESPECNAME}
+
+# The whole Qt distribution should be built with the same compiler, but it's
+# better to support custom settings. Dereferencing the detection allows to
+# avoid forking a shell on each inclusion of this file, and to catch any CXX
+# customization (via USE_GCC, etc.).
+QMAKE_COMPILER=	$$(ccver="$$(${CXX} --version)"; case "$$ccver" in *clang*) echo clang ;; *) echo g++ ;; esac)
+
+.  for dir in BIN INC LIB ARCH PLUGIN LIBEXEC IMPORT \
+	QML DATA DOC L10N ETC EXAMPLE TEST MKSPEC \
+	CMAKE QTCHOOSER
+QT_${dir}DIR=	${PREFIX}/${QT_${dir}DIR_REL}
+# Export all directories to the plist substituion for QT_DIST ports.
+# For the others, exclude QT_CMAKEDIR and QT_ETCDIR.
+.    if ${dir:NCMAKE} && ${dir:NETC}
+PLIST_SUB+=		QT_${dir}DIR="${QT_${dir}DIR_REL}"
+.    endif
+.  endfor
+
+# Pass the chosen Qt version to the environment for qtchooser.
+CONFIGURE_ENV+=		QT_SELECT=${_QT_RELNAME}
+MAKE_ENV+=		QT_SELECT=${_QT_RELNAME}
+
+# Make sure both the installed mkspecs as well as the ones being built are
+# found, with the ones from the port being built having preference.
+CONFIGURE_ENV+=		QMAKEMODULES="${WRKSRC}/mkspecs/modules:${LOCALBASE}/${QT_MKSPECDIR_REL}/modules"
+MAKE_ENV+=		QMAKEMODULES="${WRKSRC}/mkspecs/modules:${LOCALBASE}/${QT_MKSPECDIR_REL}/modules"
+
+_USES_POST+=		qt
+.endif # _QT_MK_INCLUDED
+
+# =============================================================================
+#
+# =============================================================================
+
+.if defined(_POSTMKINCLUDED) && !defined(_QT_MK_POST_INCLUDED)
+_QT_MK_POST_INCLUDED=	qt.mk
+
+# The Qt components supported by qt.mk: list of shared, and version specific ones
+_USE_QT_ALL=		assistant dbus declarative designer doc gui help \
+			imageformats l10n linguist linguisttools multimedia \
+			network opengl pixeltool qdbusviewer qmake script \
+			scripttools sql sql-ibase sql-mysql sql-odbc sql-pgsql \
+			sql-sqlite2 sql-sqlite3 svg testlib webkit \
+			xml xmlpatterns
+
+_USE_QT4_ONLY=		accessible assistant-adp assistantclient clucene codecs-cn codecs-jp \
+			codecs-kr codecs-tw corelib demo graphicssystems-opengl \
+			help-tools iconengines inputmethods makeqpf moc phonon \
+			phonon-gst porting qdoc3 qmlviewer qt3support qtconfig \
+			qtestlib qvfb rcc uic uic3 xmlpatterns-tool
+
+_USE_QT5_ONLY=		3d buildtools canvas3d charts concurrent connectivity \
+			core datavis3d diag examples gamepad \
+			graphicaleffects location paths phonon4 plugininfo printsupport \
+			qdbus qdoc qdoc-data qev qml quick quickcontrols \
+			quickcontrols2 scxml sensors serialbus serialport speech \
+			sql-tds uiplugin uitools virtualkeyboard wayland webchannel \
+			webengine websockets websockets-qml widgets x11extras
+
+# Dependency tuples: _LIB should be preferred if possible.
+3d_PORT=		graphics/${_QT_RELNAME}-3d
+3d_LIB=			libQt${_QT_LIBVER}3DCore.so
+
+accessible_PORT=	accessibility/${_QT_RELNAME}-accessible
+accessible_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/accessible/libqtaccessiblewidgets.so
+
+assistant_PORT=		devel/${_QT_RELNAME}-assistant
+assistant_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/assistant
+
+assistant-adp_PORT=	devel/${_QT_RELNAME}-assistant-adp
+assistant-adp_PATH=	assistant_adp
+
+assistantclient_PORT=	devel/${_QT_RELNAME}-libqtassistantclient
+assistantclient_LIB=	libQt${_QT_LIBVER}AssistantClient.so
+
+buildtools_PORT=	devel/${_QT_RELNAME}-buildtools
+buildtools_PATH=	${LOCALBASE}/${QT_BINDIR_REL}/moc
+
+canvas3d_PORT=		x11-toolkits/${_QT_RELNAME}-canvas3d
+canvas3d_PATH=		${LOCALBASE}/${QT_QMLDIR_REL}/QtCanvas3D/qmldir
+
+charts_PORT=		x11-toolkits/${_QT_RELNAME}-charts
+charts_LIB=		libQt${_QT_LIBVER}Charts.so
+
+clucene_PORT=		textproc/${_QT_RELNAME}-clucene
+clucene_LIB=		libQt${_QT_LIBVER}CLucene.so
+
+codecs-cn_PORT=		chinese/${_QT_RELNAME}-codecs-cn
+codecs-cn_PATH=		${LOCALBASE}/${QT_PLUGINDIR_REL}/codecs/libqcncodecs.so
+
+codecs-jp_PORT=		japanese/${_QT_RELNAME}-codecs-jp
+codecs-jp_PATH=		${LOCALBASE}/${QT_PLUGINDIR_REL}/codecs/libqjpcodecs.so
+
+codecs-kr_PORT=		korean/${_QT_RELNAME}-codecs-kr
+codecs-kr_PATH=		${LOCALBASE}/${QT_PLUGINDIR_REL}/codecs/libqkrcodecs.so
+
+codecs-tw_PORT=		chinese/${_QT_RELNAME}-codecs-tw
+codecs-tw_PATH=		${LOCALBASE}/${QT_PLUGINDIR_REL}/codecs/libqtwcodecs.so
+
+concurrent_PORT=	devel/${_QT_RELNAME}-concurrent
+concurrent_LIB=		libQt${_QT_LIBVER}Concurrent.so
+
+connectivity_PORT=	comms/${_QT_RELNAME}-connectivity
+connectivity_LIB=	libQt${_QT_LIBVER}Bluetooth.so
+
+core_PORT=		devel/${_QT_RELNAME}-core
+core_LIB=		libQt${_QT_LIBVER}Core.so
+
+corelib_PORT=		devel/${_QT_RELNAME}-corelib
+corelib_LIB=		${core_LIB}
+
+datavis3d_PORT=		x11-toolkits/${_QT_RELNAME}-datavis3d
+datavis3d_LIB=		libQt${_QT_LIBVER}DataVisualization.so
+
+dbus_PORT=		devel/${_QT_RELNAME}-dbus
+dbus_LIB=		libQt${_QT_LIBVER}DBus.so
+
+declarative_PORT=	x11-toolkits/${_QT_RELNAME}-declarative
+declarative_LIB=	libQt${_QT_LIBVER}Declarative.so
+
+demo_PORT=		misc/${_QT_RELNAME}-qtdemo
+demo_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qtdemo
+
+designer_PORT=		devel/${_QT_RELNAME}-designer
+designer_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/designer
+
+diag_PORT=		sysutils/${_QT_RELNAME}-qtdiag
+diag_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qtdiag
+
+doc_PORT=		misc/${_QT_RELNAME}-doc
+doc_PATH=		${_QT_RELNAME}-doc>=${_QT_VERSION:R:R}
+
+examples_PORT=		misc/${_QT_RELNAME}-examples
+examples_PATH=		${_QT_RELNAME}-examples>=${_QT_VERSION:R:R}
+
+gamepad_PORT=		x11-toolkits/${_QT_RELNAME}-gamepad
+gamepad_LIB=		libQt${_QT_LIBVER}Gamepad.so
+
+graphicaleffects_PORT=	graphics/${_QT_RELNAME}-graphicaleffects
+graphicaleffects_PATH=	${LOCALBASE}/${QT_QMLDIR_REL}/QtGraphicalEffects/qmldir
+
+graphicssystems-opengl_PORT=	x11/${_QT_RELNAME}-graphicssystems-opengl
+graphicssystems-opengl_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/graphicssystems/libqglgraphicssystem.so
+
+gui_PORT=		x11-toolkits/${_QT_RELNAME}-gui
+gui_LIB=		libQt${_QT_LIBVER}Gui.so
+
+help_PORT=		devel/${_QT_RELNAME}-help
+help_LIB=		libQt${_QT_LIBVER}Help.so
+
+help-tools_PORT=	devel/${_QT_RELNAME}-help-tools
+help-tools_PATH=	${LOCALBASE}/${QT_BINDIR_REL}/qhelpgenerator
+
+iconengines_PORT=	graphics/${_QT_RELNAME}-iconengines
+iconengines_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/iconengines/libqsvgicon.so
+
+imageformats_PORT=	graphics/${_QT_RELNAME}-imageformats
+imageformats_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/imageformats/libqtiff.so
+
+inputmethods_PORT=	x11/${_QT_RELNAME}-inputmethods
+inputmethods_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/inputmethods/libqimsw-multi.so
+
+linguist_PORT=		devel/${_QT_RELNAME}-linguist
+linguist_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/linguist
+
+linguisttools_PORT=	devel/${_QT_RELNAME}-linguisttools
+linguisttools_PATH=	${LOCALBASE}/${QT_BINDIR_REL}/lrelease
+
+location_PORT=		devel/${_QT_RELNAME}-location
+location_LIB=		libQt${_QT_LIBVER}Location.so
+
+l10n_PORT=		misc/${_QT_RELNAME}-l10n
+l10n_PATH=		${_QT_RELNAME}-l10n>=${_QT_VERSION:R:R}
+
+makeqpf_PORT=		devel/${_QT_RELNAME}-makeqpf
+makeqpf_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/makeqpf
+
+moc_PORT=		devel/${_QT_RELNAME}-moc
+moc_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/moc
+
+multimedia_PORT=	multimedia/${_QT_RELNAME}-multimedia
+multimedia_LIB=		libQt${_QT_LIBVER}Multimedia.so
+
+network_PORT=		net/${_QT_RELNAME}-network
+network_LIB=		libQt${_QT_LIBVER}Network.so
+
+opengl_PORT=		graphics/${_QT_RELNAME}-opengl
+opengl_LIB=		libQt${_QT_LIBVER}OpenGL.so
+
+paths_PORT=		sysutils/${_QT_RELNAME}-qtpaths
+paths_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qtpaths
+
+pixeltool_PORT=		graphics/${_QT_RELNAME}-pixeltool
+pixeltool_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/pixeltool
+
+phonon_PORT=		multimedia/phonon@${_QT_RELNAME}
+phonon_LIB=		libphonon.so
+
+phonon4_PORT=		multimedia/phonon@${_QT_RELNAME}
+phonon4_LIB=		libphonon4${_QT_RELNAME}.so
+
+phonon-gst_PORT=	multimedia/phonon-gstreamer@${_QT_RELNAME}
+phonon-gst_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/phonon_backend/libphonon_gstreamer.so
+
+plugininfo_PORT=	sysutils/${_QT_RELNAME}-qtplugininfo
+plugininfo_PATH=	${LOCALBASE}/${QT_BINDIR_REL}/qtplugininfo
+
+porting_PORT=		devel/${_QT_RELNAME}-porting
+porting_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qt3to4
+
+printsupport_PORT=	print/${_QT_RELNAME}-printsupport
+printsupport_LIB=	libQt${_QT_LIBVER}PrintSupport.so
+
+qdbus_PORT=		devel/${_QT_RELNAME}-qdbus
+qdbus_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qdbus
+
+qdbusviewer_PORT=	devel/${_QT_RELNAME}-qdbusviewer
+qdbusviewer_PATH=	${LOCALBASE}/${QT_BINDIR_REL}/qdbusviewer
+
+qdoc_PORT=		devel/${_QT_RELNAME}-qdoc
+qdoc_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qdoc
+
+qdoc-data_PORT=		devel/${_QT_RELNAME}-qdoc-data
+qdoc-data_PATH=		${LOCALBASE}/${QT_DOCDIR_REL}/global/config.qdocconf
+
+qdoc3_PORT=		devel/${_QT_RELNAME}-qdoc3
+qdoc3_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qdoc3
+
+qev_PORT=		x11/${_QT_RELNAME}-qev
+qev_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qev
+
+qmake_PORT=		devel/${_QT_RELNAME}-qmake
+qmake_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qmake
+
+qml_PORT=		lang/${_QT_RELNAME}-qml
+qml_LIB=		libQt${_QT_LIBVER}Qml.so
+
+qmlviewer_PORT=		devel/${_QT_RELNAME}-qmlviewer
+qmlviewer_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qmlviewer
+
+qt3support_PORT=	devel/${_QT_RELNAME}-qt3support
+qt3support_LIB=		libQt${_QT_LIBVER}3Support.so
+
+qtconfig_PORT=		misc/${_QT_RELNAME}-qtconfig
+qtconfig_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qtconfig
+
+qtestlib_PORT=		${testlib_PORT}
+qtestlib_LIB=		${testlib_LIB}
+
+quick_PORT=		x11-toolkits/${_QT_RELNAME}-quick
+quick_LIB=		libQt${_QT_LIBVER}Quick.so
+
+quickcontrols_PORT=	x11-toolkits/${_QT_RELNAME}-quickcontrols
+quickcontrols_PATH=	${LOCALBASE}/${QT_QMLDIR_REL}/QtQuick/Controls/qmldir
+
+quickcontrols2_PORT=	x11-toolkits/${_QT_RELNAME}-quickcontrols2
+quickcontrols2_LIB=	libQt${_QT_LIBVER}QuickControls2.so
+
+qvfb_PORT=		devel/${_QT_RELNAME}-qvfb
+qvfb_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qvfb
+
+rcc_PORT=		devel/${_QT_RELNAME}-rcc
+rcc_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/rcc
+
+sensors_PORT=		comms/${_QT_RELNAME}-sensors
+sensors_LIB=		libQt${_QT_LIBVER}Sensors.so
+
+script_PORT=		devel/${_QT_RELNAME}-script
+script_LIB=		libQt${_QT_LIBVER}Script.so
+
+scripttools_PORT=	devel/${_QT_RELNAME}-scripttools
+scripttools_LIB=	libQt${_QT_LIBVER}ScriptTools.so
+
+scxml_PORT=		devel/${_QT_RELNAME}-scxml
+scxml_LIB=		libQt${_QT_LIBVER}Scxml.so
+
+serialbus_PORT=		comms/${_QT_RELNAME}-serialbus
+serialbus_LIB=		libQt${_QT_LIBVER}SerialBus.so
+
+serialport_PORT=	comms/${_QT_RELNAME}-serialport
+serialport_LIB=		libQt${_QT_LIBVER}SerialPort.so
+
+speech_PORT=		accessibility/${_QT_RELNAME}-speech
+speech_LIB=		libQt${_QT_LIBVER}TextToSpeech.so
+
+sql_PORT=		databases/${_QT_RELNAME}-sql
+sql_LIB=		libQt${_QT_LIBVER}Sql.so
+
+sql-pgsql_PATH=		${LOCALBASE}/${QT_PLUGINDIR_REL}/sqldrivers/libqsqlpsql.so
+
+.  if ${_QT_VERSION:M4*}
+sql-sqlite2_PORT=	databases/${_QT_RELNAME}-sqlite-plugin
+.  endif
+
+sql-sqlite3_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/sqldrivers/libqsqlite.so
+
+.  for db in ibase mysql odbc pgsql sqlite2 sqlite3 tds
+.    if ${_QT_VERSION:M4*}
+sql-${db}_PORT?=	databases/${_QT_RELNAME}-${db}-plugin
+.    else
+sql-${db}_PORT?=	databases/${_QT_RELNAME}-sqldrivers-${db}
+.    endif
+sql-${db}_PATH?=	${LOCALBASE}/${QT_PLUGINDIR_REL}/sqldrivers/libqsql${db:C/^sql//}.so
+.  endfor
+
+svg_PORT=		graphics/${_QT_RELNAME}-svg
+svg_LIB=		libQt${_QT_LIBVER}Svg.so
+
+testlib_PORT=		devel/${_QT_RELNAME}-testlib
+testlib_LIB=		libQt${_QT_LIBVER}Test.so
+
+uic_PORT=		devel/${_QT_RELNAME}-uic
+uic_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/uic
+
+uic3_PORT=		devel/${_QT_RELNAME}-uic3
+uic3_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/uic3
+
+uiplugin_PORT=		x11-toolkits/${_QT_RELNAME}-uiplugin
+uiplugin_PATH=		${LOCALBASE}/${QT_INCDIR_REL}/QtUiPlugin/QtUiPlugin
+
+uitools_PORT=		devel/${_QT_RELNAME}-uitools
+uitools_PATH=		${LOCALBASE}/${QT_LIBDIR_REL}/libQt${_QT_LIBVER}UiTools.a
+
+virtualkeyboard_PORT=	x11-toolkits/${_QT_RELNAME}-virtualkeyboard
+virtualkeyboard_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/platforminputcontexts/libqtvirtualkeyboardplugin.so
+
+webchannel_PORT=	www/${_QT_RELNAME}-webchannel
+webchannel_LIB=		libQt${_QT_LIBVER}WebChannel.so
+
+webengine_PORT=		www/${_QT_RELNAME}-webengine
+webengine_LIB=		libQt${_QT_LIBVER}WebEngine.so
+
+websockets_PORT=	www/${_QT_RELNAME}-websockets
+websockets_LIB=		libQt${_QT_LIBVER}WebSockets.so
+
+websockets-qml_PORT=	www/${_QT_RELNAME}-websockets-qml
+websockets-qml_PATH=	${LOCALBASE}/${QT_QMLDIR_REL}/QtWebSockets/qmldir
+
+webkit_PORT=		www/${_QT_RELNAME}-webkit
+webkit_LIB=		libQt${_QT_LIBVER}WebKit.so
+
+widgets_PORT=		x11-toolkits/${_QT_RELNAME}-widgets
+widgets_LIB=		libQt${_QT_LIBVER}Widgets.so
+
+x11extras_PORT=		x11/${_QT_RELNAME}-x11extras
+x11extras_LIB=		libQt${_QT_LIBVER}X11Extras.so
+
+xml_PORT=		textproc/${_QT_RELNAME}-xml
+xml_LIB=		libQt${_QT_LIBVER}Xml.so
+
+xmlpatterns_PORT=	textproc/${_QT_RELNAME}-xmlpatterns
+xmlpatterns_LIB=	libQt${_QT_LIBVER}XmlPatterns.so
+
+xmlpatterns-tool_PORT=	textproc/${_QT_RELNAME}-xmlpatterns-tool
+xmlpatterns-tool_PATH=	${LOCALBASE}/${QT_BINDIR_REL}/xmlpatterns
+
+# Actually add the dependencies to the proper lists.
+_USE_QT_ALL+=		${_USE_QT${_QT_VER}_ONLY}
+_USE_QT=		${USE_QT}
+# Iterate through components deprived of suffix.
+.  for component in ${_USE_QT:O:u:C/_.+//}
+# Check that the component is valid.
+.    if ${_USE_QT_ALL:M${component}} != ""
+# Skip meta-components (currently none).
+.      if defined(${component}_PORT) && (defined(${component}_PATH) || defined(${component}_LIB))
+# Check if a dependency type is explicitly requested.
+.        if ${_USE_QT:M${component}_*} != "" && ${_USE_QT:M${component}} == ""
+${component}_TYPE=		# empty
+.          if ${_USE_QT:M${component}_build} != ""
+${component}_TYPE+=		build
+.          endif
+.          if ${_USE_QT:M${component}_run} != ""
+${component}_TYPE+=		run
+.          endif
+.        endif # ${_USE_QT:M${component}_*} != "" && ${_USE_QT:M${component}} == ""
+# If no dependency type is set, default to full dependency.
+.        if !defined(${component}_TYPE)
+${component}_TYPE=		build run
+.        endif
+# Set real dependencies.
+.        if defined(${component}_LIB) && ${${component}_TYPE:Mbuild} && ${${component}_TYPE:Mrun}
+LIB_DEPENDS+=			${${component}_LIB}:${${component}_PORT}
+.        else
+${component}_PATH?=		${QT_LIBDIR}/${${component}_LIB}
+${component}_DEPENDS=		${${component}_PATH}:${${component}_PORT}
+.          if ${${component}_TYPE:Mbuild} != ""
+BUILD_DEPENDS+=			${${component}_DEPENDS}
+.          endif
+.          if ${${component}_TYPE:Mrun} != ""
+RUN_DEPENDS+=			${${component}_DEPENDS}
+.          endif
+.        endif # ${${component}_LIB} && ${${component}_TYPE:Mbuild} && ${${component}_TYPE:Mrun}
+.      endif # defined(${component}_PORT) && defined(${component}_PATH)
+.    else # ! ${_USE_QT_ALL:M${component}} != ""
+IGNORE=				cannot be installed: unknown USE_QT component '${component}'
+.    endif # ${_USE_QT_ALL:M${component}} != ""
+.  endfor
+
+.endif # defined(_QT_MK_POST_INCLUDED)
diff --git Mk/bsd.port.mk Mk/bsd.port.mk
index 1c416d8a1521..4b857c044e2b 100644
--- Mk/bsd.port.mk
+++ Mk/bsd.port.mk
@@ -1408,10 +1408,6 @@ USE_APACHE:=	${USE_APACHE:S/common/server,/}
 USES+=	apache:${USE_APACHE:C/2([0-9])/2.\1/g}
 .endif
 
-.if defined(USE_QT4) || defined(USE_QT5)
-.include "${PORTSDIR}/Mk/bsd.qt.mk"
-.endif
-
 .if defined(USE_TEX)
 .include "${PORTSDIR}/Mk/bsd.tex.mk"
 .endif
@@ -1974,10 +1970,6 @@ _FORCE_POST_PATTERNS=	rmdir kldxref mkfontscale mkfontdir fc-cache \
 .include "${PORTSDIR}/Mk/bsd.ocaml.mk"
 .endif
 
-.if defined(USE_QT4) || defined(USE_QT5)
-.include "${PORTSDIR}/Mk/bsd.qt.mk"
-.endif
-
 .if defined(USE_SDL)
 .include "${PORTSDIR}/Mk/bsd.sdl.mk"
 .endif
diff --git Mk/bsd.qt.mk Mk/bsd.qt.mk
deleted file mode 100644
index ba80bb8d6b33..000000000000
--- Mk/bsd.qt.mk
+++ /dev/null
@@ -1,810 +0,0 @@
-#-*- tab-width: 4; -*-
-# ex:ts=4
-#
-# $FreeBSD$
-#
-# Port variables:
-# USE_QT*			- List of Qt modules to depend on, with optional '_build'
-#					  and '_run' suffixes. Define it empty to include this file
-#					  without depending on Qt ports.
-# QT_DIST			- The port belongs to the Qt distribution. Set to 'yes' for
-#					  Qt 4, or to the distribution name(s) for newer versions.
-# QT_NONSTANDARD	- Suppress modification of configure and make environment.
-#
-# Global switches (for inclusion into /etc/make.conf):
-# QT4_OPTIONS		- A list of (Qt 4-only) global options; can be CUPS, NAS
-#					  and/or QGTKSTYLE. If set, Qt will be built with support
-#					  for:
-#					   * Common UNIX Printing System (CUPS);
-#					   * Network Audio System (NAS);
-#					   * GTK+-based Qt theme (QGTKSTYLE).
-
-.if !defined(_POSTMKINCLUDED) && !defined(Qt_Pre_Include)
-
-Qt_Include_MAINTAINER=	kde@FreeBSD.org
-Qt_Pre_Include=	bsd.qt.mk
-
-# Qt versions currently supported by the framework.
-_QT_SUPPORTED?=	4 5
-QT4_VERSION?=	4.8.7
-QT5_VERSION?=	5.10.1
-
-_QT_RELNAME=	qt${_QT_VERSION:R:R}
-_QT_VERSION=	# empty
-.for ver in ${_QT_SUPPORTED}
-. if defined(USE_QT${ver})
-.  if empty(_QT_VERSION)
-_QT_VERSION=	${QT${ver}_VERSION}
-.  else
-# Reject different USE_QT*.
-IGNORE?=		can't be installed: different Qt versions specified via USE_QT[${_QT_SUPPORTED:S/ //g}] #'
-.  endif
-. endif
-.endfor
-
-.if empty(_QT_VERSION)
-# The file was included without USE_QT*.
-IGNORE?=		can't be installed: bsd.qt.mk may only be included via USE_QT[${_QT_SUPPORTED:S/ //g}] #'
-.endif
-
-.if defined(QT_DIST)
-QT_NONSTANDARD=	yes
-
-MASTER_SITES=	${MASTER_SITE_QT}
-DISTINFO_FILE?=	${.CURDIR:H:H}/devel/${_QT_RELNAME}/distinfo
-
-LICENSE?=		LGPL21
-
-. if !exists(${PKGDIR}/pkg-descr)
-DESCR?=			${.CURDIR:H:H}/devel/${_QT_RELNAME}/pkg-descr
-. endif
-
-# Stage support.
-DESTDIRNAME=	INSTALL_ROOT
-
-. if ${_QT_VERSION:M4*}
-MASTER_SITE_SUBDIR?=	official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/
-DISTNAME=		qt-everywhere-opensource-src-${_QT_VERSION}
-DIST_SUBDIR=		KDE
-. else
-MASTER_SITE_SUBDIR?=	official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules/
-# www/qt5-webengine hackery: The tarballs of 5.9.5 had a different naming scheme.
-.  if ${QT5_VERSION} == "5.9.5"
-DISTNAME=		${QT_DIST:S,^,qt,:S,$,-opensource-src-${DISTVERSION},}
-.  else
-DISTNAME=		${QT_DIST:S,^,qt,:S,$,-everywhere-src-${DISTVERSION},}
-.  endif
-DISTFILES=		${DISTNAME:S,$,${EXTRACT_SUFX},}
-DIST_SUBDIR=		KDE/Qt/${_QT_VERSION}
-
-USES+=			tar:xz
-
-# Qt (at least when used with qmake) has a tendency to overlink: some libraries
-# have dependencies on others in the mkspec configurations and the latter are
-# always passed to the linker even if they are not actually used. By passing
-# --as-needed to the linker by default when building the Qt ports we do not
-# have to declare a lot of unnecessary dependencies in USE_QT5.
-# This could arguably work for Qt4 too, but since it is maintenance mode it is
-# better not to fix what is not explicitly broken there.
-LDFLAGS+=		-Wl,--as-needed
-
-.  if ${.TARGETS:Mmakesum} || ${.TARGETS:Mfetch} && \
-	defined(DISABLE_SIZE) && defined(NO_CHECKSUM)
-# Ensure that the "makesum" target (with its inner "fetch" one) uses
-# devel/qt*/distinfo for every port.
-.		if ${DISTINFO_FILE:H} == ${.CURDIR:H:H}/devel/${_QT_RELNAME}
-QT_DIST=		3d activeqt androidextras base canvas3d charts connectivity \
-				datavis3d declarative doc gamepad graphicaleffects imageformats \
-				location macextras multimedia networkauth purchasing \
-				quickcontrols2 quickcontrols remoteobjects script scxml sensors \
-				serialbus serialport speech svg tools translations \
-				virtualkeyboard wayland webchannel websockets webview \
-				winextras x11extras xmlpatterns
-.		endif
-.  endif
-
-.  if ${QT_DIST} == "base" && ${PORTNAME} != "qmake"
-# Qt configure requires pkg-config to detect dependencies.
-USES+=			pkgconfig
-.  endif
-
-# -nomake is only used by qtbase's configure script.
-# Other ports from other Qt modules will automatically build examples and
-# tests if the directories exist because of mkspecs/features/qt_parts.prf.
-EXTRACT_AFTER_ARGS?=	${DISTNAME:S,$,/examples,:S,^,--exclude ,} \
-						${DISTNAME:S,$,/tests,:S,^,--exclude ,} \
-						--no-same-owner --no-same-permissions
-. endif # ! ${_QT_VERSION:M4*}
-
-CONFIGURE_ENV+=	MAKE="${MAKE:T}"
-
-CONFIGURE_ARGS+=-opensource -confirm-license \
-				-no-pch \
-				-prefix ${PREFIX} \
-				-bindir ${PREFIX}/${QT_BINDIR_REL} \
-				-headerdir ${PREFIX}/${QT_INCDIR_REL} \
-				-libdir ${PREFIX}/${QT_LIBDIR_REL} \
-				-plugindir ${PREFIX}/${QT_PLUGINDIR_REL} \
-				-importdir ${PREFIX}/${QT_IMPORTDIR_REL} \
-				-datadir ${PREFIX}/${QT_DATADIR_REL} \
-				-docdir ${PREFIX}/${QT_DOCDIR_REL} \
-				-translationdir ${PREFIX}/${QT_L10NDIR_REL} \
-				-sysconfdir ${PREFIX}/${QT_ETCDIR_REL}
-
-. if ${_QT_VERSION:M4*}
-CONFIGURE_ARGS+=-fast \
-				-platform ${QMAKESPEC} \
-				-system-libjpeg -system-libpng \
-				-system-libmng -system-libtiff -system-zlib \
-				-no-phonon-backend \
-				-examplesdir ${PREFIX}/${QT_EXAMPLEDIR_REL}/examples \
-				-demosdir ${PREFIX}/${QT_EXAMPLEDIR_REL}/demos
-. else
-CONFIGURE_ARGS+=-nomake examples -nomake tests \
-				-platform ${QMAKESPECNAME} \
-				-archdatadir ${PREFIX}/${QT_ARCHDIR_REL} \
-				-libexecdir ${PREFIX}/${QT_LIBEXECDIR_REL} \
-				-qmldir ${PREFIX}/${QT_QMLDIR_REL} \
-				-examplesdir ${PREFIX}/${QT_EXAMPLEDIR_REL} \
-				-testsdir ${PREFIX}/${QT_TESTDIR_REL}
-.  if ${ARCH} == i386 && empty(MACHINE_CPU:Msse2)
-CONFIGURE_ARGS+=-no-sse2
-.  endif
-# Work around a bug in current binutils, where the gold linker creates
-# duplicate symbols. See pr 218187. Disable the gold-linker for Qt5 ports.
-CONFIGURE_ARGS+=	-no-use-gold-linker
-# Pass -recheck-all so that multiple calls to the configure script really
-# re-run all checks.
-CONFIGURE_ARGS+=	-recheck-all
-. endif
-
-. if defined(WANT_QT_DEBUG) || defined(WITH_DEBUG)
-WITH_DEBUG=		yes
-STRIP=			# It's done prior to bsd.qt.mk inclusion.
-CONFIGURE_ARGS+=-debug -separate-debug-info
-# Override configuration in global qconfig.pri.
-QMAKE_ARGS+=	QT_CONFIG+="debug separate_debug_info" \
-				QT_CONFIG-="release"
-PLIST_SUB+=		DEBUG=""
-. else
-CONFIGURE_ARGS+=-release -no-separate-debug-info
-QMAKE_ARGS+=	QT_CONFIG+="release" \
-				QT_CONFIG-="debug separate_debug_info"
-PLIST_SUB+=		DEBUG="@comment "
-. endif
-
-. if defined(WANT_QT_VERBOSE_CONFIGURE)
-CONFIGURE_ARGS+=-verbose
-. endif
-
-. if ${QT_DIST} == "base" || ${_QT_VERSION:M4*}
-.  if ${_QT_VERSION:M4*}
-_EXTRA_PATCHES_QT4=	${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-src-corelib-global-qglobal.h \
-					${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-libtool \
-					${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-config.tests-unix-compile.test
-# Patch in proper name for armv6 architecture: https://gcc.gnu.org/ml/gcc-patches/2015-06/msg01679.html
-_EXTRA_PATCHES_QT4+=	${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-armv6
-_EXTRA_PATCHES_QT4+=	${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-aarch64
-.  else
-_EXTRA_PATCHES_QT5=	${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_features_create__cmake.prf \
-					${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_features_qt__module.prf \
-					${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_common_bsd_bsd.conf
-.  endif
-EXTRA_PATCHES?=	${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-configure \
-		${_EXTRA_PATCHES_QT4} ${_EXTRA_PATCHES_QT5}
-. endif
-
-# Override settings installed in qconfig.h and *.pri files. The flags will be
-# installed along with the port, but have to be passed as arguments while
-# building the port itself. Flags prefixed with "-" (e.g., "-CUPS" and "-cups")
-# are needed to disable some features.
-. if !defined(${QT_MODNAME}) || empty(${QT_MODNAME})
-# Used for both qconfig-*.h and qt_config_*.pri; it can't be empty.
-QT_MODNAME=		${PORTNAME}
-. endif
-QT_DEFINES?=	# For qconfig.h flags (without "QT_" prefix).
-QT_CONFIG?=		# For *.pri files QT_CONFIG flags.
-. if ${QT_DEFINES}
-QMAKE_ARGS+=	DEFINES+="${QT_DEFINES:O:u:C/^([^-])/QT_\1/:C/^-/QT_NO_/:O}"
-.  if ${QT_DEFINES:N-*}
-# Use a script to cleanup qconfig-modules.h (see qt-post-install).
-PKGDEINSTALL=	${WRKDIR}/pkg-deinstall
-.  endif
-. endif
-. if ${QT_CONFIG:N-*}
-QMAKE_ARGS+=	QT_CONFIG+="${QT_CONFIG:N-*:O:u}"
-. endif
-. if ${QT_CONFIG:M-*}
-QMAKE_ARGS+=	QT_CONFIG-="${QT_CONFIG:M-*:O:u:C/^-//}"
-. endif
-
-# Add a RUN_DEPENDS on misc/qtchooser to select the binaries.
-# The binaries of both supported Qt versions are installed to
-# ${LOCALBASE}/lib/qt[45]/bin. The port misc/qtchooser installs
-# wrapper binaries into ${LOCALBASE}/bin, and chooses the correct
-# one depending on the value of QT_SELECT (which we pass to both
-# CONFIGURE_ENV and MAKE_ENV). Therefore make all QT_DIST ports
-# RUN_DEPEND on it.
-RUN_DEPENDS+=	qtchooser:misc/qtchooser
-
-PLIST_SUB+=		SHORTVER=${DISTVERSION:R} \
-				FULLVER=${DISTVERSION:C/-.*//}
-.endif # defined(QT_DIST)
-
-# A wrapper (qtchooser) is used to invoke binaries.
-QT_BINDIR_REL?=	${QT_ARCHDIR_REL}/bin
-QT_INCDIR_REL?=	include/${_QT_RELNAME}
-QT_LIBDIR_REL?=	lib/${_QT_RELNAME}
-QT_ARCHDIR_REL?=${QT_LIBDIR_REL}
-QT_PLUGINDIR_REL?=	${QT_ARCHDIR_REL}/plugins
-QT_LIBEXECDIR_REL?=	libexec/${_QT_RELNAME}
-QT_IMPORTDIR_REL?=	${QT_ARCHDIR_REL}/imports
-QT_QMLDIR_REL?=	${QT_ARCHDIR_REL}/qml
-QT_DATADIR_REL?=share/${_QT_RELNAME}
-QT_DOCDIR_REL?=	share/doc/${_QT_RELNAME}
-QT_L10NDIR_REL?=${QT_DATADIR_REL}/translations
-QT_ETCDIR_REL?=	etc/xdg
-QT_EXAMPLEDIR_REL?=	share/examples/${_QT_RELNAME}
-QT_TESTDIR_REL?=${QT_DATADIR_REL}/tests
-QT_CMAKEDIR_REL?=	lib/cmake
-QT_QTCHOOSERDIR_REL?=	${QT_ETCDIR_REL}/qtchooser
-
-# Not customizable.
-.if ${_QT_VERSION:M4*}
-QT_MKSPECDIR_REL=	${QT_DATADIR_REL}/mkspecs
-
-_QT_LIBVER=		# empty
-.else
-QT_MKSPECDIR_REL=	${QT_ARCHDIR_REL}/mkspecs
-
-_QT_LIBVER=		${_QT_VERSION:R:R}
-.endif
-
-LRELEASE?=		${QT_BINDIR}/lrelease
-LUPDATE?=		${QT_BINDIR}/lupdate
-MOC?=			${QT_BINDIR}/moc
-RCC?=			${QT_BINDIR}/rcc
-UIC?=			${QT_BINDIR}/uic
-QMAKE?=			${QT_BINDIR}/qmake
-# Needed to redefine the qmake target for internal Qt configuration.
-_QMAKE?=		${QMAKE}
-QMAKESPECNAME?=	freebsd-${QMAKE_COMPILER}
-QMAKESPEC?=		${QT_MKSPECDIR}/${QMAKESPECNAME}
-
-# The whole Qt distribution should be built with the same compiler, but it's
-# better to support custom settings. Dereferencing the detection allows to
-# avoid forking a shell on each inclusion of this file, and to catch any CXX
-# customization (via USE_GCC, etc.).
-QMAKE_COMPILER=	$$(ccver="$$(${CXX} --version)"; case "$$ccver" in *clang*) echo clang ;; *) echo g++ ;; esac)
-
-# Import QMAKE_ENV and QMAKE_ARGS definitions.
-USES+=			qmake:_env
-
-.for dir in BIN INC LIB ARCH PLUGIN LIBEXEC IMPORT \
-	QML DATA DOC L10N ETC EXAMPLE TEST MKSPEC \
-	CMAKE QTCHOOSER
-QT_${dir}DIR=	${PREFIX}/${QT_${dir}DIR_REL}
-# Export all directories to the plist substituion for QT_DIST ports.
-# For the others, exclude QT_CMAKEDIR and QT_ETCDIR.
-.  if (${dir:NCMAKE} && ${dir:NETC}) || defined(QT_DIST)
-PLIST_SUB+=		QT_${dir}DIR="${QT_${dir}DIR_REL}"
-.  endif
-.endfor
-
-# Pass the chosen Qt version to the environment for qtchooser.
-CONFIGURE_ENV+=	QT_SELECT=${_QT_RELNAME}
-MAKE_ENV+=	QT_SELECT=${_QT_RELNAME}
-
-# Make sure both the installed mkspecs as well as the ones being built are
-# found, with the ones from the port being built having preference.
-CONFIGURE_ENV+=	QMAKEMODULES="${WRKSRC}/mkspecs/modules:${LOCALBASE}/${QT_MKSPECDIR_REL}/modules"
-MAKE_ENV+=		QMAKEMODULES="${WRKSRC}/mkspecs/modules:${LOCALBASE}/${QT_MKSPECDIR_REL}/modules"
-
-.endif # !defined(_POSTMKINCLUDED) && !defined(Qt_Pre_Include)
-
-.if defined(_POSTMKINCLUDED) && !defined(Qt_Post_Include)
-
-Qt_Post_Include=	bsd.qt.mk
-
-.if !defined(QT_NONSTANDARD)
-CONFIGURE_ENV+=	QTDIR="${QT_ARCHDIR}" QMAKE="${QMAKE}" \
-				MOC="${MOC}" RCC="${RCC}" UIC="${UIC}" \
-				QMAKESPEC="${QMAKESPEC}"
-CONFIGURE_ARGS+=--with-qt-includes=${QT_INCDIR} \
-				--with-qt-libraries=${QT_LIBDIR} \
-				--with-extra-includes=${LOCALBASE}/include \
-				--with-extra-libs=${LOCALBASE}/lib
-.endif # !defined(QT_NONSTANDARD)
-
-_USE_QT_ALL=	assistant dbus declarative designer doc gui help \
-				imageformats l10n linguist linguisttools multimedia \
-				network opengl pixeltool qdbusviewer qmake script \
-				scripttools sql sql-mysql sql-odbc sql-pgsql \
-				sql-sqlite2 sql-sqlite3 svg testlib webkit \
-				xml xmlpatterns
-.if ${ARCH} == amd64 || ${ARCH} == i386
-_USE_QT_ALL+=	sql-ibase
-.endif
-
-_USE_QT4_ONLY=	accessible assistant-adp assistantclient clucene codecs-cn codecs-jp \
-				codecs-kr codecs-tw corelib demo graphicssystems-opengl \
-				help-tools iconengines inputmethods makeqpf moc phonon \
-				phonon-gst porting qdoc3 qmlviewer qt3support qtconfig \
-				qtestlib qvfb rcc uic uic3 xmlpatterns-tool
-
-_USE_QT5_ONLY=	3d buildtools canvas3d charts concurrent connectivity \
-				core datavis3d diag examples gamepad \
-				graphicaleffects location paths phonon4 plugininfo printsupport \
-				qdbus qdoc qdoc-data qev qml quick quickcontrols \
-				quickcontrols2 scxml sensors serialbus serialport speech \
-				sql-tds uiplugin uitools virtualkeyboard wayland webchannel \
-				webengine websockets websockets-qml widgets x11extras
-
-3d_PORT=		graphics/${_QT_RELNAME}-3d
-3d_LIB=		libQt${_QT_LIBVER}3DCore.so
-
-accessible_PORT=	accessibility/${_QT_RELNAME}-accessible
-accessible_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/accessible/libqtaccessiblewidgets.so
-
-assistant_PORT=		devel/${_QT_RELNAME}-assistant
-assistant_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/assistant
-
-assistant-adp_PORT=	devel/${_QT_RELNAME}-assistant-adp
-assistant-adp_PATH=	assistant_adp
-
-assistantclient_PORT=	devel/${_QT_RELNAME}-libqtassistantclient
-assistantclient_LIB=	libQt${_QT_LIBVER}AssistantClient.so
-
-buildtools_PORT=	devel/${_QT_RELNAME}-buildtools
-buildtools_PATH=	${LOCALBASE}/${QT_BINDIR_REL}/moc
-
-canvas3d_PORT=		x11-toolkits/${_QT_RELNAME}-canvas3d
-canvas3d_PATH=		${LOCALBASE}/${QT_QMLDIR_REL}/QtCanvas3D/qmldir
-
-charts_PORT=		x11-toolkits/${_QT_RELNAME}-charts
-charts_LIB=		libQt${_QT_LIBVER}Charts.so
-
-clucene_PORT=		textproc/${_QT_RELNAME}-clucene
-clucene_LIB=		libQt${_QT_LIBVER}CLucene.so
-
-codecs-cn_PORT=		chinese/${_QT_RELNAME}-codecs-cn
-codecs-cn_PATH=		${LOCALBASE}/${QT_PLUGINDIR_REL}/codecs/libqcncodecs.so
-
-codecs-jp_PORT=		japanese/${_QT_RELNAME}-codecs-jp
-codecs-jp_PATH=		${LOCALBASE}/${QT_PLUGINDIR_REL}/codecs/libqjpcodecs.so
-
-codecs-kr_PORT=		korean/${_QT_RELNAME}-codecs-kr
-codecs-kr_PATH=		${LOCALBASE}/${QT_PLUGINDIR_REL}/codecs/libqkrcodecs.so
-
-codecs-tw_PORT=		chinese/${_QT_RELNAME}-codecs-tw
-codecs-tw_PATH=		${LOCALBASE}/${QT_PLUGINDIR_REL}/codecs/libqtwcodecs.so
-
-concurrent_PORT=	devel/${_QT_RELNAME}-concurrent
-concurrent_LIB=	libQt${_QT_LIBVER}Concurrent.so
-
-connectivity_PORT=	comms/${_QT_RELNAME}-connectivity
-connectivity_LIB=	libQt${_QT_LIBVER}Bluetooth.so
-
-core_PORT=			devel/${_QT_RELNAME}-core
-core_LIB=			libQt${_QT_LIBVER}Core.so
-
-corelib_PORT=		devel/${_QT_RELNAME}-corelib
-corelib_LIB=		${core_LIB}
-
-datavis3d_PORT=		x11-toolkits/${_QT_RELNAME}-datavis3d
-datavis3d_LIB=		libQt${_QT_LIBVER}DataVisualization.so
-
-dbus_PORT=			devel/${_QT_RELNAME}-dbus
-dbus_LIB=			libQt${_QT_LIBVER}DBus.so
-
-declarative_PORT=	x11-toolkits/${_QT_RELNAME}-declarative
-declarative_LIB=	libQt${_QT_LIBVER}Declarative.so
-
-demo_PORT=			misc/${_QT_RELNAME}-qtdemo
-demo_PATH=			${LOCALBASE}/${QT_BINDIR_REL}/qtdemo
-
-designer_PORT=		devel/${_QT_RELNAME}-designer
-designer_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/designer
-
-diag_PORT=		sysutils/${_QT_RELNAME}-qtdiag
-diag_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qtdiag
-
-doc_PORT=			misc/${_QT_RELNAME}-doc
-doc_PATH=			${_QT_RELNAME}-doc>=${_QT_VERSION:R:R}
-
-examples_PORT=		misc/${_QT_RELNAME}-examples
-examples_PATH=		${_QT_RELNAME}-examples>=${_QT_VERSION:R:R}
-
-gamepad_PORT=		x11-toolkits/${_QT_RELNAME}-gamepad
-gamepad_LIB=		libQt${_QT_LIBVER}Gamepad.so
-
-graphicaleffects_PORT=	graphics/${_QT_RELNAME}-graphicaleffects
-graphicaleffects_PATH=	${LOCALBASE}/${QT_QMLDIR_REL}/QtGraphicalEffects/qmldir
-
-graphicssystems-opengl_PORT=	x11/${_QT_RELNAME}-graphicssystems-opengl
-graphicssystems-opengl_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/graphicssystems/libqglgraphicssystem.so
-
-gui_PORT=			x11-toolkits/${_QT_RELNAME}-gui
-gui_LIB=			libQt${_QT_LIBVER}Gui.so
-
-help_PORT=			devel/${_QT_RELNAME}-help
-help_LIB=			libQt${_QT_LIBVER}Help.so
-
-help-tools_PORT=	devel/${_QT_RELNAME}-help-tools
-help-tools_PATH=	${LOCALBASE}/${QT_BINDIR_REL}/qhelpgenerator
-
-iconengines_PORT=	graphics/${_QT_RELNAME}-iconengines
-iconengines_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/iconengines/libqsvgicon.so
-
-imageformats_PORT=	graphics/${_QT_RELNAME}-imageformats
-imageformats_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/imageformats/libqtiff.so
-
-inputmethods_PORT=	x11/${_QT_RELNAME}-inputmethods
-inputmethods_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/inputmethods/libqimsw-multi.so
-
-linguist_PORT=		devel/${_QT_RELNAME}-linguist
-linguist_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/linguist
-
-linguisttools_PORT=	devel/${_QT_RELNAME}-linguisttools
-linguisttools_PATH=	${LOCALBASE}/${QT_BINDIR_REL}/lrelease
-
-location_PORT=		devel/${_QT_RELNAME}-location
-location_LIB=		libQt${_QT_LIBVER}Location.so
-
-l10n_PORT=			misc/${_QT_RELNAME}-l10n
-l10n_PATH=			${_QT_RELNAME}-l10n>=${_QT_VERSION:R:R}
-
-makeqpf_PORT=		devel/${_QT_RELNAME}-makeqpf
-makeqpf_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/makeqpf
-
-moc_PORT=			devel/${_QT_RELNAME}-moc
-moc_PATH=			${LOCALBASE}/${QT_BINDIR_REL}/moc
-
-multimedia_PORT=	multimedia/${_QT_RELNAME}-multimedia
-multimedia_LIB=		libQt${_QT_LIBVER}Multimedia.so
-
-network_PORT=		net/${_QT_RELNAME}-network
-network_LIB=		libQt${_QT_LIBVER}Network.so
-
-opengl_PORT=		graphics/${_QT_RELNAME}-opengl
-opengl_LIB=		libQt${_QT_LIBVER}OpenGL.so
-
-paths_PORT=		sysutils/${_QT_RELNAME}-qtpaths
-paths_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qtpaths
-
-pixeltool_PORT=		graphics/${_QT_RELNAME}-pixeltool
-pixeltool_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/pixeltool
-
-phonon_PORT=		multimedia/phonon
-phonon_LIB=		libphonon.so
-
-phonon4_PORT=		multimedia/phonon@${_QT_RELNAME}
-phonon4_LIB=		libphonon4${_QT_RELNAME}.so
-
-phonon-gst_PORT=	multimedia/phonon-gstreamer
-phonon-gst_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/phonon_backend/libphonon_gstreamer.so
-
-plugininfo_PORT=		sysutils/${_QT_RELNAME}-qtplugininfo
-plugininfo_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qtplugininfo
-
-porting_PORT=		devel/${_QT_RELNAME}-porting
-porting_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qt3to4
-
-printsupport_PORT=	print/${_QT_RELNAME}-printsupport
-printsupport_LIB=	libQt${_QT_LIBVER}PrintSupport.so
-
-qdbus_PORT=			devel/${_QT_RELNAME}-qdbus
-qdbus_PATH=			${LOCALBASE}/${QT_BINDIR_REL}/qdbus
-
-qdbusviewer_PORT=	devel/${_QT_RELNAME}-qdbusviewer
-qdbusviewer_PATH=	${LOCALBASE}/${QT_BINDIR_REL}/qdbusviewer
-
-qdoc_PORT=			devel/${_QT_RELNAME}-qdoc
-qdoc_PATH=			${LOCALBASE}/${QT_BINDIR_REL}/qdoc
-
-qdoc-data_PORT=		devel/${_QT_RELNAME}-qdoc-data
-qdoc-data_PATH=		${LOCALBASE}/${QT_DOCDIR_REL}/global/config.qdocconf
-
-qdoc3_PORT=			devel/${_QT_RELNAME}-qdoc3
-qdoc3_PATH=			${LOCALBASE}/${QT_BINDIR_REL}/qdoc3
-
-qev_PORT=			x11/${_QT_RELNAME}-qev
-qev_PATH=			${LOCALBASE}/${QT_BINDIR_REL}/qev
-
-qmake_PORT=			devel/${_QT_RELNAME}-qmake
-qmake_PATH=			${LOCALBASE}/${QT_BINDIR_REL}/qmake
-
-qml_PORT=			lang/${_QT_RELNAME}-qml
-qml_LIB=			libQt${_QT_LIBVER}Qml.so
-
-qmlviewer_PORT=		devel/${_QT_RELNAME}-qmlviewer
-qmlviewer_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qmlviewer
-
-qt3support_PORT=	devel/${_QT_RELNAME}-qt3support
-qt3support_LIB=		libQt${_QT_LIBVER}3Support.so
-
-qtconfig_PORT=		misc/${_QT_RELNAME}-qtconfig
-qtconfig_PATH=		${LOCALBASE}/${QT_BINDIR_REL}/qtconfig
-
-qtestlib_PORT=		${testlib_PORT}
-qtestlib_LIB=		${testlib_LIB}
-
-quick_PORT=			x11-toolkits/${_QT_RELNAME}-quick
-quick_LIB=			libQt${_QT_LIBVER}Quick.so
-
-quickcontrols_PORT=	x11-toolkits/${_QT_RELNAME}-quickcontrols
-quickcontrols_PATH=	${LOCALBASE}/${QT_QMLDIR_REL}/QtQuick/Controls/qmldir
-
-quickcontrols2_PORT=	x11-toolkits/${_QT_RELNAME}-quickcontrols2
-quickcontrols2_LIB=	libQt${_QT_LIBVER}QuickControls2.so
-
-qvfb_PORT=			devel/${_QT_RELNAME}-qvfb
-qvfb_PATH=			${LOCALBASE}/${QT_BINDIR_REL}/qvfb
-
-rcc_PORT=			devel/${_QT_RELNAME}-rcc
-rcc_PATH=			${LOCALBASE}/${QT_BINDIR_REL}/rcc
-
-sensors_PORT=		comms/${_QT_RELNAME}-sensors
-sensors_LIB=		libQt${_QT_LIBVER}Sensors.so
-
-script_PORT=		devel/${_QT_RELNAME}-script
-script_LIB=		libQt${_QT_LIBVER}Script.so
-
-scripttools_PORT=	devel/${_QT_RELNAME}-scripttools
-scripttools_LIB=	libQt${_QT_LIBVER}ScriptTools.so
-
-scxml_PORT=		devel/${_QT_RELNAME}-scxml
-scxml_LIB=		libQt${_QT_LIBVER}Scxml.so
-
-serialbus_PORT=		comms/${_QT_RELNAME}-serialbus
-serialbus_LIB=		libQt${_QT_LIBVER}SerialBus.so
-
-serialport_PORT=	comms/${_QT_RELNAME}-serialport
-serialport_LIB=	libQt${_QT_LIBVER}SerialPort.so
-
-speech_PORT=		accessibility/${_QT_RELNAME}-speech
-speech_LIB=			libQt${_QT_LIBVER}TextToSpeech.so
-
-sql_PORT=			databases/${_QT_RELNAME}-sql
-sql_LIB=			libQt${_QT_LIBVER}Sql.so
-
-sql-pgsql_PATH=		${LOCALBASE}/${QT_PLUGINDIR_REL}/sqldrivers/libqsqlpsql.so
-
-.  if ${_QT_VERSION:M4*}
-sql-sqlite2_PORT=	databases/${_QT_RELNAME}-sqlite-plugin
-.  endif
-
-sql-sqlite3_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/sqldrivers/libqsqlite.so
-
-.  for db in ibase mysql odbc pgsql sqlite2 sqlite3 tds
-.    if ${_QT_VERSION:M4*}
-sql-${db}_PORT?=	databases/${_QT_RELNAME}-${db}-plugin
-.    else
-sql-${db}_PORT?=	databases/${_QT_RELNAME}-sqldrivers-${db}
-.    endif
-sql-${db}_PATH?=	${LOCALBASE}/${QT_PLUGINDIR_REL}/sqldrivers/libqsql${db:C/^sql//}.so
-.  endfor
-
-svg_PORT=			graphics/${_QT_RELNAME}-svg
-svg_LIB=			libQt${_QT_LIBVER}Svg.so
-
-testlib_PORT=		devel/${_QT_RELNAME}-testlib
-testlib_LIB=		libQt${_QT_LIBVER}Test.so
-
-uic_PORT=			devel/${_QT_RELNAME}-uic
-uic_PATH=			${LOCALBASE}/${QT_BINDIR_REL}/uic
-
-uic3_PORT=			devel/${_QT_RELNAME}-uic3
-uic3_PATH=			${LOCALBASE}/${QT_BINDIR_REL}/uic3
-
-uiplugin_PORT=		x11-toolkits/${_QT_RELNAME}-uiplugin
-uiplugin_PATH=		${LOCALBASE}/${QT_INCDIR_REL}/QtUiPlugin/QtUiPlugin
-
-uitools_PORT=		devel/${_QT_RELNAME}-uitools
-uitools_PATH=		${LOCALBASE}/${QT_LIBDIR_REL}/libQt${_QT_LIBVER}UiTools.a
-
-virtualkeyboard_PORT=	x11-toolkits/${_QT_RELNAME}-virtualkeyboard
-virtualkeyboard_PATH=	${LOCALBASE}/${QT_PLUGINDIR_REL}/platforminputcontexts/libqtvirtualkeyboardplugin.so
-
-webchannel_PORT=	www/${_QT_RELNAME}-webchannel
-webchannel_LIB=	libQt${_QT_LIBVER}WebChannel.so
-
-webengine_PORT=		www/${_QT_RELNAME}-webengine
-webengine_LIB=	libQt${_QT_LIBVER}WebEngine.so
-
-websockets_PORT=	www/${_QT_RELNAME}-websockets
-websockets_LIB=	libQt${_QT_LIBVER}WebSockets.so
-
-websockets-qml_PORT=	www/${_QT_RELNAME}-websockets-qml
-websockets-qml_PATH=	${LOCALBASE}/${QT_QMLDIR_REL}/QtWebSockets/qmldir
-
-webkit_PORT=		www/${_QT_RELNAME}-webkit
-webkit_LIB=	libQt${_QT_LIBVER}WebKit.so
-
-widgets_PORT=		x11-toolkits/${_QT_RELNAME}-widgets
-widgets_LIB=		libQt${_QT_LIBVER}Widgets.so
-
-x11extras_PORT=		x11/${_QT_RELNAME}-x11extras
-x11extras_LIB=		libQt${_QT_LIBVER}X11Extras.so
-
-xml_PORT=			textproc/${_QT_RELNAME}-xml
-xml_LIB=			libQt${_QT_LIBVER}Xml.so
-
-xmlpatterns_PORT=	textproc/${_QT_RELNAME}-xmlpatterns
-xmlpatterns_LIB=	libQt${_QT_LIBVER}XmlPatterns.so
-
-xmlpatterns-tool_PORT=	textproc/${_QT_RELNAME}-xmlpatterns-tool
-xmlpatterns-tool_PATH=	${LOCALBASE}/${QT_BINDIR_REL}/xmlpatterns
-
-_USE_QT=		${USE_QT${_QT_VERSION:R:R}}
-_USE_QT_ALL+=		${_USE_QT${_QT_VERSION:R:R}_ONLY}
-# Iterate through components deprived of suffix.
-.  for component in ${_USE_QT:O:u:C/_.+//}
-  # Check that the component is valid.
-.    if ${_USE_QT_ALL:M${component}} != ""
-   # Skip meta-components (currently none).
-.      if defined(${component}_PORT) && (defined(${component}_PATH) || defined(${component}_LIB))
-    # Check if a dependency type is explicitly requested.
-.        if ${_USE_QT:M${component}_*} != "" && ${_USE_QT:M${component}} == ""
-${component}_TYPE=		# empty
-.          if ${_USE_QT:M${component}_build} != ""
-${component}_TYPE+=		build
-.          endif
-.          if ${_USE_QT:M${component}_run} != ""
-${component}_TYPE+=		run
-.          endif
-.        endif # ${_USE_QT:M${component}_*} != "" && ${_USE_QT:M${component}} == ""
-    # If no dependency type is set, default to full dependency.
-.        if !defined(${component}_TYPE)
-${component}_TYPE=		build run
-.        endif
-    # Set real dependencies.
-.        if defined(${component}_LIB) && ${${component}_TYPE:Mbuild} && ${${component}_TYPE:Mrun}
-LIB_DEPENDS+=			${${component}_LIB}:${${component}_PORT}
-.        else
-${component}_PATH?=		${QT_LIBDIR}/${${component}_LIB}
-${component}_DEPENDS=		${${component}_PATH}:${${component}_PORT}
-.          if ${${component}_TYPE:Mbuild} != ""
-BUILD_DEPENDS+=			${${component}_DEPENDS}
-.          endif
-.          if ${${component}_TYPE:Mrun} != ""
-RUN_DEPENDS+=			${${component}_DEPENDS}
-.          endif
-.        endif # ${${component}_LIB} && ${${component}_TYPE:Mbuild} && ${${component}_TYPE:Mrun}
-.      endif # defined(${component}_PORT) && defined(${component}_PATH)
-.    else # ! ${_USE_QT_ALL:M${component}} != ""
-IGNORE=				cannot be installed: unknown USE_QT component '${component}'
-.    endif # ${_USE_QT_ALL:M${component}} != ""
-.  endfor
-
-.if defined(QT_DIST) && ! ${_QT_VERSION:M4*}
-. if ${QT_DIST} == "base"
-# qtbase requires some tools to be symlinked to the build directory.
-_QT_TOOLS=		# empty
-.  if ${PORTNAME} != "qmake"
-_QT_TOOLS+=		${QMAKE}
-.  endif
-.  if ${PORTNAME} != "buildtools"
-_QT_TOOLS+=		${MOC} ${RCC}
-.  endif
-.  if ${PORTNAME} != "qdoc"
-_QT_TOOLS+=		qdoc
-.  endif
-.  if ${PORTNAME} != "dbus"
-_QT_TOOLS+=		qdbuscpp2xml qdbusxml2cpp
-.  endif
-.  if ${PORTNAME} != "widgets"
-_QT_TOOLS+=		${UIC}
-.  endif
-
-# The list of QtBase components that need to be linked into WRKSRC/lib for
-# other QtBase ports. See below.
-_QT5_BASE=			core dbus gui network sql widgets
-
-pre-configure: qtbase-pre-configure
-qtbase-pre-configure:
-.  for tool in ${_QT_TOOLS}
-	@${TEST} -e ${QT_BINDIR}/${tool:T} && \
-		${LN} -sf ${QT_BINDIR}/${tool:T} ${CONFIGURE_WRKSRC}/bin/${tool:T} || \
-		${TRUE}
-.  endfor
-
-# The following is a fix for the inplace upgrade problem we faced (see
-# QTBUG-40825 and ports bugs 194088, 195105 and 198720) previously,
-# which previously was adressed by making sure, that ${LOCALBASE}/lib, which
-# would often gets added by pkgconf for the dependencies, was passed after
-# ${WRKSRC}/lib.
-# * We fix the inplace upgrade problem by moving the Qt5 libraries into
-#   ${LOCALBASE}/lib/qt5. Therefore a -L${LOCALBASE}/lib does no harm anymore.
-# * However, this means, that the ports belonging to the split up QtBase package
-#   now no longer can find their depending QtBase libraries. We fix this by
-#   linking these into ${CONFIGURE_WRKSRC}/lib if the given QtBase port depends
-#   on them.
-.  if ${QT_DIST:Mbase}
-.    for basedep in ${_QT5_BASE}
-.      if ${USE_QT5:M${basedep}}
-	${LN} -sf ${QT_LIBDIR}/${${basedep}_LIB} ${CONFIGURE_WRKSRC}/lib
-.      endif
-.    endfor
-.  endif
-
-#
-# **** THIS PART IS OBSOLETE FOR THE NEXT QT UPGRADE ****
-#
-# Add ${LOCALBASE}/lib to DEFAULT_LIBDIRS, which we use to filter out
-# certain paths from pkg-config calls (see the explanation in
-# devel/qt5/files/patch-configure) as well as for setting
-# QMAKE_DEFAULT_LIBDIR in mkspecs/qconfig.pri. Part of the solution for
-# ports/194088.
-post-patch: qtbase-post-patch
-qtbase-post-patch:
-	${REINPLACE_CMD} -e "/DEFAULT_LIBDIRS=/ s,\\\\\"\\\\n,\\\\n${LOCALBASE}/lib&," \
-		${WRKSRC}/configure
-
-.  if ${PORTNAME} != "qmake"
-_QMAKE=			${CONFIGURE_WRKSRC}/bin/qmake
-.  endif
-. endif # ${QT_DIST} == "base"
-
-pre-configure: qt5-pre-configure
-qt5-pre-configure:
-# Qt 5.3.2 introduced a check in mkspecs/features/create_cmake.prf that
-# requires tests/auto/cmake to be present, otherwise the configure stage will
-# fail.
-# Since we cannot extract tests/auto/cmake/ and exclude tests/ at the same
-# time, we have to disable the check in a cache file (the only way to get this
-# value through to the configure script in qtbase).
-	${MKDIR} ${CONFIGURE_WRKSRC}
-	${ECHO_CMD} 'CMAKE_MODULE_TESTS = -' > ${CONFIGURE_WRKSRC}/.qmake.cache
-#
-# **** THIS PART IS OBSOLETE FOR THE NEXT QT UPGRADE ****
-#
-# We piggyback on QMAKE_LIBDIR_FLAGS to make sure -L${WRKSRC}/lib is passed to
-# the linker before -L/usr/local/lib. By default, the opposite happens, which
-# is a problem when a Qt port is being upgraded, since an existing library
-# would end up being picked up instead of those built in ${WRKSRC}/lib. Since
-# qmake appends the value of QMAKE_LIBDIR to QMAKE_LIBDIR_FLAGS, we can use the
-# latter to get the linker path order right. qmake is smart enough to strip
-# occurrences of ${WRKSRC}/lib from .pc and .prl files when installing them.
-# See QTBUG-40825 and ports bugs 194088, 195105 and 198720.
-	${ECHO_CMD} 'QMAKE_LIBDIR_FLAGS = -L${CONFIGURE_WRKSRC}/lib' >> ${CONFIGURE_WRKSRC}/.qmake.cache
-
-post-install: qt-post-install
-qt-post-install:
-. if ${QT_DEFINES:N-*}
-# We can't use SUB_FILES with a shared pkg-deinstall.in.
-# We need it to be a script instead of a group of @unexecs, otherwise
-# qconfig-modules.h cleanup will be run in pre-deinstall stage, which is
-# useless. This will probably be replaced by a Keywords/ script in the future.
-	@${SED} -e 's,%%QT_MODNAME%%,${QT_MODNAME},g' \
-		-e 's,%%QT_INCDIR%%,${QT_INCDIR},g' \
-		${.CURDIR:H:H}/devel/${_QT_RELNAME}/${FILESDIR:T}/${PKGDEINSTALL:T}.in > \
-		${PKGDEINSTALL}
-	@${MKDIR} ${STAGEDIR}${QT_INCDIR}/QtCore/modules
-	@${ECHO_CMD} -n \
-		> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
-.  for def in ${QT_DEFINES:N-*:O:u:C/=.*$//}
-	@${ECHO_CMD} "#if !defined(QT_${def}) && !defined(QT_NO_${def})" \
-		>> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
-	${ECHO_CMD} "# define QT_${def}" \
-		>> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
-	@${ECHO_CMD} "#endif" \
-		>> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
-	@${ECHO_CMD} \
-		>> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
-.  endfor
-	@${ECHO_CMD} "${PREFIX}/${QT_INCDIR_REL}/QtCore/modules/qconfig-${QT_MODNAME}.h" \
-		>> ${TMPPLIST}
-	@${ECHO_CMD} "@exec echo '#include <QtCore/modules/qconfig-${QT_MODNAME}.h>' >> ${PREFIX}/${QT_INCDIR_REL}/QtCore/qconfig-modules.h" \
-		>> ${TMPPLIST}
-. endif # ${QT_DEFINES:N-*}
-. if ${QT_CONFIG:N-*}
-	@${MKDIR} ${STAGEDIR}${QT_MKSPECDIR}/modules
-	${ECHO_CMD} "QT_CONFIG += ${QT_CONFIG:N-*:O:u}" \
-		> ${STAGEDIR}${QT_MKSPECDIR}/modules/qt_config_${QT_MODNAME}.pri
-	@${ECHO_CMD} "${PREFIX}/${QT_MKSPECDIR_REL}/modules/qt_config_${QT_MODNAME}.pri" \
-		>> ${TMPPLIST}
-. endif # ${QT_CONFIG:N-*}
-.endif # defined(QT_DIST) && ! ${_QT_VERSION:M4*}
-
-.endif # defined(_POSTMKINCLUDED) && !defined(Qt_Post_Include)
diff --git Mk/bsd.sanity.mk Mk/bsd.sanity.mk
index aa57face235e..8707b0bb0d74 100644
--- Mk/bsd.sanity.mk
+++ Mk/bsd.sanity.mk
@@ -18,7 +18,7 @@ ALL_UNSUPPORTED=	WITHOUT_NLS NOPORTDOCS NOPORTEXAMPLES WITH_BDB_VER \
 			OVERRIDE_LINUX_BASE_PORT WITH_OPENSSL_PORT \
 			WITH_OPENSSL_BASE PYTHON_DEFAULT_VERSION \
 			PYTHON2_DEFAULT_VERSION PYTHON3_DEFAULT_VERSION
-ALL_DEPRECATED=		
+ALL_DEPRECATED=
 ALL_NOTNEEDED=		WITH_NEW_XORG WITHOUT_NEW_XORG WITH_KMS WITHOUT_KMS
 
 WITHOUT_NLS_ALT=	"OPTIONS_UNSET=NLS, or ${OPTIONS_NAME}_UNSET+=NLS instead"
@@ -169,7 +169,7 @@ SANITY_UNSUPPORTED=	USE_OPENAL USE_FAM USE_MAKESELF USE_ZIP USE_LHA USE_CMAKE \
 		USE_RCORDER USE_OPENSSL WANT_GNOME RUBYGEM_AUTOPLIST WANT_SDL \
 		INSTALLS_EGGINFO USE_DOS2UNIX NO_STAGE USE_RUBYGEMS USE_GHOSTSCRIPT \
 		USE_GHOSTSCRIPT_BUILD USE_GHOSTSCRIPT_RUN USE_AUTOTOOLS APACHE_PORT \
-		USE_FPC_RUN WANT_FPC_BASE WANT_FPC_ALL
+		USE_FPC_RUN WANT_FPC_BASE WANT_FPC_ALL USE_QT4 USE_QT5 QT_NONSTANDARD
 SANITY_DEPRECATED=	PYTHON_PKGNAMESUFFIX MLINKS \
 			USE_MYSQL WANT_MYSQL_VER \
 			PYDISTUTILS_INSTALLNOSINGLE \
@@ -254,6 +254,9 @@ APACHE_PORT_ALT=	DEFAULT_VERSIONS+=apache=${APACHE_PORT:S/www\/apache//:C/2(0-9)
 USE_FPC_RUN_ALT=	USES=fpc:run
 WANT_FPC_BASE_ALT=	USES=fpc:base
 WANT_FPC_ALL_ALT=	USES=fpc:all
+USE_QT4_ALT=		USES=qt:4 and USE_QT=${USE_QT4}
+USE_QT5_ALT=		USES=qt:5 and USE_QT=${USE_QT5}
+QT_NONSTANDARD_ALT=	USES=qmake:no_env
 
 .for a in ${SANITY_DEPRECATED}
 .if defined(${a})
diff --git accessibility/jovie-kde4/Makefile accessibility/jovie-kde4/Makefile
index a8e1429ccd3a..a6d6c7eb1aec 100644
--- accessibility/jovie-kde4/Makefile
+++ accessibility/jovie-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	KDE text-to-speech system
 
 LIB_DEPENDS=	libspeechd.so:accessibility/speech-dispatcher
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	xml qmake_build moc_build uic_build rcc_build
+USE_QT=		xml qmake_build moc_build uic_build rcc_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git accessibility/kaccessible-kde4/Makefile accessibility/kaccessible-kde4/Makefile
index 197c6f0a9975..2f7eabed3639 100644
--- accessibility/kaccessible-kde4/Makefile
+++ accessibility/kaccessible-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	Accessibility services for KDE
 
 LIB_DEPENDS=	libspeechd.so:accessibility/speech-dispatcher
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib dbus gui xml \
+USE_QT=		corelib dbus gui xml \
 		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git accessibility/kmag-kde4/Makefile accessibility/kmag-kde4/Makefile
index a2ac4ba42ac1..6ccdf20c424b 100644
--- accessibility/kmag-kde4/Makefile
+++ accessibility/kmag-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	accessibility kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE Screen magnifier
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 # Somebody has to create port for libkdeaccessibilityclient first
 CMAKE_ARGS+=	-DWITH_QAccessibilityClient=off
diff --git accessibility/kmag/Makefile accessibility/kmag/Makefile
index e2cacf1cc376..3dc669be3dd2 100644
--- accessibility/kmag/Makefile
+++ accessibility/kmag/Makefile
@@ -10,10 +10,10 @@ COMMENT=	KDE Screen magnifier
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons ecm \
 		i18n kio service widgetsaddons xmlgui
-USE_QT5=	core dbus gui printsupport widgets xml \
+USE_QT=		core dbus gui printsupport widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git accessibility/kmousetool-kde4/Makefile accessibility/kmousetool-kde4/Makefile
index 640ddd6ace93..8d5ffb90139d 100644
--- accessibility/kmousetool-kde4/Makefile
+++ accessibility/kmousetool-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	accessibility kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Automatic mouse click tool for KDE
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 USE_XORG=	xtst
 
 .include <bsd.port.mk>
diff --git accessibility/kmousetool/Makefile accessibility/kmousetool/Makefile
index aee2d552442f..a451b0bb3cb5 100644
--- accessibility/kmousetool/Makefile
+++ accessibility/kmousetool/Makefile
@@ -11,10 +11,10 @@ COMMENT=	Automatic mouse click tool for KDE
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons dbusaddons \
 		ecm i18n iconthemes notifications widgetsaddons xmlgui
-USE_QT5=	core dbus gui phonon4 widgets xml \
+USE_QT=		core dbus gui phonon4 widgets xml \
 		buildtools_build qmake_build
 USE_XORG=	ice sm x11 xext xtst
 
diff --git accessibility/kmouth-kde4/Makefile accessibility/kmouth-kde4/Makefile
index 74bfb286be43..f52b1233ef21 100644
--- accessibility/kmouth-kde4/Makefile
+++ accessibility/kmouth-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	accessibility kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Speech synthesizer frontend for KDE
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git accessibility/kmouth/Makefile accessibility/kmouth/Makefile
index e9fd68e97b4b..dce38eb03a49 100644
--- accessibility/kmouth/Makefile
+++ accessibility/kmouth/Makefile
@@ -10,10 +10,10 @@ COMMENT=	Speech synthesizer frontend for KDE
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		ecm i18n jobwidgets kio service widgetsaddons xmlgui
-USE_QT5=	core dbus gui network printsupport speech widgets xml \
+USE_QT=		core dbus gui network printsupport speech widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git accessibility/qt4-accessible/Makefile accessibility/qt4-accessible/Makefile
index b82e3b04a82e..50d47c092901 100644
--- accessibility/qt4-accessible/Makefile
+++ accessibility/qt4-accessible/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt accessibility widgets
 
-USE_QT4=	qmake_build moc_build qt3support corelib gui network sql xml
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build qt3support corelib gui network sql xml
 USE_CXXSTD=	gnu++98
 
 HAS_CONFIGURE=	yes
diff --git accessibility/qt5-speech/Makefile accessibility/qt5-speech/Makefile
index a3c1f30444c3..22bf69b4fe70 100644
--- accessibility/qt5-speech/Makefile
+++ accessibility/qt5-speech/Makefile
@@ -10,8 +10,7 @@ COMMENT=	Accessibilty features for Qt5
 
 LIB_DEPENDS=	libspeechd.so:accessibility/speech-dispatcher
 
-USES=		pkgconfig qmake:outsource
-USE_QT5=	core gui buildtools_build qmake_build
-QT_DIST=	${PORTNAME}
+USES=		pkgconfig qmake:outsource qt-dist:5,speech
+USE_QT=		core gui buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git archivers/ark-kde4/Makefile archivers/ark-kde4/Makefile
index 51c72818d7d3..82f77193c51e 100644
--- archivers/ark-kde4/Makefile
+++ archivers/ark-kde4/Makefile
@@ -14,10 +14,10 @@ LIB_DEPENDS=	libqjson.so:devel/qjson@qt4
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake:outsource kde:4 libarchive cpe tar:xz
+USES=		cmake:outsource kde:4 libarchive cpe qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs libkonq
 CPE_VENDOR=	kde
-USE_QT4=	qtestlib qmake_build moc_build rcc_build uic_build
+USE_QT=		qtestlib qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 OPTIONS_DEFINE=	7ZIP RAR ZIP
diff --git archivers/ark/Makefile archivers/ark/Makefile
index ce6264361da3..0a42374e49d0 100644
--- archivers/ark/Makefile
+++ archivers/ark/Makefile
@@ -10,12 +10,12 @@ COMMENT=	Archiving tool for KDE
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake:outsource gettext libarchive kde:5 tar:xz
+USES=		cmake:outsource gettext libarchive kde:5 qt:5 tar:xz
 USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons doctools ecm i18n iconthemes \
 		itemmodels itemviews jobwidgets khtml kio parts pty service \
 		solid sonnet textwidgets widgetsaddons xmlgui
-USE_QT5=	concurrent core dbus gui network widgets xml \
+USE_QT=		concurrent core dbus gui network widgets xml \
 		buildtools_build qmake_build
 
 USE_LDCONFIG=	yes
diff --git archivers/kf5-karchive/Makefile archivers/kf5-karchive/Makefile
index 5cba965b7a85..7c8df0a6f389 100644
--- archivers/kf5-karchive/Makefile
+++ archivers/kf5-karchive/Makefile
@@ -11,8 +11,8 @@ COMMENT=	KF5 library that provides classes for handling archive formats
 LICENSE=	LGPL20
 LICENSE_FILE=	${WRKSRC}/COPYING.LIB
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core qmake_build
+USE_QT=		buildtools_build core qmake_build
 
 .include <bsd.port.mk>
diff --git archivers/quazip/Makefile archivers/quazip/Makefile
index e104a74238ba..3cb4c3500a8c 100644
--- archivers/quazip/Makefile
+++ archivers/quazip/Makefile
@@ -16,14 +16,16 @@ LICENSE=	LGPL21
 FLAVORS=	qt4 qt5
 FLAVOR?=	${FLAVORS:[1]}
 
-USES=		cmake:outsource
+USES=		cmake:outsource 
 USE_LDCONFIG=	yes
 
 .  if ${FLAVOR} == qt4
-USE_QT4=	corelib moc_build network_build qmake_build rcc_build uic_build
+USES+=		qt:4
+USE_QT=		corelib moc_build network_build qmake_build rcc_build uic_build
 CMAKE_ARGS=	-DBUILD_WITH_QT4:BOOL=TRUE
 .  else
-USE_QT5=	core buildtools_build qmake_build
+USES+=		qt:5
+USE_QT=		core buildtools_build qmake_build
 CMAKE_ARGS=	-DBUILD_WITH_QT4:BOOL=FALSE
 QTVER_SUFFIX=	5
 .  endif
diff --git astro/gpsbabel/Makefile astro/gpsbabel/Makefile
index 3dfbbef3751d..b1bc4060fff0 100644
--- astro/gpsbabel/Makefile
+++ astro/gpsbabel/Makefile
@@ -19,17 +19,18 @@ USE_GITHUB=	yes
 
 CONFLICTS=	gpsbabel14-[0-9]*
 
-USE_QT5=	core qmake_build
+USE_QT=		core qmake_build
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--with-zlib=system
-USES=		localbase
+USES=		localbase qt:5 qt:5
 
 OPTIONS_DEFINE=	GUI
 OPTIONS_SUB=	yes
 
 GUI_ALL_TARGET=	gui
-GUI_USE=	QT5=gui,xml,network,webkit
-GUI_USE+=	QT5=linguisttools_build,moc_build,rcc_build,uic_build
+GUI_USES=	qt:5 qt:5
+GUI_USE=	QT=gui,xml,network,webkit
+GUI_USE+=	QT=linguisttools_build,moc_build,rcc_build,uic_build
 GUI_VARS=	MAKE_JOBS_UNSAFE=yes
 
 post-patch:
diff --git astro/kstars-kde4/Makefile astro/kstars-kde4/Makefile
index 3faf23222a81..1201545c712b 100644
--- astro/kstars-kde4/Makefile
+++ astro/kstars-kde4/Makefile
@@ -13,9 +13,9 @@ LIB_DEPENDS=	libcfitsio.so:astro/cfitsio \
 BUILD_DEPENDS=	xplanet:astro/xplanet
 RUN_DEPENDS=	xplanet:astro/xplanet
 
-USES=		cmake:outsource compiler:c++11-lib eigen:3 kde:4 tar:xz
+USES=		cmake:outsource compiler:c++11-lib eigen:3 kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	opengl qmake_build moc_build rcc_build uic_build
+USE_QT=		opengl qmake_build moc_build rcc_build uic_build
 
 OPTIONS_DEFINE=	PYKDE
 
diff --git astro/kstars/Makefile astro/kstars/Makefile
index e26a8cfb2dda..1c31532b51a5 100644
--- astro/kstars/Makefile
+++ astro/kstars/Makefile
@@ -19,13 +19,13 @@ BUILD_DEPENDS=	xplanet:astro/xplanet
 RUN_DEPENDS=	xplanet:astro/xplanet
 
 USES=		cmake:outsource compiler:c++11-lib eigen:3 gettext kde:5 \
-		pkgconfig tar:xz
+		pkgconfig qt:5 tar:xz
 USE_KDE=	attica auth bookmarks codecs completion config configwidgets\
 		coreaddons crash dbusaddons doctools ecm guiaddons i18n \
 		iconthemes init itemviews jobwidgets kio newstuff notifications \
 		notifyconfig parts plotting service solid texteditor \
 		widgetsaddons xmlgui
-USE_QT5=	concurrent core dbus gui multimedia network opengl printsupport \
+USE_QT=		concurrent core dbus gui multimedia network opengl printsupport \
 		qml quick sql svg testlib widgets xml \
 		buildtools_build qmake_build
 
diff --git astro/libkgeomap-kde4/Makefile astro/libkgeomap-kde4/Makefile
index f92adf9efd84..bbb994c2aad1 100644
--- astro/libkgeomap-kde4/Makefile
+++ astro/libkgeomap-kde4/Makefile
@@ -16,9 +16,9 @@ LICENSE_COMB=	multi
 
 BUILD_DEPENDS=	${LOCALBASE}/include/boost/graph/buffer_concepts.hpp:devel/boost-libs
 
-USES=		cmake:outsource kde:4 pathfix tar:xz
+USES=		cmake:outsource kde:4 pathfix qt:4 tar:xz
 USE_KDE=	kdelibs automoc4 marble
 USE_LDCONFIG=	yes
-USE_QT4=	network phonon xml moc_build qmake_build rcc_build uic_build
+USE_QT=		network phonon xml moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git astro/libkgeomap/Makefile astro/libkgeomap/Makefile
index 370f51392c2b..c1171db6ae05 100644
--- astro/libkgeomap/Makefile
+++ astro/libkgeomap/Makefile
@@ -13,9 +13,9 @@ LICENSE_COMB=	multi
 BUILD_DEPENDS=	${LOCALBASE}/include/boost/graph/buffer_concepts.hpp:devel/boost-libs
 LIB_DEPENDS=	libopencv_video.so:graphics/opencv
 
-USES=		cmake:outsource gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	config coreaddons ecm i18n kio marble service textwidgets
-USE_QT5=	concurrent core gui network webkit widgets xml \
+USE_QT=		concurrent core gui network webkit widgets xml \
 		buildtools_build qmake_build
 
 USE_LDCONFIG=	yes
diff --git astro/marble-kde4/Makefile astro/marble-kde4/Makefile
index 1db954d0ab22..01cc4768278d 100644
--- astro/marble-kde4/Makefile
+++ astro/marble-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	Virtual globe and world atlas for KDE
 
 LIB_DEPENDS=	libquazip.so:archivers/quazip@qt4
 
-USES=		cmake:outsource kde:4 shared-mime-info tar:xz
+USES=		cmake:outsource kde:4 qt:4 shared-mime-info tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib dbus declarative designer_build gui network phonon \
+USE_QT=		corelib dbus declarative designer_build gui network phonon \
 		qtestlib script sql svg webkit xml \
 		qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
diff --git astro/marble/Makefile astro/marble/Makefile
index 91bb53b996eb..bd5a8db28212 100644
--- astro/marble/Makefile
+++ astro/marble/Makefile
@@ -13,12 +13,12 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
 LIB_DEPENDS=	libquazip5.so:archivers/quazip@qt5
 
-USES=		cmake:outsource desktop-file-utils gettext kde:5 tar:xz
+USES=		cmake:outsource desktop-file-utils gettext kde:5 qt:5 tar:xz
 USE_KDE=	attica auth codecs completion config configwidgets coreaddons \
 		crash doctools ecm i18n jobwidgets kio newstuff package parts \
 		plasma-framework runner service sonnet textwidgets wallet \
 		widgetsaddons xmlgui
-USE_QT5=	concurrent core dbus designer gui location network opengl \
+USE_QT=		concurrent core dbus designer gui location network opengl \
 		phonon4 printsupport qml quick script sql svg webkit widgets xml \
 		buildtools_build qmake_build
 
diff --git astro/merkaartor/Makefile astro/merkaartor/Makefile
index a82ffd6ab7ba..a99be76d3114 100644
--- astro/merkaartor/Makefile
+++ astro/merkaartor/Makefile
@@ -18,11 +18,11 @@ LIB_DEPENDS=	libgdal.so:graphics/gdal \
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	openstreetmap
-USES=		pkgconfig sqlite:3 qmake
+USES=		pkgconfig qt:5 sqlite:3 qmake
 USE_LDCONFIG=	yes
 
 QMAKE_ARGS=	SYSTEM_QUAZIP=1
-USE_QT5=	buildtools_build \
+USE_QT=		buildtools_build \
 		concurrent core gui imageformats network printsupport svg \
 		webkit widgets xml
 
@@ -45,7 +45,8 @@ ZBAR_BROKEN=	Does not build with option ZBAR selected
 
 DEBUG_QMAKE_OFF=	NODEBUG=1 RELEASE=1
 
-NLS_USE=	QT5=linguisttools_build
+NLS_USES=	qt:5
+NLS_USE=	QT=linguisttools_build
 
 INSTALLS_ICONS= yes
 
diff --git astro/qlandkartegt/Makefile astro/qlandkartegt/Makefile
index ac0accced757..2bc9f9bbcc6d 100644
--- astro/qlandkartegt/Makefile
+++ astro/qlandkartegt/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libgdal.so:graphics/gdal \
 		libproj.so:graphics/proj \
 		libgps.so:astro/gpsd
 
-USES=		cmake desktop-file-utils
-USE_QT4=	dbus gui opengl network sql xml linguist_build \
+USES=		cmake desktop-file-utils qt:4
+USE_QT=		dbus gui opengl network sql xml linguist_build \
 		moc_build uic_build rcc_build qmake_build
 USE_GL=		glu
 
diff --git astro/qmapshack/Makefile astro/qmapshack/Makefile
index 6fe565cc2f97..51e1d4bcfa0e 100644
--- astro/qmapshack/Makefile
+++ astro/qmapshack/Makefile
@@ -19,8 +19,8 @@ LIB_DEPENDS=	libgdal.so:graphics/gdal \
 		libroutino.so:astro/routino
 RUN_DEPENDS=	${LOCALBASE}/bin/bsdisks:sysutils/bsdisks
 
-USES=		cmake compiler:c++11-lib desktop-file-utils jpeg
-USE_QT5=	buildtools core dbus gui linguisttools network printsupport \
+USES=		cmake compiler:c++11-lib desktop-file-utils jpeg qt:5
+USE_QT=		buildtools core dbus gui linguisttools network printsupport \
 		qmake script sql sql-sqlite3 uitools webkit widgets xml
 
 .include <bsd.port.mk>
diff --git astro/stellarium-qt4/Makefile astro/stellarium-qt4/Makefile
index fe2f21dd7c4f..9a9ae592fa4f 100644
--- astro/stellarium-qt4/Makefile
+++ astro/stellarium-qt4/Makefile
@@ -18,8 +18,8 @@ LICENSE=	GPLv2+
 CONFLICTS_INSTALL=	${PORTNAME}-0.17.*
 PORTSCOUT=	limit:^0\.12\.			# track only 0.12.x (legacy)
 
-USES=		cmake gettext iconv
-USE_QT4=	moc_build rcc_build uic_build qmake_build \
+USES=		cmake gettext iconv qt:4
+USE_QT=		moc_build rcc_build uic_build qmake_build \
 		corelib gui network opengl
 
 PORTDOCS=	AUTHORS ChangeLog README
@@ -55,13 +55,13 @@ PLIST_SUB+=	TEXTURES="@comment "
 .endif
 
 .if ${PORT_OPTIONS:MMULTIMEDIA}
-USE_QT4+=	phonon
+USE_QT+=	phonon
 .else
 CMAKE_ARGS+=	-DENABLE_SOUND:BOOL=OFF
 .endif
 
 .if ${PORT_OPTIONS:MSCRIPTING}
-USE_QT4+=	script
+USE_QT+=	script
 PLIST_SUB+=	SCRIPTS=""
 .else
 CMAKE_ARGS+=	-DENABLE_SCRIPTING:BOOL=OFF
diff --git astro/stellarium/Makefile astro/stellarium/Makefile
index 83f1f02bba6f..b2b3703d7ed9 100644
--- astro/stellarium/Makefile
+++ astro/stellarium/Makefile
@@ -17,8 +17,8 @@ CONFLICTS_INSTALL=	${PORTNAME}-qt4-0.12.*
 USE_GITHUB=	yes
 GH_ACCOUNT=	Stellarium
 
-USES=		cmake gettext
-USE_QT5=	qmake_build buildtools_build linguisttools_build \
+USES=		cmake gettext qt:5
+USE_QT=		qmake_build buildtools_build linguisttools_build \
 		concurrent core gui network opengl printsupport widgets
 
 CMAKE_ARGS=	-DENABLE_GPS:BOOL=OFF	# XXX: requires Qt5Positioning
@@ -44,10 +44,12 @@ DOCS_DISTFILES=		stellarium_user_guide-${GUIDE_VERSION}-1.pdf:ug
 TEXTURES_MASTER_SITES=	SF/${PORTNAME}/Extra-data-files/textures:gfx
 TEXTURES_DISTFILES=	textures-1K.zip:gfx
 
-MULTIMEDIA_USE=		QT5=multimedia
+MULTIMEDIA_USES=	qt:5
+MULTIMEDIA_USE=		QT=multimedia
 MULTIMEDIA_CMAKE_OFF=	-DENABLE_MEDIA:BOOL=OFF
 
-TELESCOPE_USE=		QT5=serialport
+TELESCOPE_USES=	qt:5
+TELESCOPE_USE=		QT=serialport
 TELESCOPE_CMAKE_OFF=	-DUSE_PLUGIN_TELESCOPECONTROL:BOOL=OFF
 
 .include <bsd.port.options.mk>
@@ -65,7 +67,7 @@ PLIST_SUB+=	MORE_STARS="@comment "
 .endif
 
 .if ${PORT_OPTIONS:MSCRIPTING}
-USE_QT5+=	script
+USE_QT+=	script
 PLIST_SUB+=	SCRIPTS=""
 .else
 CMAKE_ARGS+=	-DENABLE_SCRIPTING:BOOL=OFF
diff --git astro/xglobe/Makefile astro/xglobe/Makefile
index e1bb47faadf4..7d1b578a77d7 100644
--- astro/xglobe/Makefile
+++ astro/xglobe/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Displays a view of the Earth (like xearth) with a rendered photo map
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		gmake
-USE_QT4=	corelib gui qt3support moc_build
+USES=		gmake qt:4
+USE_QT=		corelib gui qt3support moc_build
 
 do-install:
 	@${MKDIR} ${STAGEDIR}${DATADIR}
diff --git audio/abgate-lv2/Makefile audio/abgate-lv2/Makefile
index 88eccd54ebd0..3b0a8585691e 100644
--- audio/abgate-lv2/Makefile
+++ audio/abgate-lv2/Makefile
@@ -17,11 +17,11 @@ BROKEN_powerpc64=	fails to build: cc1plus: unrecognized command line option -std
 
 BUILD_DEPENDS=	lv2>0:audio/lv2
 
-USES=		gmake pkgconfig
+USES=		gmake pkgconfig qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	antanasbruzas
 USE_CXXSTD=	c++11
-USE_QT5=	core gui widgets buildtools_build qmake_build
+USE_QT=		core gui widgets buildtools_build qmake_build
 USE_GL=		gl
 USE_GNOME=	atkmm gtk20 gtkmm24 libsigc++20
 USE_LDCONFIG=	yes
diff --git audio/acoustid-fingerprinter/Makefile audio/acoustid-fingerprinter/Makefile
index e8a8214ae0c2..d8b859804cc0 100644
--- audio/acoustid-fingerprinter/Makefile
+++ audio/acoustid-fingerprinter/Makefile
@@ -18,8 +18,8 @@ LIB_DEPENDS=	libchromaprint.so:audio/chromaprint \
 BROKEN_armv6=		fails to link: fingerprintcalculator.cpp: undefined reference to 'chromaprint_new'
 BROKEN_powerpc64=	fails to compile: libchromaprint.so: undefined reference to std::__cxx11::basic_string
 
-USES=		cmake desktop-file-utils
-USE_QT4=	corelib gui network \
+USES=		cmake desktop-file-utils qt:4
+USE_QT=		corelib gui network \
 		qmake_build moc_build rcc_build uic_build
 USE_GITHUB=	yes
 GH_ACCOUNT=	acoustid
diff --git audio/amarok-kde4/Makefile audio/amarok-kde4/Makefile
index 47a93cdad9c6..68285d41577f 100644
--- audio/amarok-kde4/Makefile
+++ audio/amarok-kde4/Makefile
@@ -24,11 +24,11 @@ RUN_DEPENDS=	${LOCALBASE}/lib/qt4/plugins/script/libqtscript_core.so.1.0.0:devel
 		${KDE_PREFIX}/lib/kde4/kio_upnp_ms.so:net/kio-upnp-ms
 
 USES=		cmake:outsource kde:4 mysql:client,embedded pkgconfig \
-		shared-mime-info shebangfix ssl tar:bzip2
+		qt:4 shared-mime-info shebangfix ssl tar:bzip2
 USE_GL=		gl
 USE_KDE=	automoc4 kdelibs libkcddb libkcompactdisc \
 		nepomuk-core runtime soprano strigi
-USE_QT4=	corelib dbus designer gui network opengl \
+USE_QT=		corelib dbus designer gui network opengl \
 		phonon script sql svg webkit xml \
 		qmake_build moc_build rcc_build uic_build
 USE_XORG=	ice sm x11 xau xdmcp xext xft xpm
diff --git audio/audex/Makefile audio/audex/Makefile
index 3323cd9de966..8d9bafaffd0a 100644
--- audio/audex/Makefile
+++ audio/audex/Makefile
@@ -13,9 +13,9 @@ LICENSE=	GPLv3
 
 LIB_DEPENDS=	libcdda_paranoia.so:audio/cdparanoia
 
-USES=		tar:xz cmake kde:4
+USES=		qt:4 tar:xz cmake kde:4
 USE_KDE=	automoc4 kdelibs libkcddb libkcompactdisc
-USE_QT4=	gui dbus network svg xml \
+USE_QT=		gui dbus network svg xml \
 		qmake_build moc_build rcc_build uic_build
 # Too many changes for suffix on literals without a space.
 USE_CXXSTD=	gnu++98
diff --git audio/audiocd-kio/Makefile audio/audiocd-kio/Makefile
index 124abace7036..4d86c049d256 100644
--- audio/audiocd-kio/Makefile
+++ audio/audiocd-kio/Makefile
@@ -17,13 +17,13 @@ LIB_DEPENDS=	libFLAC.so:audio/flac \
 		libKF5Cddb.so:audio/libkcddb \
 		libKF5CompactDisc.so:audio/libkcompactdisc
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash guiaddons i18n iconthemes itemviews \
 		jobwidgets kdelibs4support kio notifications parts \
 		service solid sonnet textwidgets unitconversion \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network phonon4 printsupport widgets xml \
+USE_QT=		core dbus gui network phonon4 printsupport widgets xml \
 		buildtools_build qmake_build
 
 USE_LDCONFIG=	yes
diff --git audio/cantata/Makefile audio/cantata/Makefile
index 5f77bafcf8f5..f91ec9adeff8 100644
--- audio/cantata/Makefile
+++ audio/cantata/Makefile
@@ -14,14 +14,14 @@ LICENSE_FILE=		${WRKSRC}/LICENSE
 USE_GITHUB=		yes
 GH_ACCOUNT=		CDrummond
 
-USE_QT5=		buildtools_build concurrent core dbus gui network \
+USE_QT=			buildtools_build concurrent core dbus gui network \
 			qmake_build sql sql-sqlite3_run svg widgets xml
 
 CMAKE_ARGS=		-DENABLE_QT5:BOOL=TRUE	\
 			-DENABLE_KDE:BOOL=FALSE	\
 			-DCMAKE_DISABLE_FIND_PACKAGE_UDev:BOOL=TRUE
 
-USES=			cmake:outsource cpe pkgconfig shebangfix
+USES=			cmake:outsource cpe pkgconfig qt:5 shebangfix
 SHEBANG_FILES=		playlists/cantata-dynamic cantata-remote.cmake \
 			devices/mounter/mount.cifs.wrapper
 CPE_VENDOR=		craig_drummond
@@ -71,7 +71,8 @@ MUSICBRAINZ_IMPLIES=	CDPARANOIA
 MUSICBRAINZ_LIB_DEPENDS=libmusicbrainz5.so:audio/libmusicbrainz5
 MUSICBRAINZ_CMAKE_BOOL=	ENABLE_MUSICBRAINZ
 
-NLS_USE=		QT5=linguisttools_build
+NLS_USES=	qt:5
+NLS_USE=		QT=linguisttools_build
 NLS_CMAKE_ON=		-DLCONVERT_EXECUTABLE:STRING=${QT_BINDIR}/lconvert \
 			-DLRELEASE_EXECUTABLE:STRING=${QT_BINDIR}/lrelease
 NLS_CMAKE_OFF=		-DLCONVERT_EXECUTABLE:BOOL=FALSE \
@@ -79,7 +80,8 @@ NLS_CMAKE_OFF=		-DLCONVERT_EXECUTABLE:BOOL=FALSE \
 
 PROXY_CMAKE_BOOL=	ENABLE_PROXY_CONFIG
 
-QT5_USE=		QT5=multimedia
+QT5_USES=	qt:5
+QT5_USE=		QT=multimedia
 
 TAGLIB_LIB_DEPENDS=	libtag.so:audio/taglib \
 			libtag-extras.so:audio/taglib-extras
diff --git audio/carla/Makefile audio/carla/Makefile
index 7529333c9110..f29c63997c76 100644
--- audio/carla/Makefile
+++ audio/carla/Makefile
@@ -18,12 +18,12 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pyliblo>0:audio/py-pyliblo@${PY_FLAVOR}
 CONFLICTS_BUILD=	rtaudio-* rtmidi-*
 
 USES=		compiler:c++11-lib desktop-file-utils gmake localbase \
-		pkgconfig pyqt:5 python:3.4+ shared-mime-info shebangfix tar:bz2
+		pkgconfig pyqt:5 python:3.4+ qt:5 shared-mime-info shebangfix tar:bz2
 USE_GITHUB=	yes
 GH_ACCOUNT=	falkTX
 USE_PYQT=	core_run gui_run sip svg_run widgets_run xml_build  # "sip" should be "sip_build", but "import PyQt5.QtCore" wants "sip". See bug#225040
 USE_GNOME=	gtk20 gtk30
-USE_QT5=	core gui widgets buildtools_build
+USE_QT=		core gui widgets buildtools_build
 USE_XORG=	x11
 USE_LDCONFIG=	${PREFIX}/lib/carla
 SHEBANG_FILES=	data/carla-single source/native-plugins/resources/*
diff --git audio/clementine-player/Makefile audio/clementine-player/Makefile
index 3b0a46c68f79..f9ca156d563e 100644
--- audio/clementine-player/Makefile
+++ audio/clementine-player/Makefile
@@ -35,13 +35,13 @@ USES=		cmake \
 		desktop-file-utils \
 		gettext-tools \
 		pkgconfig \
-		sqlite
+		qt:4 sqlite
 
 USE_GL=		gl glew glu
 USE_XORG=	x11
 
 CONFLICTS_BUILD=	qt-3.*
-USE_QT4=	corelib \
+USE_QT=		corelib \
 		dbus \
 		gui \
 		imageformats \
diff --git audio/creox/Makefile audio/creox/Makefile
index 19bb0f36f60c..162af41e3662 100644
--- audio/creox/Makefile
+++ audio/creox/Makefile
@@ -18,9 +18,9 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	laudrup
 GH_PROJECT=	Creox4
 
-USES=		cmake:outsource kde:4
+USES=		cmake:outsource kde:4 qt:4
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_XORG=	xft xpm
 USE_CXXSTD=	gnu++98
 
diff --git audio/cueplayer/Makefile audio/cueplayer/Makefile
index 62f643b5ffd7..f00f38388193 100644
--- audio/cueplayer/Makefile
+++ audio/cueplayer/Makefile
@@ -14,8 +14,8 @@ LICENSE=	GPLv3
 
 LIB_DEPENDS=	libnotify.so:devel/libnotify
 
-USES=		pkgconfig qmake
-USE_QT4=	gui xml uic_build moc_build rcc_build network
+USES=		pkgconfig qmake qt:4
+USE_QT=		gui xml uic_build moc_build rcc_build network
 USE_GSTREAMER=	flac good dvd lame ugly ffmpeg taglib ogg vorbis soup libmms wavpack
 USE_XORG=	x11
 
diff --git audio/dream/Makefile audio/dream/Makefile
index 6a398d3382b1..a8eb6a62c673 100644
--- audio/dream/Makefile
+++ audio/dream/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libhamlib.so:comms/hamlib\
 		libqwt.so:x11-toolkits/qwt5\
 		libfftw3.so:math/fftw3
 
-USES=		gmake pkgconfig qmake
-USE_QT4=	qmake_build moc_build uic_build corelib gui network rcc webkit
+USES=		gmake pkgconfig qmake qt:4
+USE_QT=		qmake_build moc_build uic_build corelib gui network rcc webkit
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
 OPTIONS_DEFINE=		SNDFILE OGG VORBIS FLAC OPUS SPEEX FAAD FAAC
diff --git audio/drumstick/Makefile audio/drumstick/Makefile
index 38ce98abcc03..b360f437105c 100644
--- audio/drumstick/Makefile
+++ audio/drumstick/Makefile
@@ -15,8 +15,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 LIB_DEPENDS=	libfluidsynth.so:audio/fluidsynth
 RUN_DEPENDS=	${LOCALBASE}/share/sounds/sf2/FluidR3_GM.sf2:audio/fluid-soundfont
 
-USES=		cmake:outsource pkgconfig shared-mime-info tar:bz2
-USE_QT5=	core gui network svg testlib widgets buildtools_build qmake_build
+USES=		cmake:outsource pkgconfig qt:5 shared-mime-info tar:bz2
+USE_QT=		core gui network svg testlib widgets buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
 OPTIONS_DEFINE=		PULSEAUDIO MANPAGES
diff --git audio/dsbmixer/Makefile audio/dsbmixer/Makefile
index a89ae2a92bdf..73e2c307d23e 100644
--- audio/dsbmixer/Makefile
+++ audio/dsbmixer/Makefile
@@ -13,10 +13,10 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 RUN_DEPENDS=	dsbwrtsysctl:sysutils/dsbwrtsysctl
 
-USES=		tar:tgz qmake
+USES=		qt:5 tar:tgz qmake
 
 USE_GL=		gl
-USE_QT5=	buildtools_build core gui linguisttools_build widgets
+USE_QT=		buildtools_build core gui linguisttools_build widgets
 
 QMAKE_ARGS=	PORTS=1
 
diff --git audio/dssi/Makefile audio/dssi/Makefile
index 97c7d710b21a..fff45b621aa7 100644
--- audio/dssi/Makefile
+++ audio/dssi/Makefile
@@ -37,8 +37,8 @@ OPTIONS_DEFINE=	DOCS EXAMPLES QT4
 OPTIONS_DEFAULT=QT4
 OPTIONS_SUB=	yes
 
-QT4_USE=	QT4=corelib,gui,moc_build
-QT_NONSTANDARD=	yes
+QT4_USES=	qmake:no_env qt:4
+QT4_USE=	QT=corelib,gui,moc_build
 
 post-patch:
 	@${REINPLACE_CMD} -e \
diff --git audio/esperanza/Makefile audio/esperanza/Makefile
index 95f16748dcbf..9feb3de84826 100644
--- audio/esperanza/Makefile
+++ audio/esperanza/Makefile
@@ -18,10 +18,9 @@ LIB_DEPENDS=	libxmmsclient++.so:audio/cpp-xmms2
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:R}+git${PORTVERSION:E}
 
-USE_QT4=	gui xml network imageformats_run \
+USE_QT=		gui xml network imageformats_run \
 		qmake_build moc_build rcc_build uic_build
-QT_NONSTANDARD=	yes
-USES=		gmake pkgconfig tar:bzip2
+USES=		gmake pkgconfig qmake:no_env qt:4 tar:bzip2
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	--prefix=${PREFIX} --disable-growl
 MAKE_ARGS=	INSTALL_ROOT="${STAGEDIR}"
diff --git audio/flacon/Makefile audio/flacon/Makefile
index c1e52bf85722..db7a067449d6 100644
--- audio/flacon/Makefile
+++ audio/flacon/Makefile
@@ -13,9 +13,9 @@ LICENSE=	LGPL21
 
 LIB_DEPENDS=	libuchardet.so:textproc/uchardet
 
-USES=		cmake desktop-file-utils pkgconfig
+USES=		cmake desktop-file-utils pkgconfig qt:5
 USE_GITHUB=	yes
-USE_QT5=	buildtools_build concurrent_build qmake_build \
+USE_QT=		buildtools_build concurrent_build qmake_build \
 		linguisttools_build core gui network widgets
 
 .include <bsd.port.mk>
diff --git audio/fmit/Makefile audio/fmit/Makefile
index 8c2f426892b9..cb5fd55b4484 100644
--- audio/fmit/Makefile
+++ audio/fmit/Makefile
@@ -16,10 +16,10 @@ LICENSE=	GPLv2
 LIB_DEPENDS=	libfftw3.so:math/fftw3
 
 USE_XORG=	xmu
-USE_QT4=	corelib gui opengl \
+USE_QT=		corelib gui opengl \
 		linguist_build moc_build qmake_build rcc_build uic_build
 USE_GL=		glut
-USES=		cmake pkgconfig tar:bzip2
+USES=		cmake pkgconfig qt:4 tar:bzip2
 INSTALLS_ICONS=	yes
 
 OPTIONS_DEFINE=	ALSA JACK OSS PORTAUDIO
diff --git audio/guidolib/Makefile audio/guidolib/Makefile
index a055e61cb710..107ff4fab396 100644
--- audio/guidolib/Makefile
+++ audio/guidolib/Makefile
@@ -13,10 +13,10 @@ LICENSE=	MPL20
 
 BUILD_DEPENDS=	cmake:devel/cmake
 
-USES=		gmake pkgconfig
+USES=		gmake pkgconfig qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	grame-cncm
-USE_QT5=	core gui widgets printsupport xml buildtools_build qmake_build
+USE_QT=		core gui widgets printsupport xml buildtools_build qmake_build
 USE_GL=		gl
 USE_GNOME=	cairo
 USE_LDCONFIG=	yes
diff --git audio/hydrogen/Makefile audio/hydrogen/Makefile
index 906724240b53..087be482476b 100644
--- audio/hydrogen/Makefile
+++ audio/hydrogen/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libsndfile.so:audio/libsndfile \
 USE_GITHUB=	yes
 GH_ACCOUNT=	hydrogen-music
 
-USES=		cmake compiler:c++11-lang desktop-file-utils pkgconfig
-USE_QT4=	qmake_build moc_build rcc_build uic_build corelib \
+USES=		cmake compiler:c++11-lang desktop-file-utils pkgconfig qt:4
+USE_QT=		qmake_build moc_build rcc_build uic_build corelib \
 		gui network xml xmlpatterns
 
 OPTIONS_SINGLE=		EXPORT
diff --git audio/jalv/Makefile audio/jalv/Makefile
index 2cc940d8408a..6bb9796b9643 100644
--- audio/jalv/Makefile
+++ audio/jalv/Makefile
@@ -23,13 +23,12 @@ LIB_DEPENDS=	liblilv-0.so:audio/lilv \
 		libfontconfig.so:x11-fonts/fontconfig \
 		libfreetype.so:print/freetype2
 
-USES=		compiler:c++11-lang waf tar:bz2 pkgconfig
+USES=		compiler:c++11-lang qmake:no_configure,no_env qt:5 waf tar:bz2 pkgconfig
 CONFIGURE_ARGS=	--no-qt4
 USE_CXXSTD=	c++11
-USE_QT5=	core gui widgets buildtools_build
+USE_QT=		core gui widgets buildtools_build
 USE_GNOME=	atk atkmm cairo cairomm pango pangomm libsigc++20 \
 		gdkpixbuf2 glib20 glibmm  gtk20 gtk30 gtkmm24
-QT_NONSTANDARD=	yes
 
 post-patch:
 		@${REINPLACE_CMD} 's|$${MANDIR}|${MAN1PREFIX}/man|' \
diff --git audio/juk-kde4/Makefile audio/juk-kde4/Makefile
index f25adbc1b12f..0b7488eb3bf6 100644
--- audio/juk-kde4/Makefile
+++ audio/juk-kde4/Makefile
@@ -13,9 +13,9 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libtag.so:audio/taglib
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 CMAKE_ARGS=	-DWITH_TunePimp:BOOL=OFF
 
diff --git audio/juk/Makefile audio/juk/Makefile
index 4968e5210641..c2606dc4749d 100644
--- audio/juk/Makefile
+++ audio/juk/Makefile
@@ -12,12 +12,12 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libtag.so:audio/taglib
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash globalaccel i18n iconthemes itemviews \
 		jobwidgets kio notifications service solid sonnet textwidgets \
 		wallet widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network phonon4 svg widgets xml \
+USE_QT=		core dbus gui network phonon4 svg widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git audio/kid3-kde4/Makefile audio/kid3-kde4/Makefile
index e8a6e2539e9b..e9d1302b0656 100644
--- audio/kid3-kde4/Makefile
+++ audio/kid3-kde4/Makefile
@@ -36,24 +36,24 @@ PLIST_SUB+=	QT="" KDE="@comment "
 .  if ${PKGNAMESUFFIX} == "-qt5"
 # Qt 5 only
 CONFLICTS_INSTALL=	kid3-3.* kid3-qt4-3.*
-
-USE_QT5=	core dbus gui multimedia network testlib xml widgets \
+USES+=		qt:5
+USE_QT=		core dbus gui multimedia network testlib xml widgets \
 		buildtools_build linguisttools_build qmake_build
 CMAKE_ARGS+=	-DWITH_QT5=true
 OPTIONS_EXCLUDE=PHONON
 .  elif ${PKGNAMESUFFIX} == "-qt4"
 # Qt 4 only
 CONFLICTS_INSTALL=	kid3-3.* kid3-qt5-3.*
-
-USE_QT4=	corelib dbus gui network xml \
+USES+=		qt:4
+USE_QT=		corelib dbus gui network xml \
 		qmake_build moc_build rcc_build uic_build \
 		linguisttools_build
 .  endif
 .else
 # KDE 4 only
 CONFLICTS_INSTALL=	kid3-qt4-3.* kid3-qt5-3.*
-
-USE_QT4=	corelib dbus gui network svg xml \
+USES+=		qt:4
+USE_QT=		corelib dbus gui network svg xml \
 		qmake_build moc_build rcc_build uic_build \
 		linguisttools_build
 USE_KDE=	kdelibs automoc4
@@ -81,7 +81,8 @@ MP3_CMAKE_BOOL=		WITH_ID3LIB
 MP4_LIB_DEPENDS=	libmp4v2.so:multimedia/mp4v2
 MP4_CMAKE_BOOL=		WITH_MP4V2
 
-PHONON_USE=		QT4=phonon
+PHONON_USES=	qt:4
+PHONON_USE=		QT=phonon
 PHONON_CMAKE_BOOL=	WITH_PHONON
 
 TAGLIB_DESC=		Various audio formats support via Taglib
diff --git audio/kio-audiocd-kde4/Makefile audio/kio-audiocd-kde4/Makefile
index eef218563d19..707362461eff 100644
--- audio/kio-audiocd-kde4/Makefile
+++ audio/kio-audiocd-kde4/Makefile
@@ -16,10 +16,10 @@ LIB_DEPENDS=	libFLAC.so:audio/flac \
 		libogg.so:audio/libogg \
 		libvorbis.so:audio/libvorbis
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkcddb libkcompactdisc \
 		automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 OPTIONS_DEFINE=	LAME
diff --git audio/kmix-kde4/Makefile audio/kmix-kde4/Makefile
index c74fc203f8c4..0db57523b2c7 100644
--- audio/kmix-kde4/Makefile
+++ audio/kmix-kde4/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Sound mixer for KDE
 
 LICENSE=	GPLv2
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	gui phonon xml \
+USE_QT=		gui phonon xml \
 		moc_build qmake_build rcc_build uic_build
 
 OPTIONS_DEFINE=	ALSA PULSEAUDIO
diff --git audio/kmix/Makefile audio/kmix/Makefile
index 86f8e68cf253..134cf41f3e09 100644
--- audio/kmix/Makefile
+++ audio/kmix/Makefile
@@ -11,12 +11,12 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libasound.so:audio/alsa-lib
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons dbusaddons ecm \
 		emoticons globalaccel i18n iconthemes init itemmodels \
 		itemviews kcmutils kdelibs4support notifications package \
 		plasma-framework service solid widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui widgets xml \
+USE_QT=		core dbus gui widgets xml \
 		buildtools_build qmake_build
 
 # we want the KF5 version of kmix
diff --git audio/kscd-kde4/Makefile audio/kscd-kde4/Makefile
index 2c6ff23b1ca4..6d4b8f558d8c 100644
--- audio/kscd-kde4/Makefile
+++ audio/kscd-kde4/Makefile
@@ -13,9 +13,9 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libmusicbrainz3.so:audio/libmusicbrainz3
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	phonon moc_build qmake_build rcc_build uic_build
+USE_QT=		phonon moc_build qmake_build rcc_build uic_build
 
 OPTIONS_DEFINE=	ALSA
 
diff --git audio/kstreamripper/Makefile audio/kstreamripper/Makefile
index 91b619a0a70a..f23d40560f01 100644
--- audio/kstreamripper/Makefile
+++ audio/kstreamripper/Makefile
@@ -12,9 +12,9 @@ COMMENT=	Program for recording streams for KDE4
 
 RUN_DEPENDS=	${LOCALBASE}/bin/streamripper:audio/streamripper
 
-USES=		cmake gettext-tools kde:4 tar:bzip2
+USES=		cmake gettext-tools kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
diff --git audio/kwave/Makefile audio/kwave/Makefile
index 64d09addb2ea..62ffe1590262 100644
--- audio/kwave/Makefile
+++ audio/kwave/Makefile
@@ -19,12 +19,12 @@ LIB_DEPENDS=	libaudiofile.so:audio/libaudiofile \
 		libvorbisenc.so:audio/libvorbis
 
 USES=		cmake:outsource desktop-file-utils gettext kde:5 \
-		localbase:ldflags pkgconfig tar:xz
+		localbase:ldflags pkgconfig qt:5 tar:xz
 USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm i18n iconthemes itemviews \
 		jobwidgets kio service solid sonnet textwidgets widgetsaddons \
 		xmlgui
-USE_QT5=	concurrent core dbus gui multimedia network widgets xml \
+USE_QT=		concurrent core dbus gui multimedia network widgets xml \
 		buildtools_build qmake_build
 
 OPTIONS_GROUP=			AUDIOPLUGIN
diff --git audio/lastfm-desktop/Makefile audio/lastfm-desktop/Makefile
index 2e6e4d9bdaa6..0a1101b28943 100644
--- audio/lastfm-desktop/Makefile
+++ audio/lastfm-desktop/Makefile
@@ -21,8 +21,8 @@ LIB_DEPENDS=	liblastfm.so:audio/liblastfm \
 USE_GITHUB=	yes
 GH_ACCOUNT=	lastfm
 
-USES=		gettext pkgconfig qmake gmake
-USE_QT4=	corelib dbus gui linguist_build moc_build network phonon \
+USES=		gettext pkgconfig qmake gmake qt:4
+USE_QT=		corelib dbus gui linguist_build moc_build network phonon \
 		rcc_build sql uic_build webkit xml
 SUB_FILES=	lastfm-desktop.sh
 
@@ -37,7 +37,8 @@ OPTIONS_SINGLE=		PHONON
 OPTIONS_SINGLE_PHONON=	GSTREAMER VLC
 OPTIONS_DEFAULT=	VLC
 GSTREAMER_DESC=		Multimedia via Phonon-GStreamer
-GSTREAMER_USE=		QT4=phonon-gst_run
+GSTREAMER_USES=	qt:4
+GSTREAMER_USE=		QT=phonon-gst_run
 VLC_DESC=		Multimedia via Phonon-VLC
 VLC_RUN_DEPENDS=	phonon-vlc-qt4>=0.6.1:multimedia/phonon-vlc@qt4
 
diff --git audio/libechonest/Makefile audio/libechonest/Makefile
index 6e273067c230..6aa0b0fcbd24 100644
--- audio/libechonest/Makefile
+++ audio/libechonest/Makefile
@@ -23,9 +23,9 @@ PLIST_SUB=	PORTVERSION=${PORTVERSION}
 TEST_CMAKE_BOOL=ECHONEST_BUILD_TESTS
 TEST_USE=	qt4=qtestlib_build,xml_build
 
-USES=		cmake pkgconfig
+USES=		cmake pkgconfig qt:4
 USE_GITHUB=	yes
 USE_LDCONFIG=	yes
-USE_QT4=	corelib qmake_build moc_build network rcc_build
+USE_QT=		corelib qmake_build moc_build network rcc_build
 
 .include <bsd.port.mk>
diff --git audio/libkcddb-kde4/Makefile audio/libkcddb-kde4/Makefile
index 8426afb53ff5..4bdf62d8efcc 100644
--- audio/libkcddb-kde4/Makefile
+++ audio/libkcddb-kde4/Makefile
@@ -11,9 +11,9 @@ COMMENT=	KDE CDDB library
 
 LIB_DEPENDS=	libmusicbrainz5.so:audio/libmusicbrainz5
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	qtestlib moc_build qmake_build rcc_build uic_build
+USE_QT=		qtestlib moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git audio/libkcddb/Makefile audio/libkcddb/Makefile
index 7ffbefa59910..74fe6170b8be 100644
--- audio/libkcddb/Makefile
+++ audio/libkcddb/Makefile
@@ -9,11 +9,11 @@ COMMENT=	KDE CDDB library
 
 LIB_DEPENDS=	libmusicbrainz5.so:audio/libmusicbrainz5
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets \
 		coreaddons ecm i18n jobwidgets kio service \
 		widgetsaddons
-USE_QT5=	core gui network widgets xml \
+USE_QT=		core gui network widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git audio/libkcompactdisc-kde4/Makefile audio/libkcompactdisc-kde4/Makefile
index aa89b940dd2e..6d11261fe338 100644
--- audio/libkcompactdisc-kde4/Makefile
+++ audio/libkcompactdisc-kde4/Makefile
@@ -9,9 +9,9 @@ CATEGORIES=	audio kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE library for interfacing with audio CDs
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	phonon moc_build qmake_build rcc_build uic_build
+USE_QT=		phonon moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 OPTIONS_DEFINE=	ALSA
diff --git audio/libkcompactdisc/Makefile audio/libkcompactdisc/Makefile
index 409f30e6296d..1be3b0810482 100644
--- audio/libkcompactdisc/Makefile
+++ audio/libkcompactdisc/Makefile
@@ -8,10 +8,10 @@ CATEGORIES=	audio kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE library for interfacing with audio CDs
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	coreaddons ecm emoticons i18n itemmodels itemviews \
 		kdelibs4support solid
-USE_QT5=	core dbus phonon4\
+USE_QT=		core dbus phonon4\
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git audio/liblastfm/Makefile audio/liblastfm/Makefile
index 84df07c7c9a3..f63c2ac9f6bf 100644
--- audio/liblastfm/Makefile
+++ audio/liblastfm/Makefile
@@ -13,18 +13,20 @@ COMMENT=	Qt C++ library for the Last.fm webservices
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake pkgconfig
+USES=		cmake pkgconfig 
 USE_GITHUB=	yes
 GH_ACCOUNT=	lastfm
 USE_LDCONFIG=	yes
 
 SLAVE?=		qt4
 .if ${SLAVE} == qt4
-USE_QT4=	corelib dbus network sql xml \
+USES+=		qt:4
+USE_QT=		corelib dbus network sql xml \
 		moc_build qmake_build rcc_build
 CMAKE_ON+=	BUILD_WITH_QT4
 .else
-USE_QT5=	core dbus network sql xml \
+USES+=		qt:5
+USE_QT=		core dbus network sql xml \
 		buildtools_build qmake_build
 CMAKE_OFF+=	BUILD_WITH_QT4
 QTVER_SUFFIX=	5
@@ -45,9 +47,10 @@ FINGERPRINT_BUILD_DEPENDS=	${NONEXISTENT}:math/fftw3:patch
 FINGERPRINT_CMAKE_ON=	-DLIBFFTW3_INCLUDE_DIR:PATH=`${MAKE} -C ${PORTSDIR}/math/fftw3 -VWRKSRC`/api
 
 .if ${SLAVE} == qt4
-TEST_USE=		QT4=qtestlib_build
+TEST_USES=	qt:4 qt:5
+TEST_USE=		QT=qtestlib_build
 .else
-TEST_USE=		QT5=testlib_build
+TEST_USE=		QT=testlib_build
 .endif
 TEST_CMAKE_BOOL=	BUILD_TESTS
 TEST_TEST_TARGET=	test
diff --git audio/lmms/Makefile audio/lmms/Makefile
index 94fec5233196..f5107a61cb8d 100644
--- audio/lmms/Makefile
+++ audio/lmms/Makefile
@@ -34,11 +34,11 @@ OPTIONS_DEFAULT=OSS
 
 USE_LDCONFIG=	yes
 USE_XORG=	x11 xext xft ice sm
-USE_QT4=	corelib gui xml moc_build uic_build rcc_build \
+USE_QT=		corelib gui xml moc_build uic_build rcc_build \
 		qmake_build
 USE_GITHUB=	yes
 GH_ACCOUNT=	LMMS
-USES=		cmake desktop-file-utils dos2unix pkgconfig shared-mime-info
+USES=		cmake desktop-file-utils dos2unix pkgconfig qt:4 shared-mime-info
 CMAKE_ARGS=	-DWANT_ALSA:BOOL=OFF \
 		-DWANT_CALF:BOOL=OFF \
 		-DWANT_CAPS:BOOL=OFF \
diff --git audio/midipp/Makefile audio/midipp/Makefile
index 46ecf7d28858..0b24bf05523b 100644
--- audio/midipp/Makefile
+++ audio/midipp/Makefile
@@ -25,7 +25,9 @@ OPTIONS_SINGLE_TOOLKIT=	QT4 QT5
 OPTIONS_DEFAULT=	QT5
 
 TOOLKIT_DESC=	Qt toolkit
-QT4_USE=	${_USE_QT4:S/^/QT4=/}
-QT5_USE=	${_USE_QT5:S/^/QT5=/} GL=gl
+QT4_USES=	qt:4
+QT4_USE=	${_USE_QT4:S/^/QT=/}
+QT5_USES=	qt:5
+QT5_USE=	${_USE_QT5:S/^/QT=/} GL=gl
 
 .include <bsd.port.mk>
diff --git audio/minitunes/Makefile audio/minitunes/Makefile
index f105f10a0e27..b482f74eab40 100644
--- audio/minitunes/Makefile
+++ audio/minitunes/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Just another music player
 
 LIB_DEPENDS=	libtag.so:audio/taglib
 
-USES=		qmake
-USE_QT4=	dbus gui moc_build network phonon rcc_build \
+USES=		qmake qt:4
+USE_QT=		dbus gui moc_build network phonon rcc_build \
 		sql uic_build xml
 INSTALLS_ICONS=	yes
 
diff --git audio/mixxx/Makefile audio/mixxx/Makefile
index d186476b21ef..c8fa5766f72e 100644
--- audio/mixxx/Makefile
+++ audio/mixxx/Makefile
@@ -33,8 +33,8 @@ WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 BROKEN_aarch64=		fails to compile: Exception("invalid machine type")
 BROKEN_powerpc64=	fails to configure: unmet dependencies: Could not find libprotobuf, libchromaprint, libmp4, and libwavpack
 
-USES=		scons iconv pkgconfig
-USE_QT4=	corelib gui network opengl script scripttools sql sql-sqlite3 \
+USES=		qt:4 scons iconv pkgconfig
+USE_QT=		corelib gui network opengl script scripttools sql sql-sqlite3 \
 		svg testlib xml xmlpatterns linguisttools_build moc_build \
 		qmake_build rcc_build uic_build
 USE_GL=		gl glu
diff --git audio/mixxx20/Makefile audio/mixxx20/Makefile
index c4a16b3fddab..4fc638236721 100644
--- audio/mixxx20/Makefile
+++ audio/mixxx20/Makefile
@@ -31,8 +31,8 @@ WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 BROKEN_aarch64=		fails to compile: Exception("invalid machine type")
 BROKEN_powerpc64=	fails to configure: unmet dependencies: Could not find libprotobuf, libchromaprint, libmp4, and libwavpack
 
-USES=		scons iconv pkgconfig
-USE_QT4=	corelib gui network opengl script scripttools sql sql-sqlite3 \
+USES=		qt:4 scons iconv pkgconfig
+USE_QT=		corelib gui network opengl script scripttools sql sql-sqlite3 \
 		svg testlib xml xmlpatterns linguisttools_build moc_build \
 		qmake_build rcc_build uic_build
 USE_GL=		gl glu
diff --git audio/mumble/Makefile audio/mumble/Makefile
index a51bc42ea108..ccaae06f37c8 100644
--- audio/mumble/Makefile
+++ audio/mumble/Makefile
@@ -21,13 +21,13 @@ LIB_DEPENDS+=	libspeex.so:audio/speex \
 
 PLIST_SUB+=	PORTVERSION="${PORTVERSION}"
 
-USES=		compiler cpe desktop-file-utils gmake pkgconfig qmake ssl
+USES=		compiler cpe desktop-file-utils gmake pkgconfig qmake qt:4 ssl
 USE_GITHUB=	yes
 GH_ACCOUNT=	mumble-voip
 GH_PROJECT=	mumble celt-0.7.0:mumble_celt_0_7 celt-0.11.0:mumble_celt_0_11
 GH_TAGNAME=	5a16cda:mumble_celt_0_7 e18de77:mumble_celt_0_11
 GH_SUBDIR=	celt-0.7.0-src:mumble_celt_0_7 celt-0.11.0-src:mumble_celt_0_11
-USE_QT4=	gui svg iconengines_run xml sql network l10n \
+USE_QT=		gui svg iconengines_run xml sql network l10n \
 		linguist_build moc_build rcc_build uic_build \
 		opengl sql-sqlite3_run corelib
 USE_LDCONFIG=	yes
@@ -45,7 +45,8 @@ OPTIONS_DEFINE=	DBUS BONJOUR PORTAUDIO
 OPTIONS_DEFAULT=	DBUS
 
 DBUS_VARS_OFF=	CONFIG+=no-dbus
-DBUS_USE=	QT4=dbus
+DBUS_USES=	qt:4
+DBUS_USE=	QT=dbus
 
 BONJOUR_DESC=		Bonjour support
 BONJOUR_VARS_OFF=	CONFIG+=no-bonjour
diff --git audio/murmur/Makefile audio/murmur/Makefile
index 706e54a5a0bf..24a0d088089f 100644
--- audio/murmur/Makefile
+++ audio/murmur/Makefile
@@ -17,8 +17,8 @@ LIB_DEPENDS=	libprotobuf.so:devel/protobuf
 
 USERS=		murmur
 GROUPS=		murmur
-USES=		compiler:c++11-lang qmake pkgconfig ssl
-USE_QT4=	moc_build corelib network sql xml
+USES=		compiler:c++11-lang qmake pkgconfig qt:4 ssl
+USE_QT=		moc_build corelib network sql xml
 
 USE_GITHUB=	YES
 GH_ACCOUNT=	mumble-voip
@@ -46,7 +46,7 @@ CONFIG+=	no-ice
 .endif
 
 .if ${PORT_OPTIONS:MDBUS}
-USE_QT4+=	dbus
+USE_QT+=	dbus
 .else
 CONFIG+=	no-dbus
 .endif
@@ -58,13 +58,13 @@ CONFIG+=	no-bonjour
 .endif
 
 .if ${PORT_OPTIONS:MMYSQL}
-USE_QT4+=	sql-mysql
+USE_QT+=	sql-mysql
 .else
 CONFIG+=	no-sql-mysql
 .endif
 
 .if ${PORT_OPTIONS:MSQLITE}
-USE_QT4+=	sql-sqlite3_run
+USE_QT+=	sql-sqlite3_run
 .else
 CONFIG+=	no-sqlite3_run
 .endif
diff --git audio/musescore/Makefile audio/musescore/Makefile
index 4998c3304295..67e609d1fd20 100644
--- audio/musescore/Makefile
+++ audio/musescore/Makefile
@@ -23,8 +23,8 @@ LIB_DEPENDS=	libmp3lame.so:audio/lame \
 		libfreetype.so:print/freetype2
 
 USES=		cmake:outsource compiler:c++11-lib desktop-file-utils \
-		pkgconfig shared-mime-info zip
-USE_QT5=	core gui widgets opengl concurrent designer help network \
+		pkgconfig qt:5 shared-mime-info zip
+USE_QT=		core gui widgets opengl concurrent designer help network \
 		scripttools qml quick svg sql printsupport testlib webkit \
 		xml xmlpatterns \
 		buildtools_build linguisttools_build qmake_build uitools_build
diff --git audio/mythplugin-mythmusic/Makefile audio/mythplugin-mythmusic/Makefile
index 8c40ab0b0875..ed428ce8667d 100644
--- audio/mythplugin-mythmusic/Makefile
+++ audio/mythplugin-mythmusic/Makefile
@@ -20,11 +20,12 @@ LIB_DEPENDS=	libFLAC.so:audio/flac \
 		libvorbis.so:audio/libvorbis \
 		libmyth-29.so:multimedia/mythtv
 
+USES=	qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	MythTV
 GH_PROJECT=	mythtv
 USE_LDCONFIG=	yes
-USE_QT5=	buildtools_build core gui qmake_build sql xml
+USE_QT=		buildtools_build core gui qmake_build sql xml
 
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	--prefix="${PREFIX}" --disable-all \
diff --git audio/padthv1-lv2/Makefile audio/padthv1-lv2/Makefile
index 86e5767d295a..fa94e8bd8057 100644
--- audio/padthv1-lv2/Makefile
+++ audio/padthv1-lv2/Makefile
@@ -17,12 +17,12 @@ LIB_DEPENDS=	libfftw3.so:math/fftw3 \
 		libjack.so:audio/jack \
 		liblo.so:audio/liblo
 
-USES=		autoreconf gmake pkgconfig shared-mime-info
+USES=		autoreconf gmake pkgconfig qt:5 shared-mime-info
 GNU_CONFIGURE=	yes
 USE_GITHUB=	yes
 GH_ACCOUNT=	rncbc
 USE_GL=		gl
-USE_QT5=	core gui widgets xml buildtools_build qmake_build
+USE_QT=		core gui widgets xml buildtools_build qmake_build
 
 PLIST_SUB=	SHL3=${PORTVERSION} SHL2=${PORTVERSION:R} SHL1=${PORTVERSION:R:R}
 
diff --git audio/pc-mixer/Makefile audio/pc-mixer/Makefile
index e4ce0f18a509..905034dfb7eb 100644
--- audio/pc-mixer/Makefile
+++ audio/pc-mixer/Makefile
@@ -13,9 +13,9 @@ WRKSRC_SUBDIR=	src-qt5
 MAKE_ARGS=	PREFIX=${STAGEDIR}${PREFIX}
 
 MAKE_JOBS_UNSAFE=yes
-USES=		qmake shebangfix tar:xz
+USES=		qmake qt:5 shebangfix tar:xz
 USE_LDCONFIG=	yes
-USE_QT5=	core gui network svg linguist \
+USE_QT=		core gui network svg linguist \
 		buildtools x11extras widgets multimedia
 USE_GL+=	gl
 
diff --git audio/plasma5-plasma-pa/Makefile audio/plasma5-plasma-pa/Makefile
index d2dcac4f46c9..2e5a58821370 100644
--- audio/plasma5-plasma-pa/Makefile
+++ audio/plasma5-plasma-pa/Makefile
@@ -11,11 +11,11 @@ LIB_DEPENDS=	libcanberra.so:audio/libcanberra \
 		libpulse.so:audio/pulseaudio
 
 USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 \
-		pkgconfig shebangfix tar:xz
+		pkgconfig qt:5 shebangfix tar:xz
 USE_GNOME=	gconf2
 USE_KDE=	config configwidgets coreaddons ecm globalaccel i18n \
 		kdeclarative package plasma-framework
-USE_QT5=	core dbus gui network qml quick widgets \
+USE_QT=		core dbus gui network qml quick widgets \
 		buildtools_build qmake_build
 
 SHEBANG_FILES=	data/plasmaVolumeDisableKMixAutostart.pl
diff --git audio/polyphone/Makefile audio/polyphone/Makefile
index 5b0bc6a3c7c2..1d3cdad48fe7 100644
--- audio/polyphone/Makefile
+++ audio/polyphone/Makefile
@@ -19,9 +19,9 @@ LIB_DEPENDS=	libjack.so:audio/jack \
 		libstk-4.6.0.so:audio/stk \
 		libvorbisfile.so:audio/libvorbis
 
-USES=		compiler:c++11-lang desktop-file-utils pkgconfig qmake:outsource shared-mime-info zip
+USES=		compiler:c++11-lang desktop-file-utils pkgconfig qmake:outsource qt:5 shared-mime-info zip
 USE_GL=		gl
-USE_QT5=	core concurrent gui network printsupport svg widgets buildtools_build qmake_build
+USE_QT=		core concurrent gui network printsupport svg widgets buildtools_build qmake_build
 USE_CXXSTD=	c++11
 QMAKE_ARGS=	DEFINES=USE_LOCAL_QCUSTOMPLOT
 CXXFLAGS+=	-D__UNIX_JACK__
diff --git audio/qjackctl/Makefile audio/qjackctl/Makefile
index 341c0d2e9b82..a83a09c6bba2 100644
--- audio/qjackctl/Makefile
+++ audio/qjackctl/Makefile
@@ -14,11 +14,11 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libjack.so:audio/jack
 
-USES=		autoreconf compiler:c++11-lib gmake localbase pkgconfig
+USES=		autoreconf compiler:c++11-lib gmake localbase pkgconfig qt:5
 GNU_CONFIGURE=	yes
 USE_GITHUB=	yes
 GH_ACCOUNT=	rncbc
-USE_QT5=	core gui widgets x11extras xml buildtools_build linguisttools_build qmake_build
+USE_QT=		core gui widgets x11extras xml buildtools_build linguisttools_build qmake_build
 USE_GL=		gl
 USE_CXXSTD=	c++11
 
diff --git audio/qmidiarp/Makefile audio/qmidiarp/Makefile
index 5f698346ed0e..9ad98a4f3c38 100644
--- audio/qmidiarp/Makefile
+++ audio/qmidiarp/Makefile
@@ -22,10 +22,10 @@ LIB_DEPENDS=	libasound.so:audio/alsa-lib \
 PORTSCOUT=	limit:^qmidiarp
 
 USES=		autoreconf compiler:c++11-lib desktop-file-utils \
-		gmake localbase libtool pkgconfig
+		gmake localbase libtool pkgconfig qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	emuse
-USE_QT5=	core gui network widgets buildtools_build \
+USE_QT=		core gui network widgets buildtools_build \
 		linguisttools_build
 USE_CXXSTD=	c++11
 GNU_CONFIGURE=	yes
diff --git audio/qmpdclient/Makefile audio/qmpdclient/Makefile
index 546f64a246b8..98dcaff2bcd3 100644
--- audio/qmpdclient/Makefile
+++ audio/qmpdclient/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Easy to use musicpd client written in Qt4
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake tar:bzip2
-USE_QT4=	moc_build rcc_build uic_build \
+USES=		qmake qt:4 tar:bzip2
+USE_QT=		moc_build rcc_build uic_build \
 		corelib gui network xml xmlpatterns
 INSTALLS_ICONS=	yes
 
@@ -25,10 +25,12 @@ WRKSRC=		${WRKDIR}/${PORTNAME}
 
 OPTIONS_SUB=	yes
 
-NLS_USE=	QT4=linguisttools_build
+NLS_USES=	qt:4
+NLS_USE=	QT=linguisttools_build
 
 DBUS_QMAKE_ON=	CONFIG+=qdbus
-DBUS_USE=	QT4=dbus
+DBUS_USES=	qt:4
+DBUS_USE=	QT=dbus
 
 DEBUG_QMAKE_ON=	CONFIG+=debug
 
diff --git audio/qsampler/Makefile audio/qsampler/Makefile
index 740765c8273f..b3b0109e7740 100644
--- audio/qsampler/Makefile
+++ audio/qsampler/Makefile
@@ -19,7 +19,6 @@ RUN_DEPENDS=	linuxsampler:audio/linuxsampler
 LDFLAGS+=	-L${LOCALBASE}/lib
 
 USES=	autoreconf gmake pkgconfig shared-mime-info
-QT_NONSTANDARD=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	ac_cv_path_ac_cv_qmake=${QMAKE} \
 		ac_cv_path_ac_moc=${MOC} \
@@ -38,13 +37,15 @@ OPTIONS_DEFAULT=	QT5
 
 TOOLKIT_DESC=	Qt toolkit
 
-QT4_USE=	qt4=corelib,gui \
-		qt4=linguisttools_build \
-		qt4=moc_build,qmake_build,rcc_build,uic_build
+QT4_USES=	qmake:no_env qt:4
+QT4_USE=	qt=corelib,gui \
+		qt=linguisttools_build \
+		qt=moc_build,qmake_build,rcc_build,uic_build
 QT4_CONFIGURE_ENABLE=	qt4
 
-QT5_USE=	qt5=core,gui,widgets,x11extras \
-		qt5=buildtools_build,linguisttools_build,qmake_build
+QT5_USES=	qmake:no_env qt:5
+QT5_USE=	qt=core,gui,widgets,x11extras \
+		qt=buildtools_build,linguisttools_build,qmake_build
 QT5_CONFIGURE_ENABLE=	qt5
 
 post-configure:
diff --git audio/qsynth/Makefile audio/qsynth/Makefile
index c77f342534de..b0a53a29a09b 100644
--- audio/qsynth/Makefile
+++ audio/qsynth/Makefile
@@ -15,9 +15,9 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libfluidsynth.so:audio/fluidsynth
 
-USES=		autoreconf gmake pkgconfig
+USES=		autoreconf gmake pkgconfig qt:5
 USE_CXXSTD=	c++11
-USE_QT5=	core gui widgets x11extras buildtools_build linguisttools_build qmake_build
+USE_QT=		core gui widgets x11extras buildtools_build linguisttools_build qmake_build
 USE_GL=		gl
 USE_GITHUB=	yes
 GH_ACCOUNT=	rncbc
diff --git audio/quimup/Makefile audio/quimup/Makefile
index cb7b40fc073b..bbdf81c02b0f 100644
--- audio/quimup/Makefile
+++ audio/quimup/Makefile
@@ -18,8 +18,8 @@ LIB_DEPENDS=	libmpdclient.so:audio/libmpdclient \
 
 WRKSRC=		${WRKDIR}/Quimup_${PORTVERSION}
 
-USES=		pkgconfig qmake compiler:c++11-lang
-USE_QT5=	core gui network widgets buildtools_build
+USES=		pkgconfig qmake compiler:c++11-lang qt:5
+USE_QT=		core gui network widgets buildtools_build
 USE_GL=		gl
 
 CXXFLAGS+=	-std=c++11
diff --git audio/rosegarden/Makefile audio/rosegarden/Makefile
index f42b5f706bf5..cae9802b4cc7 100644
--- audio/rosegarden/Makefile
+++ audio/rosegarden/Makefile
@@ -34,13 +34,14 @@ OPTIONS_DEFAULT=	QT4
 
 LIRC_LIB_DEPENDS=	liblirc_client.so:comms/lirc
 LIRC_CMAKE_ON=		-DENABLE_LIRC:BOOL=ON
-QT4_USE=		qt4=gui,network,testlib,xml \
-			qt4=linguisttools_build,moc_build,qmake_build \
-			qt4=rcc_build,uic_build
+QT4_USES=		qt:4
+QT4_USE=		qt=gui,network,testlib,xml \
+			qt=linguisttools_build,moc_build,qmake_build \
+			qt=rcc_build,uic_build
 QT4_CMAKE_ON=		-DUSE_QT4:BOOL=ON
-QT5_USES=		compiler:c++11-lib
-QT5_USE=		qt5=network,printsupport,testlib,widgets,xml \
-			qt5=buildtools_build,linguisttools_build,qmake_build
+QT5_USES=		compiler:c++11-lib qt:5
+QT5_USE=		qt=network,printsupport,testlib,widgets,xml \
+			qt=buildtools_build,linguisttools_build,qmake_build
 QT5_CMAKE_ON=		-DUSE_QT5:BOOL=ON
 TOOLKIT_DESC=		Qt toolkit
 
diff --git audio/sayonara/Makefile audio/sayonara/Makefile
index d7e3d7a842ad..1be73df0f82d 100644
--- audio/sayonara/Makefile
+++ audio/sayonara/Makefile
@@ -18,10 +18,10 @@ LIB_DEPENDS=	libtag.so:audio/taglib \
 		libmtp.so:multimedia/libmtp
 
 USES=		cmake:outsource compiler:c++11-lib desktop-file-utils \
-		pkgconfig
+		pkgconfig qt:5
 USE_GNOME=	glib20
 USE_GSTREAMER1=	flac libav mpg123 ogg opus vorbis
-USE_QT5=	dbus core gui network sql sql-sqlite3_run widgets xml \
+USE_QT=		dbus core gui network sql sql-sqlite3_run widgets xml \
 		buildtools_build qmake_build linguisttools_build
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-player
diff --git audio/simon/Makefile audio/simon/Makefile
index 49faf22cc72f..b45bbb390d0c 100644
--- audio/simon/Makefile
+++ audio/simon/Makefile
@@ -17,9 +17,9 @@ LIB_DEPENDS=	libasound.so:audio/alsa-lib \
 		libsphinxad.so:audio/sphinxbase \
 		libqwt6.so:x11-toolkits/qwt6@qt4
 
-USES=		cmake:outsource gettext kde:4 tar:bz2
+USES=		cmake:outsource gettext kde:4 qt:4 tar:bz2
 USE_KDE=	kdelibs automoc4 pimlibs
-USE_QT4=	accessible corelib dbus gui network script sql svg testlib xml \
+USE_QT=		accessible corelib dbus gui network script sql svg testlib xml \
 		moc_build qmake_build rcc_build uic_build
 USE_XORG=	x11 xtst
 
diff --git audio/skype-call-recorder/Makefile audio/skype-call-recorder/Makefile
index 18a21f40c9c0..bbb40a3cc237 100644
--- audio/skype-call-recorder/Makefile
+++ audio/skype-call-recorder/Makefile
@@ -15,8 +15,8 @@ LIB_DEPENDS=	libmp3lame.so:audio/lame \
 		libid3.so:audio/id3lib \
 		libvorbisenc.so:audio/libvorbis
 
-USES=		cmake
-USE_QT4=	corelib dbus gui network \
+USES=		cmake qt:4
+USE_QT=		corelib dbus gui network \
 		qmake_build moc_build rcc_build uic_build
 
 PLIST_FILES=	bin/skype-call-recorder \
diff --git audio/sonic-visualiser/Makefile audio/sonic-visualiser/Makefile
index 1c77d0efa6ab..15e74c72a039 100644
--- audio/sonic-visualiser/Makefile
+++ audio/sonic-visualiser/Makefile
@@ -21,10 +21,10 @@ LIB_DEPENDS=	libfftw3.so:math/fftw3 \
 		libsord-0.so:devel/sord \
 		libvamp-hostsdk.so:audio/vamp-plugin-sdk
 
-USES=	autoreconf desktop-file-utils pkgconfig
+USES=	autoreconf desktop-file-utils pkgconfig qt:5
 
 GNU_CONFIGURE=	yes
-USE_QT5=	buildtools_build core gui network qmake_build testlib widgets xml
+USE_QT=		buildtools_build core gui network qmake_build testlib widgets xml
 USE_XORG=	x11
 USE_GL=		gl
 
diff --git audio/soundkonverter/Makefile audio/soundkonverter/Makefile
index 369c3062482f..0d489df16cb1 100644
--- audio/soundkonverter/Makefile
+++ audio/soundkonverter/Makefile
@@ -17,9 +17,9 @@ LIB_DEPENDS=	libtag.so:audio/taglib \
 		libphonon.so:multimedia/phonon
 
 GH_ACCOUNT=	HessiJames
-USES=		cmake compiler:c++11-lang kde:4
+USES=		cmake compiler:c++11-lang kde:4 qt:4
 USE_GITHUB=	yes
-USE_QT4=	corelib dbus gui network moc_build qmake_build rcc_build svg uic_build xml
+USE_QT=		corelib dbus gui network moc_build qmake_build rcc_build svg uic_build xml
 USE_KDE=	automoc4 kdelibs libkcddb
 WRKSRC_SUBDIR=	src
 
diff --git audio/supercollider/Makefile audio/supercollider/Makefile
index f9921c0dfdfc..e5e7160999b2 100644
--- audio/supercollider/Makefile
+++ audio/supercollider/Makefile
@@ -20,9 +20,9 @@ LIB_DEPENDS=	libavahi-client.so:net/avahi-app \
 		libsndfile.so:audio/libsndfile \
 		libfftw3f.so:math/fftw3-float
 
-USES=		cmake:outsource iconv localbase pkgconfig readline \
+USES=		cmake:outsource iconv localbase pkgconfig qt:5 readline \
 		shared-mime-info tar:bzip2
-USE_QT5=	buildtools_build concurrent core gui linguisttools location \
+USE_QT=		buildtools_build concurrent core gui linguisttools location \
 		network opengl printsupport qmake_build qml quick sensors \
 		sql webkit widgets
 USE_LDCONFIG=	yes
diff --git audio/virtual_oss_ctl/Makefile audio/virtual_oss_ctl/Makefile
index d49d5879bfde..c70d27067d1f 100644
--- audio/virtual_oss_ctl/Makefile
+++ audio/virtual_oss_ctl/Makefile
@@ -14,7 +14,7 @@ LICENSE=	BSD2CLAUSE
 
 RUN_DEPENDS=	virtual_oss:audio/virtual_oss
 
-USES=		qmake tar:bzip2
-USE_QT4=	corelib gui qmake_build moc_build rcc_build
+USES=		qmake qt:4 tar:bzip2
+USE_QT=		corelib gui qmake_build moc_build rcc_build
 
 .include <bsd.port.mk>
diff --git audio/vmpk/Makefile audio/vmpk/Makefile
index 301e01bf39b1..d03f1215341f 100644
--- audio/vmpk/Makefile
+++ audio/vmpk/Makefile
@@ -15,8 +15,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libdrumstick-rt.so:audio/drumstick
 
-USES=		cmake:outsource pkgconfig tar:bz2
-USE_QT5=	core gui network svg widgets x11extras \
+USES=		cmake:outsource pkgconfig qt:5 tar:bz2
+USE_QT=		core gui network svg widgets x11extras \
 		buildtools_build linguisttools_build qmake_build
 USE_XORG=	xcb
 
diff --git biology/ugene/Makefile biology/ugene/Makefile
index 5874cf044173..66460d5de368 100644
--- biology/ugene/Makefile
+++ biology/ugene/Makefile
@@ -20,9 +20,9 @@ RUN_DEPENDS=	bash:shells/bash
 
 BROKEN_aarch64=	Fails to build: invokes x86 asm
 
-USES=		desktop-file-utils qmake
+USES=		desktop-file-utils qmake qt:5
 USE_GL=		glu
-USE_QT5=	buildtools_build linguisttools_build scripttools_build \
+USE_QT=		buildtools_build linguisttools_build scripttools_build \
 		gui network printsupport script sql svg webkit widgets xml \
 		imageformats_run
 
diff --git cad/freecad/Makefile cad/freecad/Makefile
index 0eed636efce7..c15ffcee4156 100644
--- cad/freecad/Makefile
+++ cad/freecad/Makefile
@@ -31,10 +31,10 @@ LIB_DEPENDS=	libexpat.so:textproc/expat2 \
 RUN_DEPENDS=	pivy>0:graphics/py-pivy@${PY_FLAVOR}
 
 USES=		dos2unix compiler:c++11-lib cmake:outsource eigen:3 fortran jpeg \
-		python:2.7 localbase
+		python:2.7 localbase qt:4
 USE_XORG=	ice sm x11 xext xt
 USE_GL=		gl glu
-USE_QT4=	qmake_build corelib gui moc_build network opengl rcc_build \
+USE_QT=		qmake_build corelib gui moc_build network opengl rcc_build \
 		uic_build svg xml webkit
 USE_LDCONFIG=	yes
 DOS2UNIX_GLOB=	*.txt *.h *.cpp *.py *.qss *.csv *.pov *.stp *.ui *.wrl *.WRL
diff --git cad/fritzing/Makefile cad/fritzing/Makefile
index 5b56437b1781..f6d35f48807b 100644
--- cad/fritzing/Makefile
+++ cad/fritzing/Makefile
@@ -14,8 +14,8 @@ LICENSE=	GPLv2+
 
 SUB_FILES+=	pkg-install
 
-USES=		dos2unix gmake python qmake tar:bzip2
-USE_QT5=	buildtools concurrent core dbus gui imageformats network printsupport qmake serialport sql-sqlite3 svg xml
+USES=		dos2unix gmake python qmake qt:5 tar:bzip2
+USE_QT=		buildtools concurrent core dbus gui imageformats network printsupport qmake serialport sql-sqlite3 svg xml
 DOS2UNIX_REGEX=	.*pro
 INSTALLS_ICONS=	yes
 USE_GITHUB=	yes
diff --git cad/klayout/Makefile cad/klayout/Makefile
index 4405d39d0da4..726a76837ebe 100644
--- cad/klayout/Makefile
+++ cad/klayout/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Qt-based GDS2 Viewer
 
 LICENSE=	GPLv2
 
-USES=		compiler:c++0x gmake python
+USES=		compiler:c++0x gmake python qt:4
 USE_RUBY=	yes
-USE_QT4=	corelib designer gui network moc_build sql uic_build \
+USE_QT=		corelib designer gui network moc_build sql uic_build \
 		rcc_build qt3support xml
 USE_LDCONFIG=	yes
 PLIST_FILES=	bin/klayout \
diff --git cad/layouteditor/Makefile cad/layouteditor/Makefile
index 5bea2f88f69e..c74c78af735f 100644
--- cad/layouteditor/Makefile
+++ cad/layouteditor/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libttf.so:print/freetype
 BROKEN_armv6=		fails to compile: no matching member function for call to 'map'
 BROKEN_armv7=		fails to compile: no matching member function for call to 'map'
 
-USES=		qmake zip
-USE_QT4=	corelib gui network moc_build sql uic_build \
+USES=		qmake qt:4 zip
+USE_QT=		corelib gui network moc_build sql uic_build \
 		rcc_build qt3support xml
 WRKSRC=		${WRKDIR}/layout
 PLIST_FILES=	bin/layout
diff --git cad/leocad/Makefile cad/leocad/Makefile
index 723906a3a93d..2cc7a695ba0b 100644
--- cad/leocad/Makefile
+++ cad/leocad/Makefile
@@ -19,8 +19,8 @@ LIB_DEPENDS=	libpng.so:graphics/png
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-USES=		desktop-file-utils gmake jpeg pkgconfig qmake shared-mime-info
-USE_QT4=	moc_build rcc_build uic_build iconengines_run imageformats_run \
+USES=		desktop-file-utils gmake jpeg pkgconfig qmake qt:4 shared-mime-info
+USE_QT=		moc_build rcc_build uic_build iconengines_run imageformats_run \
 		corelib gui network opengl
 USE_GL=		glut
 USE_GNOME=	gtk20
diff --git cad/librecad/Makefile cad/librecad/Makefile
index e9d55b3ac548..33e60c73fa12 100644
--- cad/librecad/Makefile
+++ cad/librecad/Makefile
@@ -15,12 +15,12 @@ BUILD_DEPENDS=	${LOCALBASE}/include/boost/version.hpp:devel/boost-libs
 LIB_DEPENDS=	libmuparser.so:math/muparser \
 		libfreetype.so:print/freetype2
 
-USES=		compiler:c++11-lib desktop-file-utils pkgconfig qmake
+USES=		compiler:c++11-lib desktop-file-utils pkgconfig qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	LibreCAD
 GH_PROJECT=	LibreCAD
 USE_GL=		gl
-USE_QT5=	core gui printsupport svg widgets \
+USE_QT=		core gui printsupport svg widgets \
 		buildtools_build linguisttools_build
 
 QMAKE_ARGS+=	BOOST_DIR="${LOCALBASE}"
diff --git cad/meshlab/Makefile cad/meshlab/Makefile
index 6f859088c4f4..09895e20fc48 100644
--- cad/meshlab/Makefile
+++ cad/meshlab/Makefile
@@ -22,10 +22,10 @@ EXTRACT_DEPENDS=gtar:archivers/gtar
 LIB_DEPENDS=	libQtSolutions_SOAP-head.so:devel/qt4-qtsolutions-soap	\
 		libmpir.so:math/mpir
 
-USES=		compiler:c++11-lib dos2unix qmake tar:tgz
+USES=		compiler:c++11-lib dos2unix qmake qt:4 tar:tgz
 USE_CXXSTD=	c++11
 USE_GL=		glew glu
-USE_QT4=	moc_build rcc_build uic_build corelib gui xml \
+USE_QT=		moc_build rcc_build uic_build corelib gui xml \
 		xmlpatterns opengl network script
 USE_LDCONFIG=	yes
 DOS2UNIX_FILES=	external/structuresynth/ssynth/SyntopiaCore/GLEngine/Object3D.h \
diff --git cad/openscad-devel/Makefile cad/openscad-devel/Makefile
index ddafa05daf94..578119793fa3 100644
--- cad/openscad-devel/Makefile
+++ cad/openscad-devel/Makefile
@@ -27,7 +27,7 @@ LIB_DEPENDS=	libgmp.so:math/gmp \
 CONFLICTS=	openscad
 
 USES=		bison compiler:c++11-lang desktop-file-utils eigen:3 gettext-tools \
-		pkgconfig python:run qmake shebangfix
+		pkgconfig python:run qmake qt:4 shebangfix
 USE_GITHUB=	yes
 GH_ACCOUNT=	openscad
 GH_PROJECT=	openscad
@@ -35,7 +35,7 @@ GH_TAGNAME=	179074dff8c23cbc0e651ce8463737df0006f4ca
 
 #SHEBANG_FILES=	libraries/MCAD/get_submodules.py
 USE_GL=		glu glew
-USE_QT4=	corelib gui opengl moc_build uic_build rcc_build
+USE_QT=		corelib gui opengl moc_build uic_build rcc_build
 PLIST_SUB=	PORTVERSION=${PORTVERSION}
 QMAKE_ENV=	EIGENDIR=${LOCALBASE}/include/eigen3
 QMAKE_ARGS+=	VERSION=${PORTVERSION} \
diff --git cad/openscad/Makefile cad/openscad/Makefile
index a91c37490a5c..50ac0c96ceac 100644
--- cad/openscad/Makefile
+++ cad/openscad/Makefile
@@ -26,10 +26,10 @@ LIB_DEPENDS=	libgmp.so:math/gmp \
 CONFLICTS=      openscad-devel
 
 USES=		bison compiler:c++11-lang desktop-file-utils eigen:3 gettext-tools \
-		pkgconfig python:run qmake shebangfix
+		pkgconfig python:run qmake qt:4 shebangfix
 SHEBANG_FILES=	libraries/MCAD/get_submodules.py
 USE_GL=		glu glew
-USE_QT4=	corelib gui opengl moc_build uic_build rcc_build
+USE_QT=		corelib gui opengl moc_build uic_build rcc_build
 PLIST_SUB=	PORTVERSION=${PORTVERSION}
 QMAKE_ENV=	EIGENDIR=${LOCALBASE}/include/eigen3
 QMAKE_ARGS+=	VERSION=${PORTVERSION} \
diff --git cad/qcad/Makefile cad/qcad/Makefile
index b9ba09b4a339..e9aa332f1c07 100644
--- cad/qcad/Makefile
+++ cad/qcad/Makefile
@@ -20,10 +20,10 @@ LIB_DEPENDS=	libquazip.so:archivers/quazip@qt4
 
 MAKE_JOBS_UNSAFE=yes
 
-USES=		gmake qmake
+USES=		gmake qmake qt:4
 USE_GITHUB=	yes
 USE_LDCONFIG=	yes
-USE_QT4=	qmake_build codecs-cn codecs-jp codecs-kr codecs-tw corelib \
+USE_QT=		qmake_build codecs-cn codecs-jp codecs-kr codecs-tw corelib \
 		designer gui help imageformats moc_build network opengl rcc_build script \
 		scripttools sql svg uic_build xml xmlpatterns webkit
 USE_GL=		glu
diff --git cad/qelectrotech/Makefile cad/qelectrotech/Makefile
index 42d0e1822f27..be47c3ccbfdd 100644
--- cad/qelectrotech/Makefile
+++ cad/qelectrotech/Makefile
@@ -15,8 +15,8 @@ COMMENT=	QElectroTech is application to design electric diagrams
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		compiler:c++11-lib desktop-file-utils qmake shared-mime-info
-USE_QT5=	buildtools_build gui network printsupport \
+USES=		compiler:c++11-lib desktop-file-utils qmake qt:5 shared-mime-info
+USE_QT=		buildtools_build gui network printsupport \
 		sql-sqlite3 svg xml
 
 OPTIONS_DEFINE=       DEBUG
diff --git cad/qfsm/Makefile cad/qfsm/Makefile
index 5ebb21f46faf..2978b987ec61 100644
--- cad/qfsm/Makefile
+++ cad/qfsm/Makefile
@@ -14,9 +14,9 @@ LICENSE=	GPLv3+
 
 OPTIONS_DEFINE=	GRAPHVIZ DOCS EXAMPLES
 
-USES=		tar:bzip2 cmake desktop-file-utils
+USES=		qt:4 tar:bzip2 cmake desktop-file-utils
 USE_XORG=	xi
-USE_QT4=	corelib gui qt3support svg xml \
+USE_QT=		corelib gui qt3support svg xml \
 		moc_build qmake_build rcc_build uic_build
 INSTALLS_ICONS=	yes
 
diff --git cad/qucs/Makefile cad/qucs/Makefile
index 3a248431b404..610872ba3f1a 100644
--- cad/qucs/Makefile
+++ cad/qucs/Makefile
@@ -15,9 +15,9 @@ LICENSE_FILE=	${WRKSRC}/qucs/COPYING
 BUILD_DEPENDS=	gperf:devel/gperf \
 		admsXml:cad/adms
 
-USE_QT4=	moc_build uic_build rcc_build linguisttools_build \
+USE_QT=		moc_build uic_build rcc_build linguisttools_build \
 		corelib gui xml svg script qt3support
-USES=		autoreconf compiler:c++11-lib bison gmake libtool shebangfix
+USES=		autoreconf compiler:c++11-lib bison gmake libtool qt:4 shebangfix
 SHEBANG_FILES=	qucs/contrib/ps2sp
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--disable-doc
diff --git chinese/fcitx-libpinyin/Makefile chinese/fcitx-libpinyin/Makefile
index a5ec9d328094..0e34fa6026a3 100644
--- chinese/fcitx-libpinyin/Makefile
+++ chinese/fcitx-libpinyin/Makefile
@@ -19,7 +19,7 @@ LICENSE=	GPLv2
 LIB_DEPENDS=	libfcitx-config.so:chinese/fcitx \
 		libpinyin.so:chinese/libpinyin
 
-USES=		tar:xz cmake gettext pkgconfig
+USES=		qt:4 tar:xz cmake gettext pkgconfig
 INSTALLS_ICONS=	yes
 
 _MODEL_VER=	20130308
@@ -31,7 +31,7 @@ QT4_DESC=	Enable Qt4 for dictmanager
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MQT4}
-USE_QT4=	qmake_build moc_build rcc_build uic_build gui webkit
+USE_QT=		qmake_build moc_build rcc_build uic_build gui webkit
 USE_LDCONFIG=	${PREFIX}/lib/fcitx/qt
 PLIST_SUB+=	QT4=""
 .else
diff --git chinese/fcitx/Makefile chinese/fcitx/Makefile
index 472450958e2e..aeea650c7e06 100644
--- chinese/fcitx/Makefile
+++ chinese/fcitx/Makefile
@@ -39,7 +39,7 @@ USE_GNOME=	pango intltool libxml2 introspection
 USE_KDE=	ecm
 USE_XORG=	x11 xext xkbfile sm ice
 USE_LDCONFIG=	yes
-USES=		tar:xz cmake:noninja desktop-file-utils \
+USES=		qt:4 tar:xz cmake:noninja desktop-file-utils \
 		gettext-tools:build,run gettext-runtime iconv:wchar_t \
 		kde:5 pkgconfig shared-mime-info
 INSTALLS_ICONS=	yes
@@ -87,7 +87,7 @@ SUB_LIST+=	GTK3_IM=xim
 .endif
 
 .if ${PORT_OPTIONS:MQT4}
-USE_QT4+=	qmake_build moc_build rcc_build uic_build dbus gui inputmethods corelib
+USE_QT+=		qmake_build moc_build rcc_build uic_build dbus gui inputmethods corelib
 USE_LDCONFIG+=	${PREFIX}/lib/fcitx/qt
 PLIST_SUB+=	QT4=""
 .else
diff --git chinese/gcin-qt4/Makefile chinese/gcin-qt4/Makefile
index 98d6f3e314a5..f7abf42e8c17 100644
--- chinese/gcin-qt4/Makefile
+++ chinese/gcin-qt4/Makefile
@@ -16,8 +16,8 @@ LICENSE=	LGPL21
 LIB_DEPENDS=	libgcin-im-client.so:chinese/gcin
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}/qt4-im
-USES=		gmake pkgconfig tar:xz
-USE_QT4=	inputmethods qmake_build moc_build corelib gui
+USES=		gmake pkgconfig qt:4 tar:xz
+USE_QT=		inputmethods qmake_build moc_build corelib gui
 MAKE_ENV=	INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
 		MKDIR="${MKDIR}"
 
diff --git chinese/gcin-qt5/Makefile chinese/gcin-qt5/Makefile
index 3f1bc70e6497..e076c1352771 100644
--- chinese/gcin-qt5/Makefile
+++ chinese/gcin-qt5/Makefile
@@ -17,8 +17,8 @@ LICENSE=	LGPL21
 LIB_DEPENDS=	libgcin-im-client.so:chinese/gcin
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}/qt5-im
-USES=		compiler:c++11-lang gmake pkgconfig tar:xz
-USE_QT5=	qdbus qmake_build buildtools_build core gui
+USES=		compiler:c++11-lang gmake pkgconfig qt:5 tar:xz
+USE_QT=		qdbus qmake_build buildtools_build core gui
 USE_CXXSTD=	c++11
 MAKE_ENV=	INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
 		MKDIR="${MKDIR}"
diff --git chinese/qt4-codecs-cn/Makefile chinese/qt4-codecs-cn/Makefile
index 36129ec9cfc0..5b7f0382d944 100644
--- chinese/qt4-codecs-cn/Makefile
+++ chinese/qt4-codecs-cn/Makefile
@@ -11,8 +11,8 @@ PKGNAMESUFFIX=	-cn
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt GB 18030 codec plugin
 
-USE_QT4=	qmake_build corelib
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		corelib
 
 HAS_CONFIGURE=	yes
 
diff --git chinese/qt4-codecs-tw/Makefile chinese/qt4-codecs-tw/Makefile
index 7deebcfbc62b..2447c8b3bdba 100644
--- chinese/qt4-codecs-tw/Makefile
+++ chinese/qt4-codecs-tw/Makefile
@@ -11,8 +11,8 @@ PKGNAMESUFFIX=	-tw
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt Big-5 codec plugin
 
-USE_QT4=	qmake_build corelib
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		corelib
 
 HAS_CONFIGURE=	yes
 
diff --git chinese/qterm/Makefile chinese/qterm/Makefile
index b227fca586f4..836e4cc591e1 100644
--- chinese/qterm/Makefile
+++ chinese/qterm/Makefile
@@ -10,9 +10,9 @@ MASTER_SITES=	SF/qterm/qterm/${PORTVERSION}
 MAINTAINER=	kaiwang27@gmail.com
 COMMENT=	BBS client for BSD/Linux
 
-USES=		tar:bzip2 cmake perl5
+USES=		qt:4 tar:bzip2 cmake perl5
 USE_PERL5=	build
-USE_QT4=	codecs-cn_run codecs-tw_run gui help-tools_build \
+USE_QT=		codecs-cn_run codecs-tw_run gui help-tools_build \
 		linguist_build moc_build network qt3support_build \
 		qmake_build rcc_build uic_build xml
 USE_XORG=	x11 ice
@@ -31,15 +31,18 @@ OPENSSL_USES=		ssl
 OPENSSL_CMAKE_ON=	-DQTERM_ENABLE_SSH:BOOL=TRUE
 OPENSSL_CMAKE_OFF=	-DQTERM_ENABLE_SSH:BOOL=FALSE
 
-DBUS_USE=	QT4=dbus
+DBUS_USES=	qt:4
+DBUS_USE=	QT=dbus
 DBUS_CMAKE_ON=	-DQTERM_ENABLE_DBUS:BOOL=TRUE
 DBUS_CMAKE_OFF=	-DQTERM_ENABLE_DBUS:BOOL=FALSE
 
-PHONON_USE=	QT4=phonon
+PHONON_USES=	qt:4
+PHONON_USE=	QT=phonon
 PHONON_CMAKE_ON=	-DQTERM_ENABLE_PHONON:BOOL=TRUE
 PHONON_CMAKE_OFF=	-DQTERM_ENABLE_PHONON:BOOL=FALSE
 
-QTSCRIPT_USE=	QT4=script
+QTSCRIPT_USES=	qt:4
+QTSCRIPT_USE=	QT=script
 QTSCRIPT_RUN_DEPENDS=	${QT_PLUGINDIR}/script/libqtscript_core.so:devel/qtscriptgenerator
 QTSCRIPT_CMAKE_ON=	-DQTERM_ENABLE_SCRIPT:BOOL=TRUE
 QTSCRIPT_CMAKE_OFF=	-DQTERM_ENABLE_SCRIPT:BOOL=FALSE
diff --git comms/cutecom/Makefile comms/cutecom/Makefile
index 517cca1e6580..a59ca7658c08 100644
--- comms/cutecom/Makefile
+++ comms/cutecom/Makefile
@@ -12,7 +12,7 @@ COMMENT=	Graphical serial terminal
 
 RUN_DEPENDS=	lsz:comms/lrzsz
 
-USE_QT4=	qt3support qmake_build moc_build rcc_build uic_build
-USES=		cmake
+USE_QT=		qt3support qmake_build moc_build rcc_build uic_build
+USES=		cmake qt:4
 
 .include <bsd.port.mk>
diff --git comms/dabstick-radio/Makefile comms/dabstick-radio/Makefile
index 537fff380976..6e5503578586 100644
--- comms/dabstick-radio/Makefile
+++ comms/dabstick-radio/Makefile
@@ -21,8 +21,8 @@ LIB_DEPENDS+=	librtlsdr.so:comms/rtl-sdr \
 		libfftw3.so:math/fftw3 \
 		libfaad.so:audio/faad
 
-USES=		tar:tgz
-USE_QT4=	gui qt3support qmake_build moc_build rcc_build uic_build
+USES=		qt:4 tar:tgz
+USE_QT=		gui qt3support qmake_build moc_build rcc_build uic_build
 
 PORTDOCS=	*
 PLIST_FILES+=	bin/dabreceiver bin/fmreceiver bin/spectrum-viewer
diff --git comms/gnuradio/Makefile comms/gnuradio/Makefile
index 65b9b8cb1705..0fcd4e696811 100644
--- comms/gnuradio/Makefile
+++ comms/gnuradio/Makefile
@@ -46,7 +46,7 @@ RUN_DEPENDS:=	${BUILD_DEPENDS}
 # volk/lib/volk_cpu.c: In function 'i_can_has_3dnow':
 # volk/lib/volk_cpu.c:62: error: can't find a register in class 'BREG' while reloading 'asm'
 # volk/lib/volk_cpu.c:62: error: 'asm' operand has impossible constraints
-USES=		cmake:outsource compiler:c11 fortran iconv perl5 pkgconfig pyqt:4 python:2.7 shebangfix
+USES=		cmake:outsource compiler:c11 fortran iconv perl5 pkgconfig pyqt:4 python:2.7 qt:4 shebangfix
 SHEBANG_FILES=	grc/scripts/freedesktop/grc_setup_freedesktop.in \
 		gnuradio-runtime/python/gnuradio/ctrlport/gr-ctrlport-monitor \
 		gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
@@ -65,7 +65,7 @@ DOCSDIR=	share/doc/${PORTNAME}-${PORTVERSION}
 USE_GNOME=	pygtk2
 USE_PYQT=	core gui opengl
 USE_WX=		3.0+
-USE_QT4=	corelib gui xml qmake moc_build rcc_build uic_build
+USE_QT=		corelib gui xml qmake moc_build rcc_build uic_build
 WX_COMPS=	wx wx:build wx:run python:build python:run
 USE_LDCONFIG=	yes
 PLIST_SUB+=	MAJOR_VERSION="3"
diff --git comms/gqrx/Makefile comms/gqrx/Makefile
index f18b4186992a..93d4c8ad81c7 100644
--- comms/gqrx/Makefile
+++ comms/gqrx/Makefile
@@ -24,13 +24,13 @@ LIB_DEPENDS=	libgnuradio-runtime.so:comms/gnuradio \
 		libboost_system.so:devel/boost-libs \
 		libboost_program_options.so:devel/boost-libs
 
-USES=		pkgconfig qmake
+USES=		pkgconfig qmake qt:5
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	csete
 
 USE_GL=		gl
-USE_QT5=	buildtools_build core gui svg network widgets
+USE_QT=		buildtools_build core gui svg network widgets
 
 OPTIONS_RADIO=	AUDIO
 AUDIO_DESC=	Audio backend
diff --git comms/hamfax/Makefile comms/hamfax/Makefile
index 7c7589f4db65..3db5a1afb95e 100644
--- comms/hamfax/Makefile
+++ comms/hamfax/Makefile
@@ -12,10 +12,10 @@ COMMENT=	QT application for sending and receiving facsimiles over radio
 
 LIB_DEPENDS=	libaudiofile.so:audio/libaudiofile
 
-USE_QT4=	gui moc_build
+USE_QT=		gui moc_build
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS+=	CPPFLAGS="-I${LOCALBASE}/include" \
 			LDFLAGS="-L${LOCALBASE}/lib"
-USES=		gmake pkgconfig tar:bzip2
+USES=		gmake pkgconfig qt:4 tar:bzip2
 
 .include <bsd.port.mk>
diff --git comms/inspectrum/Makefile comms/inspectrum/Makefile
index 29cd46de3175..0fba1cc0ed41 100644
--- comms/inspectrum/Makefile
+++ comms/inspectrum/Makefile
@@ -22,8 +22,8 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	miek
 GH_TAGNAME=	11853b64062bda4f81926613f15d1d9654c227c8
 
-USE_QT5=	core buildtools_build concurrent widgets
-USES=		cmake pkgconfig qmake
+USE_QT=		core buildtools_build concurrent widgets
+USES=		cmake pkgconfig qmake qt:5
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git comms/klog/Makefile comms/klog/Makefile
index 9d95f51bf0ba..a03c1acff53d 100644
--- comms/klog/Makefile
+++ comms/klog/Makefile
@@ -11,8 +11,8 @@ COMMENT=	Simple Qt-based amateur radio logger
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake
-USE_QT5=	buildtools_build core gui linguisttools_build multimedia network \
+USES=		qmake qt:5
+USE_QT=		buildtools_build core gui linguisttools_build multimedia network \
 		printsupport sql sql-sqlite3_run widgets
 DESKTOP_ENTRIES=	"KLog" "Simple Amateur Radio Logging Program" \
 		"" "klog" "Network;HamRadio;" \
diff --git comms/kremotecontrol-kde4/Makefile comms/kremotecontrol-kde4/Makefile
index 0e5066f8edb5..b7d340d123ba 100644
--- comms/kremotecontrol-kde4/Makefile
+++ comms/kremotecontrol-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	KDE frontend for your remote controls
 
 RUN_DEPENDS=	lircd:comms/lirc
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	corelib script xmlpatterns \
+USE_QT=		corelib script xmlpatterns \
 		qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git comms/libsdr-gui/Makefile comms/libsdr-gui/Makefile
index eae58c112759..8302a50cdac4 100644
--- comms/libsdr-gui/Makefile
+++ comms/libsdr-gui/Makefile
@@ -19,8 +19,8 @@ LIB_DEPENDS=	libfftw3.so:math/fftw3 \
 USE_GITHUB=	yes
 GH_ACCOUNT=	hmatuschek
 
-USE_QT5=	core buildtools_build qmake widgets
-USES=		cmake pkgconfig
+USE_QT=		core buildtools_build qmake widgets
+USES=		cmake pkgconfig qt:5
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git comms/linpsk/Makefile comms/linpsk/Makefile
index 09d58e2b9a16..ad9a57ff479d 100644
--- comms/linpsk/Makefile
+++ comms/linpsk/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Simple Qt PSK31, RTTY, and MSK31 client
 LIB_DEPENDS=	libfftw3.so:math/fftw3 \
 		libasound.so:audio/alsa-lib
 
-USES=		qmake tar:tgz
-USE_QT4=	gui network corelib moc_build uic_build rcc_build qmake_build
+USES=		qmake qt:4 tar:tgz
+USE_QT=		gui network corelib moc_build uic_build rcc_build qmake_build
 DESKTOP_ENTRIES="LinPsk" "${COMMENT}" \
 		"${DATADIR}/linpsk.png" "linpsk" "Audio;HamRadio;" \
 		false
diff --git comms/py-qt5-serialport/Makefile comms/py-qt5-serialport/Makefile
index af46f9911f15..8452318138ac 100644
--- comms/py-qt5-serialport/Makefile
+++ comms/py-qt5-serialport/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtSerialPort module
 CONFIGURE_ARGS=	--enable QtSerialPort
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui serialport qmake_build
+USE_QT=		core gui serialport qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git comms/qsstv/Makefile comms/qsstv/Makefile
index b2d4e0196f34..e6c9f32124ea 100644
--- comms/qsstv/Makefile
+++ comms/qsstv/Makefile
@@ -22,8 +22,8 @@ LIB_DEPENDS=	libasound.so:audio/alsa-lib \
 		libv4l2.so:multimedia/libv4l
 BUILD_DEPENDS=	v4l_compat>=0:multimedia/v4l_compat
 
-USES=		qmake
-USE_QT5=	buildtools core gui network widgets xml
+USES=		qmake qt:5
+USE_QT=		buildtools core gui network widgets xml
 USE_GL+=	gl
 
 OPTIONS_DEFINE=	DOCS
diff --git comms/qt5-connectivity/Makefile comms/qt5-connectivity/Makefile
index 7248ec7112b9..42c2a88c5e4a 100644
--- comms/qt5-connectivity/Makefile
+++ comms/qt5-connectivity/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt connectivity (Bluetooth/NFC) module
 
-USE_QT5=	concurrent core qml quick buildtools_build
-QT_DIST=	${PORTNAME}
-USES=		qmake
+USE_QT=		concurrent core qml quick buildtools_build
+USES=		qmake qt-dist:5,connectivity
 
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
diff --git comms/qt5-sensors/Makefile comms/qt5-sensors/Makefile
index 9b253262a828..28616607e7ae 100644
--- comms/qt5-sensors/Makefile
+++ comms/qt5-sensors/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt sensors module
 
-USE_QT5=	core qml quick buildtools_build
-QT_DIST=	${PORTNAME}
-USES=		qmake:norecursive
+USE_QT=		core qml quick buildtools_build
+USES=		qmake:norecursive qt-dist:5,sensors
 
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
diff --git comms/qt5-serialbus/Makefile comms/qt5-serialbus/Makefile
index 7fc107800cc4..4d9f4f0b7cf5 100644
--- comms/qt5-serialbus/Makefile
+++ comms/qt5-serialbus/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt functions to access industrial bus systems
 
-USE_QT5=	core network serialport buildtools_build
-QT_DIST=	serialbus
-USES=		compiler:c++11-lib qmake
+USE_QT=		core network serialport buildtools_build
+USES=		compiler:c++11-lib qmake qt-dist:5,serialbus
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 .include <bsd.port.mk>
diff --git comms/qt5-serialport/Makefile comms/qt5-serialport/Makefile
index 55ba42ccafbd..54fdd7e8dfd3 100644
--- comms/qt5-serialport/Makefile
+++ comms/qt5-serialport/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt functions to access serial ports
 
-USE_QT5=	core buildtools_build
-QT_DIST=	serialport
-USES=		qmake
+USE_QT=		core buildtools_build
+USES=		qmake qt-dist:5,serialport
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 .include <bsd.port.mk>
diff --git comms/qtel/Makefile comms/qtel/Makefile
index d6ff9a949024..8847cd7465d5 100644
--- comms/qtel/Makefile
+++ comms/qtel/Makefile
@@ -14,7 +14,8 @@ LIB_DEPENDS=	libecholib.so:comms/svxlink \
 		libgsm.so:audio/gsm
 
 MASTERDIR=	${.CURDIR}/../svxlink
-USE_QT4=	corelib gui network qmake_build linguist_build moc_build rcc_build uic_build
+USES=		qt:4
+USE_QT=		corelib gui network qmake_build linguist_build moc_build rcc_build uic_build
 PKGDIR=		${.CURDIR}
 CMAKE_ARGS+=	-DUSE_QT:BOOL=YES \
 		-DQT_ONLY:BOOL=YES
diff --git comms/sdr-wspr/Makefile comms/sdr-wspr/Makefile
index dc2bf9770c78..08b71e4e4733 100644
--- comms/sdr-wspr/Makefile
+++ comms/sdr-wspr/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libsdr-gui.so:comms/libsdr-gui
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	hmatuschek
-USE_QT5=	core buildtools_build qmake webkit widgets
-USES=		cmake:outsource compiler:gcc-c++11-lib fortran pkgconfig
+USE_QT=		core buildtools_build qmake webkit widgets
+USES=		cmake:outsource compiler:gcc-c++11-lib fortran pkgconfig qt:5
 
 PLIST_FILES=	bin/sdr-wspr share/applications/sdr-wspr.desktop \
 		share/icons/sdr-wspr.svg
diff --git comms/wsjtx/Makefile comms/wsjtx/Makefile
index e8f0784d575b..054d80559f10 100644
--- comms/wsjtx/Makefile
+++ comms/wsjtx/Makefile
@@ -21,10 +21,10 @@ LIB_DEPENDS=	libfftw3.so:math/fftw3 \
 
 MAKE_JOBS_UNSAFE=	yes
 USES=		cmake compiler:c++11-lib dos2unix fortran pkgconfig \
-			readline tar:tgz
+		qt:5 readline tar:tgz
 USE_GL=		yes
-USE_QT5=	core gui buildtools network qmake_build widgets \
-			multimedia concurrent printsupport serialport
+USE_QT=		core gui buildtools network qmake_build widgets \
+		multimedia concurrent printsupport serialport
 CMAKE_ARGS+=	-DPORT_BUILDING::STRING="ON" \
 		-DCMAKE_PREFIX_PATH+=${LOCALBASE}/wsjtx/lib \
 		-DLOCALBASE::STRING="${LOCALBASE}"
diff --git comms/xcwcp/Makefile comms/xcwcp/Makefile
index d502cd554279..c80dbb713994 100644
--- comms/xcwcp/Makefile
+++ comms/xcwcp/Makefile
@@ -12,8 +12,8 @@ LIB_DEPENDS=	libcw.so:comms/unixcw
 MASTERDIR=	${.CURDIR}/../unixcw
 
 PLIST=		${.CURDIR}/pkg-plist
-USE_QT5=	buildtools gui widgets qmake_build
-USES=		gettext
+USE_QT=		buildtools gui widgets qmake_build
+USES=		gettext qt:5
 # Qt from 5.7.0 on requires c++11.
 USE_CXXSTD=	c++11
 GNU_CONFIGURE=	yes
diff --git databases/akonadi-kde4/Makefile databases/akonadi-kde4/Makefile
index 5a0823b0195c..3faa2339186f 100644
--- databases/akonadi-kde4/Makefile
+++ databases/akonadi-kde4/Makefile
@@ -18,10 +18,10 @@ LIB_DEPENDS=	libboost_thread.so:devel/boost-libs
 # Let process generate meaningful backtrace on core dump.
 BUILD_DEPENDS=	xsltproc:textproc/libxslt
 
-USES=		cmake:outsource kde:4 shared-mime-info \
+USES=		cmake:outsource kde:4 qt:4 shared-mime-info \
 		compiler:c++11-lang pathfix tar:bzip2
 USE_KDE=	automoc4 soprano
-USE_QT4=	corelib dbus gui network qtestlib_build sql xml \
+USE_QT=		corelib dbus gui network qtestlib_build sql xml \
 		moc_build qmake_build rcc_build uic_build
 CMAKE_ARGS+=	-DAKONADI_BUILD_TESTS:BOOL=FALSE \
 		-DINSTALL_QSQLITE_IN_QT_PREFIX:BOOL=TRUE \
@@ -33,15 +33,16 @@ OPTIONS_MULTI_DB=	MYSQL PGSQL SQLITE
 OPTIONS_SUB=	yes # SQLITE
 
 MYSQL_DESC=	Install MySQL Qt plugin and server
-MYSQL_USE=	QT4=sql-mysql_run
-MYSQL_USES=	mysql:server
+MYSQL_USE=	QT=sql-mysql_run
+MYSQL_USES=	mysql:server qt:4
 
 PGSQL_DESC=	Install PostgreSQL Qt plugin
 # Do not add a dependency on PostgreSQL server as someone preferring
 # it over MySQL might like to use some advanced configuration, like a
 # remote server.
 #PGSQL_USE=	PGSQL=server
-PGSQL_USE=	QT4=sql-pgsql_run
+PGSQL_USES=	qt:4
+PGSQL_USE=	QT=sql-pgsql_run
 
 SQLITE_DESC=	Enable SQLite backend
 SQLITE_USES=	sqlite:3
diff --git databases/akonadi/Makefile databases/akonadi/Makefile
index 60db5f5bd517..995d0bf18a6b 100644
--- databases/akonadi/Makefile
+++ databases/akonadi/Makefile
@@ -16,13 +16,13 @@ BUILD_DEPENDS=	xsltproc:textproc/libxslt
 CONFLICTS=	akonadi-[0-9]* akonadi-kf5-git-[0-9]*
 
 USES=		cmake:outsource compiler:c++11-lib gettext kde:5 \
-		shared-mime-info tar:xz
+		qt:5 shared-mime-info tar:xz
 USE_GNOME=	libxml2
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons ecm guiaddons i18n iconthemes itemmodels itemviews \
 		kio service windowsystem widgetsaddons xmlgui \
 		designerplugin_build designerplugin_run
-USE_QT5=	core dbus designer gui network sql testlib widgets xml \
+USE_QT=		core dbus designer gui network sql testlib widgets xml \
 		buildtools_build qmake_build
 CMAKE_ARGS+=	-DCMAKE_REQUIRED_INCLUDES:STRING="${LOCALBASE}/include"
 
@@ -33,18 +33,20 @@ OPTIONS_MULTI_DB=	MYSQL PGSQL SQLITE
 OPTIONS_SUB=		yes
 
 MYSQL_DESC=		Install MySQL Qt plugin and server
-MYSQL_USE=		MYSQL=server QT5=sql-mysql_run
+MYSQL_USES=	qt:5
+MYSQL_USE=		MYSQL=server QT=sql-mysql_run
 
 PGSQL_DESC=		Install PostgreSQL Qt plugin
 # Do not add a dependency on PostgreSQL server as someone preferring
 # it over MySQL might like to use some advanced configuration, like a
 # remote server.
 #PGSQL_USE=	PGSQL=server
-PGSQL_USE=		QT5=sql-pgsql_run
+PGSQL_USES=	qt:5
+PGSQL_USE=		QT=sql-pgsql_run
 
 SQLITE_DESC=		Enable SQLite backend
-SQLITE_USES=		sqlite:3
-SQLITE_USE=		QT5=sql-sqlite3_run
+SQLITE_USES=		qt:5 sqlite:3
+SQLITE_USE=		QT=sql-sqlite3_run
 SQLITE_CMAKE_ON=	-DAKONADI_BUILD_QSQLITE:BOOL=ON
 SQLITE_CMAKE_OFF=	-DAKONADI_BUILD_QSQLITE:BOOL=OFF
 
diff --git databases/kbibtex/Makefile databases/kbibtex/Makefile
index 96f725d66d8b..cb511a0e5490 100644
--- databases/kbibtex/Makefile
+++ databases/kbibtex/Makefile
@@ -14,10 +14,10 @@ LIB_DEPENDS=	libpoppler-qt4.so:graphics/poppler-qt4 \
 		libqca.so:devel/qca@qt4 \
 		libqoauth.so:net/qoauth
 
-USES=		cmake gettext iconv kde:4 shared-mime-info tar:xz
+USES=		cmake gettext iconv kde:4 qt:4 shared-mime-info tar:xz
 USE_GNOME=	libxml2 libxslt
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qmake_build moc_build uic_build rcc_build \
+USE_QT=		qmake_build moc_build uic_build rcc_build \
 		webkit
 USE_LDCONFIG=	yes
 
diff --git databases/kdb/Makefile databases/kdb/Makefile
index f4edce795b06..3386532c9731 100644
--- databases/kdb/Makefile
+++ databases/kdb/Makefile
@@ -11,9 +11,9 @@ COMMENT=		Database connectivity and creation framework
 
 LIB_DEPENDS=		libicuuc.so:devel/icu
 
-USES=			cmake:outsource gettext kde:5 python:2.7 tar:xz
+USES=			cmake:outsource gettext kde:5 python:2.7 qt:5 tar:xz
 USE_KDE=		coreaddons ecm i18n
-USE_QT5=		core gui network widgets xml \
+USE_QT=			core gui network widgets xml \
 			buildtools_build qmake_build
 
 # In the future, these options will be moved into slave ports
diff --git databases/kexi/Makefile databases/kexi/Makefile
index fd5f8c2d4979..bca6466947f6 100644
--- databases/kexi/Makefile
+++ databases/kexi/Makefile
@@ -14,14 +14,14 @@ LIB_DEPENDS=		libKDb3.so:databases/kdb \
 			libKReport3.so:textproc/kreport
 
 USES=			cmake:outsource desktop-file-utils gettext iconv \
-			kde:5 pkgconfig tar:xz
+			kde:5 pkgconfig qt:5 tar:xz
 USE_GNOME=		glib20
 USE_KDE=		auth bookmarks codecs completion config \
 			configwidgets coreaddons crash ecm guiaddons i18n \
 			iconthemes itemviews jobwidgets kio parts service \
 			solid sonnet texteditor textwidgets widgetsaddons \
 			xmlgui breeze-icons_build
-USE_QT5=		core dbus gui network printsupport webkit widgets xml \
+USE_QT=			core dbus gui network printsupport webkit widgets xml \
 			buildtools_build qmake_build qml
 
 CONFLICTS_INSTALL=	calligra-2*
diff --git databases/pgmodeler/Makefile databases/pgmodeler/Makefile
index 93885bfac328..e1d649169154 100644
--- databases/pgmodeler/Makefile
+++ databases/pgmodeler/Makefile
@@ -12,11 +12,11 @@ COMMENT=	PostgreSQL Database Modeler
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		compiler:c++11-lib pgsql qmake pkgconfig gmake
+USES=		compiler:c++11-lib pgsql qmake pkgconfig gmake qt:5
 USE_GITHUB=	yes
 
 USE_GNOME=	libxml2
-USE_QT5=	gui network sql svg printsupport widgets core buildtools_build uitools testlib
+USE_QT=		gui network sql svg printsupport widgets core buildtools_build uitools testlib
 USE_GL=		gl
 USE_XORG=	x11 xext
 
diff --git databases/py-qt4-sql/Makefile databases/py-qt4-sql/Makefile
index fc6a7c08d83a..8f505ba89691 100644
--- databases/py-qt4-sql/Makefile
+++ databases/py-qt4-sql/Makefile
@@ -12,10 +12,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtSql module
 CONFIGURE_ARGS=	--enable QtSql
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run gui_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib gui sql \
+USE_QT=		corelib gui sql \
 		moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
diff --git databases/py-qt5-sql/Makefile databases/py-qt5-sql/Makefile
index 104dfa25d94e..85325f511993 100644
--- databases/py-qt5-sql/Makefile
+++ databases/py-qt5-sql/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtSql module
 CONFIGURE_ARGS=	--enable QtSql
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run widgets_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui sql widgets buildtools_build qmake_build
+USE_QT=		core gui sql widgets buildtools_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git databases/qt4-sql/Makefile databases/qt4-sql/Makefile
index 1b74747a01f3..de14496b4cb3 100644
--- databases/qt4-sql/Makefile
+++ databases/qt4-sql/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt SQL database integration module
 
-USE_QT4=	qmake_build moc_build corelib
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build corelib
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git databases/qt5-sql/Makefile databases/qt5-sql/Makefile
index cb336ee6270c..fc004a64b94a 100644
--- databases/qt5-sql/Makefile
+++ databases/qt5-sql/Makefile
@@ -8,8 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt SQL database integration module
 
-USE_QT5=	core qmake_build buildtools_build
-QT_DIST=	base
+USES=		qmake:no_env qt-dist:5,base
+USE_QT=		core qmake_build buildtools_build
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	-no-gui -no-xcb
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git databases/redisdesktopmanager/Makefile databases/redisdesktopmanager/Makefile
index b7af8550301b..93bb63ff8c8b 100644
--- databases/redisdesktopmanager/Makefile
+++ databases/redisdesktopmanager/Makefile
@@ -12,7 +12,7 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 LIB_DEPENDS=	libssh2.so:security/libssh2
 
-USES=		dos2unix kde:5 qmake ssl
+USES=		dos2unix kde:5 qmake qt:5 ssl
 DOS2UNIX_FILES=	3rdparty/3rdparty.pri
 USE_GL=		gl
 USE_GITHUB=	yes
@@ -30,7 +30,7 @@ GH_TUPLE=	\
 		uglide:qredisclient:34f1c5a:qredisclient/3rdparty/qredisclient \
 		sijk:qt-unix-signals:d6a1d12:qtunixsignals/3rdparty/qt-unix-signals \
 		redis:hiredis:53c3243:hiredis/3rdparty/qredisclient/3rdparty/hiredis
-USE_QT5=	buildtools_build charts concurrent core gui network qmake_build qml quick widgets
+USE_QT=		buildtools_build charts concurrent core gui network qmake_build qml quick widgets
 
 post-patch:
 	@${REINPLACE_CMD} 's|%%PORTVERSION%%|${PORTVERSION}|g' ${WRKSRC}/src/version.h
diff --git databases/sqlitebrowser/Makefile databases/sqlitebrowser/Makefile
index d6d997d08f54..99ac5cd28f98 100644
--- databases/sqlitebrowser/Makefile
+++ databases/sqlitebrowser/Makefile
@@ -17,9 +17,9 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 BUILD_DEPENDS=	${LOCALBASE}/lib/libantlr.a:devel/antlr
 LIB_DEPENDS=	libqscintilla2_qt5.so:devel/qscintilla2-qt5
 
-USES=		cmake desktop-file-utils sqlite
+USES=		cmake desktop-file-utils qt:5 sqlite
 CMAKE_ARGS+=	-DQT_INCLUDE_DIR=${QT_INCDIR} -DQT_LIBRARY_DIR=${QT_LIBDIR}
-USE_QT5=	core gui network printsupport testlib widgets \
+USE_QT=		core gui network printsupport testlib widgets \
 		buildtools_build linguisttools_build qmake_build
 USE_GITHUB=	yes
 
diff --git databases/sqliteman/Makefile databases/sqliteman/Makefile
index 4cd5eebef353..2a9ae0713e67 100644
--- databases/sqliteman/Makefile
+++ databases/sqliteman/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Admin's GUI tool for Sqlite3
 
 LIB_DEPENDS=	libqscintilla2_qt4.so:devel/qscintilla2
 
-USES=		cmake sqlite
-USE_QT4=	qmake_build gui moc_build rcc_build uic_build xml sql
+USES=		cmake qt:4 sqlite
+USE_QT=		qmake_build gui moc_build rcc_build uic_build xml sql
 
 GNU_CONFIGURE=	yes
 USE_LDCONFIG=	yes
diff --git databases/sqlitestudio/Makefile databases/sqlitestudio/Makefile
index 28b99178a65b..cd4ec0adefa5 100644
--- databases/sqlitestudio/Makefile
+++ databases/sqlitestudio/Makefile
@@ -38,9 +38,9 @@ OPTIONS_SUB=		yes
 
 WRKSRC=		${WRKDIR}/SQLiteStudio3
 
-USES=		compiler:c++11-lib gmake ncurses qmake readline sqlite
+USES=		compiler:c++11-lib gmake ncurses qmake qt:5 readline sqlite
 USE_CXXSTD=	c++11
-USE_QT5=	core concurrent gui network script sql sql-sqlite3_run svg widgets xml \
+USE_QT=		core concurrent gui network script sql sql-sqlite3_run svg widgets xml \
 		uitools buildtools_build linguisttools_build
 USE_GL=		gl
 USE_LDCONFIG=	yes
@@ -64,7 +64,7 @@ PLUGIN_DB_SQLITE_CIPHER_VARS=		PLUGIN_DIRS+=DbSqliteCipher
 PLUGIN_HTML_EXPORT_VARS=		PLUGIN_DIRS+=HtmlExport
 PLUGIN_JSON_EXPORT_VARS=		PLUGIN_DIRS+=JsonExport
 PLUGIN_PDF_EXPORT_VARS=			PLUGIN_DIRS+=PdfExport
-PLUGIN_PRINTING_VARS=			PLUGIN_DIRS+=Printing USE_QT5+=printsupport
+PLUGIN_PRINTING_VARS=			PLUGIN_DIRS+=Printing USE_QT+=printsupport
 PLUGIN_REGEXP_IMPORT_VARS=		PLUGIN_DIRS+=RegExpImport
 PLUGIN_SQL_ENTERPRISE_FORMATTER_VARS=	PLUGIN_DIRS+=SqlEnterpriseFormatter
 PLUGIN_SQL_EXPORT_VARS=			PLUGIN_DIRS+=SqlExport
diff --git databases/tora/Makefile databases/tora/Makefile
index f0cde018dcd0..8486f299430b 100644
--- databases/tora/Makefile
+++ databases/tora/Makefile
@@ -20,8 +20,8 @@ LIB_DEPENDS=	libqscintilla2_qt4.so:devel/qscintilla2 \
 OPTIONS_DEFINE=	PGSQL MYSQL DOCS
 OPTIONS_DEFAULT=	PGSQL MYSQL
 
-USE_QT4=	corelib gui sql xml network moc_build uic_build rcc_build
-USES=		autoreconf gmake libtool makeinfo
+USE_QT=		corelib gui sql xml network moc_build uic_build rcc_build
+USES=		autoreconf gmake libtool makeinfo qmake:no_configure qt:4
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--with-pcre=${LOCALBASE}
 LDFLAGS+=	-L${LOCALBASE}/lib
@@ -32,8 +32,8 @@ PREFIX2FIX=	doc/help/preferences.texi doc/help/preferences.html
 DOCS_USES=	makeinfo
 DOCS_INFO=	tora
 
-MYSQL_RUN_DEPENDS=	${QT_PLUGINDIR}/sqldrivers/libqsqlmysql.so:databases/qt4-mysql-plugin
-PGSQL_RUN_DEPENDS=	${QT_PLUGINDIR}/sqldrivers/libqsqlpsql.so:databases/qt4-pgsql-plugin
+MYSQL_USE=	QT=sql-mysql_run
+PGSQL_USE=	QT=sql-pgsql_run
 
 post-patch-DOCS-on:
 	@${REINPLACE_CMD} 's|/etc/torarc|${PREFIX}/etc/torarc|' \
diff --git deskutils/akonadi-calendar-tools/Makefile deskutils/akonadi-calendar-tools/Makefile
index 737e11b4ca1a..32072c6ae9f2 100644
--- deskutils/akonadi-calendar-tools/Makefile
+++ deskutils/akonadi-calendar-tools/Makefile
@@ -9,7 +9,7 @@ COMMENT=	CLI tools to manage akonadi calendars
 
 LIB_DEPENDS=	libical.so:devel/libical
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash ecm guiaddons i18n iconthemes itemmodels \
 		itemviews jobwidgets kdelibs4support kio notifications parts \
@@ -18,7 +18,7 @@ USE_KDE=	auth bookmarks codecs completion config configwidgets \
 # pim components
 USE_KDE+=	akonadi akonadicalendar calendarsupport calendarcore calendarutils \
 		identitymanagement libkdepim mime pimtextedit
-USE_QT5=	core dbus gui network printsupport widgets xml \
+USE_QT=		core dbus gui network printsupport widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git deskutils/akonadi-import-wizard/Makefile deskutils/akonadi-import-wizard/Makefile
index 91794e5e2546..75d4ae6d712c 100644
--- deskutils/akonadi-import-wizard/Makefile
+++ deskutils/akonadi-import-wizard/Makefile
@@ -13,7 +13,7 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 		libgpgmepp.so:security/gpgme-cpp \
 		libqgpgme.so:security/gpgme-qt5
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive auth codecs completion config configwidgets coreaddons \
 		crash dbusaddons ecm i18n itemmodels kio service wallet \
 		widgetsaddons xmlgui
@@ -21,7 +21,7 @@ USE_KDE=	archive auth codecs completion config configwidgets coreaddons \
 USE_KDE+=	akonadi akonadicontacts akonadimime contacts identitymanagement \
 		libkdepim libkleo mailcommon mailimporter mailtransport \
 		messagelib mime pimcommon pimtextedit
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git deskutils/akonadiconsole/Makefile deskutils/akonadiconsole/Makefile
index c2112e7c69b6..3ffade32e679 100644
--- deskutils/akonadiconsole/Makefile
+++ deskutils/akonadiconsole/Makefile
@@ -17,7 +17,7 @@ LIB_DEPENDS=	libassuan.so:security/libassuan  \
 		libical.so:devel/libical \
 		libxapian.so:databases/xapian-core
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm guiaddons i18n iconthemes \
 		itemmodels itemviews jobwidgets kdelibs4support kio \
@@ -28,7 +28,7 @@ USE_KDE+=	akonadi akonadicalendar akonadicontacts akonadimime \
 		akonadisearch calendarcore calendarsupport contacts \
 		identitymanagement libkdepim libkleo messagelib mime \
 		pimcommon pimtextedit
-USE_QT5=	core dbus gui network printsupport sql widgets xml \
+USE_QT=		core dbus gui network printsupport sql widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git deskutils/akregator/Makefile deskutils/akregator/Makefile
index 135a51d57757..5033496b74ee 100644
--- deskutils/akregator/Makefile
+++ deskutils/akregator/Makefile
@@ -15,7 +15,7 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 		libgpgmepp.so:security/gpgme-cpp \
 		libqgpgme.so:security/gpgme-qt5
 
-USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		ecm i18n iconthemes itemmodels jobwidgets kcmutils kio \
 		notifications notifyconfig parts service sonnet texteditor\
@@ -23,7 +23,7 @@ USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 # pim components
 USE_KDE+=	akonadi akonadimime contacts grantleetheme kontactinterface \
 		libkdepim libkleo messagelib mime pimcommon pimtextedit syndication
-USE_QT5=	core dbus gui location network printsupport qml quick \
+USE_QT=		core dbus gui location network printsupport qml quick \
 		webchannel webengine widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git deskutils/basket/Makefile deskutils/basket/Makefile
index a6f3aa0145be..900e4222bc4e 100644
--- deskutils/basket/Makefile
+++ deskutils/basket/Makefile
@@ -14,10 +14,10 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libgpgme.so:security/gpgme
 
-USES=		cmake gettext-tools kde:4 tar:bzip2
+USES=		cmake gettext-tools kde:4 qt:4 tar:bzip2
 USE_XORG=	xft xpm
 USE_KDE=	automoc4 kdelibs qimageblitz
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 USE_CXXSTD=	gnu++98
 
diff --git deskutils/cairo-dock-plugins/Makefile deskutils/cairo-dock-plugins/Makefile
index 2964ee47d391..81630e1cb679 100644
--- deskutils/cairo-dock-plugins/Makefile
+++ deskutils/cairo-dock-plugins/Makefile
@@ -87,8 +87,8 @@ IMPULSE_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
 IMPULSE_CMAKE_BOOL=	enable-impulse
 
 #KDE_INTEGRATION_LIB_DEPENDS=
-KDE_INTEGRATION_USE_QT4=	corelib
-KDE_INTEGRATION_USES=		kde:4
+KDE_INTEGRATION_USE_QT=		corelib
+KDE_INTEGRATION_USES=		kde:4 qt:4
 KDE_INTEGRATION_USE=		KDE=kdelibs
 KDE_INTEGRATION_CMAKE_BOOL=	enable-kde-integration
 
diff --git deskutils/calibre/Makefile deskutils/calibre/Makefile
index 1abcd63f84e9..a57a655b37aa 100644
--- deskutils/calibre/Makefile
+++ deskutils/calibre/Makefile
@@ -48,13 +48,13 @@ RUN_DEPENDS=	xdg-open:devel/xdg-utils \
 		pdftohtml:graphics/poppler-utils
 
 USES=		desktop-file-utils gettext-runtime gnome localbase:ldflags pkgconfig \
-		python:2.7 pyqt:5 shared-mime-info shebangfix ssl tar:xz
+		python:2.7 pyqt:5 qt:5 shared-mime-info shebangfix ssl tar:xz
 USE_RC_SUBR=	calibre
 EXTRACT_BEFORE_ARGS=	-x -s '/^calibre/~-src/' -f
 SHEBANG_GLOB=	*.sh *.py
 python_OLD_CMD=	"/usr/bin/env python2" /bin/python2 /usr/bin/python2 /usr/local/bin/python2
 USE_PYQT=	core gui network sip svg webkit widgets webkitwidgets xmlpatterns
-USE_QT5=	buildtools_build core dbus gui qmake_build widgets
+USE_QT=		buildtools_build core dbus gui qmake_build widgets
 USE_GL=		egl gl
 USE_GNOME=	glib20
 USE_XORG=	xrender xext x11
diff --git deskutils/cdcat/Makefile deskutils/cdcat/Makefile
index fb5ca60ac889..341ff3b5776e 100644
--- deskutils/cdcat/Makefile
+++ deskutils/cdcat/Makefile
@@ -22,8 +22,8 @@ LIB_DEPENDS=	libtar.so:devel/libtar \
 CONFIGURE_WRKSRC=	${WRKSRC}/src
 BUILD_WRKSRC=	${CONFIGURE_WRKSRC}
 
-USES=		libtool qmake:norecursive tar:bzip2
-USE_QT4=	corelib gui xml linguisttools_build moc_build uic_build
+USES=		libtool qmake:norecursive qt:4 tar:bzip2
+USE_QT=		corelib gui xml linguisttools_build moc_build uic_build
 QMAKE_ARGS=	LIBS+="${LOCALBASE}/lib/libcryptopp.a" \
 		LIBS+="-lz -lbz2 -ltar -lexif -lmediainfo -lzen" \
 		DEFINES+="MEDIAINFO_STATIC" \
diff --git deskutils/charmtimetracker/Makefile deskutils/charmtimetracker/Makefile
index 4aa063343531..c65db3cc69c9 100644
--- deskutils/charmtimetracker/Makefile
+++ deskutils/charmtimetracker/Makefile
@@ -14,7 +14,7 @@ COMMENT=	Time tracker
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake:outsource compiler:c++11-lib
+USES=		cmake:outsource compiler:c++11-lib qt:5
 # Use bundled keychain; the keychain is only used for KDAB-internal
 # features not available or configurable in the port.
 CMAKE_ARGS=	-DCharm_VERSION:STRING=${PORTVERSION} \
@@ -24,7 +24,7 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	KDAB
 GH_PROJECT=	Charm
 
-USE_QT5=	core dbus gui \
+USE_QT=		core dbus gui \
 		network printsupport script sql sql-sqlite3 \
 		testlib widgets xml \
 		buildtools_build qmake_build
diff --git deskutils/copyq/Makefile deskutils/copyq/Makefile
index 7e4f52d5e912..4614ae200178 100644
--- deskutils/copyq/Makefile
+++ deskutils/copyq/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Qt5 based clipboard manager
 
 LICENSE=	GPLv3
 
-USES=		qmake
+USES=		qmake qt:5
 USE_XORG=	x11 xfixes xtst
-USE_QT5=	core gui network svg multimedia imageformats \
+USE_QT=		core gui network svg multimedia imageformats \
 		buildtools_build x11extras concurrent widgets xml \
 		script
 USE_GL=		gl
diff --git deskutils/fet/Makefile deskutils/fet/Makefile
index d23158e3a260..107419b199b9 100644
--- deskutils/fet/Makefile
+++ deskutils/fet/Makefile
@@ -15,7 +15,7 @@ COMMENT=	Free timetabling software
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake tar:bzip2
+USES=		qmake qt:4 tar:bzip2
 
 PORTEXAMPLES=	*
 
@@ -34,8 +34,10 @@ ONLYCL_DESC=	Build only command line version (without Qt GUI)
 
 OPTIONS_SUB=	yes
 
-QT4_USE=	QT4=corelib,moc_build,rcc_build,uic_build,xml
-QT5_USE=	QT5=buildtools_build,core,xml GL=gl
+QT4_USES=	qt:4
+QT4_USE=	QT=corelib,moc_build,rcc_build,uic_build,xml
+QT5_USES=	qt:5
+QT5_USE=	QT=buildtools_build,core,xml GL=gl
 
 .include <bsd.port.options.mk>
 
@@ -45,9 +47,9 @@ QMAKE_SOURCE_PATH=	${WRKSRC}/src/src-cl.pro
 .else
 INSTALL_TARGET+=	${WRKSRC}/fet
 .if ${PORT_OPTIONS:MQT4}
-USE_QT4+=gui network
+USE_QT+=	gui network
 .else
-USE_QT5+=gui network printsupport widgets
+USE_QT+=	gui network printsupport widgets
 .endif
 .endif
 
diff --git deskutils/flameshot/Makefile deskutils/flameshot/Makefile
index ab7e7016b21b..0d5892be8736 100644
--- deskutils/flameshot/Makefile
+++ deskutils/flameshot/Makefile
@@ -17,10 +17,10 @@ GH_ACCOUNT=	lupoDharkael
 
 INSTALL_ICONS=	yes
 
-USES=		qmake
+USES=		qmake qt:5
 USE_GITHUB=	yes
 USE_GL=		gl
-USE_QT5=	core dbus gui linguist network widgets \
+USE_QT=		core dbus gui linguist network widgets \
 		buildtools_build
 
 post-patch:
diff --git deskutils/grantlee-editor/Makefile deskutils/grantlee-editor/Makefile
index 13bfaf80c7bc..c5fbb811e476 100644
--- deskutils/grantlee-editor/Makefile
+++ deskutils/grantlee-editor/Makefile
@@ -16,7 +16,7 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 		libqgpgme.so:security/gpgme-qt5
 
 USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 \
-		kde:5 tar:xz
+		kde:5 qt:5 tar:xz
 USE_KDE=	archive attica auth codecs completion config configwidgets \
 		coreaddons crash dbusaddons  ecm i18n itemmodels jobwidgets \
 		kio newstuff service syntaxhighlighting texteditor \
@@ -24,7 +24,7 @@ USE_KDE=	archive attica auth codecs completion config configwidgets \
 # pim components
 USE_KDE+=	akonadi akonadicontacts akonadimime contacts grantleetheme \
 		kdepim-apps-libs libkleo messagelib mime pimcommon pimtextedit
-USE_QT5=	core dbus gui location network qml quick webchannel webengine \
+USE_QT=		core dbus gui location network qml quick webchannel webengine \
 		widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git deskutils/grantleetheme/Makefile deskutils/grantleetheme/Makefile
index 70a524efc740..c935098f27c8 100644
--- deskutils/grantleetheme/Makefile
+++ deskutils/grantleetheme/Makefile
@@ -10,10 +10,10 @@ COMMENT=	KDE PIM grantleetheme
 LICENSE=	LGPL21
 
 USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 \
-		pkgconfig tar:xz
+		pkgconfig qt:5 tar:xz
 USE_KDE=	attica auth codecs config configwidgets coreaddons ecm i18n \
 		iconthemes newstuff service widgetsaddons xmlgui
-USE_QT5=	core dbus gui network testlib widgets xml \
+USE_QT=		core dbus gui network testlib widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git deskutils/homerun/Makefile deskutils/homerun/Makefile
index 5c2b169a10ba..1d1410b7dd99 100644
--- deskutils/homerun/Makefile
+++ deskutils/homerun/Makefile
@@ -9,9 +9,9 @@ MASTER_SITES=	KDE/unstable/${PORTNAME}/src/
 MAINTAINER=	yurkis@gmail.com
 COMMENT=	Fullscreen launcher with content organized in tabs
 
-USES=		cmake:outsource compiler:c++0x gettext kde:4 tar:bzip2
+USES=		cmake:outsource compiler:c++0x gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4 workspace
-USE_QT4=	moc_build qmake_build rcc_build uic_build corelib gui
+USE_QT=		moc_build qmake_build rcc_build uic_build corelib gui
 USE_XORG=	x11
 USE_LDCONFIG=	yes
 
diff --git deskutils/kaddressbook/Makefile deskutils/kaddressbook/Makefile
index 8a5cf52ec63f..0a0275eecf80 100644
--- deskutils/kaddressbook/Makefile
+++ deskutils/kaddressbook/Makefile
@@ -14,14 +14,14 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 		libqgpgme.so:security/gpgme-qt5
 
 USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 \
-		tar:xz
+		qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		ecm i18n iconthemes itemmodels jobwidgets kcmutils kio parts \
 		prison service sonnet textwidgets widgetsaddons xmlgui
 # pim components
 USE_KDE+=	akonadi akonadicontacts akonadisearch contacts grantleetheme \
 		kdepim-apps-libs kontactinterface libkdepim pimcommon
-USE_QT5=	core dbus gui network printsupport widgets xml \
+USE_QT=		core dbus gui network printsupport widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git deskutils/kalarm/Makefile deskutils/kalarm/Makefile
index bc4d36d9dbd5..226e824dcadd 100644
--- deskutils/kalarm/Makefile
+++ deskutils/kalarm/Makefile
@@ -10,7 +10,7 @@ COMMENT=	Personal alarm scheduler
 
 LIB_DEPENDS=	libical.so:devel/libical
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 shebangfix tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 shebangfix tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm guiaddons i18n iconthemes \
 		itemmodels itemviews jobwidgets kcmutils kdelibs4support kio \
@@ -21,7 +21,7 @@ USE_KDE+=	akonadi akonadicontacts akonadimime alarmcalendar calendarcore \
 		calendarutils contacts holidays identitymanagement \
 		kdepim-apps-libs libkdepim mailcommon mailtransport mime \
 		pimcommon pimtextedit imap
-USE_QT5=	core dbus gui network phonon4 printsupport widgets x11extras xml \
+USE_QT=		core dbus gui network phonon4 printsupport widgets x11extras xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git deskutils/kcharselect-kde4/Makefile deskutils/kcharselect-kde4/Makefile
index e8e7755f1ea1..33e6c38227aa 100644
--- deskutils/kcharselect-kde4/Makefile
+++ deskutils/kcharselect-kde4/Makefile
@@ -9,8 +9,8 @@ CATEGORIES=	deskutils kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Character selector for KDE
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git deskutils/kcharselect/Makefile deskutils/kcharselect/Makefile
index ccb73695726e..89e13658c5ab 100644
--- deskutils/kcharselect/Makefile
+++ deskutils/kcharselect/Makefile
@@ -10,8 +10,8 @@ COMMENT=	Character selector for KDE
 BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl \
 		docbook-xml>0:textproc/docbook-xml
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	ecm bookmarks doctools i18n widgetsaddons xmlgui
-USE_QT5=	buildtools_build qmake_build widgets
+USE_QT=		buildtools_build qmake_build widgets
 
 .include <bsd.port.mk>
diff --git deskutils/kchmviewer/Makefile deskutils/kchmviewer/Makefile
index 32ae5521ab40..447e661ea2e9 100644
--- deskutils/kchmviewer/Makefile
+++ deskutils/kchmviewer/Makefile
@@ -13,8 +13,8 @@ COMMENT=	KDE viewer for CHM files
 LIB_DEPENDS=	libchm.so:misc/chmlib \
 		libzip.so:archivers/libzip
 
-USES=		dos2unix qmake:outsource 
-USE_QT5=	core dbus gui network printsupport webkit widgets xml \
+USES=		dos2unix qmake:outsource qt:5 
+USE_QT=		core dbus gui network printsupport webkit widgets xml \
 		buildtools_build qmake_build
 USE_XORG=	x11
 
diff --git deskutils/kdeconnect/Makefile deskutils/kdeconnect/Makefile
index 7b22833422fa..8177fba57e7d 100644
--- deskutils/kdeconnect/Makefile
+++ deskutils/kdeconnect/Makefile
@@ -9,9 +9,9 @@ MASTER_SITES=	KDE/unstable/kdeconnect/${PORTVERSION}/src/
 MAINTAINER=	yurkis@gmail.com
 COMMENT=	Support for KDE to interface between your phone and your computer
 
-USES=		cmake:noninja compiler:c++0x gettext kde:4 tar:xz
+USES=		cmake:noninja compiler:c++0x gettext kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4 workspace runtime
-USE_QT4=	corelib gui moc_build qmake_build uic_build rcc_build
+USE_QT=		corelib gui moc_build qmake_build uic_build rcc_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git deskutils/kdepim-addons/Makefile deskutils/kdepim-addons/Makefile
index e7c1d907cf87..e0b0bfa3f38d 100644
--- deskutils/kdepim-addons/Makefile
+++ deskutils/kdepim-addons/Makefile
@@ -16,7 +16,7 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 		libqgpgme.so:security/gpgme-qt5
 
 USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 \
-		pkgconfig tar:xz
+		pkgconfig qt:5 tar:xz
 USE_KDE=	archive auth codecs completion config configwidgets coreaddons \
 		dbusaddons ecm i18n iconthemes itemmodels itemviews jobwidgets \
 		kdeclarative khtml kio prison service sonnet syntaxhighlighting \
@@ -29,7 +29,7 @@ USE_KDE+=	akonadi akonadicalendar akonadicontacts akonadiimportwizard \
 		kdepim-apps-libs libkdepim libkleo libksieve mailcommon \
 		mailimporter mailtransport messagelib mime pimcommon \
 		pimtextedit tnef
-USE_QT5=	core dbus gui location network printsupport qml quick testlib \
+USE_QT=		core dbus gui location network printsupport qml quick testlib \
 		webchannel webengine widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git deskutils/kdepim-apps-libs/Makefile deskutils/kdepim-apps-libs/Makefile
index cddb1176ce6e..6da57b355b22 100644
--- deskutils/kdepim-apps-libs/Makefile
+++ deskutils/kdepim-apps-libs/Makefile
@@ -15,14 +15,14 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 		libgpgmepp.so:security/gpgme-cpp \
 		libqgpgme.so:security/gpgme-qt5
 
-USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		dbusaddons ecm i18n iconthemes itemmodels jobwidgets \
 		kdewebkit kio service sonnet widgetsaddons xmlgui
 # pim components
 USE_KDE+=	akonadi akonadicontacts contacts grantleetheme  libkleo mime \
 		pimcommon pimtextedit
-USE_QT5=	core dbus gui network testlib uitools webkit widgets xml \
+USE_QT=		core dbus gui network testlib uitools webkit widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git deskutils/kdepim-kde4/Makefile deskutils/kdepim-kde4/Makefile
index d9f73189a32b..ffca4192842c 100644
--- deskutils/kdepim-kde4/Makefile
+++ deskutils/kdepim-kde4/Makefile
@@ -25,12 +25,12 @@ CONFLICTS_INSTALL=	kdepim44-4.*
 USE_GNOME=	libxml2 libxslt:build
 USE_KDE=	kdelibs pimlibs kactivities \
 		akonadi automoc4 soprano nepomuk-widgets baloo
-USES=		cmake:outsource grantlee:4 iconv kde:4 shebangfix tar:xz
+USES=		cmake:outsource grantlee:4 iconv kde:4 qt:4 shebangfix tar:xz
 SHEBANG_FILES=	agents/mailfilteragent/kconf_update/migrate-kmail-filters.pl \
 		kalarm/*.pl kmail/kconf_update/*.pl \
 		libkpgp/kconf_update/kpgp-3.1-upgrade-address-data.pl
 USE_OPENLDAP=	yes
-USE_QT4=	corelib dbus declarative designer_build gui network opengl \
+USE_QT=		corelib dbus declarative designer_build gui network opengl \
 		qt3support script sql webkit xml \
 		qmake_build moc_build rcc_build uic_build
 USE_XORG=	x11 xscrnsaver
diff --git deskutils/kdepim-runtime-kde4/Makefile deskutils/kdepim-runtime-kde4/Makefile
index 01d5b6f4c550..aa5b2715da61 100644
--- deskutils/kdepim-runtime-kde4/Makefile
+++ deskutils/kdepim-runtime-kde4/Makefile
@@ -21,11 +21,11 @@ LIB_DEPENDS=	libboost_thread.so:devel/boost-libs \
 
 CONFLICTS_INSTALL=	kdepim-runtime44-4.*
 
-USES=		cmake:outsource kde:4 shared-mime-info tar:xz
+USES=		cmake:outsource kde:4 qt:4 shared-mime-info tar:xz
 USE_GNOME=	libxml2 libxslt:build
 USE_KDE=	kdelibs pimlibs \
 		akonadi automoc4
-USE_QT4=	corelib dbus declarative designer_build gui network qtestlib \
+USE_QT=		corelib dbus declarative designer_build gui network qtestlib \
 		script xml xmlpatterns \
 		qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
diff --git deskutils/kdepim-runtime/Makefile deskutils/kdepim-runtime/Makefile
index b3b2dae7f299..5b7007eaef81 100644
--- deskutils/kdepim-runtime/Makefile
+++ deskutils/kdepim-runtime/Makefile
@@ -15,7 +15,7 @@ LIB_DEPENDS=	libboost_date_time.so:devel/boost-libs \
 		libsasl2.so:security/cyrus-sasl2 \
 		libxerces-c-3.2.so:textproc/xerces-c3
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons guiaddons holidays i18n iconthemes \
 		itemmodels itemviews jobwidgets kcmutils kdelibs4support kio \
@@ -28,7 +28,7 @@ USE_KDE+=	akonadi akonadicontacts akonadimime akonadinotes \
 		calendarutils contacts gapi identitymanagement imap \
 		kontactinterface kpimdav mailtransport mbox mime pimcommon \
 		pimtextedit syndication
-USE_QT5=	core dbus gui location network printsupport qml quick speech \
+USE_QT=		core dbus gui location network printsupport qml quick speech \
 		script webchannel webengine widgets xml xmlpatterns \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git deskutils/kdepimlibs-kde4/Makefile deskutils/kdepimlibs-kde4/Makefile
index 2ceb79126576..ff34b47d893a 100644
--- deskutils/kdepimlibs-kde4/Makefile
+++ deskutils/kdepimlibs-kde4/Makefile
@@ -21,12 +21,12 @@ LIB_DEPENDS=	libgpgme.so:security/gpgme \
 		libprison.so:graphics/prison \
 		libqjson.so:devel/qjson@qt4
 
-USES=		cmake:outsource kde:4 shared-mime-info shebangfix tar:xz
+USES=		cmake:outsource kde:4 qt:4 shared-mime-info shebangfix tar:xz
 USE_KDE=	kdelibs akonadi \
 		automoc4 ontologies soprano
 SHEBANG_FILES=	mailtransport/kconf_update/migrate-transports.pl
 USE_OPENLDAP=	yes
-USE_QT4=	corelib dbus declarative designer_build gui network sql xml \
+USE_QT=		corelib dbus declarative designer_build gui network sql xml \
 		qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git deskutils/kdeplasma-addons-kde4/Makefile deskutils/kdeplasma-addons-kde4/Makefile
index 2131397a923d..d61dc47309b4 100644
--- deskutils/kdeplasma-addons-kde4/Makefile
+++ deskutils/kdeplasma-addons-kde4/Makefile
@@ -15,10 +15,10 @@ LIB_DEPENDS=	libqalculate.so:math/libqalculate \
 		libqjson.so:devel/qjson@qt4
 CONFLICTS_INSTALL=	plasma-applet-icontasks-0.[89].*
 
-USES=		cmake:outsource eigen:2 kde:4 pkgconfig shared-mime-info tar:xz
+USES=		cmake:outsource eigen:2 kde:4 pkgconfig qt:4 shared-mime-info tar:xz
 USE_KDE=	kdelibs libkexiv2 pimlibs workspace \
 		akonadi attica automoc4 qimageblitz soprano
-USE_QT4=	corelib dbus declarative gui network script sql webkit \
+USE_QT=		corelib dbus declarative gui network script sql webkit \
 		qmake_build moc_build rcc_build uic_build
 USE_XORG=	x11 xrender xtst
 USE_LDCONFIG=	yes
diff --git deskutils/keditbookmarks/Makefile deskutils/keditbookmarks/Makefile
index 8ad251d74158..f2b058004f7b 100644
--- deskutils/keditbookmarks/Makefile
+++ deskutils/keditbookmarks/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	deskutils kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Bookmark Organizer and Editor
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons ecm i18n iconthemes jobwidgets kio parts service \
 		sonnet textwidgets widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git deskutils/kfind/Makefile deskutils/kfind/Makefile
index e4827855cc4d..af4a60655f3f 100644
--- deskutils/kfind/Makefile
+++ deskutils/kfind/Makefile
@@ -7,13 +7,13 @@ CATEGORIES=	deskutils kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Find files and folders
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		coreaddons crash ecm guiaddons i18n iconthemes itemviews \
 		jobwidgets kdelibs4support kio notifications parts service \
 		solid sonnet textwidgets unitconversion widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	core dbus gui network printsupport widgets xml \
+USE_QT=		core dbus gui network printsupport widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git deskutils/kmail-account-wizard/Makefile deskutils/kmail-account-wizard/Makefile
index ada68bb3bbfc..70e2e4e69c3f 100644
--- deskutils/kmail-account-wizard/Makefile
+++ deskutils/kmail-account-wizard/Makefile
@@ -13,7 +13,7 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 		libgpgmepp.so:security/gpgme-cpp \
 		libqgpgme.so:security/gpgme-qt5
 
-USES=		cmake:outsource compiler:c++11-lib gettext  kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext  kde:5 qt:5 tar:xz
 USE_KDE=	attica auth codecs config configwidgets coreaddons crash \
 		dbusaddons ecm i18n itemmodels itemviews kcmutils kio kross \
 		newstuff notifications notifyconfig service texteditor wallet \
@@ -21,7 +21,7 @@ USE_KDE=	attica auth codecs config configwidgets coreaddons crash \
 # pim components
 USE_KDE+=	akonadi akonadimime identitymanagement ldap libkdepim libkleo \
 		mailtransport mime pimcommon pimtextedit
-USE_QT5=	core dbus gui network script widgets xml \
+USE_QT=		core dbus gui network script widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git deskutils/kmail/Makefile deskutils/kmail/Makefile
index 9724911c5391..b4d23b069fb7 100644
--- deskutils/kmail/Makefile
+++ deskutils/kmail/Makefile
@@ -20,7 +20,7 @@ RUN_DEPENDS=	accountwizard:deskutils/kmail-account-wizard \
 		mboximporter:deskutils/mbox-importer \
 		sieveeditor:deskutils/pim-sieve-editor
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm guiaddons i18n iconthemes \
 		itemmodels itemviews jobwidgets kcmutils kdelibs4support kio \
@@ -33,7 +33,7 @@ USE_KDE+=	akonadi akonadicontacts akonadimime akonadisearch calendarcore \
 		identitymanagement libkdepim libkleo libksieve \
 		kontactinterface ldap mailcommon mailtransport messagelib \
 		mime pimcommon pimtextedit tnef
-USE_QT5=	core dbus gui location network printsupport qml quick \
+USE_QT=		core dbus gui location network printsupport qml quick \
 		webchannel webengine widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git deskutils/knotes/Makefile deskutils/knotes/Makefile
index dbcd42c2d82a..a61dfcbd121d 100644
--- deskutils/knotes/Makefile
+++ deskutils/knotes/Makefile
@@ -11,7 +11,7 @@ LICENSE=	LGPL21
 
 LIB_DEPENDS=	libical.so:devel/libical
 
-USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 qt:5 tar:xz
 USE_KDE=	attica auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons dnssd globalaccel guiaddons i18n \
 		iconthemes itemmodels itemviews jobwidgets kcmutils \
@@ -22,7 +22,7 @@ USE_KDE=	attica auth bookmarks codecs completion config configwidgets \
 USE_KDE+=	akonadi akonadicontacts akonadinotes akonadisearch  \
 		calendarcore calendarutils contacts kontactinterface libkdepim \
 		mime pimcommon pimtextedit
-USE_QT5=	core dbus gui network printsupport widgets x11extras xml \
+USE_QT=		core dbus gui network printsupport widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	ice sm x11 xext
 USE_LDCONFIG=	yes
diff --git deskutils/kontact/Makefile deskutils/kontact/Makefile
index f59742493508..7f668e1dd950 100644
--- deskutils/kontact/Makefile
+++ deskutils/kontact/Makefile
@@ -9,13 +9,13 @@ COMMENT=	KDE Personal Information Manager
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		ecm i18n iconthemes itemmodels jobwidgets kcmutils kio parts \
 		service sonnet textwidgets widgetsaddons windowsystem xmlgui
 # pim components
 USE_KDE+=	akonadi grantleetheme kdepim-apps-libs kontactinterface libkdepim
-USE_QT5=	core dbus gui location network qml quick webchannel webengine \
+USE_QT=		core dbus gui location network qml quick webchannel webengine \
 		widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git deskutils/korganizer/Makefile deskutils/korganizer/Makefile
index 2135db53f0e6..37645acba6d3 100644
--- deskutils/korganizer/Makefile
+++ deskutils/korganizer/Makefile
@@ -10,7 +10,7 @@ COMMENT=	Calendar and scheduling Program
 
 LIB_DEPENDS=	libical.so:devel/libical
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	attica auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm guiaddons i18n iconthemes \
 		itemmodels itemviews jobwidgets kcmutils kdelibs4support kio \
@@ -22,7 +22,7 @@ USE_KDE+=	akonadi akonadicalendar akonadicontacts akonadimime \
 		calendarutils contacts eventviews holidays identitymanagement \
 		incidenceeditor kdepim-apps-libs kontactinterface ldap \
 		libkdepim mailtransport mime pimcommon pimtextedit
-USE_QT5=	core dbus gui network phonon4 printsupport widgets xml \
+USE_QT=		core dbus gui network phonon4 printsupport widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git deskutils/kruler-kde4/Makefile deskutils/kruler-kde4/Makefile
index 33e0588ddd6f..df6f5d644e0f 100644
--- deskutils/kruler-kde4/Makefile
+++ deskutils/kruler-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	deskutils kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE 4 screen ruler
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_XORG=	x11
 
 .include <bsd.port.mk>
diff --git deskutils/kruler/Makefile deskutils/kruler/Makefile
index 49d2e2076fb6..b0efa16f03fb 100644
--- deskutils/kruler/Makefile
+++ deskutils/kruler/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	deskutils kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE screen ruler
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons ecm doctools i18n \
 		notifications widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui widgets x11extras xml \
+USE_QT=		core dbus gui widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	x11 xcb
 
diff --git deskutils/ksshaskpass/Makefile deskutils/ksshaskpass/Makefile
index ff5807da5a2f..0bc3dc4dcf65 100644
--- deskutils/ksshaskpass/Makefile
+++ deskutils/ksshaskpass/Makefile
@@ -12,9 +12,9 @@ MAINTAINER=	swills@FreeBSD.org
 COMMENT=	KDE 4 version of ssh-askpass with KWallet support
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
-USES=		cmake kde:4
+USES=		cmake kde:4 qt:4
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build uic_build qmake_build rcc_build
+USE_QT=		moc_build uic_build qmake_build rcc_build
 
 SUB_FILES=	pkg-message
 
diff --git deskutils/latte-dock/Makefile deskutils/latte-dock/Makefile
index a0dfc4c8659e..0a4c8ecabefd 100644
--- deskutils/latte-dock/Makefile
+++ deskutils/latte-dock/Makefile
@@ -13,13 +13,13 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libxcb-util.so:x11/xcb-util
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	activities archive auth codecs config configwidgets \
 		coreaddons crash dbusaddons globalaccel i18n iconthemes \
 		kdeclarative notifications package plasma-framework service \
 		wayland widgetsaddons windowsystem xmlgui \
 		ecm_build
-USE_QT5=	core dbus gui network qml quick widgets x11extras xml \
+USE_QT=		core dbus gui network qml quick widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	ice sm x11 xcb xext
 
diff --git deskutils/launchy/Makefile deskutils/launchy/Makefile
index 3a72b9843431..521142782139 100644
--- deskutils/launchy/Makefile
+++ deskutils/launchy/Makefile
@@ -16,9 +16,9 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 BUILD_DEPENDS=	${LOCALBASE}/include/boost/shared_ptr.hpp:devel/boost-libs
 RUN_DEPENDS=	${LOCALBASE}/bin/xdg-open:devel/xdg-utils
 
-USES=		dos2unix qmake
+USES=		dos2unix qmake qt:4
 DOS2UNIX_FILES=	readme.lyx readme.txt
-USE_QT4=	moc_build rcc_build uic_build gui network
+USE_QT=		moc_build rcc_build uic_build gui network
 LDFLAGS+=	-lX11
 PORTDOCS=	*
 
diff --git deskutils/libkdepim/Makefile deskutils/libkdepim/Makefile
index 21747b5c5588..494dc902e721 100644
--- deskutils/libkdepim/Makefile
+++ deskutils/libkdepim/Makefile
@@ -11,13 +11,13 @@ LICENSE=	LGPL21
 
 LIB_DEPENDS=	libboost_thread.so:devel/boost-libs
 
-USES=		cmake:outsource gettext compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource gettext compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons ecm \
 		i18n iconthemes itemmodels itemviews jobwidgets kcmutils \
 		kio service wallet widgetsaddons
 # pim components
 USE_KDE+=	akonadi akonadicontacts akonadisearch contacts  ldap mime
-USE_QT5=	core dbus designer gui network testlib uiplugin uitools \
+USE_QT=		core dbus designer gui network testlib uiplugin uitools \
 		widgets xml \
 		buildtools_build qmake_build
 
diff --git deskutils/lumina-archiver/Makefile deskutils/lumina-archiver/Makefile
index 3a58ed48cf31..86f88d05eb45 100644
--- deskutils/lumina-archiver/Makefile
+++ deskutils/lumina-archiver/Makefile
@@ -22,8 +22,8 @@ I18N_DESC=	Install localization files
 
 MAKE_JOBS_UNSAFE=yes
 
-USES=		qmake
-USE_QT5=	core gui widgets network svg \
+USES=		qmake qt:5
+USE_QT=		core gui widgets network svg \
 		buildtools_build x11extras concurrent multimedia
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
@@ -32,7 +32,7 @@ GH_TAGNAME=	b6536c1547571ae8dd0618bed752e2e0025bf2a7
 WRKSRC_SUBDIR=	src-qt5/desktop-utils/${PORTNAME}
 
 .if${PORT_OPTIONS:MI18N}
-USE_QT5+=	linguist_build
+USE_QT+=	linguist_build
 QMAKE_ARGS+=CONFIG+=WITH_I18N
 .endif
 
diff --git deskutils/lumina-calculator/Makefile deskutils/lumina-calculator/Makefile
index 9bfffbc47267..abfe88cea427 100644
--- deskutils/lumina-calculator/Makefile
+++ deskutils/lumina-calculator/Makefile
@@ -27,10 +27,10 @@ I18N_DESC=	Install localization files
 
 MAKE_JOBS_UNSAFE=yes
 
-USES=		qmake
+USES=		qmake qt:5
 USE_GL=		gl
 USE_XORG=	x11 xdamage xcb
-USE_QT5=	core gui widgets network svg \
+USE_QT=		core gui widgets network svg \
 		buildtools_build x11extras concurrent multimedia
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
@@ -39,7 +39,7 @@ GH_TAGNAME=	b6536c1547571ae8dd0618bed752e2e0025bf2a7
 WRKSRC_SUBDIR=	src-qt5/desktop-utils/${PORTNAME}
 
 .if${PORT_OPTIONS:MI18N}
-USE_QT5+=	linguist_build
+USE_QT+=	linguist_build
 QMAKE_ARGS+=CONFIG+=WITH_I18N
 .endif
 
diff --git deskutils/lumina-fileinfo/Makefile deskutils/lumina-fileinfo/Makefile
index eb07c3de5069..3b3fef629ee7 100644
--- deskutils/lumina-fileinfo/Makefile
+++ deskutils/lumina-fileinfo/Makefile
@@ -22,8 +22,8 @@ I18N_DESC=	Install localization files
 
 MAKE_JOBS_UNSAFE=yes
 
-USES=		qmake
-USE_QT5=	core gui widgets network svg \
+USES=		qmake qt:5
+USE_QT=		core gui widgets network svg \
 		buildtools_build x11extras concurrent multimedia
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
@@ -32,7 +32,7 @@ GH_TAGNAME=	b6536c1547571ae8dd0618bed752e2e0025bf2a7
 WRKSRC_SUBDIR=	src-qt5/desktop-utils/${PORTNAME}
 
 .if${PORT_OPTIONS:MI18N}
-USE_QT5+=	linguist_build
+USE_QT+=	linguist_build
 QMAKE_ARGS+=CONFIG+=WITH_I18N
 .endif
 
diff --git deskutils/lumina-fm/Makefile deskutils/lumina-fm/Makefile
index feb10c4f732b..191fd1e1d365 100644
--- deskutils/lumina-fm/Makefile
+++ deskutils/lumina-fm/Makefile
@@ -22,9 +22,9 @@ I18N_DESC=	Install localization files
 
 MAKE_JOBS_UNSAFE=yes
 
-USE_QT5=	core gui widgets network svg imageformats \
+USE_QT=		core gui widgets network svg imageformats \
 		buildtools_build x11extras multimedia concurrent
-USES=		qmake
+USES=		qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
 GH_PROJECT=	lumina
@@ -32,7 +32,7 @@ GH_TAGNAME=	b6536c1547571ae8dd0618bed752e2e0025bf2a7
 WRKSRC_SUBDIR=	src-qt5/desktop-utils/${PORTNAME}
 
 .if${PORT_OPTIONS:MI18N}
-USE_QT5+=	linguist_build
+USE_QT+=	linguisttools_build
 QMAKE_ARGS+=CONFIG+=WITH_I18N
 .endif
 
diff --git deskutils/lumina-mediaplayer/Makefile deskutils/lumina-mediaplayer/Makefile
index bd63b79cd123..efe6efe7a0a8 100644
--- deskutils/lumina-mediaplayer/Makefile
+++ deskutils/lumina-mediaplayer/Makefile
@@ -24,8 +24,8 @@ I18N_DESC=	Install localization files
 
 MAKE_JOBS_UNSAFE=yes
 
-USES=		qmake
-USE_QT5=	core gui widgets network svg \
+USES=		qmake qt:5
+USE_QT=		core gui widgets network svg \
 		buildtools_build x11extras multimedia concurrent
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
@@ -34,7 +34,7 @@ GH_TAGNAME=	b6536c1547571ae8dd0618bed752e2e0025bf2a7
 WRKSRC_SUBDIR=	src-qt5/desktop-utils/${PORTNAME}
 
 .if${PORT_OPTIONS:MI18N}
-USE_QT5+=	linguist_build
+USE_QT+=	linguist_build
 QMAKE_ARGS+=CONFIG+=WITH_I18N
 .endif
 
diff --git deskutils/lumina-notify/Makefile deskutils/lumina-notify/Makefile
index 0d8dcfc394f7..47c152c6c7f6 100644
--- deskutils/lumina-notify/Makefile
+++ deskutils/lumina-notify/Makefile
@@ -18,8 +18,8 @@ I18N_DESC=	Install localization files
 
 MAKE_JOBS_UNSAFE=yes
 
-USES=		qmake
-USE_QT5=	core gui widgets network svg \
+USES=		qmake qt:5
+USE_QT=		core gui widgets network svg \
 		buildtools_build x11extras concurrent multimedia
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
@@ -28,7 +28,7 @@ GH_TAGNAME=	b6536c1547571ae8dd0618bed752e2e0025bf2a7
 WRKSRC_SUBDIR=	src-qt5/desktop-utils/${PORTNAME}
 
 .if${PORT_OPTIONS:MI18N}
-USE_QT5+=	linguist_build
+USE_QT+=	linguist_build
 QMAKE_ARGS+=CONFIG+=WITH_I18N
 .endif
 
diff --git deskutils/lumina-pdf/Makefile deskutils/lumina-pdf/Makefile
index 504e48b1c055..87e42df7fb4c 100644
--- deskutils/lumina-pdf/Makefile
+++ deskutils/lumina-pdf/Makefile
@@ -23,9 +23,9 @@ I18N_DESC=	Install localization files
 
 MAKE_JOBS_UNSAFE=yes
 
-USE_QT5=	core gui widgets network svg multimedia \
+USE_QT=		core gui widgets network svg multimedia \
 		buildtools_build x11extras concurrent printsupport
-USES=		qmake
+USES=		qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
 GH_PROJECT=	lumina
@@ -33,7 +33,7 @@ GH_TAGNAME=	b6536c1547571ae8dd0618bed752e2e0025bf2a7
 WRKSRC_SUBDIR=	src-qt5/desktop-utils/${PORTNAME}
 
 .if${PORT_OPTIONS:MI18N}
-USE_QT5+=	linguist_build
+USE_QT+=	linguist_build
 QMAKE_ARGS+=CONFIG+=WITH_I18N
 .endif
 
diff --git deskutils/lumina-screenshot/Makefile deskutils/lumina-screenshot/Makefile
index 5b7f1f304a82..ba3c74b015d6 100644
--- deskutils/lumina-screenshot/Makefile
+++ deskutils/lumina-screenshot/Makefile
@@ -22,9 +22,9 @@ I18N_DESC=	Install localization files
 
 MAKE_JOBS_UNSAFE=yes
 
-USE_QT5=	core gui widgets network svg \
+USE_QT=		core gui widgets network svg \
 		buildtools_build x11extras concurrent multimedia
-USES=		qmake
+USES=		qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
 GH_PROJECT=	lumina
@@ -32,7 +32,7 @@ GH_TAGNAME=	b6536c1547571ae8dd0618bed752e2e0025bf2a7
 WRKSRC_SUBDIR=	src-qt5/desktop-utils/${PORTNAME}
 
 .if${PORT_OPTIONS:MI18N}
-USE_QT5+=	linguist_build
+USE_QT+=	linguist_build
 QMAKE_ARGS+=CONFIG+=WITH_I18N
 .endif
 
diff --git deskutils/lumina-textedit/Makefile deskutils/lumina-textedit/Makefile
index 795aaa7cbe18..6e4fb37965a2 100644
--- deskutils/lumina-textedit/Makefile
+++ deskutils/lumina-textedit/Makefile
@@ -23,9 +23,9 @@ I18N_DESC=	Install localization files
 
 MAKE_JOBS_UNSAFE=yes
 
-USE_QT5=	core gui widgets network svg printsupport \
+USE_QT=		core gui widgets network svg printsupport \
 		buildtools_build x11extras concurrent multimedia
-USES=		qmake
+USES=		qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
 GH_PROJECT=	lumina
@@ -33,7 +33,7 @@ GH_TAGNAME=	b6536c1547571ae8dd0618bed752e2e0025bf2a7
 WRKSRC_SUBDIR=	src-qt5/desktop-utils/${PORTNAME}
 
 .if${PORT_OPTIONS:MI18N}
-USE_QT5+=	linguist_build
+USE_QT+=	linguist_build
 QMAKE_ARGS+=CONFIG+=WITH_I18N
 .endif
 
diff --git deskutils/lumina-xdg-entry/Makefile deskutils/lumina-xdg-entry/Makefile
index ad6ec727d7bb..1e8d5f236a38 100644
--- deskutils/lumina-xdg-entry/Makefile
+++ deskutils/lumina-xdg-entry/Makefile
@@ -20,16 +20,16 @@ I18N_DESC=	Install localization files
 
 MAKE_JOBS_UNSAFE=yes
 
-USE_QT5=	core gui widgets network svg \
+USE_QT=		core gui widgets network svg \
 		buildtools_build x11extras concurrent multimedia
-USES=		qmake
+USES=		qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
 GH_PROJECT=	lumina
 WRKSRC_SUBDIR=	src-qt5/desktop-utils/${PORTNAME}
 
 .if${PORT_OPTIONS:MI18N}
-USE_QT5+=	linguist_build
+USE_QT+=	linguist_build
 QMAKE_ARGS+=	CONFIG+=WITH_I18N
 .endif
 
diff --git deskutils/mbox-importer/Makefile deskutils/mbox-importer/Makefile
index a389e3f8b012..da51e285573a 100644
--- deskutils/mbox-importer/Makefile
+++ deskutils/mbox-importer/Makefile
@@ -13,14 +13,14 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 		libgpgmepp.so:security/gpgme-cpp \
 		libqgpgme.so:security/gpgme-qt5
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive auth codecs completion config configwidgets coreaddons \
 		crash ecm i18n itemmodels kio service widgetsaddons
 # pim components
 USE_KDE+=	akonadi akonadicontacts akonadimime contacts \
 		identitymanagement libkleo mailcommon mailimporter messagelib \
 		mime pimcommon pimtextedit
-USE_QT5=	core gui network widgets xml \
+USE_QT=		core gui network widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git deskutils/nextcloudclient/Makefile deskutils/nextcloudclient/Makefile
index 41e49189617c..a4c213fed90d 100644
--- deskutils/nextcloudclient/Makefile
+++ deskutils/nextcloudclient/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libinotify.so:devel/libinotify \
 		libqt5keychain.so:security/qtkeychain@qt5
 
 USES=		cmake:outsource,noninja compiler:c++11-lib gmake iconv \
-		localbase:ldflags pkgconfig sqlite ssl
-USE_QT5=	buildtools_build concurrent core dbus gui linguist_build network \
+		localbase:ldflags pkgconfig qt:5 sqlite ssl
+USE_QT=		buildtools_build concurrent core dbus gui linguist_build network \
 		qmake_build sql webkit widgets xml
 CMAKE_ARGS=	-DBUILD_WITH_QT4:BOOL=OFF \
 		-DCMAKE_INSTALL_MANDIR:STRING=man \
diff --git deskutils/owncloudclient/Makefile deskutils/owncloudclient/Makefile
index c1cfd7afc0a2..8c12db6fd07f 100644
--- deskutils/owncloudclient/Makefile
+++ deskutils/owncloudclient/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libinotify.so:devel/libinotify \
 		libqt5keychain.so:security/qtkeychain@qt5
 
 USES=		cmake:outsource,noninja compiler:c++11-lib gmake iconv kde:5 \
-		localbase:ldflags pkgconfig sqlite
-USE_QT5=	buildtools_build concurrent core dbus gui linguist_build network \
+		localbase:ldflags pkgconfig qt:5 sqlite
+USE_QT=		buildtools_build concurrent core dbus gui linguist_build network \
 		qmake_build sql webkit widgets xml
 USE_KDE=	completion config coreaddons jobwidgets kio service widgetsaddons
 CMAKE_ARGS=	-DBUILD_WITH_QT4:BOOL=OFF \
diff --git deskutils/pim-data-exporter/Makefile deskutils/pim-data-exporter/Makefile
index 7c2b4d14d6ba..8c2a9326574e 100644
--- deskutils/pim-data-exporter/Makefile
+++ deskutils/pim-data-exporter/Makefile
@@ -13,7 +13,7 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 		libgpgmepp.so:security/gpgme-cpp \
 		libqgpgme.so:security/gpgme-qt5
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm i18n itemmodels itemviews \
 		jobwidgets kio notifications service solid wallet \
@@ -22,7 +22,7 @@ USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 USE_KDE+=	akonadi akonadicontacts akonadimime contacts \
 		identitymanagement libkdepim libkleo mailcommon mailtransport \
 		messagelib mime pimcommon pimtextedit
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git deskutils/pim-sieve-editor/Makefile deskutils/pim-sieve-editor/Makefile
index 6344a91db91b..dff38cad3fb0 100644
--- deskutils/pim-sieve-editor/Makefile
+++ deskutils/pim-sieve-editor/Makefile
@@ -7,14 +7,13 @@ CATEGORIES=	deskutils kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Mail sieve editor
 
-
- USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs config configwidgets coreaddons crash \
 		dbusaddons ecm i18n iconthemes kio service wallet \
 		widgetsaddons xmlgui
 # pim components
 USE_KDE+=	libksieve mailtransport pimcommon
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git deskutils/plasma-applet-cwp/Makefile deskutils/plasma-applet-cwp/Makefile
index 051a40c0f75b..c2c0f169af9b 100644
--- deskutils/plasma-applet-cwp/Makefile
+++ deskutils/plasma-applet-cwp/Makefile
@@ -14,9 +14,9 @@ COMMENT=	Weather plasma applet for KDE4
 
 LICENSE=	GPLv3
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	gui dbus network opengl svg phonon webkit xml \
+USE_QT=		gui dbus network opengl svg phonon webkit xml \
 		qmake_build moc_build rcc_build uic_build
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
diff --git deskutils/plasma-applet-daisy/Makefile deskutils/plasma-applet-daisy/Makefile
index 39b8e1a3d479..059df80f53b9 100644
--- deskutils/plasma-applet-daisy/Makefile
+++ deskutils/plasma-applet-daisy/Makefile
@@ -14,9 +14,9 @@ COMMENT=	Simple launcher plasma applet for KDE4
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake gettext kde:4
+USES=		cmake gettext kde:4 qt:4
 USE_KDE=	automoc4 kdelibs workspace
-USE_QT4=	corelib dbus gui network svg xml \
+USE_QT=		corelib dbus gui network svg xml \
 		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git deskutils/plasma-applet-fancytasks/Makefile deskutils/plasma-applet-fancytasks/Makefile
index f07c145e7aef..ac577f463ec6 100644
--- deskutils/plasma-applet-fancytasks/Makefile
+++ deskutils/plasma-applet-fancytasks/Makefile
@@ -14,9 +14,9 @@ COMMENT=	Plasmoid fancy representation of your tasks and launchers
 
 LICENSE=	GPLv2
 
-USES=		cmake kde:4 tar:bzip2
+USES=		cmake kde:4 qt:4 tar:bzip2
 USE_KDE=	automoc4 kdelibs workspace qimageblitz
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
diff --git deskutils/plasma-applet-panelspacer/Makefile deskutils/plasma-applet-panelspacer/Makefile
index c6bf6d54661c..0ccefad29aab 100644
--- deskutils/plasma-applet-panelspacer/Makefile
+++ deskutils/plasma-applet-panelspacer/Makefile
@@ -13,9 +13,9 @@ COMMENT=	Panel spacer plasma applet for KDE4
 
 LICENSE=	GPLv2
 
-USES=		cmake kde:4
+USES=		cmake kde:4 qt:4
 USE_KDE=	automoc4 workspace
-USE_QT4=	gui dbus network opengl svg webkit xml \
+USE_QT=		gui dbus network opengl svg webkit xml \
 		qmake_build moc_build rcc_build uic_build
 
 WRKSRC=		${WRKDIR}/Panelspacer_from_svn_pour_kdelook-tmp
diff --git deskutils/plasma-applet-qstardict/Makefile deskutils/plasma-applet-qstardict/Makefile
index e2acdb6a0c74..a6e4e26d6d5d 100644
--- deskutils/plasma-applet-qstardict/Makefile
+++ deskutils/plasma-applet-qstardict/Makefile
@@ -15,8 +15,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 RUN_DEPENDS=	${QSTARDICT_PLUGIN_PATH}/libstardict.so:textproc/qstardict
 
-USES=		cmake kde:4 tar:bzip2
-USE_QT4=	qmake_build uic_build moc_build rcc_build
+USES=		cmake kde:4 qt:4 tar:bzip2
+USE_QT=		qmake_build uic_build moc_build rcc_build
 USE_KDE=	automoc4 kdelibs
 CMAKE_SOURCE_PATH=	${WRKSRC}/kdeplasma
 
diff --git deskutils/plasma-applet-serverstatuswidget/Makefile deskutils/plasma-applet-serverstatuswidget/Makefile
index 06e4a5759a51..69850a56ae99 100644
--- deskutils/plasma-applet-serverstatuswidget/Makefile
+++ deskutils/plasma-applet-serverstatuswidget/Makefile
@@ -13,9 +13,9 @@ COMMENT=	KDE4 server monitoring plasma applet
 
 LICENSE=	GPLv2
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	automoc4 workspace
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
diff --git deskutils/plasma-applet-simpleweatherforecast/Makefile deskutils/plasma-applet-simpleweatherforecast/Makefile
index c24e8cd675a6..6d622545d1e6 100644
--- deskutils/plasma-applet-simpleweatherforecast/Makefile
+++ deskutils/plasma-applet-simpleweatherforecast/Makefile
@@ -14,9 +14,9 @@ COMMENT=	Weather plasma applet for KDE4
 
 RUN_DEPENDS=	wget:ftp/wget
 
-USES=		cmake kde:4
+USES=		cmake kde:4 qt:4
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	gui dbus network opengl svg webkit xml \
+USE_QT=		gui dbus network opengl svg webkit xml \
 		qmake_build moc_build rcc_build uic_build
 
 WRKSRC=		${WRKDIR}/plasma-${PORTNAME}-${PORTVERSION}-kde-4.3.80
diff --git deskutils/plasma-applet-teacooker/Makefile deskutils/plasma-applet-teacooker/Makefile
index 3670155c7995..8410f00d7251 100644
--- deskutils/plasma-applet-teacooker/Makefile
+++ deskutils/plasma-applet-teacooker/Makefile
@@ -13,9 +13,9 @@ COMMENT=	KDE4 tea cooker plasma applet
 
 LICENSE=	GPLv3
 
-USES=		cmake kde:4
+USES=		cmake kde:4 qt:4
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	gui dbus network opengl svg webkit xml \
+USE_QT=		gui dbus network opengl svg webkit xml \
 		qmake_build moc_build rcc_build uic_build
 
 WRKSRC=		${WRKDIR}/TeaCooker
diff --git deskutils/plasma-applet-yawp/Makefile deskutils/plasma-applet-yawp/Makefile
index a729b6813e6c..16533ad75f5b 100644
--- deskutils/plasma-applet-yawp/Makefile
+++ deskutils/plasma-applet-yawp/Makefile
@@ -13,9 +13,9 @@ COMMENT=	KDE4 weather plasma applet
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/LICENSE-GPL2
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	automoc4 kdelibs workspace
-USE_QT4=	corelib dbus gui network svg xml \
+USE_QT=		corelib dbus gui network svg xml \
 		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git deskutils/plasma5-milou/Makefile deskutils/plasma5-milou/Makefile
index 1a8ba984d9fe..4b6bb9ed1093 100644
--- deskutils/plasma5-milou/Makefile
+++ deskutils/plasma5-milou/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	deskutils kde kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 Plasmoid for search
 
-USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config coreaddons i18n kdeclarative package \
 		plasma-framework runner service
-USE_QT5=	core gui network qml quick script testlib widgets \
+USE_QT=		core gui network qml quick script testlib widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git deskutils/plasma5-sddm-kcm/Makefile deskutils/plasma5-sddm-kcm/Makefile
index e33bb8286650..8b23c9e80fc4 100644
--- deskutils/plasma5-sddm-kcm/Makefile
+++ deskutils/plasma5-sddm-kcm/Makefile
@@ -8,11 +8,11 @@ MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 config module for SDDM
 
 USES=		cmake:outsource compiler:c++11-lib gettext kde:5 cpe pkgconfig \
-		tar:xz
+		qt:5 tar:xz
 USE_KDE=	auth archive attica codecs completion config configwidgets \
 		coreaddons ecm i18n jobwidgets kio newstuff service \
 		widgetsaddons xmlgui
-USE_QT5=	concurrent core dbus designer gui network qml quick uiplugin widgets \
+USE_QT=		concurrent core dbus designer gui network qml quick uiplugin widgets \
 		x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	ice sm x11 xcb xcursor xext xfixes
diff --git deskutils/qorganizer/Makefile deskutils/qorganizer/Makefile
index 0ebdb512d08e..0994a89ae920 100644
--- deskutils/qorganizer/Makefile
+++ deskutils/qorganizer/Makefile
@@ -14,8 +14,8 @@ COMMENT=	General organizer that includes calendar with jurnal and schedule
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/../COPYING
 
-USES=		qmake
-USE_QT4=	corelib gui network moc_build rcc_build sql
+USES=		qmake qt:4
+USE_QT=		corelib gui network moc_build rcc_build sql
 WRKSRC=		${WRKDIR}/qOrganizer/src
 
 PLIST_FILES=	bin/qOrganizer share/pixmaps/qOrganizer.png
diff --git deskutils/qrfcview/Makefile deskutils/qrfcview/Makefile
index 1febafc1c89d..4bd65b79b9e4 100644
--- deskutils/qrfcview/Makefile
+++ deskutils/qrfcview/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Graphical RFC viewer
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		qmake tar:tgz
-USE_QT4=	gui network corelib uic_build moc_build rcc_build
+USES=		qmake qt:4 tar:tgz
+USE_QT=		gui network corelib uic_build moc_build rcc_build
 
 SUB_FILES=	qRFCView
 
diff --git deskutils/qtm/Makefile deskutils/qtm/Makefile
index 3eb014623091..1b434af6a6da 100644
--- deskutils/qtm/Makefile
+++ deskutils/qtm/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Blog management application based on Qt 4
 LICENSE=	GPLv2 # only
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake tar:bzip2 ssl
-USE_QT4=	corelib dbus gui network xml \
+USES=		cmake qt:4 tar:bzip2 ssl
+USE_QT=		corelib dbus gui network xml \
 		moc_build qmake_build rcc_build uic_build
 CMAKE_ARGS=	-DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \
 		-DMANPAGE_DIRECTORY:STRING="${MANPREFIX}/man/man1" \
diff --git deskutils/recoll/Makefile deskutils/recoll/Makefile
index 5417f0d2416f..06937b1957eb 100644
--- deskutils/recoll/Makefile
+++ deskutils/recoll/Makefile
@@ -55,13 +55,13 @@ KONQUEROR_RUN_DEPENDS=	kwebkitpart>0:www/kwebkitpart
 LATEX_USE=		tex=dvipsk:run,latex:run
 PDF_RUN_DEPENDS=	pdftotext:graphics/poppler-utils
 PS_RUN_DEPENDS=		pstotext:print/pstotext
-QT4_USE=		qt4=moc_build,qmake_build,rcc_build,uic_build \
-			qt4=iconengines_run,imageformats_run \
-			qt4=corelib,gui,xml,webkit
+QT4_USES=		qmake:no_env qt:4
+QT4_USE=		qt=moc_build,qmake_build,rcc_build,uic_build \
+			qt=iconengines_run,imageformats_run \
+			qt=corelib,gui,xml,webkit
 QT4_CONFIGURE_ENABLE=	qtgui
 QT4_CONFIGURE_ENV=	QMAKE="${QMAKE}" QMAKESPEC="${QMAKESPEC}" \
 			QTDIR="${PREFIX}"
-QT4_VARS=		QT_NONSTANDARD=yes
 SOUND_RUN_DEPENDS=	mutagen-pony:audio/py-mutagen@${PY_FLAVOR} \
 			pykaraoke:audio/py-karaoke@${PY_FLAVOR}
 X11MON_DESC=		X11 session monitoring support
diff --git deskutils/semantik/Makefile deskutils/semantik/Makefile
index 02123a5046e6..3f59441e9cdd 100644
--- deskutils/semantik/Makefile
+++ deskutils/semantik/Makefile
@@ -12,14 +12,13 @@ COMMENT=	KDE mind mapping tool
 
 LICENSE=	GPLv3
 
-USES=		kde:4 pkgconfig python:2.7 shebangfix tar:bzip2 waf \
+USES=		kde:4 pkgconfig python:2.7 qmake:no_env,no_configure qt:4 shebangfix tar:bzip2 waf \
 		gettext shared-mime-info
 USE_KDE=	kdelibs
 USE_OCAML=	yes
 NO_OCAML_RUNDEPENDS=	yes
-USE_QT4=	corelib gui linguist_build svg webkit xml \
+USE_QT=		corelib gui linguist_build svg webkit xml \
 		moc_build qmake_build uic_build
-QT_NONSTANDARD=	yes
 CONFIGURE_ENV=	CXXFLAGS="${CXXFLAGS}" \
 		PATH="${KDE_PREFIX}/bin:$$PATH" \
 		WAF_HOME="${WRKSRC}"
diff --git deskutils/silence/Makefile deskutils/silence/Makefile
index a938b072bf08..56429f35ef86 100644
--- deskutils/silence/Makefile
+++ deskutils/silence/Makefile
@@ -16,9 +16,9 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 RUN_DEPENDS=	${KDE_PREFIX}/lib/kde4/katepart.so:editors/kate-kde4
 
-USES=		cmake kde:4
+USES=		cmake kde:4 qt:4
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qmake_build moc_build rcc_build uic_build linguisttools_build
+USE_QT=		qmake_build moc_build rcc_build uic_build linguisttools_build
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
diff --git deskutils/strigiclient/Makefile deskutils/strigiclient/Makefile
index 04f818a9ab2e..257ae5de8e8a 100644
--- deskutils/strigiclient/Makefile
+++ deskutils/strigiclient/Makefile
@@ -13,7 +13,8 @@ LIB_DEPENDS=	libstreams.so:deskutils/libstreams \
 		libstreamanalyzer.so:deskutils/libstreamanalyzer \
 		libsearchclient.so:deskutils/strigidaemon
 
-USE_QT4=	corelib gui dbus moc_build uic_build qmake_build rcc_build
+USES=	qt:4
+USE_QT=		corelib gui dbus moc_build uic_build qmake_build rcc_build
 USE_LDCONFIG=	yes
 
 .include <${.CURDIR}/../strigi/Makefile.common>
diff --git deskutils/superkaramba-kde4/Makefile deskutils/superkaramba-kde4/Makefile
index 76d62734daa2..eaf8b41d2203 100644
--- deskutils/superkaramba-kde4/Makefile
+++ deskutils/superkaramba-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	deskutils kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Widget framework for KDE
 
-USES=		cmake:outsource kde:4 python:2.7 tar:xz
+USES=		cmake:outsource kde:4 python:2.7 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4 qimageblitz
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
 USE_CXXSTD=	gnu++98
 
diff --git deskutils/tuxcards/Makefile deskutils/tuxcards/Makefile
index fb24bec88f9d..0c66985aa066 100644
--- deskutils/tuxcards/Makefile
+++ deskutils/tuxcards/Makefile
@@ -11,8 +11,8 @@ MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Tool for managing notes within a hierarchical tree
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
-USES=		qmake
-USE_QT4=	gui xml moc_build uic_build rcc_build
+USES=		qmake qt:4
+USE_QT=		gui xml moc_build uic_build rcc_build
 
 PLIST_FILES=	bin/tuxcards
 
diff --git deskutils/vym/Makefile deskutils/vym/Makefile
index 84ac5b2a02cf..16e6e93e5e5f 100644
--- deskutils/vym/Makefile
+++ deskutils/vym/Makefile
@@ -10,9 +10,9 @@ MASTER_SITES=	SF/vym/Archive/${PORTVERSION}
 MAINTAINER=	lichray@gmail.com
 COMMENT=	VYM is a tool to generate and manipulate mind maps
 
-USES=		qmake shebangfix tar:bzip2
+USES=		qmake qt:4 shebangfix tar:bzip2
 SHEBANG_FILES=	scripts/makedist-vym scripts/vivym
-USE_QT4=	uic_build moc_build qt3support_build \
+USE_QT=		uic_build moc_build qt3support_build \
 		network xml dbus svg
 QMAKE_ARGS=	DATADIR=${DATADIR:C,/vym$,,} \
 		DOCDIR=${DOCSDIR}
@@ -28,7 +28,8 @@ DESKTOP_ENTRIES=	"VYM" \
 
 OPTIONS_DEFINE=	NLS DOCS
 OPTIONS_SUB=	yes
-NLS_USE=	QT4=linguist_build
+NLS_USES=	qt:4
+NLS_USE=	QT=linguist_build
 
 .include <bsd.port.options.mk>
 
diff --git deskutils/znotes/Makefile deskutils/znotes/Makefile
index 4315079a7980..ba0492191d6a 100644
--- deskutils/znotes/Makefile
+++ deskutils/znotes/Makefile
@@ -24,9 +24,11 @@ GH_PROJECT=	zNotes
 GH_TAGNAME=	6423c5e
 
 . if ${FLAVOR} == qt4
-USE_QT4=	uic_build moc_build rcc_build linguisttools_build corelib gui network xml
+USES+=		qt:4
+USE_QT=		uic_build moc_build rcc_build linguisttools_build corelib gui network xml
 . else
-USE_QT5=	buildtools_build linguisttools_build core gui network printsupport widgets xml
+USES+=		qt:5
+USE_QT=		buildtools_build linguisttools_build core gui network printsupport widgets xml
 . endif
 
 DESKTOP_ENTRIES="zNotes" "Notes managment" \
diff --git devel/RStudio/Makefile devel/RStudio/Makefile
index 0bd285b912d2..f2ecf4d30d51 100644
--- devel/RStudio/Makefile
+++ devel/RStudio/Makefile
@@ -28,7 +28,7 @@ LIB_DEPENDS=	libR.so:math/R \
 		libinotify.so:devel/libinotify \
 		libuuid.so:misc/e2fsprogs-libuuid
 
-USES=		cmake:outsource desktop-file-utils fortran pkgconfig shared-mime-info ssl
+USES=		cmake:outsource desktop-file-utils fortran pkgconfig qt:5 shared-mime-info ssl
 USE_QT5=	core dbus gui location network opengl printsupport qml quick sensors \
 		sql svg webchannel webengine webkit widgets xml xmlpatterns buildtools_build qmake_build
 USE_JAVA=	yes
diff --git devel/apiextractor/Makefile devel/apiextractor/Makefile
index 6ee5f97c7ee2..136140ea247e 100644
--- devel/apiextractor/Makefile
+++ devel/apiextractor/Makefile
@@ -17,9 +17,9 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	PySide
 GH_PROJECT=	Apiextractor
 
-USES=		cmake
+USES=		cmake qt:4
 USE_GNOME=	libxml2 libxslt
-USE_QT4=	gui moc_build qmake_build qtestlib_build \
+USE_QT=		gui moc_build qmake_build qtestlib_build \
 		rcc_build uic_build xml xmlpatterns
 USE_LDCONFIG=	yes
 
diff --git devel/apitrace/Makefile devel/apitrace/Makefile
index a2f3883c35bc..2ebf4919d40c 100644
--- devel/apitrace/Makefile
+++ devel/apitrace/Makefile
@@ -24,7 +24,8 @@ OPTIONS_DEFAULT=	QT5
 OPTIONS_SUB=	yes
 
 QT5_CMAKE_BOOL=	ENABLE_GUI
-QT5_USE=	qt5=core,gui,network,widgets,buildtools_build,qmake_build
+QT5_USES=	qt:5
+QT5_USE=	qt=core,gui,network,widgets,buildtools_build,qmake_build
 
 post-install:
 	${RM} ${STAGEDIR}${DOCSDIR}/LICENSE.txt
diff --git devel/automoc4/Makefile devel/automoc4/Makefile
index 15d3f8a0ce2a..e30f42f3a5fb 100644
--- devel/automoc4/Makefile
+++ devel/automoc4/Makefile
@@ -11,7 +11,7 @@ DIST_SUBDIR=	KDE
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Automatic moc for Qt 4 packages
 
-USE_QT4=	corelib moc qmake_build rcc_build uic_build
-USES=		cmake tar:bzip2
+USE_QT=		corelib moc qmake_build rcc_build uic_build
+USES=		cmake qt:4 tar:bzip2
 
 .include <bsd.port.mk>
diff --git devel/cervisia-kde4/Makefile devel/cervisia-kde4/Makefile
index 93f379e7b375..816a7cc6d8da 100644
--- devel/cervisia-kde4/Makefile
+++ devel/cervisia-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	devel kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	CVS Frontend for KDE
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git devel/cervisia/Makefile devel/cervisia/Makefile
index 513720982ffb..5691a815de28 100644
--- devel/cervisia/Makefile
+++ devel/cervisia/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	devel kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	CVS Frontend for KDE
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	dbusaddons doctools ecm iconthemes init itemviews kdesu \
 		notifications parts widgetsaddons
-USE_QT5=	core dbus gui widgets \
+USE_QT=		core dbus gui widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git devel/cmake-doc/Makefile devel/cmake-doc/Makefile
index b5f89c7d4b2f..af5c2c65422f 100644
--- devel/cmake-doc/Makefile
+++ devel/cmake-doc/Makefile
@@ -17,8 +17,8 @@ BUILD_DEPENDS=	sphinx-build:textproc/py-sphinx
 DISTINFO_FILE=	${.CURDIR}/../cmake/distinfo
 
 NO_ARCH=	yes
-USES=		cmake:outsource
-USE_QT5=	help_build
+USES=		cmake:outsource qt:5
+USE_QT=		help_build
 
 CMAKE_OFF=	SPHINX_MAN
 CMAKE_ON=	SPHINX_HTML SPHINX_QTHELP
diff --git devel/cmake-gui/Makefile devel/cmake-gui/Makefile
index 942fb15197dc..35473fdc5f05 100644
--- devel/cmake-gui/Makefile
+++ devel/cmake-gui/Makefile
@@ -19,9 +19,9 @@ LIB_DEPENDS=	libcurl.so:ftp/curl \
 		libuv.so:devel/libuv \
 		librhash.so:security/rhash
 
-USE_QT5=	core gui widgets buildtools_build qmake_build
+USE_QT=		core gui widgets buildtools_build qmake_build
 USES=		cmake:run desktop-file-utils libarchive \
-		shared-mime-info
+		qt:5 shared-mime-info
 CMAKE_OFF=	BUILD_CursesDialog \
 		CMake_SPHINX_DEPEND_ON_EXECUTABLES
 CMAKE_ON=	BUILD_QtDialog \
diff --git devel/codequery/Makefile devel/codequery/Makefile
index ffefda493b19..93a8e65cfe99 100644
--- devel/codequery/Makefile
+++ devel/codequery/Makefile
@@ -14,12 +14,12 @@ LICENSE_COMB=	multi
 LICENSE_FILE_MPL20=	${WRKSRC}/LICENSE.md
 LICENSE_FILE_MIT=	${WRKSRC}/querylib/README.txt
 
-USES=		cmake compiler:c++11-lang ninja sqlite
+USES=		cmake compiler:c++11-lang ninja qt:4 sqlite
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	ruben2020
 
-USE_QT4=	linguisttools_build moc_build rcc_build uic_build \
+USE_QT=		linguisttools_build moc_build rcc_build uic_build \
 		corelib gui qmake xml
 
 PLIST_FILES=	bin/codequery \
diff --git devel/cppcheck/Makefile devel/cppcheck/Makefile
index 7835ff6dbfce..ffb076ad49c9 100644
--- devel/cppcheck/Makefile
+++ devel/cppcheck/Makefile
@@ -21,7 +21,8 @@ COMMENT=		Static analysis of C/C++ code (GUI)
 RUN_DEPENDS=		cppcheck:devel/cppcheck
 
 CMAKE_ARGS=		-DBUILD_GUI=TRUE
-USE_QT5=		core gui widgets printsupport qmake_build buildtools_build linguisttools_build
+USES+=			qt:5
+USE_QT=			core gui widgets printsupport qmake_build buildtools_build linguisttools_build
 
 BUILD_WRKSRC=		${WRKSRC}/gui
 INSTALL_WRKSRC=		${WRKSRC}/gui
diff --git devel/dolphin-plugins-kde4/Makefile devel/dolphin-plugins-kde4/Makefile
index 495e3f382b48..4e89eeef2de2 100644
--- devel/dolphin-plugins-kde4/Makefile
+++ devel/dolphin-plugins-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	devel kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plugins for Dolphin file manager
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkonq automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git devel/dolphin-plugins/Makefile devel/dolphin-plugins/Makefile
index 8c9f1ab6b08c..420c57209111 100644
--- devel/dolphin-plugins/Makefile
+++ devel/dolphin-plugins/Makefile
@@ -10,13 +10,13 @@ COMMENT=	Plugins for Dolphin file manager
 BUILD_DEPENDS=	dolphin:x11-fm/dolphin
 RUN_DEPENDS=	dolphin:x11-fm/dolphin
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash guiaddons i18n iconthemes itemviews jobwidgets \
 		kdelibs4support kio notifications parts service solid sonnet \
 		texteditor textwidgets unitconversion widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	core dbus gui network printsupport widgets xml \
+USE_QT=		core dbus gui network printsupport widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git devel/edb/Makefile devel/edb/Makefile
index 79736b328d2d..459845b88484 100644
--- devel/edb/Makefile
+++ devel/edb/Makefile
@@ -14,8 +14,8 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libboost_thread.so:devel/boost-libs
 
-USES=		qmake tar:tgz
-USE_QT4=	gui network xml moc_build rcc_build uic_build
+USES=		qmake qt:4 tar:tgz
+USE_QT=		gui network xml moc_build rcc_build uic_build
 QMAKE_ARGS=	DEFAULT_PLUGIN_PATH="${PREFIX}/libexec/${PORTNAME}"
 
 WRKSRC=		${WRKDIR}/debugger
diff --git devel/fuel/Makefile devel/fuel/Makefile
index 307f60912e22..196e62adae8e 100644
--- devel/fuel/Makefile
+++ devel/fuel/Makefile
@@ -19,8 +19,10 @@ OPTIONS_SINGLE_GUI=	QT4 QT5
 OPTIONS_DEFAULT=	QT5
 
 USES=		qmake shebangfix
-QT4_USE=	QT4=corelib,gui,webkit,linguisttools_build,moc_build,rcc_build,uic_build
-QT5_USE=	QT5=core,gui,network,webkit,widgets,buildtools_build,linguisttools_build
+QT4_USES=	qt:4
+QT4_USE=	QT=corelib,gui,webkit,linguisttools_build,moc_build,rcc_build,uic_build
+QT5_USES=	qt:5
+QT5_USE=	QT=core,gui,network,webkit,widgets,buildtools_build,linguisttools_build
 
 SHEBANG_FILES=	intl/convert.sh
 PLIST_FILES=	bin/fuel share/applications/fuel.desktop \
diff --git devel/generatorrunner/Makefile devel/generatorrunner/Makefile
index 62fd691679c8..c9b25798a806 100644
--- devel/generatorrunner/Makefile
+++ devel/generatorrunner/Makefile
@@ -16,9 +16,9 @@ LIB_DEPENDS=	libapiextractor.so:devel/apiextractor
 
 PLIST_SUB=	PORTVERSION=${PORTVERSION}
 
-USE_QT4=	gui qmake_build qtestlib moc_build rcc_build uic_build xml
+USE_QT=		gui qmake_build qtestlib moc_build rcc_build uic_build xml
 
-USES=		cmake
+USES=		cmake qt:4
 USE_GITHUB=	yes
 USE_LDCONFIG=	yes
 
diff --git devel/grantlee/Makefile devel/grantlee/Makefile
index e85161967560..39037ecb5d0c 100644
--- devel/grantlee/Makefile
+++ devel/grantlee/Makefile
@@ -15,9 +15,9 @@ LICENSE=	LGPL21
 
 PORTSCOUT=	limit:^0\.
 
-USE_QT4=	corelib gui qtestlib_build script \
+USE_QT=		corelib gui qtestlib_build script \
 		qmake_build moc_build rcc_build uic_build
-USES=		cmake:outsource grantlee:4,selfbuild
+USES=		cmake:outsource grantlee:4,selfbuild qt:4
 CMAKE_ARGS+=	-DBUILD_TESTS:BOOL=FALSE
 USE_LDCONFIG=	yes
 
diff --git devel/grantlee5/Makefile devel/grantlee5/Makefile
index 38bca3da48e9..2bfd1c0ba151 100644
--- devel/grantlee5/Makefile
+++ devel/grantlee5/Makefile
@@ -15,8 +15,8 @@ LICENSE=	LGPL21
 
 PORTSCOUT=	limit:^5\.
 
-USE_QT5=	buildtools_build core gui qmake_build script
-USES=		cmake:outsource compiler:c++11-lib grantlee:5,selfbuild
+USE_QT=		buildtools_build core gui qmake_build script
+USES=		cmake:outsource compiler:c++11-lib grantlee:5,selfbuild qt:5
 CMAKE_ARGS+=	-DBUILD_TESTS:BOOL=FALSE
 USE_LDCONFIG=	yes
 
diff --git devel/gwenhywfar/Makefile devel/gwenhywfar/Makefile
index 6c6175e4d43b..d471a3e04614 100644
--- devel/gwenhywfar/Makefile
+++ devel/gwenhywfar/Makefile
@@ -59,17 +59,17 @@ USE_GNOME+=	cairo gdkpixbuf2 gtk20
 .  elif ${SLAVEPORT}=="gtk3"
 USE_GNOME+=	cairo gdkpixbuf2 gtk30
 .  elif ${SLAVEPORT}=="qt4"
-USE_QT4=	corelib gui moc_build uic_build
-QT_NONSTANDARD=	yes
+USES+=		qmake:no_env qt:4
+USE_QT=		corelib gui moc_build uic_build
 CONFIGURE_ARGS+=--with-qt4-includes=${QT_INCDIR} \
 		--with-qt4-libs=${QT_LIBDIR} \
 		--with-qt4-moc=${MOC} \
 		--with-qt4-uic=${UIC}
 .  elif ${SLAVEPORT}=="qt5"
+USES+=		qmake:no_env qt:5
 USE_GL=		gl
-USE_QT5=	core gui widgets \
+USE_QT=		core gui widgets \
 		buildtools_build qmake_build
-QT_NONSTANDARD=	yes
 CONFIGURE_ARGS+=--with-qt5-qmake=${QMAKE} \
 		--with-qt5-moc=${MOC} \
 		--with-qt5-uic=${UIC}
diff --git devel/heimdall/Makefile devel/heimdall/Makefile
index 4631b84cefe1..daddf86273fa 100644
--- devel/heimdall/Makefile
+++ devel/heimdall/Makefile
@@ -19,7 +19,8 @@ OPTIONS_DEFINE=	DOCS GUI
 OPTIONS_DEFAULT=GUI
 OPTIONS_SUB=	yes
 
-GUI_USE=	QT5=buildtools_build,core,gui,qmake_build,widgets
+GUI_USES=	qt:5
+GUI_USE=	QT=buildtools_build,core,gui,qmake_build,widgets
 GUI_CMAKE_OFF=	-DDISABLE_FRONTEND=YES
 
 GH_ACCOUNT=	Benjamin-Dobell
diff --git devel/injeqt/Makefile devel/injeqt/Makefile
index 453536027192..2645c2d102c8 100644
--- devel/injeqt/Makefile
+++ devel/injeqt/Makefile
@@ -15,8 +15,8 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 USE_GITHUB=	yes
 GH_ACCOUNT=	vogel
 
-USES=		cmake compiler:c++11-lib pathfix
-USE_QT5=	core buildtools_build qmake_build testlib_build
+USES=		cmake compiler:c++11-lib pathfix qt:5
+USE_QT=		core buildtools_build qmake_build testlib_build
 USE_LDCONFIG=	yes
 
 CMAKE_ARGS=	-DDISABLE_EXAMPLES:BOOL=ON \
diff --git devel/kapptemplate-kde4/Makefile devel/kapptemplate-kde4/Makefile
index 77b8e0eaf96f..06839e1dd2bc 100644
--- devel/kapptemplate-kde4/Makefile
+++ devel/kapptemplate-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	devel kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE template generator
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build \
+USE_QT=		moc_build qmake_build rcc_build uic_build \
 		corelib dbus declarative
 
 .include <bsd.port.mk>
diff --git devel/kapptemplate/Makefile devel/kapptemplate/Makefile
index 588771687567..c5504a4f2ca0 100644
--- devel/kapptemplate/Makefile
+++ devel/kapptemplate/Makefile
@@ -10,10 +10,10 @@ COMMENT=	KDE template generator
 BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl \
 		docbook-xml>0:textproc/docbook-xml
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth archive codecs completion config configwidgets coreaddons \
 		doctools ecm i18n jobwidgets kio newstuff service widgetsaddons
-USE_QT5=	core gui network testlib widgets xml \
+USE_QT=		core gui network testlib widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git devel/kaptain/Makefile devel/kaptain/Makefile
index 09ba35669fa5..1325edbfce4a 100644
--- devel/kaptain/Makefile
+++ devel/kaptain/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Tool for building/running Qt GUIs for command line programs
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake tar:tgz
-USE_QT4=	qt3support moc_build
+USES=		qmake qt:4 tar:tgz
+USE_QT=		qt3support moc_build
 
 INFO=		kaptain
 PORTDOCS=	*
diff --git devel/kcachegrind-kde4/Makefile devel/kcachegrind-kde4/Makefile
index 14d291c82494..47d380042488 100644
--- devel/kcachegrind-kde4/Makefile
+++ devel/kcachegrind-kde4/Makefile
@@ -9,9 +9,9 @@ CATEGORIES=	devel kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Profiler frontend for KDE
 
-USES=		cmake:outsource kde:4 python:run tar:xz shebangfix
+USES=		cmake:outsource kde:4 python:run qt:4 tar:xz shebangfix
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build \
+USE_QT=		moc_build qmake_build rcc_build uic_build \
 		corelib dbus gui
 SHEBANG_FILES=	converters/op2calltree converters/dprof2calltree \
 		converters/memprof2calltree \
diff --git devel/kcachegrind/Makefile devel/kcachegrind/Makefile
index dd48e795b30e..d3ccc6416c65 100644
--- devel/kcachegrind/Makefile
+++ devel/kcachegrind/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	devel kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Profiler frontend for KDE
 
-USES=		cmake:outsource kde:5 python:run shebangfix tar:xz
+USES=		cmake:outsource kde:5 python:run qt:5 shebangfix tar:xz
 USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		coreaddons ecm i18n itemviews jobwidgets kio service solid \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 
 SHEBANG_FILES=	converters/hotshot2calltree.cmake \
diff --git devel/kdbg/Makefile devel/kdbg/Makefile
index d4eab7ff834f..38af022ec439 100644
--- devel/kdbg/Makefile
+++ devel/kdbg/Makefile
@@ -12,9 +12,9 @@ COMMENT=	Graphical user interface around gdb using KDE
 
 LICENSE=	GPLv2
 
-USES=		cmake kde:4
+USES=		cmake kde:4 qt:4
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build network xml dbus corelib gui svg
+USE_QT=		moc_build qmake_build rcc_build uic_build network xml dbus corelib gui svg
 INSTALLS_ICONS=	yes
 
 OPTIONS_DEFINE=	NLS
diff --git devel/kde-dev-scripts-kde4/Makefile devel/kde-dev-scripts-kde4/Makefile
index bf88ecf561ba..883209a1ff3b 100644
--- devel/kde-dev-scripts-kde4/Makefile
+++ devel/kde-dev-scripts-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	devel kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE development scripts
 
-USES=		cmake:outsource kde:4 python:run shebangfix tar:xz
+USES=		cmake:outsource kde:4 python:run qt:4 shebangfix tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 SHEBANG_FILES=	cxxmetric \
 		draw_lib_dependencies \
diff --git devel/kde-dev-scripts/Makefile devel/kde-dev-scripts/Makefile
index 78e12fa1de9a..3199d8b1567e 100644
--- devel/kde-dev-scripts/Makefile
+++ devel/kde-dev-scripts/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	devel kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE development scripts
 
-USES=		cmake:outsource kde:5 perl5 python:run shebangfix tar:xz
+USES=		cmake:outsource kde:5 perl5 python:run qt:5 shebangfix tar:xz
 USE_KDE=	doctools ecm
-USE_QT5=	buildtools_build qmake_build
+USE_QT=		buildtools_build qmake_build
 
 SHEBANG_FILES=	cxxmetric \
 		draw_lib_dependencies \
diff --git devel/kde-dev-utils-kde4/Makefile devel/kde-dev-utils-kde4/Makefile
index 3e8db9097bb0..d36a7dd2843b 100644
--- devel/kde-dev-utils-kde4/Makefile
+++ devel/kde-dev-utils-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	devel kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE development utilities
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build \
+USE_QT=		moc_build qmake_build rcc_build uic_build \
 		corelib designer gui qt3support xml
 
 .include <bsd.port.mk>
diff --git devel/kde-dev-utils/Makefile devel/kde-dev-utils/Makefile
index cf213fcf1096..387135580419 100644
--- devel/kde-dev-utils/Makefile
+++ devel/kde-dev-utils/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	devel kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE development utilities
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons ecm i18n itemviews jobwidgets kio parts service \
 		solid sonnet textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus designer gui network widgets xml \
+USE_QT=		core dbus designer gui network widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git devel/kdesdk-kioslaves-kde4/Makefile devel/kdesdk-kioslaves-kde4/Makefile
index 4ca111d6d86b..262b98f9fbe9 100644
--- devel/kdesdk-kioslaves-kde4/Makefile
+++ devel/kdesdk-kioslaves-kde4/Makefile
@@ -11,9 +11,9 @@ COMMENT=	SDK related KIO slaves
 
 LIB_DEPENDS=	libsvn_client-1.so:devel/subversion
 
-USES=		cmake:outsource kde:4 perl5 shebangfix tar:xz
+USES=		cmake:outsource kde:4 perl5 qt:4 shebangfix tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 SHEBANG_FILES=	perldoc/pod2html.pl
 
diff --git devel/kdesdk-strigi-analyzers-kde4/Makefile devel/kdesdk-strigi-analyzers-kde4/Makefile
index c1d25cf68a36..7ca4f9dbff4b 100644
--- devel/kdesdk-strigi-analyzers-kde4/Makefile
+++ devel/kdesdk-strigi-analyzers-kde4/Makefile
@@ -9,8 +9,8 @@ PKGNAMESUFFIX=	-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Strigi analyzers for SDK related file formats
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4 strigi
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git devel/kdesdk-thumbnailers-kde4/Makefile devel/kdesdk-thumbnailers-kde4/Makefile
index cd7bcf798deb..9a1a29b0cfca 100644
--- devel/kdesdk-thumbnailers-kde4/Makefile
+++ devel/kdesdk-thumbnailers-kde4/Makefile
@@ -9,8 +9,8 @@ PKGNAMESUFFIX=	-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE thumbnail generator for gettext po files
 
-USES=		cmake:outsource gettext kde:4 tar:xz
+USES=		cmake:outsource gettext kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git devel/kdesdk-thumbnailers/Makefile devel/kdesdk-thumbnailers/Makefile
index 1cf1c76650aa..403cfebe21c6 100644
--- devel/kdesdk-thumbnailers/Makefile
+++ devel/kdesdk-thumbnailers/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	devel kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE thumbnail generator for gettext po files
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	config ecm i18n kio
-USE_QT5=	core gui widgets \
+USE_QT=		core gui widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git devel/kdesdk/Makefile devel/kdesdk/Makefile
index d91ad6584e75..dea801ab2eea 100644
--- devel/kdesdk/Makefile
+++ devel/kdesdk/Makefile
@@ -7,8 +7,8 @@ CATEGORIES=	devel kde
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE Software Development Kit
 
-USES=		kde:5 metaport
-USE_QT5=	#
+USES=		kde:5 metaport qt:5
+USE_QT=		#
 
 OPTIONS_DEFINE=	CERVISIA \
 		DEVUTILS \
@@ -24,7 +24,7 @@ OPTIONS_DEFINE=	CERVISIA \
 		THUMBNAILER \
 		UMBRELLO
 
-# Remove dolphin from the default list, as it conflicts with the metaport x11/kde4
+# Remove dolphin from the default list, as it conflicts with the metaport qt:5 x11/kde4
 OPTIONS_DEFAULT=	${OPTIONS_DEFINE:NDOLPHIN}
 
 CERVISIA_DESC=		CVS frontend
diff --git devel/kdesvn-kde4/Makefile devel/kdesvn-kde4/Makefile
index 5f65a2ba5af4..af9654b66424 100644
--- devel/kdesvn-kde4/Makefile
+++ devel/kdesvn-kde4/Makefile
@@ -25,10 +25,10 @@ CONFLICTS=	kdesvn-2.* \
 CMAKE_ARGS+=	-DSUBVERSION_INCLUDE_DIR=${LOCALBASE}/include/subversion-1 \
 		-DMAN_INSTALL_DIR=${MANPREFIX}/man
 
-USES=		cmake:outsource compiler:c11 bdb kde:4 tar:xz
+USES=		cmake:outsource compiler:c11 bdb kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs soprano baseapps_run
 USE_LDCONFIG=	yes
-USE_QT4=	corelib gui xml network dbus svg sql \
+USE_QT=		corelib gui xml network dbus svg sql \
 		qmake_build moc_build rcc_build uic_build linguist_build
 
 OPTIONS_DEFINE=	DOCS NLS
diff --git devel/kdesvn/Makefile devel/kdesvn/Makefile
index 19b90d6190e3..eed4668c48bb 100644
--- devel/kdesvn/Makefile
+++ devel/kdesvn/Makefile
@@ -20,12 +20,12 @@ LIB_DEPENDS=	libapr-1.so:devel/apr1 \
 CONFLICTS_INSTALL=	kdesvn-kde4 \
 			qsvn-[0-9]*
 
-USES=		bdb cmake:outsource kde:5 tar:xz
+USES=		bdb cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons dbusaddons ecm i18n iconthemes itemviews jobwidgets \
 		kio notifications parts service sonnet texteditor textwidgets \
 		wallet widgetsaddons xmlgui
-USE_QT5=	concurrent core dbus gui network sql widgets xml \
+USE_QT=		concurrent core dbus gui network sql widgets xml \
 		buildtools_build qmake_build
 
 post-patch:
diff --git devel/kdev-php/Makefile devel/kdev-php/Makefile
index c3d42f7ac40b..29cb81577a97 100644
--- devel/kdev-php/Makefile
+++ devel/kdev-php/Makefile
@@ -12,11 +12,11 @@ COMMENT=	PHP support for KDevelop
 BUILD_DEPENDS=	kdev-pg-qt:devel/kdevelop-pg-qt
 LIB_DEPENDS=	libkdevcmakecommon.so:devel/kdevelop
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons ecm \
 		i18n itemmodels jobwidgets kcmutils kio parts service sonnet \
 		texteditor textwidgets threadweaver widgetsaddons xmlgui
-USE_QT5=	concurrent core dbus gui network webkit widgets xml \
+USE_QT=		concurrent core dbus gui network webkit widgets xml \
 		buildtools_build qmake_build
 
 # Does not build with jobs.
diff --git devel/kdev-python/Makefile devel/kdev-python/Makefile
index 2b8651efd63b..7a3d53d037c9 100644
--- devel/kdev-python/Makefile
+++ devel/kdev-python/Makefile
@@ -12,11 +12,11 @@ COMMENT=	Python support for KDevelop
 BUILD_DEPENDS=	kdev-pg-qt:devel/kdevelop-pg-qt
 LIB_DEPENDS=	libkdevcmakecommon.so:devel/kdevelop
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 python:3.4+ tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 python:3.4+ qt:5 tar:xz
 USE_KDE=	attica auth codecs completion config configwidgets coreaddons \
 		ecm i18n itemmodels jobwidgets kio newstuff parts service \
 		sonnet texteditor textwidgets threadweaver widgetsaddons xmlgui
-USE_QT5=	concurrent core dbus gui network widgets xml \
+USE_QT=		concurrent core dbus gui network widgets xml \
 		buildtools_build qmake_build
 
 # Does not build with jobs.
diff --git devel/kdevelop-kde4/Makefile devel/kdevelop-kde4/Makefile
index ae6c518a0ea4..e361316304e5 100644
--- devel/kdevelop-kde4/Makefile
+++ devel/kdevelop-kde4/Makefile
@@ -16,9 +16,9 @@ LIB_DEPENDS=	libkdevplatforminterfaces.so:devel/kdevplatform-kde4
 RUN_DEPENDS=	gmake:devel/gmake
 
 USES=		cmake:outsource compiler:c++11-lib kde:4 \
-		shared-mime-info tar:xz
+		qt:4 shared-mime-info tar:xz
 USE_KDE=	kdelibs workspace automoc4
-USE_QT4=	qmake_build moc_build uic_build rcc_build \
+USE_QT=		qmake_build moc_build uic_build rcc_build \
 		corelib declarative gui help script webkit xml
 
 OPTIONS_DEFINE=	OKTETA PHP NLS
diff --git devel/kdevelop-pg-qt-kde4/Makefile devel/kdevelop-pg-qt-kde4/Makefile
index cbc2cdc064da..145d3ace364a 100644
--- devel/kdevelop-pg-qt-kde4/Makefile
+++ devel/kdevelop-pg-qt-kde4/Makefile
@@ -14,8 +14,8 @@ COMMENT=	Parser-generator from KDevplatform
 
 BUILD_DEPENDS=	${LOCALBASE}/bin/flex:textproc/flex
 
-USES=		bison cmake:outsource compiler:c++11-lib kde:4 tar:bzip2
+USES=		bison cmake:outsource compiler:c++11-lib kde:4 qt:4 tar:bzip2
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	qmake_build moc_build uic_build rcc_build
+USE_QT=		qmake_build moc_build uic_build rcc_build
 
 .include <bsd.port.mk>
diff --git devel/kdevelop-pg-qt/Makefile devel/kdevelop-pg-qt/Makefile
index a76b29560cd0..5c021fbda600 100644
--- devel/kdevelop-pg-qt/Makefile
+++ devel/kdevelop-pg-qt/Makefile
@@ -15,9 +15,9 @@ LICENSE_FILE=	${WRKSRC}/COPYING.LIB
 
 BUILD_DEPENDS=	${LOCALBASE}/bin/flex:textproc/flex
 
-USES=		bison cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		bison cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	core testlib \
+USE_QT=		core testlib \
 		buildtools_build qmake_build
 
 CONFLICTS=	kdevelop-pg-qt-1.0*
diff --git devel/kdevelop-php-docs-kde4/Makefile devel/kdevelop-php-docs-kde4/Makefile
index 79ccaa6a69fe..92b6baf044a5 100644
--- devel/kdevelop-php-docs-kde4/Makefile
+++ devel/kdevelop-php-docs-kde4/Makefile
@@ -13,9 +13,9 @@ COMMENT=	PHP documentation for KDevelop
 
 LIB_DEPENDS=	libkdevplatforminterfaces.so:devel/kdevplatform-kde4
 
-USES=		cmake:outsource compiler:c++11-lib kde:4 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build webkit
+USE_QT=		moc_build qmake_build rcc_build uic_build webkit
 
 OPTIONS_DEFINE=	NLS
 OPTIONS_SUB=	yes
diff --git devel/kdevelop-php-kde4/Makefile devel/kdevelop-php-kde4/Makefile
index 6c8acbab7a73..8a54c98aa4d7 100644
--- devel/kdevelop-php-kde4/Makefile
+++ devel/kdevelop-php-kde4/Makefile
@@ -14,9 +14,9 @@ COMMENT=	PHP support for KDevelop
 LIB_DEPENDS=	libkdevplatforminterfaces.so:devel/kdevplatform-kde4
 BUILD_DEPENDS=	${KDE_PREFIX}/bin/kdev-pg-qt:devel/kdevelop-pg-qt-kde4
 
-USES=		cmake:outsource compiler:c++11-lib kde:4 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 MAKE_JOBS_UNSAFE=	yes
 
 OPTIONS_DEFINE=	PHPDOCS NLS
diff --git devel/kdevelop/Makefile devel/kdevelop/Makefile
index 2c06c48f8cba..258205494242 100644
--- devel/kdevelop/Makefile
+++ devel/kdevelop/Makefile
@@ -22,7 +22,7 @@ LIB_DEPENDS=	libkasten3controllers.so:devel/okteta \
 RUN_DEPENDS=	gmake:devel/gmake
 
 USES=		cmake:outsource compiler:c++11-lib desktop-file-utils \
-		gettext grantlee:5 kde:5 shared-mime-info shebangfix tar:xz
+		gettext grantlee:5 kde:5 qt:5 shared-mime-info shebangfix tar:xz
 USE_KDE=	archive attica auth bookmarks codecs completion config configwidgets \
 		coreaddons crash guiaddons emoticons i18n iconthemes init \
 		itemmodels itemviews jobwidgets kcmutils kdeclarative \
@@ -30,7 +30,7 @@ USE_KDE=	archive attica auth bookmarks codecs completion config configwidgets \
 		notifyconfig package parts plasma-framework \
 		runner service solid sonnet texteditor textwidgets threadweaver \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	concurrent core dbus gui help network qml quick \
+USE_QT=		concurrent core dbus gui help network qml quick \
 		script sql widgets xml buildtools_build qmake_build
 CONFLICTS=	kdevelop-kde4-4* kdevelop-4* kdevplatform-kde4-4* kdevplatform-4*
 SHEBANG_FILES=	kdevplatform/util/kdevplatform_shell_environment.sh \
@@ -38,7 +38,8 @@ SHEBANG_FILES=	kdevplatform/util/kdevplatform_shell_environment.sh \
 
 OPTIONS_DEFINE=	WEBENGINE
 WEBENGINE_DESC=	Use WebEngine as help reader
-WEBENGINE_USE=	QT5=location,webchannel,webengine
+WEBENGINE_USES=	qt:5
+WEBENGINE_USE=	QT=location,webchannel,webengine
 WEBENGINE_USE_OFF=	QT5=webkit
 WEBENGINE_CMAKE_OFF=	-DCMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngineWidgets:BOOL=TRUE
 
diff --git devel/kdevplatform-kde4/Makefile devel/kdevplatform-kde4/Makefile
index 654da2207c2a..a2c9fe5236e3 100644
--- devel/kdevplatform-kde4/Makefile
+++ devel/kdevplatform-kde4/Makefile
@@ -16,10 +16,10 @@ LIB_DEPENDS=	libsvn_client-1.so:devel/subversion \
 		libboost_thread.so:devel/boost-libs \
 		libqjson.so:devel/qjson@qt4
 
-USES=		cmake:outsource compiler:c++11-lib grantlee:4 kde:4 shebangfix \
+USES=		cmake:outsource compiler:c++11-lib grantlee:4 kde:4 qt:4 shebangfix \
 		tar:xz
 USE_KDE=	kate_run kdelibs automoc4
-USE_QT4=	qmake_build moc_build uic_build rcc_build \
+USE_QT=		qmake_build moc_build uic_build rcc_build \
 		corelib designer_build gui webkit
 USE_LDCONFIG=	yes
 
diff --git devel/kf5-extra-cmake-modules/Makefile devel/kf5-extra-cmake-modules/Makefile
index 3e982e0b0224..01e16ed6dff4 100644
--- devel/kf5-extra-cmake-modules/Makefile
+++ devel/kf5-extra-cmake-modules/Makefile
@@ -11,11 +11,13 @@ COMMENT=	Extra modules and scripts for CMake
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/COPYING-CMAKE-SCRIPTS
 
-USES=		cmake:outsource kde:5 tar:xz
-USE_QT5=	#
+USES=		cmake:outsource kde:5 qt:5 tar:xz
+USE_QT=		#
 
-HELP_USE=	QT5=help_build  # qt5-help is only used to build a .qch file.
-TEST_USE=	QT5=buildtools_build,linguisttools_build,qmake_build
+HELP_USES=	qt:5
+HELP_USE=	QT=help_build  # qt5-help is only used to build a .qch file.
+TEST_USES=	qt:5
+TEST_USE=	QT=buildtools_build,linguisttools_build,qmake_build
 NO_ARCH=	yes
 
 ## options
diff --git devel/kf5-kapidox/Makefile devel/kf5-kapidox/Makefile
index 31e6a853281d..ff61fdd73485 100644
--- devel/kf5-kapidox/Makefile
+++ devel/kf5-kapidox/Makefile
@@ -10,9 +10,9 @@ COMMENT=	KF5 API Documentation Tools
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		cmake:outsource kde:5 python tar:xz
+USES=		cmake:outsource kde:5 python qt:5 tar:xz
 USE_KDE=	archive ecm
-USE_QT5=	buildtools_build qmake_build
+USE_QT=		buildtools_build qmake_build
 USE_PYTHON=	py3kplist
 
 NO_ARCH=	yes
diff --git devel/kf5-kauth/Makefile devel/kf5-kauth/Makefile
index 7e4e215ade64..065b3f1aecfc 100644
--- devel/kf5-kauth/Makefile
+++ devel/kf5-kauth/Makefile
@@ -9,9 +9,9 @@ COMMENT=	KF5 abstraction to system policy and authentication features
 
 LIB_DEPENDS=	libpolkit-qt5-core-1.so:sysutils/polkit-qt@qt5
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	coreaddons ecm
-USE_QT5=	buildtools_build core dbus gui linguisttools qmake_build \
+USE_QT=		buildtools_build core dbus gui linguisttools qmake_build \
 		widgets
 
 .include <bsd.port.mk>
diff --git devel/kf5-kbookmarks/Makefile devel/kf5-kbookmarks/Makefile
index 0a51ae88df9e..969e8236e957 100644
--- devel/kf5-kbookmarks/Makefile
+++ devel/kf5-kbookmarks/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 library for bookmarks and the XBEL format
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons ecm \
 		iconthemes widgetsaddons xmlgui
-USE_QT5=	buildtools_build core dbus gui linguisttools \
+USE_QT=		buildtools_build core dbus gui linguisttools \
 		qmake_build widgets xml
 
 .include <bsd.port.mk>
diff --git devel/kf5-kcmutils/Makefile devel/kf5-kcmutils/Makefile
index 2b308cfdd928..c914f8a33498 100644
--- devel/kf5-kcmutils/Makefile
+++ devel/kf5-kcmutils/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 utilities for working with KCModules
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons ecm i18n \
 		iconthemes itemviews kdeclarative package service \
 		widgetsaddons xmlgui
-USE_QT5=	buildtools_build core dbus gui network qmake_build \
+USE_QT=		buildtools_build core dbus gui network qmake_build \
 		qml quick widgets xml
 
 .include <bsd.port.mk>
diff --git devel/kf5-kconfig/Makefile devel/kf5-kconfig/Makefile
index 3e0b0f3e739c..ba44f7fde53c 100644
--- devel/kf5-kconfig/Makefile
+++ devel/kf5-kconfig/Makefile
@@ -11,9 +11,9 @@ COMMENT=	KF5 widgets for configuration dialogs
 LICENSE=	LGPL21+
 LICENSE_FILE=	${WRKSRC}/COPYING.LIB
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build concurrent core gui linguisttools \
+USE_QT=		buildtools_build concurrent core gui linguisttools \
 		qmake_build testlib xml
 
 .include <bsd.port.mk>
diff --git devel/kf5-kcoreaddons/Makefile devel/kf5-kcoreaddons/Makefile
index 2909efbc3e83..5b003d2040b7 100644
--- devel/kf5-kcoreaddons/Makefile
+++ devel/kf5-kcoreaddons/Makefile
@@ -12,9 +12,9 @@ LICENSE_COMB=	multi
 LICENSE_FILE_LGPL21+=	${WRKSRC}/COPYING.LIB
 LICENSE_FILE_BSD3CLAUSE=	${WRKSRC}/COPYING-CMAKE-SCRIPTS
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 shared-mime-info tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 shared-mime-info tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core linguisttools qmake_build
+USE_QT=		buildtools_build core linguisttools qmake_build
 
 OPTIONS_DEFINE=		FAM INOTIFY
 OPTIONS_DEFAULT=	INOTIFY
diff --git devel/kf5-kcrash/Makefile devel/kf5-kcrash/Makefile
index 34ddf8ba28a3..87604d8267b0 100644
--- devel/kf5-kcrash/Makefile
+++ devel/kf5-kcrash/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 library to handle crash analysis and bug report from apps
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	coreaddons ecm windowsystem
-USE_QT5=	buildtools_build core gui qmake_build widgets x11extras
+USE_QT=		buildtools_build core gui qmake_build widgets x11extras
 USE_XORG=	ice sm x11 xext
 
 .include <bsd.port.mk>
diff --git devel/kf5-kdbusaddons/Makefile devel/kf5-kdbusaddons/Makefile
index d8856daeace0..f1be588b1544 100644
--- devel/kf5-kdbusaddons/Makefile
+++ devel/kf5-kdbusaddons/Makefile
@@ -10,9 +10,9 @@ COMMENT=	KF5 addons to QtDBus
 LICENSE=	LGPL21+
 LICENSE_FILE=	${WRKSRC}/COPYING.LIB
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core dbus gui linguisttools \
+USE_QT=		buildtools_build core dbus gui linguisttools \
 		qmake_build testlib x11extras
 
 .include <bsd.port.mk>
diff --git devel/kf5-kdeclarative/Makefile devel/kf5-kdeclarative/Makefile
index 990964c6091a..729192ecc1a2 100644
--- devel/kf5-kdeclarative/Makefile
+++ devel/kf5-kdeclarative/Makefile
@@ -10,11 +10,11 @@ COMMENT=	KF5 library providing integration of QML and KDE Frameworks
 LIB_DEPENDS=	libepoxy.so:graphics/libepoxy
 
 USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig \
-		tar:xz
+		qt:5 tar:xz
 USE_KDE=	completion config coreaddons globalaccel guiaddons i18n \
 		iconthemes jobwidgets kio package service widgetsaddons \
 		windowsystem
-USE_QT5=	buildtools_build core dbus gui network qmake_build qml \
+USE_QT=		buildtools_build core dbus gui network qmake_build qml \
 		quick testlib widgets xml
 
 .include <bsd.port.mk>
diff --git devel/kf5-kdoctools/Makefile devel/kf5-kdoctools/Makefile
index bfe8e5e24808..068fc398478e 100644
--- devel/kf5-kdoctools/Makefile
+++ devel/kf5-kdoctools/Makefile
@@ -13,9 +13,9 @@ BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-
 RUN_DEPENDS=	${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl \
 		docbook-xml>0:textproc/docbook-xml
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_GNOME=	libxml2 libxslt
 USE_KDE=	archive ecm i18n
-USE_QT5=	buildtools_build core qmake_build
+USE_QT=		buildtools_build core qmake_build
 
 .include <bsd.port.mk>
diff --git devel/kf5-kfilemetadata/Makefile devel/kf5-kfilemetadata/Makefile
index 946cd3f9d10f..8ed68b399d94 100644
--- devel/kf5-kfilemetadata/Makefile
+++ devel/kf5-kfilemetadata/Makefile
@@ -15,9 +15,9 @@ LIB_DEPENDS=	libavutil.so:multimedia/ffmpeg \
 # TODO: maybe depend on textproc/catdoc
 
 USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig \
-		tar:xz
+		qt:5 tar:xz
 USE_KDE=	archive ecm i18n
-USE_QT5=	buildtools_build core qmake_build xml
+USE_QT=		buildtools_build core qmake_build xml
 
 # Frameworks ports install localization files that conflict with some
 # KDE4 localization ports
diff --git devel/kf5-ki18n/Makefile devel/kf5-ki18n/Makefile
index 2f6c46410060..2daaf318fd53 100644
--- devel/kf5-ki18n/Makefile
+++ devel/kf5-ki18n/Makefile
@@ -8,8 +8,8 @@ MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 advanced internationalization framework
 
 USES=		cmake:outsource compiler:c++11-lib gettext-runtime \
-		gettext-tools:build,run kde:5 tar:xz
+		gettext-tools:build,run kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build concurrent core qmake_build qml script testlib
+USE_QT=		buildtools_build concurrent core qmake_build qml script testlib
 
 .include <bsd.port.mk>
diff --git devel/kf5-kidletime/Makefile devel/kf5-kidletime/Makefile
index 99a01a885556..60cb1f1fb79f 100644
--- devel/kf5-kidletime/Makefile
+++ devel/kf5-kidletime/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 library for monitoring user activity
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core dbus gui qmake_build widgets x11extras
+USE_QT=		buildtools_build core dbus gui qmake_build widgets x11extras
 USE_XORG=	ice sm x11 xext xcb xscrnsaver
 
 .include <bsd.port.mk>
diff --git devel/kf5-kio/Makefile devel/kf5-kio/Makefile
index 12fff228365d..6c1e819e6067 100644
--- devel/kf5-kio/Makefile
+++ devel/kf5-kio/Makefile
@@ -8,14 +8,14 @@ MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 resource and network access abstraction
 
 USES=		cmake:outsource compiler:c++11-lib desktop-file-utils \
-		gettext kde:5 ssl tar:xz
+		gettext kde:5 qt:5 ssl tar:xz
 USE_GNOME=	libxml2 libxslt
 USE_KDE=	archive auth bookmarks codecs completion config \
 		configwidgets coreaddons dbusaddons doctools ecm \
 		i18n iconthemes itemviews jobwidgets \
 		notifications service solid sonnet textwidgets wallet \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	buildtools_build concurrent core dbus gui network \
+USE_QT=		buildtools_build concurrent core dbus gui network \
 		qmake_build script widgets x11extras xml
 
 .include <bsd.port.mk>
diff --git devel/kf5-kitemmodels/Makefile devel/kf5-kitemmodels/Makefile
index 977ce26b7152..61fc04e85fe3 100644
--- devel/kf5-kitemmodels/Makefile
+++ devel/kf5-kitemmodels/Makefile
@@ -7,8 +7,8 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 models for Qt Model/View system
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core qmake_build testlib_build
+USE_QT=		buildtools_build core qmake_build testlib_build
 
 .include <bsd.port.mk>
diff --git devel/kf5-knewstuff/Makefile devel/kf5-knewstuff/Makefile
index 85f6e8b85156..dfde8d3a8dea 100644
--- devel/kf5-knewstuff/Makefile
+++ devel/kf5-knewstuff/Makefile
@@ -7,12 +7,12 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 library for downloading application assets from the network
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive attica5 auth codecs completion config \
 		configwidgets coreaddons ecm i18n iconthemes itemviews \
 		jobwidgets kio service sonnet textwidgets widgetsaddons \
 		xmlgui
-USE_QT5=	buildtools_build core dbus gui network qmake_build \
+USE_QT=		buildtools_build core dbus gui network qmake_build \
 		quick widgets xml
 
 .include <bsd.port.mk>
diff --git devel/kf5-knotifications/Makefile devel/kf5-knotifications/Makefile
index 19d844d43beb..6228e87977c3 100644
--- devel/kf5-knotifications/Makefile
+++ devel/kf5-knotifications/Makefile
@@ -10,9 +10,9 @@ COMMENT=	KF5 abstraction for system notifications
 
 LIB_DEPENDS=	libdbusmenu-qt5.so:devel/libdbusmenu-qt@qt5
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	codecs config coreaddons ecm windowsystem
-USE_QT5=	buildtools_build core dbus gui linguisttools phonon4 \
+USE_QT=		buildtools_build core dbus gui linguisttools phonon4 \
 		qmake_build widgets x11extras
 USE_XORG=	x11
 
diff --git devel/kf5-knotifyconfig/Makefile devel/kf5-knotifyconfig/Makefile
index f185256ac337..bbd8aaa339d3 100644
--- devel/kf5-knotifyconfig/Makefile
+++ devel/kf5-knotifyconfig/Makefile
@@ -8,10 +8,10 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 configuration system for KNotify
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	completion config coreaddons ecm i18n jobwidgets kio \
 		service widgetsaddons
-USE_QT5=	buildtools_build core dbus gui network phonon4 \
+USE_QT=		buildtools_build core dbus gui network phonon4 \
 		qmake_build widgets
 
 .include <bsd.port.mk>
diff --git devel/kf5-kpackage/Makefile devel/kf5-kpackage/Makefile
index ae6637c67144..984ecb0c27b7 100644
--- devel/kf5-kpackage/Makefile
+++ devel/kf5-kpackage/Makefile
@@ -7,8 +7,8 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 library to load and install packages
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive config coreaddons doctools ecm i18n
-USE_QT5=	buildtools_build core qmake_build xml
+USE_QT=		buildtools_build core qmake_build xml
 
 .include <bsd.port.mk>
diff --git devel/kf5-kparts/Makefile devel/kf5-kparts/Makefile
index 792122c6c54b..c806d1d1cb0c 100644
--- devel/kf5-kparts/Makefile
+++ devel/kf5-kparts/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 document centric plugin system
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		i18n iconthemes jobwidgets kio notifications service \
 		sonnet textwidgets widgetsaddons xmlgui
-USE_QT5=	buildtools_build core dbus gui network qmake_build widgets \
+USE_QT=		buildtools_build core dbus gui network qmake_build widgets \
 		xml
 
 .include <bsd.port.mk>
diff --git devel/kf5-kpeople/Makefile devel/kf5-kpeople/Makefile
index 2239844aefa8..da09ffe02c61 100644
--- devel/kf5-kpeople/Makefile
+++ devel/kf5-kpeople/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 library providing access to contacts
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons ecm i18n itemviews service widgetsaddons
-USE_QT5=	buildtools_build core dbus gui network qmake_build qml \
+USE_QT=		buildtools_build core dbus gui network qmake_build qml \
 		sql widgets
 
 .include <bsd.port.mk>
diff --git devel/kf5-kpty/Makefile devel/kf5-kpty/Makefile
index ea5f61135b15..f860cff7213c 100644
--- devel/kf5-kpty/Makefile
+++ devel/kf5-kpty/Makefile
@@ -7,8 +7,8 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 pty abstraction
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	coreaddons ecm i18n
-USE_QT5=	buildtools_build core qmake_build
+USE_QT=		buildtools_build core qmake_build
 
 .include <bsd.port.mk>
diff --git devel/kf5-kservice/Makefile devel/kf5-kservice/Makefile
index c7c750203b40..58442539c6ac 100644
--- devel/kf5-kservice/Makefile
+++ devel/kf5-kservice/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 advanced plugin and service introspection
 
-USES=		bison cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		bison cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive config coreaddons crash dbusaddons \
 		doctools ecm i18n
-USE_QT5=	buildtools_build core dbus gui qmake_build xml
+USE_QT=		buildtools_build core dbus gui qmake_build xml
 
 # Make the applications.menu file not conflict with KDE4.
 CMAKE_ARGS=	-DAPPLICATIONS_MENU_NAME:STRING="kf5-applications.menu"
diff --git devel/kf5-ktexteditor/Makefile devel/kf5-ktexteditor/Makefile
index b4f88769ab3e..e4200d9c4d02 100644
--- devel/kf5-ktexteditor/Makefile
+++ devel/kf5-ktexteditor/Makefile
@@ -9,12 +9,12 @@ COMMENT=	KF5 advanced embeddable text editor
 
 LIB_DEPENDS=	libgit2.so:devel/libgit2
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	archive auth codecs completion config configwidgets \
 		coreaddons ecm guiaddons i18n iconthemes itemviews \
 		jobwidgets kio parts service sonnet syntaxhighlighting \
 		textwidgets widgetsaddons xmlgui
-USE_QT5=	buildtools_build core dbus gui network printsupport \
+USE_QT=		buildtools_build core dbus gui network printsupport \
 		qmake_build script widgets xml xmlpatterns
 
 .include <bsd.port.mk>
diff --git devel/kf5-kunitconversion/Makefile devel/kf5-kunitconversion/Makefile
index 14628281632e..904e7fde972f 100644
--- devel/kf5-kunitconversion/Makefile
+++ devel/kf5-kunitconversion/Makefile
@@ -7,8 +7,8 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 library for unit conversion
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	ecm i18n
-USE_QT5=	buildtools_build core network qmake_build xml
+USE_QT=		buildtools_build core network qmake_build xml
 
 .include <bsd.port.mk>
diff --git devel/kf5-solid/Makefile devel/kf5-solid/Makefile
index 556fd25e0f20..31ce8441290b 100644
--- devel/kf5-solid/Makefile
+++ devel/kf5-solid/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 hardware integration and detection
 
-USES=		bison cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		bison cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build concurrent core dbus gui linguisttools \
+USE_QT=		buildtools_build concurrent core dbus gui linguisttools \
 		network qmake_build qml testlib widgets xml
 
 OPTIONS_DEFINE=		BSDISKS
diff --git devel/kf5-threadweaver/Makefile devel/kf5-threadweaver/Makefile
index fc597a6f4d9a..c2ed6a13583d 100644
--- devel/kf5-threadweaver/Makefile
+++ devel/kf5-threadweaver/Makefile
@@ -7,8 +7,8 @@ CATEGORIES=	devel kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 addons to QtDBus
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core network qmake_build testlib widgets xml
+USE_QT=		buildtools_build core network qmake_build testlib widgets xml
 
 .include <bsd.port.mk>
diff --git devel/kio-extras/Makefile devel/kio-extras/Makefile
index 05b8e961ce60..03f09b696528 100644
--- devel/kio-extras/Makefile
+++ devel/kio-extras/Makefile
@@ -12,14 +12,14 @@ LIB_DEPENDS=	libtag.so:audio/taglib \
 		libHalf.so:graphics/ilmbase
 
 USES=		cmake:outsource compiler:c++11-lib gettext gperf kde:5 \
-		pkgconfig shared-mime-info shebangfix tar:xz
+		pkgconfig qt:5 shared-mime-info shebangfix tar:xz
 USE_KDE=	activities archive auth bookmarks codecs completion config \
 		configwidgets coreaddons crash dbusaddons dnssd doctools ecm \
 		emoticons guiaddons i18n iconthemes init itemmodels itemviews \
 		jobwidgets js kdelibs4support khtml kio notifications parts \
 		pty service solid sonnet textwidgets unitconversion \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui location network phonon4 printsupport qml quick \
+USE_QT=		core dbus gui location network phonon4 printsupport qml quick \
 		sql svg testlib webchannel widgets xml \
 		buildtools_build qmake_build
 SHEBANG_FILES=	info/kde-info2html
@@ -59,7 +59,8 @@ TAGLIB_LIB_DEPENDS=	libtag.so:audio/taglib
 
 WEBENGINE_DESC=		Needed to build the html thumbnailer
 WEBENGINE_CMAKE_BOOL_OFF=	CMAKE_DISABLE_FIND_PACKAGE_Qt5WebEngineWidget
-WEBENGINE_USE=		QT5=webengine
+WEBENGINE_USES=	qt:5
+WEBENGINE_USE=		QT=webengine
 
 .include <bsd.port.mk>
 
diff --git devel/libdbusmenu-qt/Makefile devel/libdbusmenu-qt/Makefile
index ec371ef3f0ff..be2487409429 100644
--- devel/libdbusmenu-qt/Makefile
+++ devel/libdbusmenu-qt/Makefile
@@ -22,13 +22,15 @@ USES=		compiler:c++11-lib cmake:outsource
 USE_LDCONFIG=	yes
 
 .  if ${FLAVOR} == qt4
-USE_QT4=	corelib dbus gui \
+USES+=		qt:4
+USE_QT=		corelib dbus gui \
 		moc_build qmake_build rcc_build uic_build
 CMAKE_ON=	USE_QT4
 CMAKE_OFF=	USE_QT5
 QTVER_SUFFIX=	# empty
 .  else
-USE_QT5=	core dbus gui widgets \
+USES+=		qt:5
+USE_QT=		core dbus gui widgets \
 		buildtools_build qmake_build
 CMAKE_ON=	USE_QT5
 CMAKE_OFF=	USE_QT4
diff --git devel/libkgapi-kde4/Makefile devel/libkgapi-kde4/Makefile
index 6b54cc04780f..3bbf3feb7896 100644
--- devel/libkgapi-kde4/Makefile
+++ devel/libkgapi-kde4/Makefile
@@ -15,10 +15,10 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libqjson.so:devel/qjson@qt4
 
-USES=		cmake:outsource kde:4 tar:bzip2
+USES=		cmake:outsource kde:4 qt:4 tar:bzip2
 USE_KDE=	automoc4 kdelibs pimlibs
 USE_LDCONFIG=	yes
-USE_QT4=	corelib network webkit xml \
+USE_QT=		corelib network webkit xml \
 		qmake_build moc_build rcc_build uic_build
 
 PLIST_SUB+=	PORTVERSION=${PORTVERSION}
diff --git devel/libkolab/Makefile devel/libkolab/Makefile
index 100505fd8063..577876b3bb81 100644
--- devel/libkolab/Makefile
+++ devel/libkolab/Makefile
@@ -25,10 +25,10 @@ CMAKE_ARGS=	-DBUILD_TESTS:BOOL=OFF \
 		-DPHP_BINDINGS:BOOL=OFF \
 		-DPYTHON_BINDINGS:BOOL=OFF \
 		-DUSE_LIBCALENDARING:BOOL=OFF
-USES=		cmake:outsource kde:4
+USES=		cmake:outsource kde:4 qt:4
 USE_KDE=	automoc4 kdelibs pimlibs
 USE_LDCONFIG=	yes
-USE_QT4=	corelib dbus gui network svg xml \
+USE_QT=		corelib dbus gui network svg xml \
 		moc_build qmake_build rcc_build uic_build
 # Fix build of desktuils/kdepim4-runtime:
 CXXFLAGS+=	-DMAKE_KOLAB_LIB
diff --git devel/liblxqt-l10n/Makefile devel/liblxqt-l10n/Makefile
index 79a08a91d84c..56b6ae28c3ee 100644
--- devel/liblxqt-l10n/Makefile
+++ devel/liblxqt-l10n/Makefile
@@ -17,8 +17,8 @@ DISTINFO_FILE=	${MASTERDIR}/distinfo
 DESCR=	${MASTERDIR}/pkg-descr
 PLIST=	${.CURDIR}/pkg-plist
 
-USES=	cmake:outsource lxqt pkgconfig tar:xz
-USE_QT5=	buildtools_build qmake_build linguisttools
+USES=	cmake:outsource lxqt pkgconfig qt:5 tar:xz
+USE_QT=		buildtools_build qmake_build linguisttools
 USE_LXQT=	buildtools
 
 CMAKE_ARGS+=	-DWITH_COMPTON_CONF:BOOL=OFF \
diff --git devel/liblxqt/Makefile devel/liblxqt/Makefile
index 07cd531079de..c1de23849f91 100644
--- devel/liblxqt/Makefile
+++ devel/liblxqt/Makefile
@@ -14,8 +14,8 @@ LICENSE=	LGPL21+
 BROKEN_aarch64=		fails to compile: lxqtplugininfo.cpp:107:14: expected expression
 
 USES=	cmake:outsource compiler:c++11-lib gettext kde:5 lxqt \
-	pkgconfig tar:xz
-USE_QT5=	buildtools_build qmake_build dbus core gui linguisttools \
+	pkgconfig qt:5 tar:xz
+USE_QT=		buildtools_build qmake_build dbus core gui linguisttools \
 	svg widgets x11extras xml
 USE_KDE=	windowsystem
 USE_LXQT=	buildtools qtxdg
diff --git devel/libqtxdg/Makefile devel/libqtxdg/Makefile
index 918cfaa6a01c..90d56a2f29f4 100644
--- devel/libqtxdg/Makefile
+++ devel/libqtxdg/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Qt implementation of freedesktop.org xdg specs
 
 LICENSE=	LGPL21+
 
-USES=	cmake:outsource compiler:c++11-lib lxqt pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lib lxqt pkgconfig qt:5 tar:xz
 USE_LDCONFIG=	yes
-USE_QT5=	buildtools_build qmake_build core dbus gui svg widgets \
-	xml
+USE_QT=		buildtools_build qmake_build core dbus gui svg widgets \
+		xml
 
 .include <bsd.port.mk>
diff --git devel/liteide/Makefile devel/liteide/Makefile
index b15ad8f8f4c0..a63e3a957339 100644
--- devel/liteide/Makefile
+++ devel/liteide/Makefile
@@ -31,8 +31,10 @@ OPTIONS_SUB=		yes
 
 DEBUG_CONFIGURE_ENABLE=	debug
 
-QT4_USE=	QT4=corelib,gui,network,webkit,xml,moc_build,rcc_build,uic_build
-QT5_USE=	QT5=core,gui,network,printsupport,widgets,xml,buildtools_build
+QT4_USES=	qt:4
+QT4_USE=	QT=corelib,gui,network,webkit,xml,moc_build,rcc_build,uic_build
+QT5_USES=	qt:5
+QT5_USE=	QT=core,gui,network,printsupport,widgets,xml,buildtools_build
 
 post-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/share/applications
diff --git devel/lokalize-kde4/Makefile devel/lokalize-kde4/Makefile
index c842a9fdd0f5..04600dc42444 100644
--- devel/lokalize-kde4/Makefile
+++ devel/lokalize-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	Computer-aided translation system
 
 LIB_DEPENDS=	libhunspell-1.6.so:textproc/hunspell
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build \
+USE_QT=		moc_build qmake_build rcc_build uic_build \
 		sql
 
 .include <bsd.port.mk>
diff --git devel/lokalize/Makefile devel/lokalize/Makefile
index dd0ed398c8d2..0a6c123db363 100644
--- devel/lokalize/Makefile
+++ devel/lokalize/Makefile
@@ -9,12 +9,12 @@ COMMENT=	Computer-aided translation system
 
 LIB_DEPENDS=	libhunspell-1.6.so:textproc/hunspell
 
-USES=		cmake:outsource desktop-file-utils gettext kde:5 tar:xz
+USES=		cmake:outsource desktop-file-utils gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons doctools ecm i18n itemviews \
 		jobwidgets kio kross notifications parts service solid sonnet \
 		textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus gui network script sql widgets xml \
+USE_QT=		core dbus gui network script sql widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git devel/lxqt-build-tools/Makefile devel/lxqt-build-tools/Makefile
index 88265183c4b7..16cd28672563 100644
--- devel/lxqt-build-tools/Makefile
+++ devel/lxqt-build-tools/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Helpers CMake modules for LXQt
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/BSD-3-Clause
 
-USES=		cmake:outsource lxqt pkgconfig tar:xz
-USE_QT5=	qmake_build buildtools_build core
+USES=		cmake:outsource lxqt pkgconfig qt:5 tar:xz
+USE_QT=		qmake_build buildtools_build core
 USE_GNOME=	glib20
 
 .include <bsd.port.mk>
diff --git devel/okteta-kde4/Makefile devel/okteta-kde4/Makefile
index ee24108e8095..d4eadcdcde82 100644
--- devel/okteta-kde4/Makefile
+++ devel/okteta-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	KDE hex editor
 
 LIB_DEPENDS=	libqca.so:devel/qca@qt4
 
-USES=		cmake:outsource kde:4 shared-mime-info tar:xz
+USES=		cmake:outsource kde:4 qt:4 shared-mime-info tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build \
+USE_QT=		moc_build qmake_build rcc_build uic_build \
 		corelib designer gui script scripttools xml
 USE_LDCONFIG=	yes
 
diff --git devel/okteta/Makefile devel/okteta/Makefile
index 202b853dbd6e..3b933bcbf755 100644
--- devel/okteta/Makefile
+++ devel/okteta/Makefile
@@ -9,13 +9,13 @@ COMMENT=	KDE hex editor
 
 LIB_DEPENDS=	libqca-qt5.so:devel/qca@qt5
 
-USES=		cmake:outsource gettext kde:5 shared-mime-info tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 shared-mime-info tar:xz
 USE_KDE=	attica auth bookmarks codecs completion crash \
 		config configwidgets coreaddons dbusaddons doctools \
 		ecm i18n iconthemes itemviews jobwidgets kcmutils kio \
 		newstuff parts service solid sonnet textwidgets \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus designer gui network printsupport script scripttools \
+USE_QT=		core dbus designer gui network printsupport script scripttools \
 		widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git devel/p5-perlkde-kde4/Makefile devel/p5-perlkde-kde4/Makefile
index a22b43b620c9..b944917cbc16 100644
--- devel/p5-perlkde-kde4/Makefile
+++ devel/p5-perlkde-kde4/Makefile
@@ -9,9 +9,9 @@ PKGNAMEPREFIX=	p5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Perl bindings for KDE
 
-USES=		cmake:outsource compiler:c++11-lib kde:4 perl5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:4 perl5 qt:4 tar:xz
 USE_KDE=	perlqt smokekde automoc4
-USE_QT4=	network opengl sql svg xml \
+USE_QT=		network opengl sql svg xml \
 		qmake_build moc_build uic_build rcc_build
 
 # Respect PREFIX
diff --git devel/p5-perlqt-kde4/Makefile devel/p5-perlqt-kde4/Makefile
index 4ae132f9bca9..323c340c0688 100644
--- devel/p5-perlqt-kde4/Makefile
+++ devel/p5-perlqt-kde4/Makefile
@@ -12,9 +12,9 @@ COMMENT=	Perl bindings for Qt
 LIB_DEPENDS=	libqscintilla2_qt4.so:devel/qscintilla2 \
 		libqwt.so:x11-toolkits/qwt5
 
-USES=		cmake:outsource kde:4 perl5 tar:xz
+USES=		cmake:outsource kde:4 perl5 qt:4 tar:xz
 USE_KDE=	smokeqt qimageblitz
-USE_QT4=	corelib dbus gui network xml \
+USE_QT=		corelib dbus gui network xml \
 		qmake_build moc_build uic_build rcc_build
 USE_CXXSTD=	gnu++98
 
diff --git devel/piklab/Makefile devel/piklab/Makefile
index d1cb0ac2ba29..bbe26be3943e 100644
--- devel/piklab/Makefile
+++ devel/piklab/Makefile
@@ -13,9 +13,9 @@ COMMENT=	KDE/Qt IDE for microcontroller development
 LICENSE=	GPLv2+
 
 DOS2UNIX_FILES=	cmake/Piklab.cmake
-USE_QT4=	corelib gui qt3support qtestlib xml \
+USE_QT=		corelib gui qt3support qtestlib xml \
 		moc_build qmake_build rcc_build uic_build
-USES=		cmake gettext readline dos2unix tar:bzip2
+USES=		cmake gettext qt:4 readline dos2unix tar:bzip2
 USE_CXXSTD=	gnu++98
 
 OPTIONS_DEFINE=	KDE4
diff --git devel/plasma5-khotkeys/Makefile devel/plasma5-khotkeys/Makefile
index db5c58adf6a1..0ea9b5a0cc0c 100644
--- devel/plasma5-khotkeys/Makefile
+++ devel/plasma5-khotkeys/Makefile
@@ -7,14 +7,14 @@ CATEGORIES=	devel kde kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 library for hotkeys
 
-USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm emoticons globalaccel \
 		guiaddons i18n iconthemes init itemmodels itemviews jobwidgets \
 		kcmutils kdelibs4support kio notifications parts \
 		plasma-framework plasma-workspace service solid sonnet \
 		textwidgets unitconversion widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network printsupport widgets x11extras xml \
+USE_QT=		core dbus gui network printsupport widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	x11 xtst
 
diff --git devel/plasma5-kwrited/Makefile devel/plasma5-kwrited/Makefile
index 2e203a9ed34f..a578c0691750 100644
--- devel/plasma5-kwrited/Makefile
+++ devel/plasma5-kwrited/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	devel kde kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 daemon listening for wall and write messages
 
-USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 qt:5 tar:xz
 USE_KDE=	coreaddons dbusaddons ecm i18n notifications pty
-USE_QT5=	core dbus gui widgets \
+USE_QT=		core dbus gui widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git devel/plasma5-plasma-sdk/Makefile devel/plasma5-plasma-sdk/Makefile
index e985fca9e032..f0baf1db56f9 100644
--- devel/plasma5-plasma-sdk/Makefile
+++ devel/plasma5-plasma-sdk/Makefile
@@ -7,13 +7,13 @@ CATEGORIES=	devel kde kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 applications useful for Plasma development
 
-USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive attica auth codecs completion config configwidgets \
 		coreaddons dbusaddons ecm i18n iconthemes itemmodels \
 		jobwidgets kdeclarative kio kirigami2 newstuff package parts \
 		plasma-framework service sonnet texteditor textwidgets \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	concurrent core dbus gui network qml quick webkit widgets x11extras xml \
+USE_QT=		concurrent core dbus gui network qml quick webkit widgets x11extras xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git devel/poxml-kde4/Makefile devel/poxml-kde4/Makefile
index 79e8644aafe3..210e5290931d 100644
--- devel/poxml-kde4/Makefile
+++ devel/poxml-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	Tools to translate Docbook XML using gettext
 
 BUILD_DEPENDS=	${LOCALBASE}/lib/libantlr.a:devel/antlr
 
-USES=		cmake:outsource gettext-tools:build,run kde:4 tar:xz
+USES=		cmake:outsource gettext-tools:build,run kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build \
+USE_QT=		moc_build qmake_build rcc_build uic_build \
 		corelib xml
 
 .include <bsd.port.mk>
diff --git devel/poxml/Makefile devel/poxml/Makefile
index 3bfa7c6ca12b..236b9c996dec 100644
--- devel/poxml/Makefile
+++ devel/poxml/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	devel kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Tools to translate Docbook XML using gettext
 
-USES=		cmake:outsource gettext-tools:build,run kde:5 tar:xz
+USES=		cmake:outsource gettext-tools:build,run kde:5 qt:5 tar:xz
 USE_KDE=	doctools ecm
-USE_QT5=	core xml \
+USE_QT=		core xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git devel/py-krosspython-kde4/Makefile devel/py-krosspython-kde4/Makefile
index 0126d17c6d57..8f6b51855041 100644
--- devel/py-krosspython-kde4/Makefile
+++ devel/py-krosspython-kde4/Makefile
@@ -10,9 +10,9 @@ DISTNAME=	kross-interpreters-${PORTVERSION}
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Kross Python scripting library
 
-USES=		cmake:outsource kde:4 python:2.7 tar:xz
+USES=		cmake:outsource kde:4 python:2.7 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib gui qmake_build moc_build uic_build rcc_build
+USE_QT=		corelib gui qmake_build moc_build uic_build rcc_build
 CMAKE_ARGS+=	-DBUILD_falcon:BOOL=FALSE \
 		-DBUILD_ruby:BOOL=FALSE \
 		-DBUILD_java:BOOL=FALSE
diff --git devel/py-pykde4-kde4/Makefile devel/py-pykde4-kde4/Makefile
index 6cec34596f94..4360485df442 100644
--- devel/py-pykde4-kde4/Makefile
+++ devel/py-pykde4-kde4/Makefile
@@ -11,14 +11,14 @@ COMMENT=	Python bindings for KDE
 
 LIB_DEPENDS=	libqwt.so:x11-toolkits/qwt5
 
-USES=		cmake:outsource kde:4 python:2.7 pyqt:4 tar:xz
+USES=		cmake:outsource kde:4 python:2.7 pyqt:4 qt:4 tar:xz
 USE_KDE=	kdelibs nepomuk-core okular pimlibs \
 		akonadi automoc4 soprano
 USE_PYQT=	declarative designer gui network opengl phonon script sip \
 		sql svg webkit xml \
 		dbussupport_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib dbus designer_build gui network xml \
+USE_QT=		corelib dbus designer_build gui network xml \
 		qmake_build moc_build uic_build rcc_build
 USE_CXXSTD=	gnu++98
 
diff --git devel/py-pykdeuic4-kde4/Makefile devel/py-pykdeuic4-kde4/Makefile
index 72d3df873003..5bd8f91f7c8e 100644
--- devel/py-pykdeuic4-kde4/Makefile
+++ devel/py-pykdeuic4-kde4/Makefile
@@ -10,9 +10,9 @@ DISTNAME=	pykde4-${PORTVERSION}
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Enhanced version of pyuic4
 
-USES=		cmake:outsource python:2.7 kde:4 shebangfix tar:xz
+USES=		cmake:outsource python:2.7 kde:4 qt:4 shebangfix tar:xz
 USE_KDE=	kdelibs automoc4 pykde4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 DISTINFO_FILE=	${.CURDIR:H:H}/devel/py-pykde4-kde4/distinfo
 
 NO_ARCH=	yes
diff --git devel/py-qt4-assistant/Makefile devel/py-qt4-assistant/Makefile
index ec35f11399ef..bb153cf7b66b 100644
--- devel/py-qt4-assistant/Makefile
+++ devel/py-qt4-assistant/Makefile
@@ -12,10 +12,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtAssistant module
 CONFIGURE_ARGS=	--enable QtAssistant
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run
 USE_PYTHON=	flavors
-USE_QT4=	assistantclient corelib gui network \
+USE_QT=		assistantclient corelib gui network \
 		moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
diff --git devel/py-qt4-core/Makefile devel/py-qt4-core/Makefile
index 6cdf8324c217..bb8306645d57 100644
--- devel/py-qt4-core/Makefile
+++ devel/py-qt4-core/Makefile
@@ -12,10 +12,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtCore module
 CONFIGURE_ARGS=		--enable QtCore
 PYQT_DIST=		yes
 
-USES=			python pyqt:4
+USES=			python pyqt:4 qt:4
 USE_PYTHON=		py3kplist flavors
 USE_PYQT=		sip
-USE_QT4=		corelib qmake_build moc_build
+USE_QT=			corelib qmake_build moc_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git devel/py-qt4-dbus/Makefile devel/py-qt4-dbus/Makefile
index 2457651d8a59..84b0f7e70ffb 100644
--- devel/py-qt4-dbus/Makefile
+++ devel/py-qt4-dbus/Makefile
@@ -12,10 +12,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtDBus module
 CONFIGURE_ARGS=	--enable QtDBus
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib dbus moc_build qmake_build
+USE_QT=		corelib dbus moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git devel/py-qt4-dbussupport/Makefile devel/py-qt4-dbussupport/Makefile
index 9991d92c2293..252b73543aef 100644
--- devel/py-qt4-dbussupport/Makefile
+++ devel/py-qt4-dbussupport/Makefile
@@ -12,10 +12,10 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}dbus>=0.8:devel/py-dbus@${PY_FLAVOR}
 CONFIGURE_ARGS=	--enable QtCore
 PYQT_DIST=	yes
 
-USES=		pkgconfig python pyqt:4
+USES=		pkgconfig python pyqt:4 qt:4
 USE_PYQT=	sip_build
 USE_PYTHON=	flavors
-USE_QT4=	corelib qmake_build moc_build
+USE_QT=		corelib qmake_build moc_build
 
 OPTIONS_DEFINE=		DEBUG
 DEBUG_CONFIGURE_ON=	--debug --trace
diff --git devel/py-qt4-declarative/Makefile devel/py-qt4-declarative/Makefile
index 7676f1e9f576..d4fbde4d6786 100644
--- devel/py-qt4-declarative/Makefile
+++ devel/py-qt4-declarative/Makefile
@@ -10,10 +10,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtDeclarative module
 CONFIGURE_ARGS=	--enable QtDeclarative
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run gui_run network_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib declarative gui network script sql svg xmlpatterns \
+USE_QT=		corelib declarative gui network script sql svg xmlpatterns \
 		qmake_build moc_build
 
 OPTIONS_DEFINE=	API DEBUG
diff --git devel/py-qt4-designer/Makefile devel/py-qt4-designer/Makefile
index c2a741eb9e5b..ae1d73a8f9ec 100644
--- devel/py-qt4-designer/Makefile
+++ devel/py-qt4-designer/Makefile
@@ -12,10 +12,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtDesigner module
 CONFIGURE_ARGS=	--enable QtDesigner --no-designer-plugin
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run gui_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib designer gui moc_build qmake_build
+USE_QT=		corelib designer gui moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git devel/py-qt4-designerplugin/Makefile devel/py-qt4-designerplugin/Makefile
index 50aee9ecbe0e..2f54b9127cc6 100644
--- devel/py-qt4-designerplugin/Makefile
+++ devel/py-qt4-designerplugin/Makefile
@@ -15,10 +15,10 @@ DESTDIRNAME=	INSTALL_ROOT
 CONFIGURE_ARGS=	--enable QtDesigner
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build
 USE_PYTHON=	flavors
-USE_QT4=	corelib designer gui script xml moc_build qmake_build
+USE_QT=		corelib designer gui script xml moc_build qmake_build
 
 OPTIONS_DEFINE=		DEBUG
 DEBUG_CONFIGURE_ON=	--debug --trace
diff --git devel/py-qt4-help/Makefile devel/py-qt4-help/Makefile
index b729d349004b..cedbdb6c13aa 100644
--- devel/py-qt4-help/Makefile
+++ devel/py-qt4-help/Makefile
@@ -10,10 +10,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtHelp module
 CONFIGURE_ARGS=	--enable QtHelp
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run gui_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib gui help network sql moc_build qmake_build
+USE_QT=		corelib gui help network sql moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git devel/py-qt4-qscintilla2/Makefile devel/py-qt4-qscintilla2/Makefile
index fccb30668c37..883c892f15de 100644
--- devel/py-qt4-qscintilla2/Makefile
+++ devel/py-qt4-qscintilla2/Makefile
@@ -18,12 +18,11 @@ DISTINFO_FILE=	${.CURDIR:H}/qscintilla2/distinfo
 DESTDIRNAME=	INSTALL_ROOT
 
 HAS_CONFIGURE=	yes
-QT_NONSTANDARD=	yes  # Do not add unknown arguments to CONFIGURE_ARGS.
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qmake:no_env qt:4
 USE_PYQT=	sip core gui
 USE_PYTHON=	flavors
-USE_QT4=	corelib gui moc_build qmake_build
+USE_QT=		corelib gui moc_build qmake_build
 
 OPTIONS_DEFINE=		DEBUG
 DEBUG_CONFIGURE_ON=	--debug --trace
diff --git devel/py-qt4-script/Makefile devel/py-qt4-script/Makefile
index 6459c1b25a47..8e68e44faf2d 100644
--- devel/py-qt4-script/Makefile
+++ devel/py-qt4-script/Makefile
@@ -12,10 +12,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtScript module
 CONFIGURE_ARGS=	--enable QtScript
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib script moc_build qmake_build
+USE_QT=		corelib script moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git devel/py-qt4-scripttools/Makefile devel/py-qt4-scripttools/Makefile
index d9bcbcfa4b81..7e2ee69866a5 100644
--- devel/py-qt4-scripttools/Makefile
+++ devel/py-qt4-scripttools/Makefile
@@ -11,10 +11,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtScriptTools module
 CONFIGURE_ARGS=	--enable QtScriptTools
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run gui_run script_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib gui script scripttools moc_build qmake_build
+USE_QT=		corelib gui script scripttools moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git devel/py-qt4-test/Makefile devel/py-qt4-test/Makefile
index 43767ce5fa0e..3c4f259b5ab0 100644
--- devel/py-qt4-test/Makefile
+++ devel/py-qt4-test/Makefile
@@ -12,10 +12,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtTest module
 CONFIGURE_ARGS=	--enable QtTest
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run gui_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib gui qtestlib moc_build qmake_build
+USE_QT=		corelib gui qtestlib moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git devel/py-qt5-core/Makefile devel/py-qt5-core/Makefile
index 5b5bce9b70b9..fe02893d8074 100644
--- devel/py-qt5-core/Makefile
+++ devel/py-qt5-core/Makefile
@@ -13,10 +13,10 @@ CONFIGURE_ARGS=	${PYQT5_MODULES_ALL:N${PYQT_MODULE}:C/.*/--disable=&/} \
 
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_PYTHON=	py3kplist flavors
 USE_PYQT=	sip_build
-USE_QT5=	core buildtools_build qmake_build
+USE_QT=		core buildtools_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git devel/py-qt5-dbus/Makefile devel/py-qt5-dbus/Makefile
index c9326092cefb..f1c18ab07bc2 100644
--- devel/py-qt5-dbus/Makefile
+++ devel/py-qt5-dbus/Makefile
@@ -10,10 +10,10 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtDBus module
 CONFIGURE_ARGS=	--enable QtDBus
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_PYQT=	sip_build core_run
 USE_PYTHON=	flavors
-USE_QT5=	core dbus qmake_build
+USE_QT=		core dbus qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git devel/py-qt5-dbussupport/Makefile devel/py-qt5-dbussupport/Makefile
index f138f23f2392..8738fe45dc19 100644
--- devel/py-qt5-dbussupport/Makefile
+++ devel/py-qt5-dbussupport/Makefile
@@ -13,10 +13,10 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}dbus>=0.8:devel/py-dbus@${PY_FLAVOR}
 CONFIGURE_ARGS=	--enable QtCore
 PYQT_DIST=	yes
 
-USES=		pkgconfig python pyqt:5
+USES=		pkgconfig python pyqt:5 qt:5
 USE_PYQT=	sip_build
 USE_PYTHON=	flavors
-USE_QT5=	core buildtools_build qmake_build
+USE_QT=		core buildtools_build qmake_build
 
 OPTIONS_DEFINE=		DEBUG
 DEBUG_CONFIGURE_ON=	--debug --trace
diff --git devel/py-qt5-designer/Makefile devel/py-qt5-designer/Makefile
index d3b20db2fd6b..ad908599b27c 100644
--- devel/py-qt5-designer/Makefile
+++ devel/py-qt5-designer/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtDesigner module
 CONFIGURE_ARGS=	--enable QtDesigner --no-designer-plugin
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		yes
 USE_PYQT=	sip_build core_run widgets_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui designer widgets xml \
+USE_QT=		core gui designer widgets xml \
 		buildtools_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
diff --git devel/py-qt5-designerplugin/Makefile devel/py-qt5-designerplugin/Makefile
index 43177853f9bb..501d40859470 100644
--- devel/py-qt5-designerplugin/Makefile
+++ devel/py-qt5-designerplugin/Makefile
@@ -14,11 +14,11 @@ DESTDIRNAME=	INSTALL_ROOT
 CONFIGURE_ARGS=	--enable QtDesigner
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build
 USE_PYTHON=	flavors
-USE_QT5=	core designer gui xml widgets \
+USE_QT=		core designer gui xml widgets \
 		buildtools_build qmake_build
 
 OPTIONS_DEFINE=		DEBUG
diff --git devel/py-qt5-help/Makefile devel/py-qt5-help/Makefile
index 8c43fb4a8c96..c6efcca910e3 100644
--- devel/py-qt5-help/Makefile
+++ devel/py-qt5-help/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtHelp module
 CONFIGURE_ARGS=	--enable QtHelp
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run widgets_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui widgets help network sql buildtools_build qmake_build xml 
+USE_QT=		core gui widgets help network sql buildtools_build qmake_build xml 
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git devel/py-qt5-qscintilla2/Makefile devel/py-qt5-qscintilla2/Makefile
index ecfaf41be8eb..2ea48e6791b2 100644
--- devel/py-qt5-qscintilla2/Makefile
+++ devel/py-qt5-qscintilla2/Makefile
@@ -16,13 +16,12 @@ DISTINFO_FILE=	${.CURDIR:H}/qscintilla2-qt5/distinfo
 DESTDIRNAME=	INSTALL_ROOT
 
 HAS_CONFIGURE=	yes
-QT_NONSTANDARD=	yes  # Do not add unknown arguments to CONFIGURE_ARGS.
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qmake:no_env qt:5
 USE_GL=		gl
 USE_PYQT=	sip core gui printsupport widgets
 USE_PYTHON=	flavors
-USE_QT5=	core gui printsupport widgets buildtools_build qmake_build
+USE_QT=		core gui printsupport widgets buildtools_build qmake_build
 
 OPTIONS_DEFINE=		DEBUG
 DEBUG_CONFIGURE_ON=	--debug --trace
diff --git devel/py-qt5-test/Makefile devel/py-qt5-test/Makefile
index 32af8c452575..fe8c71471e88 100644
--- devel/py-qt5-test/Makefile
+++ devel/py-qt5-test/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtTest module
 CONFIGURE_ARGS=	--enable QtTest
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run widgets_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui testlib widgets \
+USE_QT=		core gui testlib widgets \
 		buildtools_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
diff --git devel/pyside-tools/Makefile devel/pyside-tools/Makefile
index 37807d155ba7..d3dba5174aca 100644
--- devel/pyside-tools/Makefile
+++ devel/pyside-tools/Makefile
@@ -21,8 +21,8 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	PySide
 GH_PROJECT=	Tools
 
-USES=		cmake python:2.7 shebangfix
+USES=		cmake python:2.7 qt:4 shebangfix
 SHEBANG_FILES=	pyside-uic pysideuic/icon_cache.py
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git devel/pyside/Makefile devel/pyside/Makefile
index bb170fe6e9df..9b1c41c10c7d 100644
--- devel/pyside/Makefile
+++ devel/pyside/Makefile
@@ -21,7 +21,7 @@ LIB_DEPENDS=	libapiextractor.so:devel/apiextractor \
 CMAKE_ARGS+=	-DGL_H:FILEPATH="${LOCALBASE}/include/GL/gl.h" \
 		-DGL_INCLUDE_DIR:FILEPATH="${LOCALBASE}/include"
 
-USE_QT4=	declarative designer gui help qmake_build \
+USE_QT=		declarative designer gui help qmake_build \
 		moc_build multimedia network opengl \
 		phonon rcc_build script scripttools \
 		svg uic_build webkit
@@ -29,7 +29,7 @@ USE_QT4=	declarative designer gui help qmake_build \
 PLIST_SUB=	PORTVERSION=${PORTVERSION} \
 		PYTHON_VERSION=${PYTHON_VERSION}
 
-USES=		cmake python:2.7 tar:bzip2
+USES=		cmake python:2.7 qt:4 tar:bzip2
 USE_PYTHON=	flavors
 USE_LDCONFIG=	yes
 
diff --git devel/qbs/Makefile devel/qbs/Makefile
index a97891b9a228..629cd04c9544 100644
--- devel/qbs/Makefile
+++ devel/qbs/Makefile
@@ -14,10 +14,10 @@ COMMENT=	Qbs Build Suite
 LICENSE=	GPLv3 LGPL21
 LICENSE_COMB=	dual
 
-USES=		compiler:c++11-lib python:run qmake:outsource shebangfix
+USES=		compiler:c++11-lib python:run qmake:outsource qt:5 shebangfix
 USE_GL=		gl
 USE_LDCONFIG=	yes
-USE_QT5=	buildtools_build core concurrent gui network script testlib \
+USE_QT=		buildtools_build core concurrent gui network script testlib \
 		widgets xml
 
 SHEBANG_FILES=	src/3rdparty/python/bin/dmgbuild
@@ -27,7 +27,8 @@ QMAKE_ARGS=		CONFIG+=qbs_disable_rpath \
 QMAKE_SOURCE_PATH=	${WRKSRC}/qbs.pro
 
 OPTIONS_DEFINE=		DOCS
-DOCS_USE=		QT5=help_build,qdoc_build,sql-sqlite3_build
+DOCS_USES=	qt:5
+DOCS_USE=		QT=help_build,qdoc_build,sql-sqlite3_build
 OPTIONS_DEFAULT=	${OPTIONS_DEFINE}
 
 ALL_TARGET=		all
diff --git devel/qbzr/Makefile devel/qbzr/Makefile
index 9b983ee814e4..2e42cb6e2fe6 100644
--- devel/qbzr/Makefile
+++ devel/qbzr/Makefile
@@ -20,10 +20,10 @@ RUN_DEPENDS=	bzr:devel/bzr
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-USES=		gettext pyqt:4 python:2.7
+USES=		gettext pyqt:4 python:2.7 qt:4
 USE_PYQT=	core
 USE_PYTHON=	distutils autoplist
-USE_QT4=	# empty
+USE_QT=		# empty
 INSTALLS_ICONS=	yes
 
 .include <bsd.port.mk>
diff --git devel/qca/Makefile devel/qca/Makefile
index 59593e368e00..30dd88fd2740 100644
--- devel/qca/Makefile
+++ devel/qca/Makefile
@@ -27,10 +27,12 @@ USE_LDCONFIG=	yes
 
 .  if ${FLAVOR} == qt4
 CMAKE_ON=	QT4_BUILD
-USE_QT4=	corelib moc_build qmake_build rcc_build
+USES+=		qt:4
+USE_QT=		corelib moc_build qmake_build rcc_build
 .  else
 CMAKE_ARGS+=	-DQCA_SUFFIX=qt5
-USE_QT5=	core buildtools_build qmake_build
+USES+=		qt:5
+USE_QT=	core buildtools_build qmake_build
 .  endif
 qt4_PLIST=	${.CURDIR}/pkg-plist.qt4
 qt5_PLIST=	${.CURDIR}/pkg-plist.qt5
diff --git devel/qconf/Makefile devel/qconf/Makefile
index fbd5ebac542d..b49a261a29ec 100644
--- devel/qconf/Makefile
+++ devel/qconf/Makefile
@@ -12,10 +12,9 @@ COMMENT=	Tool to create configure script for qmake-based project
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		tar:bzip2
-USE_QT4=	corelib xml moc_build qmake_build rcc_build
+USES=		qmake:no_env qt:4 tar:bzip2
+USE_QT=		corelib xml moc_build qmake_build rcc_build
 HAS_CONFIGURE=	yes
-QT_NONSTANDARD=	yes
 MAKE_ARGS=	INSTALL_ROOT="${STAGEDIR}"
 
 CONFIGURE_ARGS=	--prefix=${PREFIX} \
diff --git devel/qdevelop/Makefile devel/qdevelop/Makefile
index cbe374e116ae..bd4a21bb5707 100644
--- devel/qdevelop/Makefile
+++ devel/qdevelop/Makefile
@@ -16,9 +16,9 @@ LICENSE_FILE=	${WRKSRC}/copying
 
 RUN_DEPENDS=	exctags:devel/ctags
 
-USE_QT4=	corelib gui sql network xml designer sql-sqlite3_run \
+USE_QT=		corelib gui sql network xml designer sql-sqlite3_run \
 		moc_build uic_build rcc_build
-USES=		qmake
+USES=		qmake qt:4
 
 DESKTOP_ENTRIES=	"QDevelop" \
 			"Qt 4 development environment" \
@@ -30,10 +30,11 @@ DESKTOP_ENTRIES=	"QDevelop" \
 OPTIONS_DEFINE=	TOOLS DOCS NLS
 OPTIONS_DEFAULT:=	${OPTIONS_DEFINE}
 OPTIONS_SUB=	yes
-NLS_USE=	QT4=linguisttools_build
+NLS_USES=	qt:4
+NLS_USE=	QT=linguisttools_build
 TOOLS_DESC=	Install Qt 4 development tools (qmake, moc, etc.)
 TOOLS_USE=	${_TOOLS:C|.*|QT4=&_run|}
-_TOOLS=		assistant linguisttools moc qmake rcc uic
+_TOOLS=		assistant linguisttools moc qmake qt:4 rcc uic
 
 post-patch:
 	@${REINPLACE_CMD} -e "s|\"qmake\"|\"qmake-qt4\"|g" \
diff --git devel/qgit/Makefile devel/qgit/Makefile
index 9a48757f7bbf..c1a354430a9a 100644
--- devel/qgit/Makefile
+++ devel/qgit/Makefile
@@ -11,8 +11,8 @@ COMMENT=	Graphical interface to git repositories
 
 LICENSE=	GPLv2
 
-USES=		cmake:outsource
-USE_QT5=	core gui widgets \
+USES=		cmake:outsource qt:5
+USE_QT=		core gui widgets \
 		buildtools_build qmake_build
 
 USE_GITHUB=	yes
diff --git devel/qjson/Makefile devel/qjson/Makefile
index e837921b1044..6232cced2ced 100644
--- devel/qjson/Makefile
+++ devel/qjson/Makefile
@@ -21,11 +21,13 @@ GH_ACCOUNT=	flavio
 USE_LDCONFIG=	yes
 
 .  if ${FLAVOR} == qt4
-USE_QT4=	corelib moc_build qmake_build rcc_build uic_build
+USES+=		qt:4
+USE_QT=		corelib moc_build qmake_build rcc_build uic_build
 CMAKE_ON=	QT4_BUILD
 PLIST_SUB=	QT5="@comment " NO_QT5=""
 .  else
-USE_QT5=	core buildtools_build qmake_build
+USES+=		qt:5
+USE_QT=		core buildtools_build qmake_build
 CMAKE_OFF=	QT4_BUILD
 PLIST_SUB=	QT5="" NO_QT5="@comment "
 QT_SUFFIX=	-qt5
diff --git devel/qprog/Makefile devel/qprog/Makefile
index 7b21e8aea8f4..83855cd22f7c 100644
--- devel/qprog/Makefile
+++ devel/qprog/Makefile
@@ -11,8 +11,8 @@ DISTNAME=	QProg_${PORTVERSION}
 MAINTAINER=	bfoz@bfoz.net
 COMMENT=	Cross-platform software for the DIY line of PIC programmers
 
-USES=		qmake tar:tgz
-USE_QT4=	moc_build gui network
+USES=		qmake qt:4 tar:tgz
+USE_QT=		moc_build gui network
 
 WRKSRC=		${WRKDIR}/QProg
 
diff --git devel/qross/Makefile devel/qross/Makefile
index 549420b9807c..49d6abfb31c0 100644
--- devel/qross/Makefile
+++ devel/qross/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Qt-only fork of Kross, the KDE scripting framework
 
 LICENSE=	LGPL20+
 
-USES=		cmake
+USES=		cmake qt:4
 USE_LDCONFIG=	yes
-USE_QT4=	corelib designer gui network xml qmake_build uic_build moc_build \
+USE_QT=		corelib designer gui network xml qmake_build uic_build moc_build \
 		rcc_build script testlib
 USE_GITHUB=	yes
 GH_ACCOUNT=	0xd34df00d
diff --git devel/qscintilla2-designerplugin-qt5/Makefile devel/qscintilla2-designerplugin-qt5/Makefile
index cce854d74054..e1ff981da740 100644
--- devel/qscintilla2-designerplugin-qt5/Makefile
+++ devel/qscintilla2-designerplugin-qt5/Makefile
@@ -14,8 +14,8 @@ LIB_DEPENDS=	libqscintilla2_qt5.so:devel/qscintilla2-qt5
 
 DISTINFO_FILE=	${.CURDIR:H}/qscintilla2-qt5/distinfo
 USE_GL=		gl
-USES=		qmake pyqt:5
-USE_QT5=	core designer printsupport gui widgets xml \
+USES=		qmake pyqt:5 qt:5
+USE_QT=		core designer printsupport gui widgets xml \
 		buildtools_build qmake_build
 
 WRKSRC=		${WRKDIR}/${DISTNAME}/designer-Qt4Qt5
diff --git devel/qscintilla2-designerplugin/Makefile devel/qscintilla2-designerplugin/Makefile
index fc3f04bf55df..b8aa7a4bfd9b 100644
--- devel/qscintilla2-designerplugin/Makefile
+++ devel/qscintilla2-designerplugin/Makefile
@@ -15,8 +15,8 @@ COMMENT=	Qt4 Designer plugin for QScintilla2
 LIB_DEPENDS=	libqscintilla2_qt4.so:devel/qscintilla2
 
 DISTINFO_FILE=	${.CURDIR:H}/qscintilla2/distinfo
-USES=		qmake pyqt:4
-USE_QT4=	qmake_build moc_build gui xml designer
+USES=		qmake pyqt:4 qt:4
+USE_QT=		qmake_build moc_build gui xml designer
 
 WRKSRC=		${WRKDIR}/${DISTNAME}/designer-Qt4Qt5
 
diff --git devel/qscintilla2-qt5/Makefile devel/qscintilla2-qt5/Makefile
index af4ddf36cc14..8041d614f92d 100644
--- devel/qscintilla2-qt5/Makefile
+++ devel/qscintilla2-qt5/Makefile
@@ -9,10 +9,10 @@ DISTNAME=	${QSCI2_DISTNAME}
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 5 port of the Scintilla C++ editor class
 
-USES=		qmake pyqt:5
+USES=		qmake pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	#
-USE_QT5=	buildtools_build core gui printsupport widgets
+USE_QT=		buildtools_build core gui printsupport widgets
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 BUILD_WRKSRC=		${WRKSRC}/Qt4Qt5
diff --git devel/qscintilla2/Makefile devel/qscintilla2/Makefile
index a8155a1a646f..a706a28b7e3c 100644
--- devel/qscintilla2/Makefile
+++ devel/qscintilla2/Makefile
@@ -11,9 +11,9 @@ DISTNAME=	${QSCI2_DISTNAME}
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 4 port of the Scintilla C++ editor class
 
-USES=		compiler:c++11-lib qmake pyqt:4
+USES=		compiler:c++11-lib qmake pyqt:4 qt:4
 USE_PYQT=	#
-USE_QT4=	moc_build corelib gui xml designer
+USE_QT=		moc_build corelib gui xml designer
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 BUILD_WRKSRC=		${WRKSRC}/Qt4Qt5
diff --git devel/qt-maybe/Makefile devel/qt-maybe/Makefile
index d9de214e935e..04f441cb6650 100644
--- devel/qt-maybe/Makefile
+++ devel/qt-maybe/Makefile
@@ -11,11 +11,12 @@ COMMENT=	Implementation of sum/option types using QVariant
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+USES=	qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	robertknight
 GH_TAGNAME=	52b21af
 
-USE_QT5=	core
+USE_QT=		core
 NO_BUILD=	yes
 
 PLIST_FILES=	include/Either.h include/Maybe.h
diff --git devel/qt4-assistant-adp/Makefile devel/qt4-assistant-adp/Makefile
index 47722e35af9e..da903926ffa4 100644
--- devel/qt4-assistant-adp/Makefile
+++ devel/qt4-assistant-adp/Makefile
@@ -14,9 +14,9 @@ DIST_SUBDIR=	KDE
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt *.adp-compatible documentation browser
 
-USE_QT4=	moc_build rcc_build uic_build corelib \
+USE_QT=		moc_build rcc_build uic_build corelib \
 		gui network xml doc dbus
-USES=		qmake
+USES=		qmake qt:4
 QMAKE_ARGS=	QT_CONFIG+="dbus" QT_PRODUCT="OpenSource"
 
 ALL_TARGET=	first
diff --git devel/qt4-assistant/Makefile devel/qt4-assistant/Makefile
index 9aac27efdb0c..07591f306e5e 100644
--- devel/qt4-assistant/Makefile
+++ devel/qt4-assistant/Makefile
@@ -10,10 +10,10 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 4 documentation browser
 
-USE_QT4=	qmake_build moc_build rcc_build uic_build \
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build uic_build \
 		corelib gui help network sql webkit xml \
 		doc_run sql-sqlite3_run
-QT_DIST=	yes
 
 HAS_CONFIGURE=	yes
 
diff --git devel/qt4-corelib/Makefile devel/qt4-corelib/Makefile
index a0f71b52a732..d60f16c9f8f7 100644
--- devel/qt4-corelib/Makefile
+++ devel/qt4-corelib/Makefile
@@ -13,9 +13,8 @@ COMMENT=	Qt core non-graphical module
 LIB_DEPENDS=	libicui18n.so:devel/icu
 
 USE_GNOME=	glib20
-USE_QT4=	qmake_build moc_build
-QT_DIST=	yes
-USES=		iconv pkgconfig
+USE_QT=		moc_build
+USES=		iconv pkgconfig qmake:no_env qt-dist:4
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git devel/qt4-dbus/Makefile devel/qt4-dbus/Makefile
index 18b1b04232b3..e15df497c704 100644
--- devel/qt4-dbus/Makefile
+++ devel/qt4-dbus/Makefile
@@ -14,9 +14,8 @@ LIB_DEPENDS=	libdbus-1.so:devel/dbus
 
 BROKEN_sparc64=	fails to compile: invalid conversion
 
-USES=		pkgconfig
-USE_QT4=	qmake_build moc_build rcc_build corelib xml
-QT_DIST=	yes
+USES=		pkgconfig qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build corelib xml
 MAKE_JOBS_UNSAFE=	yes
 
 HAS_CONFIGURE=	yes
diff --git devel/qt4-designer/Makefile devel/qt4-designer/Makefile
index f69c461ad108..f011795a22f8 100644
--- devel/qt4-designer/Makefile
+++ devel/qt4-designer/Makefile
@@ -10,10 +10,10 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 4 graphical user interface designer
 
-USE_QT4=	qmake_build moc_build rcc_build uic_build assistant_run \
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build uic_build assistant_run \
 		qt3support corelib declarative gui network script sql xml \
 		webkit
-QT_DIST=	yes
 
 HAS_CONFIGURE=	yes
 # Try to fix linking when previous version is installed
diff --git devel/qt4-help-tools/Makefile devel/qt4-help-tools/Makefile
index 433b86bae3b7..11baded25d71 100644
--- devel/qt4-help-tools/Makefile
+++ devel/qt4-help-tools/Makefile
@@ -11,9 +11,9 @@ PKGNAMESUFFIX=	-tools
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt utilities for generating documentation
 
-USE_QT4=	qmake_build moc_build rcc_build uic_build corelib \
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build uic_build corelib \
 		gui sql xml doc help
-QT_DIST=	yes
 
 HAS_CONFIGURE=	yes
 
diff --git devel/qt4-help/Makefile devel/qt4-help/Makefile
index 143793b04369..27111cca1773 100644
--- devel/qt4-help/Makefile
+++ devel/qt4-help/Makefile
@@ -10,9 +10,9 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt online help integration module
 
-USE_QT4=	qmake_build moc_build rcc_build corelib clucene \
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build corelib clucene \
 		gui sql sql-sqlite3_run xml network
-QT_DIST=	yes
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git devel/qt4-libqtassistantclient/Makefile devel/qt4-libqtassistantclient/Makefile
index 6b48a6cbdd39..4d45d8c56518 100644
--- devel/qt4-libqtassistantclient/Makefile
+++ devel/qt4-libqtassistantclient/Makefile
@@ -13,8 +13,8 @@ DIST_SUBDIR=	KDE
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt documentation browser integration module
 
-USE_QT4=	moc_build rcc_build corelib gui network
-USES=		qmake
+USE_QT=		moc_build rcc_build corelib gui network
+USES=		qmake qt:4
 QMAKE_ARGS=	CONFIG+="create_prl link_prl" VERSION="${PORTVERSION}"
 
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git devel/qt4-linguist/Makefile devel/qt4-linguist/Makefile
index 8b56ad01a02e..6affb8153b65 100644
--- devel/qt4-linguist/Makefile
+++ devel/qt4-linguist/Makefile
@@ -10,9 +10,9 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 4 localization tools
 
-USE_QT4=	qmake_build designer_build moc_build rcc_build uic_build \
+USES=		qmake:no_env qt-dist:4
+USE_QT=		designer_build moc_build rcc_build uic_build \
 		assistant_run gui linguisttools_run network xml
-QT_DIST=	yes
 
 HAS_CONFIGURE=	yes
 
diff --git devel/qt4-linguisttools/Makefile devel/qt4-linguisttools/Makefile
index 660bbf0fbd41..4c607879cc62 100644
--- devel/qt4-linguisttools/Makefile
+++ devel/qt4-linguisttools/Makefile
@@ -9,8 +9,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 4 localization tools
 
-USE_QT4=	qmake_build xml
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		xml
 
 HAS_CONFIGURE=	yes
 
diff --git devel/qt4-makeqpf/Makefile devel/qt4-makeqpf/Makefile
index ca4d660f126a..032a430821ab 100644
--- devel/qt4-makeqpf/Makefile
+++ devel/qt4-makeqpf/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Qt QPF2 font generator
 
 BROKEN_sparc64=	does not compile
 
-USE_QT4=	qmake_build moc_build rcc_build uic_build corelib gui
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build uic_build corelib gui
 
 HAS_CONFIGURE=	yes
 
diff --git devel/qt4-moc/Makefile devel/qt4-moc/Makefile
index 171a97c55462..7f5fbf432873 100644
--- devel/qt4-moc/Makefile
+++ devel/qt4-moc/Makefile
@@ -10,8 +10,7 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt Meta-Object Compiler
 
-USE_QT4=	qmake_build
-QT_DIST=	yes
+USES=		qt-dist:4 qmake:no_env
 
 HAS_CONFIGURE=	yes
 
diff --git devel/qt4-porting/Makefile devel/qt4-porting/Makefile
index 85d991b703a2..171d5a84f448 100644
--- devel/qt4-porting/Makefile
+++ devel/qt4-porting/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt utility to assist with porting from Qt 3 to Qt 4
 
-USE_QT4=	qmake_build moc_build rcc_build corelib xml
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build corelib xml
 
 HAS_CONFIGURE=	yes
 
diff --git devel/qt4-qdbusviewer/Makefile devel/qt4-qdbusviewer/Makefile
index 0b77b7ed81e6..3d65944f55df 100644
--- devel/qt4-qdbusviewer/Makefile
+++ devel/qt4-qdbusviewer/Makefile
@@ -12,10 +12,9 @@ COMMENT=	Qt 4 graphical interface to D-Bus
 
 LIB_DEPENDS=	libdbus-1.so:devel/dbus
 
-USES=		pkgconfig
-USE_QT4=	qmake_build moc_build rcc_build corelib dbus gui xml \
+USES=		pkgconfig qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build corelib dbus gui xml \
 		clucene
-QT_DIST=	yes
 
 HAS_CONFIGURE=	yes
 
diff --git devel/qt4-qdoc3/Makefile devel/qt4-qdoc3/Makefile
index aaca09e66886..ff61a66326de 100644
--- devel/qt4-qdoc3/Makefile
+++ devel/qt4-qdoc3/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt documentation generator
 
-USE_QT4=	qmake_build corelib gui xml
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		corelib gui xml
 
 HAS_CONFIGURE=	yes
 
diff --git devel/qt4-qmake/Makefile devel/qt4-qmake/Makefile
index 93e4bffa3516..87fc486e7f42 100644
--- devel/qt4-qmake/Makefile
+++ devel/qt4-qmake/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt Makefile generator
 
-USE_QT4=	# empty
-QT_DIST=	yes
+USES=	qt-dist:4
+USE_QT=		# empty
 REINPLACE_ARGS=	-i ""
 WRKSRC_SUBDIR=	${PORTNAME}
 MAKEFILE=	${FILESDIR}/Makefile.bsd
diff --git devel/qt4-qmlviewer/Makefile devel/qt4-qmlviewer/Makefile
index 0b5432926a49..349248058617 100644
--- devel/qt4-qmlviewer/Makefile
+++ devel/qt4-qmlviewer/Makefile
@@ -10,9 +10,9 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 4 utility for QML application testing
 
-USE_QT4=	qmake_build moc_build rcc_build uic_build declarative script \
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build uic_build declarative script \
 		svg xmlpatterns sql opengl network corelib
-QT_DIST=	yes
 
 HAS_CONFIGURE=	yes
 
diff --git devel/qt4-qt3support/Makefile devel/qt4-qt3support/Makefile
index c15b1f0028d9..d0a193320cf4 100644
--- devel/qt4-qt3support/Makefile
+++ devel/qt4-qt3support/Makefile
@@ -10,9 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 3 compatibility module
 
-USE_QT4=	qmake_build moc_build corelib gui network sql xml
-QT_DIST=	yes
-USES=		pkgconfig
+USE_QT=		moc_build corelib gui network sql xml
+USES=		pkgconfig qmake:no_env qt-dist:4
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git devel/qt4-qtsolutions-singleapplication/Makefile devel/qt4-qtsolutions-singleapplication/Makefile
index 8db0ff18eef4..f73ac8efe08a 100644
--- devel/qt4-qtsolutions-singleapplication/Makefile
+++ devel/qt4-qtsolutions-singleapplication/Makefile
@@ -12,8 +12,8 @@ DISTNAME=	qt4-qtsolutions-singleinstance-${PORTVERSION}
 MAINTAINER=	yurkis@gmail.com
 COMMENT=	Qt 4 Solutions Single Application Framework
 
-USES=		qmake
-USE_QT4?=	moc_build rcc_build uic_build gui network
+USES=		qmake qt:4
+USE_QT?=	moc_build rcc_build uic_build gui network
 USE_LDCONFIG=	yes
 
 WRKSRC=		${WRKDIR}/qt-solutions-qt-solutions/${SUB_PROJECT_NAME}
diff --git devel/qt4-qtsolutions-soap/Makefile devel/qt4-qtsolutions-soap/Makefile
index fb35eb1a7d66..9f8c13555c2b 100644
--- devel/qt4-qtsolutions-soap/Makefile
+++ devel/qt4-qtsolutions-soap/Makefile
@@ -3,7 +3,8 @@
 
 MASTERDIR=	${.CURDIR}/../qt4-qtsolutions-singleapplication
 
-USE_QT4=	qmake_build moc_build rcc_build uic_build network xml gui
+USES=	qt:4
+USE_QT=		qmake_build moc_build rcc_build uic_build network xml gui
 
 .include	"${MASTERDIR}/Makefile"
 
diff --git devel/qt4-qvfb/Makefile devel/qt4-qvfb/Makefile
index 53cb5e7d2a90..b3b681d743d8 100644
--- devel/qt4-qvfb/Makefile
+++ devel/qt4-qvfb/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 4 virtual framebuffer utility
 
-USE_QT4=	qmake_build moc_build rcc_build uic_build corelib gui opengl
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build uic_build corelib gui opengl
 USE_XORG=	xtst
 
 HAS_CONFIGURE=	yes
diff --git devel/qt4-rcc/Makefile devel/qt4-rcc/Makefile
index 481acd220d48..da0d885dab41 100644
--- devel/qt4-rcc/Makefile
+++ devel/qt4-rcc/Makefile
@@ -10,8 +10,7 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt Resource Compiler
 
-USE_QT4=	qmake_build
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
 
 HAS_CONFIGURE=	yes
 
diff --git devel/qt4-script/Makefile devel/qt4-script/Makefile
index b8b41b7a3ba4..150c96719212 100644
--- devel/qt4-script/Makefile
+++ devel/qt4-script/Makefile
@@ -10,9 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt scripting module
 
-USES=		pkgconfig
-USE_QT4=	qmake_build moc_build corelib
-QT_DIST=	yes
+USES=		pkgconfig qmake:no_env qt-dist:4
+USE_QT=		moc_build corelib
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git devel/qt4-scripttools/Makefile devel/qt4-scripttools/Makefile
index 40db106b71df..aa4cad9df718 100644
--- devel/qt4-scripttools/Makefile
+++ devel/qt4-scripttools/Makefile
@@ -9,8 +9,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt Script additional components
 
-USE_QT4=	qmake_build moc_build rcc_build gui script
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build gui script
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git devel/qt4-testlib/Makefile devel/qt4-testlib/Makefile
index 425d47df7fcc..ec6e40167dd1 100644
--- devel/qt4-testlib/Makefile
+++ devel/qt4-testlib/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt unit testing module
 
-USE_QT4=	qmake_build moc_build corelib
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build corelib
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git devel/qt4-uic/Makefile devel/qt4-uic/Makefile
index 06d7cd7546b3..bae9e609ccbd 100644
--- devel/qt4-uic/Makefile
+++ devel/qt4-uic/Makefile
@@ -10,8 +10,7 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt User Interface Compiler
 
-USE_QT4=	qmake_build
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
 
 HAS_CONFIGURE=	yes
 
diff --git devel/qt4-uic3/Makefile devel/qt4-uic3/Makefile
index 167d1f2b5a78..c60a8f18f49a 100644
--- devel/qt4-uic3/Makefile
+++ devel/qt4-uic3/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 3-compatible User Interface Compiler
 
-USE_QT4=	qmake_build qt3support corelib gui network sql xml porting
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		qt3support corelib gui network sql xml porting
 
 HAS_CONFIGURE=	yes
 
diff --git devel/qt4/Makefile devel/qt4/Makefile
index 4ff86d49b51e..635d840422f7 100644
--- devel/qt4/Makefile
+++ devel/qt4/Makefile
@@ -9,13 +9,13 @@ CATEGORIES=	devel
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Cross-platform application and UI framework (metaport)
 
-USE_QT4=	accessible clucene corelib dbus declarative designer \
+USE_QT=		accessible clucene corelib dbus declarative designer \
 		graphicssystems-opengl gui help iconengines \
 		imageformats inputmethods multimedia network opengl \
 		phonon qt3support qtestlib script scripttools sql \
 		svg webkit xml xmlpatterns
-USE_QT4:=	${USE_QT4:S/$/_run/}
-USES=		metaport
+USE_QT:=	${USE_QT:S/$/_run/}
+USES=		metaport qt:4
 
 OPTIONS_DEFINE=	CODECS DOCS EXAMPLES GSTREAMER NLS SQL_PLUGINS TOOLS
 OPTIONS_DEFAULT=${OPTIONS_DEFINE}
@@ -42,7 +42,7 @@ TOOLS_USE=	assistant help-tools linguist linguisttools makeqpf \
 		qvfb rcc uic uic3 xmlpatterns-tool
 
 .for opt in ${OPTIONS_DEFINE}
-${opt}_USE:=	${${opt}_USE:S/^/QT4=/:S/$/_run/}
+${opt}_USE:=	${${opt}_USE:S/^/QT=/:S/$/_run/}
 .endfor
 
 .include <bsd.port.options.mk>
diff --git devel/qt4/Makefile.sqldrivers devel/qt4/Makefile.sqldrivers
index 723b5ea092ff..85377dd47b2b 100644
--- devel/qt4/Makefile.sqldrivers
+++ devel/qt4/Makefile.sqldrivers
@@ -10,9 +10,8 @@ MAINTAINER=	kde@FreeBSD.org
 
 EXTRA_PATCHES=	# empty
 
-USE_QT4=	corelib sql moc_build qmake_build
-QT_DIST=	yes
-USES+=		qmake:outsource
+USE_QT=		corelib sql moc_build qmake_build
+USES+=		qmake:outsource qt-dist:4
 
 CXXFLAGS+=	-I${WRKSRC}/include  # For private QtSql headers.
 
diff --git devel/qt5-assistant/Makefile devel/qt5-assistant/Makefile
index 75c9d7524b95..df3301d06515 100644
--- devel/qt5-assistant/Makefile
+++ devel/qt5-assistant/Makefile
@@ -8,10 +8,9 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 5 documentation browser
 
-USE_QT5=	core gui help network printsupport sql widgets \
+USE_QT=		core gui help network printsupport sql widgets \
 		buildtools_build sql-sqlite3_run
-QT_DIST=	tools
-USES=		qmake
+USES=		qmake qt-dist:5,tools
 
 DESKTOP_ENTRIES="Qt 5 Assistant" "" \
 		"${PREFIX}/share/pixmaps/assistant-qt5.png" \
diff --git devel/qt5-buildtools/Makefile devel/qt5-buildtools/Makefile
index cd0caf63ebde..9e599a819614 100644
--- devel/qt5-buildtools/Makefile
+++ devel/qt5-buildtools/Makefile
@@ -8,9 +8,7 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt build tools
 
-USE_QT5=	qmake_build
-QT_DIST=	base
-USES=		perl5
+USES=		perl5 qmake:no_env qt-dist:5,base
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	-no-gui -no-xcb
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git devel/qt5-concurrent/Makefile devel/qt5-concurrent/Makefile
index 9d5a26f792f9..b9fd86f08012 100644
--- devel/qt5-concurrent/Makefile
+++ devel/qt5-concurrent/Makefile
@@ -8,8 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt multi-threading module
 
-USE_QT5=	core qmake_build buildtools_build
-QT_DIST=	base
+USES=		qmake:no_env qt-dist:5,base
+USE_QT=		core qmake_build buildtools_build
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	-no-gui -no-xcb
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git devel/qt5-core/Makefile devel/qt5-core/Makefile
index adf224d2b584..646d1137c032 100644
--- devel/qt5-core/Makefile
+++ devel/qt5-core/Makefile
@@ -12,9 +12,9 @@ COMMENT=	Qt core non-graphical module
 LIB_DEPENDS=	libicui18n.so:devel/icu \
 		libpcre2-posix.so:devel/pcre2
 
+USES=		qmake:no_env qt-dist:5,base
 USE_GNOME=	glib20
-USE_QT5=	qmake_build buildtools_build
-QT_DIST=	base
+USE_QT=		qmake_build buildtools_build
 HAS_CONFIGURE=	yes
 # Disable (almost) everything to install minimal qconfig.h.
 # -no-feature-* adds QT_NO_* (for features which have no switch or
diff --git devel/qt5-dbus/Makefile devel/qt5-dbus/Makefile
index 9db2eb3c436e..8ae9f09b63e1 100644
--- devel/qt5-dbus/Makefile
+++ devel/qt5-dbus/Makefile
@@ -10,8 +10,8 @@ COMMENT=	Qt D-Bus inter-process communication module
 
 LIB_DEPENDS=	libdbus-1.so:devel/dbus
 
-USE_QT5=	core qmake_build buildtools_build
-QT_DIST=	base
+USES=		qmake:no_env qt-dist:5,base
+USE_QT=		core qmake_build buildtools_build
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	-no-gui -no-xcb
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git devel/qt5-designer/Makefile devel/qt5-designer/Makefile
index 23680fb04add..d6efdf9590c2 100644
--- devel/qt5-designer/Makefile
+++ devel/qt5-designer/Makefile
@@ -8,10 +8,9 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 5 graphical user interface designer
 
-USE_QT5=	assistant_run core gui network printsupport quick uiplugin \
+USE_QT=		assistant_run core gui network printsupport quick uiplugin \
 		widgets xml buildtools_build
-QT_DIST=	tools
-USES=		qmake
+USES=		qmake qt-dist:5,tools
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 DESKTOP_ENTRIES="Qt 5 Designer" "" \
@@ -26,7 +25,8 @@ OPTIONS_DEFINE=	WEBKIT
 OPTIONS_SUB=	yes
 WEBKIT_DESC=	Build WebKit-based WebView widget
 WEBKIT_QMAKE_ON=	CONFIG+=use_webkit
-WEBKIT_USE=	QT5=webkit
+WEBKIT_USES=	qt-dist:5,tools
+WEBKIT_USE=	QT=webkit
 
 post-patch:
 # uiplugin is built in x11-toolkits/qt5-uiplugin.
diff --git devel/qt5-help/Makefile devel/qt5-help/Makefile
index 8c4fb90f4d32..213c3d732f25 100644
--- devel/qt5-help/Makefile
+++ devel/qt5-help/Makefile
@@ -8,10 +8,9 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt online help integration module
 
-USE_QT5=	core gui network sql widgets \
+USE_QT=		core gui network sql widgets \
 		buildtools_build sql-sqlite3_run
-QT_DIST=	tools
-USES=		qmake
+USES=		qmake qt-dist:5,tools
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 BUILD_WRKSRC=	${WRKSRC}/src/assistant
diff --git devel/qt5-linguist/Makefile devel/qt5-linguist/Makefile
index ce8b21165e00..9823111c5224 100644
--- devel/qt5-linguist/Makefile
+++ devel/qt5-linguist/Makefile
@@ -8,11 +8,10 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 5 translation tool
 
-USE_QT5=	core gui printsupport widgets xml \
+USE_QT=		core gui printsupport widgets xml \
 		assistant_run linguisttools_run \
 		buildtools_build designer_build uitools_build
-QT_DIST=	tools
-USES=		qmake
+USES=		qmake qt-dist:5,tools
 
 DESKTOP_ENTRIES="Qt 5 Linguist" "" \
 		"${PREFIX}/share/pixmaps/linguist-qt5.png" \
diff --git devel/qt5-linguisttools/Makefile devel/qt5-linguisttools/Makefile
index 9a4d7248e80c..c465d0c371e4 100644
--- devel/qt5-linguisttools/Makefile
+++ devel/qt5-linguisttools/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt localization tools
 
-USE_QT5=	core xml buildtools_build qml_build
-QT_DIST=	tools
-USES=		qmake
+USE_QT=		core xml buildtools_build qml_build
+USES=		qmake qt-dist:5,tools
 
 BUILD_WRKSRC=	${WRKSRC}/src/linguist
 INSTALL_WRKSRC=	${WRKSRC}/src/linguist
diff --git devel/qt5-location/Makefile devel/qt5-location/Makefile
index fce2cf053bb2..4a22974b93a3 100644
--- devel/qt5-location/Makefile
+++ devel/qt5-location/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt location module
 
-USE_QT5=	concurrent core dbus gui network qml quick buildtools_build
-QT_DIST=	${PORTNAME}
-USES=		qmake:norecursive
+USE_QT=		concurrent core dbus gui network qml quick buildtools_build
+USES=		qmake:norecursive qt-dist:5,location
 
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
diff --git devel/qt5-qdbus/Makefile devel/qt5-qdbus/Makefile
index 16b420d45efc..2fc0e4fa7691 100644
--- devel/qt5-qdbus/Makefile
+++ devel/qt5-qdbus/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt command-line interface to D-Bus
 
-USE_QT5=	core dbus xml buildtools_build
-QT_DIST=	tools
-USES=		qmake
+USES=		qmake qt-dist:5,tools
+USE_QT=		core dbus xml buildtools_build
 
 BUILD_WRKSRC=	${WRKSRC}/src/${PORTNAME}/${PORTNAME}
 INSTALL_WRKSRC=	${BUILD_WRKSRC}
diff --git devel/qt5-qdbusviewer/Makefile devel/qt5-qdbusviewer/Makefile
index 3e4d0e7cb036..5fac5ffac615 100644
--- devel/qt5-qdbusviewer/Makefile
+++ devel/qt5-qdbusviewer/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 5 graphical interface to D-Bus
 
-USE_QT5=	core dbus gui widgets xml buildtools_build
-QT_DIST=	tools
-USES=		qmake
+USE_QT=		core dbus gui widgets xml buildtools_build
+USES=		qmake qt-dist:5,tools
 
 DESKTOP_ENTRIES="Qt 5 D-Bus Viewer" "" \
 		"${PREFIX}/share/pixmaps/qdbusviewer-qt5.png" \
diff --git devel/qt5-qdoc-data/Makefile devel/qt5-qdoc-data/Makefile
index 1af096a6bd4f..d2d5a164b3d2 100644
--- devel/qt5-qdoc-data/Makefile
+++ devel/qt5-qdoc-data/Makefile
@@ -18,8 +18,8 @@ COMMENT=	QDoc configuration files
 LICENSE=	GFDL
 LICENSE_FILE=	${WRKSRC}/LICENSE.FDL
 
-USES=		tar:xz
-USE_QT5=	# empty
+USES=		qt:5 tar:xz
+USE_QT=		# empty
 
 EXTRACT_AFTER_ARGS=	--include ${DISTNAME}/LICENSE.FDL \
 			--include ${DISTNAME}/doc
diff --git devel/qt5-qdoc/Makefile devel/qt5-qdoc/Makefile
index eee3e4e3c0fe..fc8bee4d0f4c 100644
--- devel/qt5-qdoc/Makefile
+++ devel/qt5-qdoc/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt documentation generator
 
-USE_QT5=	core qml buildtools_build qdoc-data_run
-QT_DIST=	tools
-USES=		qmake
+USE_QT=		core qml buildtools_build qdoc-data_run
+USES=		qmake qt-dist:5,tools
 
 BUILD_WRKSRC=	${WRKSRC}/src/${PORTNAME}
 INSTALL_WRKSRC=	${BUILD_WRKSRC}
diff --git devel/qt5-qmake/Makefile devel/qt5-qmake/Makefile
index 89d2e7bb7f33..898e660df592 100644
--- devel/qt5-qmake/Makefile
+++ devel/qt5-qmake/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt Makefile generator
 
-USE_QT5=	# empty
 USES=		compiler:c++11-lib gmake pkgconfig \
-		python:build shebangfix
+		python:build qmake:no_env qt-dist:5,base shebangfix
 SHEBANG_FILES=	util/harfbuzz/update-harfbuzz \
 		util/unicode/x11/makeencodings \
 		src/3rdparty/freetype/src/tools/afblue.pl \
@@ -18,7 +17,6 @@ SHEBANG_FILES=	util/harfbuzz/update-harfbuzz \
 		mkspecs/features/uikit/devices.py \
 		mkspecs/features/uikit/device_destinations.sh
 
-QT_DIST=	base
 REINPLACE_ARGS=	-i ""
 HAS_CONFIGURE=	yes
 # Disable everything to install minimal qconfig.pri.
diff --git devel/qt5-script/Makefile devel/qt5-script/Makefile
index 75f45afe9b34..00ce095c27c5 100644
--- devel/qt5-script/Makefile
+++ devel/qt5-script/Makefile
@@ -10,9 +10,8 @@ COMMENT=	Qt 4-compatible scripting module
 
 BROKEN_powerpc64=	Does not build
 
-USE_QT5=	core buildtools_build
-QT_DIST=	${PORTNAME}
-USES=		qmake
+USE_QT=		core buildtools_build
+USES=		qmake qt-dist:5,script
 # Keep make(1) from descending into src/script/obj/ (qmake:outsource
 # doesn't work).
 MAKE_ENV=	MAKEOBJDIR=.
diff --git devel/qt5-scripttools/Makefile devel/qt5-scripttools/Makefile
index 369ecd813f13..acd1cafb9b3d 100644
--- devel/qt5-scripttools/Makefile
+++ devel/qt5-scripttools/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt Script additional components
 
-USE_QT5=	core gui script widgets buildtools_build
-QT_DIST=	script
-USES=		qmake
+USE_QT=		core gui script widgets buildtools_build
+USES=		qmake qt-dist:5,script
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 BUILD_WRKSRC=	${WRKSRC}/src/${PORTNAME}
diff --git devel/qt5-scxml/Makefile devel/qt5-scxml/Makefile
index 6b5bac09bb0b..f17ac26cf618 100644
--- devel/qt5-scxml/Makefile
+++ devel/qt5-scxml/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt5 SXCML module
 
-USE_QT5=	core network qml buildtools_build
-QT_DIST=	${PORTNAME}
-USES=		qmake
+USE_QT=		core network qml buildtools_build
+USES=		qmake qt-dist:5,scxml
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 .include <bsd.port.mk>
diff --git devel/qt5-testlib/Makefile devel/qt5-testlib/Makefile
index e818285a89b9..301905eaa64c 100644
--- devel/qt5-testlib/Makefile
+++ devel/qt5-testlib/Makefile
@@ -8,8 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt unit testing module
 
-USE_QT5=	core qmake_build buildtools_build
-QT_DIST=	base
+USES=		qmake:no_env qt-dist:5,base
+USE_QT=		core qmake_build buildtools_build
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	-no-gui -no-xcb
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git devel/qt5-uitools/Makefile devel/qt5-uitools/Makefile
index 623b02d98ad2..873bdd3b775b 100644
--- devel/qt5-uitools/Makefile
+++ devel/qt5-uitools/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt Designer UI forms support module
 
-USE_QT5=	core gui uiplugin widgets buildtools_build
-QT_DIST=	tools
-USES=		qmake
+USE_QT=		core gui uiplugin widgets buildtools_build
+USES=		qmake qt-dist:5,tools
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 BUILD_WRKSRC=	${WRKSRC}/src/designer/src/${PORTNAME}
diff --git devel/qt5/Makefile devel/qt5/Makefile
index 3447a0281100..b512a838f373 100644
--- devel/qt5/Makefile
+++ devel/qt5/Makefile
@@ -10,7 +10,7 @@ COMMENT=	Cross-platform application and UI framework (metaport)
 
 # * phonon4 is not part of Qt itself.
 # * we don't want to pull in wayland just yet.
-USE_QT5=	${_USE_QT_ALL:Nphonon4:Ndeclarative:Nwayland:S/$/_run/}
-USES=		metaport
+USE_QT=		${_USE_QT_ALL:Nphonon4:Ndeclarative:Nwayland:S/$/_run/}
+USES=		metaport qt:5
 
 .include <bsd.port.mk>
diff --git devel/qt5/Makefile.sqldrivers devel/qt5/Makefile.sqldrivers
index 251359626589..c9c57548b74c 100644
--- devel/qt5/Makefile.sqldrivers
+++ devel/qt5/Makefile.sqldrivers
@@ -8,8 +8,8 @@ PKGNAMEPREFIX?=	qt5-sqldrivers-
 MAINTAINER?=	kde@FreeBSD.org
 COMMENT?=	Qt ${DB_DESC} database plugin
 
-USE_QT5+=	core sql qmake_build buildtools_build
-QT_DIST?=	base
+USES+=		qmake:no_env qt-dist:5,base
+USE_QT+=	core sql qmake_build buildtools_build
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS+=-no-gui -no-xcb
 
diff --git devel/qtcreator/Makefile devel/qtcreator/Makefile
index 34691687b1cb..01221d090efe 100644
--- devel/qtcreator/Makefile
+++ devel/qtcreator/Makefile
@@ -14,10 +14,10 @@ COMMENT=	C++ and QML IDE for Qt development
 # depend on the split out qbs
 LIB_DEPENDS=	libqbscore.so:devel/qbs
 
-USES=		qmake compiler:c++14-lang tar:xz
+USES=		qmake compiler:c++14-lang qt:5 tar:xz
 USE_LDCONFIG=	${LOCALBASE}/lib/${PORTNAME}
 USE_GL=		gl
-USE_QT5=	buildtools concurrent core designer gui help \
+USE_QT=		buildtools concurrent core designer gui help \
 		linguist location network printsupport qdoc qmake qml quick \
 		quickcontrols script script sql svg webchannel webengine \
 		widgets xml xmlpatterns
@@ -42,9 +42,11 @@ BROKEN_aarch64=		fails to build: invokes x86 asm
 
 OPTIONS_DEFINE=		DOCS EXAMPLES
 DOCS_DESC=		Install the Qt5 api documentation
-DOCS_USE=		QT5=doc_run
+DOCS_USES=	qt:5
+DOCS_USE=		QT=doc_run
 EXAMPLES_DESC=		Install the Qt5 example projects
-EXAMPLES_USE=		QT5=examples_run
+EXAMPLES_USES=	qt:5
+EXAMPLES_USE=		QT=examples_run
 OPTIONS_DEFAULT=	${OPTIONS_DEFINE}
 
 ALL_TARGET=		all
diff --git devel/qtscriptgenerator/Makefile devel/qtscriptgenerator/Makefile
index 55b0549a2342..0cd033be0a62 100644
--- devel/qtscriptgenerator/Makefile
+++ devel/qtscriptgenerator/Makefile
@@ -20,8 +20,8 @@ OPTIONS_DEFINE=	PHONON
 PHONON_DESC=	Build Phonon support
 OPTIONS_DEFAULT=	PHONON
 
-USES=		gmake qmake
-USE_QT4=	corelib declarative designer doc help help-tools gui \
+USES=		gmake qmake qt:4
+USE_QT=		corelib declarative designer doc help help-tools gui \
 		iconengines imageformats inputmethods linguist network \
 		opengl pixeltool porting qdbusviewer \
 		qt3support qtestlib qvfb script scripttools \
@@ -32,7 +32,7 @@ USE_LDCONFIG=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MPHONON}
-USE_QT4+=	phonon
+USE_QT+=	phonon
 PLIST_SUB+=	PHONON=""
 .else
 EXTRA_PATCHES=	${FILESDIR}/extra-patch-no_phonon
diff --git devel/ruby-korundum-kde4/Makefile devel/ruby-korundum-kde4/Makefile
index 79fbdc4bcb7d..9573121023a3 100644
--- devel/ruby-korundum-kde4/Makefile
+++ devel/ruby-korundum-kde4/Makefile
@@ -9,11 +9,11 @@ PKGNAMEPREFIX=	${RUBY_PKGNAMEPREFIX}
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Ruby bindings for KDE
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kate kdelibs okular pimlibs \
 		qtruby smokegen smokekde smokeqt \
 		akonadi automoc4 soprano
-USE_QT4=	corelib network opengl sql svg xml \
+USE_QT=		corelib network opengl sql svg xml \
 		qmake_build moc_build uic_build rcc_build
 USE_RUBY=	yes
 
diff --git devel/ruby-krossruby-kde4/Makefile devel/ruby-krossruby-kde4/Makefile
index 496368244874..359bd2584892 100644
--- devel/ruby-krossruby-kde4/Makefile
+++ devel/ruby-krossruby-kde4/Makefile
@@ -10,9 +10,9 @@ DISTNAME=	kross-interpreters-${PORTVERSION}
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Ruby bindings for Qt/KDE
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs pimlibs automoc4
-USE_QT4=	corelib gui qmake_build moc_build uic_build rcc_build
+USE_QT=		corelib gui qmake_build moc_build uic_build rcc_build
 USE_RUBY=	yes
 CMAKE_ARGS+=	-DBUILD_python:BOOL=FALSE \
 		-DBUILD_falcon:BOOL=FALSE \
diff --git devel/ruby-qtruby-kde4/Makefile devel/ruby-qtruby-kde4/Makefile
index 8f162becd519..c7a172071b9b 100644
--- devel/ruby-qtruby-kde4/Makefile
+++ devel/ruby-qtruby-kde4/Makefile
@@ -14,9 +14,9 @@ BROKEN_powerpc64=	fails to compile: ruby.h:1381: wrong number of arguments speci
 LIB_DEPENDS=	libqwt.so:x11-toolkits/qwt5 \
 		libqscintilla2_qt4.so:devel/qscintilla2
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	smokeqt
-USE_QT4=	corelib dbus declarative gui network phonon script webkit xml \
+USE_QT=		corelib dbus declarative gui network phonon script webkit xml \
 		qmake_build moc_build uic_build rcc_build
 USE_RUBY=	yes
 USE_LDCONFIG=	yes
diff --git devel/shiboken/Makefile devel/shiboken/Makefile
index 5a72f8b6d823..67b73b63be6f 100644
--- devel/shiboken/Makefile
+++ devel/shiboken/Makefile
@@ -19,10 +19,10 @@ LIB_DEPENDS=	libxml2.so:textproc/libxml2 \
 PLIST_SUB=	PORTVERSION=${PORTVERSION} \
 		PYTHON_VERSION=${PYTHON_VERSION}
 
-USE_QT4=	corelib qmake_build qtestlib moc_build network \
+USE_QT=		corelib qmake_build qtestlib moc_build network \
 		uic_build rcc_build xml xmlpatterns
 
-USES=		cmake python:2.7 tar:bzip2
+USES=		cmake python:2.7 qt:4 tar:bzip2
 USE_LDCONFIG=	yes
 
 ALL_TARGET=	all
diff --git devel/smokegen-kde4/Makefile devel/smokegen-kde4/Makefile
index 46d2987e44c0..060077fb0088 100644
--- devel/smokegen-kde4/Makefile
+++ devel/smokegen-kde4/Makefile
@@ -7,8 +7,8 @@ CATEGORIES=	devel kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	SMOKE bindings for KDE
 
-USES=		cmake:outsource kde:4 tar:xz
-USE_QT4=	corelib xml qmake_build moc_build uic_build rcc_build
+USES=		cmake:outsource kde:4 qt:4 tar:xz
+USE_QT=		corelib xml qmake_build moc_build uic_build rcc_build
 CMAKE_ARGS+=	-DSMOKE_CMAKE_MODULE_DIR:PATH=${PREFIX}/lib/cmake/smoke
 USE_LDCONFIG=	yes
 
diff --git devel/smokekde-kde4/Makefile devel/smokekde-kde4/Makefile
index f2d894174903..2c9126967123 100644
--- devel/smokekde-kde4/Makefile
+++ devel/smokekde-kde4/Makefile
@@ -8,10 +8,10 @@ CATEGORIES=	devel kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	SMOKE bindings for KDE
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kate kdelibs okular pimlibs \
 		smokegen smokeqt akonadi automoc4 soprano
-USE_QT4=	corelib dbus designer_build gui network opengl sql svg xml \
+USE_QT=		corelib dbus designer_build gui network opengl sql svg xml \
 		qmake_build moc_build uic_build rcc_build
 USE_LDCONFIG=	yes
 USE_CXXSTD=	gnu++98
diff --git devel/smokeqt-kde4/Makefile devel/smokeqt-kde4/Makefile
index 5978f19483ea..3a47588faaab 100644
--- devel/smokeqt-kde4/Makefile
+++ devel/smokeqt-kde4/Makefile
@@ -11,9 +11,9 @@ COMMENT=	SMOKE bindings for Qt
 LIB_DEPENDS=	libqscintilla2_qt4.so:devel/qscintilla2 \
 		libqwt.so:x11-toolkits/qwt5
 
-USES=		cmake:outsource kde:4 pkgconfig tar:xz
+USES=		cmake:outsource kde:4 pkgconfig qt:4 tar:xz
 USE_KDE=	smokegen qimageblitz
-USE_QT4=	corelib dbus declarative designer_build gui help \
+USE_QT=		corelib dbus declarative designer_build gui help \
 		multimedia network opengl phonon qtestlib script \
 		sql svg webkit xml xmlpatterns \
 		qmake_build moc_build uic_build rcc_build
diff --git devel/subcommander2/Makefile devel/subcommander2/Makefile
index 21f61535d7d3..1792c490ac5a 100644
--- devel/subcommander2/Makefile
+++ devel/subcommander2/Makefile
@@ -20,10 +20,9 @@ CONFLICTS=	subcommander-1.*
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:R:S,.b,b,}p${PORTVERSION:E}
 
-USES=		autoreconf gmake dos2unix ssl
+USES=		autoreconf gmake dos2unix qmake:no_env qt:4 ssl
 DOS2UNIX_GLOB=	*.cpp *.h
-USE_QT4=	corelib gui network qt3support moc_build rcc_build uic_build
-QT_NONSTANDARD=	yes
+USE_QT=		corelib gui network qt3support moc_build rcc_build uic_build
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--with-boost=${LOCALBASE}/include \
 		--with-subversion=${LOCALBASE} --with-qt=${PREFIX} \
diff --git devel/svn2git/Makefile devel/svn2git/Makefile
index 19f762ba3684..f2edce038f3d 100644
--- devel/svn2git/Makefile
+++ devel/svn2git/Makefile
@@ -17,9 +17,9 @@ RUN_DEPENDS=	git:devel/git \
 		p5-Term-ReadKey>=0:devel/p5-Term-ReadKey \
 		p5-subversion>=0:devel/p5-subversion
 
-USES=		qmake
+USES=		qmake qt:5
 USE_GITHUB=	yes
-USE_QT5=	core
+USE_QT=		core
 GH_ACCOUNT=	svn-all-fast-export
 
 OPTIONS_DEFINE=	FREEBSD_REPO
diff --git devel/umbrello-kde4/Makefile devel/umbrello-kde4/Makefile
index 4b91993b5942..910e9f98b708 100644
--- devel/umbrello-kde4/Makefile
+++ devel/umbrello-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	UML modeller for KDE
 
 LIB_DEPENDS=	libboost_thread.so:devel/boost-libs
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
 USE_GNOME=	libxml2 libxslt
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git devel/umbrello/Makefile devel/umbrello/Makefile
index 18ffbd074319..10b3538f80e6 100644
--- devel/umbrello/Makefile
+++ devel/umbrello/Makefile
@@ -9,14 +9,14 @@ COMMENT=	UML modeller for KDE
 
 LIB_DEPENDS=	libboost_thread.so:devel/boost-libs
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_GNOME=	libxml2 libxslt
 USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		coreaddons crash ecm guiaddons i18n iconthemes itemviews \
 		jobwidgets kdelibs4support kio notifications parts service \
 		solid sonnet texteditor textwidgets unitconversion \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network printsupport svg webkit widgets xml \
+USE_QT=		core dbus gui network printsupport svg webkit widgets xml \
 		buildtools_build qmake_build
 
 # Build the KDE Frameworks 5 based version.
diff --git devel/universalindentgui/Makefile devel/universalindentgui/Makefile
index 521606c5f99a..1bc7d7f4746d 100644
--- devel/universalindentgui/Makefile
+++ devel/universalindentgui/Makefile
@@ -15,9 +15,9 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.GPL
 
 LIB_DEPENDS=	libqscintilla2_qt4.so:devel/qscintilla2
 
-USES=		dos2unix qmake python:run shebangfix
+USES=		dos2unix qmake python:run qt:4 shebangfix
 SHEBANG_FILES=	indenters/*.py indenters/*.rb
-USE_QT4=	corelib moc_build uic_build rcc_build \
+USE_QT=		corelib moc_build uic_build rcc_build \
 		linguist_build network script gui
 
 DESKTOP_ENTRIES="UniversalIndentGUI" "${COMMENT}" "" "${PORTNAME}" "" true
diff --git devel/zeal/Makefile devel/zeal/Makefile
index dcd71c73f8f0..c2d23b975e93 100644
--- devel/zeal/Makefile
+++ devel/zeal/Makefile
@@ -15,11 +15,11 @@ LIB_DEPENDS=	libxcb.so:x11/libxcb \
 		libxcb-keysyms.so:x11/xcb-util-keysyms
 
 USES=		cmake:outsource compiler:c++11-lib desktop-file-utils \
-		kde:5 libarchive pkgconfig sqlite
+		kde:5 libarchive pkgconfig qt:5 sqlite
 USE_GL=		gl  # Dependency added by qt5-gui.
 USE_GITHUB=	yes
 USE_KDE=	ecm
-USE_QT5=	concurrent core gui network webkit widgets x11extras \
+USE_QT=		concurrent core gui network webkit widgets x11extras \
 		buildtools_build qmake_build
 USE_XORG=	ice sm x11 xcb xext
 
diff --git dns/kf5-kdnssd/Makefile dns/kf5-kdnssd/Makefile
index 9b6f3486268d..4c0e1440baa8 100644
--- dns/kf5-kdnssd/Makefile
+++ dns/kf5-kdnssd/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	dns kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 abstraction to system DNSSD features
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core linguisttools network qmake_build
+USE_QT=		buildtools_build core linguisttools network qmake_build
 
 OPTIONS_DEFAULT=AVAHI
 OPTIONS_RADIO=ZEROCONF
@@ -21,11 +21,13 @@ ZEROCONF_DESC=	Zeroconf (Bonjour) support
 AVAHI_BUILD_DEPENDS=		${LOCALBASE}/include/avahi-compat-libdns_sd/dns_sd.h:net/avahi-libdns
 AVAHI_LIB_DEPENDS=		libdns_sd.so:net/avahi-libdns
 AVAHI_CMAKE_BOOL_OFF=		CMAKE_DISABLE_FIND_PACKAGE_Avahi
-AVAHI_USE=			QT5=dbus
+AVAHI_USES=	qt:5
+AVAHI_USE=			QT=dbus
 
 MDNSRESPONDER_BUILD_DEPENDS=	${LOCALBASE}/include/dns_sd.h:net/mDNSResponder
 MDNSRESPONDER_LIB_DEPENDS=	libdns_sd.so:net/mDNSResponder
 MDNSRESPONDER_CMAKE_BOOL_OFF=	CMAKE_DISABLE_FIND_PACKAGE_DNSSD
-MDNSRESPONDER_USE=		QT5=dbus
+MDNSRESPONDER_USES=	qt:5
+MDNSRESPONDER_USE=		QT=dbus
 
 .include <bsd.port.mk>
diff --git editors/calligra/Makefile editors/calligra/Makefile
index 97c4397b13be..c663a6df6837 100644
--- editors/calligra/Makefile
+++ editors/calligra/Makefile
@@ -38,7 +38,7 @@ RUN_DEPENDS=	pstoedit:graphics/pstoedit
 
 USES=		cmake:outsource cpe compiler:c++11-lib desktop-file-utils eigen:3 \
 		gettext iconv:translit jpeg kde:5 localbase:ldflags perl5 pkgconfig \
-		shared-mime-info sqlite tar:xz
+		qt:5 shared-mime-info sqlite tar:xz
 USE_KDE=	activities archive auth bookmarks codecs completion config \
 		configwidgets coreaddons crash dbusaddons doctools ecm \
 		emoticons guiaddons i18n iconthemes init itemmodels itemviews \
@@ -47,7 +47,7 @@ USE_KDE=	activities archive auth bookmarks codecs completion config \
 		texteditor textwidgets threadweaver unitconversion wallet \
 		widgetsaddons windowsystem xmlgui \
 		calendarcore okular
-USE_QT5=	buildtools_build core dbus gui network opengl \
+USE_QT=		buildtools_build core dbus gui network opengl \
 		phonon4 printsupport qmake_build qml \
 		quick script sql svg testlib webkit widgets x11extras xml
 USE_XORG=	ice sm x11 xext
diff --git editors/calligraplan/Makefile editors/calligraplan/Makefile
index 84c8cb21cadf..668d67f41623 100644
--- editors/calligraplan/Makefile
+++ editors/calligraplan/Makefile
@@ -12,14 +12,14 @@ COMMENT=	KDE Calligra project management application
 LIB_DEPENDS=	libKChart.so:graphics/kdiagram
 
 USES=		cmake:outsource cpe compiler:c++11-lib desktop-file-utils kde:5 \
-		tar:xz
+		qt:5 tar:xz
 USE_KDE=	activities akonadi archive auth bookmarks codecs completion config \
 		configwidgets coreaddons dbusaddons ecm guiaddons holidays i18n \
 		iconthemes itemmodels itemviews jobwidgets js khtml kio \
 		notifications parts service solid sonnet textwidgets wallet \
 		widgetsaddons windowsystem xmlgui \
 		akonadicontacts calendarcore contacts
-USE_QT5=	core dbus gui network printsupport widgets x11extras xml \
+USE_QT=		core dbus gui network printsupport widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	ice sm x11 xext
 
diff --git editors/encryptpad/Makefile editors/encryptpad/Makefile
index 5617ddad99bd..386a8546b91e 100644
--- editors/encryptpad/Makefile
+++ editors/encryptpad/Makefile
@@ -19,11 +19,11 @@ LICENSE_FILE=	${WRKSRC}/license.txt
 BUILD_DEPENDS=	bash:shells/bash
 LIB_DEPENDS=	libbotan-2.so:security/botan2
 
-USES=		desktop-file-utils gmake pkgconfig shared-mime-info
+USES=		desktop-file-utils gmake pkgconfig qt:5 shared-mime-info
 USE_GITHUB=	yes
 GH_ACCOUNT=	evpo
 GH_PROJECT=	EncryptPad
-USE_QT5=	core gui widgets buildtools_build qmake_build
+USE_QT=		core gui widgets buildtools_build qmake_build
 USE_GL=		gl
 
 OPTIONS_DEFINE=	DOCS
diff --git editors/focuswriter/Makefile editors/focuswriter/Makefile
index 550c5a2cbb16..1768c002b138 100644
--- editors/focuswriter/Makefile
+++ editors/focuswriter/Makefile
@@ -16,11 +16,11 @@ LICENSE_FILE_LGPL3+ =	${WRKSRC}/resources/images/icons/oxygen/COPYING
 
 LIB_DEPENDS=	libhunspell-1.6.so:textproc/hunspell
 
-USES=		compiler:c++11-lib desktop-file-utils pkgconfig qmake
+USES=		compiler:c++11-lib desktop-file-utils pkgconfig qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	gottcode
 USE_GL=		gl
-USE_QT5=	concurrent core gui multimedia network printsupport widgets \
+USE_QT=		concurrent core gui multimedia network printsupport widgets \
 		buildtools_build linguisttools_build
 
 PORTDATA=	*
diff --git editors/kate-kde4/Makefile editors/kate-kde4/Makefile
index 1016dfe6eb58..2a5513c270c6 100644
--- editors/kate-kde4/Makefile
+++ editors/kate-kde4/Makefile
@@ -11,10 +11,10 @@ COMMENT=	Basic editor framework for the KDE system
 
 LIB_DEPENDS=	libqjson.so:devel/qjson@qt4
 
-USES=		cmake:outsource gettext kde:4 perl5 tar:xz
+USES=		cmake:outsource gettext kde:4 perl5 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4 kactivities
 USE_PERL5=	build
-USE_QT4=	dbus gui script sql webkit xml \
+USE_QT=		dbus gui script sql webkit xml \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git editors/kate-plugin-pate-kde4/Makefile editors/kate-plugin-pate-kde4/Makefile
index 784789978259..769aada9fde5 100644
--- editors/kate-plugin-pate-kde4/Makefile
+++ editors/kate-plugin-pate-kde4/Makefile
@@ -9,10 +9,10 @@ DISTNAME=	kate-${PORTVERSION}
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Support for Python plugins in Kate
 
-USES=		cmake:outsource,noninja kde:4 python:2.7 tar:xz
+USES=		cmake:outsource,noninja kde:4 python:2.7 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4 kate \
 		pykde4_build pykde4_run
-USE_QT4=	gui webkit \
+USE_QT=		gui webkit \
 		moc_build qmake_build rcc_build uic_build
 
 DISTINFO_FILE=	${.CURDIR:H:H}/editors/kate-kde4/distinfo
diff --git editors/kate/Makefile editors/kate/Makefile
index dab52a66a56e..64ca1947f402 100644
--- editors/kate/Makefile
+++ editors/kate/Makefile
@@ -11,14 +11,14 @@ BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-
 		docbook-xml>0:textproc/docbook-xml
 LIB_DEPENDS=	libgit2.so:devel/libgit2
 
-USES=		cmake:outsource desktop-file-utils gettext pkgconfig kde:5 tar:xz
+USES=		cmake:outsource desktop-file-utils gettext pkgconfig kde:5 qt:5 tar:xz
 USE_KDE=	activities attica auth bookmarks codecs completion config \
 		configwidgets coreaddons crash dbusaddons doctools ecm \
 		guiaddons i18n iconthemes init itemmodels itemviews \
 		jobwidgets kio newstuff package parts plasma-framework \
 		service solid sonnet texteditor textwidgets threadweaver \
 		wallet widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network script sql widgets xml \
+USE_QT=		core dbus gui network script sql widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git editors/kile-kde4/Makefile editors/kile-kde4/Makefile
index c909a84485ab..4027f4acb197 100644
--- editors/kile-kde4/Makefile
+++ editors/kile-kde4/Makefile
@@ -16,8 +16,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 RUN_DEPENDS=	identify:graphics/ImageMagick
 
-USES=		cmake gettext-tools kde:4 shared-mime-info tar:bzip2
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USES=		cmake gettext-tools kde:4 qt:4 shared-mime-info tar:bzip2
+USE_QT=		qmake_build moc_build rcc_build uic_build
 USE_KDE=	kdelibs automoc4 kate_run
 USE_TEX=	latex
 
diff --git editors/kile/Makefile editors/kile/Makefile
index 79457472a29b..c44745d13663 100644
--- editors/kile/Makefile
+++ editors/kile/Makefile
@@ -15,13 +15,13 @@ LIB_DEPENDS=	libpoppler.so:graphics/poppler \
 		libpoppler-qt5.so:graphics/poppler-qt5
 
 USES=		cmake:outsource desktop-file-utils kde:5 \
-		shared-mime-info shebangfix
+		qt:5 shared-mime-info shebangfix
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm guiaddons i18n iconthemes \
 		init itemviews jobwidgets js khtml kio parts service solid \
 		sonnet texteditor textwidgets widgetsaddons windowsystem xmlgui \
 		okular
-USE_QT5=	concurrent core dbus gui network script widgets xml \
+USE_QT=		concurrent core dbus gui network script widgets xml \
 		buildtools_build qmake_build
 SHEBANG_FILES=	*.pl
 
diff --git editors/klat4/Makefile editors/klat4/Makefile
index 3fbdfb704546..77cbdd84af5f 100644
--- editors/klat4/Makefile
+++ editors/klat4/Makefile
@@ -12,8 +12,8 @@ COMMENT=	LaTeX source editor for KDE4
 
 LICENSE=	GPLv2+
 
-USES=		cmake gettext-tools kde:4 tar:bzip2
+USES=		cmake gettext-tools kde:4 qt:4 tar:bzip2
 USE_KDE=	automoc4 kate kdelibs
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git editors/lfhex/Makefile editors/lfhex/Makefile
index 890b183f36f9..1e878bddccc3 100644
--- editors/lfhex/Makefile
+++ editors/lfhex/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Large file hex editor
 LICENSE=	GPLv2 # only
 LICENSE_FILE=	${WRKSRC}/../COPYING
 
-USES=		bison qmake
-USE_QT4=	corelib gui moc_build rcc_build
+USES=		bison qmake qt:4
+USE_QT=		corelib gui moc_build rcc_build
 
 WRKSRC_SUBDIR=	src
 
diff --git editors/libreoffice/Makefile editors/libreoffice/Makefile
index 4d75dc12f930..9b8c45eae15b 100644
--- editors/libreoffice/Makefile
+++ editors/libreoffice/Makefile
@@ -107,7 +107,6 @@ GNU_CONFIGURE=	yes
 USE_GL=		gl glew glu
 USE_OPENLDAP=	yes
 USE_PERL5=	build
-USE_QT4=	# empty but required
 USE_XORG=	ice sm x11 xaw xext xinerama xrandr xrender
 USES=		autoreconf:build bison compiler:c++14-lang cpe gmake jpeg \
 		perl5 pkgconfig python shebangfix shared-mime-info ssl tar:xz
@@ -195,8 +194,8 @@ KDE4_CONFIGURE_ENV=	KDE4DIR="${KDE_PREFIX}" \
 			QT4DIR="${PREFIX}" \
 			QT4INC="${QT_INCDIR}" \
 			QT4LIB="${QT_LIBDIR}"
-KDE4_USES=	kde:4
-KDE4_USE=	KDE=kdelibs QT4=moc_build,qmake_build
+KDE4_USES=	kde:4 qt:4
+KDE4_USE=	KDE=kdelibs QT=moc_build,qmake_build
 
 MMEDIA_CONFIGURE_ENABLE=	gstreamer-1-0
 MMEDIA_USE=	GSTREAMER1=yes
diff --git editors/mp/Makefile editors/mp/Makefile
index 4d1c395f6794..80d66a5e45d0 100644
--- editors/mp/Makefile
+++ editors/mp/Makefile
@@ -52,14 +52,15 @@ NCURSES_USES=		ncurses
 NCURSES_CONFIGURE_WITH=	curses
 NCURSES_CFLAGS=		-I${NCURSESBASE}/include
 
-QT4_USE=		qt4=corelib,gui,moc_build \
+QT4_USES=		qmake:no_env qt:4
+QT4_USE=		qt=corelib,gui,moc_build \
 			xorg=x11
 QT4_CONFIGURE_WITH=	qt4
 
-QT5_USES=		compiler:c++11-lang
+QT5_USES=		compiler:c++11-lang qmake:no_env qt:5
 QT5_USE=		cxxstd=-std=c++11 \
 			gl=gl \
-			qt5=buildtools_build,core,gui,widgets
+			qt=buildtools_build,core,gui,widgets
 QT5_CONFIGURE_WITH=	qt5
 
 .include <bsd.port.options.mk>
@@ -81,7 +82,6 @@ CONFIGURE_ARGS+=	--without-gtk
 DESKTOP_ENTRIES="Minimum Profit" "" "mp" "mp-5" "Utility;TextEditor;Qt;" ""
 CONFIGURE_ARGS+=--with-moc=${MOC}
 CONFIGURE_ENV+=	CCLINK="${CXX}"
-QT_NONSTANDARD=	yes
 .endif
 
 post-patch:
diff --git editors/neovim-qt/Makefile editors/neovim-qt/Makefile
index a6c0d2fef001..4427b5b33ec5 100644
--- editors/neovim-qt/Makefile
+++ editors/neovim-qt/Makefile
@@ -15,10 +15,10 @@ BUILD_DEPENDS=	neovim>=0:editors/neovim
 LIB_DEPENDS=	libmsgpackc.so:devel/msgpack
 RUN_DEPENDS=	neovim>=0:editors/neovim
 
-USES=		cmake:outsource desktop-file-utils
+USES=		cmake:outsource desktop-file-utils qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	equalsraf
-USE_QT5=	core gui testlib network widgets buildtools_build qmake_build
+USE_QT=		core gui testlib network widgets buildtools_build qmake_build
 
 CMAKE_ON=	USE_SYSTEM_MSGPACK
 CMAKE_OFF=	ENABLE_TESTS
diff --git editors/plume-creator-devel/Makefile editors/plume-creator-devel/Makefile
index 7a22251172c5..c555f140e3f7 100644
--- editors/plume-creator-devel/Makefile
+++ editors/plume-creator-devel/Makefile
@@ -12,8 +12,8 @@ LICENSE=	GPLv3+
 
 DATE=		20150510
 
-USES=		desktop-file-utils qmake shared-mime-info tar:xz
-USE_QT4=	corelib gui moc_build qmake_build rcc_build uic_build webkit
+USES=		desktop-file-utils qmake qt:4 shared-mime-info tar:xz
+USE_QT=		corelib gui moc_build qmake_build rcc_build uic_build webkit
 QMAKE_ARGS=	${WRKSRC}/plume-creator.pro
 
 .include <bsd.port.mk>
diff --git editors/tea/Makefile editors/tea/Makefile
index 41a1acdc1033..2a4f206072e0 100644
--- editors/tea/Makefile
+++ editors/tea/Makefile
@@ -24,8 +24,10 @@ USES=		pkgconfig:build qmake tar:bzip2
 USE_GL=		gl
 USE_LOCALE=	en_US.UTF-8
 
-QT4_USE=	qt4=corelib,gui,moc_build,network,rcc_build
-QT5_USE=	qt5=buildtools_build,core,gui,network,widgets,printsupport,qml,quick
+QT4_USES=	qt:4
+QT4_USE=	qt=corelib,gui,moc_build,network,rcc_build
+QT5_USES=	qt:5
+QT5_USE=	qt=buildtools_build,core,gui,network,widgets,printsupport,qml,quick
 
 LDFLAGS+=	-lz
 PLIST_FILES=	bin/tea share/pixmaps/tea_icon_v2.png
diff --git editors/texmacs/Makefile editors/texmacs/Makefile
index 6331343b04ce..604d101663ee 100644
--- editors/texmacs/Makefile
+++ editors/texmacs/Makefile
@@ -56,8 +56,9 @@ IMLIB2_CONFIGURE_WITH=	imlib2
 PDF_CONFIGURE_ENABLE=	pdf-renderer
 PDF_LDFLAGS=		-lz
 PDF_IMPLIES=		FREETYPE GHOSTSCRIPT
-QT4_USE=		qt4=accessible,corelib,gui,imageformats \
-			qt4=moc_build,qmake_build,rcc_build,uic_build
+QT4_USES=		qt:4
+QT4_USE=		qt=accessible,corelib,gui,imageformats \
+			qt=moc_build,qmake_build,rcc_build,uic_build
 QT4_USE_OFF=		xorg=xext
 QT4_CONFIGURE_ON=	--with-qt=${PREFIX} --enable-qtpipes
 QT4_CONFIGURE_OFF=	--disable-qt
diff --git editors/texmaker/Makefile editors/texmaker/Makefile
index 35967e8969a6..d7d3b32d210e 100644
--- editors/texmaker/Makefile
+++ editors/texmaker/Makefile
@@ -31,9 +31,11 @@ OPTIONS_SINGLE_TOOLKIT=	QT4 QT5
 OPTIONS_DEFAULT=	QT5
 
 TOOLKIT_DESC=	Qt toolkit
-QT4_USE=	${_USE_QT4:S/^/QT4=/}
+QT4_USES=	qt:4
+QT4_USE=	${_USE_QT4:S/^/QT=/}
 QT4_LIB_DEPENDS=	libpoppler-qt4.so:graphics/poppler-qt4
-QT5_USE=	${_USE_QT5:S/^/QT5=/}
+QT5_USES=	qt:5
+QT5_USE=	${_USE_QT5:S/^/QT=/}
 QT5_LIB_DEPENDS=	libpoppler-qt5.so:graphics/poppler-qt5
 
 .include <bsd.port.mk>
diff --git editors/texstudio/Makefile editors/texstudio/Makefile
index cd064ec3fa28..dca46126907f 100644
--- editors/texstudio/Makefile
+++ editors/texstudio/Makefile
@@ -20,20 +20,22 @@ FLAVORS=	qt5 qt4
 FLAVOR?=	${FLAVORS:[1]}
 
 qt4_LIB_DEPENDS=	libpoppler-qt4.so:graphics/poppler-qt4 \
-		libquazip.so:archivers/quazip@qt4
+			libquazip.so:archivers/quazip@qt4
 qt5_LIB_DEPENDS=	libpoppler-qt5.so:graphics/poppler-qt5 \
-		libquazip5.so:archivers/quazip@qt5
+			libquazip5.so:archivers/quazip@qt5
 
 USES=		desktop-file-utils dos2unix ghostscript:run \
 		pkgconfig qmake
 
 .if ${FLAVOR} == qt4
-USE_QT4=	corelib gui network script svg xml \
+USES+=		qt:4
+USE_QT=		corelib gui network script svg xml \
 		iconengines_run designer_build moc_build rcc_build uic_build
 QMAKE_ARGS=	QUAZIP_INCLUDE="${LOCALBASE}/include/quazip" \
 		QUAZIP_LIB="-lquazip"
 .else
-USE_QT5=	core gui network script svg widgets xml \
+USES+=		qt:5
+USE_QT	=	core gui network script svg widgets xml \
 		printsupport concurrent uitools buildtools_build
 QMAKE_ARGS=	QUAZIP_INCLUDE="${LOCALBASE}/include/quazip5" \
 		QUAZIP_LIB="-lquazip5"
diff --git editors/textroom/Makefile editors/textroom/Makefile
index a3e9b85e71e9..544f23801917 100644
--- editors/textroom/Makefile
+++ editors/textroom/Makefile
@@ -16,11 +16,11 @@ LIB_DEPENDS=	libcurl.so:ftp/curl \
 		libhunspell-1.6.so:textproc/hunspell \
 		libxml++-2.6.so:textproc/libxml++26
 
-USES=		compiler:c++11-lang desktop-file-utils pkgconfig qmake
+USES=		compiler:c++11-lang desktop-file-utils pkgconfig qmake qt:4
 USE_CXXSTD=	c++11
 USE_GL=		gl
 USE_SDL=	mixer
-USE_QT4=	moc_build rcc_build uic_build \
+USE_QT=		moc_build rcc_build uic_build \
 		corelib gui opengl qt3support svg xml
 
 post-patch:
diff --git editors/texworks/Makefile editors/texworks/Makefile
index 7881c45525ea..a073bbc359d3 100644
--- editors/texworks/Makefile
+++ editors/texworks/Makefile
@@ -18,10 +18,10 @@ BROKEN_armv7=		fails to install: PDFDocument.cpp:1836:39: cannot initialize a pa
 BUILD_DEPENDS=	hunspell:textproc/hunspell
 LIB_DEPENDS=	libpoppler-qt4.so:graphics/poppler-qt4
 
-USES=		compiler:c++11-lang pkgconfig qmake
+USES=		compiler:c++11-lang pkgconfig qmake qt:4
 USE_GITHUB=	yes
 GH_ACCOUNT=	TeXworks
-USE_QT4=	gui corelib rcc_build moc_build uic_build \
+USE_QT=		gui corelib rcc_build moc_build uic_build \
 		dbus xml scripttools designer_build
 QMAKE_ARGS=	INSTALL_PREFIX=${PREFIX} \
 		DATA_DIR=${DATADIR} \
diff --git editors/yzis/Makefile editors/yzis/Makefile
index 70b0bc3fdcef..161dacb2bd95 100644
--- editors/yzis/Makefile
+++ editors/yzis/Makefile
@@ -17,9 +17,9 @@ LICENSE_COMB=	multi
 LICENSE_FILE_GPLv2=	${WRKSRC}/COPYING
 LICENSE_FILE_LGPL21=	${WRKSRC}/COPYING.LGPL
 
-USES=		tar:bzip2 cmake gettext perl5 lua:51
+USES=		qt:4 tar:bzip2 cmake gettext perl5 lua:51
 USE_XORG=	x11 xext ice
-USE_QT4=	corelib qtestlib qmake_build rcc_build uic_build moc_build gui xml
+USE_QT=		corelib qtestlib qmake_build rcc_build uic_build moc_build gui xml
 CMAKE_ARGS+=	-DLOCALBASE:STRING="${LOCALBASE}" \
 		-DLUA_INCDIR:STRING="${LUA_INCDIR}" \
 		-DLUA_LIBDIR:STRING="${LUA_LIBDIR}" \
@@ -34,8 +34,8 @@ USE_LDCONFIG=	yes
 OPTIONS_DEFINE=	KYZIS NYZIS DOXYGEN
 OPTIONS_SUB=	yes
 KYZIS_DESC=	Build kyzis and Yzis kpart
-KYZIS_USES=	kde:4
-KYZIS_USE=	KDE=kdeprefix,kdelibs,automoc4 QT4=phonon
+KYZIS_USES=	kde:4 qt:4
+KYZIS_USE=	KDE=kdeprefix,kdelibs,automoc4 QT=phonon
 KYZIS_CMAKE_ON=	-DENABLE_KYZIS:BOOL=ON -DENABLE_KPART_YZIS:BOOL=ON
 KYZIS_CMAKE_OFF=	-DENABLE_KYZIS:BOOL=OFF -DENABLE_KPART_YZIS:BOOL=OFF
 NYZIS_DESC=	Build nyzis (ncurses frontend)
diff --git emulators/aqemu/Makefile emulators/aqemu/Makefile
index 7985311e9d33..d5a1a2707ff3 100644
--- emulators/aqemu/Makefile
+++ emulators/aqemu/Makefile
@@ -13,8 +13,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libvncclient.so:net/libvncserver
 
-USES=		cmake:noninja
-USE_QT5=	buildtools_build linguisttools_build qmake_build \
+USES=		cmake:noninja qt:5
+USE_QT=		buildtools_build linguisttools_build qmake_build \
 		core dbus gui network printsupport testlib widgets
 
 USE_GITHUB=	yes
diff --git emulators/citra/Makefile emulators/citra/Makefile
index fa7a8793820a..8b45408482ef 100644
--- emulators/citra/Makefile
+++ emulators/citra/Makefile
@@ -71,8 +71,8 @@ SDL_PLIST_FILES=bin/${PORTNAME} \
 		bin/${PORTNAME}-room \
 		man/man6/${PORTNAME}.6.gz
 
-QT5_USES=	desktop-file-utils shared-mime-info
-QT5_USE=	QT5=qmake_build,buildtools_build,concurrent_build,core,gui,multimedia,opengl,widgets
+QT5_USES=	desktop-file-utils qt:5 shared-mime-info
+QT5_USE=	QT=qmake_build,buildtools_build,concurrent_build,core,gui,multimedia,opengl,widgets
 QT5_CMAKE_BOOL=	ENABLE_QT
 QT5_PLIST_FILES=bin/${PORTNAME}-qt \
 		"@comment bin/${PORTNAME}-room" \
diff --git emulators/dboxfe/Makefile emulators/dboxfe/Makefile
index 0dfbb0aac04e..5e910bee10a7 100644
--- emulators/dboxfe/Makefile
+++ emulators/dboxfe/Makefile
@@ -14,8 +14,8 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.GPL
 
 RUN_DEPENDS=	dosbox:emulators/dosbox
 
-USE_QT4=	corelib gui network xml uic_build moc_build qmake_build rcc_build
-USES=		qmake tar:bzip2
+USE_QT=		corelib gui network xml uic_build moc_build qmake_build rcc_build
+USES=		qmake qt:4 tar:bzip2
 
 PLIST_FILES=	bin/dboxfe \
 		bin/dboxfetray \
diff --git emulators/mame/Makefile emulators/mame/Makefile
index f41f1c6bee2f..7ba2c4037921 100644
--- emulators/mame/Makefile
+++ emulators/mame/Makefile
@@ -19,7 +19,7 @@ LIB_DEPENDS=	libFLAC.so:audio/flac \
 		libfreetype.so:print/freetype2
 RUN_DEPENDS=	liberation-fonts-ttf>=0:x11-fonts/liberation-fonts-ttf
 
-USES=		compiler:c++14-lang gmake jpeg pkgconfig python:2.7,build shebangfix
+USES=		compiler:c++14-lang gmake jpeg pkgconfig python:2.7,build qt:5 shebangfix
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	mamedev
@@ -35,7 +35,7 @@ SHEBANG_FILES=	src/devices/cpu/m6502/m6502make.py \
 USE_XORG=	x11 xext xi xinerama xrender
 USE_GL=		gl
 USE_SDL=	sdl2 ttf2
-USE_QT5=	buildtools core gui qmake_build widgets
+USE_QT=		buildtools core gui qmake_build widgets
 MTARGET?=	mame
 MSUBTARGET?=	mame
 CFLAGS+=	-I${LOCALBASE}/include
diff --git emulators/mupen64plus-qt/Makefile emulators/mupen64plus-qt/Makefile
index a2d864ef434d..777c8d6c788b 100644
--- emulators/mupen64plus-qt/Makefile
+++ emulators/mupen64plus-qt/Makefile
@@ -17,9 +17,9 @@ RUN_DEPENDS=	${LOCALBASE}/lib/libmupen64plus.so.2:emulators/mupen64plus-core \
 		${LOCALBASE}/lib/mupen64plus/mupen64plus-video-rice.so:emulators/mupen64plus-video-rice \
 		mupen64plus:emulators/mupen64plus-ui-console
 
-USES=		qmake
+USES=		qmake qt:5
 USE_GL=		gl
-USE_QT5=	core gui network sql widgets xml \
+USE_QT=		core gui network sql widgets xml \
 		buildtools_build \
 		sql-sqlite3_run
 
diff --git emulators/ppsspp/Makefile emulators/ppsspp/Makefile
index c2fa217d9ed4..97c44ed9fd05 100644
--- emulators/ppsspp/Makefile
+++ emulators/ppsspp/Makefile
@@ -64,7 +64,8 @@ LIBRETRO_PLIST_FILES=	lib/libretro/${PORTNAME}_libretro.so
 LIBRETRO_IMPLIES=	SDL
 OLDJOY_DESC=	Old joystick support with fixed button mappings (deprecated)
 OLDJOY_EXTRA_PATCHES=	${PATCHDIR}/extra-patch-old-joy
-QT5_USE=	QT5=qmake_build,buildtools_build,linguisttools_build,gui,opengl,widgets
+QT5_USES=	qt:5
+QT5_USE=	QT=qmake_build,buildtools_build,linguisttools_build,gui,opengl,widgets
 QT5_CMAKE_BOOL=	USING_QT_UI
 QT5_VARS=	EXENAME=PPSSPPQt
 SDL_BUILD_DEPENDS=	png>=1.6:graphics/png
diff --git emulators/q4wine/Makefile emulators/q4wine/Makefile
index 784ad635a25a..55f480e833a9 100644
--- emulators/q4wine/Makefile
+++ emulators/q4wine/Makefile
@@ -19,11 +19,11 @@ RUN_DEPENDS=	sudo:security/sudo \
 		cabextract:archivers/cabextract \
 		icotool:graphics/icoutils
 
-USES=		cmake desktop-file-utils
+USES=		cmake desktop-file-utils qt:4
 CMAKE_ARGS+=	-DMANPAGE_ENTRY_PATH=${MANPREFIX}/man
 USE_LDCONFIG=	yes
 INSTALLS_ICONS=	yes
-USE_QT4=	qmake_build rcc_build moc_build uic_build \
+USE_QT=		qmake_build rcc_build moc_build uic_build \
 		linguisttools_build corelib gui sql sql-sqlite3_run network
 ONLY_FOR_ARCHS=	i386 amd64
 
@@ -36,7 +36,8 @@ OPTIONS_SUB=	yes
 
 DBUS_CMAKE_ON=		-DWITH_DBUS:BOOL=ON
 DBUS_CMAKE_OFF=		-DWITH_DBUS:BOOL=OFF
-DBUS_USE=		QT4=dbus
+DBUS_USES=	qt:4
+DBUS_USE=		QT=dbus
 
 .include <bsd.port.options.mk>
 
diff --git emulators/qmc2/Makefile emulators/qmc2/Makefile
index d75502f73473..2e7c1c733aff 100644
--- emulators/qmc2/Makefile
+++ emulators/qmc2/Makefile
@@ -16,10 +16,10 @@ OPTIONS_DEFINE=	DOCS
 
 NO_WRKSUBDIR=	yes
 
-USES=		gmake tar:bzip2
+USES=		gmake qt:5 tar:bzip2
 USE_XORG=	x11 xmu
 USE_GL=		gl glu
-USE_QT5=	buildtools_build core gui multimedia \
+USE_QT=		buildtools_build core gui multimedia \
 		network opengl quick qmake_build qml \
 		testlib script scripttools sql svg \
 		webkit widgets xml xmlpatterns
diff --git emulators/qtemu/Makefile emulators/qtemu/Makefile
index 066f5a545619..6ebddf983e49 100644
--- emulators/qtemu/Makefile
+++ emulators/qtemu/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Qt 4 based frontend for QEMU
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake tar:bzip2
-USE_QT4=	gui xml uic_build moc_build rcc_build
+USES=		qmake qt:4 tar:bzip2
+USE_QT=		gui xml uic_build moc_build rcc_build
 CONFIGURE_ENV=	LOCALBASE=${LOCALBASE}
 
 DESKTOP_ENTRIES="QtEmu" "QEMU frontend" "" \
@@ -22,7 +22,8 @@ DESKTOP_ENTRIES="QtEmu" "QEMU frontend" "" \
 OPTIONS_DEFINE=	DOCS NLS
 OPTIONS_SUB=	yes
 
-NLS_USE=	QT4=linguisttools_build
+NLS_USES=	qt:4
+NLS_USE=	QT=linguisttools_build
 
 post-configure-NLS-on:
 	(cd ${WRKSRC} && ${LRELEASE} qtemu.pro)
diff --git emulators/rpcs3/Makefile emulators/rpcs3/Makefile
index 96809e78d868..310ff0c4b3b8 100644
--- emulators/rpcs3/Makefile
+++ emulators/rpcs3/Makefile
@@ -36,9 +36,9 @@ GH_TUPLE=	RPCS3:hidapi:hidapi-0.8.0-rc1-25-gca39ce8:hidapi/3rdparty/hidapi \
 		zeux:pugixml:v1.8.1-148-g257fbb4:pugixml/3rdparty/pugixml
 
 USES=		cmake:outsource compiler:c++14-lang iconv:wchar_t localbase:ldflags \
-		openal:soft pkgconfig
+		openal:soft pkgconfig qt:5
 USE_GL=		gl glew
-USE_QT5=	qmake_build buildtools_build core dbus gui network widgets qml
+USE_QT=		qmake_build buildtools_build core dbus gui network widgets qml
 USE_XORG=	x11
 CMAKE_ON=	CMAKE_SKIP_RPATH USE_SYSTEM_FFMPEG USE_SYSTEM_LIBPNG
 CMAKE_OFF=	USE_NATIVE_INSTRUCTIONS
diff --git emulators/swine/Makefile emulators/swine/Makefile
index 0c3a593df414..0437d56949ef 100644
--- emulators/swine/Makefile
+++ emulators/swine/Makefile
@@ -22,11 +22,11 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	dswd
 GH_PROJECT=	Swine
 
-USES=		gmake python:2.7 shebangfix pyqt:4
+USES=		gmake python:2.7 qt:4 shebangfix pyqt:4
 SHEBANG_FILES=	*.py
 NO_BUILD=	yes
 USE_PYQT=	gui_run xml_build
-USE_QT4=	linguist_build
+USE_QT=		linguist_build
 ONLY_FOR_ARCHS=	i386 amd64
 NO_ARCH=	yes
 
diff --git emulators/virtualbox-ose/Makefile emulators/virtualbox-ose/Makefile
index 6e33861118a4..4e6720863b30 100644
--- emulators/virtualbox-ose/Makefile
+++ emulators/virtualbox-ose/Makefile
@@ -156,10 +156,10 @@ USES+=		python:build
 .if ${PORT_OPTIONS:MQT5}
 CONFIGURE_ARGS+=	--enable-qt5
 PLIST_SUB+=	QT=""
-QT_NONSTANDARD=	yes
 USE_GL=		gl
-USE_QT5=	buildtools_build core dbus gui linguisttools_build opengl
-USE_QT5+=	printsupport widgets x11extras
+USES+=		qmake:no_env qt:5
+USE_QT=		buildtools_build core dbus gui linguisttools_build opengl
+USE_QT+=	printsupport widgets x11extras
 USE_XORG=	xcb
 INSTALLS_ICONS=	yes
 VBOX_PROGS+=	VirtualBox
diff --git finance/alkimia/Makefile finance/alkimia/Makefile
index 6e998e2ba3a3..124ea44e5fe4 100644
--- finance/alkimia/Makefile
+++ finance/alkimia/Makefile
@@ -20,14 +20,16 @@ USE_LDCONFIG=	yes
 
 SLAVE?=		qt5
 .if ${SLAVE} ==	qt4
-USE_QT4=	corelib dbus \
+USES+=		qt:4
+USE_QT=		corelib dbus \
 		moc_build qmake_build rcc_build
 # BUILD_QT4 must be set to "1" due to comparison used in src/LibAlkimiaConfig.cmake.in
 CMAKE_ARGS+=	-DBUILD_QT4=1
 CMAKE_OFF+=	KDE_INSTALL_USE_QT_SYS_PATHS
 INCLUDE_SUBDIR=	Qt4
 .else
-USE_QT5=	core dbus \
+USES+=		qt:5
+USE_QT=		core dbus \
 		buildtools_build qmake_build
 CMAKE_ON+=	KDE_INSTALL_USE_QT_SYS_PATHS
 INCLUDE_SUBDIR=	Qt5
@@ -52,9 +54,10 @@ MPIR_DESC=		MPIR (multiple precision arithmetic) support
 MPIR_LIB_DEPENDS=	libmpir.so:math/mpir
 
 .if ${SLAVE} == qt4
-TEST_USE=		QT4=qtestlib
+TEST_USES=	qt:4 qt:5
+TEST_USE=		QT=qtestlib
 .else
-TEST_USE=		QT5=testlib
+TEST_USE=		QT=testlib
 .endif
 TEST_CMAKE_BOOL=	BUILD_TESTING
 TEST_TEST_TARGET=	test
diff --git finance/kmymoney-kde4/Makefile finance/kmymoney-kde4/Makefile
index 8a9b82b742b5..0ced73fc0f97 100644
--- finance/kmymoney-kde4/Makefile
+++ finance/kmymoney-kde4/Makefile
@@ -19,8 +19,8 @@ LIB_DEPENDS=	libboost_graph.so:devel/boost-libs \
 		libassuan.so:security/libassuan \
 		libgpg-error.so:security/libgpg-error
 
-USES=		cmake kde:4 pkgconfig shared-mime-info shebangfix tar:xz
-USE_QT4=	corelib gui dbus declarative network phonon script sql svg xml \
+USES=		cmake kde:4 pkgconfig qt:4 shared-mime-info shebangfix tar:xz
+USE_QT=		corelib gui dbus declarative network phonon script sql svg xml \
 		qmake_build moc_build rcc_build uic_build
 USE_KDE=	automoc4 kdelibs pimlibs soprano
 USE_LDCONFIG=	yes
diff --git finance/kmymoney/Makefile finance/kmymoney/Makefile
index 37e43d8258fd..6d4a60457ffb 100644
--- finance/kmymoney/Makefile
+++ finance/kmymoney/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libalkimia5.so:finance/alkimia \
 		libKChart.so:graphics/kdiagram
 
 USES=		cmake compiler:c++14-lang desktop-file-utils gettext kde:5 \
-		pkgconfig shared-mime-info shebangfix tar:xz
-USE_QT5=	buildtools_build core dbus gui network printsupport qmake_build \
+		pkgconfig qt:5 shared-mime-info shebangfix tar:xz
+USE_QT=		buildtools_build core dbus gui network printsupport qmake_build \
 		sql testlib_build xml webkit widgets
 USE_KDE=	activities archive auth bookmarks codecs completion config \
 		configwidgets coreaddons doctools_build ecm_build i18n \
diff --git finance/qhacc/Makefile finance/qhacc/Makefile
index e85a0662445b..6ab6a2cf6397 100644
--- finance/qhacc/Makefile
+++ finance/qhacc/Makefile
@@ -16,8 +16,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 LIB_DEPENDS=	libgpgme.so:security/gpgme \
 		libqwt6.so:x11-toolkits/qwt6@qt4
 
-USES=		compiler:c++11-lib qmake:norecursive tar:tgz
-USE_QT4=	corelib gui sql moc_build rcc_build uic_build
+USES=		compiler:c++11-lib qmake:norecursive qt:4 tar:tgz
+USE_QT=		corelib gui sql moc_build rcc_build uic_build
 USE_CXXSTD=	c++11
 USE_LDCONFIG=	yes
 
diff --git finance/skrooge/Makefile finance/skrooge/Makefile
index 969c2f1173da..1b7757ae1fa3 100644
--- finance/skrooge/Makefile
+++ finance/skrooge/Makefile
@@ -18,7 +18,7 @@ LIB_DEPENDS=	libofx.so:finance/libofx \
 		libsqlcipher.so:databases/sqlcipher
 
 USES=		cmake:outsource compiler:c++11-lib desktop-file-utils \
-		gettext grantlee:5 kde:5 pkgconfig python:3.4+ shared-mime-info \
+		gettext grantlee:5 kde:5 pkgconfig python:3.4+ qt:5 shared-mime-info \
 		shebangfix sqlite:3 tar:xz
 USE_KDE=	activities archive attica5 auth bookmarks codecs completion \
 		config configwidgets coreaddons crash dbusaddons \
@@ -28,7 +28,7 @@ USE_KDE=	activities archive attica5 auth bookmarks codecs completion \
 		package parts plasma-framework runner service solid sonnet \
 		textwidgets unitconversion wallet widgetsaddons windowsystem \
 		xmlgui
-USE_QT5=	concurrent core dbus designer gui network printsupport qml \
+USE_QT=		concurrent core dbus designer gui network printsupport qml \
 		quick script sql svg webkit widgets xml \
 		qmake_build buildtools_build
 SHEBANG_FILES=	plugins/import/skrooge_import_backend/skrooge-sabb.py \
diff --git french/aster/Makefile french/aster/Makefile
index c3cab045cc77..76116164d43f 100644
--- french/aster/Makefile
+++ french/aster/Makefile
@@ -51,9 +51,9 @@ RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}gnuplot>0:math/py-gnuplot@${PY_FLAVOR} \
 		${SHELL_INSTALL_ASTER}:shells/${SHIADEP}	\
 		astk-serveur>0:cad/astk-serveur
 
-USES=		bison fortran gettext python:2.7 tk
+USES=		bison fortran gettext python:2.7 qt:4 tk
 USE_BINUTILS=	yes
-USE_QT4=	linguisttools_build
+USE_QT=		linguisttools_build
 
 .if defined(WITH_ATLAS)
 USES+=		blaslapack:atlas
diff --git ftp/plasma-applet-ftpmonitor/Makefile ftp/plasma-applet-ftpmonitor/Makefile
index 1eff9ef6ace2..2d0f5b29d7e9 100644
--- ftp/plasma-applet-ftpmonitor/Makefile
+++ ftp/plasma-applet-ftpmonitor/Makefile
@@ -13,9 +13,9 @@ COMMENT=	KDE4 Plasma applet, which monitors connections to ftp daemons
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake kde:4 tar:bzip2
+USES=		cmake kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qmake_build moc_build uic_build rcc_build
+USE_QT=		qmake_build moc_build uic_build rcc_build
 
 post-patch:
 	@${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g' \
diff --git ftp/scythia/Makefile ftp/scythia/Makefile
index 450d8feedfd7..c2b972a90e4d 100644
--- ftp/scythia/Makefile
+++ ftp/scythia/Makefile
@@ -12,8 +12,8 @@ DISTNAME=	${PORTNAME}_${PORTVERSION}-2-src
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Small ftp client unpretentious based on Qt4
 
-USES=		qmake
-USE_QT4=	gui network corelib uic_build moc_build rcc_build
+USES=		qmake qt:4
+USE_QT=		gui network corelib uic_build moc_build rcc_build
 INSTALLS_ICONS=	yes
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
diff --git games/2048-qt/Makefile games/2048-qt/Makefile
index 92177cce1b80..d2cb57326e50 100644
--- games/2048-qt/Makefile
+++ games/2048-qt/Makefile
@@ -15,8 +15,8 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	xiaoyong
 GH_PROJECT=	2048-Qt
 
-USES=		gmake pkgconfig qmake
-USE_QT5=	core gui network widgets qml quick buildtools_build quickcontrols
+USES=		gmake pkgconfig qmake qt:5
+USE_QT=		core gui network widgets qml quick buildtools_build quickcontrols
 
 PLIST_FILES=	bin/2048-qt ${DESKTOPDIR}/${PORTNAME}.desktop \
 		share/pixmaps/${PORTNAME}.png
diff --git games/allacrost/Makefile games/allacrost/Makefile
index 4934c475d2fc..e71e2a1983cb 100644
--- games/allacrost/Makefile
+++ games/allacrost/Makefile
@@ -23,7 +23,6 @@ GNU_CONFIGURE=	yes
 USES=		gettext gmake iconv jpeg lua:51 openal:al
 USE_SDL=	sdl ttf net
 USE_GL=		yes
-QT_NONSTANDARD=	yes # used when EDITOR enabled
 
 CONFIGURE_ARGS=	--datadir=${DATADIR}
 CPPFLAGS+=	-I${LOCALBASE}/include -I${LUA_INCDIR}
@@ -40,7 +39,8 @@ OPTIONS_SUB=	yes
 
 EDITOR_DESC=		Enable editor
 
-EDITOR_USE=		QT4=corelib,gui,moc_build,opengl,qt3support
+EDITOR_USES=		qmake:no_env qt:4
+EDITOR_USE=		QT=corelib,gui,moc_build,opengl,qt3support
 EDITOR_CONFIGURE_ON=	--enable-editor=yes
 EDITOR_CONFIGURE_OFF=	--enable-editor=no
 
diff --git games/anki/Makefile games/anki/Makefile
index 6fda620368de..b6b4bd0c3913 100644
--- games/anki/Makefile
+++ games/anki/Makefile
@@ -23,10 +23,10 @@ RUN_DEPENDS=	lame:audio/lame \
 		${PYTHON_PKGNAMEPREFIX}httplib2>0:www/py-httplib2@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}send2trash>0:deskutils/py-send2trash@${PY_FLAVOR}
 
-USES=		desktop-file-utils pyqt:4 python:2.7 shared-mime-info shebangfix tar:tgz
+USES=		desktop-file-utils pyqt:4 python:2.7 qt:4 shared-mime-info shebangfix tar:tgz
 SHEBANG_FILES=	tools/build_ui.sh tools/tests.sh anki/anki runanki
 USE_PYQT=	network_run webkit_run
-USE_QT4=	network_run webkit_run
+USE_QT=		network_run webkit_run
 NO_ARCH=	yes
 
 OPTIONS_DEFINE=	NLS
diff --git games/auralquiz/Makefile games/auralquiz/Makefile
index 9d67e25d9e77..93bf9d2d424d 100644
--- games/auralquiz/Makefile
+++ games/auralquiz/Makefile
@@ -16,9 +16,9 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 LIB_DEPENDS=	libtag.so:audio/taglib
 
-USES=		qmake
+USES=		qmake qt:5
 USE_GL=		gl
-USE_QT5=	core gui widgets phonon4 qmake_build buildtools_build
+USE_QT=		core gui widgets phonon4 qmake_build buildtools_build
 
 PORTDOCS=	CHANGELOG README TODO
 
diff --git games/blinken-kde4/Makefile games/blinken-kde4/Makefile
index 63a51787f5ff..a0477895349c 100644
--- games/blinken-kde4/Makefile
+++ games/blinken-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Memory enhancement game for KDE 4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git games/blinken/Makefile games/blinken/Makefile
index a1c7e79dbe7f..710869e38129 100644
--- games/blinken/Makefile
+++ games/blinken/Makefile
@@ -8,10 +8,10 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Memory enhancement game for KDE
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash dbusaddons \
 		doctools ecm guiaddons i18n widgetsaddons xmlgui
-USE_QT5=	core dbus gui phonon4 svg widgets xml \
+USE_QT=		core dbus gui phonon4 svg widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git games/bomber-kde4/Makefile games/bomber-kde4/Makefile
index 8c72072e39e0..24fdd081f0d9 100644
--- games/bomber-kde4/Makefile
+++ games/bomber-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/bomber/Makefile games/bomber/Makefile
index 85cbbee918f0..10e85d70662c 100644
--- games/bomber/Makefile
+++ games/bomber/Makefile
@@ -8,10 +8,10 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash dbusaddons \
 		ecm i18n kio libkdegames widgetsaddons xmlgui
-USE_QT5=	core dbus gui network widgets phonon4 qml quick xml \
+USE_QT=		core dbus gui network widgets phonon4 qml quick xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/bovo-kde4/Makefile games/bovo-kde4/Makefile
index bbc0d98b63c0..4c4d6114f8bf 100644
--- games/bovo-kde4/Makefile
+++ games/bovo-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_CXXSTD=	gnu++98
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/bovo/Makefile games/bovo/Makefile
index d4fab75382f1..d9a5245e83c1 100644
--- games/bovo/Makefile
+++ games/bovo/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash dbusaddons \
 		ecm i18n kdeclarative libkdegames newstuff widgetsaddons xmlgui
-USE_QT5=	concurrent core dbus gui network qml quick svg widgets xml \
+USE_QT=		concurrent core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/bubble-chains/Makefile games/bubble-chains/Makefile
index 78427fbbf230..563647ec895b 100644
--- games/bubble-chains/Makefile
+++ games/bubble-chains/Makefile
@@ -16,12 +16,12 @@ BUILD_DEPENDS=	icotool:graphics/icoutils
 USE_GITHUB=	yes
 GH_ACCOUNT=	SanskritFritz
 
-USES=		dos2unix qmake
+USES=		dos2unix qmake qt:4
 DOS2UNIX_GLOB=	*.pro *.cpp  *.h *.ui *.rc *.htm *.dat *.css
 USE_SDL=	mixer sdl
 USE_GL=		gl
 USE_XORG=	xrandr
-USE_QT4=	moc_build rcc_build uic_build iconengines_run imageformats_run \
+USE_QT=		moc_build rcc_build uic_build iconengines_run imageformats_run \
 		corelib svg xml opengl network
 QMAKE_SOURCE_PATH=	${WRKSRC}/Game.pro
 
diff --git games/capicity/Makefile games/capicity/Makefile
index d92b0b8fa3b4..69552440669e 100644
--- games/capicity/Makefile
+++ games/capicity/Makefile
@@ -23,9 +23,9 @@ LIB_DEPENDS=	libpcre.so:devel/pcre \
 
 WRKSRC=		${WRKDIR}/CapiCity_${PORTVERSION}
 
-USES=		iconv qmake
+USES=		iconv qmake qt:4
 USE_XORG=	ice sm x11 xau xcb xdmcp xext xrender
-USE_QT4=	moc_build rcc_build uic_build iconengines_run imageformats_run \
+USE_QT=		moc_build rcc_build uic_build iconengines_run imageformats_run \
 		corelib gui network script xml
 
 PORTDOCS=	README changelog
diff --git games/capitalism/Makefile games/capitalism/Makefile
index e9d030909808..11e62004f8b8 100644
--- games/capitalism/Makefile
+++ games/capitalism/Makefile
@@ -23,9 +23,9 @@ LIB_DEPENDS=	libpcre.so:devel/pcre \
 
 WRKSRC=		${WRKDIR}/Capitalism-${PORTVERSION}
 
-USES=		iconv qmake
+USES=		iconv qmake qt:4
 USE_XORG=	ice sm x11 xau xcb xdmcp xext xrender
-USE_QT4=	moc_build rcc_build uic_build iconengines_run imageformats_run \
+USE_QT=		moc_build rcc_build uic_build iconengines_run imageformats_run \
 		corelib gui network script xml
 
 PORTDOCS=	README changelog readme.txt
diff --git games/chessx/Makefile games/chessx/Makefile
index 9e6ae52a8c49..dbe5d8e957f7 100644
--- games/chessx/Makefile
+++ games/chessx/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Qt 4 chess database application
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		desktop-file-utils qmake shared-mime-info tar:tgz
-USE_QT4=	corelib gui svg network linguisttools_build \
+USES=		desktop-file-utils qmake qt:4 shared-mime-info tar:tgz
+USE_QT=		corelib gui svg network linguisttools_build \
 		moc_build qmake_build rcc_build uic_build
 QMAKE_ARGS+=	QMAKE_LRELEASE=${LRELEASE}
 
diff --git games/cockatrice/Makefile games/cockatrice/Makefile
index 6fc930a43d0b..ae33333e086b 100644
--- games/cockatrice/Makefile
+++ games/cockatrice/Makefile
@@ -14,8 +14,8 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 LIB_DEPENDS=	libprotobuf.so:devel/protobuf
 
-USES=		cmake compiler:c++11-lib
-USE_QT5=	buildtools concurrent core network qmake widgets
+USES=		cmake compiler:c++11-lib qt:5
+USE_QT=		buildtools concurrent core network qmake widgets
 USE_GITHUB=	yes
 GH_TAGNAME=	2018-04-16-Release-2.5.1
 
@@ -35,8 +35,8 @@ SERVATRICE_CMAKE_OFF=	-DWITH_SERVER=OFF
 COCKATRICE_CMAKE_ON=	-DWITH_CLIENT=ON -DWITH_ORACLE=ON
 COCKATRICE_CMAKE_OFF=	-DWITH_CLIENT=OFF -DWITH_ORACLE=OFF
 
-COCKATRICE_USE=		qt5=multimedia,printsupport,svg,linguisttools,gui
-SERVATRICE_USE=		qt5=sql,sql-mysql,websockets
+COCKATRICE_USE=		qt=multimedia,printsupport,svg,linguisttools,gui
+SERVATRICE_USE=		qt=sql,sql-mysql,websockets
 SERVATRICE_USE+=	RC_SUBR=servatrice
 
 MYSQL_USES+=		mysql:server
diff --git games/colorcode/Makefile games/colorcode/Makefile
index 3485b4ff4e34..a12dc18739b9 100644
--- games/colorcode/Makefile
+++ games/colorcode/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Advanced MasterMind game and solver
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USE_QT5=	core gui widgets buildtools_build
-USES=		qmake
+USE_QT=		core gui widgets buildtools_build
+USES=		qmake qt:5
 WRKSRC=		${WRKDIR}/ColorCode-${PORTVERSION}
 
 DESKTOP_ENTRIES=ColorCode \
diff --git games/connectagram/Makefile games/connectagram/Makefile
index c0ffa63af66e..fec8f0bc1576 100644
--- games/connectagram/Makefile
+++ games/connectagram/Makefile
@@ -13,9 +13,9 @@ COMMENT=	Word unscrambling game
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		compiler:c++11-lib qmake tar:bzip2
+USES=		compiler:c++11-lib qmake qt:5 tar:bzip2
 USE_GL=		gl
-USE_QT5=	buildtools_build core gui linguisttools_build network widgets
+USE_QT=		buildtools_build core gui linguisttools_build network widgets
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
diff --git games/cutemaze/Makefile games/cutemaze/Makefile
index f75a0c778f65..9c7559e09ae3 100644
--- games/cutemaze/Makefile
+++ games/cutemaze/Makefile
@@ -13,9 +13,9 @@ COMMENT=	Simple, top-down game in which mazes are randomly generated
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake tar:bzip2
+USES=		qmake qt:5 tar:bzip2
 USE_GL=		gl
-USE_QT5=	core gui svg imageformats_run widgets \
+USE_QT=		core gui svg imageformats_run widgets \
 		linguisttools_build buildtools_build
 
 PORTDOCS=	ChangeLog NEWS README
diff --git games/doomsday/Makefile games/doomsday/Makefile
index 3fb0b69ebcbd..84d5a3269a89 100644
--- games/doomsday/Makefile
+++ games/doomsday/Makefile
@@ -17,12 +17,12 @@ LIB_DEPENDS=	libcurl.so:ftp/curl \
 		libfluidsynth.so:audio/fluidsynth
 RUN_DEPENDS=	timidity:audio/timidity
 
-USES=		cmake:outsource compiler:c++11-lib localbase:ldflags ninja openal pkgconfig python:2.7,build
+USES=		cmake:outsource compiler:c++11-lib localbase:ldflags ninja openal pkgconfig python:2.7,build qt:5
 USE_GL=		gl glu
 USE_LDCONFIG=	yes
 USE_SDL=	sdl2 mixer2
 USE_XORG=	x11 sm ice xext xrandr xxf86vm
-USE_QT5=	buildtools_build core gui network widgets qmake opengl x11extras
+USE_QT=		buildtools_build core gui network widgets qmake opengl x11extras
 CMAKE_ARGS+=	-DDENG_ENABLE_COTIRE=OFF -DDENG_ASSIMP_EMBEDDED=OFF
 
 WRKSRC=	${WRKDIR}/${PORTNAME}-${PORTVERSION}/${PORTNAME}
diff --git games/dustrac/Makefile games/dustrac/Makefile
index 42ad6c53ab8d..4c04e36a1356 100644
--- games/dustrac/Makefile
+++ games/dustrac/Makefile
@@ -10,9 +10,9 @@ COMMENT=	2D top-view racing game
 
 LIB_DEPENDS=	libvorbisfile.so:audio/libvorbis
 
-USES=		compiler:c++11-lib cmake:outsource openal pkgconfig
+USES=		compiler:c++11-lib cmake:outsource openal pkgconfig qt:5
 USE_GL=		glu
-USE_QT5=	core opengl xml widgets \
+USE_QT=		core opengl xml widgets \
 		buildtools_build linguisttools_build qmake_build
 CMAKE_ARGS=	-DReleaseBuild=on \
 		-DDATA_PATH=${DATADIR} \
diff --git games/flightgear/Makefile games/flightgear/Makefile
index 2e03e80046a6..8f6d422c64fe 100644
--- games/flightgear/Makefile
+++ games/flightgear/Makefile
@@ -47,7 +47,8 @@ DBUS_CMAKE_ON=	-DUSE_DBUS:BOOL=ON
 DBUS_CMAKE_OFF=	-DUSE_DBUS:BOOL=OFF
 QT5_CMAKE_ON=	-DENABLE_QT:BOOL=ON
 QT5_CMAKE_OFF=	-DENABLE_QT:BOOL=OFF
-QT5_USE=	QT5=core,buildtools,gui,network,qmake,qml,quick,widgets
+QT5_USES=	qt:5
+QT5_USE=	QT=core,buildtools,gui,network,qmake,qml,quick,widgets
 
 .include <bsd.port.pre.mk>
 
diff --git games/flukz/Makefile games/flukz/Makefile
index 192a9e2f9aa3..7b59e1f5010e 100644
--- games/flukz/Makefile
+++ games/flukz/Makefile
@@ -9,8 +9,8 @@ DISTNAME=	${PORTNAME}${PORTVERSION}
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Vertically scrolling shoot'em up
 
-USES=		qmake
-USE_QT4=	multimedia network moc_build rcc_build
+USES=		qmake qt:4
+USE_QT=		multimedia network moc_build rcc_build
 
 DESKTOP_ENTRIES=	Flukz "" ${PORTNAME} \
 			${PORTNAME} "Game;ArcadeGame;" true
diff --git games/gcompris-qt/Makefile games/gcompris-qt/Makefile
index 4aa7433a0f42..7bbab94edd00 100644
--- games/gcompris-qt/Makefile
+++ games/gcompris-qt/Makefile
@@ -13,9 +13,9 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libBox2D.so:x11-toolkits/qml-box2d
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	doctools
-USE_QT5=	core gui multimedia network qml quick sensors svg widgets \
+USE_QT=		core gui multimedia network qml quick sensors svg widgets \
 		xml xmlpatterns \
 		buildtools_build linguisttools_build qmake_build
 
diff --git games/goldencheetah/Makefile games/goldencheetah/Makefile
index 714d208caa1a..9592cc801077 100644
--- games/goldencheetah/Makefile
+++ games/goldencheetah/Makefile
@@ -27,9 +27,9 @@ DESKTOP_ENTRIES=	"${PORTNAME}" \
 			"Education;Sports;" \
 			false
 
-USES=		bison gmake qmake
+USES=		bison gmake qmake qt:4
 USE_GL=		gl glu
-USE_QT4=	corelib gui linguist moc_build network opengl \
+USE_QT=		corelib gui linguist moc_build network opengl \
 		qmake rcc script sql svg uic webkit xml
 INFO=		GC3-FAQ GC3-Release GC31-Release
 
diff --git games/gottet/Makefile games/gottet/Makefile
index 14405bc7e4be..0114d1687fd9 100644
--- games/gottet/Makefile
+++ games/gottet/Makefile
@@ -13,9 +13,9 @@ COMMENT=	Tetris clone
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		compiler:c++11-lib qmake tar:bzip2
+USES=		compiler:c++11-lib qmake qt:5 tar:bzip2
 USE_GL=		gl
-USE_QT5=	core gui widgets \
+USE_QT=		core gui widgets \
 		buildtools_build linguisttools_build
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
diff --git games/granatier-kde4/Makefile games/granatier-kde4/Makefile
index 949cabedaad5..5a88648cfdc4 100644
--- games/granatier-kde4/Makefile
+++ games/granatier-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	corelib gui xml \
+USE_QT=		corelib gui xml \
 		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/granatier/Makefile games/granatier/Makefile
index 91a15fb244cd..6e4dc9656284 100644
--- games/granatier/Makefile
+++ games/granatier/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	attica auth codecs config configwidgets coreaddons crash \
 		dbusaddons ecm guiaddons i18n iconthemes itemviews kio \
 		libkdegames newstuff notifyconfig service widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/hedgewars/Makefile games/hedgewars/Makefile
index 1ebef9115163..5b81ca45510a 100644
--- games/hedgewars/Makefile
+++ games/hedgewars/Makefile
@@ -17,10 +17,10 @@ LICENSE_COMB=	multi
 LIB_DEPENDS=	libphysfs.so:devel/physfs \
 		libpng.so:graphics/png
 
-USES=		cmake:noninja desktop-file-utils fpc lua:51 tar:bzip2 pkgconfig
+USES=		cmake:noninja desktop-file-utils fpc lua:51 qt:5 tar:bzip2 pkgconfig
 USE_SDL=	sdl2 mixer2 image2 ttf2 net2
 USE_FPC=	opengl libpng rtl-objpas
-USE_QT5=	core gui widgets network \
+USE_QT=		core gui widgets network \
 		qmake_build buildtools_build \
 		linguisttools_build
 USE_LDCONFIG=	yes
diff --git games/hexalate/Makefile games/hexalate/Makefile
index 8b9f15f23ae8..36e0b272ba2c 100644
--- games/hexalate/Makefile
+++ games/hexalate/Makefile
@@ -14,8 +14,8 @@ COMMENT=	Color matching game
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		compiler:c++11-lib qmake tar:bzip2
-USE_QT5=	core gui widgets buildtools_build linguisttools_build
+USES=		compiler:c++11-lib qmake qt:5 tar:bzip2
+USE_QT=		core gui widgets buildtools_build linguisttools_build
 USE_GL=		gl
 INSTALLS_ICONS=	yes
 
diff --git games/jag/Makefile games/jag/Makefile
index 5bf1a35f831d..589996a6d9da 100644
--- games/jag/Makefile
+++ games/jag/Makefile
@@ -14,11 +14,11 @@ DISTFILES=	${DISTNAME}${EXTRACT_SUFX} \
 MAINTAINER=	amdmi3@FreeBSD.org
 COMMENT=	2D arcade-puzzle game like KDiamonds
 
-USES=		dos2unix qmake zip
+USES=		dos2unix qmake qt:4 zip
 USE_SDL=	sdl mixer
 DOS2UNIX_FILES=	Game.pro
 USE_XORG=	x11
-USE_QT4=	uic_build moc_build rcc_build \
+USE_QT=		uic_build moc_build rcc_build \
 		corelib svg xml opengl network
 
 PLIST_FILES=	bin/${PORTNAME}
diff --git games/kajongg-kde4/Makefile games/kajongg-kde4/Makefile
index 1271b4289b27..71aa4a219397 100644
--- games/kajongg-kde4/Makefile
+++ games/kajongg-kde4/Makefile
@@ -11,9 +11,9 @@ COMMENT=	${${PORTNAME}_DESC}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}twisted>=0:devel/py-twisted@${PY_FLAVOR}
 
 NO_ARCH=	yes
-USES=		cmake:outsource kde:4 python:2.7 tar:xz shebangfix sqlite
+USES=		cmake:outsource kde:4 python:2.7 qt:4 tar:xz shebangfix sqlite
 USE_KDE=	kdelibs pykde4 automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 CMAKE_ARGS=	-DINSTALL_KAJONGG:BOOL=TRUE
 
 SHEBANG_FILES=	src/kajongg.py \
diff --git games/kajongg/Makefile games/kajongg/Makefile
index e4630ac075f0..55121f28d78d 100644
--- games/kajongg/Makefile
+++ games/kajongg/Makefile
@@ -11,11 +11,11 @@ COMMENT=	${${PORTNAME}_DESC}
 
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}twisted>=0:devel/py-twisted@${PY_FLAVOR}
 
-USES=		cmake:outsource pkgconfig python:3 pyqt:5 kde:5 tar:xz \
+USES=		cmake:outsource pkgconfig python:3 pyqt:5 kde:5 qt:5 tar:xz \
 		sqlite
 USE_KDE=	config doctools ecm
 USE_PYQT=	core gui svg widgets
-USE_QT5=	core gui svg widgets \
+USE_QT=		core gui svg widgets \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kanagram-kde4/Makefile games/kanagram-kde4/Makefile
index 12fa8a6edb5d..dfe5f607adb9 100644
--- games/kanagram-kde4/Makefile
+++ games/kanagram-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Letter order game for KDE 4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkeduvocdocument automoc4
-USE_QT4=	xml corelib declarative gui opengl script xml \
+USE_QT=		xml corelib declarative gui opengl script xml \
 		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git games/kanagram/Makefile games/kanagram/Makefile
index 28fe80ef35ab..3d64e8e7247c 100644
--- games/kanagram/Makefile
+++ games/kanagram/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Letter order game for KDE
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	attica auth codecs config configwidgets coreaddons crash \
 		doctools ecm i18n kdeclarative kio libkeduvocdocument newstuff \
 		package service sonnet widgetsaddons xmlgui
-USE_QT5=	core dbus gui network opengl qml quick speech svg widgets xml \
+USE_QT=		core dbus gui network opengl qml quick speech svg widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git games/kapman-kde4/Makefile games/kapman-kde4/Makefile
index 226d031de0cd..1860826d1f40 100644
--- games/kapman-kde4/Makefile
+++ games/kapman-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	corelib gui xml \
+USE_QT=		corelib gui xml \
 		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/kapman/Makefile games/kapman/Makefile
index 1fab00c48dad..05d86978e5aa 100644
--- games/kapman/Makefile
+++ games/kapman/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons ecm i18n libkdegames notifyconfig widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kardsgt/Makefile games/kardsgt/Makefile
index 95ed595da13f..21c3c471b4b0 100644
--- games/kardsgt/Makefile
+++ games/kardsgt/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Card game suite
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake
-USE_QT4=	assistantclient corelib gui network \
+USES=		qmake qt:4
+USE_QT=		assistantclient corelib gui network \
 		moc_build rcc_build uic_build
 ALL_TARGET=	qmake release
 MAKE_JOBS_UNSAFE=	yes
diff --git games/katomic-kde4/Makefile games/katomic-kde4/Makefile
index 2358dda2bd7a..239ffdbcb7bb 100644
--- games/katomic-kde4/Makefile
+++ games/katomic-kde4/Makefile
@@ -8,10 +8,10 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 shebangfix tar:xz
+USES=		cmake:outsource kde:4 qt:4 shebangfix tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
 SHEBANG_FILES=	katomic-levelset-upd.pl
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/katomic/Makefile games/katomic/Makefile
index df4ce7f56a99..2a4b573f2fcc 100644
--- games/katomic/Makefile
+++ games/katomic/Makefile
@@ -6,11 +6,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 shebangfix tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 shebangfix tar:xz
 USE_KDE=	attica auth codecs config configwidgets coreaddons crash \
 		dbusaddons ecm guiaddons i18n iconthemes itemviews kio \
 		libkdegames newstuff notifyconfig service widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick widgets xml \
+USE_QT=		core dbus gui network qml quick widgets xml \
 		buildtools_build qmake_build
 SHEBANG_FILES=	katomic-levelset-upd.pl
 
diff --git games/kblackbox-kde4/Makefile games/kblackbox-kde4/Makefile
index add79a706a14..8c7dc828723a 100644
--- games/kblackbox-kde4/Makefile
+++ games/kblackbox-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	corelib gui xml \
+USE_QT=		corelib gui xml \
 		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/kblackbox/Makefile games/kblackbox/Makefile
index 37e48e9c3307..a79e5260b596 100644
--- games/kblackbox/Makefile
+++ games/kblackbox/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive auth codecs config configwidgets coreaddons crash \
 		dbusaddons ecm guiaddons i18n iconthemes libkdegames sonnet \
 		textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kblocks-kde4/Makefile games/kblocks-kde4/Makefile
index c3c7e8767114..8765357fdf4f 100644
--- games/kblocks-kde4/Makefile
+++ games/kblocks-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	corelib gui network \
+USE_QT=		corelib gui network \
 		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/kblocks/Makefile games/kblocks/Makefile
index e1ac976bf911..6a18b5dd3892 100644
--- games/kblocks/Makefile
+++ games/kblocks/Makefile
@@ -8,11 +8,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons i18n itemmodels kio libkdegames newstuff \
 		notifyconfig textwidgets widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network phonon4 qml quick svg testlib widgets xml \
+USE_QT=		core dbus gui network phonon4 qml quick svg testlib widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kbounce-kde4/Makefile games/kbounce-kde4/Makefile
index 162e56ed873a..50f4cb2fd059 100644
--- games/kbounce-kde4/Makefile
+++ games/kbounce-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/kbounce/Makefile games/kbounce/Makefile
index 23bf353e4174..0e9764d4c780 100644
--- games/kbounce/Makefile
+++ games/kbounce/Makefile
@@ -8,11 +8,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons ecm guiaddons i18n iconthemes jobwidgets kio \
 		libkdegames notifyconfig service textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus gui network phonon4 qml quick svg testlib widgets xml \
+USE_QT=		core dbus gui network phonon4 qml quick svg testlib widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kbreakout-kde4/Makefile games/kbreakout-kde4/Makefile
index 968bc1fac6bd..6df05374d90f 100644
--- games/kbreakout-kde4/Makefile
+++ games/kbreakout-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	corelib gui xml \
+USE_QT=		corelib gui xml \
 		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/kbreakout/Makefile games/kbreakout/Makefile
index 880b8a4c1ef4..80903ddf4bd0 100644
--- games/kbreakout/Makefile
+++ games/kbreakout/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons ecm guiaddons i18n iconthemes jobwidgets kio libkdegames \
 		service widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kcheckers/Makefile games/kcheckers/Makefile
index b59e0e178672..fe7a8939fd81 100644
--- games/kcheckers/Makefile
+++ games/kcheckers/Makefile
@@ -10,8 +10,8 @@ MASTER_SITES=	SF/qcheckers/${PORTNAME}/${PORTVERSION}
 MAINTAINER=	johans@FreeBSD.org
 COMMENT=	Qt version of the classic boardgame checkers
 
-USES=		qmake
-USE_QT4=	corelib gui moc_build rcc_build
+USES=		qmake qt:4
+USE_QT=		corelib gui moc_build rcc_build
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' ${WRKSRC}/common.h
diff --git games/kdiamond-kde4/Makefile games/kdiamond-kde4/Makefile
index e9e981d6a103..cbe7bbfd07b8 100644
--- games/kdiamond-kde4/Makefile
+++ games/kdiamond-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/kdiamond/Makefile games/kdiamond/Makefile
index e8f11e337a37..14dde980f6cc 100644
--- games/kdiamond/Makefile
+++ games/kdiamond/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash dbusaddons \
 		doctools ecm guiaddons i18n iconthemes libkdegames \
 		notifications notifyconfig widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick widgets xml \
+USE_QT=		core dbus gui network qml quick widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kfourinline-kde4/Makefile games/kfourinline-kde4/Makefile
index f3313d8d72b8..087c9cc71594 100644
--- games/kfourinline-kde4/Makefile
+++ games/kfourinline-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/kfourinline/Makefile games/kfourinline/Makefile
index 4ae7b2c75915..840bcbe1a8b4 100644
--- games/kfourinline/Makefile
+++ games/kfourinline/Makefile
@@ -7,12 +7,12 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons dnssd ecm i18n iconthemes itemmodels itemviews \
 		kdeclarative kdelibs4support kio libkdegames notifyconfig \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kgoldrunner-kde4/Makefile games/kgoldrunner-kde4/Makefile
index e1a953ca0a4c..2105e64d8380 100644
--- games/kgoldrunner-kde4/Makefile
+++ games/kgoldrunner-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/kgoldrunner/Makefile games/kgoldrunner/Makefile
index 98215e1b89cf..a97a007a89a4 100644
--- games/kgoldrunner/Makefile
+++ games/kgoldrunner/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		crash dbusaddons ecm i18n kio libkdegames service \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick widgets xml \
+USE_QT=		core dbus gui network qml quick widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/khangman-kde4/Makefile games/khangman-kde4/Makefile
index 5e6e9089863c..cea5683f9470 100644
--- games/khangman-kde4/Makefile
+++ games/khangman-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Hangman game for KDE 4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkeduvocdocument automoc4
-USE_QT4=	corelib declarative gui opengl script xml \
+USE_QT=		corelib declarative gui opengl script xml \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git games/khangman/Makefile games/khangman/Makefile
index 5738ea3cf203..e75abebd82eb 100644
--- games/khangman/Makefile
+++ games/khangman/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Hangman game for KDE 4
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	attica auth codecs completion config configwidgets coreaddons \
 		crash doctools ecm i18n kdeclarative libkeduvocdocument \
 		newstuff notifications package service widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git games/kigo-kde4/Makefile games/kigo-kde4/Makefile
index 189e6abaa22e..26fb5d9a57cc 100644
--- games/kigo-kde4/Makefile
+++ games/kigo-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/kigo/Makefile games/kigo/Makefile
index 6fc64770592f..765f3f49e0ce 100644
--- games/kigo/Makefile
+++ games/kigo/Makefile
@@ -7,12 +7,12 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	attica auth codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm i18n jobwidgets kio \
 		libkdegames newstuff notifyconfig service sonnet textwidgets \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/killbots-kde4/Makefile games/killbots-kde4/Makefile
index 7e5c95f32e15..804e515829cb 100644
--- games/killbots-kde4/Makefile
+++ games/killbots-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	corelib gui qtestlib xml \
+USE_QT=		corelib gui qtestlib xml \
 		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/killbots/Makefile games/killbots/Makefile
index ce0e134cece5..ca6fac2447c7 100644
--- games/killbots/Makefile
+++ games/killbots/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons ecm guiaddons i18n iconthemes itemviews kio \
 		libkdegames notifyconfig widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick widgets xml \
+USE_QT=		core dbus gui network qml quick widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kiriki-kde4/Makefile games/kiriki-kde4/Makefile
index 2f015bb2326f..da8f0776c6da 100644
--- games/kiriki-kde4/Makefile
+++ games/kiriki-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/kiriki/Makefile games/kiriki/Makefile
index 60eb27981424..bdf9d4464137 100644
--- games/kiriki/Makefile
+++ games/kiriki/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash dbusaddons \
 		ecm guiaddons i18n iconthemes kio libkdegames widgetsaddons xmlgui
-USE_QT5=	core dbus gui network printsupport qml quick svg widgets xml \
+USE_QT=		core dbus gui network printsupport qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kjumpingcube-kde4/Makefile games/kjumpingcube-kde4/Makefile
index f7acfce20c22..f0f5de0c36cf 100644
--- games/kjumpingcube-kde4/Makefile
+++ games/kjumpingcube-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/kjumpingcube/Makefile games/kjumpingcube/Makefile
index 0f83279c76f3..842ae64afacf 100644
--- games/kjumpingcube/Makefile
+++ games/kjumpingcube/Makefile
@@ -7,12 +7,12 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons ecm guiaddons i18n  iconthemes itemviews jobwidgets \
 		kio libkdegames newstuff notifyconfig service widgetsaddons \
 		xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/klickety-kde4/Makefile games/klickety-kde4/Makefile
index 7d5ec5f0f976..e122b823cb62 100644
--- games/klickety-kde4/Makefile
+++ games/klickety-kde4/Makefile
@@ -8,10 +8,10 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 shebangfix tar:xz
+USES=		cmake:outsource kde:4 qt:4 shebangfix tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
 SHEBANG_FILES=	klickety-2.0-inherit-ksame-highscore.pl
-USE_QT4=	corelib gui xml \
+USE_QT=		corelib gui xml \
 		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/klickety/Makefile games/klickety/Makefile
index 85d9013c71f0..f11d3ba1b05a 100644
--- games/klickety/Makefile
+++ games/klickety/Makefile
@@ -7,13 +7,13 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 shebangfix tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 shebangfix tar:xz
 SHEBANG_FILES=	klickety-2.0-inherit-ksame-highscore.pl
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons doctools ecm i18n itemviews \
 		jobwidgets kio libkdegames notifications notifyconfig service \
 		solid widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick widgets xml \
+USE_QT=		core dbus gui network qml quick widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/klines-kde4/Makefile games/klines-kde4/Makefile
index 052037ecdd8f..0f64a085077f 100644
--- games/klines-kde4/Makefile
+++ games/klines-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/klines/Makefile games/klines/Makefile
index 8acbd14470a8..ea0f95dbee66 100644
--- games/klines/Makefile
+++ games/klines/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash dbusaddons \
 		ecm guiaddons i18n iconthemes itemviews kio libkdegames \
 		newstuff service widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kmahjongg-kde4/Makefile games/kmahjongg-kde4/Makefile
index 5d88f255729b..36d18e247785 100644
--- games/kmahjongg-kde4/Makefile
+++ games/kmahjongg-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	${${PORTNAME}_DESC}
 
 LIB_DEPENDS=	libkmahjongglib.so:games/libkmahjongg-kde4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/kmahjongg/Makefile games/kmahjongg/Makefile
index 582e79f21667..0cef0f366f59 100644
--- games/kmahjongg/Makefile
+++ games/kmahjongg/Makefile
@@ -9,11 +9,11 @@ COMMENT=	${${PORTNAME}_DESC}
 
 LIB_DEPENDS=	libKF5KMahjongglib.so:games/libkmahjongg
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons doctools ecm i18n kdeclarative libkdegames newstuff \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kmines-kde4/Makefile games/kmines-kde4/Makefile
index b69c1ef29d35..00f135479d55 100644
--- games/kmines-kde4/Makefile
+++ games/kmines-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/kmines/Makefile games/kmines/Makefile
index 62c066bea30c..49f22a9c52a1 100644
--- games/kmines/Makefile
+++ games/kmines/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash dbusaddons \
 		ecm i18n kio libkdegames notifyconfig sonnet textwidgets \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick widgets xml \
+USE_QT=		core dbus gui network qml quick widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/knavalbattle-kde4/Makefile games/knavalbattle-kde4/Makefile
index 1e1c1181e7a9..9f1a9db5c23c 100644
--- games/knavalbattle-kde4/Makefile
+++ games/knavalbattle-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	corelib gui network xml \
+USE_QT=		corelib gui network xml \
 		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/knavalbattle/Makefile games/knavalbattle/Makefile
index ccbfe1426c8a..c12af0ad4963 100644
--- games/knavalbattle/Makefile
+++ games/knavalbattle/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons dnssd doctools ecm i18n libkdegames sonnet \
 		textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick widgets xml \
+USE_QT=		core dbus gui network qml quick widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/knetwalk-kde4/Makefile games/knetwalk-kde4/Makefile
index 5c088f32ba7f..898b1e126160 100644
--- games/knetwalk-kde4/Makefile
+++ games/knetwalk-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/knetwalk/Makefile games/knetwalk/Makefile
index b74d7e75ca4f..c553931d05e5 100644
--- games/knetwalk/Makefile
+++ games/knetwalk/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash dbusaddons \
 		ecm guiaddons i18n iconthemes itemviews kio libkdegames \
 		notifyconfig sonnet textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/knights-kde4/Makefile games/knights-kde4/Makefile
index fc3b505a810d..41c128cd2ec7 100644
--- games/knights-kde4/Makefile
+++ games/knights-kde4/Makefile
@@ -14,9 +14,9 @@ RUN_DEPENDS=	${LOCALBASE}/bin/gnuchess:games/gnuchess
 
 LICENSE=	GPLv2
 
-USES=		cmake:outsource kde:4 tar:bzip2
+USES=		cmake:outsource kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4 workspace libkdegames
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 OPTIONS_DEFINE=	DOCS NLS
 
diff --git games/kolf-kde4/Makefile games/kolf-kde4/Makefile
index c6c2cc5c7383..e231832b02d6 100644
--- games/kolf-kde4/Makefile
+++ games/kolf-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/kolf/Makefile games/kolf/Makefile
index 8f9323394b5f..406c1283124c 100644
--- games/kolf/Makefile
+++ games/kolf/Makefile
@@ -8,13 +8,13 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm guiaddons i18n iconthemes \
 		itemviews jobwidgets kdelibs4support kio libkdegames \
 		notifications parts service solid sonnet textwidgets \
 		unitconversion widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network phonon4 printsupport qml quick \
+USE_QT=		core dbus gui network phonon4 printsupport qml quick \
 		widgets xml \
 		buildtools_build qmake_build
 
diff --git games/kollision-kde4/Makefile games/kollision-kde4/Makefile
index 6cfc68b36036..6a9bd64baec9 100644
--- games/kollision-kde4/Makefile
+++ games/kollision-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/kollision/Makefile games/kollision/Makefile
index 27acb8c97722..13ad798ad450 100644
--- games/kollision/Makefile
+++ games/kollision/Makefile
@@ -8,11 +8,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash dbusaddons \
 		ecm i18n kio libkdegames newstuff notifyconfig textwidgets \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network phonon4 qml quick svg widgets xml \
+USE_QT=		core dbus gui network phonon4 qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/konquest-kde4/Makefile games/konquest-kde4/Makefile
index 92a11e72a89e..44bfd56b8cd6 100644
--- games/konquest-kde4/Makefile
+++ games/konquest-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/konquest/Makefile games/konquest/Makefile
index 5c1119b87532..b5a61c782e8b 100644
--- games/konquest/Makefile
+++ games/konquest/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash \
 		dbusaddons ecm guiaddons i18n libkdegames widgetsaddons \
 		xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kpat-kde4/Makefile games/kpat-kde4/Makefile
index 3f0118ab4cad..421c7b9d8935 100644
--- games/kpat-kde4/Makefile
+++ games/kpat-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 shared-mime-info tar:xz
+USES=		cmake:outsource kde:4 qt:4 shared-mime-info tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 post-patch:
 	${REINPLACE_CMD} -e '/^update_xdg_mimetypes/ d' \
diff --git games/kpat/Makefile games/kpat/Makefile
index a03f7b5eff3d..bc0b8c8ca81a 100644
--- games/kpat/Makefile
+++ games/kpat/Makefile
@@ -8,12 +8,12 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 shared-mime-info tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 shared-mime-info tar:xz
 USE_KDE=	attica auth codecs completion config configwidgets coreaddons \
 		crash dbusaddons ecm guiaddons i18n iconthemes itemviews \
 		kdeclarative kio libkdegames newstuff notifyconfig service \
 		textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus gui network phonon4 qml quick svg widgets xml \
+USE_QT=		core dbus gui network phonon4 qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kreversi-kde4/Makefile games/kreversi-kde4/Makefile
index 1bd7067d71f8..4436ac738e34 100644
--- games/kreversi-kde4/Makefile
+++ games/kreversi-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/kreversi/Makefile games/kreversi/Makefile
index 5b1d9bb88c48..356750c3a897 100644
--- games/kreversi/Makefile
+++ games/kreversi/Makefile
@@ -7,12 +7,12 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm i18n iconthemes itemviews \
 		jobwidgets kdeclarative kio libkdegames package service \
 		solid widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kshisen-kde4/Makefile games/kshisen-kde4/Makefile
index 74780fba8a4b..65931f0d41a5 100644
--- games/kshisen-kde4/Makefile
+++ games/kshisen-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	${${PORTNAME}_DESC}
 
 LIB_DEPENDS=	libkmahjongglib.so:games/libkmahjongg-kde4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/kshisen/Makefile games/kshisen/Makefile
index ba9c4e563cf8..5859337757b4 100644
--- games/kshisen/Makefile
+++ games/kshisen/Makefile
@@ -9,11 +9,11 @@ COMMENT=	${${PORTNAME}_DESC}
 
 LIB_DEPENDS=	libKF5KMahjongglib.so:games/libkmahjongg
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons dnssd ecm i18n kdeclarative kio libkdegames \
 		newstuff widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/ksirk-kde4/Makefile games/ksirk-kde4/Makefile
index 6659cffff049..a718e5b913cb 100644
--- games/ksirk-kde4/Makefile
+++ games/ksirk-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	${${PORTNAME}_DESC}
 
 LIB_DEPENDS=	libqca.so:devel/qca@qt4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	corelib gui corelib gui network qt3support svg xml \
+USE_QT=		corelib gui corelib gui network qt3support svg xml \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git games/ksirk/Makefile games/ksirk/Makefile
index a6d5fd34ed50..ec277a9b1ae5 100644
--- games/ksirk/Makefile
+++ games/ksirk/Makefile
@@ -10,11 +10,11 @@ COMMENT=	${${PORTNAME}_DESC}
 
 LIB_DEPENDS=	libqca-qt5.so:devel/qca@qt5
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	attica auth codecs completion config configwidgets \
 		coreaddons crash i18n iconthemes kio libkdegames newstuff \
 		service wallet widgetsaddons xmlgui
-USE_QT5=	core dbus gui network phonon4 qml quick svg widgets xml \
+USE_QT=		core dbus gui network phonon4 qml quick svg widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git games/ksnakeduel-kde4/Makefile games/ksnakeduel-kde4/Makefile
index dbb4a4e5991b..b3fa173d0ea0 100644
--- games/ksnakeduel-kde4/Makefile
+++ games/ksnakeduel-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/ksnakeduel/Makefile games/ksnakeduel/Makefile
index 28916123422c..e9c787db2995 100644
--- games/ksnakeduel/Makefile
+++ games/ksnakeduel/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		crash dbusaddons ecm guiaddons i18n libkdegames \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/kspaceduel-kde4/Makefile games/kspaceduel-kde4/Makefile
index a2a3b5009b81..1122d928355d 100644
--- games/kspaceduel-kde4/Makefile
+++ games/kspaceduel-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/kspaceduel/Makefile games/kspaceduel/Makefile
index e47c200ec619..2e6db28706fe 100644
--- games/kspaceduel/Makefile
+++ games/kspaceduel/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		crash dbusaddons ecm i18n libkdegames widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/ksquares-kde4/Makefile games/ksquares-kde4/Makefile
index bcddd12fc52d..70818357d203 100644
--- games/ksquares-kde4/Makefile
+++ games/ksquares-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/ksquares/Makefile games/ksquares/Makefile
index 9b40bffda785..cff3d106b311 100644
--- games/ksquares/Makefile
+++ games/ksquares/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons ecm guiaddons i18n iconthemes itemviews kio \
 		libkdegames notifyconfig widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick widgets xml \
+USE_QT=		core dbus gui network qml quick widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/ksudoku-kde4/Makefile games/ksudoku-kde4/Makefile
index eb6081ee317d..32ca2ecba10d 100644
--- games/ksudoku-kde4/Makefile
+++ games/ksudoku-kde4/Makefile
@@ -8,10 +8,10 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_GL=		glu
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	corelib gui corelib gui opengl \
+USE_QT=		corelib gui corelib gui opengl \
 		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/ksudoku/Makefile games/ksudoku/Makefile
index ebdd1445848e..6dcfb66cac73 100644
--- games/ksudoku/Makefile
+++ games/ksudoku/Makefile
@@ -7,12 +7,12 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_GL=		gl glu
 USE_KDE=	archive auth codecs completion config configwidgets \
 		coreaddons crash ecm guiaddons i18n jobwidgets kio \
 		libkdegames service widgetsaddons xmlgui
-USE_QT5=	core dbus gui network opengl printsupport qml quick \
+USE_QT=		core dbus gui network opengl printsupport qml quick \
 		svg widgets xml \
 		buildtools_build qmake_build
 
diff --git games/ktuberling-kde4/Makefile games/ktuberling-kde4/Makefile
index e3c69a000e3e..cbe7c0aad340 100644
--- games/ktuberling-kde4/Makefile
+++ games/ktuberling-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
 .include <bsd.port.mk>
diff --git games/ktuberling/Makefile games/ktuberling/Makefile
index 2ae09a770abf..15b560306758 100644
--- games/ktuberling/Makefile
+++ games/ktuberling/Makefile
@@ -8,14 +8,14 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm emoticons guiaddons i18n \
 		iconthemes init itemmodels itemviews jobwidgets \
 		kdelibs4support kio libkdegames newstuff notifications \
 		notifyconfig parts service solid sonnet textwidgets \
 		unitconversion widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui multimedia network phonon4 printsupport qml \
+USE_QT=		core dbus gui multimedia network phonon4 printsupport qml \
 		quick svg testlib widgets xml \
 		buildtools_build qmake_build
 
diff --git games/kubrick-kde4/Makefile games/kubrick-kde4/Makefile
index 8914d3776aed..ef22270c277e 100644
--- games/kubrick-kde4/Makefile
+++ games/kubrick-kde4/Makefile
@@ -8,10 +8,10 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_GL=		glu
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	corelib gui opengl \
+USE_QT=		corelib gui opengl \
 		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/kubrick/Makefile games/kubrick/Makefile
index 9966db697aab..04b406df65af 100644
--- games/kubrick/Makefile
+++ games/kubrick/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_GL=		gl glu
 USE_KDE=	auth codecs config configwidgets coreaddons crash ecm \
 		i18n kio libkdegames service widgetsaddons xmlgui
-USE_QT5=	core dbus gui network opengl qml quick svg widgets xml \
+USE_QT=		core dbus gui network opengl qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/libkdegames-kde4/Makefile games/libkdegames-kde4/Makefile
index b8dec4541a62..7c327cf367ef 100644
--- games/libkdegames-kde4/Makefile
+++ games/libkdegames-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Libraries used by KDE 4 games
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	network phonon xml moc_build qmake_build rcc_build uic_build
+USE_QT=		network phonon xml moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 OPTIONS_DEFINE=		LOWLATENCY
diff --git games/libkdegames/Makefile games/libkdegames/Makefile
index 6570e420dd22..05a1774fc28d 100644
--- games/libkdegames/Makefile
+++ games/libkdegames/Makefile
@@ -9,13 +9,13 @@ COMMENT=	Libraries used by KDE games
 
 LIB_DEPENDS=	libsndfile.so:audio/libsndfile
 
-USES=		cmake:outsource gettext kde:5 openal tar:xz
+USES=		cmake:outsource gettext kde:5 openal qt:5 tar:xz
 USE_KDE=	archive attica auth bookmarks codecs completion config \
 		configwidgets coreaddons crash dbusaddons dnssd ecm emoticons \
 		globalaccel guiaddons i18n iconthemes init itemmodels \
 		itemviews jobwidgets kdeclarative kdelibs4support kio newstuff \
 		package service textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg testlib widgets xml \
+USE_QT=		core dbus gui network qml quick svg testlib widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git games/libkmahjongg-kde4/Makefile games/libkmahjongg-kde4/Makefile
index ff70e3eebc04..8d466dc64fcb 100644
--- games/libkmahjongg-kde4/Makefile
+++ games/libkmahjongg-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Library for the Mahjongg Solitaire for KDE 4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git games/libkmahjongg/Makefile games/libkmahjongg/Makefile
index 9073e7de7a76..45549c299741 100644
--- games/libkmahjongg/Makefile
+++ games/libkmahjongg/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Library for the Mahjongg Solitaire for KDE 5
 
-USES=		cmake:outsource compiler:c++11-lang gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lang gettext kde:5 qt:5 tar:xz
 USE_KDE=	completion config configwidgets coreaddons ecm i18n widgetsaddons
-USE_QT5=	core gui svg widgets \
+USE_QT=		core gui svg widgets \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git games/lskat-kde4/Makefile games/lskat-kde4/Makefile
index 7339a56ff18e..34965fab45e4 100644
--- games/lskat-kde4/Makefile
+++ games/lskat-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	corelib gui gui svg \
+USE_QT=		corelib gui gui svg \
 		moc_build qmake_build rcc_build uic_build
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/lskat/Makefile games/lskat/Makefile
index c7742a786f5f..f24d17d14f2e 100644
--- games/lskat/Makefile
+++ games/lskat/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash ecm \
 		guiaddons i18n libkdegames notifyconfig widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg widgets xml \
+USE_QT=		core dbus gui network qml quick svg widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/openmw/Makefile games/openmw/Makefile
index 5ad99cbcb656..cfdcf4fa238b 100644
--- games/openmw/Makefile
+++ games/openmw/Makefile
@@ -23,9 +23,9 @@ LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
 USE_GITHUB=	yes
 GH_ACCOUNT=	OpenMW
 
-USES=		cmake:outsource compiler:c++14-lang openal pkgconfig
+USES=		cmake:outsource compiler:c++14-lang openal pkgconfig qt:5
 USE_GL=		gl
-USE_QT5=	qmake_build buildtools_build core gui network opengl \
+USE_QT=		qmake_build buildtools_build core gui network opengl \
 		printsupport widgets
 USE_SDL=	sdl2
 USE_XORG=	xt
diff --git games/openpref/Makefile games/openpref/Makefile
index 3db225db257e..1410eea8d1eb 100644
--- games/openpref/Makefile
+++ games/openpref/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Preferans game
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake
-USE_QT4=	corelib gui moc_build rcc_build uic_build
+USES=		qmake qt:4
+USE_QT=		corelib gui moc_build rcc_build uic_build
 MAKE_JOBS_UNSAFE=	yes
 
 PLIST_FILES=	bin/${PORTNAME} \
diff --git games/pairs-kde4/Makefile games/pairs-kde4/Makefile
index d48209b74b9d..7bedc1aba172 100644
--- games/pairs-kde4/Makefile
+++ games/pairs-kde4/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Memory and pairs game for KDE
 
 LICENSE=	GPLv2
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	declarative opengl phonon xmlpatterns \
+USE_QT=		declarative opengl phonon xmlpatterns \
 		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git games/palapeli-kde4/Makefile games/palapeli-kde4/Makefile
index 34d75c341bba..8f0d08c4d1a1 100644
--- games/palapeli-kde4/Makefile
+++ games/palapeli-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 shared-mime-info tar:xz
+USES=		cmake:outsource kde:4 qt:4 shared-mime-info tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	corelib gui gui \
+USE_QT=		corelib gui gui \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git games/palapeli/Makefile games/palapeli/Makefile
index 097aeba7ddda..0b2b36ca15b8 100644
--- games/palapeli/Makefile
+++ games/palapeli/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:5 shared-mime-info tar:xz
+USES=		cmake:outsource kde:5 qt:5 shared-mime-info tar:xz
 USE_KDE=	archive auth codecs completion config configwidgets coreaddons \
 		crash i18n itemviews jobwidgets kio libkdegames notifications service \
 		widgetsaddons xmlgui
-USE_QT5=	concurrent core dbus gui network svg widgets xml \
+USE_QT=		concurrent core dbus gui network svg widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git games/peg-e/Makefile games/peg-e/Makefile
index b4d776771044..f4d56cbe6c1c 100644
--- games/peg-e/Makefile
+++ games/peg-e/Makefile
@@ -14,8 +14,8 @@ COMMENT=	Peg elimination game
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		compiler:c++11-lib qmake tar:bzip2
-USE_QT5=	core gui widgets qmake_build buildtools_build linguisttools_build
+USES=		compiler:c++11-lib qmake qt:5 tar:bzip2
+USE_QT=		core gui widgets qmake_build buildtools_build linguisttools_build
 USE_GL=		gl
 INSTALLS_ICONS=	yes
 
diff --git games/pentobi/Makefile games/pentobi/Makefile
index 58b932f13bd2..3c9b1d036834 100644
--- games/pentobi/Makefile
+++ games/pentobi/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Computer opponent for the board game Blokus
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake desktop-file-utils shared-mime-info tar:xz
-USE_QT5=	core gui widgets svg concurrent \
+USES=		cmake desktop-file-utils qt:5 shared-mime-info tar:xz
+USE_QT=		core gui widgets svg concurrent \
 		qmake_build buildtools_build linguisttools_build
 
 PORTDOCS=	NEWS
diff --git games/picmi-kde4/Makefile games/picmi-kde4/Makefile
index a13a693858ff..08fb5578ae0c 100644
--- games/picmi-kde4/Makefile
+++ games/picmi-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	games kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkdegames automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build \
+USE_QT=		moc_build qmake_build rcc_build uic_build \
 		svg xml
 
 .include <${.CURDIR}/../kdegames-kde4/Makefile.common>
diff --git games/picmi/Makefile games/picmi/Makefile
index 7af4bff54eaa..b737597cd1b9 100644
--- games/picmi/Makefile
+++ games/picmi/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	games kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	${${PORTNAME}_DESC}
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons doctools ecm i18n jobwidgets kdeclarative kio \
 		libkdegames newstuff service widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick svg testlib widgets xml \
+USE_QT=		core dbus gui network qml quick svg testlib widgets xml \
 		buildtools_build qmake_build
 
 .include <${.CURDIR}/../kdegames/Makefile.common>
diff --git games/pokerth/Makefile games/pokerth/Makefile
index 3e69fad663c4..c7917f81aadd 100644
--- games/pokerth/Makefile
+++ games/pokerth/Makefile
@@ -23,8 +23,8 @@ LIB_DEPENDS=	libboost_thread.so:devel/boost-libs \
 BUILD_DEPENDS=	${LOCALBASE}/include/libircclient.h:irc/libircclient \
 		protoc:devel/protobuf
 
-USES=		iconv gmake qmake sqlite ssl
-USE_QT4=	gui corelib network sql sql-sqlite3 \
+USES=		iconv gmake qmake qt:4 sqlite ssl
+USE_QT=		gui corelib network sql sql-sqlite3 \
 		moc_build rcc_build uic_build
 USE_SDL=	mixer
 QMAKE_SOURCE_PATH=	pokerth.pro
diff --git games/qgo/Makefile games/qgo/Makefile
index d4a405300ec8..4fceee012d48 100644
--- games/qgo/Makefile
+++ games/qgo/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Go board and SGF editor written with the Qt library
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-USES=		desktop-file-utils qmake tar:bzip2
-USE_QT4=	gui network qtestlib moc_build rcc_build uic_build
+USES=		desktop-file-utils qmake qt:4 tar:bzip2
+USE_QT=		gui network qtestlib moc_build rcc_build uic_build
 
 PLIST_FILES=	bin/qgo share/applications/qgo.desktop share/pixmaps/qgo.png
 
diff --git games/qnetwalk/Makefile games/qnetwalk/Makefile
index d267b5bb55ad..d6cc64408559 100644
--- games/qnetwalk/Makefile
+++ games/qnetwalk/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Qt-version of the NetWalk game
 
 LICENSE=	GPLv2
 
-USES=		qmake
-USE_QT4=	corelib gui moc_build rcc_build
+USES=		qmake qt:4
+USE_QT=		corelib gui moc_build rcc_build
 USE_SDL=	mixer
 
 PLIST_FILES=	bin/qnetwalk \
diff --git games/qtads/Makefile games/qtads/Makefile
index 36696028851a..114a3ea9744a 100644
--- games/qtads/Makefile
+++ games/qtads/Makefile
@@ -11,8 +11,8 @@ COMMENT=	Cross-platform multimedia interpreter for TADS games
 
 LICENSE=	GPLv2
 
-USES=		gmake pkgconfig qmake tar:bzip2
-USE_QT4=	gui moc_build network rcc_build uic_build
+USES=		gmake pkgconfig qmake qt:4 tar:bzip2
+USE_QT=		gui moc_build network rcc_build uic_build
 USE_SDL=	sdl mixer sound
 
 QMAKE_ARGS+=	QMAKE_CFLAGS_RELEASE="" QMAKE_CXXFLAGS_RELEASE=""
diff --git games/quackle/Makefile games/quackle/Makefile
index c938dce798ad..605fc498f5c2 100644
--- games/quackle/Makefile
+++ games/quackle/Makefile
@@ -14,8 +14,8 @@ LICENSE=	GPLv3
 
 USE_GITHUB=	yes
 
-USES=		compiler:c++11-lib gmake qmake
-USE_QT4=	corelib gui moc_build
+USES=		compiler:c++11-lib gmake qmake qt:4
+USE_QT=		corelib gui moc_build
 
 BUILD_WRKSRC=	${WRKSRC}/quacker
 
diff --git games/simsu/Makefile games/simsu/Makefile
index fc79c2bd3004..6214ba026e46 100644
--- games/simsu/Makefile
+++ games/simsu/Makefile
@@ -14,8 +14,8 @@ COMMENT=	Basic Sudoku game
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		compiler:c++11-lib qmake tar:bzip2
-USE_QT5=	core gui widgets buildtools_build linguisttools_build
+USES=		compiler:c++11-lib qmake qt:5 tar:bzip2
+USE_QT=		core gui widgets buildtools_build linguisttools_build
 USE_GL=		gl
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
diff --git games/solarus-quest-editor/Makefile games/solarus-quest-editor/Makefile
index 89670f2b744d..f2388c15883e 100644
--- games/solarus-quest-editor/Makefile
+++ games/solarus-quest-editor/Makefile
@@ -25,8 +25,8 @@ GH_ACCOUNT=	christopho
 
 CMAKE_ARGS+=	-DSOLARUS_USE_LUAJIT=OFF
 USE_SDL=	sdl2 ttf2 image2
-USE_QT5=	buildtools core gui linguist qmake widgets
-USES=		cmake compiler:c++11-lib openal
+USE_QT=		buildtools core gui linguist qmake widgets
+USES=		cmake compiler:c++11-lib openal qt:5
 
 DESKTOP_ENTRIES=	"Solarus Quest Editor" "${COMMENT}" "${PORTNAME}" "${PORTNAME}"  \
 			"Game;" false
diff --git games/solarus/Makefile games/solarus/Makefile
index 8847976b0745..ccdc9cbd6dc5 100644
--- games/solarus/Makefile
+++ games/solarus/Makefile
@@ -21,10 +21,10 @@ LIB_DEPENDS=	libphysfs.so:devel/physfs \
 
 CMAKE_ARGS+=	-DSOLARUS_USE_LUAJIT=OFF
 MAKE_ARGS+=	DESTDIR=${STAGEDIR}
-USE_QT5=	buildtools_build core gui linguisttools_build widgets
+USE_QT=		buildtools_build core gui linguisttools_build widgets
 USE_SDL=	sdl2 ttf2 image2
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
-USES=		cmake:noninja qmake compiler:c++11-lib openal
+USES=		cmake:noninja qmake compiler:c++11-lib openal qt:5
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git games/spellathon/Makefile games/spellathon/Makefile
index 5caeb4d3d5d2..e5cace499813 100644
--- games/spellathon/Makefile
+++ games/spellathon/Makefile
@@ -20,9 +20,9 @@ LIB_DEPENDS=	libpcre.so:devel/pcre \
 		libfontconfig.so:x11-fonts/fontconfig
 
 CXXFLAGS+=	-fPIC
-USES=		gettext iconv qmake
+USES=		gettext iconv qmake qt:4
 USE_GNOME=	glib20
-USE_QT4=	corelib gui moc_build rcc_build uic_build
+USE_QT=		corelib gui moc_build rcc_build uic_build
 USE_XORG=	ice sm x11 xau xcb xdmcp xext xrender
 USE_LDCONFIG=	yes
 
diff --git games/sudoku-sensei/Makefile games/sudoku-sensei/Makefile
index 15f7ac5adb85..19066ef1df98 100644
--- games/sudoku-sensei/Makefile
+++ games/sudoku-sensei/Makefile
@@ -17,8 +17,8 @@ LICENSE=	GPLv2+
 
 WRKSRC=		${WRKDIR}/SudokuSenseiSources
 
-USES=		qmake
-USE_QT4=	moc_build uic_build corelib gui iconengines_run imageformats_run
+USES=		qmake qt:4
+USE_QT=		moc_build uic_build corelib gui iconengines_run imageformats_run
 
 SUB_FILES=	${PORTNAME} pkg-deinstall pkg-message
 
diff --git games/tanglet/Makefile games/tanglet/Makefile
index 4a6352368476..52308695dc3e 100644
--- games/tanglet/Makefile
+++ games/tanglet/Makefile
@@ -14,9 +14,9 @@ LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
 USES=		compiler:c++11-lib desktop-file-utils pkgconfig qmake \
-		shared-mime-info tar:bzip2
+		qt:5 shared-mime-info tar:bzip2
 USE_GL=		gl
-USE_QT5=	buildtools_build linguisttools_build core gui widgets
+USE_QT=		buildtools_build linguisttools_build core gui widgets
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
diff --git games/tbe/Makefile games/tbe/Makefile
index a143a7c09566..32b02b341798 100644
--- games/tbe/Makefile
+++ games/tbe/Makefile
@@ -18,8 +18,8 @@ BUILD_DEPENDS=	${LOCALBASE}/bin/unzip:archivers/unzip
 USE_GITHUB=	yes
 GH_ACCOUNT=	kaa-ching
 
-USES=		cmake compiler:c++11-lib
-USE_QT4=	corelib gui linguisttools_build moc_build qmake_build rcc_build \
+USES=		cmake compiler:c++11-lib qt:4
+USE_QT=		corelib gui linguisttools_build moc_build qmake_build rcc_build \
 		svg uic_build xml
 
 PORTDOCS=	*
diff --git games/tetzle/Makefile games/tetzle/Makefile
index fdd214683d72..66e5a535c655 100644
--- games/tetzle/Makefile
+++ games/tetzle/Makefile
@@ -14,8 +14,8 @@ COMMENT=	Jigsaw puzzle with tetrominoes
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		compiler:c++11-lib desktop-file-utils qmake tar:bzip2
-USE_QT5=	core gui widgets buildtools_build linguisttools_build
+USES=		compiler:c++11-lib desktop-file-utils qmake qt:5 tar:bzip2
+USE_QT=		core gui widgets buildtools_build linguisttools_build
 USE_GL=		gl
 INSTALLS_ICONS=	yes
 
diff --git games/warzone2100/Makefile games/warzone2100/Makefile
index f0f1315a6a71..a05cd340c5b1 100644
--- games/warzone2100/Makefile
+++ games/warzone2100/Makefile
@@ -24,13 +24,13 @@ LIB_DEPENDS=	libphysfs.so:devel/physfs \
 		libharfbuzz.so:print/harfbuzz
 RUN_DEPENDS=	${LOCALBASE}/share/fonts/dejavu/DejaVuSans.ttf:x11-fonts/dejavu
 
-USES=		bison compiler:c++11-lib gmake localbase openal:al pkgconfig ssl tar:xz
+USES=		bison compiler:c++11-lib gmake localbase openal:al pkgconfig \
+		qmake:no_env qt:5 ssl tar:xz
 GNU_CONFIGURE=	yes
 USE_GL=		gl glu glew
 USE_SDL=	sdl2
 USE_XORG=	x11 xrandr
-USE_QT5=	core gui widgets script buildtools_build
-QT_NONSTANDARD=	yes
+USE_QT=		core gui widgets script buildtools_build
 CONFIGURE_ARGS=	--program-transform-name="" --with-distributor="FreeBSD ports"
 CONFIGURE_ENV=	LIBCRYPTO_CFLAGS="-I${OPENSSLINC}" \
 		LIBCRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto"
diff --git games/xptools/Makefile games/xptools/Makefile
index 4c4ba30d484a..e3417eaa07df 100644
--- games/xptools/Makefile
+++ games/xptools/Makefile
@@ -34,7 +34,7 @@ LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
 		libGLw.so:graphics/libGLw \
 		libGLU.so:graphics/libGLU
 
-USES=		eigen:3 gmake jpeg sqlite ssl
+USES=		eigen:3 gmake jpeg qt:4 sqlite ssl
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	X-Plane
@@ -43,7 +43,7 @@ GH_TAGNAME=	982173e:xptools_libs
 
 USE_CXXSTD=	c++11
 USE_BINUTILS=	yes
-USE_QT4=	corelib gui moc opengl
+USE_QT=		corelib gui moc opengl
 USE_GL+=	gl
 
 BINARIES=	DDSTool DSFTool MeshTool ObjConverter ObjView RenderFarm RenderFarmUI WED XGrinder XPlaneSupportLin.p
diff --git german/tipp10/Makefile german/tipp10/Makefile
index a44b4a0ed920..63ec717bca35 100644
--- german/tipp10/Makefile
+++ german/tipp10/Makefile
@@ -14,9 +14,9 @@ COMMENT=	10-finger touch typing learning program
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/license_en.txt
 
-USES=		qmake dos2unix zip
+USES=		qmake dos2unix qt:4 zip
 DOS2UNIX_GLOB=	*.pro *.cpp
-USE_QT4=	gui sql corelib network script qtestlib \
+USE_QT=		gui sql corelib network script qtestlib \
 		rcc_build uic_build moc_build \
 		sql-sqlite2_run sql-sqlite3_run
 QMAKE_ARGS+=	DATADIR="${DATADIR}"
diff --git graphics/appleseed/Makefile graphics/appleseed/Makefile
index a8c0021e56b1..f0fadcb5892a 100644
--- graphics/appleseed/Makefile
+++ graphics/appleseed/Makefile
@@ -57,7 +57,8 @@ EXAMPLES_CMAKE_OFF=	-DWITH_SAMPLES:BOOL=OFF
 DISNEY_LIB_DEPENDS=	libSeExpr.so:graphics/seexpr
 DISNEY_CMAKE_ON=	-DWITH_DISNEY_MATERIAL:BOOL=ON
 
-STUDIO_USE=	QT4=moc_build,qmake_build,rcc_build,uic_build,opengl
+STUDIO_USES=	qt:4
+STUDIO_USE=	QT=moc_build,qmake_build,rcc_build,uic_build,opengl
 STUDIO_CMAKE_OFF=	-DWITH_STUDIO:BOOL=OFF
 
 .include <bsd.port.pre.mk>
diff --git graphics/aqsis/Makefile graphics/aqsis/Makefile
index 7e27fbba4f33..d5997d536fe5 100644
--- graphics/aqsis/Makefile
+++ graphics/aqsis/Makefile
@@ -27,12 +27,12 @@ LDFLAGS+=	-L${LOCALBASE}/lib
 
 USE_LDCONFIG=	yes
 USES=		cmake:outsource compiler:c++11-lib desktop-file-utils \
-		shared-mime-info shebangfix
+		qt:4 shared-mime-info shebangfix
 USE_CXXSTD=	gnu++11
 SHEBANG_FILES=	examples/*/*/*.sh \
 		tools/neqsus/houdini/post.sh \
 		distribution/linux/*.sh
-USE_QT4=	opengl qmake_build moc_build rcc_build uic_build
+USE_QT=		opengl qmake_build moc_build rcc_build uic_build
 PLIST_SUB+=	LIBVERS=${PORTVERSION:R}
 
 INSTALLS_ICONS=	yes
diff --git graphics/autoq3d/Makefile graphics/autoq3d/Makefile
index 4ac93c4aa828..249b45351c31 100644
--- graphics/autoq3d/Makefile
+++ graphics/autoq3d/Makefile
@@ -14,11 +14,11 @@ COMMENT=	Qt 4 quick 3D model editor
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/docs/license.txt
 
-USES=		dos2unix qmake zip
+USES=		dos2unix qmake qt:4 zip
 DOS2UNIX_FILES=	*.pro src/cmds/*.cpp src/fgui/*.cpp docs/*.txt
 DOS2UNIX_REGEX=	.*.[^p][^n][^g]$
 USE_GL=		glu
-USE_QT4=	corelib gui opengl moc_build
+USE_QT=		corelib gui opengl moc_build
 
 PORTDOCS=	3DQformat.txt ChangeLog.txt
 
diff --git graphics/burplex/Makefile graphics/burplex/Makefile
index 369238ebfd3c..adcef1398286 100644
--- graphics/burplex/Makefile
+++ graphics/burplex/Makefile
@@ -14,8 +14,8 @@ LICENSE=	BSD2CLAUSE
 
 RUN_DEPENDS=	${LOCALBASE}/bin/dcraw:graphics/dcraw
 
-USES=		qmake
-USE_QT4=	gui uic_build moc_build rcc_build \
+USES=		qmake qt:4
+USE_QT=		gui uic_build moc_build rcc_build \
 		imageformats_run
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
diff --git graphics/cloudcompare/Makefile graphics/cloudcompare/Makefile
index 701a3a032604..5723058d6345 100644
--- graphics/cloudcompare/Makefile
+++ graphics/cloudcompare/Makefile
@@ -16,12 +16,12 @@ LICENSE_COMB=	multi
 BROKEN_FreeBSD_10=	error: "SSE instruction set not enabled"
 BROKEN_aarch64=		fails to compile: mmintrin.h:47:5: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?
 
-USES=		cmake:outsource localbase:ldflags
+USES=		cmake:outsource localbase:ldflags qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	CloudCompare
 GH_PROJECT=	${GH_ACCOUNT}
 GH_TAGNAME=	5d41227deb30c445ccbaa2d789a4363b57948a5d
-USE_QT5=	concurrent core gui opengl printsupport widgets buildtools_build qmake_build
+USE_QT=		concurrent core gui opengl printsupport widgets buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
 OPTIONS_DEFINE=	DXFLIB GAMEPAD GDAL PDAL SHAPELIB PLUGINS
@@ -36,7 +36,8 @@ SHAPELIB_DESC=	Enable shape file support
 
 DXFLIB_CMAKE_BOOL=	OPTION_USE_DXF_LIB
 
-GAMEPAD_USE=		QT5=gamepad
+GAMEPAD_USES=	qt:5
+GAMEPAD_USE=		QT=gamepad
 GAMEPAD_CMAKE_BOOL=	OPTION_SUPPORT_GAMEPADS
 
 GDAL_CMAKE_BOOL=	OPTION_USE_GDAL
diff --git graphics/colmap/Makefile graphics/colmap/Makefile
index 8899b0e21041..72f2825478d2 100644
--- graphics/colmap/Makefile
+++ graphics/colmap/Makefile
@@ -24,10 +24,10 @@ LIB_DEPENDS=	libboost_filesystem.so:devel/boost-libs \
 		libfreeimage.so:graphics/freeimage \
 		libceres.so:math/ceres-solver
 
-USES=		cmake compiler:${OPENMP}c++11-lib eigen:3 fortran localbase sqlite
+USES=		cmake compiler:${OPENMP}c++11-lib eigen:3 fortran localbase qt:5 sqlite
 USE_GITHUB=	yes
 USE_GL=		gl glew
-USE_QT5=	qmake_build buildtools_build core gui opengl_build widgets
+USE_QT=		qmake_build buildtools_build core gui opengl_build widgets
 EXCLUDE=	SQLite
 EXTRACT_AFTER_ARGS=	${EXCLUDE:S,^,--exclude src/ext/,}
 CMAKE_OFF=	BOOST_STATIC CUDA_ENABLED
diff --git graphics/converseen/Makefile graphics/converseen/Makefile
index ba1ac0bcadc7..acee5c0702f5 100644
--- graphics/converseen/Makefile
+++ graphics/converseen/Makefile
@@ -14,8 +14,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libMagick++-6.so:graphics/ImageMagick
 
-USES=		cmake tar:bzip2 compiler:c++11-lang
-USE_QT5=	core network gui linguisttools_build qmake_build \
+USES=		cmake qt:5 tar:bzip2 compiler:c++11-lang
+USE_QT=		core network gui linguisttools_build qmake_build \
 		buildtools_build widgets
 post-patch:
 	@${REINPLACE_CMD} -e '/^ appdata.path =/s|/usr/share|$$$${SHARE_DIR}|' \
diff --git graphics/darknock/Makefile graphics/darknock/Makefile
index 40c69bada9f2..d187335f4acd 100644
--- graphics/darknock/Makefile
+++ graphics/darknock/Makefile
@@ -14,8 +14,8 @@ LICENSE=	GPLv2+
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-USES=		qmake
-USE_QT4=	gui linguisttools_build moc_build rcc_build uic_build
+USES=		qmake qt:4
+USE_QT=		gui linguisttools_build moc_build rcc_build uic_build
 
 PORTDOCS=	changelog
 PLIST_FILES=	bin/darknock share/pixmaps/darknock.png
diff --git graphics/diffpdf/Makefile graphics/diffpdf/Makefile
index f19052e0c161..b520289af075 100644
--- graphics/diffpdf/Makefile
+++ graphics/diffpdf/Makefile
@@ -13,8 +13,8 @@ LICENSE=	GPLv2+
 
 LIB_DEPENDS=	libpoppler-qt4.so:graphics/poppler-qt4
 
-USES=		compiler:c++11-lang qmake
-USE_QT4=	qmake_build moc_build rcc_build uic_build linguist_build
+USES=		compiler:c++11-lang qmake qt:4
+USE_QT=		qmake_build moc_build rcc_build uic_build linguist_build
 
 PLIST_FILES=	bin/diffpdf
 
diff --git graphics/digikam-kde4/Makefile graphics/digikam-kde4/Makefile
index 6d8c1bef2f0d..0bff1501fc9e 100644
--- graphics/digikam-kde4/Makefile
+++ graphics/digikam-kde4/Makefile
@@ -24,9 +24,9 @@ LIB_DEPENDS=	libtiff.so:graphics/tiff \
 		libkgeomap.so:astro/libkgeomap-kde4 \
 		libboost_graph.so:devel/boost-libs
 
-USES+=		eigen:3 pkgconfig shebangfix
+USES+=		eigen:3 pkgconfig qt:4 shebangfix
 USE_KDE+=	libkdcraw libkexiv2 libkipi runtime_run
-USE_QT4+=	sql-sqlite3_run
+USE_QT+=		sql-sqlite3_run
 USE_LDCONFIG=	yes
 CMAKE_ARGS+=	-DWITH_Sqlite2:BOOL=OFF -DENABLE_OPENCV3:BOOL=true
 
@@ -52,7 +52,8 @@ PIMLIBS_USE=		KDE=pimlibs baloo
 PIMLIBS_CMAKE_ON=	-DENABLE_KDEPIMLIBSSUPPORT:BOOL=ON
 PIMLIBS_CMAKE_OFF=	-DENABLE_KDEPIMLIBSSUPPORT:BOOL=OFF
 
-MYSQL_USE=		MYSQL=server QT4=sql-mysql_run
+MYSQL_USES=	qt:4
+MYSQL_USE=		MYSQL=server QT=sql-mysql_run
 MYSQL_BUILD_DEPENDS=	${LOCALBASE}/lib/mysql/libmysqld.a:${_MYSQL_SERVER}
 MYSQL_CMAKE_ON= 	-DMYSQLD_PATH:PATH=${LOCALBASE}/libexec \
 			-DMYSQL_TOOLS_PATH:PATH=${LOCALBASE}/bin \
diff --git graphics/digikam-kde4/Makefile.common graphics/digikam-kde4/Makefile.common
index 874c4b702d8a..62366d251928 100644
--- graphics/digikam-kde4/Makefile.common
+++ graphics/digikam-kde4/Makefile.common
@@ -114,12 +114,12 @@ DISTINFO_FILE=	${.CURDIR:H:H}/graphics/digikam-kde4/distinfo
 
 LICENSE?=	GPLv2
 
-USES+=		tar:bzip2
+USES+=		qt:4 tar:bzip2
 
 .if !defined(NO_BUILD)
 USES+=		cmake:noninja kde:4
 USE_KDE+=	automoc4 kdelibs
-USE_QT4+=	qmake_build moc_build rcc_build uic_build
+USE_QT+=	qmake_build moc_build rcc_build uic_build
 
 WRKSRC?=	${WRKDIR}/${DISTNAME}/extra/${PORTNAME}
 
diff --git graphics/digikam/Makefile graphics/digikam/Makefile
index 68c1a12a8283..f893c5b9c1a1 100644
--- graphics/digikam/Makefile
+++ graphics/digikam/Makefile
@@ -31,7 +31,7 @@ LIB_DEPENDS=	libKF5KGeoMap.so:astro/libkgeomap \
 		libtiff.so:graphics/tiff
 
 USES=		cmake:outsource compiler:c++11-lib eigen:3 jpeg kde:5 pkgconfig \
-		shebangfix tar:xz
+		qt:5 shebangfix tar:xz
 USE_GNOME=	glib20 libxml2 libxslt
 USE_KDE=	archive auth bookmarks calendarcore codecs completion config \
 		configwidgets coreaddons crash doctools ecm filemetadata \
@@ -39,7 +39,7 @@ USE_KDE=	archive auth bookmarks calendarcore codecs completion config \
 		kio marble libkipi notifications notifyconfig parts service \
 		solid sonnet textwidgets threadweaver unitconversion \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	concurrent core dbus gui network opengl printsupport sql \
+USE_QT=		concurrent core dbus gui network opengl printsupport sql \
 		webkit widgets x11extras xml \
 		sql-sqlite3_run \
 		buildtools_build qmake_build
@@ -66,7 +66,8 @@ MULTIMEDIA_DESC=	Multimedia support
 MULTIMEDIA_CMAKE_BOOL=	ENABLE_MEDIAPLAYER
 MULTIMEDIA_LIB_DEPENDS=	libQtAV.so:multimedia/QtAV
 
-MYSQL_USE=		MYSQL=server QT5=sql-mysql_run
+MYSQL_USES=	qt:5
+MYSQL_USE=		MYSQL=server QT=sql-mysql_run
 MYSQL_CMAKE_BOOL=	ENABLE_INTERNALMYSQL \
 			ENABLE_MYSQLSUPPORT
 MYSQL_CMAKE_ON=		-DMYSQLD_PATH:PATH=${LOCALBASE}/libexec \
diff --git graphics/dilay/Makefile graphics/dilay/Makefile
index 5cb0f1c526dc..ae791ec7fc0a 100644
--- graphics/dilay/Makefile
+++ graphics/dilay/Makefile
@@ -16,12 +16,12 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
 BUILD_DEPENDS=	${LOCALBASE}/include/glm/glm.hpp:math/glm
 
-USES=		compiler:c++14-lang gmake qmake
+USES=		compiler:c++14-lang gmake qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	abau
 USE_CXXSTD=	c++14
 USE_GL=		gl
-USE_QT5=	core gui opengl widgets xml buildtools_build
+USE_QT=		core gui opengl widgets xml buildtools_build
 
 MAKE_JOBS_UNSAFE=	yes  # Workaround for: https://github.com/abau/dilay/issues/19 parallel build fails (still a problem despite having been closed)
 
diff --git graphics/djview4/Makefile graphics/djview4/Makefile
index 068954c7991a..a94d4c376960 100644
--- graphics/djview4/Makefile
+++ graphics/djview4/Makefile
@@ -33,9 +33,11 @@ OPTIONS_SINGLE_QT=	QT4 QT5
 OPTIONS_DEFAULT=	QT5
 QT_DESC=		Qt toolkit
 
-QT4_USE=	QT4=corelib,gui,network,opengl,linguisttools_build,moc_build,qmake_build,rcc_build,uic_build
+QT4_USES=	qt:4
+QT4_USE=	QT=corelib,gui,network,opengl,linguisttools_build,moc_build,qmake_build,rcc_build,uic_build
 QT4_USE+=	XORG=x11
-QT5_USE=	QT5=core,gui,network,opengl,printsupport,widgets,buildtools_build,linguisttools_build,qmake_build
+QT5_USES=	qt:5
+QT5_USE=	QT=core,gui,network,opengl,printsupport,widgets,buildtools_build,linguisttools_build,qmake_build
 
 post-patch:
 # Use prebuilt icons, without using conversion tool
diff --git graphics/drawpile/Makefile graphics/drawpile/Makefile
index 000c2290d23d..ba1ceabeaa8b 100644
--- graphics/drawpile/Makefile
+++ graphics/drawpile/Makefile
@@ -16,10 +16,10 @@ LIB_DEPENDS=	libgif.so:graphics/giflib \
 		libminiupnpc.so:net/miniupnpc \
 		libsodium.so:security/libsodium
 
-USES=		cmake:outsource desktop-file-utils kde:5 pkgconfig shared-mime-info
+USES=		cmake:outsource desktop-file-utils kde:5 pkgconfig qt:5 shared-mime-info
 USE_GITHUB=	yes
 GH_ACCOUNT=	${PORTNAME:tl}
-USE_QT5=	core gui multimedia network sql svg widgets buildtools_build linguisttools_build qmake_build
+USE_QT=		core gui multimedia network sql svg widgets buildtools_build linguisttools_build qmake_build
 USE_KDE=	archive
 
 OPTIONS_DEFINE=	DOCS
diff --git graphics/dspdfviewer/Makefile graphics/dspdfviewer/Makefile
index e8355fb0bb16..ca37a02ed30d 100644
--- graphics/dspdfviewer/Makefile
+++ graphics/dspdfviewer/Makefile
@@ -19,8 +19,8 @@ BUILD_WRKSRC=		${WRKSRC}/build
 CONFIGURE_WRKSRC=	${WRKSRC}/build
 INSTALL_WRKSRC=		${WRKSRC}/build
 
-USES=		cmake pkgconfig
-USE_QT5=	buildtools_build core gui qmake_build linguisttools widgets xml
+USES=		cmake pkgconfig qt:5
+USE_QT=		buildtools_build core gui qmake_build linguisttools widgets xml
 CMAKE_ARGS=	-DPOPPLER_LIBRARIES=${LOCALBASE}/lib/libpoppler-qt5.so -DBuildTests=OFF
 USE_LDCONFIG=	yes
 
diff --git graphics/easypaint/Makefile graphics/easypaint/Makefile
index 88808c6e45c1..97f3b4121f3a 100644
--- graphics/easypaint/Makefile
+++ graphics/easypaint/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Easy graphic editing program
 
 LICENSE=	GPLv3
 
-USES=		qmake
-USE_QT4=	gui xml uic_build moc_build rcc_build
+USES=		qmake qt:4
+USE_QT=		gui xml uic_build moc_build rcc_build
 QPROFILE=	easyPaint
 WRKSRC=		${WRKDIR}/${QPROFILE}
 
diff --git graphics/eos-movrec/Makefile graphics/eos-movrec/Makefile
index acc7cfc084de..83181a133b65 100644
--- graphics/eos-movrec/Makefile
+++ graphics/eos-movrec/Makefile
@@ -14,9 +14,9 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libgphoto2.so:graphics/libgphoto2
 
-USES=		cmake dos2unix pkgconfig tar:bzip2
+USES=		cmake dos2unix pkgconfig qt:4 tar:bzip2
 DOS2UNIX_GLOB=	*.pro *.cpp *.h
-USE_QT4=	qmake_build moc_build rcc_build uic_build gui
+USE_QT=		qmake_build moc_build rcc_build uic_build gui
 
 INSTALLS_ICONS=	yes
 ICON_SIZES=	16x16 32x32 128x128 256x256 512x512
diff --git graphics/evolvotron/Makefile graphics/evolvotron/Makefile
index f6a6a70697c3..2ae019ea07f5 100644
--- graphics/evolvotron/Makefile
+++ graphics/evolvotron/Makefile
@@ -21,8 +21,8 @@ LIB_DEPENDS=	libboost_thread.so:devel/boost-libs
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-USES=		python qmake
-USE_QT4=	corelib gui xml moc_build
+USES=		python qmake qt:4
+USE_QT=		corelib gui xml moc_build
 QMAKE_ARGS=	VERSION_NUMBER="${PORTVERSION}"
 QMAKE_SOURCE_PATH=	${WRKSRC}/main.pro
 MAKE_JOBS_UNSAFE=	yes
diff --git graphics/fracplanet/Makefile graphics/fracplanet/Makefile
index 7f3d2a37cb34..4bb6427b5d0e 100644
--- graphics/fracplanet/Makefile
+++ graphics/fracplanet/Makefile
@@ -23,10 +23,9 @@ LIB_DEPENDS=	libboost_program_options.so:devel/boost-libs
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-USES=		gmake
+USES=		gmake qmake:no_env qt:4
 USE_GL=		glu
-USE_QT4=	corelib moc_build qmake_build gui opengl
-QT_NONSTANDARD=	yes
+USE_QT=		corelib moc_build qmake_build gui opengl
 HAS_CONFIGURE=	yes
 CONFIGURE_ENV=	QTDIR="${PREFIX}"
 CONFIGURE_ARGS=	-spec ${QMAKESPEC}
diff --git graphics/fraqtive/Makefile graphics/fraqtive/Makefile
index ba3047708c3c..75ba27a572b6 100644
--- graphics/fraqtive/Makefile
+++ graphics/fraqtive/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Draws Mandelbrot and Julia fractals
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake tar:bzip2
-USE_QT4=	corelib gui opengl xml uic_build moc_build rcc_build
+USES=		qmake qt:4 tar:bzip2
+USE_QT=		corelib gui opengl xml uic_build moc_build rcc_build
 USE_GL=		gl glu
 
 OPTIONS_DEFINE=	SSE2
diff --git graphics/gle-graphics/Makefile graphics/gle-graphics/Makefile
index 17189e9f2bc7..81f4b7d69b59 100644
--- graphics/gle-graphics/Makefile
+++ graphics/gle-graphics/Makefile
@@ -44,8 +44,8 @@ REINPLACE_FILES=	configure
 
 USE_GL=	yes
 USE_LDCONFIG=	yes
-USE_QT4=	corelib gui moc network opengl rcc qmake_build
-USES=		gmake ncurses pathfix
+USE_QT=		corelib gui moc network opengl rcc qmake_build
+USES=		gmake ncurses pathfix qt:4
 CPPFLAGS+=	-I${NCURSESINC}
 
 WRKSRC=	${WRKDIR}/${PORTNAME}-${PORTVERSION:R}${PORTVERSION:E}
diff --git graphics/gmic-qt/Makefile graphics/gmic-qt/Makefile
index 6df3aa3d41c2..4590d7e08ef4 100644
--- graphics/gmic-qt/Makefile
+++ graphics/gmic-qt/Makefile
@@ -20,8 +20,8 @@ LIB_DEPENDS=	libcurl.so:ftp/curl \
 		libfftw3.so:math/fftw3 \
 		libpng.so:graphics/png
 
-USES=		cmake:outsource compiler:c++14-lang pkgconfig
-USE_QT5=	core gui network widgets \
+USES=		cmake:outsource compiler:c++14-lang pkgconfig qt:5
+USE_QT=		core gui network widgets \
 		buildtools_build linguisttools_build qmake_build
 USE_XORG=	ice sm x11 xext
 
diff --git graphics/gnash/Makefile graphics/gnash/Makefile
index 0d2271b8d5f5..7dbf484a7b34 100644
--- graphics/gnash/Makefile
+++ graphics/gnash/Makefile
@@ -74,7 +74,7 @@ FFMPEG_DESC=	ffmpeg media handler
 GSTREAMER_DESC=	GStreamer media handler
 VAAPI_DESC=	VAAPI support (requires FFMPEG)
 
-KDE4_USES=	kde:4
+KDE4_USES=	kde:4 qmake:no_env qt:4
 CYGNAL_CONFIGURE_ENABLE=	cygnal
 
 .include <bsd.port.options.mk>
@@ -131,8 +131,7 @@ GNASH_GUIS+=	gtk
 
 .if ${PORT_OPTIONS:MKDE4}
 GNASH_GUIS+=	kde4
-USE_QT4=	moc_build
-QT_NONSTANDARD=	yes
+USE_QT=		moc_build
 USE_KDE=	kdelibs
 CONFIGURE_ARGS+=	--without-gconf
 CONFIGURE_ENV+=	KDE4_CONFIG="${KDE_PREFIX}/bin/kde4-config"
diff --git graphics/gpxsee/Makefile graphics/gpxsee/Makefile
index b693bb9a5868..0b0e70cab3d2 100644
--- graphics/gpxsee/Makefile
+++ graphics/gpxsee/Makefile
@@ -12,8 +12,8 @@ COMMENT=	GPS log file viewer and analyzer
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/licence.txt
 
-USES=		qmake:outsource desktop-file-utils shared-mime-info
-USE_QT5=	buildtools_build core gui network opengl printsupport widgets
+USES=		qmake:outsource desktop-file-utils qt:5 shared-mime-info
+USE_QT=		buildtools_build core gui network opengl printsupport widgets
 USE_GL=		gl
 
 USE_GITHUB=	yes
@@ -23,10 +23,11 @@ GH_PROJECT=	GPXSee
 OPTIONS_DEFINE=	NLS TIFF
 OPTIONS_DEFAULT=	TIFF
 OPTIONS_SUB=	yes
-NLS_USE=	QT5=linguisttools_build
-NLS_USES=	gettext-runtime
+NLS_USE=	QT=linguisttools_build
+NLS_USES=	gettext-runtime qt:5
 TIFF_DESC=	Support for TIFF
-TIFF_USE=	QT5=imageformats_run
+TIFF_USES=	qt:5
+TIFF_USE=	QT=imageformats_run
 
 do-patch:
 	@${REINPLACE_CMD} -e "s|/usr/share/gpxsee|${DATADIR}|" ${WRKSRC}/src/config.h
diff --git graphics/gwenview-kde4/Makefile graphics/gwenview-kde4/Makefile
index 68a2161c77d5..ee6167e39306 100644
--- graphics/gwenview-kde4/Makefile
+++ graphics/gwenview-kde4/Makefile
@@ -11,10 +11,10 @@ COMMENT=	Image viewer and browser for KDE 4
 LIB_DEPENDS=	libexiv2.so:graphics/exiv2 \
 		libpng.so:graphics/png
 
-USES=		cmake:outsource jpeg kde:4 pkgconfig tar:xz
+USES=		cmake:outsource jpeg kde:4 pkgconfig qt:4 tar:xz
 USE_KDE=	kactivities kdelibs baloo kfilemetadata \
 		libkdcraw libkipi libkonq automoc4 soprano
-USE_QT4=	corelib gui opengl qmake_build moc_build uic_build rcc_build
+USE_QT=		corelib gui opengl qmake_build moc_build uic_build rcc_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git graphics/gwenview/Makefile graphics/gwenview/Makefile
index 7567d202b61f..f7731c1bf224 100644
--- graphics/gwenview/Makefile
+++ graphics/gwenview/Makefile
@@ -14,14 +14,14 @@ LIB_DEPENDS=	libexiv2.so:graphics/exiv2 \
 		liblcms2.so:graphics/lcms2 \
 		libpng.so:graphics/png
 
-USES=		cmake:outsource gettext jpeg pkgconfig kde:5 tar:xz
+USES=		cmake:outsource gettext jpeg pkgconfig kde:5 qt:5 tar:xz
 USE_KDE=	activities auth baloo bookmarks codecs completion config \
 		configwidgets coreaddons ecm emoticons filemetadata i18n \
 		iconthemes init itemmodels itemviews jobwidgets \
 		kdelibs4support kimageformats kio libkdcraw libkipi \
 		notifications parts service solid sonnet textwidgets \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	concurrent core dbus gui network opengl phonon4 printsupport \
+USE_QT=		concurrent core dbus gui network opengl phonon4 printsupport \
 		svg widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	x11
diff --git graphics/ipe/Makefile graphics/ipe/Makefile
index 8ad01f9a9b15..14fe5d6c603d 100644
--- graphics/ipe/Makefile
+++ graphics/ipe/Makefile
@@ -19,9 +19,9 @@ LIB_DEPENDS=	libpng.so:graphics/png \
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}/src
 
-USES=		compiler:c++11-lib gmake jpeg lua:52 pkgconfig
+USES=		compiler:c++11-lib gmake jpeg lua:52 pkgconfig qt:5
 USE_GNOME=	cairo
-USE_QT5=	buildtools_build core gui qmake_build widgets
+USE_QT=		buildtools_build core gui qmake_build widgets
 USE_TEX=	pdftex
 MAKE_ENV=	DL_LIBS="" \
 		INSTALL_DIR="${MKDIR}" \
diff --git graphics/kamera-kde4/Makefile graphics/kamera-kde4/Makefile
index 191805beeb7b..89f2a58a8fa6 100644
--- graphics/kamera-kde4/Makefile
+++ graphics/kamera-kde4/Makefile
@@ -10,8 +10,8 @@ COMMENT=	Digital camera manager for KDE 4
 
 LIB_DEPENDS=	libgphoto2.so:graphics/libgphoto2
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git graphics/kamera/Makefile graphics/kamera/Makefile
index c2e9ee75492e..80d8c488f765 100644
--- graphics/kamera/Makefile
+++ graphics/kamera/Makefile
@@ -9,10 +9,10 @@ COMMENT=	Digital camera manager for KDE
 
 LIB_DEPENDS=	libgphoto2.so:graphics/libgphoto2
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons doctools ecm i18n \
 		kio service widgetsaddons xmlgui
-USE_QT5=	core dbus gui widgets xml \
+USE_QT=		core dbus gui widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git graphics/kcolorchooser-kde4/Makefile graphics/kcolorchooser-kde4/Makefile
index 59775eb7334d..88257cdcadfb 100644
--- graphics/kcolorchooser-kde4/Makefile
+++ graphics/kcolorchooser-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	graphics kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE 4 application to select colors from the screen or from a palette
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git graphics/kcolorchooser/Makefile graphics/kcolorchooser/Makefile
index 3ae1dd954f19..f1d40b042a92 100644
--- graphics/kcolorchooser/Makefile
+++ graphics/kcolorchooser/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	graphics kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE application to select colors from the screen or from a palette
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons ecm i18n \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui widgets xml \
+USE_QT=		core dbus gui widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git graphics/kcoloredit/Makefile graphics/kcoloredit/Makefile
index 596972c00692..a2c42eaf3770 100644
--- graphics/kcoloredit/Makefile
+++ graphics/kcoloredit/Makefile
@@ -11,9 +11,9 @@ DIST_SUBDIR=	KDE/extragear
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Palette files editor for KDE
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib qmake_build moc_build rcc_build uic_build
+USE_QT=		corelib qmake_build moc_build rcc_build uic_build
 
 APP_VER=	2.0.0
 EXTRA_VER=	4.4.0
diff --git graphics/kdegraphics-mobipocket-kde4/Makefile graphics/kdegraphics-mobipocket-kde4/Makefile
index 8b48078740bc..f65ed536db32 100644
--- graphics/kdegraphics-mobipocket-kde4/Makefile
+++ graphics/kdegraphics-mobipocket-kde4/Makefile
@@ -9,9 +9,9 @@ PKGNAMESUFFIX=	-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Mobipocket plugins for Strigi indexing and thumbnails
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4 strigi
-USE_QT4=	corelib gui qmake_build moc_build uic_build rcc_build
+USE_QT=		corelib gui qmake_build moc_build uic_build rcc_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git graphics/kdegraphics-mobipocket/Makefile graphics/kdegraphics-mobipocket/Makefile
index af9f98b702bc..c70b275f9899 100644
--- graphics/kdegraphics-mobipocket/Makefile
+++ graphics/kdegraphics-mobipocket/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	graphics kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Mobipocket plugins for Strigi indexing and thumbnails
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	completion config coreaddons ecm jobwidgets kio service \
 		widgetsaddons
-USE_QT5=	core gui network widgets \
+USE_QT=		core gui network widgets \
 		buildtools_build qmake_build
 
 USE_LDCONFIG=	yes
diff --git graphics/kdegraphics-strigi-analyzer-kde4/Makefile graphics/kdegraphics-strigi-analyzer-kde4/Makefile
index 9e0aeb697754..3694498e97cf 100644
--- graphics/kdegraphics-strigi-analyzer-kde4/Makefile
+++ graphics/kdegraphics-strigi-analyzer-kde4/Makefile
@@ -11,8 +11,8 @@ COMMENT=	Strigi analyzers for various graphics file formats
 
 LIB_DEPENDS=	libtiff.so:graphics/tiff
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4 strigi
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git graphics/kdegraphics-svgpart-kde4/Makefile graphics/kdegraphics-svgpart-kde4/Makefile
index 900f3e315da1..f12dc11f88e8 100644
--- graphics/kdegraphics-svgpart-kde4/Makefile
+++ graphics/kdegraphics-svgpart-kde4/Makefile
@@ -10,8 +10,8 @@ PKGNAMESUFFIX=	-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	SVG KPart
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git graphics/kdegraphics-svgpart/Makefile graphics/kdegraphics-svgpart/Makefile
index 83f6f81a32f1..55fce785bf1f 100644
--- graphics/kdegraphics-svgpart/Makefile
+++ graphics/kdegraphics-svgpart/Makefile
@@ -8,11 +8,11 @@ PKGNAMEPREFIX=	kdegraphics-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	SVG KPart
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons ecm \
 		i18n jobwidgets kio parts service sonnet textwidgets \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network svg widgets xml \
+USE_QT=		core dbus gui network svg widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git graphics/kdegraphics-thumbnailers-kde4/Makefile graphics/kdegraphics-thumbnailers-kde4/Makefile
index 3d8c0335a12a..22530ac51706 100644
--- graphics/kdegraphics-thumbnailers-kde4/Makefile
+++ graphics/kdegraphics-thumbnailers-kde4/Makefile
@@ -9,8 +9,8 @@ PKGNAMESUFFIX=	-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Thumbnailers for various graphics file formats
 
-USES=		cmake:outsource kde:4 pkgconfig tar:xz
+USES=		cmake:outsource kde:4 pkgconfig qt:4 tar:xz
 USE_KDE=	kdelibs libkdcraw libkexiv2 automoc4
-USE_QT4=	gui qmake_build moc_build uic_build rcc_build
+USE_QT=		gui qmake_build moc_build uic_build rcc_build
 
 .include <bsd.port.mk>
diff --git graphics/kdegraphics-thumbnailers/Makefile graphics/kdegraphics-thumbnailers/Makefile
index 0b256da6628e..5623ff37c65d 100644
--- graphics/kdegraphics-thumbnailers/Makefile
+++ graphics/kdegraphics-thumbnailers/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	graphics kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Thumbnailers for various graphics file formats
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	completion config coreaddons ecm jobwidgets libkdcraw \
 		libkexiv2 kio service widgetsaddons
-USE_QT5=	core gui network widgets \
+USE_QT=		core gui network widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git graphics/kdegraphics/Makefile graphics/kdegraphics/Makefile
index adebf78db232..ef46eb74fdb6 100644
--- graphics/kdegraphics/Makefile
+++ graphics/kdegraphics/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	graphics kde
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Graphics utilities for KDE (meta port)
 
-USES=		kde:5 metaport
-USE_QT5=	#
+USES=		kde:5 metaport qt:5
+USE_QT=		#
 
 OPTIONS_DEFINE=	GPHOTO \
 		GWENVIEW \
diff --git graphics/kdiagram/Makefile graphics/kdiagram/Makefile
index 0d91f56e42b4..519d79e9c2eb 100644
--- graphics/kdiagram/Makefile
+++ graphics/kdiagram/Makefile
@@ -12,9 +12,9 @@ COMMENT=	Library to create business diagrams
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENSE.GPL.txt
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	core gui linguisttools printsupport sql svg widgets \
+USE_QT=		core gui linguisttools printsupport sql svg widgets \
 		buildtools_build qmake_build
 
 PLIST_SUB=	SHLIB_VER="${PORTVERSION}" \
diff --git graphics/kf5-kimageformats/Makefile graphics/kf5-kimageformats/Makefile
index 4ccb69c7c6f2..e5bd4abbc5b0 100644
--- graphics/kf5-kimageformats/Makefile
+++ graphics/kf5-kimageformats/Makefile
@@ -9,9 +9,9 @@ COMMENT=	KF5 library providing support for additional image formats
 
 LIB_DEPENDS=	libHalf.so:graphics/ilmbase
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	archive ecm 
-USE_QT5=	buildtools_build core gui printsupport qmake_build widgets
+USE_QT=		buildtools_build core gui printsupport qmake_build widgets
 
 OPTIONS_DEFINE=	OPENEXR
 OPTIONS_DEFAULT=	OPENEXR
diff --git graphics/kf5-kplotting/Makefile graphics/kf5-kplotting/Makefile
index 937b82f95ad3..b190ecb4b87c 100644
--- graphics/kf5-kplotting/Makefile
+++ graphics/kf5-kplotting/Makefile
@@ -7,8 +7,8 @@ CATEGORIES=	graphics kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 lightweight plotting framework
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core gui qmake_build testlib widgets
+USE_QT=		buildtools_build core gui qmake_build testlib widgets
 
 .include <bsd.port.mk>
diff --git graphics/kf5-prison/Makefile graphics/kf5-prison/Makefile
index 100ecd08bcc3..e03cfce0b738 100644
--- graphics/kf5-prison/Makefile
+++ graphics/kf5-prison/Makefile
@@ -10,8 +10,8 @@ COMMENT=	API to produce barcodes
 LIB_DEPENDS=	libdmtx.so:graphics/libdmtx \
 		libqrencode.so:graphics/libqrencode
 
-USES=		cmake:outsource compiler:c++11-lang kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lang kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core gui qmake_build testlib widgets
+USE_QT=		buildtools_build core gui qmake_build testlib widgets
 
 .include <bsd.port.mk>
diff --git graphics/kgraphviewer/Makefile graphics/kgraphviewer/Makefile
index d26bd2a50bfb..6e748a97b538 100644
--- graphics/kgraphviewer/Makefile
+++ graphics/kgraphviewer/Makefile
@@ -14,12 +14,12 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libgvc.so:graphics/graphviz
 
-USES=		cmake:outsource desktop-file-utils kde:5 tar:xz pkgconfig
+USES=		cmake:outsource desktop-file-utils kde:5 qt:5 tar:xz pkgconfig
 USE_KDE=	auth codecs completion config configwidgets \
 		coreaddons i18n iconthemes jobwidgets kio parts service \
 		sonnet textwidgets widgetsaddons xmlgui \
 		ecm_build
-USE_QT5=	core dbus gui network printsupport svg widgets xml \
+USE_QT=		core dbus gui network printsupport svg widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git graphics/kiconedit/Makefile graphics/kiconedit/Makefile
index 9c319e5a5327..0e1559512cf0 100644
--- graphics/kiconedit/Makefile
+++ graphics/kiconedit/Makefile
@@ -10,9 +10,9 @@ DIST_SUBDIR=	KDE/extragear
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE icon editor
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib qmake_build moc_build rcc_build uic_build
+USE_QT=		corelib qmake_build moc_build rcc_build uic_build
 
 EXTRA_VER=	4.4.0
 
diff --git graphics/kimagemapeditor/Makefile graphics/kimagemapeditor/Makefile
index 0eefa6a22b26..d7253818125d 100644
--- graphics/kimagemapeditor/Makefile
+++ graphics/kimagemapeditor/Makefile
@@ -8,13 +8,13 @@ PKGNAMESUFFIX=	# hack: uses kde:4 but we don't want the pkgname suffix
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE generator of HTML image maps
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash guiaddons i18n iconthemes itemviews \
 		jobwidgets js kdelibs4support khtml kio notifications \
 		parts service solid sonnet textwidgets unitconversion \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network printsupport widgets xml \
+USE_QT=		core dbus gui network printsupport widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git graphics/kipiplugins/Makefile graphics/kipiplugins/Makefile
index 4f00029be292..fe69797a9b87 100644
--- graphics/kipiplugins/Makefile
+++ graphics/kipiplugins/Makefile
@@ -12,11 +12,11 @@ COMMENT=	Plugins for digikam
 LIB_DEPENDS=	libdigikamcore.so:graphics/digikam
 
 USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig \
-		tar:xz
+		qt:5 tar:xz
 USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		coreaddons ecm i18n itemviews jobwidgets kio libkipi service \
 		solid widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network printsupport widgets xml xmlpatterns \
+USE_QT=		core dbus gui network printsupport widgets xml xmlpatterns \
 		buildtools_build qmake_build
 
 CMAKE_ON=	DIGIKAMSC_COMPILE_KIPIPLUGINS
diff --git graphics/klatexformula/Makefile graphics/klatexformula/Makefile
index 345e02cb6742..8e0c72695f6b 100644
--- graphics/klatexformula/Makefile
+++ graphics/klatexformula/Makefile
@@ -14,8 +14,8 @@ LICENSE=	GPLv2
 BUILD_DEPENDS=	help2man:misc/help2man
 
 USES=		cmake:outsource desktop-file-utils ghostscript:run \
-		shared-mime-info localbase
-USE_QT4=	gui xml dbus designer_build linguisttools_build \
+		qt:4 shared-mime-info localbase
+USE_QT=		gui xml dbus designer_build linguisttools_build \
 		qmake_build moc_build rcc_build uic_build
 USE_TEX=	latex dvipsk
 CMAKE_ARGS=	-DQT_QMAKE_EXECUTABLE_FINDQT=${QMAKE} \
diff --git graphics/kolourpaint-kde4/Makefile graphics/kolourpaint-kde4/Makefile
index a0bdf87305df..6bd8994e534f 100644
--- graphics/kolourpaint-kde4/Makefile
+++ graphics/kolourpaint-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	graphics kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE 4 paint program
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4 qimageblitz
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git graphics/kolourpaint/Makefile graphics/kolourpaint/Makefile
index 6761e4ade207..2a0bd91bb96a 100644
--- graphics/kolourpaint/Makefile
+++ graphics/kolourpaint/Makefile
@@ -7,13 +7,13 @@ CATEGORIES=	graphics kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE paint program
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash ecm emoticons guiaddons i18n iconthemes init \
 		itemmodels itemviews jobwidgets kdelibs4support kio libkexiv2 \
 		libksane notifications parts service solid sonnet textwidgets \
 		unitconversion widgetsaddons windowsystem xmlgui
-USE_QT5=	dbus  core gui network printsupport widgets xml \
+USE_QT=		dbus  core gui network printsupport widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git graphics/kphotoalbum-kde4/Makefile graphics/kphotoalbum-kde4/Makefile
index e4284d5d6618..f92cdc65c72e 100644
--- graphics/kphotoalbum-kde4/Makefile
+++ graphics/kphotoalbum-kde4/Makefile
@@ -16,9 +16,9 @@ LIB_DEPENDS=	libexiv2.so:graphics/exiv2
 
 SHEBANG_FILES=	script/open-raw.pl script/kpa-backup.sh
 
-USES=		cmake:outsource jpeg kde:4 pkgconfig shebangfix tar:bzip2
+USES=		cmake:outsource jpeg kde:4 pkgconfig qt:4 shebangfix tar:bzip2
 USE_KDE=	kdelibs libkdcraw libkipi automoc4
-USE_QT4=	phonon sql \
+USE_QT=		phonon sql \
 		qmake_build moc_build rcc_build uic_build
 
 OPTIONS_DEFINE=	MARBLE NLS
diff --git graphics/kphotoalbum/Makefile graphics/kphotoalbum/Makefile
index 6c9deecd49af..0006749a5a48 100644
--- graphics/kphotoalbum/Makefile
+++ graphics/kphotoalbum/Makefile
@@ -14,12 +14,12 @@ LIB_DEPENDS=	libexiv2.so:graphics/exiv2 \
 		libKF5KGeoMap.so:astro/libkgeomap \
 		libKF5Kipi.so:graphics/libkipi
 
-USES=		cmake:outsource jpeg kde:5 pkgconfig shebangfix tar:xz
+USES=		cmake:outsource jpeg kde:5 pkgconfig qt:5 shebangfix tar:xz
 USE_KDE=	archive auth codecs completion config \
 		configwidgets coreaddons ecm i18n \
 		iconthemes jobwidgets kio marble service \
 		sonnet textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus gui network phonon4 sql webkit \
+USE_QT=		core dbus gui network phonon4 sql webkit \
 		widgets xml \
 		buildtools_build qmake_build
 SHEBANG_FILES=	scripts/open-raw.pl scripts/kpa-backup.sh
diff --git graphics/kpovmodeler/Makefile graphics/kpovmodeler/Makefile
index b8e65f39ec4b..7208a1ca64ee 100644
--- graphics/kpovmodeler/Makefile
+++ graphics/kpovmodeler/Makefile
@@ -13,10 +13,10 @@ COMMENT=	KDE editor/frontend for Povray
 
 RUN_DEPENDS=	povray:graphics/povray-meta
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_GL=		glu
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib opengl qmake_build moc_build rcc_build uic_build
+USE_QT=		corelib opengl qmake_build moc_build rcc_build uic_build
 
 APP_VER=	1.1.3
 EXTRA_VER=	4.3.1
diff --git graphics/kqtquickcharts-kde4/Makefile graphics/kqtquickcharts-kde4/Makefile
index 53bc75a35621..6dc695b6052b 100644
--- graphics/kqtquickcharts-kde4/Makefile
+++ graphics/kqtquickcharts-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	graphics kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	QtQuick plugin to render interactive charts
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git graphics/krita/Makefile graphics/krita/Makefile
index 8d66b700f2d8..851bc7772197 100644
--- graphics/krita/Makefile
+++ graphics/krita/Makefile
@@ -31,10 +31,11 @@ LIB_DEPENDS=	libImath.so:graphics/ilmbase \
 		libxcb-util.so:x11/xcb-util
 
 USES=		cmake:outsource compiler:c++11-lib desktop-file-utils \
-		eigen:3 gettext jpeg kde:5 pkgconfig python:3.4+ shared-mime-info
+		eigen:3 gettext jpeg kde:5 pkgconfig python:3.4+ qt:5 \
+		shared-mime-info
 USE_KDE=	archive completion config coreaddons crash guiaddons i18n \
 		itemmodels itemviews kio service widgetsaddons windowsystem
-USE_QT5=	concurrent core dbus gui multimedia network printsupport \
+USE_QT=		concurrent core dbus gui multimedia network printsupport \
 		qml quick svg testlib widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	ice sm xcb xext xi
diff --git graphics/ksaneplugin-kde4/Makefile graphics/ksaneplugin-kde4/Makefile
index f11b95265946..ee1a6cbdc4ec 100644
--- graphics/ksaneplugin-kde4/Makefile
+++ graphics/ksaneplugin-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	graphics kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE 4 plugin for scanning through libksane
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libksane automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git graphics/ksnapshot-kde4/Makefile graphics/ksnapshot-kde4/Makefile
index 01a0a9e93a5c..2abefbcac607 100644
--- graphics/ksnapshot-kde4/Makefile
+++ graphics/ksnapshot-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	graphics kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE 4 screen capture program
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkipi automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_XORG=	x11 xext xfixes
 
 .include <bsd.port.mk>
diff --git graphics/libQGLViewer/Makefile graphics/libQGLViewer/Makefile
index 33937a1e7791..ca357ef3c854 100644
--- graphics/libQGLViewer/Makefile
+++ graphics/libQGLViewer/Makefile
@@ -12,9 +12,9 @@ COMMENT=	C++ library based on Qt5 that eases the creation of OpenGL 3D viewers
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENCE
 
-USES=		qmake
+USES=		qmake qt:5
 USE_GL=		gl glu
-USE_QT5=	core designer gui opengl widgets xml buildtools_build
+USE_QT=		core designer gui opengl widgets xml buildtools_build
 USE_LDCONFIG=	yes
 PLIST_SUB=	SHL3=${DISTVERSION} SHL2=${DISTVERSION:C/\.[0-9]$//} SHL1=${DISTVERSION:C/\.[0-9]\.[0-9]$//}
 
diff --git graphics/libkdcraw-kde4/Makefile graphics/libkdcraw-kde4/Makefile
index 16bb608e8645..e5d6edd21d68 100644
--- graphics/libkdcraw-kde4/Makefile
+++ graphics/libkdcraw-kde4/Makefile
@@ -16,9 +16,9 @@ LIB_DEPENDS=	liblcms.so:graphics/lcms \
 CMAKE_ARGS+=	-DWITH_OpenMP:BOOL=False \
 		-DENABLE_RAWSPEED=True
 
-USES=		cmake:outsource jpeg kde:4 pkgconfig tar:xz
+USES=		cmake:outsource jpeg kde:4 pkgconfig qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	corelib gui moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib gui moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 pre-configure:
diff --git graphics/libkdcraw/Makefile graphics/libkdcraw/Makefile
index 962b73859fa4..399e23695eb5 100644
--- graphics/libkdcraw/Makefile
+++ graphics/libkdcraw/Makefile
@@ -15,9 +15,9 @@ LIB_DEPENDS=	libjasper.so:graphics/jasper \
 CMAKE_ARGS+=	-DWITH_OpenMP:BOOL=False \
 		-DENABLE_RAWSPEED=True
 
-USES=		cmake:outsource compiler:c++11-lang jpeg kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lang jpeg kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	core gui \
+USE_QT=		core gui \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git graphics/libkexiv2-kde4/Makefile graphics/libkexiv2-kde4/Makefile
index 14a2bec07be7..7d92677fbfa8 100644
--- graphics/libkexiv2-kde4/Makefile
+++ graphics/libkexiv2-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	Exiv2 library interface for KDE
 
 LIB_DEPENDS=	libexiv2.so:graphics/exiv2
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	corelib gui xml \
+USE_QT=		corelib gui xml \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git graphics/libkexiv2/Makefile graphics/libkexiv2/Makefile
index 69d734aa46e2..15f2f7934230 100644
--- graphics/libkexiv2/Makefile
+++ graphics/libkexiv2/Makefile
@@ -9,9 +9,9 @@ COMMENT=	Exiv2 library interface for KDE
 
 LIB_DEPENDS=	libexiv2.so:graphics/exiv2
 
-USES=		cmake:outsource compiler:c++11-lang kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lang kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	core gui \
+USE_QT=		core gui \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git graphics/libkipi-kde4/Makefile graphics/libkipi-kde4/Makefile
index bda1221f0b43..d4453303fe38 100644
--- graphics/libkipi-kde4/Makefile
+++ graphics/libkipi-kde4/Makefile
@@ -9,9 +9,9 @@ CATEGORIES=	graphics kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE Image Plugin Interface
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	gui moc_build qmake_build rcc_build uic_build
+USE_QT=		gui moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 pre-configure:
diff --git graphics/libkipi/Makefile graphics/libkipi/Makefile
index 7135e34f1499..083e69570f9a 100644
--- graphics/libkipi/Makefile
+++ graphics/libkipi/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	graphics kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE Image Plugin Interface
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons ecm i18n \
 		libkdcraw libkexiv2 service widgetsaddons xmlgui
-USE_QT5=	core dbus gui widgets xml \
+USE_QT=		core dbus gui widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git graphics/libksane-kde4/Makefile graphics/libksane-kde4/Makefile
index 632fa4ec8bf8..1e0075749e2d 100644
--- graphics/libksane-kde4/Makefile
+++ graphics/libksane-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	SANE library interface for KDE
 
 LIB_DEPENDS=	libsane.so:graphics/sane-backends
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 pre-configure:
diff --git graphics/libksane/Makefile graphics/libksane/Makefile
index 88f96785dbd2..8badd1858e76 100644
--- graphics/libksane/Makefile
+++ graphics/libksane/Makefile
@@ -9,9 +9,9 @@ COMMENT=	SANE library interface for KDE
 
 LIB_DEPENDS=	libsane.so:graphics/sane-backends
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	config ecm i18n sonnet textwidgets wallet widgetsaddons
-USE_QT5=	core gui testlib widgets \
+USE_QT=		core gui testlib widgets \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git graphics/libkscreen/Makefile graphics/libkscreen/Makefile
index c959cdf6ceae..e5b4ad3cb6cb 100644
--- graphics/libkscreen/Makefile
+++ graphics/libkscreen/Makefile
@@ -15,9 +15,9 @@ LIB_DEPENDS=	libqjson.so:devel/qjson@qt4 \
 		libxcb-image.so:x11/xcb-util-image \
 		libxcb-render-util.so:x11/xcb-util-renderutil
 
-USES=		cmake:outsource kde:4 pkgconfig tar:xz
+USES=		cmake:outsource kde:4 pkgconfig qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib dbus gui script \
+USE_QT=		corelib dbus gui script \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git graphics/lprof-devel/Makefile graphics/lprof-devel/Makefile
index b977def6a534..5bd7fb3ba1eb 100644
--- graphics/lprof-devel/Makefile
+++ graphics/lprof-devel/Makefile
@@ -16,9 +16,9 @@ LIB_DEPENDS=	liblcms.so:graphics/lcms \
 		libtiff.so:graphics/tiff \
 		libvigraimpex.so:graphics/vigra
 
-USES=		cmake desktop-file-utils jpeg tar:bzip2
+USES=		cmake desktop-file-utils jpeg qt:4 tar:bzip2
 USE_XORG=	x11 xext sm ice xxf86vm
-USE_QT4=	corelib gui qt3support svg assistantclient \
+USE_QT=		corelib gui qt3support svg assistantclient \
 		linguisttools_build qmake_build moc_build uic_build rcc_build
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
diff --git graphics/luminance-qt5/Makefile graphics/luminance-qt5/Makefile
index 290a6e1f510c..672f7b4dc5ed 100644
--- graphics/luminance-qt5/Makefile
+++ graphics/luminance-qt5/Makefile
@@ -22,8 +22,8 @@ LIB_DEPENDS=	libfftw3f.so:math/fftw3-float \
 		libraw_r.so:graphics/libraw \
 		libboost_system.so:devel/boost-libs
 
-USES=		cmake:outsource jpeg pkgconfig tar:bzip2
-USE_QT5=	concurrent gui printsupport sql webkit xml \
+USES=		cmake:outsource jpeg pkgconfig qt:5 tar:bzip2
+USE_QT=		concurrent gui printsupport sql webkit xml \
 		buildtools_build linguist_build qmake_build \
 		imageformats_run
 INSTALLS_ICONS=	yes
diff --git graphics/luminance/Makefile graphics/luminance/Makefile
index 7f03642a43fa..5f8173ef56e3 100644
--- graphics/luminance/Makefile
+++ graphics/luminance/Makefile
@@ -23,8 +23,8 @@ LIB_DEPENDS=	libfftw3f.so:math/fftw3-float \
 
 BROKEN_powerpc64=	fails to compile: cc1plus: unrecognized command line option "-msse2"
 
-USES=		cmake jpeg tar:bzip2
-USE_QT4=	gui sql webkit xml linguist_build moc_build qmake_build \
+USES=		cmake jpeg qt:4 tar:bzip2
+USE_QT=		gui sql webkit xml linguist_build moc_build qmake_build \
 		rcc_build uic_build imageformats_run
 INSTALLS_ICONS=	yes
 
diff --git graphics/luxrender/Makefile graphics/luxrender/Makefile
index 491ac34f2f60..7c36d42998bd 100644
--- graphics/luxrender/Makefile
+++ graphics/luxrender/Makefile
@@ -53,7 +53,8 @@ FREEIMAGE_CMAKE_ON=	-DLUX_USE_FREEIMAGE:BOOL=ON
 FREEIMAGE_LIB_DEPENDS=	libfreeimage.so:graphics/freeimage
 
 X11_DESC=	Build GUI executable (requires Qt 4)
-X11_USE=	QT4=moc_build,qmake_build,rcc_build,uic_build,corelib,gui
+X11_USES=	qt:4
+X11_USE=	QT=moc_build,qmake_build,rcc_build,uic_build,corelib,gui
 X11_PLIST_FILES=	bin/luxrender
 
 post-extract:
diff --git graphics/lximage-qt/Makefile graphics/lximage-qt/Makefile
index e4261dc0a901..009e6c181584 100644
--- graphics/lximage-qt/Makefile
+++ graphics/lximage-qt/Makefile
@@ -16,9 +16,9 @@ LIB_DEPENDS=	libexif.so:graphics/libexif \
 	libfm.so:x11/libfm
 
 USES=	cmake:outsource compiler:c++11-lib desktop-file-utils gettext-runtime \
-	localbase:ldflags lxqt pkgconfig tar:xz
+	localbase:ldflags lxqt pkgconfig qt:5 tar:xz
 USE_GNOME=	glib20
-USE_QT5=	buildtools_build qmake_build core dbus gui linguisttools \
+USE_QT=		buildtools_build qmake_build core dbus gui linguisttools \
 	network printsupport svg widgets x11extras
 USE_LXQT=	buildtools libfmqt
 USE_XORG=	ice sm x11 xcb xext xfixes
diff --git graphics/lximageqt-l10n/Makefile graphics/lximageqt-l10n/Makefile
index 947274c1dff0..ac712c4153b9 100644
--- graphics/lximageqt-l10n/Makefile
+++ graphics/lximageqt-l10n/Makefile
@@ -17,8 +17,8 @@ DISTINFO_FILE=	${MASTERDIR}/distinfo
 DESCR=	${MASTERDIR}/pkg-descr
 PLIST=	${.CURDIR}/pkg-plist
 
-USES=	cmake:outsource lxqt pkgconfig tar:xz
-USE_QT5=	buildtools_build qmake_build linguisttools
+USES=	cmake:outsource lxqt pkgconfig qt:5 tar:xz
+USE_QT=		buildtools_build qmake_build linguisttools
 USE_LXQT=	buildtools
 
 CMAKE_ARGS+=	-DWITH_COMPTON_CONF:BOOL=OFF \
diff --git graphics/meshviewer/Makefile graphics/meshviewer/Makefile
index 24d13fd50a53..85c85bfdec4f 100644
--- graphics/meshviewer/Makefile
+++ graphics/meshviewer/Makefile
@@ -16,9 +16,9 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 WRKSRC=		${WRKDIR}/mview-${PORTVERSION}
 
-USES=		gmake pkgconfig
+USES=		gmake pkgconfig qt:4
 USE_GL=		glu
-USE_QT4=	corelib gui opengl moc_build
+USE_QT=		corelib gui opengl moc_build
 CXXFLAGS+=	-I. -Imesh -Imathvector \
 		`pkg-config --cflags QtOpenGL glu`
 LDFLAGS+=	-lpthread `pkg-config --libs QtOpenGL glu`
diff --git graphics/mitsuba/Makefile graphics/mitsuba/Makefile
index 64da413ad453..aa86975adc03 100644
--- graphics/mitsuba/Makefile
+++ graphics/mitsuba/Makefile
@@ -26,9 +26,9 @@ LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
 ONLY_FOR_ARCHS=	i386 amd64
 ONLY_FOR_ARCHS_REASON=	uses SSE instructions
 
-USES=		cmake eigen:3 jpeg tar:bzip2
+USES=		cmake eigen:3 jpeg qt:4 tar:bzip2
 USE_GL=		glew
-USE_QT4=	moc_build qmake_build rcc_build uic_build \
+USE_QT=		moc_build qmake_build rcc_build uic_build \
 		gui opengl network xml xmlpatterns
 
 CMAKE_ARGS=	-DMTS_SIMPLE_PATHS:BOOL=OFF -DBUILD_PYTHON:BOOL=OFF \
diff --git graphics/natron/Makefile graphics/natron/Makefile
index c98e9ad6aa60..5b8787b25e91 100644
--- graphics/natron/Makefile
+++ graphics/natron/Makefile
@@ -24,7 +24,7 @@ LIB_DEPENDS=	libcairo.so:graphics/cairo \
 				libpyside-${PYTHON_VERSION}.so:devel/pyside \
 				libfreetype.so:print/freetype2
 
-USES=	pkgconfig python qmake shebangfix desktop-file-utils shared-mime-info \
+USES=	pkgconfig python qmake qt:4 shebangfix desktop-file-utils shared-mime-info \
 		gettext-runtime desktop-file-utils
 USE_GITHUB=	yes
 GH_ACCOUNT=	NatronGitHub
@@ -37,7 +37,7 @@ GH_TUPLE=	NatronGitHub:openfx:a85dc34:openfx/libs/OpenFX \
 			NatronGitHub:tinydir:3aae922:tinydir/libs/SequenceParsing/tinydir \
 			NatronGitHub:OpenColorIO-Configs:Natron-v3.0:OpenColorIO_Configs/OpenColorIO-Configs
 
-USE_QT4=	corelib gui moc_build qmake_build rcc_build uic_build network opengl
+USE_QT=		corelib gui moc_build qmake_build rcc_build uic_build network opengl
 USE_XORG=	x11 pixman
 USE_GL=		gl
 
diff --git graphics/nomacs/Makefile graphics/nomacs/Makefile
index 6ebbfd0f9f2d..a3e72619ffc4 100644
--- graphics/nomacs/Makefile
+++ graphics/nomacs/Makefile
@@ -17,8 +17,8 @@ LIB_DEPENDS=	libexiv2.so:graphics/exiv2 \
 		liblcms2.so:graphics/lcms2 \
 		libtbb.so:devel/tbb
 
-USES=		cmake desktop-file-utils dos2unix pkgconfig tar:bzip2
-USE_QT5=        concurrent core gui network printsupport svg widgets \
+USES=		cmake desktop-file-utils dos2unix pkgconfig qt:5 tar:bzip2
+USE_QT=	        concurrent core gui network printsupport svg widgets \
 		buildtools_build linguisttools_build qmake_build
 
 DOS2UNIX_REGEX=	.*\.(cpp|h|txt)
diff --git graphics/okular-kde4/Makefile graphics/okular-kde4/Makefile
index 0c568f86ae3e..df2bf1ea3631 100644
--- graphics/okular-kde4/Makefile
+++ graphics/okular-kde4/Makefile
@@ -19,10 +19,10 @@ LIB_DEPENDS=	libdjvulibre.so:graphics/djvulibre \
 		libepub.so:textproc/ebook-tools \
 		libqmobipocket.so:graphics/kdegraphics-mobipocket-kde4
 
-USES=		cmake:outsource jpeg kde:4 pkgconfig tar:xz
+USES=		cmake:outsource jpeg kde:4 pkgconfig qt:4 tar:xz
 USE_KDE=	kdelibs automoc4 qimageblitz kactivities \
 		libkexiv2
-USE_QT4=	corelib declarative gui opengl xml \
+USE_QT=		corelib declarative gui opengl xml \
 		qmake_build moc_build uic_build rcc_build
 USE_LDCONFIG=	yes
 
diff --git graphics/okular/Makefile graphics/okular/Makefile
index fae686dbf221..006b5d35f6c1 100644
--- graphics/okular/Makefile
+++ graphics/okular/Makefile
@@ -24,14 +24,14 @@ LIB_DEPENDS=	libchm.so:misc/chmlib \
 		libzip.so:archivers/libzip
 
 USES=		cmake:outsource compiler:c++11-lib desktop-file-utils \
-		gettext jpeg kde:5 pkgconfig tar:xz
+		gettext jpeg kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	activities archive auth bookmarks codecs completion config \
 		configwidgets coreaddons dbusaddons ecm emoticons i18n \
 		iconthemes init itemmodels itemviews jobwidgets js \
 		kdelibs4support khtml kio libkexiv2 parts pty \
 		service solid sonnet textwidgets threadweaver wallet \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network phonon4 printsupport qml quick speech \
+USE_QT=		core dbus gui network phonon4 printsupport qml quick speech \
 		svg widgets xml \
 		buildtools_build qmake_build
 
diff --git graphics/opencsg/Makefile graphics/opencsg/Makefile
index edf437f83d27..8dc23bdae7e8 100644
--- graphics/opencsg/Makefile
+++ graphics/opencsg/Makefile
@@ -14,9 +14,9 @@ COMMENT=	Constructive Solid Geometry rendering library
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/../license.txt
 
-USES=		compiler:c++11-lang qmake
+USES=		compiler:c++11-lang qmake qt:4
 USE_GL=		gl glew
-USE_QT4=	qmake_build
+USE_QT=		qmake_build
 WRKSRC=		${WRKDIR}/${DISTNAME}/src
 PLIST_SUB=      PORTVERSION=${PORTVERSION}
 
diff --git graphics/openorienteering-mapper/Makefile graphics/openorienteering-mapper/Makefile
index 16b356924d5d..4933077dc916 100644
--- graphics/openorienteering-mapper/Makefile
+++ graphics/openorienteering-mapper/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libpolyclipping.so:graphics/polyclipping \
 		libproj.so:graphics/proj
 
 USES=		cmake:outsource,noninja compiler:c++14-lang \
-		desktop-file-utils gmake shared-mime-info
-USE_QT5=	buildtools_build help qmake_build core gui \
+		desktop-file-utils gmake qt:5 shared-mime-info
+USE_QT=		buildtools_build help qmake_build core gui \
 		location network printsupport sensors widgets
 USE_GITHUB=	yes
 GH_ACCOUNT=	OpenOrienteering
@@ -32,19 +32,22 @@ OPTIONS_DEFAULT=	GDAL
 OPTIONS_SUB=	yes
 DOCS_CMAKE_BOOL=	Mapper_WITH_DOCS
 DOCS_BUILD_DEPENDS=	doxygen:devel/doxygen
-DOCS_USE=	QT5=assistant_run
+DOCS_USES=	qt:5
+DOCS_USE=	QT=assistant_run
 EXAMPLES_CMAKE_BOOL=	Mapper_WITH_EXAMPLES
 GDAL_DESC=	Use the GDAL library
 GDAL_CMAKE_BOOL=	Mapper_USE_GDAL
 GDAL_LIB_DEPENDS=	libgdal.so:graphics/gdal
 NLS_CMAKE_BOOL=	Mapper_WITH_NLS
 NLS_BUILD_DEPENDS=	gsed:textproc/gsed
-NLS_USE=	QT5=linguisttools_build
-NLS_USES=	gettext-runtime
+NLS_USE=	QT=linguisttools_build
+NLS_USES=	gettext-runtime qt:5
 TEST_CMAKE_BOOL=	Mapper_WITH_TEST
-TEST_USE=	QT5=testlib_build
+TEST_USES=	qt:5
+TEST_USE=	QT=testlib_build
 TEST_TEST_TARGET=	test
 TIFF_DESC=	Support for TIFF
-TIFF_USE=	QT5=imageformats
+TIFF_USES=	qt:5
+TIFF_USE=	QT=imageformats
 
 .include <bsd.port.mk>
diff --git graphics/oyranos/Makefile graphics/oyranos/Makefile
index 22b4bd23a142..350c64fa346f 100644
--- graphics/oyranos/Makefile
+++ graphics/oyranos/Makefile
@@ -30,11 +30,11 @@ LIB_DEPENDS=	libraw.so:graphics/libraw \
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	oyranos-cms
-USES=		cmake compiler:c++11-lib desktop-file-utils gettext iconv jpeg pkgconfig
+USES=		cmake compiler:c++11-lib desktop-file-utils gettext iconv jpeg pkgconfig qt:4
 USE_GL=		gl
 USE_LDCONFIG=	yes
 USE_GNOME=	libxml2
-USE_QT4=	corelib gui moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib gui moc_build qmake_build rcc_build uic_build
 USE_XORG=	ice sm x11 xcursor xext xfixes xinerama xrandr xft xxf86vm
 CMAKE_ARGS+=	-DXDG_CONFIG_DIR=${PREFIX}/etc/xdg
 LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
diff --git graphics/pencil/Makefile graphics/pencil/Makefile
index 547144161afe..d9106fdc65fb 100644
--- graphics/pencil/Makefile
+++ graphics/pencil/Makefile
@@ -19,8 +19,8 @@ BROKEN_armv7=		fails to compile: no matching function for call to 'qMax'
 LIB_DEPENDS=	libming.so:graphics/ming \
 		libpng.so:graphics/png
 
-USES=		qmake zip
-USE_QT4=	gui opengl xml moc_build rcc_build
+USES=		qmake qt:4 zip
+USE_QT=		gui opengl xml moc_build rcc_build
 USE_GL=		gl
 QMAKE_ARGS=	INCLUDEPATH+=${LOCALBASE}/include/ming
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}-source
diff --git graphics/photivo/Makefile graphics/photivo/Makefile
index 87a7e9878406..6aa62ce79cca 100644
--- graphics/photivo/Makefile
+++ graphics/photivo/Makefile
@@ -37,8 +37,10 @@ _QT5_DEPS=	qmake_build buildtools_build core gui network widgets
 OPTIONS_DEFINE=	QT4
 QT4_DESC=	Build against Qt 4 instead of Qt 5
 
-QT4_USE=	QT4=${_QT4_DEPS:ts,}
-QT4_USE_OFF=	QT5=${_QT5_DEPS:ts,}
+QT4_USES=	qt:4
+QT4_USES_OFF=	qt:5
+QT4_USE=	QT=${_QT4_DEPS:ts,}
+QT4_USE_OFF=	QT=${_QT5_DEPS:ts,}
 QT4_CMAKE_ON=	-DFORCE_QT4:BOOL=true
 
 post-patch:
diff --git graphics/photoqt/Makefile graphics/photoqt/Makefile
index b34a06f58a41..ccc9965b8160 100644
--- graphics/photoqt/Makefile
+++ graphics/photoqt/Makefile
@@ -11,8 +11,8 @@ COMMENT=	Simple, powerful and good looking QT5 image viewer
 LICENSE=	GPLv2
 
 USES=		cmake:outsource compiler:c++11-lib desktop-file-utils \
-		localbase:ldflags
-USE_QT5=	core graphicaleffects gui multimedia network qml quick \
+		localbase:ldflags qt:5
+USE_QT=		core graphicaleffects gui multimedia network qml quick \
 		quickcontrols sql svg widgets xml \
 		buildtools_build linguisttools_build qmake_build
 
diff --git graphics/phototonic/Makefile graphics/phototonic/Makefile
index 26e383ed30e7..390ba6192477 100644
--- graphics/phototonic/Makefile
+++ graphics/phototonic/Makefile
@@ -15,11 +15,11 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libexiv2.so:graphics/exiv2
 
-USES=		desktop-file-utils gettext qmake
+USES=		desktop-file-utils gettext qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	oferkv
 USE_GL=		gl
-USE_QT5=	core gui imageformats svg widgets buildtools_build
+USE_QT=		core gui imageformats svg widgets buildtools_build
 
 post-patch:
 	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
diff --git graphics/poppler/Makefile graphics/poppler/Makefile
index c00aa8ac9d52..840d27982291 100644
--- graphics/poppler/Makefile
+++ graphics/poppler/Makefile
@@ -64,7 +64,8 @@ CONFIGURE_ARGS+=--disable-poppler-glib
 .if ${SLAVEPORT}==qt4
 CONFIGURE_ARGS+=--enable-poppler-qt4
 CONFIGURE_ENV+=	MOCQT4=${MOC}
-USE_QT4=	gui corelib xml qtestlib moc_build
+USES+=		qt:4
+USE_QT=		gui corelib xml qtestlib moc_build
 BUILD_WRKSRC=	${WRKSRC}/qt4
 INSTALL_WRKSRC=	${WRKSRC}/qt4
 .else
@@ -74,7 +75,8 @@ CONFIGURE_ARGS+=--disable-poppler-qt4
 .if ${SLAVEPORT}==qt5
 CONFIGURE_ARGS+=--enable-poppler-qt5
 CONFIGURE_ENV+=	MOCQT5=${MOC}
-USE_QT5=	core gui widgets xml buildtools_build testlib_build
+USES+=		qt:5
+USE_QT=		core gui widgets xml buildtools_build testlib_build
 # Qt from 5.7.0 on requires c++11.
 USE_CXXSTD=	c++11
 BUILD_WRKSRC=	${WRKSRC}/qt5
diff --git graphics/prison/Makefile graphics/prison/Makefile
index 1e50abd6626f..e1cecbc82ca3 100644
--- graphics/prison/Makefile
+++ graphics/prison/Makefile
@@ -17,8 +17,8 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 LIB_DEPENDS=	libdmtx.so:graphics/libdmtx \
 		libqrencode.so:graphics/libqrencode
 
-USES=		cmake:outsource tar:xz
-USE_QT4=	corelib gui qmake_build moc_build rcc_build uic_build
+USES=		cmake:outsource qt:4 tar:xz
+USE_QT=		corelib gui qmake_build moc_build rcc_build uic_build
 
 USE_LDCONFIG=	yes
 
diff --git graphics/py-qt4-svg/Makefile graphics/py-qt4-svg/Makefile
index e063758dcb1e..4dddc2f7825d 100644
--- graphics/py-qt4-svg/Makefile
+++ graphics/py-qt4-svg/Makefile
@@ -12,10 +12,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtSvg module
 CONFIGURE_ARGS=	--enable QtSvg
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run gui_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib gui svg moc_build qmake_build
+USE_QT=		corelib gui svg moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git graphics/py-qt5-svg/Makefile graphics/py-qt5-svg/Makefile
index 393749b8b24c..b85de56e775d 100644
--- graphics/py-qt5-svg/Makefile
+++ graphics/py-qt5-svg/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtSvg module
 CONFIGURE_ARGS=	--enable QtSvg
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run gui_run widgets_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui svg widgets qmake_build
+USE_QT=		core gui svg widgets qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git graphics/qcomicbook/Makefile graphics/qcomicbook/Makefile
index ecac4b6fa55d..ebd447ae327c 100644
--- graphics/qcomicbook/Makefile
+++ graphics/qcomicbook/Makefile
@@ -14,8 +14,8 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libpoppler-qt4.so:graphics/poppler-qt4
 
-USES=		cmake:outsource compiler:c++11-lang pkgconfig
-USE_QT4=	corelib gui linguisttools_build moc_build qmake_build rcc_build \
+USES=		cmake:outsource compiler:c++11-lang pkgconfig qt:4
+USE_QT=		corelib gui linguisttools_build moc_build qmake_build rcc_build \
 		uic_build xml
 
 OPTIONS_DEFINE=	7ZIP ACE RAR
diff --git graphics/qgis/Makefile graphics/qgis/Makefile
index ea32956a5009..3667e47d68f6 100644
--- graphics/qgis/Makefile
+++ graphics/qgis/Makefile
@@ -27,11 +27,11 @@ LIB_DEPENDS=	libexpat.so:textproc/expat2 \
 		libxerces-c.so:textproc/xerces-c3
 
 USES=		bison cmake compiler:features cpe desktop-file-utils \
-		fortran gmake pyqt:4 python:2.7 sqlite:3
+		fortran gmake pyqt:4 python:2.7 qt:4 sqlite:3
 USE_GITHUB=	yes
 GH_PROJECT=	${PORTNAME:tu}
 USE_PYQT=	core gui network qscintilla2 sip sql svg xml webkit_run
-USE_QT4=	corelib designer doc gui linguist_build moc_build \
+USE_QT=		corelib designer doc gui linguist_build moc_build \
 		network qmake_build rcc_build script sql sql-pgsql \
 		sql-sqlite3 svg testlib uic_build webkit xml
 USE_LDCONFIG=	yes
diff --git graphics/qt4-iconengines/Makefile graphics/qt4-iconengines/Makefile
index ec5f20987e68..98edb3eb3a3b 100644
--- graphics/qt4-iconengines/Makefile
+++ graphics/qt4-iconengines/Makefile
@@ -10,9 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt SVG icon engine
 
-USES=		pkgconfig
-USE_QT4=	qmake_build moc_build corelib gui svg xml
-QT_DIST=	yes
+USES=		pkgconfig qmake:no_env qt-dist:4
+USE_QT=		moc_build corelib gui svg xml
 
 HAS_CONFIGURE=	yes
 
diff --git graphics/qt4-imageformats/Makefile graphics/qt4-imageformats/Makefile
index fe2131045024..63545b2eb79f 100644
--- graphics/qt4-imageformats/Makefile
+++ graphics/qt4-imageformats/Makefile
@@ -14,9 +14,8 @@ LIB_DEPENDS=	libmng.so:graphics/libmng \
 		libpng.so:graphics/png \
 		libtiff.so:graphics/tiff
 
-USES=		jpeg pkgconfig
-USE_QT4=	qmake_build moc_build rcc_build corelib gui svg xml
-QT_DIST=	yes
+USES=		jpeg pkgconfig qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build corelib gui svg xml
 
 HAS_CONFIGURE=	yes
 
diff --git graphics/qt4-opengl/Makefile graphics/qt4-opengl/Makefile
index 5bf67d9e5469..e6703d06439e 100644
--- graphics/qt4-opengl/Makefile
+++ graphics/qt4-opengl/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt OpenGL support module
 
-USE_QT4=	qmake_build moc_build corelib gui
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build corelib gui
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git graphics/qt4-pixeltool/Makefile graphics/qt4-pixeltool/Makefile
index 569539e9ad9a..f53d2ffcfbea 100644
--- graphics/qt4-pixeltool/Makefile
+++ graphics/qt4-pixeltool/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 4 screen magnifier
 
-USE_QT4=	qmake_build moc_build corelib gui network
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build corelib gui network
 
 HAS_CONFIGURE=	yes
 
diff --git graphics/qt4-svg/Makefile graphics/qt4-svg/Makefile
index 49a02e24485d..a384d4cce5b0 100644
--- graphics/qt4-svg/Makefile
+++ graphics/qt4-svg/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt SVG support module
 
-USE_QT4=	qmake_build moc_build corelib gui
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build corelib gui
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git graphics/qt5-3d/Makefile graphics/qt5-3d/Makefile
index 38da5121925f..52013204c156 100644
--- graphics/qt5-3d/Makefile
+++ graphics/qt5-3d/Makefile
@@ -10,9 +10,8 @@ COMMENT=	Qt3D module
 
 LIB_DEPENDS=	libassimp.so:multimedia/assimp
 
-USES=		pkgconfig qmake:norecursive
-USE_QT5=	concurrent core gui network qml quick buildtools_build
-QT_DIST=	${PORTNAME}
+USES=		pkgconfig qmake:norecursive qt-dist:5,3d
+USE_QT=		concurrent core gui network qml quick buildtools_build
 
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
diff --git graphics/qt5-graphicaleffects/Makefile graphics/qt5-graphicaleffects/Makefile
index 67031e5571d1..215799599a5a 100644
--- graphics/qt5-graphicaleffects/Makefile
+++ graphics/qt5-graphicaleffects/Makefile
@@ -10,8 +10,8 @@ COMMENT=	Qt Quick graphical effects
 
 BROKEN_aarch64=		fails to install: pkg-static: Unable to access file DropShadowBase.qmlc: No such file or directory
 
-USES=		qmake
-USE_QT5=	buildtools_build core gui quick qml
+USES=		qmake qt-dist:5,graphicaleffects
+USE_QT=		buildtools_build core gui quick qml
 QT_DIST=	${PORTNAME}
 
 .include <bsd.port.mk>
diff --git graphics/qt5-imageformats/Makefile graphics/qt5-imageformats/Makefile
index 0cd7b542ae10..fe10cb544beb 100644
--- graphics/qt5-imageformats/Makefile
+++ graphics/qt5-imageformats/Makefile
@@ -13,8 +13,7 @@ LIB_DEPENDS=	libjasper.so:graphics/jasper \
 		libtiff.so:graphics/tiff \
 		libwebp.so:graphics/webp
 
-USE_QT5=	core gui buildtools_build
-QT_DIST=	${PORTNAME}
-USES=		localbase qmake
+USE_QT=		core gui buildtools_build
+USES=		localbase qmake qt-dist:5,imageformats
 
 .include <bsd.port.mk>
diff --git graphics/qt5-opengl/Makefile graphics/qt5-opengl/Makefile
index 1ae328cc5b50..aeba157cc2e5 100644
--- graphics/qt5-opengl/Makefile
+++ graphics/qt5-opengl/Makefile
@@ -8,9 +8,9 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 5-compatible OpenGL support module
 
+USES=		qmake:no_env qt-dist:5,base
 USE_GL=		gl
-USE_QT5=	core gui widgets qmake_build buildtools_build
-QT_DIST=	base
+USE_QT=		core gui widgets qmake_build buildtools_build
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
diff --git graphics/qt5-pixeltool/Makefile graphics/qt5-pixeltool/Makefile
index 545c33ad193a..7fed9bf09339 100644
--- graphics/qt5-pixeltool/Makefile
+++ graphics/qt5-pixeltool/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 5 screen magnifier
 
-USE_QT5=	core gui widgets buildtools_build
-QT_DIST=	tools
-USES=		qmake
+USE_QT=		core gui widgets buildtools_build
+USES=		qmake qt-dist:5,tools
 
 # qt5logo.png is installed by qt5-widgets.
 DESKTOP_ENTRIES="Qt 5 PixelTool" "" \
diff --git graphics/qt5-svg/Makefile graphics/qt5-svg/Makefile
index 06af1c12e8c7..27dc9bfb71d6 100644
--- graphics/qt5-svg/Makefile
+++ graphics/qt5-svg/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt SVG support module
 
-USE_QT5=	core gui widgets buildtools_build
-QT_DIST=	${PORTNAME}
-USES=		qmake
+USE_QT=		core gui widgets buildtools_build
+USES=		qmake qt-dist:5,svg
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 .include <bsd.port.mk>
diff --git graphics/qt5-wayland/Makefile graphics/qt5-wayland/Makefile
index 6f8599e7cc0a..6849ab13bc03 100644
--- graphics/qt5-wayland/Makefile
+++ graphics/qt5-wayland/Makefile
@@ -14,13 +14,12 @@ LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
 		libwayland-client.so:graphics/wayland \
 		libxkbcommon.so:x11/libxkbcommon
 
-USES=		pkgconfig qmake:norecursive
+USES=		pkgconfig qmake:norecursive qt-dist:5,wayland
 USE_GL=		egl gl
 USE_GNOME=	glib20
-USE_QT5=	core dbus gui qml quick \
+USE_QT=		core dbus gui qml quick \
 		buildtools_build qmake_build
 USE_XORG=       x11 xcomposite
-QT_DIST=	${PORTNAME}
 
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
diff --git graphics/qtawesome/Makefile graphics/qtawesome/Makefile
index aeb2456cd01c..2b29a9fb363e 100644
--- graphics/qtawesome/Makefile
+++ graphics/qtawesome/Makefile
@@ -21,8 +21,10 @@ OPTIONS_SINGLE=		GUI
 OPTIONS_SINGLE_GUI=	QT4 QT5
 OPTIONS_DEFAULT=	QT4
 
-QT4_USE=	qt4=corelib,gui,qmake_build,moc_build
-QT5_USE=	qt5=core,gui,qmake_build,buildtools_build
+QT4_USES=	qt:4
+QT4_USE=	qt=corelib,gui,qmake_build,moc_build
+QT5_USES=	qt:5
+QT5_USE=	qt=core,gui,qmake_build,buildtools_build
 MAKE_ARGS+=	${PORT_OPTIONS:MQT*:S/QT/QT=/}
 
 WRKSRC_SUBDIR=	QtAwesome
diff --git graphics/qxv/Makefile graphics/qxv/Makefile
index 4df5d66f6c34..a569458048b8 100644
--- graphics/qxv/Makefile
+++ graphics/qxv/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Qt 4 program that displays images of various formats
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake tar:bzip2
-USE_QT4=	corelib gui moc_build uic_build rcc_build
+USES=		qmake qt:4 tar:bzip2
+USE_QT=		corelib gui moc_build uic_build rcc_build
 MAKE_JOBS_UNSAFE=	yes
 
 PLIST_FILES=	bin/${PORTNAME}
diff --git graphics/scantailor/Makefile graphics/scantailor/Makefile
index 5f7606190d6e..2249f9fbe3d7 100644
--- graphics/scantailor/Makefile
+++ graphics/scantailor/Makefile
@@ -20,8 +20,8 @@ LIB_DEPENDS=	libtiff.so:graphics/tiff \
 		libpng.so:graphics/png
 
 #MAKE_JOBS_UNSAFE=	yes
-USES=		cmake gettext jpeg
-USE_QT4=	corelib gui xml qmake_build uic_build moc_build rcc_build \
+USES=		cmake gettext jpeg qt:4
+USE_QT=		corelib gui xml qmake_build uic_build moc_build rcc_build \
 		linguist_build
 USE_XORG+=	xrender
 
diff --git graphics/seexpr/Makefile graphics/seexpr/Makefile
index cb0f7973edaf..67ef4da9b8a0 100644
--- graphics/seexpr/Makefile
+++ graphics/seexpr/Makefile
@@ -16,9 +16,9 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	wdas
 GH_PROJECT=	SeExpr
 
-USES=		bison cmake compiler:c++0x pyqt:4 python:2.7
+USES=		bison cmake compiler:c++0x pyqt:4 python qt:4
 USE_PYQT=	gui_build sip_build
-USE_QT4=	moc_build qmake_build rcc_build uic_build gui opengl
+USE_QT=		moc_build qmake_build rcc_build uic_build gui opengl
 BINARY_ALIAS=	sip=sip-${PYTHON_VER}
 
 MAKE_JOBS_UNSAFE=	yes	# https://github.com/wdas/seexpr/issues/40
diff --git graphics/showimage/Makefile graphics/showimage/Makefile
index ed8738849e92..e1f3d31b5e47 100644
--- graphics/showimage/Makefile
+++ graphics/showimage/Makefile
@@ -13,11 +13,11 @@ COMMENT=	Simple KDE based image viewer
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake:outsource kde:5 tar:bzip2
+USES=		cmake:outsource kde:5 qt:5 tar:bzip2
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons ecm i18n itemviews jobwidgets kio service solid \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network xml widgets \
+USE_QT=		core dbus gui network xml widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git graphics/skanlite-kde4/Makefile graphics/skanlite-kde4/Makefile
index fb30a181a765..1b1a6b68e6c0 100644
--- graphics/skanlite-kde4/Makefile
+++ graphics/skanlite-kde4/Makefile
@@ -16,9 +16,9 @@ LICENSE_FILE=	${WRKSRC}/src/COPYING
 
 LIB_DEPENDS=	libksane.so:graphics/libksane-kde4
 
-USES=		cmake:outsource gettext kde:4 tar:xz
+USES=		cmake:outsource gettext kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 CONFLICTS_INSTALL=	skanlite
 
diff --git graphics/smillaenlarger/Makefile graphics/smillaenlarger/Makefile
index 791aef96ef9d..12f56c8d832b 100644
--- graphics/smillaenlarger/Makefile
+++ graphics/smillaenlarger/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Qt-based tool for high-quality image magnification/resizing
 
 LICENSE=	GPLv3
 
-USES=		qmake zip
-USE_QT4=	qmake_build moc_build rcc_build uic_build gui
+USES=		qmake qt:4 zip
+USE_QT=		qmake_build moc_build rcc_build uic_build gui
 
 WRKSRC=		${WRKDIR}/${DISTNAME}/SmillaEnlargerSrc
 
diff --git graphics/spectacle/Makefile graphics/spectacle/Makefile
index d41833912848..6d13441d2a09 100644
--- graphics/spectacle/Makefile
+++ graphics/spectacle/Makefile
@@ -11,12 +11,12 @@ LIB_DEPENDS=	libxcb-cursor.so:x11/xcb-util-cursor \
 		libxcb-image.so:x11/xcb-util-image \
 		libxcb-util.so:x11/xcb-util
 
-USES=		cmake:outsource gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	attica auth codecs completion config configwidgets coreaddons \
 		dbusaddons doctools ecm i18n jobwidgets kdeclarative kio \
 		libkipi newstuff notifications package service widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	core concurrent dbus gui network printsupport qml quick \
+USE_QT=		core concurrent dbus gui network printsupport qml quick \
 		widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	x11 xcb xext xfixes
diff --git graphics/structuresynth/Makefile graphics/structuresynth/Makefile
index fb5aefefe8f5..c02ffb868aa3 100644
--- graphics/structuresynth/Makefile
+++ graphics/structuresynth/Makefile
@@ -11,9 +11,9 @@ DISTNAME=	StructureSynth-Source-v${PORTVERSION}
 MAINTAINER=	amdmi3@FreeBSD.org
 COMMENT=	Rule-based 3D structure generator
 
-USES=		qmake zip dos2unix
+USES=		qmake qt:4 zip dos2unix
 USE_GL=		glu
-USE_QT4=	corelib gui opengl moc_build rcc_build xml script
+USE_QT=		corelib gui opengl moc_build rcc_build xml script
 WRKSRC=		${WRKDIR}/structure-synth
 DOS2UNIX_GLOB=	*.cpp *.h
 
diff --git graphics/tiled/Makefile graphics/tiled/Makefile
index 64e02bd9a589..07d9babf16a2 100644
--- graphics/tiled/Makefile
+++ graphics/tiled/Makefile
@@ -15,8 +15,8 @@ LICENSE_COMB=	multi
 USE_GITHUB=	yes
 GH_ACCOUNT=	bjorn
 
-USES=		compiler:c++11-lib desktop-file-utils qmake shared-mime-info
-USE_QT5=	core gui widgets opengl network \
+USES=		compiler:c++11-lib desktop-file-utils qmake qt:5 shared-mime-info
+USE_QT=		core gui widgets opengl network \
 		buildtools_build linguisttools_build
 USE_GL=		gl
 USE_LDCONFIG=	yes
diff --git graphics/tulip/Makefile graphics/tulip/Makefile
index aaeb9593b024..2a8e3ed54986 100644
--- graphics/tulip/Makefile
+++ graphics/tulip/Makefile
@@ -47,12 +47,14 @@ OPTIONS_SINGLE=		GUI
 OPTIONS_SINGLE_GUI=	QT4 QT5
 OPTIONS_DEFAULT=	QT4
 
-QT4_USE=		qt4=corelib,gui,network,opengl,webkit \
-			qt4=xml,xmlpatterns \
-			qt4=moc_build,qmake_build,rcc_build,uic_build
-QT5_USE=		qt5=core,gui,network,opengl,webkit,widgets \
-			qt5=xml,xmlpatterns \
-			qt5=buildtools_build,qmake_build
+QT4_USES=		qt:4
+QT4_USE=		qt=corelib,gui,network,opengl,webkit \
+			qt=xml,xmlpatterns \
+			qt=moc_build,qmake_build,rcc_build,uic_build
+QT_USES=		qt:5
+QT5_USE=		qt=core,gui,network,opengl,webkit,widgets \
+			qt=xml,xmlpatterns \
+			qt=buildtools_build,qmake_build
 QT5_CMAKE_BOOL=		USE_QT5_IF_INSTALLED
 
 post-build:
diff --git graphics/xpdf4/Makefile graphics/xpdf4/Makefile
index 958515498ea3..6ccfcff05839 100644
--- graphics/xpdf4/Makefile
+++ graphics/xpdf4/Makefile
@@ -45,9 +45,9 @@ GUI_CMAKE_ON=		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets:BOOL=FALSE
 GUI_CMAKE_OFF=		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets:BOOL=TRUE
 GUI_DESC=		QT5 interface
 GUI_CMAKE_ARGS+=	-DNO_TEXT_SELECT:BOOL=OFF
-GUI_USE=		QT5=buildtools_build,qmake_build,concurrent,core,gui,widgets,printsupport,svg
+GUI_USE=		QT=buildtools_build,qmake_build,concurrent,core,gui,widgets,printsupport,svg
 GUI_PLIST_SUB=		DESKTOPDIR="${DESKTOPDIR}"
-GUI_USES=		desktop-file-utils
+GUI_USES=		desktop-file-utils qt:5
 
 PRINT_CMAKE_ON=		-DXPDFWIDGET_PRINTING:BOOL=ON -DCUPS:BOOL=ON
 PRINT_CMAKE_OFF=	-DXPDFWIDGET_PRINTING:BOOL=OFF -DCUPS:BOOL=OFF
diff --git graphics/yagf/Makefile graphics/yagf/Makefile
index 7a3979ecfca0..8460e8cdeb65 100644
--- graphics/yagf/Makefile
+++ graphics/yagf/Makefile
@@ -25,10 +25,10 @@ TESSERACT_RUN_DEPENDS=	tesseract:graphics/tesseract
 
 OPTIONS_DEFAULT=	CUNEIFORM
 
-USES=		cmake desktop-file-utils pkgconfig
+USES=		cmake desktop-file-utils pkgconfig qt:4
 USE_LDCONFIG=	yes
 INSTALLS_ICONS=	yes
-USE_QT4=	corelib gui imageformats linguist_build \
+USE_QT=		corelib gui imageformats linguist_build \
 		moc_build qmake_build rcc_build uic_build
 
 PLIST_FILES=	bin/yagf lib/yagf/libxspreload.so share/applications/YAGF.desktop\
diff --git graphics/zint/Makefile graphics/zint/Makefile
index 5626d80fdbe3..54c6ecbd1dcb 100644
--- graphics/zint/Makefile
+++ graphics/zint/Makefile
@@ -15,9 +15,9 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libpng.so:graphics/png
 
-USES=		cmake
+USES=		cmake qt:4
 USE_LDCONFIG=	yes
-USE_QT4=	gui xml qmake_build uic_build moc_build rcc_build designer
+USE_QT=		gui xml qmake_build uic_build moc_build rcc_build designer
 
 DESKTOP_ENTRIES="Zint" "Barcode generator" "" "zint-qt" "" false
 
diff --git irc/dxirc/Makefile irc/dxirc/Makefile
index 414b7956dc32..c59e3f16f67a 100644
--- irc/dxirc/Makefile
+++ irc/dxirc/Makefile
@@ -40,12 +40,14 @@ NLS_CMAKE_BOOL=		WITH_NLS
 
 NOTIFY_RUN_DEPENDS=	notify-send:devel/libnotify
 
-QT4_USE=		QT4=corelib,gui,network \
-			QT4=moc_build,rcc_build,uic_build,qmake_build
+QT4_USES=	qt:4
+QT4_USE=		QT=corelib,gui,network \
+			QT=moc_build,rcc_build,uic_build,qmake_build
 QT4_CMAKE_ON=		-DQT5:BOOL=OFF
 
-QT5_USE=		QT5=core,gui,multimedia,network,widgets \
-			QT5=buildtools_build,qmake_build
+QT5_USES=	qt:5
+QT5_USE=		QT=core,gui,multimedia,network,widgets \
+			QT=buildtools_build,qmake_build
 QT5_CMAKE_ON=		-DQT5:BOOL=ON
 
 .include <bsd.port.mk>
diff --git irc/konversation/Makefile irc/konversation/Makefile
index 0183aadffa19..6ac71de925df 100644
--- irc/konversation/Makefile
+++ irc/konversation/Makefile
@@ -15,14 +15,14 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libqca-qt5.so:devel/qca@qt5
 
-USES=		cmake:outsource desktop-file-utils gettext kde:5 python:run shebangfix tar:xz
+USES=		cmake:outsource desktop-file-utils gettext kde:5 python:run qt:5 shebangfix tar:xz
 USE_KDE=	archive auth bookmarks codecs completion config \
 		configwidgets coreaddons crash dbusaddons doctools ecm \
 		emoticons globalaccel i18n iconthemes idletime itemviews \
 		jobwidgets kio notifications notifyconfig parts service solid \
 		sonnet textwidgets wallet widgetsaddons windowsystem xmlgui \
 		init_run
-USE_QT5=	core dbus gui network phonon4 widgets xml \
+USE_QT=		core dbus gui network phonon4 widgets xml \
 		buildtools_build qmake_build
 
 SHEBANG_FILES=	data/scripts/bug \
diff --git irc/kvirc/Makefile irc/kvirc/Makefile
index 2633dd74499f..1c631c00f14b 100644
--- irc/kvirc/Makefile
+++ irc/kvirc/Makefile
@@ -19,9 +19,9 @@ MAINTAINER=	ports@FreeBSD.org
 COMMENT?=	IRC client for KDE 4
 
 USE_PERL5=	build
-USE_QT4=	moc_build qmake_build rcc_build uic_build \
+USE_QT=		moc_build qmake_build rcc_build uic_build \
 		dbus gui network sql xml
-USES=		cmake cpe gettext perl5 ssl tar:bzip2
+USES=		cmake cpe gettext perl5 qt:4 ssl tar:bzip2
 CMAKE_ARGS=	-DWANT_ESD=no -DWANT_DOXYGEN=no \
 		-DMANDIR=${MANPREFIX}
 USE_LDCONFIG=	yes
@@ -56,11 +56,13 @@ PLIST_SUB+=	QT="" KDE="@comment "
 OPTIONS_DEFINE+=	PHONON WEBKIT
 
 PHONON_DESC=	Build with Phonon support
-PHONON_USE=	QT4=phonon
+PHONON_USES=	qt:4
+PHONON_USE=	QT=phonon
 PHONON_CMAKE_OFF=	-DWITHOUT_PHONON=yes
 
 WEBKIT_DESC=	Build with QtWebkit support
-WEBKIT_USE=	QT4=webkit
+WEBKIT_USES=	qt:4
+WEBKIT_USE=	QT=webkit
 WEBKIT_CMAKE_OFF=	-DWITHOUT_QTWEBKIT=yes
 .else #defined(PKGNAMESUFFIX)
 CONFLICTS_INSTALL=	kvirc-qt4-4.*
diff --git irc/quassel/Makefile irc/quassel/Makefile
index 9fac71e734e9..2203124d4088 100644
--- irc/quassel/Makefile
+++ irc/quassel/Makefile
@@ -13,12 +13,12 @@ COMMENT?=	Qt 5 based distributed IRC client (client and monolithic binary)
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake:outsource compiler:c++11-lib cpe pkgconfig tar:bzip2
+USES=		cmake:outsource compiler:c++11-lib cpe pkgconfig qt:5 tar:bzip2
 
 CPE_VENDOR=	quassel-irc
 CPE_PRODUCT=	quassel_irc
 
-USE_QT5=	buildtools_build core network qmake_build
+USE_QT=		buildtools_build core network qmake_build
 CMAKE_ARGS=	-DWITH_KDE=off \
 		-DUSE_QT5=on
 
@@ -33,12 +33,12 @@ OPTIONS_SUB=		yes
 
 CLIENT_DESC=		Quassel client (for use with core)
 CLIENT_CMAKE_BOOL=	WANT_QTCLIENT
-CLIENT_USE=		qt5=dbus,gui,phonon4,webkit,widgets
+CLIENT_USE=		qt=dbus,gui,phonon4,webkit,widgets
 CLIENT_LIB_DEPENDS=	libdbusmenu-qt5.so:devel/libdbusmenu-qt@qt5
 
 CORE_DESC=		Quassel core server (for use with client)
 CORE_CMAKE_BOOL=	WANT_CORE
-CORE_USE=		qt5=script,sql
+CORE_USE=		qt=script,sql
 CORE_LIB_DEPENDS=	libqca-qt5.so:devel/qca@qt5
 CORE_SUB_FILES=		pkg-message
 CORE_VARS=		use_rc_subr=quasselcore \
@@ -49,14 +49,15 @@ CORE_PLIST_FILES=	bin/quasselcore
 
 MONO_DESC=		Quassel standalone (monolithic binary: core+client combined)
 MONO_CMAKE_BOOL=	WANT_MONO
-MONO_USE=		qt5=script,sql
+MONO_USE=		qt=script,sql
 MONO_LIB_DEPENDS=	libqca-qt5.so:devel/qca@qt5
 
-NLS_USE=		QT5=linguisttools_build
+NLS_USES=	qt:5
+NLS_USE=		QT=linguisttools_build
 
-PGSQL_USE=		qt5=sql-pgsql
+PGSQL_USE=		qt=sql-pgsql
 
-SQLITE3_USE=		qt5=sql-sqlite3_run
+SQLITE3_USE=		qt=sql-sqlite3_run
 
 post-patch-NLS-off:
 	${REINPLACE_CMD} -e '/add_subdirectory(po)/d' \
diff --git japanese/fcitx-skk/Makefile japanese/fcitx-skk/Makefile
index 8cb4c07027b8..4eb3cb1e2d3b 100644
--- japanese/fcitx-skk/Makefile
+++ japanese/fcitx-skk/Makefile
@@ -16,7 +16,7 @@ RUN_DEPENDS=	${LOCALBASE}/share/skk/SKK-JISYO.L:japanese/skk-jisyo
 LIB_DEPENDS=	libfcitx-config.so:chinese/fcitx \
 		libskk.so:japanese/libskk
 
-USES=		tar:xz compiler:c++11-lang cmake gettext pkgconfig
+USES=		qt:4 tar:xz compiler:c++11-lang cmake gettext pkgconfig
 INSTALLS_ICONS=	yes
 CMAKE_ARGS+=	-DSKK_DEFAULT_PATH=${LOCALBASE}/share/skk/SKK-JISYO.L
 
@@ -27,7 +27,7 @@ QT4_DESC=	Enable Qt for GUI configuration
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MQT4}
-USE_QT4=	qmake_build moc_build rcc_build uic_build gui
+USE_QT=		qmake_build moc_build rcc_build uic_build gui
 USE_LDCONFIG=	${PREFIX}/lib/fcitx/qt
 PLIST_SUB+=	QT4=""
 .else
diff --git japanese/kiten-kde4/Makefile japanese/kiten-kde4/Makefile
index 80269512f29b..9bf4e6ec8467 100644
--- japanese/kiten-kde4/Makefile
+++ japanese/kiten-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	japanese kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Japanese reference/study tool for KDE 4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git japanese/kiten/Makefile japanese/kiten/Makefile
index 5ef93491d6ff..53d00f16c0cf 100644
--- japanese/kiten/Makefile
+++ japanese/kiten/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	japanese kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Japanese reference/study tool for KDE
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth archive codecs completion config configwidgets coreaddons \
 		crash doctools ecm i18n jobwidgets js khtml kio parts service \
 		sonnet textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git japanese/mozc-server/Makefile japanese/mozc-server/Makefile
index a213149ed057..2d5b7425a33e 100644
--- japanese/mozc-server/Makefile
+++ japanese/mozc-server/Makefile
@@ -48,8 +48,9 @@ LICENSE_PERMS_NAISTL=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 LICENSE_FILE_NAISTL=	${WRKSRC}/src/data/dictionary_oss/README.txt
 LICENSE_DISTFILES_NAISTL=${DISTNAME}${EXTRACT_SUFX}
 .elif ${BUILD_MOZC_LIST:Mmozc_tool} == "mozc_tool"
+USES+=		qt:5
 USE_GNOME=	glib20 gtk20
-USE_QT5=	buildtools core gui widgets
+USE_QT=		buildtools core gui widgets
 .elif ${BUILD_MOZC_LIST:Mibus_mozc} == "ibus_mozc"
 USES+=		gettext-runtime
 USE_XORG=	xcb
diff --git japanese/qt4-codecs-jp/Makefile japanese/qt4-codecs-jp/Makefile
index 7af7f68cffea..349d7411fc01 100644
--- japanese/qt4-codecs-jp/Makefile
+++ japanese/qt4-codecs-jp/Makefile
@@ -11,8 +11,8 @@ PKGNAMESUFFIX=	-jp
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt EUC-JP/JIS codec plugins
 
-USE_QT4=	qmake_build corelib
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		corelib
 
 HAS_CONFIGURE=	yes
 
diff --git java/classpath/Makefile java/classpath/Makefile
index 6648eb2aba06..93e63f07fe46 100644
--- java/classpath/Makefile
+++ java/classpath/Makefile
@@ -115,7 +115,8 @@ CONFIGURE_ARGS+=	--enable-qt-peer
 CONFIGURE_ARGS+=	--enable-default-toolkit=gnu.java.awt.peer.qt.QtToolkit
 .endif
 CONFIGURE_ENV+=		MOC="${LOCALBASE}/bin/moc-qt4"
-USE_QT4=		moc_build corelib gui
+USES+=			qt:4
+USE_QT=			moc_build corelib gui
 PLIST_SUB+=		QT4=""
 .else
 PLIST_SUB+=		QT4="@comment "
diff --git korean/qt4-codecs-kr/Makefile korean/qt4-codecs-kr/Makefile
index 271ecb524a23..877ace323596 100644
--- korean/qt4-codecs-kr/Makefile
+++ korean/qt4-codecs-kr/Makefile
@@ -11,8 +11,8 @@ PKGNAMESUFFIX=	-kr
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt EUC-KR codec plugin
 
-USE_QT4=	qmake_build corelib
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		corelib
 
 HAS_CONFIGURE=	yes
 
diff --git lang/basic256/Makefile lang/basic256/Makefile
index 73cb484ad115..7e83dfba63e8 100644
--- lang/basic256/Makefile
+++ lang/basic256/Makefile
@@ -18,9 +18,9 @@ BUILD_DEPENDS=	espeak:audio/espeak \
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
-USES=		bison dos2unix qmake
+USES=		bison dos2unix qmake qt:5
 USE_SDL=	sdl mixer
-USE_QT5=	buildtools core gui multimedia network printsupport sql widgets serialport
+USE_QT=		buildtools core gui multimedia network printsupport sql widgets serialport
 QMAKE_ARGS+=	LOCALBASE="${LOCALBASE}"
 QMAKE_SOURCE_PATH=	BASIC256.pro
 
diff --git lang/kf5-kross/Makefile lang/kf5-kross/Makefile
index 52716853bbe4..eb092a1f0b5e 100644
--- lang/kf5-kross/Makefile
+++ lang/kf5-kross/Makefile
@@ -7,12 +7,12 @@ CATEGORIES=	lang kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 multi-language application scripting
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons doctools ecm i18n iconthemes itemviews \
 		jobwidgets kio parts service solid sonnet textwidgets \
 		widgetsaddons xmlgui
-USE_QT5=	buildtools_build core dbus gui network qmake_build \
+USE_QT=		buildtools_build core dbus gui network qmake_build \
 		script uiplugin uitools widgets xml
 
 .include <bsd.port.mk>
diff --git lang/kross-interpreters/Makefile lang/kross-interpreters/Makefile
index 715d68a3f8cc..d5fba8662e2e 100644
--- lang/kross-interpreters/Makefile
+++ lang/kross-interpreters/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	lang kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Language interpreters to enable in-process scripting with Kross
 
-USES=		cmake:outsource gettext kde:5 python:2.7 tar:xz
+USES=		cmake:outsource gettext kde:5 python:2.7 qt:5 tar:xz
 USE_KDE=	ecm kross
-USE_QT5=	core gui script widgets xml \
+USE_QT=		core gui script widgets xml \
 		buildtools_build qmake_build
 
 OPTIONS_DEFINE=		RUBY
diff --git lang/kturtle-kde4/Makefile lang/kturtle-kde4/Makefile
index 39626ff269b3..6081f8c76458 100644
--- lang/kturtle-kde4/Makefile
+++ lang/kturtle-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	lang kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Educational programming environment for KDE 4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib gui xml moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib gui xml moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git lang/kturtle/Makefile lang/kturtle/Makefile
index afb9556c350e..799f02a05839 100644
--- lang/kturtle/Makefile
+++ lang/kturtle/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	lang kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Educational programming environment for KDE
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	attica auth codecs config configwidgets coreaddons crash ecm \
 		emoticons i18n init itemmodels kdelibs4support kio newstuff \
 		service sonnet textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus gui network printsupport svg widgets xml \
+USE_QT=		core dbus gui network printsupport svg widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git lang/py-qt5-qml/Makefile lang/py-qt5-qml/Makefile
index 97c913c513e4..517300e4b426 100644
--- lang/py-qt5-qml/Makefile
+++ lang/py-qt5-qml/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QML module
 CONFIGURE_ARGS=	--enable QtQml
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run network_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui network qml buildtools_build qmake_build
+USE_QT=		core gui network qml buildtools_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git lang/qt5-qml/Makefile lang/qt5-qml/Makefile
index e51f7fcb9d5e..eb8dbd6b4078 100644
--- lang/qt5-qml/Makefile
+++ lang/qt5-qml/Makefile
@@ -11,9 +11,8 @@ COMMENT=	Qt QML and JavaScript language module
 
 BROKEN_powerpc64=	Does not build
 
-USE_QT5=	core network buildtools_build
-QT_DIST=	declarative
-USES=		python:build qmake
+USE_QT=		core network buildtools_build
+USES=		python:build qmake qt-dist:5,declarative
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 BUILD_WRKSRC=	${WRKSRC}/src
diff --git mail/kbiff/Makefile mail/kbiff/Makefile
index 7a292dac0cbc..646b1d1a3c9d 100644
--- mail/kbiff/Makefile
+++ mail/kbiff/Makefile
@@ -12,9 +12,9 @@ COMMENT=	Mail notification utility for KDE with nice features
 
 LICENSE=	GPLv2
 
-USES=		cmake gettext kde:4 perl5 tar:bzip2
+USES=		cmake gettext kde:4 perl5 qt:4 tar:bzip2
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	corelib dbus gui network svg xml \
+USE_QT=		corelib dbus gui network svg xml \
 		qmake_build uic_build rcc_build
 USE_PERL5=	build
 
diff --git mail/kshowmail/Makefile mail/kshowmail/Makefile
index 309ead870587..7ba882c33565 100644
--- mail/kshowmail/Makefile
+++ mail/kshowmail/Makefile
@@ -12,9 +12,9 @@ COMMENT=	POP3 mail checker for KDE
 
 LICENSE=	GPLv2
 
-USES=		cmake gettext kde:4 perl5
+USES=		cmake gettext kde:4 perl5 qt:4
 USE_KDE=	automoc4 kdelibs pimlibs
-USE_QT4=	corelib dbus gui network svg xml \
+USE_QT=		corelib dbus gui network svg xml \
 		qmake_build uic_build rcc_build
 USE_PERL5=	build
 
diff --git mail/qgmailnotifier/Makefile mail/qgmailnotifier/Makefile
index 86e5da209af2..15931c67ee78 100644
--- mail/qgmailnotifier/Makefile
+++ mail/qgmailnotifier/Makefile
@@ -9,8 +9,8 @@ MASTER_SITES=	GH
 MAINTAINER=	crees@FreeBSD.org
 COMMENT=	Portable Qt 4 based GMail notifier
 
-USES=		qmake tar:tgz
-USE_QT4=	moc_build uic_build gui network xml rcc_build
+USES=		qmake qt:4 tar:tgz
+USE_QT=		moc_build uic_build gui network xml rcc_build
 USE_GITHUB=	yes
 GH_ACCOUNT=	eteran
 
diff --git mail/trojita/Makefile mail/trojita/Makefile
index 4fbfea593d09..8979f2f30acd 100644
--- mail/trojita/Makefile
+++ mail/trojita/Makefile
@@ -26,8 +26,8 @@ CMAKE_ARGS+=	-DWITH_CLEARTEXT_PLUGIN:STRING=ON -DWITH_DBUS:STRING=ON \
 		-DWITH_SHARED_PLUGINS:STRING=ON -DWITH_TESTS:STRING=OFF \
 		-DWITH_ZLIB:STRING=ON \
 		-DWITH_QT5:STRING=ON
-USES=		cmake compiler:c++11-lib cpe desktop-file-utils tar:xz
-USE_QT5=	buildtools_build linguisttools_build qmake_build \
+USES=		cmake compiler:c++11-lib cpe desktop-file-utils qt:5 tar:xz
+USE_QT=		buildtools_build linguisttools_build qmake_build \
 		core dbus gui network sql sql-sqlite3 svg webkit widgets
 
 .include <bsd.port.mk>
diff --git math/abakus/Makefile math/abakus/Makefile
index ab0c5775e8ec..01837a72dc9a 100644
--- math/abakus/Makefile
+++ math/abakus/Makefile
@@ -15,9 +15,9 @@ LICENSE=	GPLv2
 BUILD_DEPENDS=	${LOCALBASE}/bin/flex:textproc/flex
 LIB_DEPENDS=	libmpfr.so:math/mpfr
 
-USES=		bison cmake kde:4 tar:bzip2
+USES=		bison cmake kde:4 qt:4 tar:bzip2
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 CMAKE_ARGS=	-DCMAKE_REQUIRED_INCLUDES:STRING="${LOCALBASE}/include" \
 		-DCMAKE_REQUIRED_FLAGS:STRING="${LDFLAGS}" \
 		-DFLEX_EXECUTABLE:FILEPATH=${LOCALBASE}/bin/flex
diff --git math/acalc/Makefile math/acalc/Makefile
index 20c9349db46d..e61bf2ebfa0c 100644
--- math/acalc/Makefile
+++ math/acalc/Makefile
@@ -15,8 +15,8 @@ BROKEN_powerpc64=	fails to compile: cc1plus: unrecognized command line option "-
 USE_GITHUB=	yes
 GH_ACCOUNT=	anpp
 
-USES=		qmake
-USE_QT4=	corelib gui moc_build rcc_build uic_build
+USES=		qmake qt:4
+USE_QT=		corelib gui moc_build rcc_build uic_build
 WRKSRC_SUBDIR=	aCalc/aCalc
 
 PLIST_FILES=	bin/acalc share/pixmaps/Calculator-50.png
diff --git math/analitza-kde4/Makefile math/analitza-kde4/Makefile
index a830604d0eaf..72231fbf9bcb 100644
--- math/analitza-kde4/Makefile
+++ math/analitza-kde4/Makefile
@@ -13,9 +13,9 @@ LICENSE_COMB=	multi
 LICENSE_FILE_GFDL=	${WRKSRC}/COPYING.DOC
 LICENSE_FILE_GPLv2=	${WRKSRC}/COPYING
 
-USES=		cmake:outsource ncurses kde:4 readline tar:xz
+USES=		cmake:outsource ncurses kde:4 qt:4 readline tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib dbus gui opengl svg xml \
+USE_QT=		corelib dbus gui opengl svg xml \
 		moc_build qmake_build rcc_build uic_build
 USE_GL=		glu
 USE_LDCONFIG=	yes
diff --git math/analitza/Makefile math/analitza/Makefile
index e43e71976ec1..69761577d45b 100644
--- math/analitza/Makefile
+++ math/analitza/Makefile
@@ -12,10 +12,10 @@ LICENSE_COMB=		multi
 LICENSE_FILE_GFDL=	${WRKSRC}/COPYING.DOC
 LICENSE_FILE_GPLv2=	 ${WRKSRC}/COPYING
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_GL=		glu
 USE_KDE=	ecm
-USE_QT5=	core gui network opengl printsupport qml quick svg widgets xml \
+USE_QT=		core gui network opengl printsupport qml quick svg widgets xml \
 		buildtools_build linguisttools_build qmake_build
 
 USE_LDCONFIG=	yes
diff --git math/cantor-kde4/Makefile math/cantor-kde4/Makefile
index 337008724492..e1addc922598 100644
--- math/cantor-kde4/Makefile
+++ math/cantor-kde4/Makefile
@@ -12,9 +12,9 @@ LIB_DEPENDS=	libspectre.so:print/libspectre \
 		libqalculate.so:math/libqalculate \
 		libanalitza.so:math/analitza-kde4
 
-USES=		cmake:outsource kde:4 pkgconfig python:2.7 tar:xz
+USES=		cmake:outsource kde:4 pkgconfig python:2.7 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib qtestlib_build xml xmlpatterns \
+USE_QT=		corelib qtestlib_build xml xmlpatterns \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git math/cantor/Makefile math/cantor/Makefile
index 71707824e81b..3944753544a0 100644
--- math/cantor/Makefile
+++ math/cantor/Makefile
@@ -14,13 +14,13 @@ LIB_DEPENDS=	libAnalitza.so:math/analitza \
 BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl \
 		docbook-xml>0:textproc/docbook-xml
 
-USES=		cmake:outsource gettext kde:5 pkgconfig python:3.4+ tar:xz
+USES=		cmake:outsource gettext kde:5 pkgconfig python:3.4+ qt:5 tar:xz
 USE_KDE=	attica auth archive bookmarks codecs completion config \
 		configwidgets coreaddons crash ecm emoticons i18n iconthemes \
 		itemmodels itemviews init jobwidgets kdelibs4support kio \
 		newstuff parts pty service solid sonnet texteditor textwidgets \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network printsupport widgets xml xmlpatterns \
+USE_QT=		core dbus gui network printsupport widgets xml xmlpatterns \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git math/cgal/Makefile math/cgal/Makefile
index 7b9e65238733..e2a9b13d290b 100644
--- math/cgal/Makefile
+++ math/cgal/Makefile
@@ -38,8 +38,9 @@ VISUALIZATION_LIB_DEPENDS=	libgeomview.so:graphics/geomview
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MQT5}
+USES+=		qt:5
 CMAKE_ARGS+=	-DWITH_CGAL_Qt5=ON
-USE_QT5+=	core gui opengl widgets svg buildtools_build qmake_build
+USE_QT+=	core gui opengl widgets svg buildtools_build qmake_build
 USE_GL+=	gl glu
 .else
 CMAKE_ARGS+=	-DWITH_CGAL_Qt5=OFF
diff --git math/freemat/Makefile math/freemat/Makefile
index 3456fb92e5ad..c5e3b87da3b6 100644
--- math/freemat/Makefile
+++ math/freemat/Makefile
@@ -27,9 +27,9 @@ LIB_DEPENDS=	libarpack.so:math/arpack			\
 		libportaudio.so:audio/portaudio		\
 		libumfpack.so:math/suitesparse
 
-USES=		blaslapack cmake:outsource dos2unix fortran pkgconfig python:2.7,build
+USES=		blaslapack cmake:outsource dos2unix fortran pkgconfig python:2.7,build qt:4
 USE_GL=		yes
-USE_QT4=	gui network opengl svg webkit xml			\
+USE_QT=		gui network opengl svg webkit xml			\
 		moc_build qmake_build rcc_build uic_build
 CMAKE_ARGS=	-DCMAKE_LIBRARY_PATH:STRING="${LOCALBASE}/llvm33/lib"	\
 		-DCMAKE_PREFIX_PATH:STRING="${LOCALBASE}/share/llvm33/cmake" \
diff --git math/g2o/Makefile math/g2o/Makefile
index 5c77ffd89c79..0d3a3c6906e1 100644
--- math/g2o/Makefile
+++ math/g2o/Makefile
@@ -15,11 +15,11 @@ LICENSE_COMB=	dual
 LIB_DEPENDS=	libcxsparse.so:math/suitesparse \
 		libQGLViewer-qt5.so:graphics/libQGLViewer
 
-USES=		cmake:outsource eigen:3
+USES=		cmake:outsource eigen:3 qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	RainerKuemmerle
 USE_GL=		gl glu
-USE_QT5=	core gui opengl xml widgets buildtools_build qmake_build
+USE_QT=		core gui opengl xml widgets buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
 CMAKE_OFF=	DO_SSE_AUTODETECT
diff --git math/kalgebra-kde4/Makefile math/kalgebra-kde4/Makefile
index b13c52f896c3..60e649450dbd 100644
--- math/kalgebra-kde4/Makefile
+++ math/kalgebra-kde4/Makefile
@@ -12,10 +12,10 @@ LIB_DEPENDS=	libanalitza.so:math/analitza-kde4
 
 CMAKE_ARGS=	-DBUILD_mobile:BOOL=FALSE
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_GL=		glu
 USE_KDE=	kdelibs libkeduvocdocument automoc4
-USE_QT4=	corelib declarative gui opengl \
+USE_QT=		corelib declarative gui opengl \
 		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git math/kalgebra/Makefile math/kalgebra/Makefile
index 13aaadd1db72..37e1cac1a4a0 100644
--- math/kalgebra/Makefile
+++ math/kalgebra/Makefile
@@ -12,11 +12,11 @@ BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-
 		docbook-xml>0:textproc/docbook-xml
 
 CMAKE_ARGS=	-DBUILD_mobile:BOOL=FALSE
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_GL=		glu
 USE_KDE=	auth codecs config configwidgets coreaddons doctools ecm i18n \
 		kio service widgetsaddons xmlgui
-USE_QT5=	core dbus gui location network opengl printsupport qml quick \
+USE_QT=		core dbus gui location network opengl printsupport qml quick \
 		svg testlib webchannel webengine widgets xml \
 		buildtools_build qmake_build
 
diff --git math/kbruch-kde4/Makefile math/kbruch-kde4/Makefile
index 7c1e58bae518..d49698913ea4 100644
--- math/kbruch-kde4/Makefile
+++ math/kbruch-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	math kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE 4 application to exercise fractions
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git math/kbruch/Makefile math/kbruch/Makefile
index 32840d8add6c..24018e8a090c 100644
--- math/kbruch/Makefile
+++ math/kbruch/Makefile
@@ -10,10 +10,10 @@ COMMENT=	KDE 4 application to exercise fractions
 BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl \
 		docbook-xml>0:textproc/docbook-xml
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth config crash codecs configwidgets coreaddons doctools ecm \
 		i18n widgetsaddons xmlgui
-USE_QT5=	core dbus gui xml widgets \
+USE_QT=		core dbus gui xml widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git math/kcalc-kde4/Makefile math/kcalc-kde4/Makefile
index 5a233556da13..038e36635fe6 100644
--- math/kcalc-kde4/Makefile
+++ math/kcalc-kde4/Makefile
@@ -11,8 +11,8 @@ COMMENT=	Scientific calculator for KDE
 LIB_DEPENDS=	libgmp.so:math/gmp \
 		libmpfr.so:math/mpfr
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	xml qmake_build moc_build rcc_build uic_build
+USE_QT=		xml qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git math/kcalc/Makefile math/kcalc/Makefile
index 3b18ad725dac..1c788bb3f850 100644
--- math/kcalc/Makefile
+++ math/kcalc/Makefile
@@ -12,10 +12,10 @@ LIB_DEPENDS=	libgmp.so:math/gmp \
 BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl \
 		docbook-xml>0:textproc/docbook-xml
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs coreaddons ecm config configwidgets doctools \
 		guiaddons i18n init notifications widgetsaddons xmlgui
-USE_QT5=	core dbus gui widgets xml \
+USE_QT=		core dbus gui widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git math/kig-kde4/Makefile math/kig-kde4/Makefile
index 599847e3e514..042dcb6c449d 100644
--- math/kig-kde4/Makefile
+++ math/kig-kde4/Makefile
@@ -11,9 +11,9 @@ COMMENT=	KDE 4 interactive geometry application
 LIB_DEPENDS=	${PY_BOOST}
 
 USES=		cmake:outsource compiler:c++11-lib kde:4 python:2.7,run \
-		shebangfix tar:xz
+		qt:4 shebangfix tar:xz
 USE_KDE=	kdelibs soprano automoc4
-USE_QT4=	corelib dbus gui network svg xml \
+USE_QT=		corelib dbus gui network svg xml \
 		moc_build qmake_build rcc_build uic_build
 
 SHEBANG_FILES=	pykig/pykig.py
diff --git math/kig/Makefile math/kig/Makefile
index 884aa69c186a..f5eb67b521f2 100644
--- math/kig/Makefile
+++ math/kig/Makefile
@@ -10,12 +10,12 @@ COMMENT=	KDE interactive geometry application
 LIB_DEPENDS=	${PY_BOOST}
 
 USES=		cmake:outsource gettext compiler:c++11-lib kde:5 \
-		python:2.7,run shebangfix tar:xz
+		python:2.7,run qt:5 shebangfix tar:xz
 USE_KDE=	archive auth codecs completion config configwidgets coreaddons \
 		crash doctools ecm emoticons i18n iconthemes init itemmodels \
 		jobwidgets kdelibs4support kio parts service sonnet texteditor \
 		textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus gui network printsupport svg widgets xml xmlpatterns \
+USE_QT=		core dbus gui network printsupport svg widgets xml xmlpatterns \
 		buildtools_build qmake_build
 SHEBANG_FILES=	pykig/pykig.py
 
diff --git math/kmplot-kde4/Makefile math/kmplot-kde4/Makefile
index d4395f7d7f4f..5d5ac1a05675 100644
--- math/kmplot-kde4/Makefile
+++ math/kmplot-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	math kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Mathematical function plotter for KDE 4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	xml moc_build qmake_build rcc_build uic_build
+USE_QT=		xml moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git math/kmplot/Makefile math/kmplot/Makefile
index d1edc7331f92..073f191c8c3f 100644
--- math/kmplot/Makefile
+++ math/kmplot/Makefile
@@ -7,13 +7,13 @@ CATEGORIES=	math kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Mathematical function plotter for KDE
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm emoticons guiaddons i18n \
 		iconthemes init itemmodels itemviews jobwidgets \
 		kdelibs4support kio notifications parts service solid sonnet \
 		textwidgets unitconversion widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network printsupport svg widgets xml \
+USE_QT=		core dbus gui network printsupport svg widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git math/labplot/Makefile math/labplot/Makefile
index 00cf90be7189..306ab8803449 100644
--- math/labplot/Makefile
+++ math/labplot/Makefile
@@ -31,13 +31,13 @@ NETCDF_DESC=		Build with NetCDF support
 NETCDF_CMAKE_BOOL=	ENABLE_NETCDF
 NETCDF_LIB_DEPENDS=	libnetcdf.so:science/netcdf
 
-USES=		cmake:outsource desktop-file-utils kde:5 shared-mime-info tar:xz
+USES=		cmake:outsource desktop-file-utils kde:5 qt:5 shared-mime-info tar:xz
 USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		coreaddons crash ecm guiaddons i18n iconthemes itemviews \
 		jobwidgets kdelibs4support kio newstuff notifications parts \
 		service solid sonnet textwidgets unitconversion widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	core dbus gui network printsupport svg widgets xml \
+USE_QT=		core dbus gui network printsupport svg widgets xml \
 		buildtools_build qmake_build
 
 DATADIR=	${PREFIX}/share/labplot2
diff --git math/mathgl/Makefile math/mathgl/Makefile
index dc80a4af0a9b..f227f428986a 100644
--- math/mathgl/Makefile
+++ math/mathgl/Makefile
@@ -53,8 +53,8 @@ MPI_CMAKE_BOOL=		enable-mpi
 MPI_LIB_DEPENDS=	libmpi.so:net/openmpi
 
 QT5_CMAKE_BOOL=		enable-qt5
-QT5_USE=		QT5=core,gui,opengl,printsupport,widgets,buildtools_build,qmake_build
-QT5_USES=		desktop-file-utils shared-mime-info
+QT5_USE=		QT=core,gui,opengl,printsupport,widgets,buildtools_build,qmake_build
+QT5_USES=		desktop-file-utils qt:5 shared-mime-info
 FLTK_CMAKE_BOOL=	enable-fltk
 FLTK_LIB_DEPENDS=	libfltk.so:x11-toolkits/fltk
 FLTK_USE=		XORG=ice,sm,x11,xext
diff --git math/mathmod/Makefile math/mathmod/Makefile
index ae4028925847..b917d193b831 100644
--- math/mathmod/Makefile
+++ math/mathmod/Makefile
@@ -14,9 +14,9 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	parisolab
 GH_PROJECT=	${PORTNAME:tl}
 
-USES=		dos2unix qmake
+USES=		dos2unix qmake qt:5
 USE_GL=		gl
-USE_QT5=	buildtools_build core gui opengl qmake_build widgets
+USE_QT=		buildtools_build core gui opengl qmake_build widgets
 
 PLIST_FILES=	bin/${PORTNAME}
 
diff --git math/octave/Makefile math/octave/Makefile
index edf3ea81c6f3..f059036cf760 100644
--- math/octave/Makefile
+++ math/octave/Makefile
@@ -40,7 +40,7 @@ LIB_DEPENDS=	libGraphicsMagick.so:graphics/GraphicsMagick \
 		libOSMesa.so:graphics/libosmesa \
 		libsundials_arkode.so:math/sundials
 
-USES=		charsetfix fortran gmake libtool perl5 pkgconfig readline \
+USES=		charsetfix fortran gmake libtool perl5 pkgconfig qt:5 readline \
 		tar:xz compiler:c++14-lang
 USE_LDCONFIG=	${PREFIX}/lib/${PORTNAME}/${PORTVERSION}
 USE_PERL5=	build
@@ -48,7 +48,7 @@ USE_TEX=	dvipsk:build formats:build
 GNU_CONFIGURE=	yes
 USE_JAVA=	yes
 JAVA_VERSION=	1.7+
-USE_QT5=	core gui help network opengl \
+USE_QT=		core gui help network opengl \
 		qmake_build buildtools_build linguist_build
 USE_XORG=	x11 xext xfixes xft
 USE_GL=		gl glu
diff --git math/qtiplot/Makefile math/qtiplot/Makefile
index 62a9d88cffd4..1a0400a81a90 100644
--- math/qtiplot/Makefile
+++ math/qtiplot/Makefile
@@ -17,8 +17,8 @@ LIB_DEPENDS=	libgsl.so:math/gsl \
 #		qwt.5:x11-toolkits/qwt5 \
 #		qwtplot3d-qt4:math/qwtplot3d-qt4
 
-USES=		dos2unix gmake qmake tar:bzip2
-USE_QT4=	gui opengl svg qt3support network assistantclient \
+USES=		dos2unix gmake qmake qt:4 tar:bzip2
+USE_QT=		gui opengl svg qt3support network assistantclient \
 		moc_build rcc_build
 USE_GL=		glu
 QMAKE_ARGS+=	LOCALBASE=${LOCALBASE} PYTHON_CMD=${PYTHON_CMD}
@@ -34,7 +34,8 @@ OPTIONS_SUB=	yes
 
 DOCS_DESC=	Install the QtiPlot Handbook
 DOCS_RUN_DEPENDS=	qtiplot-doc>=0:math/qtiplot-doc
-DOCS_USE=	QT4=assistant-adp_run
+DOCS_USES=	qt:4
+DOCS_USE=	QT=assistant-adp_run
 
 PYTHON_DESC=	Python scripting support
 PYTHON_USES=	pyqt:4 python:2.7
@@ -42,7 +43,8 @@ PYTHON_USE=	pyqt=gui
 PYTHON_CONFIGURE_ENV=	PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR} \
 			PYTHON_VERSION=${PYTHON_VERSION}
 
-NLS_USE=	QT4=linguisttools_build
+NLS_USES=	qt:4
+NLS_USE=	QT=linguisttools_build
 
 post-extract:
 	${CP} ${FILESDIR}/build.conf ${WRKSRC}
diff --git math/qtoctave/Makefile math/qtoctave/Makefile
index a01258289787..6d1308e2bcc5 100644
--- math/qtoctave/Makefile
+++ math/qtoctave/Makefile
@@ -11,10 +11,10 @@ COMMENT=	Qt 4 frontend for Octave
 
 RUN_DEPENDS=	octave:math/octave
 
-USE_QT4=	designer gui network script svg xml \
+USE_QT=		designer gui network script svg xml \
 		qmake_build moc_build rcc_build uic_build \
 		linguisttools_build
-USES=		cmake
+USES=		cmake qt:4
 CMAKE_ARGS+=	-DWITH_UseRPMTools:Bool=Off
 
 post-patch:
diff --git math/qwtplot3d-qt4/Makefile math/qwtplot3d-qt4/Makefile
index 61c8a14656ad..a14495737ed6 100644
--- math/qwtplot3d-qt4/Makefile
+++ math/qwtplot3d-qt4/Makefile
@@ -10,8 +10,8 @@ PKGNAMESUFFIX=	-qt4
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	3D plotting widgets for scientific data and math expressions
 
-USES=		dos2unix qmake tar:tgz
-USE_QT4=	gui moc_build opengl
+USES=		dos2unix qmake qt:4 tar:tgz
+USE_QT=		gui moc_build opengl
 USE_GL=		glu
 USE_LDCONFIG=	yes
 
diff --git math/rkward-kde/Makefile math/rkward-kde/Makefile
index f32b2301c70c..39308a3e6985 100644
--- math/rkward-kde/Makefile
+++ math/rkward-kde/Makefile
@@ -15,8 +15,8 @@ LICENSE=	GPLv2
 LIB_DEPENDS=	libR.so:math/R \
 		libsoprano.so:textproc/soprano
 
-USES=		cmake desktop-file-utils gettext fortran kde:5 php:cli shared-mime-info
-USE_QT5=	buildtools core dbus gui network printsupport qmake script webkit	\
+USES=		cmake desktop-file-utils gettext fortran kde:5 php:cli qt:5 shared-mime-info
+USE_QT=		buildtools core dbus gui network printsupport qmake script webkit	\
 		widgets xml
 USE_XORG=	x11
 USE_KDE=	auth bookmarks codecs completion config configwidgets coreaddons crash	\
diff --git math/rocs-kde4/Makefile math/rocs-kde4/Makefile
index 427e69b7239d..2e5fd3cb3ba4 100644
--- math/rocs-kde4/Makefile
+++ math/rocs-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	KDE Graph theory IDE
 
 LIB_DEPENDS=	libboost_thread.so:devel/boost-libs
 
-USES=		cmake:outsource grantlee:4 kde:4 tar:xz
+USES=		cmake:outsource grantlee:4 kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	gui qtestlib script scripttools webkit xml \
+USE_QT=		gui qtestlib script scripttools webkit xml \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git math/rocs/Makefile math/rocs/Makefile
index da77f1845ceb..2b15e50b0e07 100644
--- math/rocs/Makefile
+++ math/rocs/Makefile
@@ -9,12 +9,12 @@ COMMENT=	KDE Graph theory IDE
 
 LIB_DEPENDS=	libboost_thread.so:devel/boost-libs
 
-USES=		cmake:outsource gettext grantlee:5 kde:5 tar:xz
+USES=		cmake:outsource gettext grantlee:5 kde:5 qt:5 tar:xz
 USE_KDE=	archive auth codecs completion config configwidgets coreaddons \
 		crash doctools ecm i18n itemviews jobwidgets kdeclarative \
 		kio package parts service sonnet texteditor textwidgets \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml script quick scripttools svg webkit \
+USE_QT=		core dbus gui network qml script quick scripttools svg webkit \
 		widgets xml xmlpatterns \
 		buildtools_build qmake_build
 
diff --git math/speedcrunch/Makefile math/speedcrunch/Makefile
index d2b89c8b7654..f858b0e5bf87 100644
--- math/speedcrunch/Makefile
+++ math/speedcrunch/Makefile
@@ -12,7 +12,7 @@ COMMENT=	Keyboard-oriented desktop scientific calculator
 
 LICENSE=	GPLv2+
 
-USES=		cmake:outsource
+USES=		cmake:outsource qt:5
 
 BB_ACCOUNT=	heldercorreia
 BB_PROJECT=	${PORTNAME}
@@ -20,7 +20,7 @@ BB_COMMIT=	7f2565d6a0ad
 
 WRKSRC=		${WRKDIR}/${BB_ACCOUNT}-${BB_PROJECT}-${BB_COMMIT}
 CMAKE_SOURCE_PATH=	${WRKSRC}/src
-USE_QT5=	buildtools core gui help qmake_build qml widgets
+USE_QT=		buildtools core gui help qmake_build qml widgets
 USE_XORG=	x11
 
 post-patch:
diff --git math/vtk5/Makefile math/vtk5/Makefile
index e50064291c9d..76abfb6c262c 100644
--- math/vtk5/Makefile
+++ math/vtk5/Makefile
@@ -26,7 +26,7 @@ CONFLICTS=	vtk-4*
 
 SUB_FILES=	vtk.3
 
-USES=		alias cmake:outsource jpeg
+USES=		alias cmake:outsource jpeg qt:4
 USE_XORG=	xt
 USE_LDCONFIG=	${PREFIX}/lib/vtk-${PORTVERSION:R}
 CXXFLAGS+=	-DUSE_INTERP_ERRORLINE
@@ -120,7 +120,7 @@ PLIST_SUB+=	X11=""
 .endif
 
 .if ${PORT_OPTIONS:MQT4}
-USE_QT4=	corelib designer gui opengl qmake_build uic_build \
+USE_QT=		corelib designer gui opengl qmake_build uic_build \
 		moc_build rcc_build
 CMAKE_ARGS+=	-DVTK_USE_QVTK:BOOL=ON \
 		-DVTK_USE_QT:BOOL=ON \
diff --git math/vtk6/Makefile math/vtk6/Makefile
index af9a91ab6962..096a41b90ec7 100644
--- math/vtk6/Makefile
+++ math/vtk6/Makefile
@@ -126,7 +126,8 @@ PLIST_SUB+=	MPI="@comment "
 .endif
 
 .if ${PORT_OPTIONS:MQT4}
-USE_QT4=	gui_build gui_run network_build network_run sql_build sql_run \
+USES+=		qt:4
+USE_QT=		gui_build gui_run network_build network_run sql_build sql_run \
 		moc_build uic_build qmake_build rcc_build opengl webkit_build \
 		webkit_run
 CMAKE_ARGS+=	-DVTK_QT_VERSION:STRING="4"
@@ -134,7 +135,8 @@ PLIST_SUB+=	QTV="qt4"
 .endif
 
 .if ${PORT_OPTIONS:MQT5}
-USE_QT5=	gui_build gui_run network_build network_run sql_build sql_run \
+USES+=		qt:5
+USE_QT=		gui_build gui_run network_build network_run sql_build sql_run \
 		qmake_build opengl webkit_build buildtools webkit_run
 CMAKE_ARGS+=	-DVTK_QT_VERSION:STRING="5" \
 		-DCMAKE_PREFIX_PATH:STRING=${LOCALBASE}/lib/qt5
@@ -151,9 +153,9 @@ CMAKE_ARGS+=	-DVTK_Group_Qt:BOOL=OFF
 
 .if ${PORT_OPTIONS:MDESIGNER}
 .if ${PORT_OPTIONS:MQT5}
-USE_QT5+=	designer
+USE_QT+=	designer
 .elif ${PORT_OPTIONS:MQT4}
-USE_QT4+=	designer
+USE_QT+=	designer
 .else
 IGNORE=	designer requires either QT4 or QT5
 .endif
diff --git misc/artikulate-kde4/Makefile misc/artikulate-kde4/Makefile
index e7955cf3aa19..5919116b5900 100644
--- misc/artikulate-kde4/Makefile
+++ misc/artikulate-kde4/Makefile
@@ -14,9 +14,9 @@ RUN_DEPENDS=	${LOCALBASE}/lib/kde4/imports/org/kde/charts/qmldir:graphics/kqtqui
 
 IGNORE=		not usable, links to both GStreamer 0.10.x and 1.x
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs libkeduvocdocument runtime_run
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git misc/artikulate/Makefile misc/artikulate/Makefile
index e687c2e892c7..48314c630d84 100644
--- misc/artikulate/Makefile
+++ misc/artikulate/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Pronunciation trainer for KDE
 LIB_DEPENDS=	libboost_thread.so:devel/boost-libs \
 		libQt5GStreamer-1.0.so:multimedia/gstreamer1-qt@qt5
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive attica auth codecs config configwidgets coreaddons \
 		crash doctools ecm i18n kdeclarative newstuff service \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui multimedia network qml quick sql testlib widgets \
+USE_QT=		core dbus gui multimedia network qml quick sql testlib widgets \
 		xml xmlpatterns \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git misc/bibletime/Makefile misc/bibletime/Makefile
index ce2c09322b84..656f024cf7d3 100644
--- misc/bibletime/Makefile
+++ misc/bibletime/Makefile
@@ -16,8 +16,8 @@ BROKEN_powerpc64=	fails to compile: btosismorphsegmentation.cpp.o: undefined ref
 LIB_DEPENDS=	libclucene-core.so:textproc/clucene \
 		libsword.so:misc/sword
 
-USES=		cmake:outsource tar:xz ssl
-USE_QT4=	corelib dbus gui iconengines network phonon qtestlib script \
+USES=		cmake:outsource qt:4 tar:xz ssl
+USE_QT=		corelib dbus gui iconengines network phonon qtestlib script \
 		svg webkit xml linguist_build moc_build qmake_build \
 		rcc_build uic_build
 
diff --git misc/crosti/Makefile misc/crosti/Makefile
index b6ca56c17ee3..c61a611d8d50 100644
--- misc/crosti/Makefile
+++ misc/crosti/Makefile
@@ -12,9 +12,9 @@ COMMENT=	Convert custom image to cross stitch design, edit stitch designs
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/gpl.txt
 
-USES=		desktop-file-utils dos2unix qmake shared-mime-info zip
+USES=		desktop-file-utils dos2unix qmake qt:5 shared-mime-info zip
 USE_GL=		gl
-USE_QT5=	concurrent core gui printsupport svg widgets buildtools_build
+USE_QT=		concurrent core gui printsupport svg widgets buildtools_build
 DOS2UNIX_FILES=	${PORTNAME}.pro
 NO_WRKSUBDIR=	yes
 
diff --git misc/kde-thumbnailer-chm/Makefile misc/kde-thumbnailer-chm/Makefile
index 8d67e99bf87e..25d12458eb7f 100644
--- misc/kde-thumbnailer-chm/Makefile
+++ misc/kde-thumbnailer-chm/Makefile
@@ -12,9 +12,9 @@ COMMENT=	KDE thumbnail generator for CHM files
 
 LIB_DEPENDS=	libchm.so:misc/chmlib
 
-USES=		cmake kde:4
+USES=		cmake kde:4 qt:4
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
 PLIST_FILES=	lib/kde4/chmthumbnail.so \
diff --git misc/kde-thumbnailer-epub/Makefile misc/kde-thumbnailer-epub/Makefile
index 8d5bde13911b..1c5656e4b965 100644
--- misc/kde-thumbnailer-epub/Makefile
+++ misc/kde-thumbnailer-epub/Makefile
@@ -12,9 +12,9 @@ COMMENT=	KDE thumbnail generator for ePub files
 
 PORTSCOUT=	limit:^1\.0
 
-USES=		cmake:outsource kde:4
+USES=		cmake:outsource kde:4 qt:4
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
 PLIST_FILES=	lib/kde4/epubthumbnail.so \
diff --git misc/kde-thumbnailer-fb2/Makefile misc/kde-thumbnailer-fb2/Makefile
index c9f31fc7d3ac..d98c926bc687 100644
--- misc/kde-thumbnailer-fb2/Makefile
+++ misc/kde-thumbnailer-fb2/Makefile
@@ -10,9 +10,9 @@ DISTNAME=	160180-${PORTNAME}-${PORTVERSION}
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	KDE thumbnail generator for fb2 files
 
-USES=		cmake:outsource kde:4
+USES=		cmake:outsource kde:4 qt:4
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
 PLIST_FILES=	lib/kde4/fb2thumbnail.so \
diff --git misc/kde4-l10n/files/bsd.l10n.mk misc/kde4-l10n/files/bsd.l10n.mk
index 7fd09d3cc41a..5566e4635090 100644
--- misc/kde4-l10n/files/bsd.l10n.mk
+++ misc/kde4-l10n/files/bsd.l10n.mk
@@ -7,9 +7,9 @@ CONFLICTS_INSTALL=	kf5-baloo-5.* \
 			kf5-kdelibs4support-5.* \
 			kf5-kfilemetadata-5.*
 
-USE_QT4=	uic_build moc_build qmake_build rcc_build xml
+USE_QT=		uic_build moc_build qmake_build rcc_build xml
 USE_KDE=	kdelibs automoc4
-USES=		cmake gettext kde:4 tar:xz
+USES=		cmake gettext kde:4 qt:4 tar:xz
 
 
 # Support for spelling dictionaries
diff --git misc/kdeedu-data/Makefile misc/kdeedu-data/Makefile
index d8d50d6f5994..700983b4bdc2 100644
--- misc/kdeedu-data/Makefile
+++ misc/kdeedu-data/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	misc kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE edu data files
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build qmake_build
+USE_QT=		buildtools_build qmake_build
 
 # The qmake dependency is only needed so that kf5-e-c-m can query qmake for
 # some installation directories.
diff --git misc/kf5-purpose/Makefile misc/kf5-purpose/Makefile
index 64043af32847..08c9712d5a37 100644
--- misc/kf5-purpose/Makefile
+++ misc/kf5-purpose/Makefile
@@ -11,10 +11,10 @@ LIB_DEPENDS=	libaccounts-qt5.so:net-im/libaccounts-qt5 \
 		libkaccounts.so:net-im/kaccounts-integration
 
 USES=		cmake:outsource compiler:c++11-lang gettext \
-		kde:5 pkgconfig tar:xz
+		kde:5 pkgconfig qt:5 tar:xz
 USE_GNOME=	intltool
 USE_KDE=	config coreaddons ecm i18n kdeclarative kio service widgetsaddons
-USE_QT5=	concurrent core dbus gui network qml widgets xml \
+USE_QT=		concurrent core dbus gui network qml widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git misc/kgeography-kde4/Makefile misc/kgeography-kde4/Makefile
index 21748074f7ea..23b3d2262f2f 100644
--- misc/kgeography-kde4/Makefile
+++ misc/kgeography-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	misc kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE 4 geography trainer
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	xml moc_build qmake_build rcc_build uic_build
+USE_QT=		xml moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git misc/kgeography/Makefile misc/kgeography/Makefile
index 785d575d79a6..d53a5186ae49 100644
--- misc/kgeography/Makefile
+++ misc/kgeography/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	misc kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE geography trainer
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash doctools ecm \
 		i18n iconthemes itemviews service widgetsaddons xmlgui
-USE_QT5=	core dbus gui widgets xml \
+USE_QT=		core dbus gui widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git misc/klettres-kde4/Makefile misc/klettres-kde4/Makefile
index b01cc7443ccd..3faca70e9332 100644
--- misc/klettres-kde4/Makefile
+++ misc/klettres-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	misc kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Alphabet learning tool for KDE 4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	xml moc_build qmake_build rcc_build uic_build
+USE_QT=		xml moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git misc/klettres/Makefile misc/klettres/Makefile
index c1747da25c4d..1ef5ff445ae7 100644
--- misc/klettres/Makefile
+++ misc/klettres/Makefile
@@ -8,11 +8,11 @@ CATEGORIES=	misc kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Alphabet learning tool for KDE
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	attica auth codecs completion config configwidgets coreaddons \
 		crash doctools ecm emoticons i18n init itemmodels \
 		kdelibs4support newstuff service widgetsaddons xmlgui
-USE_QT5=	core dbus gui network phonon4 svg widgets xml \
+USE_QT=		core dbus gui network phonon4 svg widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git misc/krecipes-kde4/Makefile misc/krecipes-kde4/Makefile
index e155558134af..9a43462254cb 100644
--- misc/krecipes-kde4/Makefile
+++ misc/krecipes-kde4/Makefile
@@ -12,9 +12,9 @@ COMMENT=	KDE4 recipe database
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake gettext kde:4 shared-mime-info
+USES=		cmake gettext kde:4 qt:4 shared-mime-info
 USE_GNOME=	libxml2 libxslt
-USE_QT4=	corelib dbus gui qt3support sql webkit xml \
+USE_QT=		corelib dbus gui qt3support sql webkit xml \
 		moc_build qmake_build rcc_build uic_build
 USE_KDE=	automoc4 kdelibs qimageblitz
 
@@ -24,14 +24,14 @@ OPTIONS_MULTI=		DB
 OPTIONS_MULTI_DB=	SQLITE MYSQL PGSQL
 OPTIONS_DEFAULT=	SQLITE
 
-SQLITE_USES=		sqlite
-SQLITE_USE=		QT4=sql-sqlite3_run
+SQLITE_USES=		qt:4 sqlite
+SQLITE_USE=		QT=sql-sqlite3_run
 SQLITE_CMAKE_BOOL=	WITH_Sqlite
 
-MYSQL_USES=		mysql
-MYSQL_USE=		QT4=sql-mysql_run
+MYSQL_USES=		mysql qt:4
+MYSQL_USE=		QT=sql-mysql_run
 
-PGSQL_USES=		pgsql
-PGSQL_USE=		QT4=sql-pgsql_run
+PGSQL_USES=		pgsql qt:4
+PGSQL_USE=		QT=sql-pgsql_run
 
 .include <bsd.port.mk>
diff --git misc/ktouch-kde4/Makefile misc/ktouch-kde4/Makefile
index 5cd10e75685a..89c10a5f1066 100644
--- misc/ktouch-kde4/Makefile
+++ misc/ktouch-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	Touch typing tutor for KDE 4
 
 RUN_DEPENDS=	${LOCALBASE}/lib/kde4/imports/org/kde/charts/qmldir:graphics/kqtquickcharts-kde4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib declarative opengl phonon script sql xmlpatterns \
+USE_QT=		corelib declarative opengl phonon script sql xmlpatterns \
 		moc_build qmake_build rcc_build uic_build
 USE_XORG=	xkbfile
 
diff --git misc/ktouch/Makefile misc/ktouch/Makefile
index 6fb5b5ad8d6f..060bc9054eea 100644
--- misc/ktouch/Makefile
+++ misc/ktouch/Makefile
@@ -7,12 +7,12 @@ CATEGORIES=	misc kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Touch typing tutor for KDE
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons doctools \
 		ecm i18n itemviews kcmutils kdeclarative kio newstuff package \
 		parts service sonnet texteditor textwidgets widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	core dbus gui network qml quick script sql testlib widgets \
+USE_QT=		core dbus gui network qml quick script sql testlib widgets \
 		x11extras xml xmlpatterns \
 		buildtools_build qmake_build
 USE_XORG=	ice sm x11 xcb xext xkbfile
diff --git misc/kwordquiz-kde4/Makefile misc/kwordquiz-kde4/Makefile
index f889cb714fb9..f9b7dd46eead 100644
--- misc/kwordquiz-kde4/Makefile
+++ misc/kwordquiz-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	misc kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Flash card trainer for KDE 4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkeduvocdocument automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git misc/kwordquiz/Makefile misc/kwordquiz/Makefile
index dbb359e8eddd..a8689b3854d3 100644
--- misc/kwordquiz/Makefile
+++ misc/kwordquiz/Makefile
@@ -8,14 +8,14 @@ CATEGORIES=	misc kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Flash card trainer for KDE Applications
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	attica auth bookmarks codecs completion config configwidgets \
 		coreaddons crash doctools ecm emoticons guiaddons i18n \
 		iconthemes init itemmodels itemviews jobwidgets kdeclarative \
 		kdelibs4support kio libkeduvocdocument newstuff notifications \
 		notifyconfig parts service solid sonnet textwidgets \
 		unitconversion widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network phonon4 printsupport widgets xml \
+USE_QT=		core dbus gui network phonon4 printsupport widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git misc/libkdeedu-kde4/Makefile misc/libkdeedu-kde4/Makefile
index f456d9868990..237537705d99 100644
--- misc/libkdeedu-kde4/Makefile
+++ misc/libkdeedu-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	misc kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Libraries used by KDE educational applications
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib gui xml moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib gui xml moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git misc/libkeduvocdocument/Makefile misc/libkeduvocdocument/Makefile
index e4264904ff9f..4213eef6d7f0 100644
--- misc/libkeduvocdocument/Makefile
+++ misc/libkeduvocdocument/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	misc kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Library for reading and writing vocabulary files
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive config coreaddons ecm i18n kio service
-USE_QT5=	core gui xml \
+USE_QT=		core gui xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git misc/lxi-tools/Makefile misc/lxi-tools/Makefile
index 3e65c5f6409e..c498aa9b0886 100644
--- misc/lxi-tools/Makefile
+++ misc/lxi-tools/Makefile
@@ -31,10 +31,10 @@ PLIST_FILES=	bin/lxi \
 
 OPTIONS_DEFINE=	DOCS GUI
 
-GUI_USE=		qt5=core,gui,charts,widgets,buildtools_build,qmake_build gl=gl
+GUI_USES=		qmake:no_env qt:5
+GUI_USE=		qt=core,gui,charts,widgets,buildtools_build,qmake_build gl=gl
 GUI_CONFIGURE_ENABLE=	lxi-gui
 GUI_CONFIGURE_ENV+=	LDFLAGS="${LDFLAGS} -L${QT_LIBDIR}"
-GUI_VARS=		QT_NONSTANDARD=yes
 GUI_PLIST_FILES=	bin/lxi-gui
 
 post-patch:
diff --git misc/openmvg/Makefile misc/openmvg/Makefile
index 3225558c015b..e1c7c129efc6 100644
--- misc/openmvg/Makefile
+++ misc/openmvg/Makefile
@@ -19,14 +19,14 @@ LIB_DEPENDS=	libflann_cpp.so:math/flann \
 		libpng.so:graphics/png \
 		libtiff.so:graphics/tiff
 
-USES=		cmake:outsource eigen:3 jpeg
+USES=		cmake:outsource eigen:3 jpeg qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	openMVG
 GH_PROJECT=	openMVG
 GH_TUPLE=	openMVG-thirdparty:cereal:37fca60:cereal/dependencies/cereal \
 		openMVG-thirdparty:osi_clp:a25a980:osi/dependencies/osi_clp
 WRKSRC_SUBDIR=	src
-USE_QT5=	core gui opengl svg widgets buildtools_build qmake_build
+USE_QT=		core gui opengl svg widgets buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
 CMAKE_ARGS=	-DEIGEN_INCLUDE_DIR_HINTS=${LOCALBASE}/include/eigen3 \
diff --git misc/parley-kde4/Makefile misc/parley-kde4/Makefile
index c27743adedab..53308cec7a47 100644
--- misc/parley-kde4/Makefile
+++ misc/parley-kde4/Makefile
@@ -8,10 +8,10 @@ CATEGORIES=	misc kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Vocabulary trainer for KDE 4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_GNOME=	libxml2 libxslt
 USE_KDE=	kdelibs libkeduvocdocument attica automoc4
-USE_QT4=	corelib gui moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib gui moc_build qmake_build rcc_build uic_build
 USE_XORG=	x11 xrender
 
 .include <bsd.port.mk>
diff --git misc/parley/Makefile misc/parley/Makefile
index 0e2c11cec4e7..413ddd5499c7 100644
--- misc/parley/Makefile
+++ misc/parley/Makefile
@@ -10,14 +10,14 @@ COMMENT=	Vocabulary trainer for KDE
 BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl \
 		docbook-xml>0:textproc/docbook-xml
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_GNOME=	libxml2 libxslt
 USE_KDE=	attica auth codecs completion configwidgets coreaddons config \
 		crash doctools ecm i18n jobwidgets kcmutils kio newstuff \
 		notifications kross khtml service sonnet textwidgets \
 		widgetsaddons xmlgui \
 		libkeduvocdocument
-USE_QT5=	concurrent core dbus gui location network multimedia qml quick \
+USE_QT=		concurrent core dbus gui location network multimedia qml quick \
 		script svg webchannel webengine widgets xml \
 		buildtools_build qmake_build
 USE_XORG=	x11 xrender
diff --git misc/qbrew/Makefile misc/qbrew/Makefile
index b28f04230633..540a73b9f94f 100644
--- misc/qbrew/Makefile
+++ misc/qbrew/Makefile
@@ -10,8 +10,8 @@ MASTER_SITES=	http://www.usermode.org/code/
 MAINTAINER=	david@usermode.org
 COMMENT=	Homebrewer's recipe calculator
 
-USES=		qmake
-USE_QT4=	moc_build uic_build rcc_build xml gui
+USES=		qmake qt:4
+USE_QT=		moc_build uic_build rcc_build xml gui
 PORTDOCS=	*
 
 QMAKE_ARGS=	CONFIG+="configure"
diff --git misc/qmetro/Makefile misc/qmetro/Makefile
index 554b7aecc33d..7f62f7064545 100644
--- misc/qmetro/Makefile
+++ misc/qmetro/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Map of the transport system for many city subways
 
 LICENSE=	GPLv2
 
-USES=		dos2unix qmake zip
+USES=		dos2unix qmake qt:4 zip
 INSTALLS_ICONS=	yes
-USE_QT4=	gui xml uic_build moc_build multimedia \
+USE_QT=		gui xml uic_build moc_build multimedia \
 		rcc_build
 LDFLAGS=	-lz
 DOS2UNIX_FILES=	rc/alarm.pri
diff --git misc/qt4-doc/Makefile misc/qt4-doc/Makefile
index 02334396743e..f23026c134fa 100644
--- misc/qt4-doc/Makefile
+++ misc/qt4-doc/Makefile
@@ -10,8 +10,7 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt documentation
 
-USE_QT4=	# empty
-QT_DIST=	yes
+USES=		qmake:no_configure qt-dist:4
 NO_BUILD=	yes
 
 EXTRACT_AFTER_ARGS=	'${DISTNAME}/doc'
diff --git misc/qt4-l10n/Makefile misc/qt4-l10n/Makefile
index 11ec343940dd..86ee6b997d42 100644
--- misc/qt4-l10n/Makefile
+++ misc/qt4-l10n/Makefile
@@ -9,8 +9,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt localized messages
 
-USE_QT4=	linguisttools_build
-QT_DIST=	yes
+USES=		qmake:no_configure qt-dist:4
+USE_QT=		linguisttools_build
 
 NO_ARCH=	yes
 
diff --git misc/qt4-qtconfig/Makefile misc/qt4-qtconfig/Makefile
index a3ae6b248eb4..401eaf29d899 100644
--- misc/qt4-qtconfig/Makefile
+++ misc/qt4-qtconfig/Makefile
@@ -10,10 +10,9 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 4 graphical configuration utility
 
-USES=		pkgconfig
-USE_QT4=	qmake_build moc_build rcc_build uic_build \
+USES=		pkgconfig qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build uic_build \
 		corelib dbus gui xml
-QT_DIST=	yes
 
 HAS_CONFIGURE=	yes
 
@@ -42,7 +41,8 @@ OPTIONS_DEFINE=	PHONON
 OPTIONS_DEFAULT=PHONON
 
 PHONON_DESC=	Phonon multimedia framework support (implies GStreamer)
-PHONON_USE=	GSTREAMER=yes QT4=phonon,phonon-gst
+PHONON_USES=	qt-dist:4
+PHONON_USE=	GSTREAMER=yes QT=phonon,phonon-gst
 PHONON_CONFIGURE_ON=	-phonon -gstreamer
 PHONON_CONFIGURE_OFF=	-no-phonon -no-gstreamer
 
diff --git misc/qt4-qtdemo/Makefile misc/qt4-qtdemo/Makefile
index e922a9b03090..6d6440a07d40 100644
--- misc/qt4-qtdemo/Makefile
+++ misc/qt4-qtdemo/Makefile
@@ -10,13 +10,12 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 4 demonstration and example applications
 
-USES=		pkgconfig
+USES=		pkgconfig qmake:no_env qt-dist:4
 USE_GSTREAMER=	yes
-USE_QT4=	qmake_build moc_build rcc_build uic_build corelib designer \
+USE_QT=		moc_build rcc_build uic_build corelib designer \
 		gui network opengl sql svg qtestlib xml imageformats_run dbus \
 		script webkit phonon help assistant_run phonon-gst_run scripttools \
 		xmlpatterns multimedia
-QT_DIST=	yes
 
 HAS_CONFIGURE=	yes
 
diff --git misc/qt5-doc/Makefile misc/qt5-doc/Makefile
index 3e66995e20bc..0a7fee7a2887 100644
--- misc/qt5-doc/Makefile
+++ misc/qt5-doc/Makefile
@@ -18,8 +18,8 @@ WRKSRC=		${WRKDIR}/Docs/Qt-${QT5_VERSION}
 #   tar: Damaged 7-Zip archive
 # Depend on p7zip across all versions because Uses/7z.mk does not work if
 # included after bsd.port.pre.mk.
-USES=		7z:p7zip
-USE_QT5=	# we just need access to QT5_VERSION and other variables.
+USES=		7z:p7zip qt:5
+USE_QT=		# we just need access to QT5_VERSION and other variables.
 
 DESCR=		${.CURDIR:H:H}/devel/qt5/pkg-descr
 NO_ARCH=	yes
diff --git misc/qt5-examples/Makefile misc/qt5-examples/Makefile
index d11b4b282d1e..b25ec89fc9d7 100644
--- misc/qt5-examples/Makefile
+++ misc/qt5-examples/Makefile
@@ -15,8 +15,8 @@ COMMENT=	Qt 5 examples sourcecode
 NO_ARCH=	yes
 NO_BUILD=	yes
 
-USES=		tar:xz
-USE_QT5=	#
+USES=		qt:5 tar:xz
+USE_QT=		#
 
 DESCR=		${.CURDIR:H:H}/devel/qt5/pkg-descr
 DISTINFO_FILE=	${.CURDIR}/distinfo
diff --git misc/qt5-l10n/Makefile misc/qt5-l10n/Makefile
index 6793a2fe3d72..161347669831 100644
--- misc/qt5-l10n/Makefile
+++ misc/qt5-l10n/Makefile
@@ -8,8 +8,7 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt localized messages
 
-USES=		qmake
-USE_QT5=	qmake_build linguisttools_build
-QT_DIST=	translations
+USES=		qmake qt-dist:5,translations
+USE_QT=		qmake_build linguisttools_build
 
 .include <bsd.port.mk>
diff --git misc/qt5ct/Makefile misc/qt5ct/Makefile
index 47020043cb20..df3e604655a5 100644
--- misc/qt5ct/Makefile
+++ misc/qt5ct/Makefile
@@ -13,8 +13,8 @@ LICENSE=	BSD2CLAUSE
 LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
 	libfreetype.so:print/freetype2
 
-USES=		gettext-runtime qmake tar:bz2
-USE_QT5=	core dbus gui svg widgets buildtools_build \
+USES=		gettext-runtime qmake qt:5 tar:bz2
+USE_QT=		core dbus gui svg widgets buildtools_build \
 	linguisttools_build
 USE_GL=	egl gl
 USE_XORG=	x11 xext xrender
diff --git misc/saaghar/Makefile misc/saaghar/Makefile
index 37d6efd68aa6..94a3263460ed 100644
--- misc/saaghar/Makefile
+++ misc/saaghar/Makefile
@@ -19,8 +19,8 @@ EXTRACT_DEPENDS=	${LOCALBASE}/bin/unzip:archivers/unzip
 
 OPTIONS_DEFINE=	DEBUG
 
-USES=		qmake dos2unix
-USE_QT4=	gui network sql xml sql-sqlite3_run \
+USES=		qmake dos2unix qt:4
+USE_QT=		gui network sql xml sql-sqlite3_run \
 		moc_build rcc_build uic_build phonon \
 		dbus declarative xmlpatterns svg script
 WRKSRC=		${WRKDIR}/Saaghar
diff --git misc/tellico-kde4/Makefile misc/tellico-kde4/Makefile
index 603e72542b6c..e0371369052b 100644
--- misc/tellico-kde4/Makefile
+++ misc/tellico-kde4/Makefile
@@ -21,11 +21,11 @@ LIB_DEPENDS=	libexempi.so:textproc/exempi \
 		libyaz.so:net/yaz
 
 USES=		cmake gettext kde:4 pkgconfig python:run \
-		shared-mime-info shebangfix tar:bzip2
+		qt:4 shared-mime-info shebangfix tar:bzip2
 USE_GNOME=	libxml2 libxslt
 USE_KDE=	kdelibs libksane pimlibs soprano \
 		automoc4 qimageblitz libkcddb libkcompactdisc
-USE_QT4=	corelib dbus gui network phonon svg xml \
+USE_QT=		corelib dbus gui network phonon svg xml \
 		qmake_build moc_build uic_build rcc_build
 
 SHEBANG_FILES=	src/fetch/scripts/bedetheque.py \
diff --git multimedia/2mandvd/Makefile multimedia/2mandvd/Makefile
index d2bdfb97469b..7e50401b3ef1 100644
--- multimedia/2mandvd/Makefile
+++ multimedia/2mandvd/Makefile
@@ -30,9 +30,9 @@ RUN_DEPENDS=	sox:audio/sox \
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-USES=		desktop-file-utils gmake perl5 qmake:norecursive shebangfix
+USES=		desktop-file-utils gmake perl5 qmake:norecursive qt:4 shebangfix
 SHEBANG_FILES=	fake.pl
-USE_QT4=	corelib gui opengl \
+USE_QT=		corelib gui opengl \
 		linguisttools_build moc_build rcc_build uic_build
 USE_GL=		glu
 USE_SDL=	sdl
diff --git multimedia/QtAV/Makefile multimedia/QtAV/Makefile
index ca8c3deeb3b0..43aab87c2c0d 100644
--- multimedia/QtAV/Makefile
+++ multimedia/QtAV/Makefile
@@ -16,9 +16,9 @@ LICENSE_FIKE=		${WRKSRC}/lgpl-2.1.txt
 LIB_DEPENDS=		libass.so:multimedia/libass \
 			libavcodec.so:multimedia/ffmpeg
 
-USES=			qmake:outsource
+USES=			qmake:outsource qt:5
 USE_GL=			gl
-USE_QT5=		core gui network opengl qml quick sql widgets \
+USE_QT=			core gui network opengl qml quick sql widgets \
 			buildtools_build qmake_build
 USE_XORG=		x11 xext xv
 
diff --git multimedia/abby/Makefile multimedia/abby/Makefile
index eda90c7bd279..8dc75b7266ee 100644
--- multimedia/abby/Makefile
+++ multimedia/abby/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Front-end for c/clive
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake tar:bzip2
-USE_QT4=	gui network xml moc_build rcc_build uic_build
+USES=		qmake qt:4 tar:bzip2
+USE_QT=		gui network xml moc_build rcc_build uic_build
 
 PLIST_FILES=	bin/abby
 
diff --git multimedia/avidemux/Makefile.common multimedia/avidemux/Makefile.common
index da6af75fad01..91a2fc77f5ce 100644
--- multimedia/avidemux/Makefile.common
+++ multimedia/avidemux/Makefile.common
@@ -14,7 +14,6 @@ LIB_DEPENDS+=	libmad.so:audio/libmad \
 LICENSE=	GPLv2
 
 USE_GNOME=	libxml2
-USE_QT4=	# empty
 
 OPTIONS_FILE=	${PORT_DBDIR}/${OPTIONS_NAME:C/-.*//}/options
 
@@ -96,7 +95,8 @@ PLIST_SUB+=	GTK="@comment "
 .endif
 
 .if ${PORT_OPTIONS:MQT4}
-USE_QT4=	qmake_build moc_build rcc_build uic_build linguist_build gui
+USES+=		qt:4
+USE_QT=		qmake_build moc_build rcc_build uic_build linguist_build gui
 PLIST_SUB+=	QT4=""
 .else
 CMAKE_ARGS+=	-DQT4:BOOL=OFF
diff --git multimedia/baka-mplayer/Makefile multimedia/baka-mplayer/Makefile
index 9a5cd1e35e1e..c8c5569b4786 100644
--- multimedia/baka-mplayer/Makefile
+++ multimedia/baka-mplayer/Makefile
@@ -17,15 +17,16 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	u8sand
 GH_PROJECT=	Baka-MPlayer
 
-USES=		compiler:c++11-lib pkgconfig qmake
-USE_QT5=	qmake_build buildtools_build gui network svg widgets x11extras
+USES=		compiler:c++11-lib pkgconfig qmake qt:5
+USE_QT=		qmake_build buildtools_build gui network svg widgets x11extras
 QMAKE_SOURCE_PATH=${WRKSRC}/src
 QMAKE_ARGS=	lupdate="${LUPDATE}" lrelease="${LRELEASE}"
 
 OPTIONS_DEFINE=	DOCS NLS NOTO
 OPTIONS_SUB=	yes
 
-NLS_USE=	QT5=linguisttools_build
+NLS_USES=	qt:5
+NLS_USE=	QT=linguisttools_build
 NLS_QMAKE_ON=	CONFIG+="install_translations"
 NOTO_DESC=	Original look with Noto Sans font
 NOTO_RUN_DEPENDS=	noto>0:x11-fonts/noto
diff --git multimedia/bino/Makefile multimedia/bino/Makefile
index 8e93d605cfe8..1b2ae65f2f4a 100644
--- multimedia/bino/Makefile
+++ multimedia/bino/Makefile
@@ -17,11 +17,11 @@ LIB_DEPENDS=	libass.so:multimedia/libass \
 		libavformat.so:multimedia/ffmpeg \
 		libopenal.so:audio/openal-soft
 
-USES=		autoreconf desktop-file-utils gmake iconv pkgconfig tar:xz
+USES=		autoreconf desktop-file-utils gmake iconv pkgconfig qt:5 tar:xz
 USE_GL=		gl glu glew
 GNU_CONFIGURE=	yes
 INSTALLS_ICONS=	yes
-USE_QT5=	buildtools_build core gui opengl widgets
+USE_QT=		buildtools_build core gui opengl widgets
 USE_CXXSTD=	c++11
 
 # no port fow equalizer now, lirc detecting not working
diff --git multimedia/clipgrab/Makefile multimedia/clipgrab/Makefile
index ec1d41d9afc4..7ea8c02c6764 100644
--- multimedia/clipgrab/Makefile
+++ multimedia/clipgrab/Makefile
@@ -11,8 +11,8 @@ COMMENT=	Program to download videos from YouTube and etc
 
 LICENSE=	GPLv3
 
-USES=		qmake tar:bzip2
-USE_QT4=	gui xml uic_build moc_build \
+USES=		qmake qt:4 tar:bzip2
+USE_QT=		gui xml uic_build moc_build \
 		rcc_build network dbus webkit
 
 PLIST_FILES=	bin/${PORTNAME} \
diff --git multimedia/dragon-kde4/Makefile multimedia/dragon-kde4/Makefile
index ab2f75197435..d89f5185c545 100644
--- multimedia/dragon-kde4/Makefile
+++ multimedia/dragon-kde4/Makefile
@@ -11,8 +11,8 @@ COMMENT=	KDE multimedia player with a focus on simplicity
 
 LICENSE=	GPLv2
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	phonon moc_build qmake_build rcc_build uic_build
+USE_QT=		phonon moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git multimedia/dragon/Makefile multimedia/dragon/Makefile
index 06b7d05887b3..358004a09807 100644
--- multimedia/dragon/Makefile
+++ multimedia/dragon/Makefile
@@ -11,12 +11,12 @@ COMMENT=	KDE multimedia player with a focus on simplicity
 
 LICENSE=	GPLv2
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		dbusaddons doctools ecm  kio service sonnet textwidgets i18n \
 		iconthemes jobwidgets notifications parts solid widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	core dbus gui network phonon4 widgets xml \
+USE_QT=		core dbus gui network phonon4 widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git multimedia/dvbcut/Makefile multimedia/dvbcut/Makefile
index d72a937dbbfd..f5be84cb02df 100644
--- multimedia/dvbcut/Makefile
+++ multimedia/dvbcut/Makefile
@@ -39,8 +39,10 @@ OPTIONS_RADIO=	QT
 OPTIONS_RADIO_QT=	QT4 QT5
 OPTIONS_DEFAULT=	QT5
 
-QT4_USE=	QT4=corelib,gui,xml,qt3support,linguisttools_build,moc_build,rcc_build,uic_build
-QT5_USE=	QT5=core,gui,widgets,xml,buildtools_build,linguisttools_build GL=gl
+QT4_USES=	qt:4
+QT4_USE=	QT=corelib,gui,xml,qt3support,linguisttools_build,moc_build,rcc_build,uic_build
+QT5_USES=	qt:5
+QT5_USE=	QT=core,gui,widgets,xml,buildtools_build,linguisttools_build GL=gl
 
 post-build:
 		@${SED} -e 's;@prefix@;${PREFIX};' \
diff --git multimedia/gstreamer-qt4/Makefile multimedia/gstreamer-qt4/Makefile
index d00dd69c2e10..022e2a7fe438 100644
--- multimedia/gstreamer-qt4/Makefile
+++ multimedia/gstreamer-qt4/Makefile
@@ -17,12 +17,12 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libboost_thread.so:devel/boost-libs
 
-USES=		bison cmake:noninja gmake kde:4 pathfix pkgconfig tar:bzip2
+USES=		bison cmake:noninja gmake kde:4 pathfix pkgconfig qt:4 tar:bzip2
 USE_LDCONFIG=	yes
 USE_GSTREAMER=	yes
 USE_GNOME=	glib20
 USE_KDE=	automoc4
-USE_QT4=	corelib gui opengl declarative \
+USE_QT=		corelib gui opengl declarative \
 		qmake_build moc_build rcc_build uic_build qtestlib_build
 
 PLIST_SUB=	VERSION="${PORTVERSION}" GST_VERSION="${GST_VERSION}"
diff --git multimedia/gstreamer1-qt/Makefile multimedia/gstreamer1-qt/Makefile
index f27bbe1eaa07..c673cd508192 100644
--- multimedia/gstreamer1-qt/Makefile
+++ multimedia/gstreamer1-qt/Makefile
@@ -30,11 +30,13 @@ CMAKE_OFF=	USE_GST_PLUGIN_DIR USE_QT_PLUGIN_DIR
 CMAKE_ARGS=	-DQT_VERSION=${FLAVOR:C/qt//}
 
 .  if ${FLAVOR} == qt4
-USE_QT4=	corelib gui opengl declarative script \
+USES+=		qt:4
+USE_QT=		corelib gui opengl declarative script \
 		qmake_build moc_build rcc_build uic_build qtestlib_build
 PLIST_SUB=	QT4_ONLY="" QT5_ONLY="@comment "
 .  else
-USE_QT5=	buildtools_build qmake_build core gui network opengl \
+USES+=		qt:5
+USE_QT=		buildtools_build qmake_build core gui network opengl \
 		qml quick testlib widgets
 QTVER_SUFFIX=	5
 PLIST_SUB=	QT4_ONLY="@comment " QT5_ONLY=""
diff --git multimedia/k9copy-kde4/Makefile multimedia/k9copy-kde4/Makefile
index 21a31c1a3899..b0aa0498b467 100644
--- multimedia/k9copy-kde4/Makefile
+++ multimedia/k9copy-kde4/Makefile
@@ -17,9 +17,9 @@ LIB_DEPENDS=	libxine.so:multimedia/libxine \
 		libmpeg2.so:multimedia/libmpeg2 \
 		libavcodec0.so:multimedia/ffmpeg0
 
-USES=		cmake gettext kde:4 localbase
+USES=		cmake gettext kde:4 localbase qt:4
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 LLD_UNSAFE=	yes
 
 OPTIONS_DEFINE=	MENCODER MPLAYER DVDAUTHOR
diff --git multimedia/kaffeine/Makefile multimedia/kaffeine/Makefile
index ccf9ef124f76..bfea99467b6f 100644
--- multimedia/kaffeine/Makefile
+++ multimedia/kaffeine/Makefile
@@ -16,9 +16,9 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 BUILD_DEPENDS=	v4l_compat>0:multimedia/v4l_compat
 LIB_DEPENDS=	libvlc.so:multimedia/vlc-qt4
 
-USES=		cmake kde:4 cpe gettext pkgconfig
+USES=		cmake kde:4 cpe gettext pkgconfig qt:4
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	corelib dbus gui network phonon sql svg xml \
+USE_QT=		corelib dbus gui network phonon sql svg xml \
 		moc_build qmake_build rcc_build uic_build sql-sqlite2
 USE_XORG=	xscrnsaver
 
diff --git multimedia/kamoso/Makefile multimedia/kamoso/Makefile
index 9f0b8efd35ae..8106239e54fc 100644
--- multimedia/kamoso/Makefile
+++ multimedia/kamoso/Makefile
@@ -9,13 +9,13 @@ COMMENT=	Application to take pictures and videos out of your webcam
 
 LICENSE=	GPLv2
 
-USES=		cmake:outsource gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource gettext kde:5 pkgconfig qt:5 tar:xz
 USE_GNOME=	glib20
 USE_GSTREAMER1=	yes
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons ecm i18n itemviews jobwidgets kio purpose \
 		service solid widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick widgets xml \
+USE_QT=		core dbus gui network qml quick widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git multimedia/kdemultimedia-ffmpegthumbs-kde4/Makefile multimedia/kdemultimedia-ffmpegthumbs-kde4/Makefile
index f61f09860dbf..8983a8517f25 100644
--- multimedia/kdemultimedia-ffmpegthumbs-kde4/Makefile
+++ multimedia/kdemultimedia-ffmpegthumbs-kde4/Makefile
@@ -15,9 +15,9 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libswscale.so:multimedia/ffmpeg
 
-USES=		cmake:outsource kde:4 pkgconfig tar:xz
+USES=		cmake:outsource kde:4 pkgconfig qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	moc_build qmake_build rcc_build uic_build \
+USE_QT=		moc_build qmake_build rcc_build uic_build \
 		corelib dbus gui network svg xml
 
 .include <bsd.port.mk>
diff --git multimedia/kdemultimedia-ffmpegthumbs/Makefile multimedia/kdemultimedia-ffmpegthumbs/Makefile
index b9b0c3a5e066..2bae5f70d942 100644
--- multimedia/kdemultimedia-ffmpegthumbs/Makefile
+++ multimedia/kdemultimedia-ffmpegthumbs/Makefile
@@ -12,9 +12,9 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libswscale.so:multimedia/ffmpeg
 
-USES=		cmake:outsource kde:5 pkgconfig tar:xz
+USES=		cmake:outsource kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	completion config coreaddons jobwidgets kio service widgetsaddons
-USE_QT5=	core gui network widgets \
+USE_QT=		core gui network widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git multimedia/kdemultimedia-mplayerthumbs-kde4/Makefile multimedia/kdemultimedia-mplayerthumbs-kde4/Makefile
index 823a921c8eae..71ef241babbe 100644
--- multimedia/kdemultimedia-mplayerthumbs-kde4/Makefile
+++ multimedia/kdemultimedia-mplayerthumbs-kde4/Makefile
@@ -15,8 +15,8 @@ LICENSE=	LGPL21
 
 RUN_DEPENDS=	mplayer:multimedia/mplayer
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	phonon moc_build qmake_build rcc_build uic_build
+USE_QT=		phonon moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git multimedia/kdemultimedia/Makefile multimedia/kdemultimedia/Makefile
index c32014acbd26..6537cfc47aa4 100644
--- multimedia/kdemultimedia/Makefile
+++ multimedia/kdemultimedia/Makefile
@@ -7,8 +7,8 @@ CATEGORIES=	multimedia kde
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE Multimedia applications (meta port)
 
-USES=		kde:5 metaport
-USE_QT5=	#
+USES=		kde:5 metaport qt:5
+USE_QT=		#
 
 OPTIONS_DEFINE=		DRAGON FFMPEG AUDIOCD_KIO KMIX
 OPTIONS_DEFAULT=	${OPTIONS_DEFINE}
diff --git multimedia/kdenlive-kde4/Makefile multimedia/kdenlive-kde4/Makefile
index a785cdd7cacb..e943056ca064 100644
--- multimedia/kdenlive-kde4/Makefile
+++ multimedia/kdenlive-kde4/Makefile
@@ -17,9 +17,9 @@ LIB_DEPENDS=	libmlt.so:multimedia/mlt \
 RUN_DEPENDS=	ffmpeg${FFMPEG_SUFX}:multimedia/ffmpeg${FFMPEG_SUFX} \
 		${LOCALBASE}/lib/mlt/libmltqt.so:multimedia/mlt-qt4
 
-USES=		cmake kde:4 pkgconfig shared-mime-info tar:bzip2
+USES=		cmake kde:4 pkgconfig qt:4 shared-mime-info tar:bzip2
 USE_KDE=	automoc4 kdelibs nepomuk-core
-USE_QT4=	corelib dbus gui opengl script svg xml \
+USE_QT=		corelib dbus gui opengl script svg xml \
 		moc_build qmake_build rcc_build uic_build
 USE_XORG=	x11
 CMAKE_ARGS=	-DFFMPEG_SUFFIX:STRING="${FFMPEG_SUFX}"
diff --git multimedia/kdenlive/Makefile multimedia/kdenlive/Makefile
index b60dada5f419..85b22d4f17da 100644
--- multimedia/kdenlive/Makefile
+++ multimedia/kdenlive/Makefile
@@ -15,12 +15,12 @@ RUN_DEPENDS=	ffmpeg${FFMPEG_SUFX}:multimedia/ffmpeg${FFMPEG_SUFX} \
 		${LOCALBASE}/lib/mlt/libmltqt.so:multimedia/mlt-qt5
 
 USES=		cmake:outsource desktop-file-utils gettext-tools pkgconfig \
-		shared-mime-info kde:5 tar:xz
+		qt:5 shared-mime-info kde:5 tar:xz
 USE_KDE=	archive bookmarks config configwidgets coreaddons crash \
 		dbusaddons ecm filemetadata guiaddons iconthemes \
 		init_run kio newstuff notifications notifyconfig \
 		textwidgets widgetsaddons xmlgui
-USE_QT5=	buildtools_build concurrent core dbus gui qmake_build \
+USE_QT=		buildtools_build concurrent core dbus gui qmake_build \
 		qml quick quickcontrols_run script svg webkit widgets
 USE_XORG=	x11
 CFLAGS+=	-I${LOCALBASE}/include # linux/input.h
diff --git multimedia/kf5-kmediaplayer/Makefile multimedia/kf5-kmediaplayer/Makefile
index 7898c9f3c443..96eb7e405763 100644
--- multimedia/kf5-kmediaplayer/Makefile
+++ multimedia/kf5-kmediaplayer/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	multimedia kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 plugin interface for media player features
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		ecm i18n jobwidgets kio parts service sonnet textwidgets \
 		widgetsaddons xmlgui
-USE_QT5=	buildtools_build core dbus gui network qmake_build \
+USE_QT=		buildtools_build core dbus gui network qmake_build \
 		testlib widgets xml
 
 .include <bsd.port.mk>
diff --git multimedia/kmplayer-kde4/Makefile multimedia/kmplayer-kde4/Makefile
index bb3a25c3e809..096461e87ffa 100644
--- multimedia/kmplayer-kde4/Makefile
+++ multimedia/kmplayer-kde4/Makefile
@@ -24,9 +24,9 @@ LIB_DEPENDS=	libdbus-1.so:devel/dbus \
 		libfontconfig.so:x11-fonts/fontconfig
 RUN_DEPENDS=	mplayer:multimedia/mplayer
 
-USES=		cmake:outsource gettext-runtime kde:4 pkgconfig
+USES=		cmake:outsource gettext-runtime kde:4 pkgconfig qt:4
 USE_GNOME=	cairo gdkpixbuf2 gtk20
-USE_QT4=	corelib dbus gui network svg xml \
+USE_QT=		corelib dbus gui network svg xml \
 		moc_build qmake_build rcc_build uic_build
 USE_KDE=	automoc4 kdelibs soprano
 USE_XORG=	x11
diff --git multimedia/kplayer-kde4/Makefile multimedia/kplayer-kde4/Makefile
index bef63a915cfe..e0d7a5522777 100644
--- multimedia/kplayer-kde4/Makefile
+++ multimedia/kplayer-kde4/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Movie player based on mplayer
 
 RUN_DEPENDS=	mplayer:multimedia/mplayer
 
-USES=		cmake gettext kde:4 tar:bzip2
-USE_QT4=	corelib qmake_build moc_build rcc_build uic_build
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
+USE_QT=		corelib qmake_build moc_build rcc_build uic_build
 USE_KDE=	kdelibs automoc4
 LDFLAGS+=	-L${LOCALBASE}/lib -lX11 -L${LOCALBASE}/kde4/lib -lsolid
 
diff --git multimedia/mediadownloader/Makefile multimedia/mediadownloader/Makefile
index e4f58c973aa6..78b2af0a6b84 100644
--- multimedia/mediadownloader/Makefile
+++ multimedia/mediadownloader/Makefile
@@ -13,11 +13,11 @@ COMMENT=	Search, watch, and download from Google Image and YouTube
 
 LICENSE=	GPLv3
 
-USES=		qmake
+USES=		qmake qt:4
 USE_GL=		gl glu
 USE_XORG=	xtst
 USE_GSTREAMER=	ffmpeg
-USE_QT4=	dbus gui network moc_build opengl phonon phonon-gst \
+USE_QT=		dbus gui network moc_build opengl phonon phonon-gst \
 		rcc_build uic_build webkit xml xmlpatterns
 QMAKEPRO=	${PORTNAME}.pro
 PLIST_FILES=	bin/${PORTNAME}
diff --git multimedia/minitube/Makefile multimedia/minitube/Makefile
index c6c0100c4295..a92fb86e377f 100644
--- multimedia/minitube/Makefile
+++ multimedia/minitube/Makefile
@@ -11,18 +11,19 @@ COMMENT=	TV-like client for YouTube
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake
+USES=		qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	flaviotordini
 USE_GL=		gl
-USE_QT5=	core dbus gui network phonon4 qml script sql widgets \
+USE_QT=		core dbus gui network phonon4 qml script sql widgets \
 		buildtools_build imageformats_run sql-sqlite3_run
 QMAKE_ARGS=	QMAKE_LRELEASE=${LRELEASE} \
 		DEFINES+=APP_GOOGLE_API_KEY="${MINITUBE_GOOGLE_API_KEY}"
 
 OPTIONS_DEFINE=	NLS
 OPTIONS_SUB=	yes
-NLS_USE=	QT5=linguisttools_build
+NLS_USES=	qt:5
+NLS_USE=	QT=linguisttools_build
 
 pre-everything::
 	@${CAT} ${PKGMESSAGE}
diff --git multimedia/mkvtoolnix/Makefile multimedia/mkvtoolnix/Makefile
index 3ccda9f33a08..c3600340339a 100644
--- multimedia/mkvtoolnix/Makefile
+++ multimedia/mkvtoolnix/Makefile
@@ -49,8 +49,8 @@ NLS_USES=	gettext
 NLS_CONFIGURE_WITH=	gettext
 
 QT5_DESC=	Build and install GUI application (Qt 5)
-QT5_USES=	desktop-file-utils shared-mime-info
-QT5_USE=	QT5=buildtools_build,concurrent,core,gui,multimedia,network,quick,widgets
+QT5_USES=	desktop-file-utils qt:5 shared-mime-info
+QT5_USE=	QT=buildtools_build,concurrent,core,gui,multimedia,network,quick,widgets
 QT5_CONFIGURE_ENABLE=	qt
 QT5_BUILD_DEPENDS=	qmake:devel/qt5-qmake
 QT5_LIB_DEPENDS=	libcmark.so:textproc/cmark
diff --git multimedia/mlt-qt4/Makefile multimedia/mlt-qt4/Makefile
index 6d8ce848b403..366ed1889338 100644
--- multimedia/mlt-qt4/Makefile
+++ multimedia/mlt-qt4/Makefile
@@ -4,7 +4,8 @@ PORTREVISION=	0
 
 CONFLICTS_INSTALL=	${PORTNAME}-qt5-*
 
-USE_QT4=	corelib gui opengl svg xml
+USES=	qt:4
+USE_QT=		corelib gui opengl svg xml
 MASTERDIR=	${.CURDIR:H}/mlt
 SLAVEPORT=	qt4
 
diff --git multimedia/mlt-qt5/Makefile multimedia/mlt-qt5/Makefile
index 77acbb9e4ce4..7b6465f36c9a 100644
--- multimedia/mlt-qt5/Makefile
+++ multimedia/mlt-qt5/Makefile
@@ -4,8 +4,9 @@ PORTREVISION=	0
 
 CONFLICTS_INSTALL=	${PORTNAME}-qt4-*
 
+USES=	qt:5
 USE_CXXSTD=	c++11
-USE_QT5=	core gui svg widgets xml
+USE_QT=		core gui svg widgets xml
 USE_XORG=	x11
 MASTERDIR=	${.CURDIR:H}/mlt
 SLAVEPORT=	qt5
diff --git multimedia/mpc-qt/Makefile multimedia/mpc-qt/Makefile
index 7fdf2cc4f6e3..055c138d7420 100644
--- multimedia/mpc-qt/Makefile
+++ multimedia/mpc-qt/Makefile
@@ -17,8 +17,8 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	cmdrkotori
 GH_TUPLE=	Argon-:mpv-stats:1.1-28-gf42aa68:mpv_stats/external/mpv-stats
 
-USES=		compiler:c++11-lib desktop-file-utils pkgconfig qmake
-USE_QT5=	qmake_build buildtools_build linguisttools_build \
+USES=		compiler:c++11-lib desktop-file-utils pkgconfig qmake qt:5
+USE_QT=		qmake_build buildtools_build linguisttools_build \
 		core dbus gui network svg_run widgets x11extras
 USE_GL=		gl
 CXXFLAGS+=	-D_GLIBCXX_USE_C99 -D_GLIBCXX_USE_C99_MATH_TR1 \
diff --git multimedia/mythtv/Makefile multimedia/mythtv/Makefile
index 213a7f5b54a3..8139e5e9ebfd 100644
--- multimedia/mythtv/Makefile
+++ multimedia/mythtv/Makefile
@@ -27,15 +27,14 @@ LIB_DEPENDS=	libmp3lame.so:audio/lame \
 		libxml2.so:textproc/libxml2
 BUILD_DEPENDS=	yasm:devel/yasm
 
-USES=		gmake iconv libtool pkgconfig pathfix ssl
+USES=		gmake iconv libtool pkgconfig pathfix qmake:no_env qt:5 ssl
 USE_GITHUB=	yes
 GH_ACCOUNT=	MythTV
 USE_GL=		gl
 USE_LDCONFIG=	yes
-USE_QT5=	buildtools_build core dbus gui imageformats_run \
+USE_QT=		buildtools_build core dbus gui imageformats_run \
 		linguist_build network opengl qmake_build script sql \
 		sql-mysql_run webkit widgets xml
-QT_NONSTANDARD=	yes
 USE_XORG=	x11 xv xrandr xxf86vm xinerama xext xcb
 
 HAS_CONFIGURE=	yes
diff --git multimedia/obs-studio/Makefile multimedia/obs-studio/Makefile
index 7aa532fdabc9..fa165b77ed37 100644
--- multimedia/obs-studio/Makefile
+++ multimedia/obs-studio/Makefile
@@ -28,10 +28,10 @@ LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
 		libv4l2.so:multimedia/libv4l \
 		libx264.so:multimedia/libx264
 
-USES=		cmake:outsource compiler:c++11-lib lua pkgconfig python:3.4+
+USES=		cmake:outsource compiler:c++11-lib lua pkgconfig python:3.4+ qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	obsproject
-USE_QT5=	core gui widgets x11extras buildtools_build imageformats_run qmake_build
+USE_QT=		core gui widgets x11extras buildtools_build imageformats_run qmake_build
 USE_GL=		gl
 USE_XORG=	ice sm x11 xcb xcomposite xext xfixes xinerama xrandr
 USE_LDCONFIG=	yes
diff --git multimedia/phonon-designerplugin/Makefile multimedia/phonon-designerplugin/Makefile
index f71a6a700d4e..2650f00c796f 100644
--- multimedia/phonon-designerplugin/Makefile
+++ multimedia/phonon-designerplugin/Makefile
@@ -20,12 +20,12 @@ qt5_PKGNAMESUFFIX=	-designerplugin-qt5
 USES=		cmake tar:xz
 
 .  if ${FLAVOR} == qt4
-USES+=		kde:4
+USES+=		kde:4 qt:4
 USE_QT4=	corelib designer gui phonon \
 		qmake_build moc_build rcc_build uic_build
 PLIST_FILES=	${QT_PLUGINDIR_REL}/designer/libphononwidgets.so
 .  else
-USES+=		kde:5
+USES+=		kde:5 qt:5
 USE_KDE=	ecm
 USE_QT5=	core designer gui phonon4 widgets xml \
 		buildtools_build qmake_build
diff --git multimedia/phonon-gstreamer/Makefile multimedia/phonon-gstreamer/Makefile
index f5177d3299d5..f2e7b06136dd 100644
--- multimedia/phonon-gstreamer/Makefile
+++ multimedia/phonon-gstreamer/Makefile
@@ -29,12 +29,12 @@ USE_GSTREAMER1=	yes
 USE_XORG=	x11
 
 .  if ${FLAVOR} == qt4
-USES+=		kde:4
+USES+=		kde:4 qt:4
 USE_KDE=	automoc4
-USE_QT4=	corelib gui opengl phonon \
+USE_QT=		corelib gui opengl phonon \
 		qmake_build moc_build rcc_build uic_build
 .  else
-USES+=		kde:5
+USES+=		kde:5 qt:5
 USE_KDE=	ecm
 USE_QT5=	core gui opengl phonon4 widgets x11extras \
 		buildtools_build qmake_build
diff --git multimedia/phonon-vlc/Makefile multimedia/phonon-vlc/Makefile
index 7cbedab8ca2a..f12b75c35dde 100644
--- multimedia/phonon-vlc/Makefile
+++ multimedia/phonon-vlc/Makefile
@@ -24,15 +24,15 @@ qt5_LIB_DEPENDS=	libvlc.so:multimedia/vlc
 USES=		cmake:outsource pkgconfig tar:xz
 
 .  if ${FLAVOR} == qt4
-USES+=		kde:4
+USES+=		kde:4 qt:4
 USE_KDE=	automoc4
-USE_QT4=	corelib gui phonon \
+USE_QT=		corelib gui phonon \
 		qmake_build moc_build rcc_build uic_build
 PLIST_FILES=	lib/kde4/plugins/phonon_backend/phonon_vlc.so \
 		share/kde4/services/phononbackends/vlc.desktop \
 		${QT_PLUGINDIR}/phonon_backend/libphonon_vlc.so
 .  else
-USES+=		kde:5
+USES+=		kde:5 qt:5
 USE_KDE=	ecm
 USE_QT5=	core gui widgets phonon4 \
 		buildtools_build qmake_build
diff --git multimedia/phonon-xine/Makefile multimedia/phonon-xine/Makefile
index 0c7d207988a4..5c9e10337a4b 100644
--- multimedia/phonon-xine/Makefile
+++ multimedia/phonon-xine/Makefile
@@ -15,9 +15,9 @@ COMMENT=	The xine backend for Phonon
 
 LIB_DEPENDS=	libxine.so:multimedia/libxine
 
-USES=		cmake kde:4 pkgconfig tar:bzip2
+USES=		cmake kde:4 pkgconfig qt:4 tar:bzip2
 USE_KDE=	automoc4
-USE_QT4=	corelib dbus gui phonon \
+USE_QT=		corelib dbus gui phonon \
 		qmake_build moc_build rcc_build uic_build
 USE_XORG=	xcb
 
diff --git multimedia/phonon/Makefile multimedia/phonon/Makefile
index a60c2792e33c..be3e3d168898 100644
--- multimedia/phonon/Makefile
+++ multimedia/phonon/Makefile
@@ -28,12 +28,12 @@ CMAKE_OFF=	PHONON_BUILD_DESIGNER_PLUGIN:BOOL=OFF
 USE_LDCONFIG=	yes
 
 .  if ${FLAVOR} == qt4
-USES+=		kde:4
+USES+=		kde:4 qt:4
 USE_KDE=	automoc4
 USE_QT4=	corelib dbus declarative gui testlib \
 		qmake_build moc_build rcc_build uic_build
 .  else
-USES+=		kde:5
+USES+=		kde:5 qt:5
 USE_KDE=	ecm
 USE_QT5=	core dbus gui opengl widgets \
 		buildtools_build qmake_build
diff --git multimedia/py-openlp/Makefile multimedia/py-openlp/Makefile
index 68b9c4303307..42cea7957eed 100644
--- multimedia/py-openlp/Makefile
+++ multimedia/py-openlp/Makefile
@@ -25,12 +25,12 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}beautifulsoup32>0:www/py-beautifulsoup32@${P
 		${PYTHON_PKGNAMEPREFIX}sqlite3>=0:databases/py-sqlite3@${PY_FLAVOR} \
 		unoconv:textproc/unoconv
 
-USES=		desktop-file-utils pyqt:4 python:2.7
+USES=		desktop-file-utils pyqt:4 python:2.7 qt:4
 USE_PYQT=	core gui \
 		network_run opengl_run phonon_run svg_run test_run webkit_run
 USE_PYTHON=	distutils autoplist
 USE_GSTREAMER=	good bad ugly
-USE_QT4=	linguist phonon-gst
+USE_QT=		linguist phonon-gst
 QT_LRELEASE=	${LRELEASE}
 NO_ARCH=	yes
 
diff --git multimedia/py-qt4-multimedia/Makefile multimedia/py-qt4-multimedia/Makefile
index 101097c1c9e9..1a9742b34879 100644
--- multimedia/py-qt4-multimedia/Makefile
+++ multimedia/py-qt4-multimedia/Makefile
@@ -11,10 +11,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, Multimedia module
 CONFIGURE_ARGS=	--enable QtMultimedia
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run gui_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib gui multimedia moc_build qmake_build
+USE_QT=		corelib gui multimedia moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git multimedia/py-qt4-phonon/Makefile multimedia/py-qt4-phonon/Makefile
index f4ce1af0388b..462aec085d59 100644
--- multimedia/py-qt4-phonon/Makefile
+++ multimedia/py-qt4-phonon/Makefile
@@ -10,10 +10,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, Phonon module
 CONFIGURE_ARGS=	--enable phonon
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run gui_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib gui phonon moc_build qmake_build
+USE_QT=		corelib gui phonon moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git multimedia/py-qt5-multimedia/Makefile multimedia/py-qt5-multimedia/Makefile
index 9e53254f7529..28602298f0b0 100644
--- multimedia/py-qt5-multimedia/Makefile
+++ multimedia/py-qt5-multimedia/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtMultimedia module
 CONFIGURE_ARGS=	--enable QtMultimedia
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run gui_run network_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui multimedia network qmake_build
+USE_QT=		core gui multimedia network qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git multimedia/py-qt5-multimediawidgets/Makefile multimedia/py-qt5-multimediawidgets/Makefile
index 5a97fe761328..7732226f514f 100644
--- multimedia/py-qt5-multimediawidgets/Makefile
+++ multimedia/py-qt5-multimediawidgets/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtMultimediaWidgets module
 CONFIGURE_ARGS=	--enable QtMultimediaWidgets
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run multimedia_run widgets_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui multimedia network widgets qmake_build
+USE_QT=		core gui multimedia network widgets qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git multimedia/qmmp-plugin-pack-qt5/Makefile multimedia/qmmp-plugin-pack-qt5/Makefile
index 94122a126a50..4740336e5487 100644
--- multimedia/qmmp-plugin-pack-qt5/Makefile
+++ multimedia/qmmp-plugin-pack-qt5/Makefile
@@ -20,8 +20,8 @@ BUILD_DEPENDS=	qmmp-qt5>=1.2.0:multimedia/qmmp-qt5
 CONFLICTS=	${PORTNAME}-0.*
 PORTSCOUT=	limit:^1\..*
 
-USES=		cmake:outsource pkgconfig tar:bzip2
-USE_QT5=	core gui widgets \
+USES=		cmake:outsource pkgconfig qt:5 tar:bzip2
+USE_QT=		core gui widgets \
 		buildtools_build linguisttools_build qmake_build
 USE_LDCONFIG=	yes
 
@@ -53,7 +53,8 @@ GOOMASM_BUILD_DEPENDS=	yasm:devel/yasm
 GOOMASM_CMAKE_BOOL=	GOOM_ASM
 
 HISTORY_DESC=	Information about listened tracks
-HISTORY_USE=	QT5=sql
+HISTORY_USES=	qt:5
+HISTORY_USE=	QT=sql
 HISTORY_CMAKE_BOOL=	USE_HISTORY
 
 MPG123_LIB_DEPENDS=	libmpg123.so:audio/mpg123 \
diff --git multimedia/qmmp-plugin-pack/Makefile multimedia/qmmp-plugin-pack/Makefile
index e0cc6c818c35..74383a7cbb85 100644
--- multimedia/qmmp-plugin-pack/Makefile
+++ multimedia/qmmp-plugin-pack/Makefile
@@ -19,8 +19,8 @@ BUILD_DEPENDS=	qmmp>=0.11.0:multimedia/qmmp
 CONFLICTS=	${PORTNAME}-qt5-1.*
 PORTSCOUT=	limit:^0.*
 
-USES=		cmake:outsource localbase pkgconfig tar:bzip2
-USE_QT4=	corelib gui linguisttools_build moc_build qmake_build rcc_build
+USES=		cmake:outsource localbase pkgconfig qt:4 tar:bzip2
+USE_QT=		corelib gui linguisttools_build moc_build qmake_build rcc_build
 USE_LDCONFIG=	yes
 
 OPTIONS_SUB=	yes
@@ -51,12 +51,14 @@ GOOMASM_BUILD_DEPENDS=	yasm:devel/yasm
 GOOMASM_CMAKE_BOOL=	GOOM_ASM
 
 HISTORY_DESC=	Information about listened tracks
-HISTORY_USE=	QT4=sql,uic_build
+HISTORY_USES=	qt:4
+HISTORY_USE=	QT=sql,uic_build
 HISTORY_CMAKE_BOOL=	USE_HISTORY
 
 MPG123_LIB_DEPENDS=	libmpg123.so:audio/mpg123 \
 		libtag.so:audio/taglib
-MPG123_USE=	QT4=uic_build
+MPG123_USES=	qt:4
+MPG123_USE=	QT=uic_build
 MPG123_CMAKE_BOOL=	USE_MPG123
 
 SRCONV_DESC=	Support the sample rate converter
diff --git multimedia/qmmp-qt5/Makefile multimedia/qmmp-qt5/Makefile
index ca158018b064..ab82d8b5dd01 100644
--- multimedia/qmmp-qt5/Makefile
+++ multimedia/qmmp-qt5/Makefile
@@ -17,8 +17,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 CONFLICTS=	${PORTNAME}-0.*
 PORTSCOUT=	limit:^1\..*
 
-USES=		cmake:outsource pathfix pkgconfig tar:bzip2
-USE_QT5=	core gui network widgets xml \
+USES=		cmake:outsource pathfix pkgconfig qt:5 tar:bzip2
+USE_QT=		core gui network widgets xml \
 		buildtools_build linguisttools_build qmake_build
 USE_LDCONFIG=	yes
 
@@ -72,7 +72,8 @@ QSUI_DESC=	Simple UI based on standard widgets set
 QSUI_CMAKE_BOOL=	USE_QSUI
 
 SKINNEDUI_DESC=	Skinned GUI
-SKINNEDUI_USE=	QT5=x11extras XORG=x11
+SKINNEDUI_USES=	qt:5
+SKINNEDUI_USE=	QT=x11extras XORG=x11
 SKINNEDUI_CMAKE_BOOL=	USE_SKINNED
 
 DIR_ASSOC_DESC=	inode/directory mime type association
@@ -95,7 +96,8 @@ PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
 PULSEAUDIO_CMAKE_BOOL=	USE_PULSE
 
 QTMULTIMEDIA_DESC=	Support to use Qt low-level multimedia API
-QTMULTIMEDIA_USE=	QT5=multimedia
+QTMULTIMEDIA_USES=	qt:5
+QTMULTIMEDIA_USE=	QT=multimedia
 QTMULTIMEDIA_CMAKE_BOOL=	USE_QTMULTIMEDIA
 
 SHOUTCAST_LIB_DEPENDS=	libogg.so:audio/libogg \
@@ -221,7 +223,8 @@ COPYPASTE_DESC=	Enable copy/paste track infos between playlists
 COPYPASTE_CMAKE_BOOL=	USE_COPYPASTE
 
 MPRIS_DESC=	Support the Media Player Remote
-MPRIS_USE=	QT5=dbus
+MPRIS_USES=	qt:5
+MPRIS_USE=	QT=dbus
 MPRIS_CMAKE_BOOL=	USE_MPRIS
 
 SCROBBLER_DESC=	Support Libre.fm/Last.fm scrobbler feature
@@ -243,15 +246,18 @@ NOTIFIER_CMAKE_BOOL=	USE_NOTIFIER
 LYRICS_DESC=	Support to show lyrics using lyrics.wikia.com
 LYRICS_CMAKE_BOOL=	USE_LYRICS
 
-HAL_USE=	QT5=dbus
+HAL_USES=	qt:5
+HAL_USE=	QT=dbus
 HAL_CMAKE_BOOL=	USE_HAL
 
 HOTKEY_DESC=	Support global shortcut keys
-HOTKEY_USE=	QT5=x11extras XORG=x11
+HOTKEY_USES=	qt:5
+HOTKEY_USE=	QT=x11extras XORG=x11
 HOTKEY_CMAKE_BOOL=	USE_HOTKEY
 
 GNOMEHOTKEY_DESC=	Support GNOME/Cinnamon shortcut keys
-GNOMEHOTKEY_USE=	QT5=dbus
+GNOMEHOTKEY_USES=	qt:5
+GNOMEHOTKEY_USE=	QT=dbus
 GNOMEHOTKEY_CMAKE_BOOL=	USE_GNOMEHOTKEY
 
 FILEOPS_DESC=	Support file operation
@@ -261,7 +267,8 @@ COVER_DESC=	Support to show cover images
 COVER_CMAKE_BOOL=	USE_COVER
 
 KDENOTIFY_DESC=	Support to popup notifier for KDE
-KDENOTIFY_USE=	QT5=dbus
+KDENOTIFY_USES=	qt:5
+KDENOTIFY_USE=	QT=dbus
 KDENOTIFY_CMAKE_BOOL=	USE_KDENOTIFY
 
 TRACKCHANGE_DESC=	Enable to run external command each track
@@ -269,7 +276,8 @@ TRACKCHANGE_CMAKE_BOOL=	USE_TRACKCHANGE
 
 UDISKS2_DESC=	Support removable disc detection using UDisks
 UDISKS2_RUN_DEPENDS=	bsdisks:sysutils/bsdisks
-UDISKS2_USE=	QT5=dbus
+UDISKS2_USES=	qt:5
+UDISKS2_USE=	QT=dbus
 UDISKS2_CMAKE_BOOL=	USE_UDISKS2
 
 QMMP_DIALOG_DESC=	An original dialog
diff --git multimedia/qmmp/Makefile multimedia/qmmp/Makefile
index c95dc16159b8..b84ebc53c6f8 100644
--- multimedia/qmmp/Makefile
+++ multimedia/qmmp/Makefile
@@ -16,8 +16,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 CONFLICTS=	${PORTNAME}-qt5-1.*
 PORTSCOUT=	limit:^0.*
 
-USES=		cmake:outsource localbase pathfix pkgconfig tar:bzip2
-USE_QT4=	corelib gui network xml \
+USES=		cmake:outsource localbase pathfix pkgconfig qt:4 tar:bzip2
+USE_QT=		corelib gui network xml \
 		linguisttools_build moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
@@ -68,7 +68,8 @@ OPTIONS_DEFAULT=	ALSA ANALYZER ARCHIVE BS2B CDDA CONVERTER COPYPASTE COVER \
 DOXYGEN_BUILD_DEPENDS=	doxygen:devel/doxygen
 
 QSUI_DESC=	Simple UI based on standard widgets set
-QSUI_USE=	QT4=uic_build
+QSUI_USES=	qt:4
+QSUI_USE=	QT=uic_build
 QSUI_CMAKE_BOOL=	USE_QSUI
 
 SKINNEDUI_DESC=	Skinned GUI
@@ -95,7 +96,8 @@ PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
 PULSEAUDIO_CMAKE_BOOL=	USE_PULSE
 
 QTMULTIMEDIA_DESC=	Support to use Qt low-level multimedia API
-QTMULTIMEDIA_USE=	QT4=multimedia
+QTMULTIMEDIA_USES=	qt:4
+QTMULTIMEDIA_USE=	QT=multimedia
 QTMULTIMEDIA_CMAKE_BOOL=	USE_QTMULTIMEDIA
 
 SHOUTCAST_LIB_DEPENDS=	libogg.so:audio/libogg \
@@ -145,7 +147,8 @@ MPLAYER_CMAKE_BOOL=	USE_MPLAYER
 
 PROJECTM_DESC=	Support the projectM music visualiser
 PROJECTM_LIB_DEPENDS=	libprojectM.so.2:graphics/libprojectm
-PROJECTM_USE=	GL=gl QT4=opengl
+PROJECTM_USES=	qt:4
+PROJECTM_USE=	GL=gl QT=opengl
 PROJECTM_CMAKE_BOOL=	USE_PROJECTM
 
 OSS_CMAKE_BOOL=	USE_OSS
@@ -221,7 +224,8 @@ COPYPASTE_DESC=	Enable copy/paste track infos between playlists
 COPYPASTE_CMAKE_BOOL=	USE_COPYPASTE
 
 MPRIS_DESC=	Support the Media Player Remote
-MPRIS_USE=	QT4=dbus
+MPRIS_USES=	qt:4
+MPRIS_USE=	QT=dbus
 MPRIS_CMAKE_BOOL=	USE_MPRIS
 
 SCROBBLER_DESC=	Support Libre.fm/Last.fm scrobbler feature
@@ -243,7 +247,8 @@ NOTIFIER_CMAKE_BOOL=	USE_NOTIFIER
 LYRICS_DESC=	Support to show lyrics using lyrics.wikia.com
 LYRICS_CMAKE_BOOL=	USE_LYRICS
 
-HAL_USE=	QT4=dbus
+HAL_USES=	qt:4
+HAL_USE=	QT=dbus
 HAL_CMAKE_BOOL=	USE_HAL
 
 HOTKEY_DESC=	Support global shortcut keys
@@ -251,7 +256,8 @@ HOTKEY_USE=	XORG=x11
 HOTKEY_CMAKE_BOOL=	USE_HOTKEY
 
 GNOMEHOTKEY_DESC=	Support GNOME/Cinnamon shortcut keys
-GNOMEHOTKEY_USE=	QT4=dbus
+GNOMEHOTKEY_USES=	qt:4
+GNOMEHOTKEY_USE=	QT=dbus
 GNOMEHOTKEY_CMAKE_BOOL=	USE_GNOMEHOTKEY
 
 FILEOPS_DESC=	Support file operation
@@ -261,7 +267,8 @@ COVER_DESC=	Support to show cover images
 COVER_CMAKE_BOOL=	USE_COVER
 
 KDENOTIFY_DESC=	Support to popup notifier for KDE
-KDENOTIFY_USE=	QT4=dbus
+KDENOTIFY_USES=	qt:4
+KDENOTIFY_USE=	QT=dbus
 KDENOTIFY_CMAKE_BOOL=	USE_KDENOTIFY
 
 TRACKCHANGE_DESC=	Enable to run external command each track
@@ -270,8 +277,10 @@ TRACKCHANGE_CMAKE_BOOL=	USE_TRACKCHANGE
 UDISKS_DESC=	Support removable disc detection (obsolete)
 UDISKS2_DESC=	Support removable disc detection using UDisks
 UDISKS2_RUN_DEPENDS=	bsdisks:sysutils/bsdisks
-UDISKS_USE=	QT4=dbus
-UDISKS2_USE=	QT4=dbus
+UDISKS_USES=	qt:4
+UDISKS_USE=	QT=dbus
+UDISKS2_USES=	qt:4
+UDISKS2_USE=	QT=dbus
 UDISKS_CMAKE_BOOL=	USE_UDISKS
 UDISKS2_CMAKE_BOOL=	USE_UDISKS2
 
diff --git multimedia/qt4-mobility/Makefile multimedia/qt4-mobility/Makefile
index 45c51fdb4790..d8e0dbddf7fd 100644
--- multimedia/qt4-mobility/Makefile
+++ multimedia/qt4-mobility/Makefile
@@ -18,9 +18,9 @@ LICENSE=	LGPL21
 LIB_DEPENDS=	libblkid.so:misc/e2fsprogs-libblkid
 
 DATE=	20130703
-USES=		pkgconfig qmake shebangfix tar:xz
+USES=		pkgconfig qmake qt:4 shebangfix tar:xz
 SHEBANG_FILES=	bin/pathhelper bin/syncheaders
-USE_QT4=declarative corelib dbus gui linguist_build moc_build
+USE_QT=		declarative corelib dbus gui linguist_build moc_build rcc_build
 USE_LDCONFIG=	yes
 MOBILITY_MODS=
 
diff --git multimedia/qt4-multimedia/Makefile multimedia/qt4-multimedia/Makefile
index c84da6e2f447..f993a531378d 100644
--- multimedia/qt4-multimedia/Makefile
+++ multimedia/qt4-multimedia/Makefile
@@ -9,8 +9,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt low-level multimedia API
 
-USE_QT4=	qmake_build moc_build uic_build corelib gui
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build uic_build corelib gui
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git multimedia/qt5-multimedia/Makefile multimedia/qt5-multimedia/Makefile
index d15253ae3b24..dcd5867f34e4 100644
--- multimedia/qt5-multimedia/Makefile
+++ multimedia/qt5-multimedia/Makefile
@@ -10,12 +10,11 @@ COMMENT=	Qt audio, video, radio and camera support module
 
 # LICENSE set via USES_QT5 (bsd.qt.mk)
 
-USES=		pkgconfig qmake:norecursive
+USES=		pkgconfig qmake:norecursive qt-dist:5,multimedia
 USE_GL=		gl
 USE_GNOME=	glib20
-USE_QT5=	core gui network opengl qml quick widgets \
+USE_QT=		core gui network opengl qml quick widgets \
 		buildtools_build
-QT_DIST=	${PORTNAME}
 USE_XORG=	x11 xext xv
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
diff --git multimedia/shotcut/Makefile multimedia/shotcut/Makefile
index a5c965f8cdf5..cc02f50e0282 100644
--- multimedia/shotcut/Makefile
+++ multimedia/shotcut/Makefile
@@ -21,8 +21,8 @@ GH_ACCOUNT=	mltframework
 # Needed to be able to correctly check for updates in-app.
 FULLVERSION=	17.02.01
 
-USES=		pkgconfig qmake
-USE_QT5=	buildtools_build concurrent_build core \
+USES=		pkgconfig qmake qt:5
+USE_QT=		buildtools_build concurrent_build core \
 		graphicaleffects_run gui multimedia network opengl \
 		printsupport qml quick quickcontrols_run sql \
 		sql-sqlite3_run webkit websockets widgets x11extras xml
@@ -45,7 +45,8 @@ FREI0R_RUN_DEPENDS=	frei0r-plugins>=0:graphics/frei0r-plugins
 
 LADSPA_RUN_DEPENDS=	swhplugins>=0:audio/swhplugins
 
-NLS_USE=		QT5=linguisttools_build
+NLS_USES=	qt:5
+NLS_USE=		QT=linguisttools_build
 
 WEBVFX_RUN_DEPENDS=	${LOCALBASE}/lib/mlt/libmltwebvfx.so:multimedia/webvfx-qt5
 
diff --git multimedia/simplescreenrecorder/Makefile multimedia/simplescreenrecorder/Makefile
index 843089933857..72acb60a7884 100644
--- multimedia/simplescreenrecorder/Makefile
+++ multimedia/simplescreenrecorder/Makefile
@@ -13,11 +13,11 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 LIB_DEPENDS=	libasound.so:audio/alsa-lib \
 		libavformat.so:multimedia/ffmpeg
 
-USES=		cmake:outsource pkgconfig
+USES=		cmake:outsource pkgconfig qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	MaartenBaert
 GH_PROJECT=	ssr
-USE_QT5=	core gui widgets x11extras buildtools_build linguisttools_build qmake_build
+USE_QT=		core gui widgets x11extras buildtools_build linguisttools_build qmake_build
 USE_XORG=	x11 xext xfixes xi
 
 CMAKE_ON=	WITH_QT5
diff --git multimedia/smplayer-skins/Makefile multimedia/smplayer-skins/Makefile
index 916f9750dbe1..f07f86dcbe25 100644
--- multimedia/smplayer-skins/Makefile
+++ multimedia/smplayer-skins/Makefile
@@ -10,8 +10,8 @@ MASTER_SITES=	SF/smplayer/SMPlayer-skins/${PORTVERSION}
 MAINTAINER=	multimedia@FreeBSD.org
 COMMENT=	Skins for SMPlayer (Skinnable GUI)
 
-USES=		tar:bzip2
-USE_QT4=	rcc_build
+USES=		qt:4 tar:bzip2
+USE_QT=		rcc_build
 NO_ARCH=	yes
 
 DATADIR=	${PREFIX}/share/smplayer
diff --git multimedia/smplayer-themes/Makefile multimedia/smplayer-themes/Makefile
index 34309a037407..eaa05e3ab219 100644
--- multimedia/smplayer-themes/Makefile
+++ multimedia/smplayer-themes/Makefile
@@ -10,8 +10,8 @@ MASTER_SITES=	SF/smplayer/SMPlayer-themes/${PORTVERSION}/
 MAINTAINER=	nemysis@FreeBSD.org
 COMMENT=	Themes for SMPlayer
 
-USES=		tar:bzip2
-USE_QT4=	rcc_build
+USES=		qt:4 tar:bzip2
+USE_QT=		rcc_build
 NO_ARCH=	yes
 
 DATADIR=	${PREFIX}/share/smplayer
diff --git multimedia/smplayer/Makefile multimedia/smplayer/Makefile
index 487d78003c34..f6e41c4d6f32 100644
--- multimedia/smplayer/Makefile
+++ multimedia/smplayer/Makefile
@@ -40,11 +40,13 @@ MPV_DESC=	Allow to use mpv as multimedia engine
 SKINS_DESC=	Install additional skins
 THEMES_DESC=	Install additional themes
 
-QT4_USE=	qt4=moc_build,linguisttools_build,rcc_build,uic_build
-QT4_USE+=	qt4=corelib,dbus,gui,network,script,xml
+QT4_USES=	qt:4
+QT4_USE=	qt=moc_build,linguisttools_build,rcc_build,uic_build
+QT4_USE+=	qt=corelib,dbus,gui,network,script,xml
 
-QT5_USE=	qt5=buildtools_build,linguisttools_build
-QT5_USE+=	qt5=core,dbus,gui,network,script,widgets,xml
+QT5_USES=	qt:5
+QT5_USE=	qt=buildtools_build,linguisttools_build
+QT5_USE+=	qt=core,dbus,gui,network,script,widgets,xml
 
 MPLAYER_RUN_DEPENDS=	mplayer:multimedia/mplayer
 MPLAYER_QMAKE_OFF=	"DEFINES_DISABLED+=MPLAYER_SUPPORT"
diff --git multimedia/smtube/Makefile multimedia/smtube/Makefile
index d7476c5780b7..232d2a480e6b 100644
--- multimedia/smtube/Makefile
+++ multimedia/smtube/Makefile
@@ -34,11 +34,13 @@ MPV_DESC=	mpv dependency for video playback
 SMPLAYER_DESC=	SMPlayer dependency for video playback
 VLC_DESC=	VLC dependency for video playback
 
-QT4_USE=	qt4=qmake_build,moc_build,rcc_build,uic_build
-QT4_USE+=	qt4=corelib,network,script,gui,webkit,linguisttools_build
+QT4_USES=	qt:4
+QT4_USE=	qt=qmake_build,moc_build,rcc_build,uic_build
+QT4_USE+=	qt=corelib,network,script,gui,webkit,linguisttools_build
 
-QT5_USE=	qt5=qmake_build,buildtools_build,linguisttools_build
-QT5_USE+=	qt5=core,network,script,gui,webkit,widgets gl=gl
+QT5_USES=	qt:5
+QT5_USE=	qt=qmake_build,buildtools_build,linguisttools_build
+QT5_USE+=	qt=core,network,script,gui,webkit,widgets gl=gl
 
 MPLAYER_RUN_DEPENDS=		mplayer:multimedia/mplayer
 MPV_RUN_DEPENDS=		mpv:multimedia/mpv
diff --git multimedia/subtitlecomposer-kde4/Makefile multimedia/subtitlecomposer-kde4/Makefile
index 7a6dcebc2208..72016723821b 100644
--- multimedia/subtitlecomposer-kde4/Makefile
+++ multimedia/subtitlecomposer-kde4/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Subtitle editor for KDE
 
 LIB_DEPENDS=	libicui18n.so:devel/icu
 
-USES=		cmake:outsource gettext kde:4 shared-mime-info
+USES=		cmake:outsource gettext kde:4 qt:4 shared-mime-info
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qmake_build moc_build rcc_build uic_build phonon
+USE_QT=		qmake_build moc_build rcc_build uic_build phonon
 USE_CXXSTD=	gnu++98
 
 USE_GITHUB=	yes
diff --git multimedia/umplayer/Makefile multimedia/umplayer/Makefile
index 4b94245eb0b2..d6d0f37eefb4 100644
--- multimedia/umplayer/Makefile
+++ multimedia/umplayer/Makefile
@@ -15,8 +15,8 @@ LICENSE_FILE=	${WRKSRC}/Copying.txt
 
 RUN_DEPENDS=	mplayer:multimedia/mplayer
 
-USES=		desktop-file-utils gmake qmake tar:xz
-USE_QT4=	gui network xml moc_build rcc_build uic_build \
+USES=		desktop-file-utils gmake qmake qt:4 tar:xz
+USE_QT=		gui network xml moc_build rcc_build uic_build \
 		linguisttools_build
 INSTALLS_ICONS=	yes
 MAKE_ARGS+=	PREFIX=${PREFIX} DESTDIR=${STAGEDIR}
diff --git multimedia/vlc/Makefile multimedia/vlc/Makefile
index 0b101d37db6c..494374ceec94 100644
--- multimedia/vlc/Makefile
+++ multimedia/vlc/Makefile
@@ -237,13 +237,15 @@ PNG_CONFIGURE_ENABLE=	png
 PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
 PULSEAUDIO_CONFIGURE_ENABLE=	pulse
 
-QT4_USE=		QT4=gui,corelib,moc_build,rcc_build,uic_build
+QT4_USES=	qt:4
+QT4_USE=		QT=gui,corelib,moc_build,rcc_build,uic_build
 # QT_CFLAGS:	pkg-config --cflags "QtCore QtGui >= 4.6.0"
 # QT_LIBS:	pkg-config --libs "QtCore QtGui >= 4.6.0"
 QT4_CONFIGURE_ENV=	QT_CFLAGS="-I${QT_INCDIR}/QtGui -DQT_SHARED -I${QT_INCDIR} -I${QT_INCDIR}/QtCore" \
 			QT_LIBS="-lQtGui -L${QT_LIBDIR} -lQtCore"
 
-QT5_USE=		QT5=gui,core,widgets,x11extras,buildtools_build
+QT5_USES=	qt:5
+QT5_USE=		QT=gui,core,widgets,x11extras,buildtools_build
 
 REALRTSP_CONFIGURE_ENABLE=	realrtsp
 
diff --git multimedia/webcamoid/Makefile multimedia/webcamoid/Makefile
index 157b8898a5d2..d5b17a0e7030 100644
--- multimedia/webcamoid/Makefile
+++ multimedia/webcamoid/Makefile
@@ -17,12 +17,12 @@ LIB_DEPENDS=	libasound.so:audio/alsa-lib \
 		libpulse.so:audio/pulseaudio \
 		libv4l2.so:multimedia/libv4l
 
-USES=		pkgconfig qmake
+USES=		pkgconfig qmake qt:5
 USE_GITHUB=	yes
 USE_GNOME=	glib20
 USE_GSTREAMER1=	yes
 USE_GL=		gl
-USE_QT5=	concurrent core gui multimedia network opengl qml quick svg widgets buildtools_build quickcontrols_run
+USE_QT=		concurrent core gui multimedia network opengl qml quick svg widgets buildtools_build quickcontrols_run
 
 MAKE_ENV=	NOOSS=1 # NOOSS is because the OSS module attempts to use kevent on OSS devices, which is broken in the base
 QMAKE_ARGS=	INSTALLQMLDIR=${QT_QMLDIR} \
diff --git multimedia/webvfx-qt5/Makefile multimedia/webvfx-qt5/Makefile
index 8969e0a1ada7..76e045175654 100644
--- multimedia/webvfx-qt5/Makefile
+++ multimedia/webvfx-qt5/Makefile
@@ -18,8 +18,8 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	mltframework
 GH_TAGNAME=	e918ce4
 
-USES=		pkgconfig qmake
-USE_QT5=	3d buildtools_build opengl qml quick webkit
+USES=		pkgconfig qmake qt:5
+USE_QT=		3d buildtools_build opengl qml quick webkit
 USE_LDCONFIG=	yes
 
 PORTEXAMPLES=	*
diff --git net-im/cutegram/Makefile net-im/cutegram/Makefile
index 341f8973f4d5..a451a7f9afe4 100644
--- net-im/cutegram/Makefile
+++ net-im/cutegram/Makefile
@@ -22,8 +22,8 @@ GH_PROJECT=	Cutegram aseman-qt-tools:tools
 GH_TAGNAME=	91bf14b:tools
 GH_SUBDIR=	Cutegram/asemantools:tools
 
-USES=		qmake:outsource desktop-file-utils ssl
-USE_QT5=	qmake_build buildtools_build core qml quick sql xml multimedia \
+USES=		qmake:outsource desktop-file-utils qt:5 ssl
+USE_QT=		qmake_build buildtools_build core qml quick sql xml multimedia \
 		widgets dbus webkit quickcontrols graphicaleffects sql-sqlite3
 QMAKE_ARGS=	LIBQTELEGRAM_INCLUDE_PATH="${LOCALBASE}/include/libqtelegram-ae" \
 		TELEGRAMQML_INCLUDE_PATH="${LOCALBASE}/include/telegramqml"
diff --git net-im/diligent/Makefile net-im/diligent/Makefile
index 0a0aae030598..2ae3d921976c 100644
--- net-im/diligent/Makefile
+++ net-im/diligent/Makefile
@@ -13,10 +13,10 @@ COMMENT=	Unofficial Qt Slack client
 LICENSE=	LGPL3
 
 USE_LDCONFIG=	yes
-USE_QT5=	core gui linguist network svg \
+USE_QT=		core gui linguist network svg \
 		webkit widgets x11extras buildtools_build
 USE_GL=		gl
-USES=		compiler:c++11-lang qmake
+USES=		compiler:c++11-lang qmake qt:5
 
 QMAKE_ARGS=	CONFIG+="configure"
 
diff --git net-im/ekiga/Makefile net-im/ekiga/Makefile
index 792eb14c662c..1c0ce254517e 100644
--- net-im/ekiga/Makefile
+++ net-im/ekiga/Makefile
@@ -56,8 +56,9 @@ KAB_IMPLIES=	KDE
 PLIST_SUB+=	VERSION=${PORTVERSION}
 
 .if ${PORT_OPTIONS:MKDE} || ${PORT_OPTIONS:MKAB}
+USES+=		qt:4
 USE_KDE=	kdelibs
-USE_QT4=	corelib
+USE_QT=		corelib
 CONFIGURE_ARGS+=--enable-kde
 #CONFIGURE_ENV+=KDE_CFLAGS="-I${KDE_PREFIX}/include -I${QT_INCDIR} \
 #	-I${LOCALBASE}/include" KDE_LIBS="-L${KDE_PREFIX}/lib"
diff --git net-im/gitterdone/Makefile net-im/gitterdone/Makefile
index 2686a1b04432..db285a6dbe13 100644
--- net-im/gitterdone/Makefile
+++ net-im/gitterdone/Makefile
@@ -14,8 +14,8 @@ MAKE_ARGS=	PREFIX=${STAGEDIR}${PREFIX}
 MAKE_JOBS_UNSAFE=	yes
 USE_LDCONFIG=	yes
 
-USES=		qmake shebangfix tar:xz
-USE_QT5=	core gui network linguist_build \
+USES=		qmake qt:5 shebangfix tar:xz
+USE_QT=		core gui network linguist_build \
 		buildtools_build widgets webkit svg
 USE_GL+=	gl
 
diff --git net-im/hotot/Makefile net-im/hotot/Makefile
index 492886722b13..071fe970d49f 100644
--- net-im/hotot/Makefile
+++ net-im/hotot/Makefile
@@ -15,7 +15,7 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	lyricat
 GH_PROJECT=	Hotot
 
-USES=		cmake gettext kde:4 python:2.7
+USES=		cmake gettext kde:4 python:2.7 qt:4
 USE_GNOME=	intltool
 INSTALLS_ICONS=	yes
 
@@ -38,7 +38,7 @@ PLIST_SUB+=	GTK2="@comment "
 .endif
 
 .if ${PORT_OPTIONS:MQT4} || ${PORT_OPTIONS:MKDE4}
-USE_QT4=	moc_build qmake_build rcc_build uic_build \
+USE_QT=		moc_build qmake_build rcc_build uic_build \
 		corelib gui sql webkit
 PLIST_SUB+=	QT4=""
 .else
diff --git net-im/kaccounts-integration/Makefile net-im/kaccounts-integration/Makefile
index 01b146d19e7b..d5cbfbdc9ae4 100644
--- net-im/kaccounts-integration/Makefile
+++ net-im/kaccounts-integration/Makefile
@@ -14,11 +14,11 @@ LIB_DEPENDS=	libaccounts-glib.so:net-im/libaccounts-glib \
 		libkeyring-kwallet.so:sysutils/signon-kwallet-extension
 RUN_DEPENDS=	signon-ui:sysutils/signon-ui
 
-USES=		cmake:outsource gettext pkgconfig kde:5 tar:xz
+USES=		cmake:outsource gettext pkgconfig kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons dbusaddons ecm \
 		i18n iconthemes kcmutils kio service wallet widgetsaddons \
 		akonadi
-USE_QT5=	dbus core gui network qml widgets xml \
+USE_QT=		dbus core gui network qml widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git net-im/kaccounts-providers/Makefile net-im/kaccounts-providers/Makefile
index 2e8b9a216132..6b423a4e34ec 100644
--- net-im/kaccounts-providers/Makefile
+++ net-im/kaccounts-providers/Makefile
@@ -12,10 +12,10 @@ LIB_DEPENDS=	libaccounts-glib.so:net-im/libaccounts-glib \
 		libaccounts-qt5.so:net-im/libaccounts-qt5 \
 		libsignon-qt5.so:sysutils/signon-qt5
 
-USES=		cmake:outsource gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource gettext kde:5 pkgconfig qt:5 tar:xz
 USE_GNOME=	intltool
 USE_KDE=	config coreaddons i18n kdeclarative kio package service
-USE_QT5=	core gui network qml xml \
+USE_QT=		core gui network qml xml \
 		buildtools_build qmake_build
 
 #install to ${LOCALBASE}:
diff --git net-im/kmess-kde4/Makefile net-im/kmess-kde4/Makefile
index f5b48d20821d..99c58a06ffd4 100644
--- net-im/kmess-kde4/Makefile
+++ net-im/kmess-kde4/Makefile
@@ -13,9 +13,9 @@ COMMENT=	MSN Messenger client for KDE
 LIB_DEPENDS=	libqca.so:devel/qca@qt4 \
 		libgif.so:graphics/giflib
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_GNOME=	libxml2 libxslt
 USE_KDE=	kdelibs libkonq automoc4
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net-im/kopete-kde4/Makefile net-im/kopete-kde4/Makefile
index 8ec901456aa1..59684e5b4458 100644
--- net-im/kopete-kde4/Makefile
+++ net-im/kopete-kde4/Makefile
@@ -18,12 +18,12 @@ LIB_DEPENDS=	libidn.so:dns/libidn \
 		libjasper.so:graphics/jasper
 BUILD_DEPENDS=	${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat
 
-USES=		cmake:outsource jpeg kde:4 pkgconfig shebangfix sqlite tar:xz \
+USES=		cmake:outsource jpeg kde:4 pkgconfig qt:4 shebangfix sqlite tar:xz \
 		webplugin:native
 USE_GNOME=	libxml2 libxslt
 USE_KDE=	kdelibs pimlibs \
 		automoc4 qimageblitz
-USE_QT4=	corelib gui network qt3support sql xml \
+USE_QT=		corelib gui network qt3support sql xml \
 		moc_build qmake_build rcc_build uic_build uic3_build
 USE_XORG=	x11 xdamage xext xscrnsaver xtst
 USE_LDCONFIG=	yes
diff --git net-im/kopete/Makefile net-im/kopete/Makefile
index af654fa800b9..b8b9a82bfa12 100644
--- net-im/kopete/Makefile
+++ net-im/kopete/Makefile
@@ -15,7 +15,7 @@ LIB_DEPENDS=    libidn.so:dns/libidn \
 		libqca-qt5.so:devel/qca@qt5 \
 		libv4l2.so:multimedia/libv4l
 
-USES=		cmake:outsource jpeg kde:5 shebangfix tar:xz
+USES=		cmake:outsource jpeg kde:5 qt:5 shebangfix tar:xz
 USE_GNOME=	libxml2 libxslt
 USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons dnssd ecm emoticons guiaddons i18n \
@@ -25,7 +25,7 @@ USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		windowsystem xmlgui
 # KDE PIM components
 USE_KDE+=	contacts identitymanagement libkleo pimtextedit
-USE_QT5=        core dbus gui network phonon4 printsupport sql widgets xml \
+USE_QT=	        core dbus gui network phonon4 printsupport sql widgets xml \
 		buildtools_build qmake_build
 
 # See #228640: temporary work around to fix the build on Current with ld being lld.
diff --git net-im/ktp-accounts-kcm-kde4/Makefile net-im/ktp-accounts-kcm-kde4/Makefile
index a4bc100be5d3..b7a68b322bac 100644
--- net-im/ktp-accounts-kcm-kde4/Makefile
+++ net-im/ktp-accounts-kcm-kde4/Makefile
@@ -15,9 +15,9 @@ LIB_DEPENDS=	libtelepathy-qt4.so:net-im/telepathy-qt4 \
 		libktpcommoninternalsprivate.so:net-im/ktp-common-internals-kde4
 RUN_DEPENDS=	${KDE_PREFIX}/bin/ktp-contactlist:net-im/ktp-contact-list-kde4
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 OPTIONS_DEFINE=	HAZE IRC JABBER SALUT
diff --git net-im/ktp-accounts-kcm/Makefile net-im/ktp-accounts-kcm/Makefile
index 4d2c71957ae1..c710ee9abc62 100644
--- net-im/ktp-accounts-kcm/Makefile
+++ net-im/ktp-accounts-kcm/Makefile
@@ -18,12 +18,12 @@ LIB_DEPENDS=	libaccounts-qt5.so:net-im/libaccounts-qt5 \
 RUN_DEPENDS=	${KDE_PREFIX}/bin/ktp-contactlist:net-im/ktp-contact-list  \
 		${QT_PLUGINDIR}/kaccounts/ui/owncloud_plugin_kaccounts.so:net-im/kaccounts-providers
 
-USES=		cmake:outsource gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource gettext kde:5 pkgconfig qt:5 tar:xz
 USE_GNOME=	intltool
 USE_KDE=	auth codecs config configwidgets coreaddons ecm i18n \
 		iconthemes itemviews kcmutils kio notifications notifyconfig \
 		service texteditor wallet widgetsaddons windowsystem
-USE_QT5=	core dbus gui network qml sql widgets xml \
+USE_QT=		core dbus gui network qml sql widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net-im/ktp-approver-kde4/Makefile net-im/ktp-approver-kde4/Makefile
index 2d016c168bab..8214249e8a61 100644
--- net-im/ktp-approver-kde4/Makefile
+++ net-im/ktp-approver-kde4/Makefile
@@ -14,8 +14,8 @@ LIB_DEPENDS=	libtelepathy-qt4.so:net-im/telepathy-qt4 \
 		libktpcommoninternalsprivate.so:net-im/ktp-common-internals-kde4
 RUN_DEPENDS=	${KDE_PREFIX}/bin/ktp-contactlist:net-im/ktp-contact-list-kde4
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-approver/Makefile net-im/ktp-approver/Makefile
index 3484874183e1..f2aa6a6a371a 100644
--- net-im/ktp-approver/Makefile
+++ net-im/ktp-approver/Makefile
@@ -11,9 +11,9 @@ LIB_DEPENDS=	libtelepathy-qt5.so:net-im/telepathy-qt5 \
 		libKTpCommonInternals.so:net-im/ktp-common-internals
 RUN_DEPENDS=	${KDE_PREFIX}/bin/ktp-contactlist:net-im/ktp-contact-list
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons ecm dbusaddons service i18n notifications
-USE_QT5=	core  dbus gui network widgets xml \
+USE_QT=		core  dbus gui network widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-auth-handler-kde4/Makefile net-im/ktp-auth-handler-kde4/Makefile
index 92758b800edc..03a30988ff7d 100644
--- net-im/ktp-auth-handler-kde4/Makefile
+++ net-im/ktp-auth-handler-kde4/Makefile
@@ -15,9 +15,9 @@ LIB_DEPENDS=	libqjson.so:devel/qjson \
 		libtelepathy-qt4.so:net-im/telepathy-qt4 \
 		libktpcommoninternalsprivate.so:net-im/ktp-common-internals-kde4
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib dbus gui xml webkit \
+USE_QT=		corelib dbus gui xml webkit \
 		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-auth-handler/Makefile net-im/ktp-auth-handler/Makefile
index 454fc178c249..530106515197 100644
--- net-im/ktp-auth-handler/Makefile
+++ net-im/ktp-auth-handler/Makefile
@@ -14,10 +14,10 @@ LIB_DEPENDS=	libqca-qt5.so:devel/qca@qt5 \
 		libkaccounts.so:net-im/kaccounts-integration \
 		libsignon-qt5.so:sysutils/signon-qt5
 
-USES=		cmake:outsource gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	completion config coreaddons ecm i18n jobwidgets kdewebkit \
 		kio wallet service widgetsaddons
-USE_QT5=	core dbus gui network webkit widgets xml \
+USE_QT=		core dbus gui network webkit widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-call-ui/Makefile net-im/ktp-call-ui/Makefile
index 3f068bc14fe5..259fa9ec9848 100644
--- net-im/ktp-call-ui/Makefile
+++ net-im/ktp-call-ui/Makefile
@@ -16,12 +16,12 @@ LIB_DEPENDS=	libKTpCommonInternals.so:net-im/ktp-common-internals \
 		libtelepathy-qt5-farstream.so:net-im/telepathy-qt5
 
 USES=		cmake:outsource compiler:c++11-lang gettext kde:5 pkgconfig \
-		python:2.7 tar:xz
+		python:2.7 qt:5 tar:xz
 USE_GNOME=	glib20
 USE_KDE=	auth codecs config configwidgets coreaddons ecm iconthemes \
 		i18n kcmutils kdeclarative notifications package service \
 		wallet widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick widgets xml \
+USE_QT=		core dbus gui network qml quick widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net-im/ktp-common-internals-kde4/Makefile net-im/ktp-common-internals-kde4/Makefile
index e0ad6001ef16..538b9debdb3d 100644
--- net-im/ktp-common-internals-kde4/Makefile
+++ net-im/ktp-common-internals-kde4/Makefile
@@ -14,9 +14,9 @@ LIB_DEPENDS=	libtelepathy-qt4.so:net-im/telepathy-qt4 \
 		libtelepathy-logger-qt4.so:net-im/telepathy-logger-qt4
 RUN_DEPENDS=	${LOCALBASE}/libexec/mission-control-5:net-im/telepathy-mission-control
 
-USES=		cmake compiler:c++11-lang gettext kde:4 tar:bzip2
+USES=		cmake compiler:c++11-lang gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs pimlibs automoc4
-USE_QT4=	declarative script \
+USE_QT=		declarative script \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git net-im/ktp-common-internals/Makefile net-im/ktp-common-internals/Makefile
index 06bec6420843..60644a228215 100644
--- net-im/ktp-common-internals/Makefile
+++ net-im/ktp-common-internals/Makefile
@@ -17,13 +17,13 @@ LIB_DEPENDS=	libgcrypt.so:security/libgcrypt \
 RUN_DEPENDS=	${LOCALBASE}/lib/mission-control-plugins.0/mcp-account-manager-accounts-sso.so:net-im/telepathy-accounts-signon \
 		${LOCALBASE}/libexec/mission-control-5:net-im/telepathy-mission-control
 
-USES=		cmake:outsource gettext pkgconfig kde:5 tar:xz
+USES=		cmake:outsource gettext pkgconfig kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons ecm i18n iconthemes itemviews jobwidgets kcmutils \
 		kio notifications notifyconfig parts people service solid \
 		sonnet texteditor textwidgets wallet widgetsaddons windowsystem \
 		xmlgui
-USE_QT5=	core dbus gui network qml sql widgets xml \
+USE_QT=		core dbus gui network qml sql widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net-im/ktp-contact-list-kde4/Makefile net-im/ktp-contact-list-kde4/Makefile
index 1a3d2265dea5..034d96ec9eaa 100644
--- net-im/ktp-contact-list-kde4/Makefile
+++ net-im/ktp-contact-list-kde4/Makefile
@@ -14,8 +14,8 @@ LIB_DEPENDS=	libtelepathy-qt4.so:net-im/telepathy-qt4 \
 		libtelepathy-logger-qt4.so:net-im/telepathy-logger-qt4 \
 		libktpcommoninternalsprivate.so:net-im/ktp-common-internals-kde4
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-contact-list/Makefile net-im/ktp-contact-list/Makefile
index 88c74df10623..ad30cd9300d6 100644
--- net-im/ktp-contact-list/Makefile
+++ net-im/ktp-contact-list/Makefile
@@ -11,12 +11,12 @@ LIB_DEPENDS=	libtelepathy-qt5.so:net-im/telepathy-qt5 \
 		libtelepathy-logger-qt.so:net-im/telepathy-logger-qt5 \
 		libKTpCommonInternals.so:net-im/ktp-common-internals
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		dbusaddons ecm i18n iconthemes jobwidgets kcmutils kio \
 		notifications notifyconfig people service wallet widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-contact-runner-kde4/Makefile net-im/ktp-contact-runner-kde4/Makefile
index ed7084f66f0a..3754ab957b51 100644
--- net-im/ktp-contact-runner-kde4/Makefile
+++ net-im/ktp-contact-runner-kde4/Makefile
@@ -13,8 +13,8 @@ COMMENT=	KRunner integration module for KDE Telepathy
 LIB_DEPENDS=	libtelepathy-qt4.so:net-im/telepathy-qt4 \
 		libktpcommoninternalsprivate.so:net-im/ktp-common-internals-kde4
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-contact-runner/Makefile net-im/ktp-contact-runner/Makefile
index 9c4e23fb0a08..ab3afb7859ec 100644
--- net-im/ktp-contact-runner/Makefile
+++ net-im/ktp-contact-runner/Makefile
@@ -10,10 +10,10 @@ COMMENT=	KRunner integration module for KDE Telepathy
 LIB_DEPENDS=	libtelepathy-qt5.so:net-im/telepathy-qt5 \
 		libKTpCommonInternals.so:net-im/ktp-common-internals
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons ecm i18n package plasma-framework runner \
 		service wallet
-USE_QT5=	core dbus gui network widgets xml\
+USE_QT=		core dbus gui network widgets xml\
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-desktop-applets-kde4/Makefile net-im/ktp-desktop-applets-kde4/Makefile
index ae23875788bb..9fb39f52f1f0 100644
--- net-im/ktp-desktop-applets-kde4/Makefile
+++ net-im/ktp-desktop-applets-kde4/Makefile
@@ -12,8 +12,8 @@ COMMENT=	KDE instant messaging plasma widgets
 
 LIB_DEPENDS=	libktpcommoninternalsprivate.so:net-im/ktp-common-internals-kde4
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-desktop-applets/Makefile net-im/ktp-desktop-applets/Makefile
index 1b7e0a84cb93..9794bdfd8dcc 100644
--- net-im/ktp-desktop-applets/Makefile
+++ net-im/ktp-desktop-applets/Makefile
@@ -9,9 +9,9 @@ COMMENT=	KDE instant messaging plasma widgets
 
 LIB_DEPENDS=	libKTpCommonInternals.so:net-im/ktp-common-internals
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	ecm plasma-framework windowsystem
-USE_QT5=	core dbus gui network qml widgets \
+USE_QT=		core dbus gui network qml widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-filetransfer-handler-kde4/Makefile net-im/ktp-filetransfer-handler-kde4/Makefile
index 70b0942f3b81..4a8e409ab199 100644
--- net-im/ktp-filetransfer-handler-kde4/Makefile
+++ net-im/ktp-filetransfer-handler-kde4/Makefile
@@ -13,8 +13,8 @@ COMMENT=	KDE instant messaging file transfer handler
 LIB_DEPENDS=	libtelepathy-qt4.so:net-im/telepathy-qt4 \
 		libktpcommoninternalsprivate.so:net-im/ktp-common-internals-kde4
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-filetransfer-handler/Makefile net-im/ktp-filetransfer-handler/Makefile
index cc72359245a2..507df8f28dc4 100644
--- net-im/ktp-filetransfer-handler/Makefile
+++ net-im/ktp-filetransfer-handler/Makefile
@@ -10,11 +10,11 @@ COMMENT=	KDE instant messaging file transfer handler
 LIB_DEPENDS=	libtelepathy-qt5.so:net-im/telepathy-qt5 \
 		libKTpCommonInternals.so:net-im/ktp-common-internals
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons ecm i18n itemviews jobwidgets kio service solid \
 		wallet widgetsaddons xmlgui
-USE_QT5=	core dbus gui network xml widgets \
+USE_QT=		core dbus gui network xml widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-kded-integration-module-kde4/Makefile net-im/ktp-kded-integration-module-kde4/Makefile
index 36fc6ced253d..d3703baac81e 100644
--- net-im/ktp-kded-integration-module-kde4/Makefile
+++ net-im/ktp-kded-integration-module-kde4/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Module for integration of instant messaging into KDE Workspaces
 LIB_DEPENDS=	libtelepathy-qt4.so:net-im/telepathy-qt4 \
 		libktpcommoninternalsprivate.so:net-im/ktp-common-internals-kde4
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-kded-module/Makefile net-im/ktp-kded-module/Makefile
index 5a724e294202..9614ef704e3e 100644
--- net-im/ktp-kded-module/Makefile
+++ net-im/ktp-kded-module/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Module for integration of instant messaging into KDE Workspaces
 LIB_DEPENDS=	libtelepathy-qt5.so:net-im/telepathy-qt5 \
 		libKTpCommonInternals.so:net-im/ktp-common-internals
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	activities auth codecs completion config configwidgets coreaddons \
 		dbusaddons i18n idletime jobwidgets kcmutils kio notifications \
 		service wallet widgetsaddons
-USE_QT5=	concurrent core dbus gui network sql widgets xml \
+USE_QT=		concurrent core dbus gui network sql widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-send-file-kde4/Makefile net-im/ktp-send-file-kde4/Makefile
index 1d1dd55ab1fb..a3d54873e306 100644
--- net-im/ktp-send-file-kde4/Makefile
+++ net-im/ktp-send-file-kde4/Makefile
@@ -15,8 +15,8 @@ LIB_DEPENDS=	libtelepathy-qt4.so:net-im/telepathy-qt4 \
 RUN_DEPENDS=	${KDE_PREFIX}/lib/kde4/libexec/ktp-filetransfer-handler:net-im/ktp-filetransfer-handler-kde4 \
 		${KDE_PREFIX}/bin/ktp-contactlist:net-im/ktp-contact-list-kde4
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-send-file/Makefile net-im/ktp-send-file/Makefile
index 1060889a438d..cab72ca872ff 100644
--- net-im/ktp-send-file/Makefile
+++ net-im/ktp-send-file/Makefile
@@ -12,11 +12,11 @@ LIB_DEPENDS=	libtelepathy-qt5.so:net-im/telepathy-qt5 \
 RUN_DEPENDS=	${KDE_PREFIX}/lib/libexec/ktp-filetransfer-handler:net-im/ktp-filetransfer-handler \
 		${KDE_PREFIX}/bin/ktp-contactlist:net-im/ktp-contact-list
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons ecm \
 		i18n iconthemes jobwidgets kcmutils kio service wallet \
 		widgetsaddons
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git net-im/ktp-text-ui-kde4/Makefile net-im/ktp-text-ui-kde4/Makefile
index 381359d0b896..a892b0989bc1 100644
--- net-im/ktp-text-ui-kde4/Makefile
+++ net-im/ktp-text-ui-kde4/Makefile
@@ -15,9 +15,9 @@ LIB_DEPENDS=	libtelepathy-qt4.so:net-im/telepathy-qt4 \
 		libktpcommoninternalsprivate.so:net-im/ktp-common-internals-kde4
 RUN_DEPENDS=	${KDE_PREFIX}/bin/ktp-contactlist:net-im/ktp-contact-list-kde4
 
-USES=		cmake compiler:c++11-lang gettext kde:4 tar:bzip2
+USES=		cmake compiler:c++11-lang gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	automoc4
-USE_QT4=	corelib webkit xml \
+USE_QT=		corelib webkit xml \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git net-im/ktp-text-ui/Makefile net-im/ktp-text-ui/Makefile
index 78bdf248be0e..f169825ef22e 100644
--- net-im/ktp-text-ui/Makefile
+++ net-im/ktp-text-ui/Makefile
@@ -12,13 +12,13 @@ LIB_DEPENDS=	libtelepathy-qt5.so:net-im/telepathy-qt5 \
 		libKTpCommonInternals.so:net-im/ktp-common-internals
 RUN_DEPENDS=	${KDE_PREFIX}/bin/ktp-contactlist:net-im/ktp-contact-list
 
-USES=		cmake:outsource compiler:c++11-lang gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lang gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive auth codecs completion config configwidgets coreaddons \
 		dbusaddons ecm emoticons i18n iconthemes itemviews jobwidgets \
 		kcmutils kdewebkit kio notifications notifyconfig people \
 		service sonnet textwidgets wallet widgetsaddons windowsystem \
 		xmlgui
-USE_QT5=	core dbus gui location network qml quick speech webchannel \
+USE_QT=		core dbus gui location network qml quick speech webchannel \
 		webengine widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git net-im/libaccounts-qt5/Makefile net-im/libaccounts-qt5/Makefile
index a9e65d9c7cf7..cb95d26be51d 100644
--- net-im/libaccounts-qt5/Makefile
+++ net-im/libaccounts-qt5/Makefile
@@ -20,8 +20,8 @@ BUILD_DEPENDS=	doxygen:devel/doxygen
 
 FETCH_BEFORE_ARGS=	-o ${DISTFILES}
 
-USES=		compiler:c++11-lib qmake pathfix pkgconfig python tar:bz2
-USE_QT5=	buildtools_build core qmake_build testlib xml
+USES=		compiler:c++11-lib qmake pathfix pkgconfig python qt:5 tar:bz2
+USE_QT=		buildtools_build core qmake_build testlib xml
 
 pre-configure:
 	${REINPLACE_CMD} -e 's,$$$${INSTALL_LIBDIR},${LOCALBASE}/libdata,' \
diff --git net-im/libjreen/Makefile net-im/libjreen/Makefile
index 5fa62fc855ae..78d9f56e34cf 100644
--- net-im/libjreen/Makefile
+++ net-im/libjreen/Makefile
@@ -21,9 +21,9 @@ LDFLAGS+=	-L${LOCALBASE}/lib
 
 USE_GITHUB=	yes
 USE_LDCONFIG=	yes
-USE_QT4=	moc_build qmake_build rcc_build network
+USE_QT=		moc_build qmake_build rcc_build network
 
-USES=		cmake pkgconfig:build
+USES=		cmake pkgconfig:build qt:4
 
 pre-configure:
 	${REINPLACE_CMD} -e 's,lib.*/pkgconfig,libdata/pkgconfig,' \
diff --git net-im/libqtelegram-ae/Makefile net-im/libqtelegram-ae/Makefile
index bf81d8e8fc00..bb23674fb75e 100644
--- net-im/libqtelegram-ae/Makefile
+++ net-im/libqtelegram-ae/Makefile
@@ -18,8 +18,8 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	Aseman-Land
 GH_PROJECT=	libqtelegram-aseman-edition
 
-USES=		qmake:outsource ssl
-USE_QT5=	qmake_build buildtools_build core gui network multimedia
+USES=		qmake:outsource qt:5 ssl
+USE_QT=		qmake_build buildtools_build core gui network multimedia
 USE_LDCONFIG=	yes
 
 post-patch:
diff --git net-im/licq-qt-gui/Makefile net-im/licq-qt-gui/Makefile
index 33b7baa75420..7d015ce1050b 100644
--- net-im/licq-qt-gui/Makefile
+++ net-im/licq-qt-gui/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libboost_regex.so:devel/boost-libs
 RUN_DEPENDS=	${LOCALBASE}/lib/licq/protocol_icq.so:${LICQ_PORT}-icq
 
 USE_XORG=	x11 xext ice xscrnsaver sm
-USES=		cmake
-USE_QT4=	qmake_build moc_build rcc_build uic_build linguisttools_build \
+USES=		cmake qt:4
+USE_QT=		qmake_build moc_build rcc_build uic_build linguisttools_build \
 		corelib xml gui network dbus svg
 
 OPTIONS_DEFINE=	HUNSPELL KDE4
diff --git net-im/plasma-applet-ktp-kde4/Makefile net-im/plasma-applet-ktp-kde4/Makefile
index 22d7ad0b8b95..c8d927ca3f6a 100644
--- net-im/plasma-applet-ktp-kde4/Makefile
+++ net-im/plasma-applet-ktp-kde4/Makefile
@@ -15,9 +15,9 @@ COMMENT=	KDE instant messaging Plasma applets
 LIB_DEPENDS=	libtelepathy-qt4.so:net-im/telepathy-qt4 \
 		libktpcommoninternalsprivate.so:net-im/ktp-common-internals-kde4
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib declarative \
+USE_QT=		corelib declarative \
 		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net-im/psi/Makefile net-im/psi/Makefile
index 88a92ec747f0..5d6191e14774 100644
--- net-im/psi/Makefile
+++ net-im/psi/Makefile
@@ -15,13 +15,13 @@ LIB_DEPENDS=	libidn.so:dns/libidn \
 		libminizip.so:archivers/minizip \
 		libqca-qt5.so:devel/qca@qt5
 
-USES=		cmake desktop-file-utils pkgconfig tar:xz
+USES=		cmake desktop-file-utils pkgconfig qt:5 tar:xz
 
 CMAKE_ARGS=	-DIDN_LIBRARY=${LOCALBASE}/lib/libidn.so \
 		-DIDN_INCLUDE_DIR=${LOCALBASE}/include \
 		-DUSE_WEBENGINE:BOOL=FALSE
 
-USE_QT5=	concurrent core dbus gui multimedia network svg webkit widgets \
+USE_QT=		concurrent core dbus gui multimedia network svg webkit widgets \
 		x11extras xml \
 		buildtools_build qmake_build imageformats_run
 USE_XORG=	ice sm x11 xcb xext xscrnsaver
diff --git net-im/psimedia/Makefile net-im/psimedia/Makefile
index 4ab4de90d15b..6b6c2a7dbfb3 100644
--- net-im/psimedia/Makefile
+++ net-im/psimedia/Makefile
@@ -12,12 +12,11 @@ COMMENT=	Voice and video API for Psi-like IM clients
 LIB_DEPENDS=	liboil-0.3.so:devel/liboil \
 		libspeexdsp.so:audio/speexdsp
 
-USES=		pkgconfig tar:bzip2
+USES=		pkgconfig qmake:no_env qt:4 tar:bzip2
 HAS_CONFIGURE=	yes
-USE_QT4=	gui qmake_build moc_build uic_build
+USE_QT=		gui qmake_build moc_build uic_build
 USE_GSTREAMER=	jpeg speex theora vorbis
 
-QT_NONSTANDARD=	yes
 CONFIGURE_ARGS=	--qtdir=${LOCALBASE} \
 		--verbose
 DESTDIRNAME=	INSTALL_ROOT
diff --git net-im/qTox/Makefile net-im/qTox/Makefile
index 0fe9dc6ae2a4..138ea02123e1 100644
--- net-im/qTox/Makefile
+++ net-im/qTox/Makefile
@@ -27,10 +27,10 @@ LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg \
 		libtoxcore.so:net-im/tox \
 		libvpx.so:multimedia/libvpx
 
-USES=		cmake compiler:c++11-lib desktop-file-utils gettext openal:soft pkgconfig
+USES=		cmake compiler:c++11-lib desktop-file-utils gettext openal:soft pkgconfig qt:5
 USE_GITHUB=	yes
 USE_GNOME=	gtk20 gdkpixbuf2 cairo
-USE_QT5=	core gui network xml opengl sql sql-sqlite3_run widgets svg \
+USE_QT=		core gui network xml opengl sql sql-sqlite3_run widgets svg \
 		concurrent_build buildtools_build linguisttools_build qmake_build testlib_build
 CMAKE_ARGS=	-DGIT_DESCRIBE:STRING=${FULLVERSION}
 CMAKE_OFF=	USE_CCACHE
diff --git net-im/qxmpp/Makefile net-im/qxmpp/Makefile
index ca77e6e795dc..de2d18bcd3ed 100644
--- net-im/qxmpp/Makefile
+++ net-im/qxmpp/Makefile
@@ -16,10 +16,12 @@ CONFLICTS?=	${PORTNAME}-qt5-[0-9]*
 
 USES=		qmake pathfix pkgconfig libtool
 .if defined(QXMPP_SLAVE)
-USE_QT5=	core gui network xml buildtools_build
+USES+=		qt:5
+USE_QT=		core gui network xml buildtools_build
 PLIST_SUB=	QDNS="@comment "
 .else
-USE_QT4=	corelib gui network qtestlib xml uic_build moc_build \
+USES+=		qt:4
+USE_QT=		corelib gui network qtestlib xml uic_build moc_build \
 		rcc_build
 PLIST_SUB=	QDNS=""
 .endif
diff --git net-im/ramblercontacts/Makefile net-im/ramblercontacts/Makefile
index 7652693f840f..f4d80945aee1 100644
--- net-im/ramblercontacts/Makefile
+++ net-im/ramblercontacts/Makefile
@@ -13,10 +13,10 @@ COMMENT=	Free, multi-service communication client from Rambler
 
 LICENSE=	GPLv3
 
-USES=		qmake dos2unix
+USES=		qmake dos2unix qt:4
 DOS2UNIX_FILES=	src/config.inc
 USE_XORG=	xscrnsaver
-USE_QT4=	moc_build rcc_build uic_build designer_build \
+USE_QT=		moc_build rcc_build uic_build designer_build \
 		webkit
 USE_LDCONFIG=	yes
 
diff --git net-im/ricochet/Makefile net-im/ricochet/Makefile
index f3a40f62ebcd..ead48bfc573b 100644
--- net-im/ricochet/Makefile
+++ net-im/ricochet/Makefile
@@ -17,10 +17,10 @@ LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 
 LIB_DEPENDS=	libprotobuf.so:devel/protobuf
 
-USES=		compiler:c++11-lib gmake pkgconfig qmake ssl
+USES=		compiler:c++11-lib gmake pkgconfig qmake qt:5 ssl
 USE_GITHUB=	yes
 GH_ACCOUNT=	ricochet-im
-USE_QT5=	core gui multimedia network qml quick quickcontrols widgets \
+USE_QT=		core gui multimedia network qml quick quickcontrols widgets \
 		buildtools_build linguisttools_build
 USE_GL=		gl
 QMAKE_ARGS+=	DEFINES+=RICOCHET_NO_PORTABLE OPENSSLDIR=${OPENSSLBASE}
diff --git net-im/teamwords/Makefile net-im/teamwords/Makefile
index d4459750ab0c..b440e557da05 100644
--- net-im/teamwords/Makefile
+++ net-im/teamwords/Makefile
@@ -12,9 +12,9 @@ COMMENT=	Unofficial Qt Slack client
 
 LICENSE=	LGPL3
 
-USES=		compiler:c++11-lang qmake
+USES=		compiler:c++11-lang qmake qt:5
 USE_LDCONFIG=	yes
-USE_QT5=	core gui widgets network svg linguist \
+USE_QT=		core gui widgets network svg linguist \
 		webkit buildtools x11extras
 USE_GL=		gl
 
diff --git net-im/telegram-desktop/Makefile net-im/telegram-desktop/Makefile
index 3c438124be35..934a3d07903a 100644
--- net-im/telegram-desktop/Makefile
+++ net-im/telegram-desktop/Makefile
@@ -23,7 +23,7 @@ LIB_DEPENDS=	libavformat.so:multimedia/ffmpeg \
 		libopenal.so:audio/openal-soft \
 		libopus.so:audio/opus
 
-USES=		cmake:noninja,outsource desktop-file-utils gmake pkgconfig python:2.7,build ssl
+USES=		cmake:noninja,outsource desktop-file-utils gmake pkgconfig python:2.7,build qt:5 ssl
 USE_GITHUB=	yes
 GH_ACCOUNT=	telegramdesktop
 GH_PROJECT=	tdesktop
@@ -33,7 +33,7 @@ GH_TUPLE=	catchorg:Catch2:5ca44b68:catch/Telegram/ThirdParty/Catch \
 		telegramdesktop:libtgvoip:6e0e102:libtgvoip/Telegram/ThirdParty/libtgvoip \
 		telegramdesktop:crl:344cbde9:crl/Telegram/ThirdParty/crl
 USE_GNOME=	glib20 gtk30
-USE_QT5=	core gui imageformats network widgets buildtools_build qmake_build dbus
+USE_QT=		core gui imageformats network widgets buildtools_build qmake_build dbus
 USE_XORG=	x11 xcb
 
 CMAKE_SOURCE_PATH=	${WRKSRC}/out/Release
diff --git net-im/telegramqml/Makefile net-im/telegramqml/Makefile
index 8501d9f1c7d2..19cfe0a592cd 100644
--- net-im/telegramqml/Makefile
+++ net-im/telegramqml/Makefile
@@ -19,8 +19,8 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	Aseman-Land
 GH_PROJECT=	TelegramQML
 
-USES=		qmake:outsource ssl
-USE_QT5=	qmake_build buildtools_build core qml quick sql xml multimedia
+USES=		qmake:outsource qt:5 ssl
+USE_QT=		qmake_build buildtools_build core qml quick sql xml multimedia
 USE_LDCONFIG=	yes
 QMAKE_ARGS=	BUILD_MODE+=lib \
 		LIBQTELEGRAM_INCLUDE_PATH="${LOCALBASE}/include/libqtelegram-ae"
diff --git net-im/telepathy-accounts-signon/Makefile net-im/telepathy-accounts-signon/Makefile
index 27dcdbbc8ca4..01a00da0bed9 100644
--- net-im/telepathy-accounts-signon/Makefile
+++ net-im/telepathy-accounts-signon/Makefile
@@ -15,8 +15,8 @@ LIB_DEPENDS=	libaccounts-glib.so:net-im/libaccounts-glib \
 		libmission-control-plugins.so:net-im/telepathy-mission-control \
 		libsignon-glib.so:net-im/libsignon-glib
 
-USES=		gettext pkgconfig qmake tar:bz2
-USE_QT5=	buildtools_build core qmake_build
+USES=		gettext pkgconfig qmake qt:5 tar:bz2
+USE_QT=		buildtools_build core qmake_build
 
 USE_LDCONFIG=	YES
 
diff --git net-im/telepathy-logger-qt4/Makefile net-im/telepathy-logger-qt4/Makefile
index 081419dc4494..5495d805778c 100644
--- net-im/telepathy-logger-qt4/Makefile
+++ net-im/telepathy-logger-qt4/Makefile
@@ -17,11 +17,11 @@ LIB_DEPENDS=	libdbus-1.so:devel/dbus \
 		libtelepathy-logger.so:net-im/telepathy-logger \
 		libtelepathy-qt4.so:net-im/telepathy-qt4
 
-USES=		bison:build cmake kde:4 pkgconfig python:2.7,build tar:bzip2
+USES=		bison:build cmake kde:4 pkgconfig python:2.7,build qt:4 tar:bzip2
 USE_GNOME=	glib20 libxml2
 USE_GSTREAMER=	qt4
 USE_KDE=	# empty
-USE_QT4=	corelib dbus moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib dbus moc_build qmake_build rcc_build uic_build
 CMAKE_ARGS=	-DUSE_COMMON_CMAKE_PACKAGE_CONFIG_DIR:BOOL=True
 USE_LDCONFIG=	yes
 
diff --git net-im/telepathy-logger-qt5/Makefile net-im/telepathy-logger-qt5/Makefile
index 42612391686b..dd52122f16f8 100644
--- net-im/telepathy-logger-qt5/Makefile
+++ net-im/telepathy-logger-qt5/Makefile
@@ -20,10 +20,10 @@ LIB_DEPENDS=	libdbus-1.so:devel/dbus \
 		libtelepathy-logger.so:net-im/telepathy-logger \
 		libtelepathy-qt5.so:net-im/telepathy-qt5
 
-USES=		bison:build cmake:outsource kde:5 pkgconfig python:2.7,build tar:xz
+USES=		bison:build cmake:outsource kde:5 pkgconfig python:2.7,build qt:5 tar:xz
 USE_GNOME=	glib20 libxml2
 USE_KDE=	ecm
-USE_QT5=	core buildtools_build dbus network qmake_build xml
+USE_QT=		core buildtools_build dbus network qmake_build xml
 CMAKE_ARGS=	-DUSE_COMMON_CMAKE_PACKAGE_CONFIG_DIR:BOOL=True
 USE_LDCONFIG=	yes
 
diff --git net-im/telepathy-qt4/Makefile net-im/telepathy-qt4/Makefile
index 84e4a2657364..4141c0767455 100644
--- net-im/telepathy-qt4/Makefile
+++ net-im/telepathy-qt4/Makefile
@@ -30,11 +30,13 @@ CMAKE_ARGS=	-DENABLE_EXAMPLES:BOOL=False \
 		-DDESIRED_QT_VERSION:STRING=${PKGNAMESUFFIX} \
 		-DQT_QMAKE_EXECUTABLE:FILEPATH=${QMAKE}
 . if ${PKGNAMESUFFIX:M4}
-USE_QT4=	corelib dbus gui network qtestlib_build xml \
+USES+=		qt:4
+USE_QT=		corelib dbus gui network qtestlib_build xml \
 		moc_build qmake_build rcc_build uic_build
 SHLIB_SUFFIX=	2
 . else
-USE_QT5=	core dbus gui network xml \
+USES+=		qt:5
+USE_QT=		core dbus gui network xml \
 		buildtools_build qmake_build testlib_build widgets_build
 SHLIB_SUFFIX=	0
 . endif
diff --git net-im/vacuum-im/Makefile net-im/vacuum-im/Makefile
index 4c19101c0f02..6c7e78f36c16 100644
--- net-im/vacuum-im/Makefile
+++ net-im/vacuum-im/Makefile
@@ -16,10 +16,10 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	Vacuum-IM
 GH_PROJECT=	${PORTNAME}${PKGNAMESUFFIX}
 
-USES=		cmake
+USES=		cmake qt:4
 USE_XORG=	xscrnsaver
 USE_LDCONFIG=	yes
-USE_QT4=	gui xml qmake_build uic_build moc_build rcc_build \
+USE_QT=		gui xml qmake_build uic_build moc_build rcc_build \
 		network linguist_build webkit
 
 PORTDOCS=	AUTHORS CHANGELOG COPYING README TRANSLATORS
diff --git net-mgmt/nagiosagent/Makefile net-mgmt/nagiosagent/Makefile
index 07edd309940c..70a08a33fa79 100644
--- net-mgmt/nagiosagent/Makefile
+++ net-mgmt/nagiosagent/Makefile
@@ -15,8 +15,8 @@ COMMENT=	Qt-based frontend to Nagios
 PLIST_FILES=	bin/NagiosAgent \
 		share/pixmaps/NagiosAgent.png
 
-USES=		qmake zip
-USE_QT4=	gui network corelib uic_build rcc_build moc_build
+USES=		qmake qt:4 zip
+USE_QT=		gui network corelib uic_build rcc_build moc_build
 
 DESKTOP_ENTRIES=	"NagiosAgent" "GUI client for Nagios" \
 			"${PREFIX}/share/pixmaps/NagiosAgent.png" \
diff --git net-mgmt/qkismet/Makefile net-mgmt/qkismet/Makefile
index 35d415361c31..ccd831f106d6 100644
--- net-mgmt/qkismet/Makefile
+++ net-mgmt/qkismet/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Qt 4 GUI client for Kismet
 
 RUN_DEPENDS=	kismet:net-mgmt/kismet
 
-USES=		qmake tar:bzip2
-USE_QT4=	gui xml uic_build moc_build rcc_build network
+USES=		qmake qt:4 tar:bzip2
+USE_QT=		gui xml uic_build moc_build rcc_build network
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}/src
 
diff --git net-mgmt/seafile-gui/Makefile net-mgmt/seafile-gui/Makefile
index e6a4049625bd..f791d9b37c20 100644
--- net-mgmt/seafile-gui/Makefile
+++ net-mgmt/seafile-gui/Makefile
@@ -19,7 +19,7 @@ LIB_DEPENDS=	libsearpc.so:devel/libsearpc \
 		libevent.so:devel/libevent \
 		libuuid.so:misc/e2fsprogs-libuuid
 
-USES=		compiler:c++11-lang cmake pkgconfig shebangfix ssl
+USES=		compiler:c++11-lang cmake pkgconfig qt:5 shebangfix ssl
 SHEBANG_FILES=	extensions/*.sh scripts/*.sh fsplugin/*.sh \
 		scripts/*.py
 
@@ -28,7 +28,7 @@ GH_ACCOUNT=	haiwen
 GH_PROJECT=	seafile-client
 
 USE_GNOME=	glib20
-USE_QT5=	core gui network widgets \
+USE_QT=		core gui network widgets \
 		qmake_build buildtools_build linguisttools_build
 #INSTALLS_ICONS=	yes
 CMAKE_ARGS=	-DCMAKE_INCLUDE_PATH:PATH=include/glib-2.0 \
diff --git net-mgmt/vidalia/Makefile net-mgmt/vidalia/Makefile
index 7edab18bf3a3..414bcf9106cd 100644
--- net-mgmt/vidalia/Makefile
+++ net-mgmt/vidalia/Makefile
@@ -9,8 +9,8 @@ MASTER_SITES=	TOR/vidalia
 MAINTAINER=	fk@fabiankeil.de
 COMMENT=	Graphical Tor controller based on Qt 4.x
 
-USES=		cmake
+USES=		cmake qt:4
 INSTALLS_ICONS=	yes
-USE_QT4=	gui moc_build qmake_build rcc_build uic_build network xml linguist_build
+USE_QT=		gui moc_build qmake_build rcc_build uic_build network xml linguist_build
 
 .include <bsd.port.mk>
diff --git net-p2p/bitcoin/Makefile net-p2p/bitcoin/Makefile
index fb696dd82824..fe5db4d8e358 100644
--- net-p2p/bitcoin/Makefile
+++ net-p2p/bitcoin/Makefile
@@ -17,7 +17,7 @@ LIB_DEPENDS=	libboost_date_time.so:devel/boost-libs \
 
 BROKEN_powerpc64=	fails to compile: util.cpp: undefined reference to boost::program_options::to_internal
 
-USES=		autoreconf compiler:c++11-lib gmake libtool pkgconfig shebangfix ssl
+USES=		autoreconf compiler:c++11-lib gmake libtool pkgconfig qt:5 shebangfix ssl
 USE_GITHUB=	yes
 GNU_CONFIGURE=	yes
 
@@ -25,13 +25,14 @@ SLAVE_PORT?=	no
 
 .if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no"
 USES+=		desktop-file-utils
-USE_QT5=	core gui network widgets \
+USE_QT=		core gui network widgets \
 		buildtools_build linguisttools_build qmake_build
 
 BUILD_DEPENDS+=	protoc:devel/protobuf
 LIB_DEPENDS+=	libprotobuf.so:devel/protobuf
 
-TESTS_USE=		QT5=testlib
+TESTS_USES=	qt:5
+TESTS_USE=		QT=testlib
 TESTS_PLIST_FILES=	bin/test_bitcoin-qt \
 			bin/test_bitcoin
 .endif
@@ -51,7 +52,8 @@ WALLET_BDBMODERN_DESC=	Wallet using modern BDB 5.x or 6.x
 ZMQ_DESC=	Block and transaction broadcasting with ZeroMQ
 
 DBUS_CONFIGURE_WITH=	dbus
-DBUS_USE=		QT5=dbus
+DBUS_USES=	qt:5
+DBUS_USE=		QT=dbus
 
 DEBUG_CONFIGURE_ENABLE=		debug
 DEBUG_INSTALL_TARGET_OFF=	install-strip
diff --git net-p2p/dogecoin/Makefile net-p2p/dogecoin/Makefile
index 63f63037988a..d9ef45132640 100644
--- net-p2p/dogecoin/Makefile
+++ net-p2p/dogecoin/Makefile
@@ -39,8 +39,8 @@ CONFIGURE_ARGS+=	--with-incompatible-bdb --disable-tests
 
 GUI_CONFIGURE_ARGS=	--with-gui=qt5
 GUI_CONFIGURE_OFF=	--with-gui=no
-GUI_USE=		QT5=buildtools,core,dbus,gui,linguist_build,network,printsupport,testlib,widgets
-GUI_USES=		desktop-file-utils
+GUI_USE=		QT=buildtools,core,dbus,gui,linguist_build,network,printsupport,testlib,widgets
+GUI_USES=		desktop-file-utils qt:5
 
 QRCODES_CONFIGURE_WITH=	qrencode
 QRCODES_LIB_DEPENDS=	libqrencode.so:graphics/libqrencode
diff --git net-p2p/eiskaltdcpp-qt/Makefile net-p2p/eiskaltdcpp-qt/Makefile
index 5fb86af82865..d2404cc8b506 100644
--- net-p2p/eiskaltdcpp-qt/Makefile
+++ net-p2p/eiskaltdcpp-qt/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libeiskaltdcpp.so:net-p2p/eiskaltdcpp-lib
 
 MASTERDIR=	${.CURDIR}/../eiskaltdcpp-lib
 
-USES=		cmake gettext compiler:c++11-lib desktop-file-utils ssl
-USE_QT4=	gui xml network qmake_build uic_build \
+USES=		cmake gettext compiler:c++11-lib desktop-file-utils qt:4 ssl
+USE_QT=		gui xml network qmake_build uic_build \
 		moc_build rcc_build linguisttools_build
 
 OPTIONS_DEFINE=	ASPELL FREE_SPACE DBUS_NOTIFY QTSCRIPT QML SQLITE
@@ -41,17 +41,17 @@ ASPELL_CMAKE_BOOL=	USE_ASPELL
 
 FREE_SPACE_CMAKE_BOOL=	FREE_SPACE_BAR_C
 
-DBUS_NOTIFY_USE=	QT4=dbus
+DBUS_NOTIFY_USE=	QT=dbus
 DBUS_NOTIFY_CMAKE_BOOL=	DBUS_NOTIFY
 
-QTSCRIPT_USE=		QT4=script
+QTSCRIPT_USE=		QT=script
 QTSCRIPT_RUN_DEPENDS=	${LOCALBASE}/lib/qt4/plugins/script/libqtscript_core.so:devel/qtscriptgenerator
 QTSCRIPT_CMAKE_BOOL=	USE_JS
 
-QML_USE=		QT4=declarative
+QML_USE=		QT=declarative
 QML_CMAKE_BOOL=		USE_QT_QML
 
-SQLITE_USE=		QT4=sql-sqlite3
+SQLITE_USE=		QT=sql-sqlite3
 SQLITE_CMAKE_BOOL=	USE_QT_SQLITE
 
 .include "${MASTERDIR}/Makefile"
diff --git net-p2p/ktorrent-kde4/Makefile net-p2p/ktorrent-kde4/Makefile
index 3d284a4ad325..6ffffd83b918 100644
--- net-p2p/ktorrent-kde4/Makefile
+++ net-p2p/ktorrent-kde4/Makefile
@@ -16,9 +16,9 @@ LIB_DEPENDS=	libtag.so:audio/taglib \
 		libgmp.so:math/gmp \
 		libktorrent.so:net-p2p/libktorrent-kde4
 
-USES=		cmake:outsource gettext kde:4 tar:bzip2
+USES=		cmake:outsource gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4 pimlibs workspace
-USE_QT4=	corelib gui network qt3support qtestlib webkit \
+USE_QT=		corelib gui network qt3support qtestlib webkit \
 		qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git net-p2p/ktorrent/Makefile net-p2p/ktorrent/Makefile
index 5f366eee46c1..28b73526c7ff 100644
--- net-p2p/ktorrent/Makefile
+++ net-p2p/ktorrent/Makefile
@@ -11,7 +11,7 @@ MASTER_SITES=	KDE/stable/${PORTNAME}/${DISTVERSION:R}/
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	BitTorrent client for KDE
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 
 LIB_DEPENDS=	libKF5Torrent.so:net-p2p/libktorrent \
 		libgcrypt.so:security/libgcrypt \
@@ -23,7 +23,7 @@ USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		notifyconfig parts plotting service \
 		solid sonnet syndication textwidgets widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	core dbus gui network phonon4 script webkit widgets xml \
+USE_QT=		core dbus gui network phonon4 script webkit widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git net-p2p/libktorrent-kde4/Makefile net-p2p/libktorrent-kde4/Makefile
index 37dcf8ffc645..7ccd8c4cad1f 100644
--- net-p2p/libktorrent-kde4/Makefile
+++ net-p2p/libktorrent-kde4/Makefile
@@ -15,9 +15,9 @@ LIB_DEPENDS=	libgcrypt.so:security/libgcrypt \
 		libgmp.so:math/gmp \
 		libqca.so:devel/qca
 
-USES=		cmake:outsource gettext kde:4 tar:bzip2
+USES=		cmake:outsource gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qtestlib_build qmake_build moc_build rcc_build uic_build
+USE_QT=		qtestlib_build qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 SHLIB_VER=	5.0.1
diff --git net-p2p/libktorrent/Makefile net-p2p/libktorrent/Makefile
index 6c4dd7b9a29c..52426809b629 100644
--- net-p2p/libktorrent/Makefile
+++ net-p2p/libktorrent/Makefile
@@ -15,10 +15,10 @@ LIB_DEPENDS=	libgcrypt.so:security/libgcrypt \
 		libgmp.so:math/gmp \
 		libqca-qt5.so:devel/qca@qt5
 
-USES=		cmake:outsource gettext kde:5
+USES=		cmake:outsource gettext kde:5 qt:5
 USE_KDE=	archive completion config coreaddons crash ecm i18n \
 		jobwidgets kio service solid widgetsaddons
-USE_QT5=	core gui network testlib xml \
+USE_QT=		core gui network testlib xml \
 		buildtools_build qmake_build
 
 USE_GITHUB=	yes
diff --git net-p2p/litecoin/Makefile net-p2p/litecoin/Makefile
index 5f250f18a62c..dddf13f2192a 100644
--- net-p2p/litecoin/Makefile
+++ net-p2p/litecoin/Makefile
@@ -18,7 +18,8 @@ NOT_FOR_ARCHS_REASON=	fails to configure: "Big Endian not supported"
 LIB_DEPENDS=	libboost_date_time.so:devel/boost-libs \
 		libevent.so:devel/libevent
 
-USES+=		autoreconf compiler:c++11-lib gmake libtool pkgconfig ssl
+USES+=		autoreconf compiler:c++11-lib gmake libtool pkgconfig qt:5 shebangfix ssl
+SHEBANG_FILES=	src/test/*.py
 USE_GITHUB=	yes
 GNU_CONFIGURE=	yes
 
@@ -26,13 +27,14 @@ SLAVE_PORT?=	no
 
 .if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no"
 USES+=		desktop-file-utils
-USE_QT5=	core gui network widgets \
+USE_QT=		core gui network widgets \
 		buildtools_build linguisttools_build qmake_build
 
 BUILD_DEPENDS+=	protoc:devel/protobuf
 LIB_DEPENDS+=	libprotobuf.so:devel/protobuf
 
-TESTS_USE=		QT5=testlib
+TESTS_USES=	qt:5
+TESTS_USE=		QT=testlib
 TESTS_PLIST_FILES=	bin/test_litecoin-qt \
 			bin/test_litecoin
 .endif
@@ -48,7 +50,8 @@ WALLET_DESC=	Wallet Management Support
 ZMQ_DESC=	Block and transaction broadcasting with ZeroMQ
 
 DBUS_CONFIGURE_WITH=	dbus
-DBUS_USE=		QT5=dbus
+DBUS_USES=	qt:5
+DBUS_USE=		QT=dbus
 
 DEBUG_CONFIGURE_ENABLE=		debug
 DEBUG_INSTALL_TARGET_OFF=	install-strip
diff --git net-p2p/namecoin/Makefile net-p2p/namecoin/Makefile
index 1ca1f886c95a..d15b04486d9e 100644
--- net-p2p/namecoin/Makefile
+++ net-p2p/namecoin/Makefile
@@ -26,7 +26,7 @@ QRCODES_DESC=	QR code display support
 
 USE_GITHUB=	yes
 
-USES=		bdb:48 gmake compiler:c++11-lib ssl
+USES=		bdb:48 gmake compiler:c++11-lib qt:4 ssl
 MAKE_JOBS_UNSAFE=yes
 
 CXXFLAGS+=	-I${LOCALBASE}/include -I${BDB_INCLUDE_DIR}
@@ -36,7 +36,7 @@ CXXFLAGS+=	-DCRYPTOPP_DISABLE_ASM
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MX11}
-USE_QT4=	corelib network gui qmake_build linguist_build uic_build moc_build rcc_build
+USE_QT=		corelib network gui qmake_build linguist_build uic_build moc_build rcc_build
 
 BINARY=		namecoin-qt
 LIB_DEPENDS+=	libprotobuf.so:devel/protobuf
@@ -54,7 +54,7 @@ QMAKE_USE_QRCODE=0
 .endif
 
 .if ${PORT_OPTIONS:MDBUS}
-USE_QT4+=	dbus
+USE_QT+=	dbus
 QMAKE_USE_DBUS=	1
 .else
 QMAKE_USE_DBUS=	0
diff --git net-p2p/qbittorrent/Makefile net-p2p/qbittorrent/Makefile
index 782c16dcca5c..77c919311dea 100644
--- net-p2p/qbittorrent/Makefile
+++ net-p2p/qbittorrent/Makefile
@@ -24,16 +24,15 @@ default_LIB_DEPENDS=	libGeoIP.so:net/GeoIP
 nox_PKGNAMESUFFIX=	-nox
 nox_PLIST=		${NONEXISTENT}
 
-USES=			compiler:c++11-lib pkgconfig tar:xz
+USES=			compiler:c++11-lib pkgconfig qmake:no_env qt:5 tar:xz
 GNU_CONFIGURE=		yes
-USE_QT5=		core network xml buildtools_build linguisttools_build qmake_build
+USE_QT=			core network xml buildtools_build linguisttools_build qmake_build
 CONFIGURE_ARGS=		CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
-QT_NONSTANDARD=		yes
 DESTDIRNAME=		INSTALL_ROOT
 
 .if ${FLAVOR} == default
 USES+=			desktop-file-utils
-USE_QT5+=		concurrent gui svg widgets
+USE_QT+=		concurrent gui svg widgets
 USE_GL=			gl
 .endif
 
diff --git net-p2p/qtum/Makefile net-p2p/qtum/Makefile
index 4e3e44dcc778..2845be0d98ec 100644
--- net-p2p/qtum/Makefile
+++ net-p2p/qtum/Makefile
@@ -36,8 +36,8 @@ CONFIGURE_ARGS=	--disable-man \
 		--with-qrencode \
 		--without-libs
 
-USES=		autoreconf bdb:5+ compiler:c++11-lib gmake libtool pkgconfig ssl
-USE_QT5=	buildtools core dbus gui linguisttools network testlib widgets
+USES=		autoreconf bdb:5+ compiler:c++11-lib gmake libtool pkgconfig qt:5 ssl
+USE_QT=		buildtools core dbus gui linguisttools network testlib widgets
 USE_GITHUB=	yes
 GH_TUPLE=	qtumproject:qtum:${DISTVERSIONPREFIX}${PORTVERSION} \
 		qtumproject:cpp-eth-qtum:8db7fc170f7c0a475bc40c:cppeth/src/cpp-ethereum
diff --git net-p2p/retroshare/Makefile net-p2p/retroshare/Makefile
index 4dc6d873812b..d4be9f3a6fdc 100644
--- net-p2p/retroshare/Makefile
+++ net-p2p/retroshare/Makefile
@@ -25,13 +25,13 @@ LIB_DEPENDS=	libsqlcipher.so:databases/sqlcipher \
 		libcurl.so:ftp/curl \
 		libmicrohttpd.so:www/libmicrohttpd
 
-USES=		compiler:features desktop-file-utils dos2unix pkgconfig qmake ssl
+USES=		compiler:features desktop-file-utils dos2unix pkgconfig qmake qt:5 ssl
 USE_GITHUB=	yes
 GH_ACCOUNT=	RetroShare
 GH_PROJECT=	RetroShare
 USE_GNOME=	libxml2 libxslt
 USE_GL=		gl
-USE_QT5=	core gui multimedia printsupport network widgets xml \
+USE_QT=		core gui multimedia printsupport network widgets xml \
 		buildtools_build uitools_build
 DOS2UNIX_FILES=	retroshare-nogui/src/retroshare-nogui.pro
 
diff --git net-p2p/torrent-file-editor/Makefile net-p2p/torrent-file-editor/Makefile
index b0703a3ebff7..53504d9e3c65 100644
--- net-p2p/torrent-file-editor/Makefile
+++ net-p2p/torrent-file-editor/Makefile
@@ -29,8 +29,10 @@ QT5_DESC=	Build against Qt 5 instead of Qt 4
 
 DONATION_CMAKE_OFF=	-DDISABLE_DONATION:BOOL=ON
 
-QT5_USE=	QT5=${_QT5_DEPS:ts,}
-QT5_USE_OFF=	QT4=${_QT4_DEPS:ts,}
+QT5_USES=	qt:5
+QT5_USES_OFF=	qt:4
+QT5_USE=	QT=${_QT5_DEPS:ts,}
+QT5_USE_OFF=	QT=${_QT4_DEPS:ts,}
 QT5_LIB_DEPENDS_OFF=	libqjson.so:devel/qjson@qt4
 QT5_CMAKE_ON=	-DQT5_BUILD:BOOL=ON
 
diff --git net-p2p/transmission-qt4/Makefile net-p2p/transmission-qt4/Makefile
index 9c6fa44b162c..7fafc40e110d 100644
--- net-p2p/transmission-qt4/Makefile
+++ net-p2p/transmission-qt4/Makefile
@@ -17,10 +17,9 @@ MASTERDIR=	${.CURDIR}/../transmission-cli
 PLIST=		${.CURDIR}/pkg-plist
 SLAVEPORT=	qt4
 
-QT_NONSTANDARD=	yes
-USE_QT4=	moc_build qmake_build uic_build rcc_build \
+USE_QT=		moc_build qmake_build uic_build rcc_build \
 		corelib gui dbus network xml
-USES=		compiler:c++11-lib desktop-file-utils
+USES=		compiler:c++11-lib desktop-file-utils qmake:no_env qt:4
 
 EXTRA_CONF_ARGS=--disable-cli \
 		--disable-daemon \
diff --git net-p2p/transmission-qt5/Makefile net-p2p/transmission-qt5/Makefile
index 3fa921fb7a48..fd04d9c8d2fe 100644
--- net-p2p/transmission-qt5/Makefile
+++ net-p2p/transmission-qt5/Makefile
@@ -17,9 +17,8 @@ MASTERDIR=	${.CURDIR}/../transmission-cli
 PLIST=		${.CURDIR}/pkg-plist
 SLAVEPORT=	qt5
 
-QT_NONSTANDARD=	yes
-USE_QT5=	buildtools_build qmake_build core dbus gui network widgets
-USES=		compiler:c++11-lib desktop-file-utils
+USE_QT=		buildtools_build qmake_build core dbus gui network widgets
+USES=		compiler:c++11-lib desktop-file-utils qmake:no_env qt:5
 
 EXTRA_CONF_ARGS=--disable-cli \
 		--disable-daemon \
diff --git net-p2p/valknut/Makefile net-p2p/valknut/Makefile
index 72d091829aba..639a1e357cf8 100644
--- net-p2p/valknut/Makefile
+++ net-p2p/valknut/Makefile
@@ -17,9 +17,9 @@ LIB_DEPENDS=	libdc.so:net-p2p/dclib \
 
 WRKSRC=	${WRKDIR}/${DISTNAME}
 
-USE_QT4=	corelib gui network qt3support \
+USE_QT=		corelib gui network qt3support \
 		moc_build uic_build rcc_build linguisttools_build
-USES=		gmake perl5 pkgconfig tar:bzip2
+USES=		gmake perl5 pkgconfig qt:4 tar:bzip2
 USE_PERL5=	build
 GNU_CONFIGURE=	yes
 INSTALLS_ICONS=	yes
diff --git net-p2p/zetacoin/Makefile net-p2p/zetacoin/Makefile
index 3d528bce9ebb..2c81f3f0d425 100644
--- net-p2p/zetacoin/Makefile
+++ net-p2p/zetacoin/Makefile
@@ -44,9 +44,9 @@ X11_CONFIGURE_ON=	--without-daemon
 X11_CONFIGURE_OFF=	--with-daemon
 X11_BUILD_DEPENDS=	protoc:devel/protobuf
 X11_LIB_DEPENDS=	libprotobuf.so:devel/protobuf
-X11_USE=		qt4=corelib,network,gui,qmake_build,linguisttools_build \
-			qt4=uic_build,moc_build,rcc_build,qtestlib_build
-X11_USES=		desktop-file-utils
+X11_USE=		qt=corelib,network,gui,qmake_build,linguisttools_build \
+			qt=uic_build,moc_build,rcc_build,qtestlib_build
+X11_USES=		desktop-file-utils qmake:no_env qt:4
 
 WALLET_CONFIGURE_ENABLE=wallet
 WALLET_CXXFLAGS=	-I${BDB_INCLUDE_DIR}
@@ -78,10 +78,6 @@ PLIST_SUB+=	EXECUTABLE_QT=bin/${QT_BINARY} \
 
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MX11}
-QT_NONSTANDARD=	yes
-.endif
-
 # tests will currently fail
 .if ${PORT_OPTIONS:MTEST}
 BROKEN=	automated testing fails
diff --git net/akonadi-calendar/Makefile net/akonadi-calendar/Makefile
index dc358f1cb314..c5959f3c57b2 100644
--- net/akonadi-calendar/Makefile
+++ net/akonadi-calendar/Makefile
@@ -9,14 +9,14 @@ COMMENT=	Akonadi Calendar Integration
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		dbusaddons ecm kdelibs4support i18n iconthemes itemmodels \
 		jobwidgets kio service wallet widgetsaddons xmlgui
 # pim components
 USE_KDE+=	akonadi akonadicontacts akonadimime calendarcore calendarutils \
 		contacts identitymanagement mailtransport mime pimtextedit
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/akonadi-contacts/Makefile net/akonadi-contacts/Makefile
index 232782d53096..d7981227a04a 100644
--- net/akonadi-contacts/Makefile
+++ net/akonadi-contacts/Makefile
@@ -9,13 +9,13 @@ COMMENT=	Libraries and daemons to implement Contact Management in Akonadi
 LICENSE=	LGPL21
 
 USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 \
-		tar:xz
+		qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		dbusaddons ecm i18n iconthemes itemmodels jobwidgets kio \
 		prison service sonnet textwidgets widgetsaddons xmlgui
 # pim components
 USE_KDE+=	akonadi akonadimime calendarcore contacts mime
-USE_QT5=	dbus core gui network testlib webengine widgets xml \
+USE_QT=		dbus core gui network testlib webengine widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/akonadi-mime/Makefile net/akonadi-mime/Makefile
index c31357d85321..15c2e4bd8857 100644
--- net/akonadi-mime/Makefile
+++ net/akonadi-mime/Makefile
@@ -9,12 +9,12 @@ COMMENT=	Libraries and daemons to implement basic email handling
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons dbusaddons ecm \
 		i18n itemmodels kio service widgetsaddons xmlgui
 # pim components
 USE_KDE+=	akonadi mime
-USE_QT5=	core dbus gui widgets xml \
+USE_QT=		core dbus gui widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/akonadi-notes/Makefile net/akonadi-notes/Makefile
index 9b312b377146..2bf251549fbb 100644
--- net/akonadi-notes/Makefile
+++ net/akonadi-notes/Makefile
@@ -9,11 +9,11 @@ COMMENT=	KDE library for accessing mail storages in MBox format
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	ecm i18n
 # pim components
 USE_KDE+=	akonadi mime
-USE_QT5=	core xml \
+USE_QT=		core xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/akonadi-search/Makefile net/akonadi-search/Makefile
index 20d7291e142a..9a1d9b87ee9c 100644
--- net/akonadi-search/Makefile
+++ net/akonadi-search/Makefile
@@ -11,13 +11,13 @@ LICENSE=	LGPL21
 
 LIB_DEPENDS=	libxapian.so:databases/xapian-core
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		crash ecm i18n itemmodels kcmutils package plasma-framework \
 		runner service widgetsaddons
 # pim components
 USE_KDE+=	akonadi akonadimime calendarcore contacts  mime
-USE_QT5=	core dbus gui widgets xml \
+USE_QT=		core dbus gui widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/avahi-qt4/Makefile net/avahi-qt4/Makefile
index fadb53c1305f..94ae753f6493 100644
--- net/avahi-qt4/Makefile
+++ net/avahi-qt4/Makefile
@@ -17,7 +17,8 @@ DESCR=		${.CURDIR}/pkg-descr
 PLIST=		${.CURDIR}/pkg-plist
 
 AVAHI_SLAVE=	qt4
-USE_QT4=	corelib moc_build
+USES=	qt:4
+USE_QT=		corelib moc_build
 AVAHI_PKGCONFIG=	avahi-qt4.pc
 
 .include "${MASTERDIR}/Makefile"
diff --git net/cagibi/Makefile net/cagibi/Makefile
index a907fc46f641..fa9ac7aff683 100644
--- net/cagibi/Makefile
+++ net/cagibi/Makefile
@@ -10,9 +10,9 @@ MASTER_SITES=	KDE/stable/${PORTNAME}
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE SSDP/uPNP proxy
 
-USES=		cmake kde:4 tar:bzip2
+USES=		cmake kde:4 qt:4 tar:bzip2
 USE_KDE=	automoc4
-USE_QT4=	corelib network xml dbus \
+USE_QT=		corelib network xml dbus \
 		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net/calendarsupport/Makefile net/calendarsupport/Makefile
index db7e4bf810ab..782270634769 100644
--- net/calendarsupport/Makefile
+++ net/calendarsupport/Makefile
@@ -11,14 +11,14 @@ LICENSE=	LGPL21
 
 LIB_DEPENDS=	libboost_system.so:devel/boost-libs
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons ecm \
 		guiaddons i18n iconthemes itemmodels jobwidgets kio service \
 		widgetsaddons
 # pim components
 USE_KDE+=	akonadi akonadicalendar calendarcore calendarutils holidays \
 		identitymanagement kdepim-apps-libs mime pimcommon pimtextedit
-USE_QT5=	core gui network printsupport testlib uitools widgets xml \
+USE_QT=		core gui network printsupport testlib uitools widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/eventviews/Makefile net/eventviews/Makefile
index 514d57b5f3c1..278cd3ac367f 100644
--- net/eventviews/Makefile
+++ net/eventviews/Makefile
@@ -12,14 +12,14 @@ LICENSE=	LGPL21
 LIB_DEPENDS=	libKGantt.so:graphics/kdiagram  \
 		libboost_system.so:devel/boost-libs
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons ecm \
 		guiaddons i18n iconthemes itemmodels service widgetsaddons
 # pim components
 USE_KDE+=	akonadi akonadicalendar akonadicontacts calendarcore \
 		calendarsupport calendarutils contacts identitymanagement \
 		libkdepim mime pimtextedit
-USE_QT5=	core gui printsupport testlib uitools widgets xml \
+USE_QT=		core gui printsupport testlib uitools widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/hupnp/Makefile net/hupnp/Makefile
index 3754cd425ea4..ce3640b90b80 100644
--- net/hupnp/Makefile
+++ net/hupnp/Makefile
@@ -14,8 +14,8 @@ COMMENT=	Library for building UPnP devices and control points
 LICENSE=	LGPL3+
 LICENSE_FILE=	${WRKSRC}/hupnp/LICENSE_LGPLv3.txt
 
-USES=		gmake qmake zip
-USE_QT4=	corelib network xml dbus gui \
+USES=		gmake qmake qt:4 zip
+USE_QT=		corelib network xml dbus gui \
 		moc_build rcc_build uic_build
 USE_CXXSTD=	gnu++98
 
diff --git net/incidenceeditor/Makefile net/incidenceeditor/Makefile
index 51a394ae8418..66e61c5d14b8 100644
--- net/incidenceeditor/Makefile
+++ net/incidenceeditor/Makefile
@@ -12,7 +12,7 @@ LICENSE=	LGPL21
 LIB_DEPENDS=	libKGantt.so:graphics/kdiagram \
 		libboost_system.so:devel/boost-libs
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons ecm \
 		i18n iconthemes itemmodels jobwidgets kio service sonnet \
 		textwidgets wallet widgetsaddons xmlgui
@@ -20,7 +20,7 @@ USE_KDE=	auth codecs completion config configwidgets coreaddons ecm \
 USE_KDE+=	akonadi akonadicalendar akonadicontacts akonadimime calendarcore calendarsupport calendarutils \
 		contacts eventviews identitymanagement kdepim-apps-libs ldap \
 		libkdepim mailtransport mime pimtextedit
-USE_QT5=	core dbus gui network printsupport testlib uitools webkit \
+USE_QT=		core dbus gui network printsupport testlib uitools webkit \
 		widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git net/kalarmcal/Makefile net/kalarmcal/Makefile
index 5227568c7086..4baec6589da9 100644
--- net/kalarmcal/Makefile
+++ net/kalarmcal/Makefile
@@ -9,7 +9,7 @@ COMMENT=	KDE API for KAlarm alarms
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash ecm guiaddons holidays i18n iconthemes \
 		itemmodels itemviews jobwidgets kdelibs4support kio \
@@ -18,7 +18,7 @@ USE_KDE=	auth bookmarks codecs completion config configwidgets \
 # pim components
 USE_KDE+=	akonadi calendarcore calendarutils holidays identitymanagement \
 		pimtextedit
-USE_QT5=	core dbus gui network printsupport widgets xml \
+USE_QT=		core dbus gui network printsupport widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/kblog/Makefile net/kblog/Makefile
index 4e3e4b8cf6e2..8c42ff33e043 100644
--- net/kblog/Makefile
+++ net/kblog/Makefile
@@ -9,11 +9,11 @@ COMMENT=	KDE API for weblogging access
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons ecm i18n kdelibs4support kio service xmlrpcclient
 # pim components
 USE_KDE+=	calendarcore syndication
-USE_QT5=	core gui webkit \
+USE_QT=		core gui webkit \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/kcalcore/Makefile net/kcalcore/Makefile
index 0cf611736ce5..47ea33983bc3 100644
--- net/kcalcore/Makefile
+++ net/kcalcore/Makefile
@@ -11,9 +11,9 @@ LICENSE=	LGPL21
 
 LIB_DEPENDS=	libical.so:devel/libical
 
-USES=		bison cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		bison cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	ecm emoticons init itemmodels itemviews kdelibs4support
-USE_QT5=	core gui \
+USE_QT=		core gui \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/kcalutils/Makefile net/kcalutils/Makefile
index ddb93b5672a2..ac4db8f1b859 100644
--- net/kcalutils/Makefile
+++ net/kcalutils/Makefile
@@ -9,12 +9,12 @@ COMMENT=	KDE utility and user interface functions for accessing calendar
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 qt:5 tar:xz
 USE_KDE=	codecs config coreaddons ecm i18n iconthemes kdelibs4support \
 		widgetsaddons
 # pim components
 USE_KDE+=	calendarcore identitymanagement pimtextedit
-USE_QT5=	core gui widgets xml \
+USE_QT=		core gui widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/kcontacts/Makefile net/kcontacts/Makefile
index f12a445b0098..40ef792b28f7 100644
--- net/kcontacts/Makefile
+++ net/kcontacts/Makefile
@@ -9,9 +9,9 @@ COMMENT=	KDE api to manage contact information
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	ecm codecs config coreaddons i18n
-USE_QT5=	core dbus gui \
+USE_QT=		core dbus gui \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/kdav/Makefile net/kdav/Makefile
index 2aaa95286686..249173e00b33 100644
--- net/kdav/Makefile
+++ net/kdav/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	net kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	A DAV protocol implementation with KJobs
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons ecm i18n kio service
-USE_QT5=	core gui network xml xmlpatterns \
+USE_QT=		core gui network xml xmlpatterns \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/kdenetwork-filesharing-kde4/Makefile net/kdenetwork-filesharing-kde4/Makefile
index dbf8f8d6dc3f..65911ef4d5d7 100644
--- net/kdenetwork-filesharing-kde4/Makefile
+++ net/kdenetwork-filesharing-kde4/Makefile
@@ -9,8 +9,8 @@ PKGNAMESUFFIX=	-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE Filesharing via Samba
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net/kdenetwork-filesharing/Makefile net/kdenetwork-filesharing/Makefile
index 87bc94331ec3..6e1d6dd2bf95 100644
--- net/kdenetwork-filesharing/Makefile
+++ net/kdenetwork-filesharing/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	net kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE Filesharing via Samba
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	completion config coreaddons doctools ecm i18n jobwidgets kio \
 		service widgetsaddons
-USE_QT5=	core gui network widgets \
+USE_QT=		core gui network widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git net/kdenetwork-strigi-analyzers-kde4/Makefile net/kdenetwork-strigi-analyzers-kde4/Makefile
index 2281b1a3f847..1a2d8333828f 100644
--- net/kdenetwork-strigi-analyzers-kde4/Makefile
+++ net/kdenetwork-strigi-analyzers-kde4/Makefile
@@ -11,8 +11,8 @@ COMMENT=	Strigi analyzers for network-related file formats
 
 LIB_DEPENDS=	libboost_thread.so:devel/boost-libs
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs strigi automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net/kdenetwork/Makefile net/kdenetwork/Makefile
index 9179774e80bf..0bbaf9f8c24c 100644
--- net/kdenetwork/Makefile
+++ net/kdenetwork/Makefile
@@ -7,8 +7,8 @@ CATEGORIES=	net kde
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE Network applications (meta port)
 
-USES=		kde:5 metaport
-USE_QT5=	#
+USES=		kde:5 metaport qt:5
+USE_QT=		#
 
 OPTIONS_DEFINE=	FILESHARING KRDC KRFB
 OPTIONS_DEFAULT=	${OPTIONS_DEFINE:NKOPETE}
diff --git net/kf5-kholidays/Makefile net/kf5-kholidays/Makefile
index 327e8fd403e9..79c09d5d2149 100644
--- net/kf5-kholidays/Makefile
+++ net/kf5-kholidays/Makefile
@@ -9,9 +9,9 @@ COMMENT=	KDE library for calendar holidays
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	ecm emoticons kdelibs4support init itemmodels itemviews
-USE_QT5=	core gui qml buildtools_build qmake_build
+USE_QT=		core gui qml buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git net/kf5-kxmlrpcclient/Makefile net/kf5-kxmlrpcclient/Makefile
index 9eaecc2abf02..8c6192cc5d3c 100644
--- net/kf5-kxmlrpcclient/Makefile
+++ net/kf5-kxmlrpcclient/Makefile
@@ -7,8 +7,8 @@ CATEGORIES=	net kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 interaction with XMLRPC services
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons ecm doctools i18n kio service
-USE_QT5=	buildtools_build core gui qmake_build xml
+USE_QT=		buildtools_build core gui qmake_build xml
 
 .include <bsd.port.mk>
diff --git net/kget-kde4/Makefile net/kget-kde4/Makefile
index bd73a31592f4..e66bd92823dc 100644
--- net/kget-kde4/Makefile
+++ net/kget-kde4/Makefile
@@ -14,12 +14,12 @@ LIB_DEPENDS=	libgpgme.so:security/gpgme \
 		libqca.so:devel/qca@qt4 \
 		libboost_thread.so:devel/boost-libs
 
-USES=		cmake:outsource kde:4 shebangfix sqlite tar:xz
+USES=		cmake:outsource kde:4 qt:4 shebangfix sqlite tar:xz
 USE_KDE=	kdelibs workspace libkonq \
 		nepomuk-core nepomuk-widgets automoc4 ontologies \
 		soprano
 SHEBANG_FILES=	conf/*.pl
-USE_QT4=	gui sql moc_build qmake_build rcc_build uic_build
+USE_QT=		gui sql moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 MAKE_ENV=	XDG_CONFIG_HOME=/dev/null
 CONFIGURE_ENV=	XDG_CONFIG_HOME=/dev/null
diff --git net/kget/Makefile net/kget/Makefile
index 0cf077ed53e9..d379d99d66d4 100644
--- net/kget/Makefile
+++ net/kget/Makefile
@@ -17,7 +17,7 @@ LIB_DEPENDS=    libKF5Torrent.so:net-p2p/libktorrent  \
 		libqca-qt5.so:devel/qca@qt5 \
 		libqgpgme.so:security/gpgme-qt5
 
-USES=		cmake:outsource kde:5 shebangfix sqlite tar:xz
+USES=		cmake:outsource kde:5 qt:5 shebangfix sqlite tar:xz
 
 USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons emoticons guiaddons i18n \
@@ -25,7 +25,7 @@ USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		kdelibs4support kio notifications notifyconfig parts service \
 		solid sonnet textwidgets unitconversion wallet widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=        core dbus gui network printsupport sql widgets xml \
+USE_QT=	        core dbus gui network printsupport sql widgets xml \
 		buildtools_build qmake_build
 
 USE_LDCONFIG=	yes
diff --git net/kidentitymanagement/Makefile net/kidentitymanagement/Makefile
index 200d64a9c7bd..e7d97d4217fb 100644
--- net/kidentitymanagement/Makefile
+++ net/kidentitymanagement/Makefile
@@ -9,13 +9,13 @@ COMMENT=	KDE pim identities
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons ecm \
 		emoticons i18n init itemmodels itemviews jobwidgets \
 		kdelibs4support kio service widgetsaddons xmlgui
 # pim components
 USE_KDE+=	pimtextedit
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/kimap/Makefile net/kimap/Makefile
index b38896240e0d..ec3b9090d30b 100644
--- net/kimap/Makefile
+++ net/kimap/Makefile
@@ -12,11 +12,11 @@ LICENSE=	LGPL21
 LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
 		libsasl2.so:security/cyrus-sasl2
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	codecs config coreaddons ecm i18n kdelibs4support kio service
 # pim components
 USE_KDE+=	mime
-USE_QT5=	core \
+USE_QT=		core \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/kio-gdrive/Makefile net/kio-gdrive/Makefile
index a51e95088a15..1c5839faf19a 100644
--- net/kio-gdrive/Makefile
+++ net/kio-gdrive/Makefile
@@ -17,12 +17,12 @@ LIB_DEPENDS=	libqt5keychain.so:security/qtkeychain@qt5 \
 		libkaccounts.so:net-im/kaccounts-integration
 RUN_DEPENDS=	kaccounts-providers>=0:net-im/kaccounts-providers
 
-USES=		cmake:outsource gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource gettext kde:5 pkgconfig qt:5 tar:xz
 USE_GNOME=	intltool
 USE_KDE=	completion config coreaddons ecm i18n jobwidgets kio \
 		notifications service widgetsaddons \
 		gapi
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build  qmake_build
 
 .include <bsd.port.mk>
diff --git net/kio-upnp-ms/Makefile net/kio-upnp-ms/Makefile
index 094388a41756..fdf57469fcac 100644
--- net/kio-upnp-ms/Makefile
+++ net/kio-upnp-ms/Makefile
@@ -13,9 +13,9 @@ COMMENT=	KIO slave to access UPnP MediaServers
 
 LIB_DEPENDS=	libHUpnp.so:net/hupnp
 
-USES=		cmake kde:4 tar:bzip2
+USES=		cmake kde:4 qt:4 tar:bzip2
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	corelib network xml dbus gui \
+USE_QT=		corelib network xml dbus gui \
 		qmake_build moc_build rcc_build uic_build
 
 WRKSRC=		${WRKDIR}/${DISTNAME:C/.[^.]*$//}
diff --git net/kldap/Makefile net/kldap/Makefile
index 0ca25b73fe79..26d5242fe334 100644
--- net/kldap/Makefile
+++ net/kldap/Makefile
@@ -11,11 +11,11 @@ LICENSE=	LGPL21
 
 LIB_DEPENDS=	libsasl2.so:security/cyrus-sasl2
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	ecm completion config coreaddons i18n kio widgetsaddons service
 # pim components
 USE_KDE+=	mbox
-USE_QT5=	core gui network widgets \
+USE_QT=		core gui network widgets \
 		buildtools_build qmake_build
 USE_OPENLDAP=	yes
 USE_LDCONFIG=	yes
diff --git net/kmailtransport/Makefile net/kmailtransport/Makefile
index 5a77ecfec53c..85cc1e733c8e 100644
--- net/kmailtransport/Makefile
+++ net/kmailtransport/Makefile
@@ -11,12 +11,12 @@ LICENSE=	LGPL21
 
 LIB_DEPENDS=	libsasl2.so:security/cyrus-sasl2
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons i18n \
 		itemmodels jobwidgets kcmutils kio service wallet widgetsaddons
 # pim components
 USE_KDE+=	akonadi akonadimime ksmtp mime
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/kmbox/Makefile net/kmbox/Makefile
index 82c65e9260b7..2fe8ce7f3fef 100644
--- net/kmbox/Makefile
+++ net/kmbox/Makefile
@@ -9,11 +9,11 @@ COMMENT=	KDE library for accessing mail storages in MBox format
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	ecm
 # pim components
 USE_KDE+=	mime
-USE_QT5=	core gui \
+USE_QT=		core gui \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/kmime/Makefile net/kmime/Makefile
index fa9607e39225..351e8c4f004a 100644
--- net/kmime/Makefile
+++ net/kmime/Makefile
@@ -11,9 +11,9 @@ LICENSE=	LGPL21
 
 LIB_DEPENDS=	libboost_system.so:devel/boost-libs
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	codecs ecm emoticons i18n init itemmodels itemviews kdelibs4support
-USE_QT5=	core \
+USE_QT=		core \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/knemo-kde4/Makefile net/knemo-kde4/Makefile
index 293094e08f2b..65b7a2e457b6 100644
--- net/knemo-kde4/Makefile
+++ net/knemo-kde4/Makefile
@@ -13,9 +13,9 @@ COMMENT=	KDE network monitor
 BROKEN_FreeBSD_11=	does not build due to access to kernel-private structure (error: member access into incomplete type 'struct in6_ifaddr')
 BROKEN_FreeBSD_12=	does not build due to access to kernel-private structure (error: member access into incomplete type 'struct in6_ifaddr')
 
-USES=		cmake gettext kde:4 shebangfix tar:xz
+USES=		cmake gettext kde:4 qt:4 shebangfix tar:xz
 SHEBANG_FILES=	src/kconf_update/*.pl
-USE_QT4=	qmake_build moc_build uic_build rcc_build
+USE_QT=		qmake_build moc_build uic_build rcc_build
 USE_KDE=	kdelibs workspace automoc4
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
diff --git net/kontactinterface/Makefile net/kontactinterface/Makefile
index 8f6a2a2e5ceb..2e15775e1102 100644
--- net/kontactinterface/Makefile
+++ net/kontactinterface/Makefile
@@ -9,12 +9,12 @@ COMMENT=	KDE glue for embedding KParts into Kontact
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons ecm \
 		emoticons i18n iconthemes init itemmodels itemviews jobwidgets \
 		kdelibs4support kio parts service sonnet textwidgets \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/kpimtextedit/Makefile net/kpimtextedit/Makefile
index 881b9f0b7e6c..a2ff974c973b 100644
--- net/kpimtextedit/Makefile
+++ net/kpimtextedit/Makefile
@@ -9,12 +9,12 @@ COMMENT=	KDE library for PIM-specific text editing utilities
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons ecm \
 		emoticons i18n iconthemes init itemmodels itemviews jobwidgets \
 		kdelibs4support kio service sonnet syntaxhighlighting textwidgets \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network speech widgets xml \
+USE_QT=		core dbus gui network speech widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/krdc-kde4/Makefile net/krdc-kde4/Makefile
index f3ef0f6507e0..40cb14d25bc1 100644
--- net/krdc-kde4/Makefile
+++ net/krdc-kde4/Makefile
@@ -11,9 +11,9 @@ COMMENT=	RDP and VNC client for KDE
 LIB_DEPENDS=	libvncserver.so:net/libvncserver \
 		libtelepathy-qt4.so:net-im/telepathy-qt4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 OPTIONS_DEFINE=	FREERDP
diff --git net/krdc/Makefile net/krdc/Makefile
index 12fa17810bcf..c541f55d3e52 100644
--- net/krdc/Makefile
+++ net/krdc/Makefile
@@ -9,12 +9,12 @@ COMMENT=	RDP and VNC client for KDE
 
 LIB_DEPENDS=	libvncserver.so:net/libvncserver
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons dnssd doctools ecm i18n iconthemes kcmutils \
 		notifications notifyconfig service wallet widgetsaddons \
 		xmlgui
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/krfb-kde4/Makefile net/krfb-kde4/Makefile
index 89381e435dcb..06e37119d219 100644
--- net/krfb-kde4/Makefile
+++ net/krfb-kde4/Makefile
@@ -10,9 +10,9 @@ COMMENT=	VNC server for KDE
 
 LIB_DEPENDS=	libtelepathy-qt4.so:net-im/telepathy-qt4
 
-USES=		alias cmake:outsource jpeg kde:4 tar:xz
+USES=		alias cmake:outsource jpeg kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib gui network \
+USE_QT=		corelib gui network \
 		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net/krfb/Makefile net/krfb/Makefile
index 5560daff8373..e1d641254ace 100644
--- net/krfb/Makefile
+++ net/krfb/Makefile
@@ -11,11 +11,11 @@ LIB_DEPENDS=	libvncserver.so:net/libvncserver \
 		libxcb-image.so:x11/xcb-util-image
 
 USES=		alias cmake:outsource compiler:c++11-lib gettext jpeg \
-		kde:5 pkgconfig tar:xz
+		kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		crash dbusaddons dnssd doctools ecm i18n notifications \
 		wallet widgetsaddons xmlgui
-USE_QT5=	core dbus gui network widgets x11extras xml \
+USE_QT=		core dbus gui network widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	x11 xcb xdamage xext xtst
 
diff --git net/ksmtp/Makefile net/ksmtp/Makefile
index b17cdce40476..55f670c93dd3 100644
--- net/ksmtp/Makefile
+++ net/ksmtp/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Job-based library to send email through an SMTP server
 LICENSE=	LGPL21
 LIB_DEPENDS=	libsasl2.so:security/cyrus-sasl2
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons i18n kio service
 # pim components
 USE_KDE+=	mime
-USE_QT5=	core network \
+USE_QT=		core network \
 		buildtools_build qmake_build
 
 USE_LDCONFIG=	yes
diff --git net/ktnef/Makefile net/ktnef/Makefile
index 40a96519d471..1d5b25301160 100644
--- net/ktnef/Makefile
+++ net/ktnef/Makefile
@@ -9,11 +9,11 @@ COMMENT=	KDE API for the handling of TNEF data
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons ecm i18n kdelibs4support
 # pim components
 USE_KDE+=	calendarcore calendarutils contacts
-USE_QT5=	core gui widgets xml \
+USE_QT=		core gui widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/kwooty/Makefile net/kwooty/Makefile
index 10618456cd26..5388b16ebe8c 100644
--- net/kwooty/Makefile
+++ net/kwooty/Makefile
@@ -14,9 +14,9 @@ RUN_DEPENDS=	${LOCALBASE}/bin/unrar:archivers/unrar \
 		${LOCALBASE}/bin/par2:archivers/par2cmdline \
 		${LOCALBASE}/bin/7z:archivers/p7zip
 
-USES=		cmake gettext kde:4
+USES=		cmake gettext kde:4 qt:4
 USE_KDE=	kdelibs automoc4 workspace
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 post-patch:
diff --git net/libgravatar/Makefile net/libgravatar/Makefile
index d06ffc3c869d..b6a6fa6c99ae 100644
--- net/libgravatar/Makefile
+++ net/libgravatar/Makefile
@@ -9,12 +9,12 @@ COMMENT=	Library for gravatar support
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons ecm i18n kio \
 		service sonnet textwidgets widgetsaddons
 # pim components
 USE_KDE+=	pimcommon
-USE_QT5=	core gui network testlib widgets xml \
+USE_QT=		core gui network testlib widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/libkfbapi/Makefile net/libkfbapi/Makefile
index f9fad9998505..1805c8d253a1 100644
--- net/libkfbapi/Makefile
+++ net/libkfbapi/Makefile
@@ -14,10 +14,10 @@ LICENSE=	LGPL20
 
 LIB_DEPENDS=	libqjson.so:devel/qjson@qt4
 
-USES=		cmake:outsource gettext kde:4 tar:bzip2
+USES=		cmake:outsource gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	automoc4 kdelibs pimlibs
 USE_LDCONFIG=	yes
-USE_QT4=	gui webkit \
+USE_QT=		gui webkit \
 		qmake_build moc_build rcc_build uic_build
 
 pre-configure:
diff --git net/libkgapi/Makefile net/libkgapi/Makefile
index 2314387640f9..e12f5c5797c6 100644
--- net/libkgapi/Makefile
+++ net/libkgapi/Makefile
@@ -11,7 +11,7 @@ LICENSE=	LGPL21
 
 LIB_DEPENDS=	libical.so:devel/libical
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash ecm emoticons guiaddons i18n iconthemes init \
 		itemmodels itemviews jobwidgets kdelibs4support kio \
@@ -19,7 +19,7 @@ USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		widgetsaddons windowsystem xmlgui solid sonnet
 # pim components
 USE_KDE+=	calendarcore contacts
-USE_QT5=	core dbus gui location qml network printsupport quick webchannel \
+USE_QT=		core dbus gui location qml network printsupport quick webchannel \
 		webengine widgets xml \
 		buildtools_build qmake_build
 
diff --git net/libksieve/Makefile net/libksieve/Makefile
index e8c7c2e1e1f2..970b43860c3d 100644
--- net/libksieve/Makefile
+++ net/libksieve/Makefile
@@ -12,14 +12,14 @@ LICENSE=	LGPL21
 LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
 		libsasl2.so:security/cyrus-sasl2
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive attica auth codecs completion config configwidgets \
 		coreaddons ecm i18n iconthemes jobwidgets kio newstuff service \
 		sonnet syntaxhighlighting wallet widgetsaddons windowsystem xmlgui
 # pim components
 USE_KDE+=	akonadi identitymanagement libkdepim mailtransport mime \
 		pimcommon pimtextedit
-USE_QT5=	core dbus gui location network printsupport qml quick testlib \
+USE_QT=		core dbus gui location network printsupport qml quick testlib \
 		uitools webchannel webengine widgets xml \
                 buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git net/libkvkontakte-kde4/Makefile net/libkvkontakte-kde4/Makefile
index d044fe405c6a..4826a76fef74 100644
--- net/libkvkontakte-kde4/Makefile
+++ net/libkvkontakte-kde4/Makefile
@@ -16,8 +16,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING.LIB
 
 LIB_DEPENDS=	libqjson.so:devel/qjson@qt4
 
-USES=		cmake:outsource gettext kde:4 pkgconfig tar:xz
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USES=		cmake:outsource gettext kde:4 pkgconfig qt:4 tar:xz
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_KDE=	automoc4 kdelibs
 USE_LDCONFIG=	yes
 
diff --git net/libkvkontakte/Makefile net/libkvkontakte/Makefile
index 8eb5fe5c45ea..2f60636a85e8 100644
--- net/libkvkontakte/Makefile
+++ net/libkvkontakte/Makefile
@@ -13,9 +13,9 @@ COMMENT=	KDE library for accessing vk.com
 LICENSE=	LGPL21+
 LICENSE_FILE=	${WRKSRC}/COPYING.LIB
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons ecm i18n kdewebkit kio service widgetsaddons
-USE_QT5=	core gui network webkit widgets \
+USE_QT=		core gui network webkit widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git net/libmaia/Makefile net/libmaia/Makefile
index 9d2f0dc2cd4f..4421f2c3d3d7 100644
--- net/libmaia/Makefile
+++ net/libmaia/Makefile
@@ -10,10 +10,10 @@ CATEGORIES=	net
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	XML-RPC lib for Qt
 
-USES=		gmake qmake
+USES=		gmake qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	wiedi
-USE_QT5=	buildtools_build network xml
+USE_QT=		buildtools_build network xml
 
 PLIST_FILES=	include/maia/maiaObject.h \
 		include/maia/maiaXmlRpcClient.h \
diff --git net/libmediawiki/Makefile net/libmediawiki/Makefile
index 2a904b5c25a0..b2db738687eb 100644
--- net/libmediawiki/Makefile
+++ net/libmediawiki/Makefile
@@ -12,9 +12,9 @@ COMMENT=	KDE library for accessing MediaWiki sites
 LICENSE=	LGPL21+
 LICENSE_FILE=	${WRKSRC}/COPYING.LIB
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	coreaddons ecm
-USE_QT5=	core network testlib \
+USE_QT=		core network testlib \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git net/mailcommon/Makefile net/mailcommon/Makefile
index e54988683d28..9770d1250165 100644
--- net/mailcommon/Makefile
+++ net/mailcommon/Makefile
@@ -17,7 +17,7 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 		libgpgmepp.so:security/gpgme-cpp \
 		libqgpgme.so:security/gpgme-qt5
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive auth codecs completion config configwidgets coreaddons \
 		ecm i18n iconthemes itemmodels itemviews jobwidgets kio \
 		service sonnet syntaxhighlighting textwidgets wallet \
@@ -25,7 +25,7 @@ USE_KDE=	archive auth codecs completion config configwidgets coreaddons \
 # pim components
 USE_KDE+=	akonadi akonadicontacts akonadimime contacts identitymanagement ldap libkdepim libkleo mailimporter \
 		mailtransport messagelib mime pimcommon pimtextedit
-USE_QT5=	core dbus network xml designer gui phonon4 testlib uiplugin \
+USE_QT=		core dbus network xml designer gui phonon4 testlib uiplugin \
 		uitools webkit widgets \
                 buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git net/mailimporter/Makefile net/mailimporter/Makefile
index 49ee44a9fe9d..7fbd5b7985ae 100644
--- net/mailimporter/Makefile
+++ net/mailimporter/Makefile
@@ -11,11 +11,11 @@ LICENSE=	LGPL21
 
 LIB_DEPENDS=	libboost_system.so:devel/boost-libs
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive config coreaddons ecm i18n itemmodels
 # pim components
 USE_KDE+=	akonadi akonadimime libkdepim mime
-USE_QT5=	core gui testlib uitools widgets xml \
+USE_QT=		core gui testlib uitools widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/messagelib/Makefile net/messagelib/Makefile
index ecc622944a72..10cae53f9900 100644
--- net/messagelib/Makefile
+++ net/messagelib/Makefile
@@ -16,7 +16,7 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 		libgpgmepp.so:security/gpgme-cpp \
 		libqgpgme.so:security/gpgme-qt5
 
-USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 qt:5 tar:xz
 USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		coreaddons ecm i18n iconthemes itemmodels itemviews jobwidgets \
 		kdewebkit kio service solid sonnet syntaxhighlighting \
@@ -26,7 +26,7 @@ USE_KDE+=	akonadi akonadicontacts akonadimime akonadisearch calendarcore \
 		contacts grantleetheme gravatar identitymanagement \
 		kdepim-apps-libs ldap libkdepim libkleo mailtransport mbox \
 		mime pimcommon pimtextedit
-USE_QT5=	core dbus gui location network printsupport qml quick testlib \
+USE_QT=		core dbus gui location network printsupport qml quick testlib \
 		uitools webchannel webengine widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git net/ostinato/Makefile net/ostinato/Makefile
index 2f9cea76bd2b..cdf60191e755 100644
--- net/ostinato/Makefile
+++ net/ostinato/Makefile
@@ -15,8 +15,8 @@ LICENSE=	GPLv3
 
 LIB_DEPENDS=	libprotobuf.so:devel/protobuf
 
-USES=		compiler:c++11-lang qmake
-USE_QT4=	corelib gui moc_build rcc_build uic_build network script \
+USES=		compiler:c++11-lang qmake qt:4
+USE_QT=		corelib gui moc_build rcc_build uic_build network script \
 		xml
 
 PLIST_FILES=	bin/drone \
diff --git net/pimcommon/Makefile net/pimcommon/Makefile
index f2721049bb29..227ddf722d0f 100644
--- net/pimcommon/Makefile
+++ net/pimcommon/Makefile
@@ -11,7 +11,7 @@ LICENSE=	LGPL21
 
 LIB_DEPENDS=	libboost_system.so:devel/boost-libs
 
-USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext grantlee:5 kde:5 qt:5 tar:xz
 USE_KDE=	archive attica auth codecs completion config configwidgets \
 		dbusaddons ecm emoticons i18n init iconthemes itemmodels \
 		jobwidgets kdelibs4support kio newstuff service sonnet textwidgets \
@@ -19,7 +19,7 @@ USE_KDE=	archive attica auth codecs completion config configwidgets \
 # pim components
 USE_KDE+=	akonadi akonadicontacts contacts imap libkdepim mime \
 		pimtextedit
-USE_QT5=	core dbus designer gui network printsupport script testlib \
+USE_QT=		core dbus designer gui network printsupport script testlib \
 		uiplugin uitools webkit widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
diff --git net/py-qt4-network/Makefile net/py-qt4-network/Makefile
index 73d81360d510..89fccabf550f 100644
--- net/py-qt4-network/Makefile
+++ net/py-qt4-network/Makefile
@@ -12,10 +12,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtNetwork module
 CONFIGURE_ARGS=	--enable QtNetwork
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run
 USE_PYTHON=	flavors
-USE_QT4=	moc_build corelib network qmake_build
+USE_QT=		moc_build corelib network qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git net/py-qt5-network/Makefile net/py-qt5-network/Makefile
index a7f53a936e2e..1218a9abb68c 100644
--- net/py-qt5-network/Makefile
+++ net/py-qt5-network/Makefile
@@ -10,10 +10,10 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtNetwork module
 CONFIGURE_ARGS=	--enable QtNetwork
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_PYQT=	sip_build core_run
 USE_PYTHON=	flavors
-USE_QT5=	core network qmake_build
+USE_QT=		core network qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git net/qjsonrpc/Makefile net/qjsonrpc/Makefile
index a4ef875c4fde..f18be030b4bf 100644
--- net/qjsonrpc/Makefile
+++ net/qjsonrpc/Makefile
@@ -13,8 +13,8 @@ COMMENT=	C++ Qt based JSON RPC2 library
 
 LICENSE=	LGPL21
 
-USES=		qmake
-USE_QT4=	moc_build network qtestlib_build rcc_build
+USES=		qmake qt:4
+USE_QT=		moc_build network qtestlib_build rcc_build
 USE_LDCONFIG=	yes
 
 WRKSRC=		${WRKDIR}/devonit-qjsonrpc-adefe89b0c6f
diff --git net/qoauth-qt5/Makefile net/qoauth-qt5/Makefile
index 8203a8b36697..41f4b92b7c6f 100644
--- net/qoauth-qt5/Makefile
+++ net/qoauth-qt5/Makefile
@@ -16,9 +16,9 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 LIB_DEPENDS=	libqca-qt5.so:devel/qca@qt5
 
-USES=		qmake:outsource
+USES=		qmake:outsource qt:5
 USE_LDCONFIG=	yes
-USE_QT5=	core network testlib buildtools_build qmake_build
+USE_QT=		core network testlib buildtools_build qmake_build
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	ayoy
diff --git net/qoauth/Makefile net/qoauth/Makefile
index 650c8ec7fffc..25b23242211b 100644
--- net/qoauth/Makefile
+++ net/qoauth/Makefile
@@ -15,9 +15,9 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 LIB_DEPENDS=	libqca.so:devel/qca@qt4
 
-USES=		qmake:outsource
+USES=		qmake:outsource qt:4
 USE_LDCONFIG=	yes
-USE_QT4=	corelib qtestlib network moc_build
+USE_QT=		corelib qtestlib network moc_build
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	ayoy
diff --git net/qt4-network/Makefile net/qt4-network/Makefile
index e6a0589d5d50..f23c8767edc5 100644
--- net/qt4-network/Makefile
+++ net/qt4-network/Makefile
@@ -18,9 +18,8 @@ BROKEN_SSL_REASON_openssl-devel=	error: member access into incomplete type 'RSA'
 
 RUN_DEPENDS=	${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
 
-USES=		ssl
-USE_QT4=	qmake_build moc_build rcc_build corelib
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4 ssl
+USE_QT=		moc_build rcc_build corelib
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
diff --git net/qt5-network/Makefile net/qt5-network/Makefile
index 4ddf24cf6b5a..be2a9547dce0 100644
--- net/qt5-network/Makefile
+++ net/qt5-network/Makefile
@@ -13,9 +13,8 @@ BROKEN_SSL_REASON_openssl-devel=	error: member access into incomplete type 'X509
 
 RUN_DEPENDS=	${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
 
-USES=		ssl
-USE_QT5=	core qmake_build buildtools_build
-QT_DIST=	base
+USES=		qmake:no_env qt-dist:5,base ssl
+USE_QT=		core buildtools_build
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	-no-gui -no-xcb
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git net/qtweetlib/Makefile net/qtweetlib/Makefile
index 5a32ca2f25bb..4cc876ce90a7 100644
--- net/qtweetlib/Makefile
+++ net/qtweetlib/Makefile
@@ -16,9 +16,9 @@ LIB_DEPENDS=	libqjson.so:devel/qjson@qt4
 GH_ACCOUNT=	minimoog
 GH_PROJECT=	QTweetLib
 
-USES=		cmake
+USES=		cmake qt:4
 USE_GITHUB=	yes
 USE_LDCONFIG=	yes
-USE_QT4=	gui moc_build network qmake_build rcc_build uic_build
+USE_QT=		gui moc_build network qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net/quiterss/Makefile net/quiterss/Makefile
index fd201a7b1036..d94af9278148 100644
--- net/quiterss/Makefile
+++ net/quiterss/Makefile
@@ -22,11 +22,13 @@ OPTIONS_SINGLE=		GUI
 OPTIONS_SINGLE_GUI=	QT4 QT5
 OPTIONS_DEFAULT=	QT5
 
-QT4_USE=	QT4=moc_build,rcc_build,uic_build,linguisttools_build
-QT4_USE+=	QT4=corelib,gui,network,xml,webkit,phonon,sql,sql-sqlite3_run
+QT4_USES=	qt:4 qt:4
+QT4_USE=	QT=moc_build,rcc_build,uic_build,linguisttools_build
+QT4_USE+=	QT=corelib,gui,network,xml,webkit,phonon,sql,sql-sqlite3_run
 
-QT5_USE=	QT5=buildtools_build,linguisttools_build,core,xml,gui,widgets
-QT5_USE+=	QT5=network,multimedia,printsupport,webkit,sql,sql-sqlite3_run
+QT5_USES=	qt:5 qt:5
+QT5_USE=	QT=buildtools_build,linguisttools_build,core,xml,gui,widgets
+QT5_USE+=	QT=network,multimedia,printsupport,webkit,sql,sql-sqlite3_run
 
 post-patch-DEBUG-on:
 	@${REINPLACE_CMD} 's|debug_and_release|debug|' \
diff --git net/rsplib/Makefile net/rsplib/Makefile
index 7a171b8684ab..5532f8812a76 100644
--- net/rsplib/Makefile
+++ net/rsplib/Makefile
@@ -21,9 +21,9 @@ CONFIGURE_ARGS=	--disable-maintainer-mode \
 		--enable-qt --with-qt-lib=${QT_LIBDIR} \
 		--with-qt-include=${QT_INCDIR}
 INSTALL_TARGET=	install-strip
-USES=		gmake libtool shebangfix
+USES=		gmake libtool qt:4 shebangfix
 SHEBANG_FILES=	rsplib/scriptingserviceexample
 USE_LDCONFIG=	yes
-USE_QT4=	gui xml moc_build
+USE_QT=		gui xml moc_build
 
 .include <bsd.port.mk>
diff --git net/smb4k-kde4/Makefile net/smb4k-kde4/Makefile
index f5219fd1e501..331d3a7360f6 100644
--- net/smb4k-kde4/Makefile
+++ net/smb4k-kde4/Makefile
@@ -13,10 +13,10 @@ COMMENT=	KDE 4.x SMB Network browser and SMB shares mounting center
 
 RUN_DEPENDS=	sudo:security/sudo
 
-USES=		cmake gettext kde:4 samba:run tar:bzip2
+USES=		cmake gettext kde:4 qt:4 samba:run tar:bzip2
 USE_LDCONFIG=	${PREFIX}/lib ${PREFIX}/lib/kde4
 USE_KDE=	kdelibs automoc4 runtime
-USE_QT4=	corelib gui network opengl script svg webkit \
+USE_QT=		corelib gui network opengl script svg webkit \
 		qmake_build moc_build rcc_build uic_build phonon
 DOCSDIR=	${PREFIX}/share/doc/HTML/en/smb4k
 SUB_FILES=	pkg-message
diff --git net/spoofer/Makefile net/spoofer/Makefile
index 3a18597d942e..1183d78bcb91 100644
--- net/spoofer/Makefile
+++ net/spoofer/Makefile
@@ -18,7 +18,7 @@ LIB_DEPENDS=	libprotobuf-lite.so:devel/protobuf
 
 PORTDOCS=	README
 
-USES=		compiler:c++11-lib
+USES=		compiler:c++11-lib qt:5
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS+=	--disable-development
 
@@ -29,7 +29,7 @@ OPTIONS_SUB=	yes
 .include <bsd.port.options.mk>
 
 .if ${PORT_OPTIONS:MGUI}
-USE_QT5=	buildtools_build qmake_build core network gui widgets
+USE_QT=		buildtools_build qmake_build core network gui widgets
 USE_GL+=	gl
 USE_RC_SUBR=	${PORTNAME}
 INSTALLS_ICONS=	yes
diff --git net/syndication/Makefile net/syndication/Makefile
index 709df8b37f79..10ae4832ee73 100644
--- net/syndication/Makefile
+++ net/syndication/Makefile
@@ -9,9 +9,9 @@ COMMENT=	KDE RSS feed handling library
 
 LICENSE=	LGPL21
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	codecs config coreaddons ecm kio service
-USE_QT5=	core gui xml \
+USE_QT=		core gui xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git net/wireshark/Makefile net/wireshark/Makefile
index 65f6b708d8ca..41e9496f2b11 100644
--- net/wireshark/Makefile
+++ net/wireshark/Makefile
@@ -86,7 +86,8 @@ KRB_NONE_DESC=		Disable Kerberos support
 
 GTK2_USE=	GNOME=gtk20,cairo
 GTK3_USE=	GNOME=gtk30,cairo
-QT5_USE=	qt5=core,gui,widgets,printsupport,buildtools_build,linguisttools_build
+QT5_USES=		qt:5
+QT5_USE=	qt=core,gui,widgets,printsupport,buildtools_build,linguisttools_build
 
 LUA_USES=		lua:5[1-2]
 KRB_BASE_USES=		gssapi
diff --git net/wpa_gui/Makefile net/wpa_gui/Makefile
index e98c21c5c2e1..a10ec47d95d1 100644
--- net/wpa_gui/Makefile
+++ net/wpa_gui/Makefile
@@ -18,8 +18,8 @@ COMMENT=	Qt-based frontend for wpa_supplicant
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/../COPYING
 
-USES=		gmake
-USE_QT5=	qmake_build buildtools_build linguisttools_build core gui \
+USES=		gmake qt:5
+USE_QT=		qmake_build buildtools_build linguisttools_build core gui \
 		widgets svg_run
 
 ALL_TARGET=	wpa_gui-qt4
diff --git net/x2goclient/Makefile net/x2goclient/Makefile
index dfe976f985bb..02943919e1e9 100644
--- net/x2goclient/Makefile
+++ net/x2goclient/Makefile
@@ -19,9 +19,9 @@ LIB_DEPENDS=	libcups.so:print/cups \
 RUN_DEPENDS=	nxproxy:net/nxproxy \
 		x2goclient-cli:net/x2goclient-cli
 
-USES=		qmake
+USES=		qmake qt:4
 USE_XORG=	xpm
-USE_QT4=	gui network svg \
+USE_QT=		gui network svg \
 		linguisttools_build moc_build rcc_build uic_build
 QMAKE_ARGS=	QMAKE_LRELEASE="${LRELEASE}"
 
diff --git net/zeroconf-ioslave-kde4/Makefile net/zeroconf-ioslave-kde4/Makefile
index c8fa5320d9b6..197323d0b0ea 100644
--- net/zeroconf-ioslave-kde4/Makefile
+++ net/zeroconf-ioslave-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	net kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE Network monitor for DNS-SD services (Zeroconf)
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git net/zeroconf-ioslave/Makefile net/zeroconf-ioslave/Makefile
index 41f2165e2122..783c7c07a867 100644
--- net/zeroconf-ioslave/Makefile
+++ net/zeroconf-ioslave/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	net kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE Network monitor for DNS-SD services (Zeroconf)
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons dbusaddons dnssd i18n kio service
-USE_QT5=	core dbus network \
+USE_QT=		core dbus network \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git polish/kadu/Makefile polish/kadu/Makefile
index cc7fb33e68e7..9eebafc729db 100644
--- polish/kadu/Makefile
+++ polish/kadu/Makefile
@@ -37,10 +37,10 @@ GG6_EMOTS_DISTFILE=	kompatybilne_z_GG6.tar.gz
 GG7_EMOTS_DISTFILE=	dodatkowe_emoty_GG7.tar.gz
 
 USES=		cmake compiler:c++11-lib gettext-runtime \
-		libarchive pkgconfig readline tar:bzip2
+		libarchive pkgconfig qt:5 readline tar:bzip2
 USE_XORG=	x11 xext xfixes xscrnsaver
 USE_GNOME=	glib20
-USE_QT5=	concurrent core dbus gui multimedia network \
+USE_QT=		concurrent core dbus gui multimedia network \
 		qml quick script scripttools sql webkit widgets x11extras \
 		xml xmlpatterns buildtools_build linguisttools_build \
 		qmake_build imageformats_run sql-sqlite3_run
diff --git polish/qfaktury/Makefile polish/qfaktury/Makefile
index 59d43680c106..9c794c9f54d1 100644
--- polish/qfaktury/Makefile
+++ polish/qfaktury/Makefile
@@ -10,8 +10,8 @@ MASTER_SITES=	SF
 MAINTAINER=	meritus@innervision.pl
 COMMENT=	Polish invoicing desktop program
 
-USES=		qmake
-USE_QT4=	uic_build moc_build rcc_build corelib gui xml qt3support
+USES=		qmake qt:4
+USE_QT=		uic_build moc_build rcc_build corelib gui xml qt3support
 
 PORTDOCS=	ChangeLog.txt ReadMe.txt ReleaseNotes.txt TODO.txt
 
diff --git polish/qnapi/Makefile polish/qnapi/Makefile
index 046227a164f5..025c27905490 100644
--- polish/qnapi/Makefile
+++ polish/qnapi/Makefile
@@ -20,9 +20,9 @@ RUN_DEPENDS=	7z:archivers/p7zip
 
 USE_GITHUB=	yes
 
-USES=		compiler:c++11-lib pkgconfig qmake
+USES=		compiler:c++11-lib pkgconfig qmake qt:5
 USE_GL=		gl
-USE_QT5=	buildtools_build core gui network widgets xml
+USE_QT=		buildtools_build core gui network widgets xml
 
 CXXFLAGS+=	-I${LOCALBASE}/include/maia
 
diff --git ports-mgmt/octopkg/Makefile ports-mgmt/octopkg/Makefile
index b9e7373d3b8e..64b802301baa 100644
--- ports-mgmt/octopkg/Makefile
+++ ports-mgmt/octopkg/Makefile
@@ -16,9 +16,9 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 USE_GITHUB=	yes
 GH_ACCOUNT=	aarnt
 
-USE_QT5=	core concurrent gui network xml widgets quick concurrent \
+USE_QT=		core concurrent gui network xml widgets quick concurrent \
 		buildtools_build
-USES=		qmake compiler:c++11-lib
+USES=		qmake compiler:c++11-lib qt:5
 
 PLIST_FILES=	bin/${PORTNAME} share/pixmaps/octopi_green.png
 
diff --git ports-mgmt/packagekit/Makefile ports-mgmt/packagekit/Makefile
index bec6fe564b41..88317d017e4d 100644
--- ports-mgmt/packagekit/Makefile
+++ ports-mgmt/packagekit/Makefile
@@ -79,7 +79,8 @@ LIB_DEPENDS+=	libpackagekit-glib2.so:ports-mgmt/packagekit
 
 CONFIGURE_ARGS+=--enable-qt
 LIB_DEPENDS+=	libcppunit.so:devel/cppunit
-USE_QT4+=	dbus gui xml sql moc_build
+USES=		qt:4
+USE_QT+=	dbus gui xml sql moc_build
 #.include "${PORTSDIR}/Mk/bsd.qt.mk"
 .endif
 
diff --git ports-mgmt/portrac/Makefile ports-mgmt/portrac/Makefile
index c6f21bc22608..6e546c5174b4 100644
--- ports-mgmt/portrac/Makefile
+++ ports-mgmt/portrac/Makefile
@@ -20,9 +20,9 @@ PLIST_FILES=	bin/portrac \
 # Unhide std::to_string() to fix build with GCC (ports/193528)
 CXXFLAGS=	-D_GLIBCXX_USE_C99
 
-USES=		compiler:c++11-lib qmake tar:bzip2
+USES=		compiler:c++11-lib qmake qt:5 tar:bzip2
 USE_CXXSTD=	c++11
-USE_QT5=	widgets buildtools_build
+USE_QT=		widgets buildtools_build
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKDIR}/${DISTNAME}/portrac ${STAGEDIR}${PREFIX}/bin && \
diff --git print/kover/Makefile print/kover/Makefile
index a796a26732d9..76f559d44a21 100644
--- print/kover/Makefile
+++ print/kover/Makefile
@@ -16,9 +16,9 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 LIB_DEPENDS=	libcddb.so:audio/libcddb \
 		libcdio.so:sysutils/libcdio
 
-USES=		cmake gettext kde:4 perl5 pkgconfig shared-mime-info tar:bzip2
+USES=		cmake gettext kde:4 perl5 pkgconfig qt:4 shared-mime-info tar:bzip2
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	corelib dbus gui network svg xml \
+USE_QT=		corelib dbus gui network svg xml \
 		qmake_build uic_build rcc_build
 USE_PERL5=	build
 
diff --git print/kpdftool/Makefile print/kpdftool/Makefile
index 3797dac8a649..bef62e65c473 100644
--- print/kpdftool/Makefile
+++ print/kpdftool/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Simple utility to manipulate PS and PDF files
 
 RUN_DEPENDS=	convert:graphics/ImageMagick
 
-USE_QT4=	qt3support moc_build porting_build uic3_build
-USES=		ghostscript:run qmake zip
+USE_QT=		qt3support moc_build porting_build uic3_build
+USES=		ghostscript:run qmake qt:4 zip
 
 DESKTOP_ENTRIES=	"KPDFTool" "${COMMENT}" "kpdftool" \
 			"kpdftool" "Qt;Utility;" true
diff --git print/lyx/Makefile print/lyx/Makefile
index 406e000efd8c..b36219ed6e43 100644
--- print/lyx/Makefile
+++ print/lyx/Makefile
@@ -21,8 +21,8 @@ MAJOR_VERSION=	2.3
 MINOR_VERSION=	0
 
 USES=		desktop-file-utils gmake iconv pkgconfig perl5 \
-		python:2.7 shebangfix tar:xz
-USE_QT5=	core concurrent gui svg widgets buildtools_build qmake_build
+		python:2.7 qt:5 shebangfix tar:xz
+USE_QT=		core concurrent gui svg widgets buildtools_build qmake_build
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--without-included-boost \
 		--without-included-mythes \
diff --git print/print-manager-kde4/Makefile print/print-manager-kde4/Makefile
index 680068c3b93a..5655312b722e 100644
--- print/print-manager-kde4/Makefile
+++ print/print-manager-kde4/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Printer manager for KDE 4
 LIB_DEPENDS=	libcups.so:print/cups
 RUN_DEPENDS=	${LOCALBASE}/share/cups/data/testprint:print/cups-filters
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	designer network \
+USE_QT=		designer network \
 		qmake_build moc_build uic_build rcc_build
 
 post-patch:
diff --git print/print-manager/Makefile print/print-manager/Makefile
index 752c2affc414..a6f2c33ec8b1 100644
--- print/print-manager/Makefile
+++ print/print-manager/Makefile
@@ -9,12 +9,12 @@ COMMENT=	Printer manager for KDE
 
 LIB_DEPENDS=	libcups.so:print/cups
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		dbusaddons ecm i18n iconthemes itemviews jobwidgets kcmutils \
 		kio notifications plasma-framework service widgetsaddons \
 		windowsystem
-USE_QT5=	core dbus gui network qml quick widgets xml \
+USE_QT=		core dbus gui network qml quick widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git print/py-qt5-printsupport/Makefile print/py-qt5-printsupport/Makefile
index d0ab1f5eadee..222194250914 100644
--- print/py-qt5-printsupport/Makefile
+++ print/py-qt5-printsupport/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtPrintSupport module
 CONFIGURE_ARGS=	--enable QtPrintSupport
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run widgets_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui printsupport widgets qmake_build
+USE_QT=		core gui printsupport widgets qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git print/qpdfview/Makefile print/qpdfview/Makefile
index dc5c8369c2af..0323addc1c4b 100644
--- print/qpdfview/Makefile
+++ print/qpdfview/Makefile
@@ -34,10 +34,12 @@ CUPS_LIB_DEPENDS=	libcups.so:print/cups
 DJVU_LIB_DEPENDS=	libdjvulibre.so:graphics/djvulibre
 DJVU_QMAKE_OFF=	"CONFIG+=without_djvu"
 
-QT4_USE=	qt4=dbus,gui,imageformats,linguisttools,moc_build,rcc_build,sql,sql-sqlite3,svg,xml
+QT4_USES=	qt:4
+QT4_USE=	qt=dbus,gui,imageformats,linguisttools,moc_build,rcc_build,sql,sql-sqlite3,svg,xml
 QT4_LIB_DEPENDS=	libpoppler-qt4.so:graphics/poppler-qt4
 
-QT5_USE=	qt5=buildtools_build,concurrent,imageformats,linguisttools,printsupport,sql,sql-sqlite3,svg,xml
+QT5_USES=	qt:5
+QT5_USE=	qt=buildtools_build,concurrent,imageformats,linguisttools,printsupport,sql,sql-sqlite3,svg,xml
 QT5_LIB_DEPENDS=	libpoppler-qt5.so:graphics/poppler-qt5
 
 PS_LIB_DEPENDS=	libspectre.so:print/libspectre
diff --git print/qt5-printsupport/Makefile print/qt5-printsupport/Makefile
index 924f001d2668..935ddbf304d1 100644
--- print/qt5-printsupport/Makefile
+++ print/qt5-printsupport/Makefile
@@ -8,8 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt print support module
 
-USE_QT5=	core gui widgets qmake_build buildtools_build
-QT_DIST=	base
+USES=		qmake:no_env qt-dist:5,base
+USE_QT=		core gui widgets qmake_build buildtools_build
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
diff --git print/scribus/Makefile print/scribus/Makefile
index 21037c732cc7..da188f87d80b 100644
--- print/scribus/Makefile
+++ print/scribus/Makefile
@@ -30,8 +30,8 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}tkinter>0:x11-toolkits/py-tkinter@${PY_FLAVO
 		${PYTHON_PKGNAMEPREFIX}pillow>=0:graphics/py-pillow@${PY_FLAVOR}
 
 USES=		cmake:outsource desktop-file-utils ghostscript:run jpeg \
-		pkgconfig python:2.7 shared-mime-info tar:xz
-USE_QT4=	corelib gui linguist_build moc_build qmake_build rcc_build uic_build xml network
+		pkgconfig python:2.7 qt:4 shared-mime-info tar:xz
+USE_QT=		corelib gui linguist_build moc_build qmake_build rcc_build uic_build xml network
 USE_GNOME=	libartlgpl2 libxml2
 USE_LDCONFIG=	yes
 
diff --git science/avogadro/Makefile science/avogadro/Makefile
index 1b976022a928..8cd864927817 100644
--- science/avogadro/Makefile
+++ science/avogadro/Makefile
@@ -20,9 +20,9 @@ LIB_DEPENDS=	libopenbabel.so:science/openbabel
 
 # We need to add a RUN_DEPENDS on eigen2, as the cmake file shiped with
 # avogadro to use it, contains 'find_package(Eigen2 REQUIRED)'.
-USES=		cmake desktop-file-utils eigen:2,build,run pkgconfig tar:bzip2
+USES=		cmake desktop-file-utils eigen:2,build,run pkgconfig qt:4 tar:bzip2
 USE_GL=		glu gl
-USE_QT4=	gui network opengl \
+USE_QT=		gui network opengl \
 		linguisttools_build moc_build qmake_build rcc_build uic_build
 CMAKE_ARGS=	-DENABLE_GLSL=OFF \
 		-DQT_MKSPECS_RELATIVE=share/qt4/mkspecs
diff --git science/iboview/Makefile science/iboview/Makefile
index 6bdf60270a4d..3b5c187a1004 100644
--- science/iboview/Makefile
+++ science/iboview/Makefile
@@ -20,9 +20,9 @@ RUN_DEPENDS=	boost-libs>=0:devel/boost-libs
 ONLY_FOR_ARCHS=	amd64
 ONLY_FOR_ARCHS_REASON_amd64=	only builds and is supported on amd64
 
-USES=		fortran blaslapack:openblas qmake:outsource tar:bz2
+USES=		fortran blaslapack:openblas qmake:outsource qt:5 tar:bz2
 USE_GL=		gl glu
-USE_QT5=	buildtools_build core gui widgets opengl script svg
+USE_QT=		buildtools_build core gui widgets opengl script svg
 
 PLIST_FILES=	bin/iboview
 
diff --git science/kalzium-kde4/Makefile science/kalzium-kde4/Makefile
index 350f8741ccda..2aaf60525b73 100644
--- science/kalzium-kde4/Makefile
+++ science/kalzium-kde4/Makefile
@@ -14,11 +14,11 @@ BUILD_DEPENDS=	${LOCALBASE}/lib/ocaml/facile/facile.a:math/facile \
 		${LOCALBASE}/libdata/pkgconfig/chemical-mime-data.pc:science/chemical-mime-data
 RUN_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/chemical-mime-data.pc:science/chemical-mime-data
 
-USES=		cmake:outsource eigen:3 kde:4 pkgconfig tar:xz
+USES=		cmake:outsource eigen:3 kde:4 pkgconfig qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
 USE_OCAML=	yes
 NO_OCAML_RUNDEPENDS=	yes
-USE_QT4=	corelib declarative designer opengl script xml \
+USE_QT=		corelib declarative designer opengl script xml \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git science/kalzium/Makefile science/kalzium/Makefile
index 598d62701eed..774b8c3606e9 100644
--- science/kalzium/Makefile
+++ science/kalzium/Makefile
@@ -13,7 +13,7 @@ BUILD_DEPENDS=	${LOCALBASE}/lib/ocaml/facile/facile.a:math/facile \
 		${LOCALBASE}/libdata/pkgconfig/chemical-mime-data.pc:science/chemical-mime-data
 RUN_DEPENDS=	${LOCALBASE}/libdata/pkgconfig/chemical-mime-data.pc:science/chemical-mime-data
 
-USES=		cmake:outsource gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	auth archive bookmarks codecs completion config configwidgets \
 		coreaddons crash doctools ecm emoticons guiaddons i18n \
 		iconthemes itemmodels itemviews jobwidgets js kdelibs4support \
@@ -22,7 +22,7 @@ USE_KDE=	auth archive bookmarks codecs completion config configwidgets \
 		xmlgui
 USE_OCAML=	yes
 NO_OCAML_RUNDEPENDS=	yes
-USE_QT5=	core dbus gui network opengl printsupport qml quick script svg \
+USE_QT=		core dbus gui network opengl printsupport qml quick script svg \
 		widgets xml \
 		buildtools_build qmake_build
 
diff --git science/kst2/Makefile science/kst2/Makefile
index 7a9d6274aea5..157bbf1945e1 100644
--- science/kst2/Makefile
+++ science/kst2/Makefile
@@ -50,8 +50,10 @@ NETCDF_LIB_DEPENDS=	libnetcdf.so:science/netcdf
 NETCDF_IGNORE=	does not support NetCDF 4
 
 TOOLKIT_DESC=	Qt toolkit
-QT4_USE=	${_USE_QT4:S/^/QT4=/}
-QT5_USE=	${_USE_QT5:S/^/QT5=/}
+QT4_USES=	qt:4
+QT4_USE=	${_USE_QT4:S/^/QT=/}
+QT5_USES=	qt:5
+QT5_USE=	${_USE_QT5:S/^/QT=/}
 QT5_CMAKE_ON=	-Dkst_qt5=on
 
 post-patch:
diff --git science/libgeodecomp/Makefile science/libgeodecomp/Makefile
index 699de583a3b0..50b412b266f9 100644
--- science/libgeodecomp/Makefile
+++ science/libgeodecomp/Makefile
@@ -30,7 +30,8 @@ OPTIONS_DEFAULT=	MPI QT4 SILO SCOTCH
 MPI_LIB_DEPENDS=	libmpich.so:net/mpich2
 MPI_CMAKE_BOOL=		WITH_MPI
 
-QT4_USE=		QT4=corelib,gui,opengl,qmake_build,moc_build,rcc_build,uic_build
+QT4_USES=	qt:4
+QT4_USE=		QT=corelib,gui,opengl,qmake_build,moc_build,rcc_build,uic_build
 QT4_CMAKE_BOOL=		WITH_QT
 
 SILO_DESC=		Enable Silo dependend output
diff --git science/massxpert/Makefile science/massxpert/Makefile
index 345abc87ec97..724310556be0 100644
--- science/massxpert/Makefile
+++ science/massxpert/Makefile
@@ -20,10 +20,10 @@ LIB_DEPENDS=	libpcre.so:devel/pcre \
 		libfontconfig.so:x11-fonts/fontconfig
 
 USE_GCC=	any
-USES=		cmake gettext tar:bzip2
+USES=		cmake gettext qt:4 tar:bzip2
 USE_XORG=	ice sm x11 xau xcb xdmcp xext xrender
 USE_GNOME=	glib20
-USE_QT4=	corelib gui xml rcc_build qmake_build uic_build moc_build \
+USE_QT=		corelib gui xml rcc_build qmake_build uic_build moc_build \
 		svg
 USE_LDCONFIG=	yes
 MAKE_JOBS_UNSAFE=	yes
diff --git science/paraview/Makefile science/paraview/Makefile
index bd8908f1619e..d21ea0ee7389 100644
--- science/paraview/Makefile
+++ science/paraview/Makefile
@@ -32,8 +32,8 @@ RUN_DEPENDS=	bash:shells/bash	\
 
 CONFLICTS_INSTALL=	protobuf # https://gitlab.kitware.com/paraview/paraview/issues/18225
 
-USES=		alias cmake:outsource jpeg localbase python:2.7 shebangfix
-USE_QT5=	core gui help network sql widgets x11extras buildtools_build qmake_build
+USES=		alias cmake:outsource jpeg localbase python:2.7 qt:5 shebangfix
+USE_QT=		core gui help network sql widgets x11extras buildtools_build qmake_build
 USE_GL=		gl glu
 USE_XORG=	x11 xt xext ice xdmcp xau xcb xfixes xdamage xxf86vm xrender sm dri3proto
 USE_LDCONFIG=	yes
diff --git science/pulseview/Makefile science/pulseview/Makefile
index effb5fa1d5db..e28b358680ab 100644
--- science/pulseview/Makefile
+++ science/pulseview/Makefile
@@ -17,9 +17,9 @@ LIB_DEPENDS=	libboost_thread.so:devel/boost-libs \
 		libsigrok.so:devel/libsigrok \
 		libsigrokdecode.so:devel/libsigrokdecode
 
-USES=		cmake desktop-file-utils pkgconfig
+USES=		cmake desktop-file-utils pkgconfig qt:5
 USE_GNOME=	glibmm glib20 libsigc++20
-USE_QT5=	buildtools core gui qmake_build svg widgets
+USE_QT=		buildtools core gui qmake_build svg widgets
 CMAKE_ARGS+=	-DCMAKE_INSTALL_MANDIR:PATH=${MANPREFIX}/man \
 		-DDISABLE_WERROR:BOOL=TRUE
 INSTALLS_ICONS=	yes
diff --git science/py-veusz/Makefile science/py-veusz/Makefile
index 1a6d4a385e00..3d3e0804994c 100644
--- science/py-veusz/Makefile
+++ science/py-veusz/Makefile
@@ -17,10 +17,10 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 RUN_DEPENDS=	${PYNUMPY}
 BUILD_DEPENDS:=	${RUN_DEPENDS}
 
-USES=		python pyqt:4 shebangfix
+USES=		python pyqt:4 qt:4 shebangfix
 USE_PYQT=	gui svg
 USE_PYTHON=	distutils concurrent autoplist
-USE_QT4=	corelib gui xml
+USE_QT=		corelib gui xml
 SHEBANG_FILES=	examples/embedexample.py
 
 post-patch:
diff --git science/qtresistors/Makefile science/qtresistors/Makefile
index 7727ec29019a..1980b69418e7 100644
--- science/qtresistors/Makefile
+++ science/qtresistors/Makefile
@@ -11,8 +11,8 @@ DISTNAME=	118297-qtResistors-201001102229
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Calculate resistance of resistor by the colors on the resistor
 
-USES=		qmake
-USE_QT4=	gui uic_build moc_build
+USES=		qmake qt:4
+USE_QT=		gui uic_build moc_build
 
 WRKSRC=		${WRKDIR}/qtResistors
 
diff --git science/silo/Makefile science/silo/Makefile
index c3f6ae8f4037..163e40e744b0 100644
--- science/silo/Makefile
+++ science/silo/Makefile
@@ -36,12 +36,12 @@ HDF5_PLIST_SUB_OFF=		SUFX_HDF5=""
 PYTHON_CONFIGURE_ENABLE=	pythonmodule
 PYTHON_USES=			python:2.7
 
+QT4_USES=			qmake:no_env qt:4
 QT4_USE=			XORG=ice,sm,x11,xext,xi,xmu,xt \
-				QT4=corelib,gui,linguisttools_build,moc_build,uic_build
+				QT=corelib,gui,linguisttools_build,moc_build,uic_build
 QT4_CONFIGURE_ON=		--with-Qt-dir=${PREFIX} \
 				--with-Qt-lib="QtGui -lQtCore"
 QT4_CONFIGURE_ENABLE=		silex
-QT4_VARS=			QT_NONSTANDARD=yes
 QT4_DESKTOP_ENTRIES=		"Silex" "Silex browser for Silo files" \
 				"" "silex" "" true
 
diff --git science/step-kde4/Makefile science/step-kde4/Makefile
index 6e70a590128f..693b8b978261 100644
--- science/step-kde4/Makefile
+++ science/step-kde4/Makefile
@@ -11,9 +11,9 @@ COMMENT=	KDE 4 interactive physics simulator
 LIB_DEPENDS=	libqalculate.so:math/libqalculate \
 		libgsl.so:math/gsl
 
-USES=		cmake:outsource eigen:2 kde:4 pkgconfig tar:xz
+USES=		cmake:outsource eigen:2 kde:4 pkgconfig qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	opengl moc_build qmake_build rcc_build uic_build
+USE_QT=		opengl moc_build qmake_build rcc_build uic_build
 
 pre-configure:
 # Avoid building translations, should the user pass
diff --git science/step/Makefile science/step/Makefile
index f6e2d3796f22..7e29eb7ec0dc 100644
--- science/step/Makefile
+++ science/step/Makefile
@@ -11,14 +11,14 @@ LIB_DEPENDS=	libcln.so:math/cln \
 		libgsl.so:math/gsl \
 		libqalculate.so:math/libqalculate
 
-USES=		cmake:outsource eigen:3 gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource eigen:3 gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	attica auth bookmarks codecs completion config configwidgets \
 		coreaddons crash doctools ecm emoticons guiaddons i18n \
 		iconthemes init itemmodels itemviews jobwidgets js \
 		kdelibs4support khtml kio newstuff notifications parts \
 		plotting service solid sonnet textwidgets unitconversion \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network opengl printsupport qml quick svg \
+USE_QT=		core dbus gui network opengl printsupport qml quick svg \
 		widgets xml \
 		buildtools_build qmake_build
 
diff --git security/fwbuilder/Makefile security/fwbuilder/Makefile
index 2c3d8416655b..bc1f920e025b 100644
--- security/fwbuilder/Makefile
+++ security/fwbuilder/Makefile
@@ -28,9 +28,9 @@ CONFLICTS=	fwbuilder-[234].* fwbuilder-devel-* \
 		libfwbuilder-[234].* libfwbuilder-devel-*
 .endif
 
-USES=		autoreconf:build gmake libtool ssl
+USES=		autoreconf:build gmake libtool qmake:no_configure qt:4 ssl
 PLIST_SUB=	BUILD_VERSION=${PORTVERSION}.${BUILD}
-USE_QT4=	corelib \
+USE_QT=		corelib \
 		gui \
 		iconengines \
 		inputmethods \
diff --git security/gpgme/Makefile security/gpgme/Makefile
index 7d4f32703a58..0806721b3fd6 100644
--- security/gpgme/Makefile
+++ security/gpgme/Makefile
@@ -71,8 +71,8 @@ NO_TEST=	yes
 
 .  if ${SLAVEPORT} == "qt5"
 LIB_DEPENDS+=	libgpgmepp.so:security/gpgme-cpp
-USES+=		compiler:c++11-lib pkgconfig
-USE_QT5=	buildtools_build core
+USES+=		compiler:c++11-lib pkgconfig qt:5
+USE_QT=	buildtools_build core
 CONFIGURE_ARGS+=--enable-languages="cpp qt"
 DOCSDIR=	${PORTNAME}${PKGNAMESUFFIX}
 
diff --git security/keepassx-devel/Makefile security/keepassx-devel/Makefile
index 95e2c0ae9f4e..fe5f77c79b49 100644
--- security/keepassx-devel/Makefile
+++ security/keepassx-devel/Makefile
@@ -23,10 +23,10 @@ LIB_DEPENDS=	libgcrypt.so:security/libgcrypt
 
 CONFLICTS_INSTALL=	keepassx-0.* keepassx2-* keepassxc-*
 
-USES=		cmake compiler:c++11-lib desktop-file-utils shared-mime-info
+USES=		cmake compiler:c++11-lib desktop-file-utils qt:5 shared-mime-info
 USE_LDCONFIG=	yes
 INSTALLS_ICONS=	yes
-USE_QT5=	buildtools_build concurrent core gui linguisttools qmake_build \
+USE_QT=		buildtools_build concurrent core gui linguisttools qmake_build \
 		testlib widgets x11extras
 USE_XORG=	ice inputproto sm x11 xcursor xext xfixes xi xrandr xrender \
 		xt xtst
diff --git security/keepassx/Makefile security/keepassx/Makefile
index 877ab050ad86..5c34e962d406 100644
--- security/keepassx/Makefile
+++ security/keepassx/Makefile
@@ -14,8 +14,8 @@ COMMENT=	Cross Platform Password Manager
 DATADIR=	${PREFIX}/share/${PORTNAME:tl}
 WRKSRC=		${WRKDIR}/${PORTNAME:tl}-${PORTVERSION}
 
-USES=		desktop-file-utils qmake shared-mime-info
-USE_QT4=	moc_build uic_build qt3support_build rcc_build \
+USES=		desktop-file-utils qmake qt:4 shared-mime-info
+USE_QT=		moc_build uic_build qt3support_build rcc_build \
 		corelib gui xml
 USE_XORG=	xt inputproto xtst xrender xrandr xfixes xcursor\
 		xext x11 sm ice xi
diff --git security/keepassx2/Makefile security/keepassx2/Makefile
index 81c9f5270d5b..6ac08e07f7c6 100644
--- security/keepassx2/Makefile
+++ security/keepassx2/Makefile
@@ -24,10 +24,10 @@ LIB_DEPENDS=	libgcrypt.so:security/libgcrypt
 
 CONFLICTS_INSTALL=	keepassx-0.* keepassx-devel-* keepassxc-*
 
-USES=		cmake compiler:features desktop-file-utils shared-mime-info
+USES=		cmake compiler:features desktop-file-utils qt:4 shared-mime-info
 USE_LDCONFIG=	yes
 INSTALLS_ICONS=	yes
-USE_QT4=	corelib gui xml qtestlib uic_build moc_build \
+USE_QT=		corelib gui xml qtestlib uic_build moc_build \
 		qmake_build rcc_build linguisttools
 USE_XORG=	ice inputproto sm x11 xcursor xext xfixes xi xrandr xrender \
 		xt xtst
diff --git security/keepassxc/Makefile security/keepassxc/Makefile
index fdc882b06ced..a238431164ca 100644
--- security/keepassxc/Makefile
+++ security/keepassxc/Makefile
@@ -23,8 +23,8 @@ LIB_DEPENDS=	libargon2.so:security/libargon2 \
 		libgcrypt.so:security/libgcrypt \
 		libgpg-error.so:security/libgpg-error
 
-USES=		cmake:outsource desktop-file-utils shared-mime-info tar:xz
-USE_QT5=	buildtools_build concurrent core dbus gui linguisttools network \
+USES=		cmake:outsource desktop-file-utils qt:5 shared-mime-info tar:xz
+USE_QT=		buildtools_build concurrent core dbus gui linguisttools network \
 		qmake_build testlib widgets
 USE_XORG=	x11
 USE_LDCONFIG=	yes
@@ -41,7 +41,8 @@ OPTIONS_SUB=		yes
 
 AUTOTYPE_CMAKE_BOOL=	WITH_XC_AUTOTYPE
 AUTOTYPE_DESC=		Auto-type passwords in input fields
-AUTOTYPE_USE=		QT5=x11extras XORG=xi,xtst
+AUTOTYPE_USES=	qt:5
+AUTOTYPE_USE=		QT=x11extras XORG=xi,xtst
 
 BROWSER_CMAKE_BOOL=	WITH_XC_BROWSER
 BROWSER_DESC=		Browser integration with KeePassXC-Browser
diff --git security/kf5-kdesu/Makefile security/kf5-kdesu/Makefile
index 3ca461fca136..91b6ec56a3b5 100644
--- security/kf5-kdesu/Makefile
+++ security/kf5-kdesu/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	security kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 integration with su for elevated privileges
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons dbusaddons ecm i18n pty service
-USE_QT5=	buildtools_build core dbus qmake_build xml
+USE_QT=		buildtools_build core dbus qmake_build xml
 USE_XORG=	ice sm x11 xext
 
 .include <bsd.port.mk>
diff --git security/kgpg-kde4/Makefile security/kgpg-kde4/Makefile
index c78f9fdadc1c..24b4bf2ee9fa 100644
--- security/kgpg-kde4/Makefile
+++ security/kgpg-kde4/Makefile
@@ -11,8 +11,8 @@ COMMENT=	Encryption tool for KDE
 
 RUN_DEPENDS=	gpg2:security/gnupg
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs pimlibs
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git security/kgpg/Makefile security/kgpg/Makefile
index 9f9178e8f2c4..38d818c4b615 100644
--- security/kgpg/Makefile
+++ security/kgpg/Makefile
@@ -9,13 +9,13 @@ COMMENT=	Encryption tool for KDE
 
 RUN_DEPENDS=	gpg2:security/gnupg
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	akonadi akonadicontacts archive auth bookmarks codecs \
 		completion config configwidgets contacts coreaddons crash \
 		dbusaddons doctools ecm i18n iconthemes itemmodels itemviews \
 		jobwidgets kio notifications service solid sonnet textwidgets \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network printsupport widgets xml \
+USE_QT=		core dbus gui network printsupport widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git security/kleopatra/Makefile security/kleopatra/Makefile
index a9b2e72ea9a3..469d74301fb9 100644
--- security/kleopatra/Makefile
+++ security/kleopatra/Makefile
@@ -14,12 +14,12 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 		libgpgmepp.so:security/gpgme-cpp \
 		libqgpgme.so:security/gpgme-qt5
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons dbusaddons \
 		doctools ecm i18n iconthemes itemmodels kcmutils notifications \
 		service sonnet textwidgets widgetsaddons windowsystem xmlgui \
 		libkleo mime
-USE_QT5=	core dbus gui network printsupport testlib widgets xml \
+USE_QT=		core dbus gui network printsupport testlib widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git security/kqoauth/Makefile security/kqoauth/Makefile
index c8327290ae61..6f6345dadc6d 100644
--- security/kqoauth/Makefile
+++ security/kqoauth/Makefile
@@ -10,8 +10,8 @@ COMMENT=	Implementation of OAuth 1.0 in C++ for Qt
 
 LICENSE=	LGPL21
 
-USES=		pkgconfig qmake
-USE_QT4=	corelib network gui moc_build qtestlib_build
+USES=		pkgconfig qmake qt:4
+USE_QT=		corelib network gui moc_build qtestlib_build
 USE_LDCONFIG=	yes
 MAKE_JOBS_UNSAFE=yes
 QMAKE_SOURCE_PATH=	${PORTNAME}.pro
diff --git security/kwalletmanager-kde4/Makefile security/kwalletmanager-kde4/Makefile
index 0da92a8372f9..fc02755ed566 100644
--- security/kwalletmanager-kde4/Makefile
+++ security/kwalletmanager-kde4/Makefile
@@ -9,8 +9,8 @@ CATEGORIES=	security kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Password manager for KDE
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git security/kwalletmanager/Makefile security/kwalletmanager/Makefile
index d7e6a69533c4..9823698b765e 100644
--- security/kwalletmanager/Makefile
+++ security/kwalletmanager/Makefile
@@ -7,13 +7,13 @@ CATEGORIES=	security kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Password manager for KDE
 
-USES=		cmake:outsource desktop-file-utils gettext kde:5 tar:xz
+USES=		cmake:outsource desktop-file-utils gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive auth codecs config configwidgets coreaddons crash \
 		dbusaddons doctools ecm emoticons i18n iconthemes init \
 		itemmodels itemviews kcmutils kdelibs4support kio \
 		jobwidgets notifications service wallet widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	core dbus gui widgets xml \
+USE_QT=		core dbus gui widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git security/libkleo/Makefile security/libkleo/Makefile
index b81fafe42e67..16a42afc3481 100644
--- security/libkleo/Makefile
+++ security/libkleo/Makefile
@@ -15,11 +15,11 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 RUN_DEPENDS=	${LOCALBASE}/bin/gmd5sum:sysutils/coreutils
 
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	codecs completion config coreaddons i18n itemmodels \
 		widgetsaddons windowsystem \
 		pimtextedit
-USE_QT5=	core gui widgets \
+USE_QT=		core gui widgets \
 		buildtools_build qmake_build
 
 _CORETOOLS=	md5sum sha1sum sha256sum sha512sum
diff --git security/openconnect-gui/Makefile security/openconnect-gui/Makefile
index ec0381688732..2cdd90fb20c8 100644
--- security/openconnect-gui/Makefile
+++ security/openconnect-gui/Makefile
@@ -21,8 +21,8 @@ RUN_DEPENDS=	openconnect:security/openconnect \
 USE_GITHUB=	yes
 GH_ACCOUNT=	${PORTNAME:C/-gui//}
 
-USES=		cmake pkgconfig
-USE_QT5=	buildtools_build concurrent core gui network qmake_build widgets
+USES=		cmake pkgconfig qt:5
+USE_QT=		buildtools_build concurrent core gui network qmake_build widgets
 CMAKE_ARGS+=	-DCMAKE_BUILD_TYPE=Release
 PLIST_FILES=	bin/openconnect-gui
 
diff --git security/ophcrack/Makefile security/ophcrack/Makefile
index 1bb741c236d1..f923ead90895 100644
--- security/ophcrack/Makefile
+++ security/ophcrack/Makefile
@@ -27,7 +27,8 @@ GRAPH_IMPLIES=	X11
 X11_DESC=	Build Qt 4 GUI frontend
 GRAPH_DESC=	Enable graph rendering via Qwt
 
-X11_USE=	QT4=moc_build,qmake_build,rcc_build,uic_build,corelib,gui
+X11_USES=	qt:4
+X11_USE=	QT=moc_build,qmake_build,rcc_build,uic_build,corelib,gui
 X11_CONFIGURE_OFF=	--disable-gui
 
 GRAPH_LIB_DEPENDS=	libqwt.so:x11-toolkits/qwt5
diff --git security/pinentry/Makefile security/pinentry/Makefile
index e707f757c8e1..824787029d17 100644
--- security/pinentry/Makefile
+++ security/pinentry/Makefile
@@ -94,14 +94,14 @@ CONFIGURE_ARGS+=--disable-pinentry-gnome3
 .endif
 
 .if ${PINENTRY_GUI} == "qt4"
-USES+=		compiler:c++11-lib
-USE_QT4=	corelib gui moc_build
+USES+=		compiler:c++11-lib qt:4
+USE_QT=		corelib gui moc_build
 PLIST_FILES=	bin/pinentry-qt4
 CONFIGURE_ARGS+=--disable-pinentry-qt5 \
 		--program-suffix=4
 .elif ${PINENTRY_GUI} == "qt5"
-USES+=		compiler:c++11-lib
-USE_QT5=	core gui widgets buildtools_build
+USES+=		compiler:c++11-lib qt:5
+USE_QT=		core gui widgets buildtools_build
 PLIST_FILES=	bin/pinentry-qt5
 CONFIGURE_ARGS+=--enable-pinentry-qt5 \
 		--program-suffix=5
diff --git security/plasma5-kscreenlocker/Makefile security/plasma5-kscreenlocker/Makefile
index da3d9b0a17ae..53fa2844b990 100644
--- security/plasma5-kscreenlocker/Makefile
+++ security/plasma5-kscreenlocker/Makefile
@@ -13,13 +13,13 @@ RUN_DEPENDS=	ck-list-sessions:sysutils/consolekit2\
 		dbus-send:devel/dbus
 
 USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 pkgconfig \
-		shebangfix tar:xz
+		qt:5 shebangfix tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash ecm \
 		emoticons globalaccel i18n idletime init itemmodels kcmutils \
 		kdeclarative kdelibs4support notifications package \
 		plasma-framework sonnet textwidgets wayland widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	core dbus gui network qml quick testlib widgets x11extras xml \
+USE_QT=		core dbus gui network qml quick testlib widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	ice sm x11 xcb xcursor xext xi
 
diff --git security/plasma5-ksshaskpass/Makefile security/plasma5-ksshaskpass/Makefile
index 8887692367e6..ea6ec278bea1 100644
--- security/plasma5-ksshaskpass/Makefile
+++ security/plasma5-ksshaskpass/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	security kde kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 ssh-add frontend
 
-USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 qt:5 tar:xz
 USE_KDE=	coreaddons doctools ecm i18n wallet widgetsaddons
-USE_QT5=	core gui widgets \
+USE_QT=		core gui widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git security/plasma5-kwallet-pam/Makefile security/plasma5-kwallet-pam/Makefile
index f1fc5e8441ff..7eb00e6c4592 100644
--- security/plasma5-kwallet-pam/Makefile
+++ security/plasma5-kwallet-pam/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Plasma5 KWallet PAM Integration
 LIB_DEPENDS=	libgcrypt.so:security/libgcrypt \
 		libgpg-error.so:security/libgpg-error
 
-USES=		cmake:outsource cpe gettext kde:5 tar:xz
+USES=		cmake:outsource cpe gettext kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build qmake_build
+USE_QT=		buildtools_build qmake_build
 
 # The qmake dependency is only needed so that kf5-e-c-m can query qmake for
 # some installation directories.
diff --git security/qtkeychain/Makefile security/qtkeychain/Makefile
index 762c30663131..c6cf6b805006 100644
--- security/qtkeychain/Makefile
+++ security/qtkeychain/Makefile
@@ -24,12 +24,14 @@ USE_KDE=	ecm
 PLIST_SUB+=	VERSION=${PORTVERSION}
 
 .  if ${FLAVOR} == qt4
+USES+=		qt:4
 CMAKE_ON=	BUILD_WITH_QT4
-USE_QT4=	corelib dbus linguisttools_build moc_build rcc_build qmake_build
+USE_QT=		corelib dbus linguisttools_build moc_build rcc_build qmake_build
 PLIST_SUB+=	PLIST_QT_PREFIX_UPCASE=Qt PLIST_QT_PREFIX=qt
 PLIST=		${PKGDIR}/pkg-plist.${FLAVOR}
 .  else
-USE_QT5=	core dbus linguisttools_build buildtools_build qmake_build
+USES+=		qt:5
+USE_QT=		core dbus linguisttools_build buildtools_build qmake_build
 PLIST_SUB+=	PLIST_QT_PREFIX_UPCASE=Qt5 PLIST_QT_PREFIX=qt5
 PLIST=		${PKGDIR}/pkg-plist.${FLAVOR}
 .  endif
diff --git security/quantis/Makefile security/quantis/Makefile
index 671f2e383fed..bec1e10d0ac7 100644
--- security/quantis/Makefile
+++ security/quantis/Makefile
@@ -32,8 +32,7 @@ TOOL_DESC=	Build EasyQuantis application
 GUI_DESC=	Build QT4 GUI for EasyQuantis application
 
 EXTRACT_BEFORE_ARGS=	-aqo
-USES=		cmake compiler:c++11-lang zip:infozip
-USE_QT4=	# empty but required
+USES=		cmake compiler:c++11-lang qt:4 zip:infozip
 USE_LDCONFIG=	yes
 SUB_FILES=	pkg-message
 
@@ -78,7 +77,7 @@ BUILD_DEPENDS+=	${LOCALBASE}/lib/libboost_date_time.a:devel/boost-libs
 CXXFLAGS+=	-I${LOCALBASE}/include
 
 . if ${PORT_OPTIONS:MGUI}
-USE_QT4+=	gui moc_build uic_build rcc_build qmake_build
+USE_QT+=	gui moc_build uic_build rcc_build qmake_build
 . else
 CMAKE_ARGS+=	-DDISABLE_EASYQUANTIS_GUI=1
 . endif
diff --git security/tpmmanager/Makefile security/tpmmanager/Makefile
index f54ac2c9214f..0f766a90a516 100644
--- security/tpmmanager/Makefile
+++ security/tpmmanager/Makefile
@@ -14,8 +14,8 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libtspi.so:security/trousers
 
-USES=		qmake
-USE_QT4=	gui moc_build rcc_build uic_build
+USES=		qmake qt:4
+USE_QT=		gui moc_build rcc_build uic_build
 
 PLIST_FILES=	bin/${PORTNAME}
 PORTDOCS=	*
diff --git security/yubikey-personalization-gui/Makefile security/yubikey-personalization-gui/Makefile
index 1385f583c50d..667de8417a50 100644
--- security/yubikey-personalization-gui/Makefile
+++ security/yubikey-personalization-gui/Makefile
@@ -17,8 +17,8 @@ LIB_DEPENDS=	libykpers-1.so:security/ykpers \
 USE_GITHUB=	yes
 GH_ACCOUNT=	Yubico
 
-USES=		pkgconfig qmake
-USE_QT4=	corelib gui moc_build rcc_build testlib_build uic_build
+USES=		pkgconfig qmake qt:4
+USE_QT=		corelib gui moc_build rcc_build testlib_build uic_build
 
 PLIST_FILES=	bin/yubikey-personalization-gui \
 		man/man1/yubikey-personalization-gui.1.gz \
diff --git sysutils/UEFITool/Makefile sysutils/UEFITool/Makefile
index 62f02349f4c4..b33441fea32c 100644
--- sysutils/UEFITool/Makefile
+++ sysutils/UEFITool/Makefile
@@ -12,11 +12,11 @@ COMMENT=	UEFI images parser
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/../LICENSE.md
 
-USES=		qmake:outsource
+USES=		qmake:outsource qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	LongSoft
 USE_GL=		gl
-USE_QT5=	core gui widgets buildtools_build qmake_build
+USE_QT=		core gui widgets buildtools_build qmake_build
 
 WRKSRC_SUBDIR=	${PORTNAME}
 
diff --git sysutils/bacula-bat/Makefile sysutils/bacula-bat/Makefile
index daf04f36a6bb..493f92bc2595 100644
--- sysutils/bacula-bat/Makefile
+++ sysutils/bacula-bat/Makefile
@@ -9,8 +9,8 @@ COMMENT=	Network backup solution (GUI)
 LIB_DEPENDS+=	libqwt.so:x11-toolkits/qwt5 \
 		libbac.so:sysutils/bacula-client
 
-USES=		pkgconfig
-USE_QT4=	qmake_build uic_build moc_build rcc_build
+USES=		pkgconfig qt:4
+USE_QT=		qmake_build uic_build moc_build rcc_build
 WITH_BAT=	yes
 
 PLIST=		${.CURDIR}/pkg-plist
diff --git sysutils/bacula9-bat/Makefile sysutils/bacula9-bat/Makefile
index c6da4c4f4f5e..7ee3e1f4e800 100644
--- sysutils/bacula9-bat/Makefile
+++ sysutils/bacula9-bat/Makefile
@@ -9,8 +9,8 @@ COMMENT=	Network backup solution (GUI)
 LIB_DEPENDS+=	libqwt.so:x11-toolkits/qwt5 \
 		libbac.so:sysutils/bacula9-client
 
-USES=		pkgconfig
-USE_QT4=	qmake_build uic_build moc_build rcc_build
+USES=		pkgconfig qt:4
+USE_QT=		qmake_build uic_build moc_build rcc_build
 WITH_BAT=	yes
 
 PLIST=		${.CURDIR}/pkg-plist
diff --git sysutils/baloo-kde4/Makefile sysutils/baloo-kde4/Makefile
index 51a15e067eb9..eb402fd99b1f 100644
--- sysutils/baloo-kde4/Makefile
+++ sysutils/baloo-kde4/Makefile
@@ -14,10 +14,10 @@ CONFLICTS_INSTALL=	kde-runtime-4.12.* \
 LIB_DEPENDS=	libxapian.so:databases/xapian-core \
 		libqjson.so:devel/qjson@qt4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	akonadi automoc4 kdelibs kfilemetadata \
 		pimlibs
-USE_QT4=	corelib qmake_build moc_build rcc_build uic_build
+USE_QT=		corelib qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git sysutils/baloo-widgets-kde4/Makefile sysutils/baloo-widgets-kde4/Makefile
index 7b0383190845..f67592ce09fc 100644
--- sysutils/baloo-widgets-kde4/Makefile
+++ sysutils/baloo-widgets-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	sysutils kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	The BalooWidgets library
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 baloo kfilemetadata
-USE_QT4=	corelib qmake_build moc_build rcc_build uic_build
+USE_QT=		corelib qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git sysutils/baloo-widgets/Makefile sysutils/baloo-widgets/Makefile
index 112e0ebb025e..bc9a3e3b73c6 100644
--- sysutils/baloo-widgets/Makefile
+++ sysutils/baloo-widgets/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	sysutils kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	BalooWidgets library
 
-USES=		cmake:outsource compiler:c++11-lang gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lang gettext kde:5 qt:5 tar:xz
 USE_KDE=	baloo completion config coreaddons ecm emoticons filemetadata \
 		i18n init itemmodels jobwidgets kdelibs4support kio service \
 		widgetsaddons
-USE_QT5=	core gui network testlib widgets xml \
+USE_QT=		core gui network testlib widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git sysutils/bareos-traymonitor/Makefile sysutils/bareos-traymonitor/Makefile
index 97c9fc5688a2..c8bd2369acee 100644
--- sysutils/bareos-traymonitor/Makefile
+++ sysutils/bareos-traymonitor/Makefile
@@ -12,8 +12,8 @@ LIB_DEPENDS+=	libqwt.so:x11-toolkits/qwt5 \
 
 CONFLICTS=	bacula*-bat-* bareos16-traymonitor-*
 
-USES=		pkgconfig gettext-runtime desktop-file-utils
-USE_QT4=	qmake_build uic_build moc_build rcc_build gui corelib
+USES=		pkgconfig gettext-runtime desktop-file-utils qt:4
+USE_QT=		qmake_build uic_build moc_build rcc_build gui corelib
 WITH_BAT=	yes
 
 PLIST=		${.CURDIR}/pkg-plist
diff --git sysutils/bareos16-bat/Makefile sysutils/bareos16-bat/Makefile
index 0045294a31bf..be5b4df4b795 100644
--- sysutils/bareos16-bat/Makefile
+++ sysutils/bareos16-bat/Makefile
@@ -11,8 +11,8 @@ LIB_DEPENDS+=	libqwt.so:x11-toolkits/qwt5 \
 
 CONFLICTS=	bacula*-bat-*
 
-USES=		pkgconfig desktop-file-utils
-USE_QT4=	qmake_build uic_build moc_build rcc_build
+USES=		pkgconfig desktop-file-utils qt:4
+USE_QT=		qmake_build uic_build moc_build rcc_build
 WITH_BAT=	yes
 
 PLIST=		${.CURDIR}/pkg-plist
diff --git sysutils/bareos16-traymonitor/Makefile sysutils/bareos16-traymonitor/Makefile
index f0356159ef31..5fa013d555e0 100644
--- sysutils/bareos16-traymonitor/Makefile
+++ sysutils/bareos16-traymonitor/Makefile
@@ -12,8 +12,8 @@ LIB_DEPENDS+=	libqwt.so:x11-toolkits/qwt5 \
 
 CONFLICTS=	bacula*-bat-* bareos-traymonitor-*
 
-USES=		pkgconfig gettext-runtime desktop-file-utils
-USE_QT4=	qmake_build uic_build moc_build rcc_build gui corelib
+USES=		pkgconfig gettext-runtime desktop-file-utils qt:4
+USE_QT=		qmake_build uic_build moc_build rcc_build gui corelib
 WITH_BAT=	yes
 
 PLIST=		${.CURDIR}/pkg-plist
diff --git sysutils/bsdisks/Makefile sysutils/bsdisks/Makefile
index cea2d57a493a..6a986af2fce4 100644
--- sysutils/bsdisks/Makefile
+++ sysutils/bsdisks/Makefile
@@ -11,8 +11,8 @@ COMMENT=	UDisks2 service implementation for FreeBSD
 
 LICENSE=	BSD3CLAUSE
 
-USES=		cmake compiler:c++11-lang
+USES=		cmake compiler:c++11-lang qt:5
 
-USE_QT5=	qmake_build buildtools_build core dbus
+USE_QT=		qmake_build buildtools_build core dbus
 
 .include <bsd.port.mk>
diff --git sysutils/dsbbatmon/Makefile sysutils/dsbbatmon/Makefile
index 921d2adea1ad..d414090a544a 100644
--- sysutils/dsbbatmon/Makefile
+++ sysutils/dsbbatmon/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Qt battery monitor
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		tar:tgz qmake
+USES=		qt:5 tar:tgz qmake
 
 USE_GL=		gl
-USE_QT5=	buildtools_build core gui linguisttools_build widgets
+USE_QT=		buildtools_build core gui linguisttools_build widgets
 
 .include <bsd.port.mk>
diff --git sysutils/dsblogoutmgr/Makefile sysutils/dsblogoutmgr/Makefile
index ca355c3a06cb..5b9391b330cc 100644
--- sysutils/dsblogoutmgr/Makefile
+++ sysutils/dsblogoutmgr/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Graphical logout manager
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		tar:tgz qmake
+USES=		qt:5 tar:tgz qmake
 
 USE_GL=		gl
-USE_QT5=	buildtools_build core gui linguisttools_build widgets
+USE_QT=		buildtools_build core gui linguisttools_build widgets
 
 .include <bsd.port.mk>
diff --git sysutils/filelight-kde4/Makefile sysutils/filelight-kde4/Makefile
index 6d2756479514..019d21dcc53c 100644
--- sysutils/filelight-kde4/Makefile
+++ sysutils/filelight-kde4/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Map of concentric segmented-rings representing file system
 
 CONFLICTS_INSTALL=      ${PORTNAME}
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git sysutils/filelight/Makefile sysutils/filelight/Makefile
index 7e7118ecacab..1bc3d26ac58c 100644
--- sysutils/filelight/Makefile
+++ sysutils/filelight/Makefile
@@ -12,11 +12,11 @@ BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-
 
 CONFLICTS_INSTALL=      ${PORTNAME}-kde4*
 
-USES=		cmake:outsource desktop-file-utils gettext kde:5 tar:xz
+USES=		cmake:outsource desktop-file-utils gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons doctools \
 		ecm i18n jobwidgets kio parts service solid sonnet textwidgets \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network script widgets xml \
+USE_QT=		core dbus gui network script widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/glogg/Makefile sysutils/glogg/Makefile
index 766b0ce19ef6..c31d3b52116b 100644
--- sysutils/glogg/Makefile
+++ sysutils/glogg/Makefile
@@ -15,8 +15,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libboost_program_options.so:devel/boost-libs
 
-USES=		qmake desktop-file-utils
-USE_QT5=	core gui widgets dbus buildtools_build
+USES=		qmake desktop-file-utils qt:5
+USE_QT=		core gui widgets dbus buildtools_build
 LDFLAGS+=	-Wl,--as-needed  # prevents stray USE_GL=gl, see bug#224488
 
 PLIST_FILES=	bin/glogg \
diff --git sysutils/k3b-kde4/Makefile sysutils/k3b-kde4/Makefile
index 4f7d311a91fc..a967d73e23e4 100644
--- sysutils/k3b-kde4/Makefile
+++ sysutils/k3b-kde4/Makefile
@@ -17,11 +17,11 @@ LIB_DEPENDS=	libcdda_paranoia.so:audio/cdparanoia \
 RUN_DEPENDS=	cdrecord:sysutils/cdrtools
 BUILD_DEPENDS=	cdrecord:sysutils/cdrtools
 
-USES=		cmake gettext kde:4 pkgconfig shared-mime-info tar:xz
+USES=		cmake gettext kde:4 pkgconfig qt:4 shared-mime-info tar:xz
 CMAKE_ARGS=	-DK3B_BUILD_K3BSETUP:BOOL=OFF \
 		-DK3B_ENABLE_MUSICBRAINZ:BOOL=OFF
 USE_KDE=	automoc4 kdelibs libkcddb
-USE_QT4=	gui phonon qt3support webkit \
+USE_QT=		gui phonon qt3support webkit \
 		qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git sysutils/k3b/Makefile sysutils/k3b/Makefile
index 250c84d0a019..0ce6732cce77 100644
--- sysutils/k3b/Makefile
+++ sysutils/k3b/Makefile
@@ -23,13 +23,13 @@ RUN_DEPENDS=	cdrecord:sysutils/cdrtools
 BUILD_DEPENDS=	cdrecord:sysutils/cdrtools
 
 USES=		cmake:outsource desktop-file-utils gettext iconv kde:5 pkgconfig \
-		shared-mime-info tar:xz
+		qt:5 shared-mime-info tar:xz
 
 USE_KDE=	archive attica auth bookmarks codecs completion config \
 		configwidgets coreaddons ecm filemetadata i18n iconthemes \
 		itemviews jobwidgets kcmutils kio newstuff notifications \
 		notifyconfig service solid widgetsaddons xmlgui
-USE_QT5=	core dbus gui network webkit widgets xml \
+USE_QT=		core dbus gui network webkit widgets xml \
 		buildtools_build qmake_build
 
 # The ffmpeg-plugin needs patching
diff --git sysutils/kbackup/Makefile sysutils/kbackup/Makefile
index ae3761a94ac0..5a26f720ba51 100644
--- sysutils/kbackup/Makefile
+++ sysutils/kbackup/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	sysutils kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Backup program with an easy to use user interface
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		coreaddons ecm i18n iconthemes itemviews jobwidgets kio \
 		notifications service solid widgetsaddons xmlgui
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/kcm-polkit-kde/Makefile sysutils/kcm-polkit-kde/Makefile
index 1c9ee5308388..5ac2a80bb5a6 100644
--- sysutils/kcm-polkit-kde/Makefile
+++ sysutils/kcm-polkit-kde/Makefile
@@ -14,9 +14,9 @@ COMMENT=	Polkit-KDE configuration module
 LIB_DEPENDS=	libpolkit-qt-agent-1.so:sysutils/polkit-qt@qt4
 RUN_DEPENDS=	${KDE_PREFIX}/lib/kde4/libexec/polkit-kde-authentication-agent-1:sysutils/polkit-kde
 
-USES=		cmake kde:4 pkgconfig tar:bzip2
+USES=		cmake kde:4 pkgconfig qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	dbus xml moc_build qmake_build rcc_build uic_build
+USE_QT=		dbus xml moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-kcmodules-1
diff --git sysutils/kcron-kde4/Makefile sysutils/kcron-kde4/Makefile
index 7de3e5fc2858..4fce574ed14b 100644
--- sysutils/kcron-kde4/Makefile
+++ sysutils/kcron-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	sysutils kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE task scheduler
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git sysutils/kcron/Makefile sysutils/kcron/Makefile
index df6650e9188c..e2e9fe61a75b 100644
--- sysutils/kcron/Makefile
+++ sysutils/kcron/Makefile
@@ -10,11 +10,11 @@ COMMENT=	KDE task scheduler
 BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl \
 		docbook-xml>0:textproc/docbook-xml
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons ecm \
 		doctools i18n iconthemes jobwidgets kio service widgetsaddons \
 		xmlgui
-USE_QT5=	core gui network printsupport widgets xml \
+USE_QT=		core gui network printsupport widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/kdebugsettings/Makefile sysutils/kdebugsettings/Makefile
index 03fe79152dde..7c034fdf1333 100644
--- sysutils/kdebugsettings/Makefile
+++ sysutils/kdebugsettings/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	sysutils kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE application to enable/disable qCDebug
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	completion config configwidgets coreaddons dbusaddons \
 		ecm guiaddons i18n iconthemes itemviews kio widgetsaddons
-USE_QT5=	core dbus gui testlib widgets \
+USE_QT=		core dbus gui testlib widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/kdf-kde4/Makefile sysutils/kdf-kde4/Makefile
index b97a13f26735..6ac450e38271 100644
--- sysutils/kdf-kde4/Makefile
+++ sysutils/kdf-kde4/Makefile
@@ -9,8 +9,8 @@ CATEGORIES=	sysutils kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Shows free space of devices for KDE
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git sysutils/kdf/Makefile sysutils/kdf/Makefile
index 9cdc39196a6c..b0c743d4e637 100644
--- sysutils/kdf/Makefile
+++ sysutils/kdf/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	sysutils kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Shows free space of devices for KDE
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons doctools \
 		i18n iconthemes jobwidgets kcmutils kio notifications service \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/kdialog/Makefile sysutils/kdialog/Makefile
index 59886904834d..d1d8c90a5255 100644
--- sysutils/kdialog/Makefile
+++ sysutils/kdialog/Makefile
@@ -7,13 +7,13 @@ CATEGORIES=	sysutils kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Show nice dialog boxes from shell scripts
 
-USES=		cmake:outsource gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm guiaddons i18n iconthemes \
 		itemviews jobwidgets kdelibs4support kio notifications parts \
 		service solid sonnet textwidgets unitconversion widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	core dbus gui network printsupport widgets xml \
+USE_QT=		core dbus gui network printsupport widgets xml \
 		buildtools_build qmake_build
 USE_XORG=	x11
 
diff --git sysutils/kdirstat/Makefile sysutils/kdirstat/Makefile
index aa1b08409000..c6c99aba2637 100644
--- sysutils/kdirstat/Makefile
+++ sysutils/kdirstat/Makefile
@@ -16,10 +16,10 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 WRKSRC=		${WRKDIR}/jeromerobert-k4dirstat-3a4663ee20e7
 
-USES=		cmake cpe gettext-tools kde:4 tar:bzip2
+USES=		cmake cpe gettext-tools kde:4 qt:4 tar:bzip2
 CPE_VENDOR=	kdirstat_project
 USE_KDE=	automoc4 kdelibs libkonq
-USE_QT4=	corelib dbus gui network qt3support svg xml \
+USE_QT=		corelib dbus gui network qt3support svg xml \
 		moc_build qmake_build rcc_build uic_build
 
 post-patch:
diff --git sysutils/kf5-baloo/Makefile sysutils/kf5-baloo/Makefile
index 26098cf8b51a..156a8bcd3a03 100644
--- sysutils/kf5-baloo/Makefile
+++ sysutils/kf5-baloo/Makefile
@@ -10,11 +10,11 @@ COMMENT=	KF5 Framework for searching and managing user metadata
 LIB_DEPENDS=	liblmdb.so:databases/lmdb \
 		libinotify.so:devel/libinotify
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pathfix tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pathfix qt:5 tar:xz
 USE_KDE=	auth completion config coreaddons crash dbusaddons \
 		filemetadata i18n idletime jobwidgets kio service \
 		solid widgetsaddons
-USE_QT5=	buildtools_build core dbus gui network qmake_build \
+USE_QT=		buildtools_build core dbus gui network qmake_build \
 		qml quick testlib widgets
 
 # Frameworks ports install localization files that conflict with some
diff --git sysutils/kf5-kwallet/Makefile sysutils/kf5-kwallet/Makefile
index 3dac43894ed4..148e1548d0bf 100644
--- sysutils/kf5-kwallet/Makefile
+++ sysutils/kf5-kwallet/Makefile
@@ -15,10 +15,10 @@ LIB_DEPENDS=	libassuan.so:security/libassuan \
 		libqgpgme.so:security/gpgme-qt5 \
 		libgpgmepp.so:security/gpgme-cpp
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons dbusaddons \
 		doctools ecm i18n iconthemes notifications service \
 		widgetsaddons windowsystem
-USE_QT5=	buildtools_build core dbus gui qmake_build widgets xml
+USE_QT=		buildtools_build core dbus gui qmake_build widgets xml
 
 .include <bsd.port.mk>
diff --git sysutils/kfilemetadata-kde4/Makefile sysutils/kfilemetadata-kde4/Makefile
index 77b1af95b63e..93dc1146e5b1 100644
--- sysutils/kfilemetadata-kde4/Makefile
+++ sysutils/kfilemetadata-kde4/Makefile
@@ -15,9 +15,9 @@ LIB_DEPENDS=	libpoppler-qt4.so:graphics/poppler-qt4 \
 		libepub.so:textproc/ebook-tools \
 		libqmobipocket.so:graphics/kdegraphics-mobipocket-kde4
 
-USES=		cmake:outsource kde:4 pkgconfig tar:xz
+USES=		cmake:outsource kde:4 pkgconfig qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	corelib qmake_build moc_build rcc_build uic_build
+USE_QT=		corelib qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git sysutils/kfloppy-kde4/Makefile sysutils/kfloppy-kde4/Makefile
index 3748a8d837c8..91683fd0c94d 100644
--- sysutils/kfloppy-kde4/Makefile
+++ sysutils/kfloppy-kde4/Makefile
@@ -9,8 +9,8 @@ CATEGORIES=	sysutils kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Floppy disk formatter for KDE
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git sysutils/kfloppy/Makefile sysutils/kfloppy/Makefile
index a9f2c7e2f6c3..391cf8321ea8 100644
--- sysutils/kfloppy/Makefile
+++ sysutils/kfloppy/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	sysutils kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Floppy disk formatter for KDE
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons crash \
 		doctools ecm emoticons i18n init itemmodels kdelibs4support \
 		kio widgetsaddons xmlgui
-USE_QT5=	core dbus gui widgets xml \
+USE_QT=		core dbus gui widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/khelpcenter/Makefile sysutils/khelpcenter/Makefile
index 4dc93ca3a464..e62eb4712972 100644
--- sysutils/khelpcenter/Makefile
+++ sysutils/khelpcenter/Makefile
@@ -10,14 +10,14 @@ COMMENT=	Plasma5 application to show KDE application documentation
 LIB_DEPENDS=	libxapian.so:databases/xapian-core
 
 USES=		cmake:outsource compiler:c++11-lib cpe gettext grantlee:5 \
-		kde:5 shebangfix tar:xz
+		kde:5 qt:5 shebangfix tar:xz
 USE_GNOME=	libxml2
 USE_KDE=	archive auth bookmarks codecs completion config configwidgets \
 		coreaddons dbusaddons doctools ecm emoticons i18n init \
 		itemmodels itemviews jobwidgets js kcmutils kdelibs4support \
 		kio khtml parts service sonnet textwidgets widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 SHEBANG_FILES=	searchhandlers/khc_mansearch.pl
 
diff --git sysutils/knutclient-kde4/Makefile sysutils/knutclient-kde4/Makefile
index 99caa7eaa4ac..7be926ad24f8 100644
--- sysutils/knutclient-kde4/Makefile
+++ sysutils/knutclient-kde4/Makefile
@@ -19,8 +19,8 @@ LIB_DEPENDS=	libqimageblitz.so:x11/qimageblitz
 
 CONFLICTS=	knutclient-0.*
 
-USES=		cmake gettext kde:4
+USES=		cmake gettext kde:4 qt:4
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib gui qmake_build moc_build rcc_build uic_build
+USE_QT=		corelib gui qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git sysutils/krename/Makefile sysutils/krename/Makefile
index 8c4c06bdfe4c..08074a0076a4 100644
--- sysutils/krename/Makefile
+++ sysutils/krename/Makefile
@@ -17,11 +17,11 @@ LIB_DEPENDS=	libtag.so:audio/taglib \
 		libpodofo.so:graphics/podofo \
 		libfreetype.so:print/freetype2
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash i18n iconthemes itemviews jobwidgets \
 		js kio service solid widgetsaddons xmlgui
-USE_QT5=	core dbus gui network xml widgets \
+USE_QT=		core dbus gui network xml widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/kshutdown-kde4/Makefile sysutils/kshutdown-kde4/Makefile
index f33b2aa2ead1..e0ac9c619b62 100644
--- sysutils/kshutdown-kde4/Makefile
+++ sysutils/kshutdown-kde4/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Advanced shutdown utility for KDE
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		alias cmake:outsource compiler:c++0x gettext kde:4 zip
-USE_QT4=	corelib dbus gui moc_build qmake_build rcc_build svg uic_build
+USES=		alias cmake:outsource compiler:c++0x gettext kde:4 qt:4 zip
+USE_QT=		corelib dbus gui moc_build qmake_build rcc_build svg uic_build
 USE_KDE=	automoc4 kdelibs workspace
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${DISTVERSION}
diff --git sysutils/ksystemlog-kde4/Makefile sysutils/ksystemlog-kde4/Makefile
index 2c64efa494e1..8693430d7be1 100644
--- sysutils/ksystemlog-kde4/Makefile
+++ sysutils/ksystemlog-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	sysutils kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE system log application
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git sysutils/ksystemlog/Makefile sysutils/ksystemlog/Makefile
index 3aa4204dcf8c..7c0287f757d9 100644
--- sysutils/ksystemlog/Makefile
+++ sysutils/ksystemlog/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	sysutils kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE system log application
 
-USES=		cmake:outsource gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	archive auth codecs completion config configwidgets coreaddons \
 		doctools ecm i18n iconthemes itemviews jobwidgets kio \
 		service sonnet textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus gui network printsupport testlib widgets xml \
+USE_QT=		core dbus gui network printsupport testlib widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/kuser-kde4/Makefile sysutils/kuser-kde4/Makefile
index 4b8980bc0368..7f9df48372b6 100644
--- sysutils/kuser-kde4/Makefile
+++ sysutils/kuser-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	sysutils kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE user manager
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs pimlibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git sysutils/luckybackup/Makefile sysutils/luckybackup/Makefile
index c2dfaababc68..f712784bef28 100644
--- sysutils/luckybackup/Makefile
+++ sysutils/luckybackup/Makefile
@@ -13,10 +13,10 @@ LICENSE_FILE=	${WRKSRC}/license/gpl.txt
 
 RUN_DEPENDS=	rsync:net/rsync
 
-USES=		qmake
+USES=		qmake qt:5
 
 USE_GL=		gl
-USE_QT5=	core gui network widgets buildtools_build
+USE_QT=		core gui network widgets buildtools_build
 
 post-patch:
 	${REINPLACE_CMD} -e 's|/usr|$$$${PREFIX}|g' -e '/INSTALLS/s|debianmenu ||' \
diff --git sysutils/nepomuk-core-kde4/Makefile sysutils/nepomuk-core-kde4/Makefile
index 70eab28ac627..5df3f06a8658 100644
--- sysutils/nepomuk-core-kde4/Makefile
+++ sysutils/nepomuk-core-kde4/Makefile
@@ -16,10 +16,10 @@ LIB_DEPENDS=	libpoppler-qt4.so:graphics/poppler-qt4 \
 		libepub.so:textproc/ebook-tools \
 		libqmobipocket.so:graphics/kdegraphics-mobipocket-kde4
 
-USES=		cmake:outsource kde:4 python:run shebangfix tar:xz
+USES=		cmake:outsource kde:4 python:run qt:4 shebangfix tar:xz
 USE_KDE=	automoc4 baloo kdelibs kfilemetadata \
 		ontologies soprano
-USE_QT4=	corelib dbus gui qmake_build moc_build rcc_build uic_build
+USE_QT=		corelib dbus gui qmake_build moc_build rcc_build uic_build
 USE_LDCONFIG=	yes
 MAKE_ENV=	XDG_CONFIG_HOME=/dev/null
 
diff --git sysutils/nepomuk-widgets-kde4/Makefile sysutils/nepomuk-widgets-kde4/Makefile
index 2e4fa5382df6..de1cfa3f4a3d 100644
--- sysutils/nepomuk-widgets-kde4/Makefile
+++ sysutils/nepomuk-widgets-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	sysutils kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	The NepomukWidget libraries
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4 soprano nepomuk-core
-USE_QT4=	corelib dbus gui moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib dbus gui moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git sysutils/pc-networkmanager/Makefile sysutils/pc-networkmanager/Makefile
index 0298ec63fa94..d273afab51a7 100644
--- sysutils/pc-networkmanager/Makefile
+++ sysutils/pc-networkmanager/Makefile
@@ -19,10 +19,10 @@ MAKE_ARGS=	PREFIX=${STAGEDIR}${PREFIX}
 CONFLICTS=	pcbsd-utils*
 MAKE_JOBS_UNSAFE=	yes
 
-USES=		qmake shebangfix tar:xz
+USES=		qmake qt:5 shebangfix tar:xz
 SHEBANG_FILES=	src/NetworkManager/resources/umts_stick
 USE_LDCONFIG=	yes
-USE_QT5=	core gui network svg linguist \
+USE_QT=		core gui network svg linguist \
 		buildtools x11extras widgets
 USE_GL+=	gl
 
diff --git sysutils/pcbsd-syscache/Makefile sysutils/pcbsd-syscache/Makefile
index adfb9a619640..616950fc301f 100644
--- sysutils/pcbsd-syscache/Makefile
+++ sysutils/pcbsd-syscache/Makefile
@@ -11,8 +11,8 @@ COMMENT=	PC-BSD SysCache Utility
 LICENSE=	BSD3CLAUSE
 
 WRKSRC_SUBDIR=	src-sh/syscache
-USE_QT5=	core network buildtools qmake
-USES=		pkgconfig
+USE_QT=		core network buildtools qmake
+USES=		pkgconfig qt:5
 NO_BUILD=	yes
 MAKE_ARGS=	PREFIX=${STAGEDIR}${PREFIX}
 
diff --git sysutils/pcbsd-utils-qt5/Makefile sysutils/pcbsd-utils-qt5/Makefile
index 2ab23901bdbb..9a0cf1f0be41 100644
--- sysutils/pcbsd-utils-qt5/Makefile
+++ sysutils/pcbsd-utils-qt5/Makefile
@@ -29,9 +29,9 @@ CONFLICTS?=	pcbsd-utils-qt4-[0-9]*
 MAKE_JOBS_UNSAFE=yes
 ONLY_FOR_ARCHS=	amd64
 USE_LDCONFIG=	yes
-USE_QT5=	core gui network svg linguist \
+USE_QT=		core gui network svg linguist \
 		webkit buildtools x11extras
-USES=		desktop-file-utils python qmake shebangfix
+USES=		desktop-file-utils python qmake qt:5 shebangfix
 SHEBANG_FILES=	pc-netmanager/src/NetworkManager/resources/umts_stick \
 		pc-sysmanager/scripts/fastest_cvsup
 
diff --git sysutils/pcbsd-utils/Makefile sysutils/pcbsd-utils/Makefile
index d673d42877bc..37e9242fd214 100644
--- sysutils/pcbsd-utils/Makefile
+++ sysutils/pcbsd-utils/Makefile
@@ -14,8 +14,8 @@ RUN_DEPENDS=	sipcalc:net-mgmt/sipcalc \
 		eject:sysutils/eject
 
 WRKSRC_SUBDIR=	src-sh/pcbsd-utils
-USE_QT5=	core network buildtools qmake
-USES=		pkgconfig
+USE_QT=		core network buildtools qmake
+USES=		pkgconfig qt:5
 MAKE_ARGS=	PREFIX=${STAGEDIR}${PREFIX}
 
 USE_GITHUB=	yes
diff --git sysutils/plasma5-discover/Makefile sysutils/plasma5-discover/Makefile
index daa094c15243..b500b1dcd19d 100644
--- sysutils/plasma5-discover/Makefile
+++ sysutils/plasma5-discover/Makefile
@@ -11,13 +11,13 @@ COMMENT=	Plasma5 package management tools
 #LIB_DEPENDS=	libpackagekit-qt.so:ports-mgmt/packagekit-qt5
 
 USES=		cmake:outsource compiler:c++11-lib cpe desktop-file-utils \
-		gettext kde:5 pkgconfig tar:xz
+		gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	archive attica auth codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm i18n iconthemes itemmodels \
 		itemviews jobwidgets kdeclarative kio kirigami2 newstuff \
 		notifications package plasma-framework service solid \
 		textwidgets wallet widgetsaddons xmlgui
-USE_QT5=	concurrent core dbus gui network qml quick svg testlib widgets xml \
+USE_QT=		concurrent core dbus gui network qml quick svg testlib widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/plasma5-drkonqi/Makefile sysutils/plasma5-drkonqi/Makefile
index 66f06bdc14e9..84927937c236 100644
--- sysutils/plasma5-drkonqi/Makefile
+++ sysutils/plasma5-drkonqi/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	sysutils kde kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 crash handler
 
-USES=		cmake:outsource kde:5 pkgconfig tar:xz
+USES=		cmake:outsource kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		 crash i18n idletime jobwidgets kio notifications \
 		service wallet widgetsaddons xmlrpcclient
-USE_QT5=	concurrent core dbus gui network widgets x11extras xml \
+USE_QT=		concurrent core dbus gui network widgets x11extras xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/plasma5-kde-cli-tools/Makefile sysutils/plasma5-kde-cli-tools/Makefile
index 88128e336ce6..47eeb16e154a 100644
--- sysutils/plasma5-kde-cli-tools/Makefile
+++ sysutils/plasma5-kde-cli-tools/Makefile
@@ -9,13 +9,13 @@ COMMENT=	Plasma5 non-interactive system tools
 
 CONFLICTS_INSTALL=	kde-runtime-kde4
 
-USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 qt:5 tar:xz
 USE_KDE=	activities auth bookmarks codecs completion config configwidgets \
 		coreaddons crash ecm emoticons guiaddons i18n iconthemes init \
 		itemmodels itemviews jobwidgets kcmutils kdelibs4support kdesu \
 		kio notifications parts pty service solid sonnet textwidgets \
 		unitconversion widgetsaddons windowsystem xmlgui
-USE_QT5=	concurrent core dbus gui network printsupport svg testlib  widgets x11extras xml \
+USE_QT=		concurrent core dbus gui network printsupport svg testlib  widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	x11
 
diff --git sysutils/plasma5-kinfocenter/Makefile sysutils/plasma5-kinfocenter/Makefile
index 8f2fcd21de2c..5ff0da57e6d7 100644
--- sysutils/plasma5-kinfocenter/Makefile
+++ sysutils/plasma5-kinfocenter/Makefile
@@ -10,7 +10,7 @@ COMMENT=	Plasma5 utility providing system information
 LIB_DEPENDS=	libpci.so:devel/libpci
 
 USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 pkgconfig \
-		tar:xz
+		qt:5 tar:xz
 USE_GL=		egl gl glu
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons doctools ecm emoticons guiaddons \
@@ -18,7 +18,7 @@ USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		kdelibs4support kio notifications package parts init \
 		itemmodels itemviews service solid sonnet textwidgets \
 		unitconversion wayland wayland widgetsaddons windowsystem xmlgui
-USE_QT5=	concurrent core dbus gui network printsupport widgets xml \
+USE_QT=		concurrent core dbus gui network printsupport widgets xml \
 		buildtools_build qmake_build
 USE_XORG=	ice sm x11 xext
 
diff --git sysutils/plasma5-kmenuedit/Makefile sysutils/plasma5-kmenuedit/Makefile
index 6d7d4a72d6ad..ed5dc6b957cc 100644
--- sysutils/plasma5-kmenuedit/Makefile
+++ sysutils/plasma5-kmenuedit/Makefile
@@ -7,13 +7,13 @@ CATEGORIES=	sysutils kde kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 menu editor
 
-USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons guiaddons ecm emoticons hotkeys \
 		i18n iconthemes init itemmodels itemviews jobwidgets \
 		kdelibs4support kio notifications parts service solid sonnet \
 		textwidgets unitconversion widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network printsupport widgets xml\
+USE_QT=		core dbus gui network printsupport widgets xml\
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/plasma5-ksysguard/Makefile sysutils/plasma5-ksysguard/Makefile
index b72a807c9956..753414e4b88c 100644
--- sysutils/plasma5-ksysguard/Makefile
+++ sysutils/plasma5-ksysguard/Makefile
@@ -8,13 +8,13 @@ MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 utility to track and control the running processes
 
 USES=		cmake:outsource compiler:c++11-lib cpe desktop-file-utils \
-		gettext kde:5 tar:xz
+		gettext kde:5 qt:5 tar:xz
 USE_KDE=	attica auth codecs completion config configwidgets coreaddons \
 		dbusaddons emoticons i18n iconthemes init itemmodels \
 		itemviews jobwidgets kdelibs4support kio libksysguard \
 		newstuff notifications service widgetsaddons windowsystem \
 		xmlgui
-USE_QT5=	concurrent core dbus gui network widgets xml \
+USE_QT=		concurrent core dbus gui network widgets xml \
 		buildtools_build qmake_build
 
 OPTIONS_DEFINE=	INOTIFY
diff --git sysutils/plasma5-libksysguard/Makefile sysutils/plasma5-libksysguard/Makefile
index f4223f4fc315..426d33a116c4 100644
--- sysutils/plasma5-libksysguard/Makefile
+++ sysutils/plasma5-libksysguard/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	sysutils kde kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 library to track and control running processes
 
-USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons i18n \
 		iconthemes package plasma-framework service widgetsaddons \
 		windowsystem
-USE_QT5=	core dbus gui network script webkit widgets x11extras xml \
+USE_QT=		core dbus gui network script webkit widgets x11extras xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/plasma5-polkit-kde-agent-1/Makefile sysutils/plasma5-polkit-kde-agent-1/Makefile
index 675041bf2f27..dcf0764d131f 100644
--- sysutils/plasma5-polkit-kde-agent-1/Makefile
+++ sysutils/plasma5-polkit-kde-agent-1/Makefile
@@ -9,10 +9,10 @@ COMMENT=	Plasma5 daemon providing a polkit authentication UI
 
 LIB_DEPENDS=	libpolkit-qt5-core-1.so:sysutils/polkit-qt@qt5
 
-USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons crash dbusaddons ecm i18n iconthemes \
 		notifications widgetsaddons windowsystem
-USE_QT5=	core dbus gui widgets \
+USE_QT=		core dbus gui widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/plasma5-powerdevil/Makefile sysutils/plasma5-powerdevil/Makefile
index beef6bff975c..4b13361be18c 100644
--- sysutils/plasma5-powerdevil/Makefile
+++ sysutils/plasma5-powerdevil/Makefile
@@ -7,7 +7,7 @@ CATEGORIES=	sysutils kde kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 tool to manage the power consumption settings
 
-USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	activities auth bookmarks codecs completion configwidgets \
 		coreaddons crash config dbusaddons ecm emoticons globalaccel \
 		guiaddons i18n idletime iconthemes init itemmodels itemviews \
@@ -15,7 +15,7 @@ USE_KDE=	activities auth bookmarks codecs completion configwidgets \
 		notifyconfig parts plasma-workspace service solid sonnet \
 		textwidgets unitconversion wayland widgetsaddons windowsystem \
 		xmlgui
-USE_QT5=	core dbus gui network printsupport widgets x11extras xml \
+USE_QT=		core dbus gui network printsupport widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	xcb
 
diff --git sysutils/plasma5-systemsettings/Makefile sysutils/plasma5-systemsettings/Makefile
index a4a1f753edc8..01af22f365e3 100644
--- sysutils/plasma5-systemsettings/Makefile
+++ sysutils/plasma5-systemsettings/Makefile
@@ -7,13 +7,13 @@ CATEGORIES=	sysutils kde kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 system settings
 
-USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 qt:5 tar:xz
 USE_KDE=	activities activities-stats auth codecs completion config \
 		configwidgets coreaddons crash dbusaddons doctools ecm i18n \
 		iconthemes itemviews jobwidgets js kcmutils kdeclarative khtml \
 		kio kirigami2 package parts service sonnet textwidgets \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	concurrent core dbus gui network qml quick widgets xml \
+USE_QT=		concurrent core dbus gui network qml quick widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/plasma5-user-manager/Makefile sysutils/plasma5-user-manager/Makefile
index fdb95c00a4fc..fe7698c3f8ea 100644
--- sysutils/plasma5-user-manager/Makefile
+++ sysutils/plasma5-user-manager/Makefile
@@ -12,13 +12,13 @@ LIB_DEPENDS=	libpwquality.so:security/libpwquality
 RUN_DEPENDS=	accountsservice>=0:sysutils/accountsservice
 
 USES=		cmake:outsource compiler:c++11-lib cpe gettext \
-		kde:5 pkgconfig tar:xz
+		kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash ecm emoticons guiaddons i18n iconthemes \
 		init itemmodels itemviews jobwidgets kcmutils kdelibs4support \
 		kio notifications parts service solid sonnet textwidgets \
 		unitconversion widgetsaddons windowsystem xmlgui
-USE_QT5=	concurrent core dbus gui network printsupport widgets xml \
+USE_QT=		concurrent core dbus gui network printsupport widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	${QT_PLUGINDIR}
 
diff --git sysutils/policykit-qt/Makefile sysutils/policykit-qt/Makefile
index 871d0502245c..20bf49664463 100644
--- sysutils/policykit-qt/Makefile
+++ sysutils/policykit-qt/Makefile
@@ -14,9 +14,9 @@ COMMENT=	PolicyKit manager for Qt
 LIB_DEPENDS=	libpolkit.so:sysutils/policykit
 
 USE_LDCONFIG=	yes
-USES=		cmake gettext kde:4 pkgconfig tar:bzip2
+USES=		cmake gettext kde:4 pkgconfig qt:4 tar:bzip2
 USE_KDE=	automoc4
-USE_QT4=	corelib dbus gui network svg xml  \
+USE_QT=		corelib dbus gui network svg xml  \
 		qmake_build moc_build rcc_build uic_build
 
 PORTSCOUT=	limit:^0
diff --git sysutils/polkit-kde/Makefile sysutils/polkit-kde/Makefile
index 1ef41e463cc6..c9cc130f069b 100644
--- sysutils/polkit-kde/Makefile
+++ sysutils/polkit-kde/Makefile
@@ -15,9 +15,9 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libpolkit-qt-agent-1.so:sysutils/polkit-qt@qt4
 
-USES=		cmake kde:4 tar:bzip2
+USES=		cmake kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 OPTIONS_DEFINE=	NLS
 OPTIONS_SUB=	yes
diff --git sysutils/polkit-qt/Makefile sysutils/polkit-qt/Makefile
index bd0fa1e99cd0..0510e60239ec 100644
--- sysutils/polkit-qt/Makefile
+++ sysutils/polkit-qt/Makefile
@@ -26,15 +26,16 @@ CMAKE_OFF=	BUILD_EXAMPLES  \
 		BUILD_TEST
 
 .  if ${FLAVOR} == qt4
-USES+=		kde:4
+USES+=		kde:4 qt:4
 USE_KDE=	automoc4
-USE_QT4=	corelib dbus gui \
+USE_QT=		corelib dbus gui \
 		qmake_build moc_build rcc_build uic_build
 CMAKE_ON+=	USE_QT4
 CMAKE_OFF+=	USE_QT5
 QTVER_SUFFIX=	# empty
 .  else
-USE_QT5=	core dbus gui widgets buildtools_build qmake_build
+USES+=		qt:5
+USE_QT=		core dbus gui widgets buildtools_build qmake_build
 CMAKE_ON+=	USE_QT5
 CMAKE_OFF+=	USE_QT4
 QTVER_SUFFIX=	5
diff --git sysutils/qdirstat/Makefile sysutils/qdirstat/Makefile
index 580c51d358fc..feb71726ff3d 100644
--- sysutils/qdirstat/Makefile
+++ sysutils/qdirstat/Makefile
@@ -13,9 +13,9 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 USE_GITHUB=	yes
 GH_ACCOUNT=	shundhammer
 
-USES=		desktop-file-utils qmake shebangfix
+USES=		desktop-file-utils qmake qt:5 shebangfix
 USE_GL=		gl
-USE_QT5=	buildtools_build core gui widgets
+USE_QT=		buildtools_build core gui widgets
 SHEBANG_FILES=	scripts/qdirstat-cache-writer
 
 pre-configure:
diff --git sysutils/qpxtool/Makefile sysutils/qpxtool/Makefile
index 033e0ab5528d..9218962cd746 100644
--- sysutils/qpxtool/Makefile
+++ sysutils/qpxtool/Makefile
@@ -19,10 +19,9 @@ BROKEN_armv7=		fails to compile: qpx_mmc_defs.h:608:4: constant expression evalu
 
 LIB_DEPENDS=	libpng.so:graphics/png
 
-USES=		gmake tar:bzip2
-USE_QT4=	qmake_build moc_build rcc_build linguisttools_build \
+USES=		gmake qmake:no_env qt:4 tar:bzip2
+USE_QT=		qmake_build moc_build rcc_build linguisttools_build \
 		corelib gui network sql
-QT_NONSTANDARD=	yes
 HAS_CONFIGURE=	yes
 CONFIGURE_ENV=	PREFIX=${PREFIX}
 USE_LDCONFIG=	yes
@@ -31,9 +30,12 @@ OPTIONS_GROUP=		DB
 OPTIONS_GROUP_DB=	SQLITE MYSQL PGSQL
 OPTIONS_DEFAULT=	SQLITE
 
-SQLITE_USE=	QT4=sql-sqlite3_run
-MYSQL_USE=	QT4=sql-mysql_run
-PGSQL_USE=	QT4=sql-pgsql_run
+SQLITE_USES=	qt:4
+SQLITE_USE=	QT=sql-sqlite3_run
+MYSQL_USES=	qt:4
+MYSQL_USE=	QT=sql-mysql_run
+PGSQL_USES=	qt:4
+PGSQL_USE=	QT=sql-pgsql_run
 
 post-configure:
 	@${REINPLACE_CMD} -e 's|$$(QMAKE4)|& ${QMAKE_AGRS}|' \
diff --git sysutils/qsudo/Makefile sysutils/qsudo/Makefile
index 788f6d3ffc5a..904a82b0a7e2 100644
--- sysutils/qsudo/Makefile
+++ sysutils/qsudo/Makefile
@@ -12,11 +12,11 @@ LICENSE_FILE=	${WRKSRC}/../LICENSE
 
 RUN_DEPENDS=	sudo:security/sudo
 
-USES=		qmake
+USES=		qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
 GH_TAGNAME=	815e31c
-USE_QT5=	core gui widgets buildtools_build
+USE_QT=		core gui widgets buildtools_build
 
 WRKSRC_SUBDIR=	src-qt5
 LDFLAGS+=	-Wl,--as-needed  # prevents unnecessary USE_GL=gl, see bug#224488
diff --git sysutils/qsynergy/Makefile sysutils/qsynergy/Makefile
index 0d2c905d1c5c..35b6ade140cd 100644
--- sysutils/qsynergy/Makefile
+++ sysutils/qsynergy/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Comprehensive and easy to use graphical front end for Synergy
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake
-USE_QT4=	moc_build rcc_build uic_build corelib gui network
+USES=		qmake qt:4
+USE_QT=		moc_build rcc_build uic_build corelib gui network
 
 PLIST_FILES=	bin/qsynergy \
 		share/pixmaps/qsynergy.xpm
diff --git sysutils/qt5-qtdiag/Makefile sysutils/qt5-qtdiag/Makefile
index a43ed488648c..1ec39c7af8fb 100644
--- sysutils/qt5-qtdiag/Makefile
+++ sysutils/qt5-qtdiag/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Tool for reporting diagnostic information about Qt and its environment
 
-USES=		qmake:outsource
-USE_QT5=	core gui
-QT_DIST=	tools
+USES=		qmake:outsource qt-dist:5,tools
+USE_QT=		core gui
 
 PLIST_FILES=	${QT_BINDIR}/qtdiag
 
diff --git sysutils/qt5-qtpaths/Makefile sysutils/qt5-qtpaths/Makefile
index 8f2c3cac3f5e..ae7d35bd8176 100644
--- sysutils/qt5-qtpaths/Makefile
+++ sysutils/qt5-qtpaths/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Command line client to QStandardPaths
 
-USES=		qmake:outsource
-USE_QT5=	core
-QT_DIST=	tools
+USES=		qmake:outsource qt-dist:5,tools
+USE_QT=		core
 
 PLIST_FILES=	${QT_BINDIR}/qtpaths
 
diff --git sysutils/qt5-qtplugininfo/Makefile sysutils/qt5-qtplugininfo/Makefile
index fc0dece6c193..a831e365d269 100644
--- sysutils/qt5-qtplugininfo/Makefile
+++ sysutils/qt5-qtplugininfo/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt5 plugin metadata dumper
 
-USES=		qmake:outsource
-USE_QT5=	core
-QT_DIST=	tools
+USES=		qmake:outsource qt-dist:5,tools
+USE_QT=		core
 
 PLIST_FILES=	${QT_BINDIR}/qtplugininfo
 
diff --git sysutils/qtpass/Makefile sysutils/qtpass/Makefile
index ccb67c3e045e..e5d0cbd9a0d9 100644
--- sysutils/qtpass/Makefile
+++ sysutils/qtpass/Makefile
@@ -13,11 +13,11 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 RUN_DEPENDS=	pass:sysutils/password-store
 
-USES=		qmake:outsource
+USES=		qmake:outsource qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	IJhack
 GH_PROJECT=	QtPass
-USE_QT5=	core gui network testlib widgets buildtools_build linguisttools_build
+USE_QT=		core gui network testlib widgets buildtools_build linguisttools_build
 USE_GL=		gl
 
 PLIST_FILES=	bin/qtpass \
diff --git sysutils/qzeitgeist/Makefile sysutils/qzeitgeist/Makefile
index 5e5fa375b92e..9210a444164a 100644
--- sysutils/qzeitgeist/Makefile
+++ sysutils/qzeitgeist/Makefile
@@ -20,9 +20,9 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 BUILD_DEPENDS=	rapper:textproc/raptor2 \
 		${PYTHON_PKGNAMEPREFIX}rdflib>=0:textproc/py-rdflib@${PY_FLAVOR}
 
-USES=		cmake kde:4 python:2.7,build tar:bzip2
+USES=		cmake kde:4 python:2.7,build qt:4 tar:bzip2
 USE_KDE=	automoc4
-USE_QT4=	corelib dbus declarative qtestlib \
+USE_QT=		corelib dbus declarative qtestlib \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git sysutils/searchmonkey/Makefile sysutils/searchmonkey/Makefile
index 03280e297f96..84f2eaa6b37f 100644
--- sysutils/searchmonkey/Makefile
+++ sysutils/searchmonkey/Makefile
@@ -13,9 +13,9 @@ COMMENT=	Search using regexes for file names and text
 
 LICENSE=	GPLv3+
 
-USES=		qmake dos2unix zip
+USES=		qmake dos2unix qt:4 zip
 DOS2UNIX_GLOB=	*.cpp *.h
-USE_QT4=	corelib gui moc_build rcc_build uic_build
+USE_QT=		corelib gui moc_build rcc_build uic_build
 
 PLIST_FILES=	bin/${PORTNAME}
 
diff --git sysutils/signon-kwallet-extension/Makefile sysutils/signon-kwallet-extension/Makefile
index d8b933f928d5..76c5a7dc3c36 100644
--- sysutils/signon-kwallet-extension/Makefile
+++ sysutils/signon-kwallet-extension/Makefile
@@ -9,9 +9,9 @@ COMMENT=	KWallet integration for signon framework
 
 LIB_DEPENDS=	libsignon-qt5.so:sysutils/signon-qt5
 
-USES=		cmake:outsource kde:5 pkgconfig tar:xz
+USES=		cmake:outsource kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	ecm wallet
-USE_QT5=	core dbus gui \
+USE_QT=		core dbus gui \
 		buildtools_build qmake_build
 USE_LDCONFIG=	${KDE_PREFIX}/${SE_DIR}
 PLIST_FILES=	${SE_DIR}/libkeyring-kwallet.so
diff --git sysutils/signon-plugin-oauth2/Makefile sysutils/signon-plugin-oauth2/Makefile
index 0169b3617c10..b15ff867fb62 100644
--- sysutils/signon-plugin-oauth2/Makefile
+++ sysutils/signon-plugin-oauth2/Makefile
@@ -11,8 +11,8 @@ COMMENT=	Signon OAuth 1.0 and 2.0 plugin for accounts-sso
 
 LIB_DEPENDS=	libsignon-qt5.so:sysutils/signon-qt5
 
-USES=		pkgconfig python qmake
-USE_QT5=	core network testlib \
+USES=		pkgconfig python qmake qt:5
+USE_QT=		core network testlib \
 		buildtools_build qmake_build
 USE_LDCONFIG=	${PREFIX}/lib/signon
 
diff --git sysutils/signon-qt5/Makefile sysutils/signon-qt5/Makefile
index 3cb4843e3fc2..1a979e70610a 100644
--- sysutils/signon-qt5/Makefile
+++ sysutils/signon-qt5/Makefile
@@ -12,8 +12,8 @@ COMMENT=	D-Bus service performing user authentication
 LICENSE=	LGPL20
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		gettext pathfix pkgconfig python qmake tar:bz2
-USE_QT5=	core dbus gui network sql testlib xml \
+USES=		gettext pathfix pkgconfig python qmake qt:5 tar:bz2
+USE_QT=		core dbus gui network sql testlib xml \
 		buildtools_build qmake_build
 
 # gitlab variables
diff --git sysutils/signon-ui/Makefile sysutils/signon-ui/Makefile
index 9f9b1f511b46..d2cc967192b7 100644
--- sysutils/signon-ui/Makefile
+++ sysutils/signon-ui/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libaccounts-qt5.so:net-im/libaccounts-qt5 \
 		libsignon-qt5.so:sysutils/signon-qt5 \
 		libproxy.so:net/libproxy
 
-USES=		pkgconfig python qmake tar:bz2
-USE_QT5=	buildtools_build qmake_build webkit widgets
+USES=		pkgconfig python qmake qt:5 tar:bz2
+USE_QT=		buildtools_build qmake_build webkit widgets
 
 # gitlab variables
 USE_GITLAB=	yes
diff --git sysutils/sweeper-kde4/Makefile sysutils/sweeper-kde4/Makefile
index 7001f9f23f4e..82357fbbe6ad 100644
--- sysutils/sweeper-kde4/Makefile
+++ sysutils/sweeper-kde4/Makefile
@@ -9,8 +9,8 @@ CATEGORIES=	sysutils kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Cleans temporal files for KDE
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git sysutils/sweeper/Makefile sysutils/sweeper/Makefile
index c8fee7c9b3bf..7b0b7d83550a 100644
--- sysutils/sweeper/Makefile
+++ sysutils/sweeper/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	sysutils kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Cleans temporal files for KDE
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	activities-stats auth bookmarks codecs config configwidgets \
 		coreaddons crash i18n kio service sonnet textwidgets \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui widgets xml \
+USE_QT=		core dbus gui widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git sysutils/sysadm-client/Makefile sysutils/sysadm-client/Makefile
index c1810dc8a1b5..ccba37819a26 100644
--- sysutils/sysadm-client/Makefile
+++ sysutils/sysadm-client/Makefile
@@ -13,8 +13,8 @@ LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/../LICENSE
 
 WRKSRC_SUBDIR=	src-qt5
-USE_QT5=	core buildtools_build gui network qmake websockets widgets svg concurrent
-USES=		pkgconfig tar:xz qmake ssl
+USE_QT=		core buildtools_build gui network qmake websockets widgets svg concurrent
+USES=		pkgconfig qt:5 tar:xz qmake ssl
 USE_GL+=	gl
 MAKE_ARGS=	PREFIX=${STAGEDIR}${PREFIX}
 
diff --git sysutils/sysadm/Makefile sysutils/sysadm/Makefile
index b7fa13aef79d..7965737e9444 100644
--- sysutils/sysadm/Makefile
+++ sysutils/sysadm/Makefile
@@ -13,8 +13,8 @@ LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/../LICENSE
 
 WRKSRC_SUBDIR=	src
-USE_QT5=	concurrent core network buildtools qmake gui websockets sql
-USES=		pkgconfig tar:xz qmake ssl
+USE_QT=		concurrent core network buildtools qmake gui websockets sql
+USES=		pkgconfig qt:5 tar:xz qmake ssl
 MAKE_ARGS=	PREFIX=${STAGEDIR}${PREFIX}
 
 USE_GITHUB=	yes
diff --git sysutils/tarsnap-gui/Makefile sysutils/tarsnap-gui/Makefile
index b582962c5b2f..e07b6f67ebe3 100644
--- sysutils/tarsnap-gui/Makefile
+++ sysutils/tarsnap-gui/Makefile
@@ -11,8 +11,8 @@ COMMENT=	Cross platform GUI for the Tarsnap command line client
 USE_GITHUB=	yes
 GH_ACCOUNT=	Tarsnap
 
-USES=		compiler:c++11-lib qmake
-USE_QT5=	buildtools_build core gui network qmake_build sql sql-sqlite3 widgets
+USES=		compiler:c++11-lib qmake qt:5
+USE_QT=		buildtools_build core gui network qmake_build sql sql-sqlite3 widgets
 USE_GL=		gl
 
 PLIST_FILES=	bin/tarsnap-gui
diff --git sysutils/trueos-libqt5/Makefile sysutils/trueos-libqt5/Makefile
index 38e01663fc00..b8b74277e9cf 100644
--- sysutils/trueos-libqt5/Makefile
+++ sysutils/trueos-libqt5/Makefile
@@ -16,9 +16,9 @@ MAKE_ARGS=	PREFIX=${STAGEDIR}${PREFIX}
 
 MAKE_JOBS_UNSAFE=	yes
 
-USES=		qmake shebangfix tar:xz
+USES=		qmake qt:5 shebangfix tar:xz
 USE_LDCONFIG=	yes
-USE_QT5=	core gui network svg linguist \
+USE_QT=		core gui network svg linguist \
 		buildtools x11extras widgets
 USE_GL+=	gl
 
diff --git sysutils/twmn/Makefile sysutils/twmn/Makefile
index d69537a7a88b..6806092f4b8d 100644
--- sysutils/twmn/Makefile
+++ sysutils/twmn/Makefile
@@ -13,11 +13,11 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 LIB_DEPENDS=	libboost_system.so:devel/boost-libs
 
-USES=		qmake
+USES=		qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	sboli
 GH_TAGNAME=	5b92ac5
-USE_QT5=	core dbus gui network widgets x11extras buildtools_build
+USE_QT=		core dbus gui network widgets x11extras buildtools_build
 LDFLAGS+=	-Wl,--as-needed  # see bug#224488
 
 PORTDOCS=	README.md
diff --git sysutils/unetbootin/Makefile sysutils/unetbootin/Makefile
index fb5b6d34b047..fcb79aa1ebe6 100644
--- sysutils/unetbootin/Makefile
+++ sysutils/unetbootin/Makefile
@@ -16,7 +16,8 @@ RUN_DEPENDS=	7z:archivers/p7zip \
 		syslinux:sysutils/syslinux \
 		mke2fs:sysutils/e2fsprogs
 
-USE_QT4=	linguisttools_build moc_build qmake_build uic_build \
+USES=	qt:4
+USE_QT=		linguisttools_build moc_build qmake_build uic_build \
 		corelib gui network
 QMAKE_ARGS=	DEFINES+=LOCALBASE=\\\\\\\"${LOCALBASE}\\\\\\\"
 
diff --git textproc/beediff/Makefile textproc/beediff/Makefile
index 6dc051a19e9f..d5f370aa9bdf 100644
--- textproc/beediff/Makefile
+++ textproc/beediff/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Qt 4 based diff frontend
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/licence.txt
 
-USES=		qmake
-USE_QT4=	corelib gui moc_build rcc_build
+USES=		qmake qt:4
+USE_QT=		corelib gui moc_build rcc_build
 USE_XORG=	x11 xext
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
diff --git textproc/dikt/Makefile textproc/dikt/Makefile
index 2aa8fe9a5557..7f6bfcee07a8 100644
--- textproc/dikt/Makefile
+++ textproc/dikt/Makefile
@@ -13,10 +13,10 @@ COMMENT=	Dictionary for KDE
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		cmake:outsource kde:5 tar:txz
+USES=		cmake:outsource kde:5 qt:5 tar:txz
 USE_KDE=	auth bookmarks codecs completion config configwidgets coreaddons dbusaddons guiaddons i18n \
 		iconthemes itemviews jobwidgets kio service solid widgetsaddons xmlgui
-USE_QT5=	concurrent core dbus gui network printsupport svg widgets xml \
+USE_QT=		concurrent core dbus gui network printsupport svg widgets xml \
 		buildtools_build qmake_build
 
 PLIST_FILES=	bin/dikt \
diff --git textproc/dixit/Makefile textproc/dixit/Makefile
index 36d34092781c..8d2639fb8a08 100644
--- textproc/dixit/Makefile
+++ textproc/dixit/Makefile
@@ -19,8 +19,8 @@ COMMENT=	Romanian dictionaries databases and query application
 
 LICENSE=	GPLv3+
 
-USES=		qmake
-USE_QT4=	corelib gui network moc_build rcc_build
+USES=		qmake qt:4
+USE_QT=		corelib gui network moc_build rcc_build
 LDFLAGS+=	-lz
 
 PLIST_SUB=	_DB=${_DB} DB_DIR=${DB_DIR} _DB_F=${_DB_F} \
diff --git textproc/fcitx-qt5/Makefile textproc/fcitx-qt5/Makefile
index 79b878d69afb..61a6b677af7d 100644
--- textproc/fcitx-qt5/Makefile
+++ textproc/fcitx-qt5/Makefile
@@ -13,11 +13,11 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 LIB_DEPENDS=	libfcitx-config.so:chinese/fcitx \
 		libxkbcommon.so:x11/libxkbcommon
 
-USES=		compiler:c++11-lib cmake:outsource gettext kde:5 pkgconfig
+USES=		compiler:c++11-lib cmake:outsource gettext kde:5 pkgconfig qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	fcitx
 USE_KDE=	ecm
-USE_QT5=	concurrent core dbus gui widgets buildtools_build qmake_build
+USE_QT=		concurrent core dbus gui widgets buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git textproc/goldendict/Makefile textproc/goldendict/Makefile
index 933e13a6cfe2..86ad3e391cb5 100644
--- textproc/goldendict/Makefile
+++ textproc/goldendict/Makefile
@@ -17,10 +17,10 @@ LIB_DEPENDS=	libhunspell-1.6.so:textproc/hunspell \
 		libvorbis.so:audio/libvorbis
 
 NO_WRKSUBDIR=	yes
-USES=		compiler:c++11-lang dos2unix iconv:wchar_t pkgconfig qmake tar:bzip2
+USES=		compiler:c++11-lang dos2unix iconv:wchar_t pkgconfig qmake qt:4 tar:bzip2
 DOS2UNIX_FILES=	processwrapper.cc
 USE_XORG=	xtst
-USE_QT4=	corelib gui webkit phonon \
+USE_QT=		corelib gui webkit phonon \
 		linguist_build moc_build rcc_build script_build uic_build
 LDFLAGS+=	-L${LOCALBASE}/lib ${ICONV_LIB}
 INSTALLS_ICONS=	yes
diff --git textproc/ibus-qt/Makefile textproc/ibus-qt/Makefile
index ff21813d036a..ffa09d649d19 100644
--- textproc/ibus-qt/Makefile
+++ textproc/ibus-qt/Makefile
@@ -21,8 +21,8 @@ LIB_DEPENDS=	libdbus-1.so:devel/dbus \
 
 GH_ACCOUNT=	ibus
 
-USE_QT4=	gui dbus moc_build qmake_build moc_build uic_build rcc_build
-USES=		cmake compiler:c++11-lib pkgconfig
+USE_QT=		gui dbus moc_build qmake_build moc_build uic_build rcc_build
+USES=		cmake compiler:c++11-lib pkgconfig qt:4
 CMAKE_ARGS=	-DDOCDIR=${PREFIX}/share/doc/ibus-qt -DLIBDIR=lib
 USE_LDCONFIG=	yes
 CFLAGS+=	-I${LOCALBASE}/include
diff --git textproc/kdiff3/Makefile textproc/kdiff3/Makefile
index f80b39e81175..514592070163 100644
--- textproc/kdiff3/Makefile
+++ textproc/kdiff3/Makefile
@@ -13,9 +13,9 @@ COMMENT=	KDE4 graphical frontend for diff
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake:outsource kde:4
+USES=		cmake:outsource kde:4 qt:4
 USE_KDE=	kdelibs libkonq automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 OPTIONS_DEFINE=	NLS DOCS
 
diff --git textproc/kf5-kcodecs/Makefile textproc/kf5-kcodecs/Makefile
index 13d010efc1bc..3175908112be 100644
--- textproc/kf5-kcodecs/Makefile
+++ textproc/kf5-kcodecs/Makefile
@@ -10,8 +10,8 @@ COMMENT=	KF5 library for string manipulation
 LICENSE=	LGPL21
 LICENSE_FILE=	${WRKSRC}/COPYING.LIB
 
-USES=		cmake:outsource compiler:c++11-lib gperf kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gperf kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core linguisttools qmake_build
+USE_QT=		buildtools_build core linguisttools qmake_build
 
 .include <bsd.port.mk>
diff --git textproc/kf5-sonnet/Makefile textproc/kf5-sonnet/Makefile
index 835c47356d07..e2de4f978887 100644
--- textproc/kf5-sonnet/Makefile
+++ textproc/kf5-sonnet/Makefile
@@ -10,9 +10,9 @@ COMMENT=	KF5 plugin-based spell checking library
 LIB_DEPENDS=	libaspell.so:textproc/aspell \
 		libhunspell-1.6.so:textproc/hunspell
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core gui linguisttools qmake_build \
+USE_QT=		buildtools_build core gui linguisttools qmake_build \
 		testlib widgets
 
 .include <bsd.port.mk>
diff --git textproc/kf5-syntax-highlighting/Makefile textproc/kf5-syntax-highlighting/Makefile
index ccbd620957bb..c956f43e3d6c 100644
--- textproc/kf5-syntax-highlighting/Makefile
+++ textproc/kf5-syntax-highlighting/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	textproc kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 syntax highlighting engine for structured text and code
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 perl5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 perl5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core gui linguisttools_build \
+USE_QT=		buildtools_build core gui linguisttools_build \
 		network testlib qmake_build
 
 .include <bsd.port.mk>
diff --git textproc/kompare-kde4/Makefile textproc/kompare-kde4/Makefile
index eba70f8aeed8..e60ddba4a1d2 100644
--- textproc/kompare-kde4/Makefile
+++ textproc/kompare-kde4/Makefile
@@ -10,8 +10,8 @@ COMMENT=	Diff/Patch Frontend
 
 LIB_DEPENDS=	libkomparediff2.so:textproc/libkomparediff2-kde4
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git textproc/kompare/Makefile textproc/kompare/Makefile
index 04ce4c345fac..41d75dbbd9e9 100644
--- textproc/kompare/Makefile
+++ textproc/kompare/Makefile
@@ -9,11 +9,11 @@ COMMENT=	Diff/Patch Frontend
 
 LIB_DEPENDS=	libkomparediff2.so:textproc/libkomparediff2
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		doctools ecm i18n iconthemes jobwidgets kio parts service \
 		sonnet texteditor textwidgets widgetsaddons xmlgui
-USE_QT5=	core dbus gui network printsupport widgets xml \
+USE_QT=		core dbus gui network printsupport widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git textproc/kreport/Makefile textproc/kreport/Makefile
index d0e06e174ebc..72a3361c1750 100644
--- textproc/kreport/Makefile
+++ textproc/kreport/Makefile
@@ -11,9 +11,9 @@ COMMENT=		Framework for creation of reports in multiple formats
 
 LIB_DEPENDS=		libKPropertyCore3.so:x11-toolkits/kproperty
 
-USES=			cmake:outsource gettext kde:5 python:2.7 tar:xz
+USES=			cmake:outsource gettext kde:5 python:2.7 qt:5 tar:xz
 USE_KDE=		config coreaddons ecm marble widgetsaddons
-USE_QT5=		core gui network qml webkit widgets xml \
+USE_QT=			core gui network qml webkit widgets xml \
 			buildtools_build printsupport qmake_build
 
 CONFLICTS_INSTALL=	calligra-2*
diff --git textproc/libkomparediff2-kde4/Makefile textproc/libkomparediff2-kde4/Makefile
index b7c378f30227..e9fc0b09803b 100644
--- textproc/libkomparediff2-kde4/Makefile
+++ textproc/libkomparediff2-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	textproc kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Library to compare files and strings
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qmake_build moc_build uic_build rcc_build
+USE_QT=		qmake_build moc_build uic_build rcc_build
 USE_LDCONFIG=	yes
 
 .include <bsd.port.mk>
diff --git textproc/libkomparediff2/Makefile textproc/libkomparediff2/Makefile
index 9e0f477a06ee..9a857ea53e6c 100644
--- textproc/libkomparediff2/Makefile
+++ textproc/libkomparediff2/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	textproc kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Library to compare files and strings
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons ecm i18n kio parts \
 		service widgetsaddons xmlgui
-USE_QT5=	core dbus gui widgets xml \
+USE_QT=		core dbus gui widgets xml \
 		buildtools_build qmake_build
 USE_LDCONFIG=	yes
 
diff --git textproc/py-qt4-xml/Makefile textproc/py-qt4-xml/Makefile
index 9d249d78fb3e..67ec6dc20ca3 100644
--- textproc/py-qt4-xml/Makefile
+++ textproc/py-qt4-xml/Makefile
@@ -12,10 +12,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtXml module
 CONFIGURE_ARGS=	--enable QtXml
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib xml moc_build qmake_build
+USE_QT=		corelib xml moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git textproc/py-qt4-xmlpatterns/Makefile textproc/py-qt4-xmlpatterns/Makefile
index 45d54b532b23..d389f1e87521 100644
--- textproc/py-qt4-xmlpatterns/Makefile
+++ textproc/py-qt4-xmlpatterns/Makefile
@@ -11,10 +11,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtXmlPatterns module
 CONFIGURE_ARGS=	--enable QtXmlPatterns
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run network_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib network xmlpatterns moc_build qmake_build
+USE_QT=		corelib network xmlpatterns moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git textproc/py-qt5-xml/Makefile textproc/py-qt5-xml/Makefile
index 28846ff3e1d1..691bb01ec3bf 100644
--- textproc/py-qt5-xml/Makefile
+++ textproc/py-qt5-xml/Makefile
@@ -10,10 +10,10 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtXml module
 CONFIGURE_ARGS=	--enable QtXml
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_PYQT=	sip_build core_run
 USE_PYTHON=	flavors py3kplist
-USE_QT5=	core xml buildtools_build qmake_build
+USE_QT=		core xml buildtools_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git textproc/py-qt5-xmlpatterns/Makefile textproc/py-qt5-xmlpatterns/Makefile
index 1c6a45ed0ae8..1b6974ed770d 100644
--- textproc/py-qt5-xmlpatterns/Makefile
+++ textproc/py-qt5-xmlpatterns/Makefile
@@ -10,10 +10,10 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtXmlPatterns module
 CONFIGURE_ARGS=	--enable QtXmlPatterns
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_PYQT=	sip_build core_run network_run
 USE_PYTHON=	flavors
-USE_QT5=	core network xmlpatterns qmake_build
+USE_QT=		core network xmlpatterns qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git textproc/qstardict/Makefile textproc/qstardict/Makefile
index c85abe1b4f58..f857995a3d7b 100644
--- textproc/qstardict/Makefile
+++ textproc/qstardict/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Qt 4 based dictionary program (stardict clone)
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		dos2unix pkgconfig qmake tar:bzip2
-USE_QT4=	corelib gui network xml uic_build moc_build rcc_build
+USES=		dos2unix pkgconfig qmake qt:4 tar:bzip2
+USE_QT=		corelib gui network xml uic_build moc_build rcc_build
 USE_GNOME=	glib20
 USE_XORG=	x11
 DOS2UNIX_FILES=	qstardict.pri
@@ -26,7 +26,8 @@ OPTIONS_DEFINE=	DBUS DOCS NLS
 OPTIONS_DEFAULT=DBUS
 OPTIONS_SUB=	yes
 
-DBUS_USE=	QT4=dbus
+DBUS_USES=	qt:4
+DBUS_USE=	QT=dbus
 DBUS_QMAKE_OFF=	NO_DBUS=1
 
 NLS_QMAKE_OFF=	NO_TRANSLATIONS=1
diff --git textproc/qt4-clucene/Makefile textproc/qt4-clucene/Makefile
index 97c429e08e92..92bd19c0c6a1 100644
--- textproc/qt4-clucene/Makefile
+++ textproc/qt4-clucene/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt bindings for the CLucene full-text search library
 
-USE_QT4=	qmake_build corelib
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		corelib
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git textproc/qt4-xml/Makefile textproc/qt4-xml/Makefile
index 0b349c0730fb..78c11613a7d7 100644
--- textproc/qt4-xml/Makefile
+++ textproc/qt4-xml/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt SAX and DOM implementations
 
-USE_QT4=	qmake_build moc_build corelib
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build corelib
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git textproc/qt4-xmlpatterns-tool/Makefile textproc/qt4-xmlpatterns-tool/Makefile
index a311ccf1264b..e77f3e6feb26 100644
--- textproc/qt4-xmlpatterns-tool/Makefile
+++ textproc/qt4-xmlpatterns-tool/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt command-line utility for running XQueries
 
-USE_QT4=	qmake_build xmlpatterns
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		xmlpatterns
 
 HAS_CONFIGURE=	yes
 
diff --git textproc/qt4-xmlpatterns/Makefile textproc/qt4-xmlpatterns/Makefile
index c284a731f3ff..3605df729c5d 100644
--- textproc/qt4-xmlpatterns/Makefile
+++ textproc/qt4-xmlpatterns/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt support for XPath, XQuery, XSLT and XML Schema
 
-USE_QT4=	qmake_build moc_build rcc_build corelib network
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build corelib network
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git textproc/qt5-xml/Makefile textproc/qt5-xml/Makefile
index d4c33bdcb21a..0233af18d7d3 100644
--- textproc/qt5-xml/Makefile
+++ textproc/qt5-xml/Makefile
@@ -8,8 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt SAX and DOM implementations
 
-USE_QT5=	core qmake_build buildtools_build
-QT_DIST=	base
+USES=		qmake:no_env qt-dist:5,base
+USE_QT=		core qmake_build buildtools_build
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	-no-gui -no-xcb
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git textproc/qt5-xmlpatterns/Makefile textproc/qt5-xmlpatterns/Makefile
index a28f70b7e3fb..23d2aad9e3e6 100644
--- textproc/qt5-xmlpatterns/Makefile
+++ textproc/qt5-xmlpatterns/Makefile
@@ -10,9 +10,8 @@ COMMENT=	Qt support for XPath, XQuery, XSLT and XML Schema
 
 BROKEN_powerpc64=	Does not build
 
-USE_QT5=	core network buildtools_build
-QT_DIST=	${PORTNAME}
-USES=		qmake:norecursive
+USE_QT=		core network buildtools_build
+USES=		qmake:norecursive qt-dist:5,xmlpatterns
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 .include <bsd.port.mk>
diff --git textproc/scim-bridge-qt4/Makefile textproc/scim-bridge-qt4/Makefile
index 785bd4e4879e..6fbb61e7d2ba 100644
--- textproc/scim-bridge-qt4/Makefile
+++ textproc/scim-bridge-qt4/Makefile
@@ -18,9 +18,8 @@ LICENSE_FILE_LGPL21=	${WRKSRC}/doc/LICENSE.LGPL
 
 RUN_DEPENDS=	scim-bridge:textproc/scim-bridge
 
-USE_QT4=	corelib gui moc_build
-QT_NONSTANDARD=	yes
-USES=		gettext gmake libtool pkgconfig
+USE_QT=		corelib gui moc_build
+USES=		gettext gmake libtool pkgconfig qmake:no_env qt:4
 GNU_CONFIGURE=	yes
 
 CPPFLAGS+=	-I${LOCALBASE}/include -D__STDC_ISO_10646__
diff --git textproc/sigil/Makefile textproc/sigil/Makefile
index 41c983eaec08..856b4835c79a 100644
--- textproc/sigil/Makefile
+++ textproc/sigil/Makefile
@@ -20,10 +20,10 @@ GH_ACCOUNT=	Sigil-Ebook
 GH_PROJECT=	Sigil
 
 USES=		cmake:outsource compiler:c++11-lib desktop-file-utils \
-		pkgconfig python:3.4+ shebangfix
+		pkgconfig python:3.4+ qt:5 shebangfix
 SHEBANG_FILES=	src/Resource_Files/plugin_launchers/python/*.py \
 		src/Resource_Files/python3lib/*.py
-USE_QT5=	concurrent core gui network printsupport svg webkit \
+USE_QT=		concurrent core gui network printsupport svg webkit \
 		widgets xml xmlpatterns \
 		buildtools_build linguisttools_build qmake_build \
 		imageformats_run
diff --git textproc/soprano/Makefile textproc/soprano/Makefile
index db10888027fc..7010ee2649bd 100644
--- textproc/soprano/Makefile
+++ textproc/soprano/Makefile
@@ -14,9 +14,9 @@ LIB_DEPENDS=	libraptor2.so:textproc/raptor2 \
 		librdf.so:textproc/redland \
 		libiodbc.so:databases/libiodbc
 
-USE_QT4=	corelib dbus network qtestlib_build xml \
+USE_QT=		corelib dbus network qtestlib_build xml \
 		qmake_build moc_build uic_build rcc_build
-USES=		cmake:outsource pkgconfig tar:bzip2
+USES=		cmake:outsource pkgconfig qt:4 tar:bzip2
 CMAKE_ARGS+=	-DSOPRANO_DISABLE_CLUCENE_INDEX=yes \
 		-DSOPRANO_DISABLE_SESAME2_BACKEND=yes
 USE_LDCONFIG=	yes
diff --git textproc/uim-kde4/Makefile textproc/uim-kde4/Makefile
index ef051ca7d176..891418393b3c 100644
--- textproc/uim-kde4/Makefile
+++ textproc/uim-kde4/Makefile
@@ -12,8 +12,8 @@ RUN_DEPENDS=	uim-pref-qt4:textproc/uim-qt4
 
 USE_GCC=	any
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qmake_build moc_build qt3support uic rcc
-USES+=		kde:4
+USE_QT=		qmake_build moc_build qt3support uic rcc
+USES+=		kde:4 qt:4
 
 MASTERDIR=	${.CURDIR}/../../textproc/uim
 PKGDIR=		${.CURDIR}
diff --git textproc/uim-qt4/Makefile textproc/uim-qt4/Makefile
index b972163c8790..0a8cb546d0e8 100644
--- textproc/uim-qt4/Makefile
+++ textproc/uim-qt4/Makefile
@@ -7,8 +7,8 @@ COMMENT=	Qt4 modules of uim input method
 
 LIB_DEPENDS=	libuim.so:textproc/uim
 
-USE_QT4=	qmake_build moc_build qt3support uic
-USES=		iconv libtool
+USE_QT=		qmake_build moc_build qt3support uic
+USES=		iconv libtool qt:4
 
 MASTERDIR=	${.CURDIR}/../../textproc/uim
 PKGDIR=		${.CURDIR}
diff --git textproc/xxdiff/Makefile textproc/xxdiff/Makefile
index b2dacb28a4b1..e96f73298662 100644
--- textproc/xxdiff/Makefile
+++ textproc/xxdiff/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Graphical file and directories comparator and merge tool
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		bison gmake tar:bz2
-USE_QT4=	gui moc_build qmake_build uic_build
+USES=		bison gmake qt:4 tar:bz2
+USE_QT=		gui moc_build qmake_build uic_build
 
 BUILD_WRKSRC=	${WRKSRC}/src
 
diff --git www/aria2fe/Makefile www/aria2fe/Makefile
index a33b31721072..70a0059b819a 100644
--- www/aria2fe/Makefile
+++ www/aria2fe/Makefile
@@ -15,8 +15,8 @@ LICENSE=	GPLv3+
 RUN_DEPENDS=	aria2c:www/aria2 \
 		xterm:x11/xterm
 
-USES=		tar:bzip2 qmake
-USE_QT4=	gui moc_build rcc_build uic_build
+USES=		qt:4 tar:bzip2 qmake
+USE_QT=		gui moc_build rcc_build uic_build
 
 PLIST_FILES=	bin/${PORTNAME}
 
diff --git www/bookmarkbridge/Makefile www/bookmarkbridge/Makefile
index 41452dcb973d..f504b748b1ec 100644
--- www/bookmarkbridge/Makefile
+++ www/bookmarkbridge/Makefile
@@ -13,10 +13,10 @@ COMMENT=	Synchronize bookmarks between multiple browsers
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		autoreconf gmake perl5 pkgconfig shebangfix
+USES=		autoreconf gmake perl5 pkgconfig qt:4 shebangfix
 SHEBANG_FILES=	bookmarkbridge/docs/autodocs.pl
 USE_XORG=	x11 ice xext
-USE_QT4=	corelib gui qt3support moc_build rcc_build uic_build
+USE_QT=		corelib gui qt3support moc_build rcc_build uic_build
 USE_GNOME=	libxml2
 GNU_CONFIGURE=	yes
 
diff --git www/choqok-kde4/Makefile www/choqok-kde4/Makefile
index 5d11cf37a8dd..697e42aea001 100644
--- www/choqok-kde4/Makefile
+++ www/choqok-kde4/Makefile
@@ -18,9 +18,9 @@ LIB_DEPENDS=	libqjson.so:devel/qjson@qt4 \
 		libqoauth.so:net/qoauth \
 		libtelepathy-qt4.so:net-im/telepathy-qt4
 
-USES=		cmake gettext kde:4 tar:xz
+USES=		cmake gettext kde:4 qt:4 tar:xz
 USE_KDE=	attica automoc4 kdelibs
-USE_QT4=	gui imageformats_run network \
+USE_QT=		gui imageformats_run network \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
diff --git www/choqok/Makefile www/choqok/Makefile
index 35f2c4062b05..884912f9c96a 100644
--- www/choqok/Makefile
+++ www/choqok/Makefile
@@ -17,14 +17,14 @@ LIB_DEPENDS=	libqjson-qt5.so:devel/qjson@qt5 \
 		libqoauth-qt5.so:net/qoauth-qt5 \
 		libtelepathy-qt5.so:net-im/telepathy-qt5
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	attica auth bookmarks codecs completion config configwidgets \
 		coreaddons doctools ecm emoticons globalaccel guiaddons i18n \
 		itemviews jobwidgets kcmutils kdewebkit kio notifications \
 		notifyconfig parts service solid sonnet textwidgets wallet \
 		widgetsaddons xmlgui \
 		kded_run
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build 
 
 USE_LDCONFIG=	yes
diff --git www/cutycapt/Makefile www/cutycapt/Makefile
index e0ea31cdda23..d135dff7500a 100644
--- www/cutycapt/Makefile
+++ www/cutycapt/Makefile
@@ -14,8 +14,8 @@ LICENSE=	GPLv2
 
 WRKSRC=		${WRKDIR}/CutyCapt
 
-USES=		qmake
-USE_QT4=	moc_build imageformats_run webkit
+USES=		qmake qt:4
+USE_QT=		moc_build imageformats_run webkit
 
 PLIST_FILES=	bin/CutyCapt
 
diff --git www/falkon/Makefile www/falkon/Makefile
index 8ce3ccc1be28..1e4fd1e07dae 100644
--- www/falkon/Makefile
+++ www/falkon/Makefile
@@ -12,9 +12,9 @@ COMMENT=	Web browser based on WebKit engine and Qt Framework
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake:outsource desktop-file-utils kde:5 ssl tar:xz
+USES=		cmake:outsource desktop-file-utils kde:5 qt:5 ssl tar:xz
 USE_KDE=	wallet
-USE_QT5=	core dbus gui location network printsupport qml quick \
+USE_QT=		core dbus gui location network printsupport qml quick \
 		sql webchannel webengine widgets x11extras \
 		buildtools_build qmake_build
 USE_XORG=	xcb
diff --git www/kdewebdev-kde4/Makefile www/kdewebdev-kde4/Makefile
index b6076bfa76d2..5ed877f773e7 100644
--- www/kdewebdev-kde4/Makefile
+++ www/kdewebdev-kde4/Makefile
@@ -13,10 +13,10 @@ COMMENT=	Comprehensive html/website development environment
 LIB_DEPENDS=	libtidy.so:www/tidy-lib \
 		libboost_thread.so:devel/boost-libs
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_GNOME=	libxml2 libxslt
 USE_KDE=	kdelibs pimlibs automoc4
-USE_QT4=	dbus porting_build \
+USE_QT=		dbus porting_build \
 		qmake_build moc_build rcc_build uic_build uic3_build
 USE_LDCONFIG=	yes
 
diff --git www/kf5-kdewebkit/Makefile www/kf5-kdewebkit/Makefile
index 0231062acb6b..04e75ba8f69a 100644
--- www/kf5-kdewebkit/Makefile
+++ www/kf5-kdewebkit/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	www kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 library providing integration of QtWebKit
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		ecm i18n jobwidgets kio parts service sonnet textwidgets \
 		wallet widgetsaddons xmlgui
-USE_QT5=	buildtools_build core dbus gui network qmake_build webkit \
+USE_QT=		buildtools_build core dbus gui network qmake_build webkit \
 		widgets xml
 
 .include <bsd.port.mk>
diff --git www/kf5-khtml/Makefile www/kf5-khtml/Makefile
index 7479bc985d2b..928dead9c2eb 100644
--- www/kf5-khtml/Makefile
+++ www/kf5-khtml/Makefile
@@ -12,12 +12,12 @@ LIB_DEPENDS=	libgif.so:graphics/giflib \
 		libpng.so:graphics/png
 
 USES=		cmake:outsource compiler:c++11-lib gettext gperf jpeg kde:5 \
-		tar:xz
+		qt:5 tar:xz
 USE_KDE=	archive auth bookmarks codecs completion config \
 		configwidgets coreaddons ecm globalaccel i18n iconthemes \
 		jobwidgets js kio notifications parts service sonnet \
 		textwidgets wallet widgetsaddons windowsystem xmlgui
-USE_QT5=	buildtools_build core dbus gui network phonon4 \
+USE_QT=		buildtools_build core dbus gui network phonon4 \
 		printsupport qmake_build widgets x11extras xml
 USE_XORG=	ice sm x11 xext
 
diff --git www/kf5-kjs/Makefile www/kf5-kjs/Makefile
index f46913f48ded..11245a37a3af 100644
--- www/kf5-kjs/Makefile
+++ www/kf5-kjs/Makefile
@@ -9,8 +9,8 @@ COMMENT=	KF5 library providing an ECMAScript interpreter
 
 LIB_DEPENDS=	libpcre.so:devel/pcre
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	ecm doctools
-USE_QT5=	buildtools_build core qmake_build
+USE_QT=		buildtools_build core qmake_build
 
 .include <bsd.port.mk>
diff --git www/kf5-kjsembed/Makefile www/kf5-kjsembed/Makefile
index 93a7c274fef7..58c0d278c239 100644
--- www/kf5-kjsembed/Makefile
+++ www/kf5-kjsembed/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	www kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 library for binding JavaScript objects to QObjects
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive doctools ecm i18n js
-USE_QT5=	buildtools_build core gui qmake_build svg \
+USE_QT=		buildtools_build core gui qmake_build svg \
 		uiplugin uitools widgets xml
 
 .include <bsd.port.mk>
diff --git www/kpartsplugin/Makefile www/kpartsplugin/Makefile
index ed6a7b5b1bfe..85c6c3326b2f 100644
--- www/kpartsplugin/Makefile
+++ www/kpartsplugin/Makefile
@@ -10,9 +10,9 @@ DISTNAME=	${PORTNAME}-${PORTDATE}
 MAINTAINER=	avilla@FreeBSD.org
 COMMENT=	Browser file viewer using KDE technology
 
-USES=		cmake kde:4 webplugin:native tar:bzip2
+USES=		cmake kde:4 qt:4 webplugin:native tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib gui moc_build qmake_build rcc_build uic_build
+USE_QT=		corelib gui moc_build qmake_build rcc_build uic_build
 CMAKE_ARGS=	-DNSPLUGIN_INSTALL_DIR:PATH="${WEBPLUGIN_DIR}"
 
 PORTDATE=	20120723
diff --git www/kwebkitpart/Makefile www/kwebkitpart/Makefile
index 065ce6f6919e..caec39e1b7ae 100644
--- www/kwebkitpart/Makefile
+++ www/kwebkitpart/Makefile
@@ -9,9 +9,9 @@ MASTER_SITES=	LOCAL/makc
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Web browser component for KDE SC based on QtWebKit
 
-USES=		cmake kde:4 cpe tar:xz
+USES=		cmake kde:4 cpe qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	designer gui webkit \
+USE_QT=		designer gui webkit \
 		moc_build qmake_build rcc_build uic_build
 
 CPE_VENDOR=	urs_wolfer
diff --git www/otter-browser/Makefile www/otter-browser/Makefile
index 4ce5f3ece6bb..daef35b0427a 100644
--- www/otter-browser/Makefile
+++ www/otter-browser/Makefile
@@ -13,8 +13,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libhunspell-1.6.so:textproc/hunspell
 
-USES=		cmake:outsource compiler:c++11-lib desktop-file-utils
-USE_QT5=	concurrent core dbus gui multimedia network printsupport \
+USES=		cmake:outsource compiler:c++11-lib desktop-file-utils qt:5
+USE_QT=		concurrent core dbus gui multimedia network printsupport \
 		qml script sql sql-sqlite3 svg widgets xmlpatterns \
 		buildtools_build qmake_build
 
@@ -28,10 +28,10 @@ OPTIONS_DEFAULT=	QTWEBENGINE QTWEBKIT
 QTWEBENGINE_DESC=	Build QtWebEngine backend
 QTWEBKIT_DESC=		Build QtWebKit backend
 
-QTWEBENGINE_USE=	qt5=location,quick,webchannel,webengine
+QTWEBENGINE_USE=	qt=location,quick,webchannel,webengine
 QTWEBENGINE_CMAKE_BOOL=	ENABLE_QTWEBENGINE
 
-QTWEBKIT_USE=		qt5=webkit
+QTWEBKIT_USE=		qt=webkit
 QTWEBKIT_CMAKE_BOOL=	ENABLE_QTWEBKIT
 
 .include <bsd.port.mk>
diff --git www/plasma5-plasma-browser-integration/Makefile www/plasma5-plasma-browser-integration/Makefile
index 97215c5c801e..b5d93f874aa6 100644
--- www/plasma5-plasma-browser-integration/Makefile
+++ www/plasma5-plasma-browser-integration/Makefile
@@ -8,10 +8,10 @@ PKGNAMEPREFIX=	plasma5- # this port is not yet using CATEGORIES=kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 components to integrate browsers into the desktop
 
-USES=		cmake:outsource kde:5
+USES=		cmake:outsource kde:5 qt:5
 USE_KDE=	activities config coreaddons i18n kio notifications package \
 		plasma-framework runner service windowsystem
-USE_QT5=	core dbus gui widgets \
+USE_QT=		core dbus gui widgets \
 		buildtools_build qmake_build
 USE_GITHUB=	yes
 GH_ACCOUNT=	KDE
diff --git www/py-qt4-webkit/Makefile www/py-qt4-webkit/Makefile
index e575a0925c56..7f5f6cd60ed4 100644
--- www/py-qt4-webkit/Makefile
+++ www/py-qt4-webkit/Makefile
@@ -11,10 +11,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtWebKit module
 CONFIGURE_ARGS=	--enable QtWebKit
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run gui_run network_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib gui network webkit \
+USE_QT=		corelib gui network webkit \
 		moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
diff --git www/py-qt5-webchannel/Makefile www/py-qt5-webchannel/Makefile
index 3d59df196bad..f8696ae25dec 100644
--- www/py-qt5-webchannel/Makefile
+++ www/py-qt5-webchannel/Makefile
@@ -9,10 +9,10 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtWebChannel module
 
 # LICENSE set in Mk/Uses/pyqt.mk
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_PYQT=	sip_build core_run gui_run network_run qml_run widgets_run
 USE_PYTHON=	flavors
-USE_QT5=	core qmake_build gui network qml webchannel widgets
+USE_QT=		core qmake_build gui network qml webchannel widgets
 
 CONFIGURE_ARGS=	--enable QtWebChannel \
 		--no-stubs
diff --git www/py-qt5-webengine/Makefile www/py-qt5-webengine/Makefile
index 47b784707627..2de59ae595e7 100644
--- www/py-qt5-webengine/Makefile
+++ www/py-qt5-webengine/Makefile
@@ -9,11 +9,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtWebEngine module
 
 # LICENSE set in Mk/Uses/pyqt.mk
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run gui_run network_run webchannel_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui location network printsupport qml quick webchannel \
+USE_QT=		core gui location network printsupport qml quick webchannel \
 		webengine widgets qmake_build
 
 CONFIGURE_ARGS=	--enable QtWebEngine \
diff --git www/py-qt5-webkit/Makefile www/py-qt5-webkit/Makefile
index 828359116205..0bd7e9aefd18 100644
--- www/py-qt5-webkit/Makefile
+++ www/py-qt5-webkit/Makefile
@@ -12,11 +12,11 @@ BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sip>=${SIP_VERSION}:devel/py-sip@${PY_FLAV
 CONFIGURE_ARGS=	--enable QtWebKit
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run gui_run network_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui network webkit qmake_build
+USE_QT=		core gui network webkit qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git www/py-qt5-webkitwidgets/Makefile www/py-qt5-webkitwidgets/Makefile
index b40c0beda6d0..cb3c733e9868 100644
--- www/py-qt5-webkitwidgets/Makefile
+++ www/py-qt5-webkitwidgets/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtWebKitWidgets module
 CONFIGURE_ARGS=	--enable QtWebKitWidgets
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run printsupport_run webkit_run widgets_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui network printsupport webkit widgets \
+USE_QT=		core gui network printsupport webkit widgets \
 		qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
diff --git www/qt4-webkit/Makefile www/qt4-webkit/Makefile
index 169ce74976ad..9f4d929e0f77 100644
--- www/qt4-webkit/Makefile
+++ www/qt4-webkit/Makefile
@@ -10,11 +10,10 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt WebKit implementation
 
-USE_QT4=	corelib declarative gui network \
-		qmake_build moc_build rcc_build
-QT_DIST=	yes
+USE_QT=		corelib declarative gui network \
+		moc_build rcc_build
 USE_XORG=	xrender
-USES=		pkgconfig
+USES=		pkgconfig qmake:no_env qt-dist:4
 USE_CXXSTD=	gnu++98
 
 HAS_CONFIGURE=	yes
diff --git www/qt5-webchannel/Makefile www/qt5-webchannel/Makefile
index 3329f92f1f83..d37730636703 100644
--- www/qt5-webchannel/Makefile
+++ www/qt5-webchannel/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 5 library for integration of C++/QML with HTML/js clients
 
-USE_QT5=	buildtools_build core qml quick
-QT_DIST=	${PORTNAME}
-USES=		qmake:norecursive
+USE_QT=		buildtools_build core qml quick
+USES=		qmake:norecursive qt-dist:5,webchannel
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 # The default EXTRACT_AFTER_ARGS value excludes examples/ from the extracted
diff --git www/qt5-webengine/Makefile www/qt5-webengine/Makefile
index 150b4e453531..ac82bb0b21f2 100644
--- www/qt5-webengine/Makefile
+++ www/qt5-webengine/Makefile
@@ -66,16 +66,15 @@ PULSEAUDIO_QMAKE_ON=	QT_CONFIG+=pulseaudio
 # whether webenginewidgets is available, which fails when qmake processes all
 # .pro files at once.
 USES=		gperf jpeg python:2.7,build pkgconfig \
-		qmake:norecursive,outsource shebangfix
+		qmake:norecursive,outsource qt-dist:5,webengine shebangfix
 USE_GNOME=	glib20 libxml2 libxslt
-USE_QT5=	core designer gui location network qml quick webchannel \
+USE_QT=		core designer gui location network qml quick webchannel \
 		widgets buildtools_build qmake_build
 USE_XORG=	scrnsaverproto x11 xcb xcomposite xcursor xext xi xproto \
 		xrandr xrender xscrnsaver xtst
 
 USE_LDCONFIG=	${QT_LIBDIR}
 
-QT_DIST=	${PORTNAME}
 
 QMAKE_CONFIGURE_ARGS=	-no-printing-and-pdf -proprietary-codecs -system-ffmpeg
 
diff --git www/qt5-webkit/Makefile www/qt5-webkit/Makefile
index 0519d963450f..974f483664a4 100644
--- www/qt5-webkit/Makefile
+++ www/qt5-webkit/Makefile
@@ -20,10 +20,10 @@ LIB_DEPENDS=		libfontconfig.so:x11-fonts/fontconfig \
 			libwebp.so:graphics/webp
 
 USES=			bison cmake:outsource gperf jpeg pathfix perl5 pkgconfig \
-			python:2.7,build sqlite:3 tar:xz
+			python:2.7,build qt:5 sqlite:3 tar:xz
 USE_GNOME=		glib20 libxml2 libxslt
 USE_GSTREAMER1=		core
-USE_QT5=		core gui location network opengl printsupport \
+USE_QT=			core gui location network opengl printsupport \
 			qml quick sensors testlib webchannel widgets \
 			buildtools_build qmake_build
 USE_RUBY=		yes
diff --git www/qt5-websockets-qml/Makefile www/qt5-websockets-qml/Makefile
index 3a75f8e41811..38e23297e4dc 100644
--- www/qt5-websockets-qml/Makefile
+++ www/qt5-websockets-qml/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt implementation of WebSocket protocol (QML bindings)
 
-USE_QT5=	buildtools_build core network qml quick websockets
-QT_DIST=	websockets
-USES=		qmake
+USE_QT=		buildtools_build core network qml quick websockets
+USES=		qmake qt-dist:5,websockets
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 .include <bsd.port.mk>
diff --git www/qt5-websockets/Makefile www/qt5-websockets/Makefile
index fb1b34b696b8..f6d403d990e7 100644
--- www/qt5-websockets/Makefile
+++ www/qt5-websockets/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt implementation of WebSocket protocol
 
-USE_QT5=	buildtools_build core network
-QT_DIST=	${PORTNAME}
-USES=		qmake:norecursive
+USE_QT=		buildtools_build core network
+USES=		qmake:norecursive qt-dist:5,websockets
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 .include <bsd.port.mk>
diff --git www/qupzilla-qt4/Makefile www/qupzilla-qt4/Makefile
index c4548e4e5f38..9ccb387d4762 100644
--- www/qupzilla-qt4/Makefile
+++ www/qupzilla-qt4/Makefile
@@ -17,8 +17,8 @@ LIB_DEPENDS=	libhunspell-1.6.so:textproc/hunspell
 
 CONFLICTS_INSTALL=	${PORTNAME}-qt5*
 
-USES=		desktop-file-utils pkgconfig qmake ssl tar:xz
-USE_QT4=	corelib gui network script sql webkit xml \
+USES=		desktop-file-utils pkgconfig qmake qt:4 ssl tar:xz
+USE_QT=		corelib gui network script sql webkit xml \
 		linguisttools_build moc_build rcc_build uic_build \
 		imageformats_run sql-sqlite3_run
 USE_XORG=	x11
@@ -31,7 +31,8 @@ OPTIONS_DEFINE=	DBUS DEBUG GNOMEKEYRING KWALLET
 OPTIONS_DEFAULT=DBUS
 OPTIONS_SUB=	yes
 
-DBUS_USE=		QT4=dbus
+DBUS_USES=	qt:4
+DBUS_USE=		QT=dbus
 DBUS_CONFIGURE_ENV_OFF=	DISABLE_DBUS="true"
 
 GNOMEKEYRING_LIB_DEPENDS=	libgnome-keyring.so:security/libgnome-keyring
diff --git www/qupzilla-qt5/Makefile www/qupzilla-qt5/Makefile
index b51425a4bb54..b210ebc4bd24 100644
--- www/qupzilla-qt5/Makefile
+++ www/qupzilla-qt5/Makefile
@@ -17,8 +17,8 @@ LIB_DEPENDS=	libhunspell-1.6.so:textproc/hunspell
 
 CONFLICTS_INSTALL=	${PORTNAME}-qt4*
 
-USES=		desktop-file-utils pkgconfig qmake ssl tar:xz
-USE_QT5=	core concurrent gui network printsupport script sql webkit \
+USES=		desktop-file-utils pkgconfig qmake qt:5 ssl tar:xz
+USE_QT=		core concurrent gui network printsupport script sql webkit \
 		widgets x11extras xml imageformats_run sql-sqlite3_run \
 		buildtools_build linguisttools_build
 USE_XORG=	x11
@@ -32,7 +32,8 @@ OPTIONS_DEFINE=	DBUS DEBUG GNOMEKEYRING KWALLET
 OPTIONS_DEFAULT=DBUS
 OPTIONS_SUB=	yes
 
-DBUS_USE=		QT5=dbus
+DBUS_USES=	qt:5
+DBUS_USE=		QT=dbus
 DBUS_CONFIGURE_ENV_OFF=	DISABLE_DBUS="true"
 
 GNOMEKEYRING_LIB_DEPENDS=	libgnome-keyring.so:security/libgnome-keyring
diff --git www/qutebrowser/Makefile www/qutebrowser/Makefile
index 62531f1bcd44..99401e34b80b 100644
--- www/qutebrowser/Makefile
+++ www/qutebrowser/Makefile
@@ -22,9 +22,9 @@ RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}attrs>=0:devel/py-attrs@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}sip>=0:devel/py-sip@${PY_FLAVOR} \
 		${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins
 
-USES=		desktop-file-utils python:3.5+ pyqt:5
+USES=		desktop-file-utils python:3.5+ pyqt:5 qt:5
 USE_PYQT=	core opengl printsupport sql widgets qml
-USE_QT5=	sql-sqlite3
+USE_QT=		sql-sqlite3
 USE_PYTHON=	distutils autoplist noflavors
 
 NO_ARCH=	yes
diff --git www/rekonq/Makefile www/rekonq/Makefile
index c489916d702d..d08406a3aa68 100644
--- www/rekonq/Makefile
+++ www/rekonq/Makefile
@@ -14,9 +14,9 @@ LICENSE_COMB=	multi
 LICENSE_FILE_GPLv3+ =	${WRKSRC}/COPYING
 LICENSE_FILE_GFDL=	${WRKSRC}/COPYING.DOC
 
-USES=		cmake:outsource gettext kde:4 tar:xz
+USES=		cmake:outsource gettext kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	script webkit \
+USE_QT=		script webkit \
 		moc_build qmake_build rcc_build uic_build
 
 OPTIONS_DEFINE=		OPERA NEPOMUK
diff --git www/wt/Makefile www/wt/Makefile
index 31b418ab7b79..e95e573a9d41 100644
--- www/wt/Makefile
+++ www/wt/Makefile
@@ -178,7 +178,8 @@ USE_GNOME+=	pango
 .endif
 
 .if ${PORT_OPTIONS:MQT4}
-USE_QT4=	corelib moc_build
+USES+=		qt:4
+USE_QT=		corelib moc_build
 .endif
 
 .if ${PORT_OPTIONS:MOPENGL}
diff --git x11-clocks/amor-kde4/Makefile x11-clocks/amor-kde4/Makefile
index 8ff2e1896eed..65ac1fbfdf09 100644
--- x11-clocks/amor-kde4/Makefile
+++ x11-clocks/amor-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	x11-clocks kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Small animation which sits on top of active window
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git x11-clocks/kteatime-kde4/Makefile x11-clocks/kteatime-kde4/Makefile
index 38840c04d8e5..4b93023b8d17 100644
--- x11-clocks/kteatime-kde4/Makefile
+++ x11-clocks/kteatime-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	x11-clocks kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Handy timer for steeping tea
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git x11-clocks/kteatime/Makefile x11-clocks/kteatime/Makefile
index 5515e492429e..e3e256da63e0 100644
--- x11-clocks/kteatime/Makefile
+++ x11-clocks/kteatime/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	x11-clocks kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Handy timer for steeping tea
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash doctools ecm \
 		i18n iconthemes notifications notifyconfig sonnet textwidgets \
 		widgetsaddons xmlgui
-USE_QT5=	core dbus gui widgets xml \
+USE_QT=		core dbus gui widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git x11-clocks/ktimer-kde4/Makefile x11-clocks/ktimer-kde4/Makefile
index e870a7e1e296..75d2aefd8f1f 100644
--- x11-clocks/ktimer-kde4/Makefile
+++ x11-clocks/ktimer-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	x11-clocks kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Countdown launcher for KDE
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git x11-clocks/ktimer/Makefile x11-clocks/ktimer/Makefile
index 4876ab91baac..3e1b293bdaf7 100644
--- x11-clocks/ktimer/Makefile
+++ x11-clocks/ktimer/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	x11-clocks kde kde-applications
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Countdown launcher for KDE
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets coreaddons \
 		dbusaddons doctools ecm i18n iconthemes jobwidgets kio \
 		notifications service widgetsaddons xmlgui
-USE_QT5=	core dbus gui network widgets xml \
+USE_QT=		core dbus gui network widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git x11-clocks/ktux-kde4/Makefile x11-clocks/ktux-kde4/Makefile
index a401f7fffe7e..4fd1186de8e2 100644
--- x11-clocks/ktux-kde4/Makefile
+++ x11-clocks/ktux-kde4/Makefile
@@ -8,8 +8,8 @@ CATEGORIES=	x11-clocks kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Tux-in-a-Spaceship screen saver
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs workspace automoc4
-USE_QT4=	qt3support moc_build qmake_build rcc_build uic_build
+USE_QT=		qt3support moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git x11-clocks/plasma-applet-adjustableclock/Makefile x11-clocks/plasma-applet-adjustableclock/Makefile
index be267819bd9e..084120a40bbb 100644
--- x11-clocks/plasma-applet-adjustableclock/Makefile
+++ x11-clocks/plasma-applet-adjustableclock/Makefile
@@ -13,9 +13,9 @@ COMMENT=	KDE4 highly configurable clock plasma applet
 
 LICENSE=	GPLv2
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	automoc4 workspace
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
diff --git x11-clocks/plasma-applet-geekclock/Makefile x11-clocks/plasma-applet-geekclock/Makefile
index 7634e61cf1f1..1ff69470526e 100644
--- x11-clocks/plasma-applet-geekclock/Makefile
+++ x11-clocks/plasma-applet-geekclock/Makefile
@@ -11,9 +11,9 @@ DISTNAME=	geek-clock-plasmoid-${PORTVERSION}-src
 MAINTAINER=	jhale@FreeBSD.org
 COMMENT=	KDE4 geeky analog clock plasma applet
 
-USES=		cmake kde:4
+USES=		cmake kde:4 qt:4
 USE_KDE=	automoc4 kdelibs workspace
-USE_QT4=	gui dbus network opengl svg webkit xml \
+USE_QT=		gui dbus network opengl svg webkit xml \
 		qmake_build moc_build rcc_build uic_build
 
 PLIST_FILES=	lib/kde4/plasma_applet_geekclock.so \
diff --git x11-fm/dolphin/Makefile x11-fm/dolphin/Makefile
index 3cd12b1ad019..41f5ffc5095f 100644
--- x11-fm/dolphin/Makefile
+++ x11-fm/dolphin/Makefile
@@ -15,7 +15,7 @@ RUN_DEPENDS=	${QT_PLUGINDIR}/ffmpegthumbs.so:multimedia/kdemultimedia-ffmpegthum
 		${QT_PLUGINDIR}/gsthumbnail.so:graphics/kdegraphics-thumbnailers \
 		${QT_PLUGINDIR}/audiothumbnail.so:devel/kio-extras
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	activities attica auth baloo baloo-widgets bookmarks codecs \
 		completion config configwidgets coreaddons crash dbusaddons \
 		doctools ecm emoticons filemetadata i18n iconthemes init \
@@ -23,7 +23,7 @@ USE_KDE=	activities attica auth baloo baloo-widgets bookmarks codecs \
 		kdelibs4support kio newstuff notifications parts service \
 		solid sonnet texteditor textwidgets widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	concurrent core dbus gui network phonon4 widgets xml \
+USE_QT=		concurrent core dbus gui network phonon4 widgets xml \
 		buildtools_build qmake_build
 
 SHLIB_VER=	5.0.0
diff --git x11-fm/konqueror/Makefile x11-fm/konqueror/Makefile
index cf2948f88bdb..d22d35e1b2b6 100644
--- x11-fm/konqueror/Makefile
+++ x11-fm/konqueror/Makefile
@@ -9,13 +9,13 @@ COMMENT=	KDE system log application
 
 LIB_DEPENDS=	libtidy.so:www/tidy-lib
 
-USES=		cmake:outsource desktop-file-utils gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource desktop-file-utils gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	activities  archive auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons guiaddons i18n iconthemes \
 		itemviews jobwidgets js kcmutils kdelibs4support \
 		kdesu khtml kio notifications parts pty service solid sonnet \
 		textwidgets unitconversion widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui location network printsupport qml quick script \
+USE_QT=		core dbus gui location network printsupport qml quick script \
 		speech webchannel webengine widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	ice sm x11 xext
diff --git x11-fm/krusader2-kde4/Makefile x11-fm/krusader2-kde4/Makefile
index dc497768be8a..8227a8a60b95 100644
--- x11-fm/krusader2-kde4/Makefile
+++ x11-fm/krusader2-kde4/Makefile
@@ -16,8 +16,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 CONFLICTS_INSTALL=	krusader2-2.*
 
-USES=		cmake:outsource gettext kde:4 tar:bzip2
+USES=		cmake:outsource gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git x11-fm/krusader2/Makefile x11-fm/krusader2/Makefile
index c467c81fb79b..1e449a3aef12 100644
--- x11-fm/krusader2/Makefile
+++ x11-fm/krusader2/Makefile
@@ -14,13 +14,13 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 CONFLICTS_INSTALL=	krusader2-kde4
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive auth auth bookmarks codecs completion config \
 		configwidgets coreaddons doctools ecm guiaddons i18n \
 		iconthemes itemviews jobwidgets kio notifications parts \
 		service solid sonnet textwidgets wallet widgetsaddons \
 		windowsystem xmlgui
-USE_QT5=	concurrent core dbus gui network printsupport xml widgets \
+USE_QT=		concurrent core dbus gui network printsupport xml widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git x11-fm/pcmanfm-qt/Makefile x11-fm/pcmanfm-qt/Makefile
index a86c7f30e08b..affe9c0b882b 100644
--- x11-fm/pcmanfm-qt/Makefile
+++ x11-fm/pcmanfm-qt/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libmenu-cache.so:x11/menu-cache \
 		libexif.so:graphics/libexif
 
 USES=		cmake:outsource compiler:c++11-lib desktop-file-utils \
-		gettext-runtime localbase:ldflags lxqt pkgconfig kde:5 tar:xz
-USE_QT5=	buildtools_build qmake_build core dbus gui linguisttools \
+		gettext-runtime localbase:ldflags lxqt pkgconfig kde:5 qt:5 tar:xz
+USE_QT=		buildtools_build qmake_build core dbus gui linguisttools \
 		widgets x11extras
 USE_KDE=	oxygen-icons5
 USE_LXQT=	buildtools libfmqt
diff --git x11-fm/pcmanfmqt-l10n/Makefile x11-fm/pcmanfmqt-l10n/Makefile
index 2062f5c030db..1c1649620979 100644
--- x11-fm/pcmanfmqt-l10n/Makefile
+++ x11-fm/pcmanfmqt-l10n/Makefile
@@ -17,8 +17,8 @@ DISTINFO_FILE=	${MASTERDIR}/distinfo
 DESCR=	${MASTERDIR}/pkg-descr
 PLIST=	${.CURDIR}/pkg-plist
 
-USES=	cmake:outsource lxqt pkgconfig tar:xz
-USE_QT5=	buildtools_build qmake_build linguisttools
+USES=	cmake:outsource lxqt pkgconfig qt:5 tar:xz
+USE_QT=		buildtools_build qmake_build linguisttools
 USE_LXQT=	buildtools
 
 CMAKE_ARGS+=	-DWITH_COMPTON_CONF:BOOL=OFF \
diff --git x11-fm/qtfm/Makefile x11-fm/qtfm/Makefile
index a34a7c2d7a77..b098ed811756 100644
--- x11-fm/qtfm/Makefile
+++ x11-fm/qtfm/Makefile
@@ -12,9 +12,9 @@ COMMENT=	Small, lightweight file manager based on pure Qt
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		dos2unix qmake
+USES=		dos2unix qmake qt:4
 DOS2UNIX_REGEX=	.*\.(h|cpp)
-USE_QT4=	gui network moc_build rcc_build \
+USE_QT=		gui network moc_build rcc_build \
 		imageformats_run
 
 post-patch:
diff --git x11-fm/ultracopier/Makefile x11-fm/ultracopier/Makefile
index d3465dff5559..7cc05ab9d1b7 100644
--- x11-fm/ultracopier/Makefile
+++ x11-fm/ultracopier/Makefile
@@ -13,8 +13,8 @@ COMMENT=	Advanced file copier
 LICENSE=	GPLv3
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake tar:xz
-USE_QT5=	buildtools_build linguisttools_build \
+USES=		qmake qt:5 tar:xz
+USE_QT=		buildtools_build linguisttools_build \
 		core gui network widgets xml
 QMAKE_ARGS=	LRELEASE="${LRELEASE}" ultracopier-core.pro
 
diff --git x11-fonts/fontmatrix/Makefile x11-fonts/fontmatrix/Makefile
index 7614bfcf1997..63829ef5c8ef 100644
--- x11-fonts/fontmatrix/Makefile
+++ x11-fonts/fontmatrix/Makefile
@@ -21,8 +21,8 @@ LIB_DEPENDS=	libfreetype.so:print/freetype2 \
 USE_GITHUB=	yes
 GH_ACCOUNT=	fontmatrix
 
-USES=		cmake
-USE_QT4=	corelib xml gui svg network moc_build uic_build rcc_build qmake_build \
+USES=		cmake qt:4
+USE_QT=		corelib xml gui svg network moc_build uic_build rcc_build qmake_build \
 		linguisttools_build opengl sql webkit
 INSTALLS_ICONS=	yes
 MANDIRS=	${PREFIX}/share/man/man1
diff --git x11-themes/gtk-qt4-engine/Makefile x11-themes/gtk-qt4-engine/Makefile
index 214fd24abc73..3aa3ea033c36 100644
--- x11-themes/gtk-qt4-engine/Makefile
+++ x11-themes/gtk-qt4-engine/Makefile
@@ -19,10 +19,10 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	davidsansome
 GH_TAGNAME=	0dc6c26
 
-USES=		cmake gettext kde:4 pkgconfig
+USES=		cmake gettext kde:4 pkgconfig qt:4
 USE_GNOME=	cairo gdkpixbuf2 gtk20
 USE_KDE=	kdelibs automoc4
-USE_QT4=	dbus corelib gui moc_build rcc_build uic_build qmake_build svg
+USE_QT=		dbus corelib gui moc_build rcc_build uic_build qmake_build svg
 USE_XORG=	x11
 WRKSRC_SUBDIR=	${PORTNAME}
 
diff --git x11-themes/kde-base-artwork-kde4/Makefile x11-themes/kde-base-artwork-kde4/Makefile
index 6788c422ce8a..393d8eed2b0e 100644
--- x11-themes/kde-base-artwork-kde4/Makefile
+++ x11-themes/kde-base-artwork-kde4/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Base artwork for the KDE Plasma Desktop
 
 LICENSE=	GPLv2
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 NO_BUILD=	yes
 
 .include <bsd.port.mk>
diff --git x11-themes/kde-gtk-config/Makefile x11-themes/kde-gtk-config/Makefile
index 5092660fc2ec..624b637cf49d 100644
--- x11-themes/kde-gtk-config/Makefile
+++ x11-themes/kde-gtk-config/Makefile
@@ -9,10 +9,10 @@ MASTER_SITES=	KDE/stable/${PORTNAME}/${PORTVERSION}/src
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	GTK2 and GTK3 Configurator for KDE
 
-USES=		cmake:outsource gettext kde:4 pkgconfig tar:xz
+USES=		cmake:outsource gettext kde:4 pkgconfig qt:4 tar:xz
 USE_GNOME=	gtk20 gtk30
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 post-patch:
 	${REINPLACE_CMD} -e '/^install/s,KDE4_LIBEXEC_INSTALL_DIR,LIBEXEC_INSTALL_DIR,g' \
diff --git x11-themes/kde-wallpapers-kde4/Makefile x11-themes/kde-wallpapers-kde4/Makefile
index 542f096c7000..8da4720a338f 100644
--- x11-themes/kde-wallpapers-kde4/Makefile
+++ x11-themes/kde-wallpapers-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	x11-themes kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Set of wallpapers for the KDE Plasma workspace
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 
 NO_BUILD=	yes
 
diff --git x11-themes/kde4-style-bespin/Makefile x11-themes/kde4-style-bespin/Makefile
index 672555db4589..0ac43cc3fe32 100644
--- x11-themes/kde4-style-bespin/Makefile
+++ x11-themes/kde4-style-bespin/Makefile
@@ -16,9 +16,9 @@ LICENSE=	LGPL21
 
 WRKSRC=		${WRKDIR}/cloudcity
 
-USES=		cmake:noninja kde:4
+USES=		cmake:noninja kde:4 qt:4
 USE_CXXSTD=	gnu++98
 USE_KDE=	kdelibs automoc4 workspace
-USE_QT4=	corelib qmake_build moc_build rcc_build uic_build
+USE_QT=		corelib qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git x11-themes/kde4-style-nitrogen/Makefile x11-themes/kde4-style-nitrogen/Makefile
index 72b276dffcde..dcfca18566aa 100644
--- x11-themes/kde4-style-nitrogen/Makefile
+++ x11-themes/kde4-style-nitrogen/Makefile
@@ -16,8 +16,8 @@ LICENSE=	GPLv2
 
 WRKSRC=		${WRKDIR}/kde4-kstyle-nitrogen-${PORTVERSION}-Source
 
-USES=		cmake kde:4
+USES=		cmake kde:4 qt:4
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib qmake_build moc_build rcc_build uic_build
+USE_QT=		corelib qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git x11-themes/kde4-style-oxygen-transparent/Makefile x11-themes/kde4-style-oxygen-transparent/Makefile
index c1221f2bf841..2ac9c645f14c 100644
--- x11-themes/kde4-style-oxygen-transparent/Makefile
+++ x11-themes/kde4-style-oxygen-transparent/Makefile
@@ -13,8 +13,8 @@ COMMENT=	KDE oxygen style with transparency
 
 LICENSE=	GPLv2
 
-USES=		cmake kde:4 tar:xz
+USES=		cmake kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs workspace automoc4
-USE_QT4=	corelib qmake_build moc_build rcc_build uic_build
+USE_QT=		corelib qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git x11-themes/kde4-style-polyester/Makefile x11-themes/kde4-style-polyester/Makefile
index 6bc1d051ee6b..61c94f26f98e 100644
--- x11-themes/kde4-style-polyester/Makefile
+++ x11-themes/kde4-style-polyester/Makefile
@@ -14,8 +14,8 @@ COMMENT=	KDE style and window decoration
 LICENSE=	LGPL20+
 LICENSE_FILE=	${WRKSRC}/COPYING.LIB
 
-USES=		cmake gettext kde:4 tar:bzip2
+USES=		cmake gettext kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git x11-themes/kde4-style-skulpture/Makefile x11-themes/kde4-style-skulpture/Makefile
index 76f951a51cd0..ffb348c9774f 100644
--- x11-themes/kde4-style-skulpture/Makefile
+++ x11-themes/kde4-style-skulpture/Makefile
@@ -14,8 +14,8 @@ COMMENT=	KDE style featuring 3D artwork and enhanced the visual experience
 
 LICENSE=	GPLv3
 
-USES=		cmake kde:4
+USES=		cmake kde:4 qt:4
 USE_KDE=	kdelibs automoc4 workspace
-USE_QT4=	corelib qmake_build moc_build rcc_build uic_build
+USE_QT=		corelib qmake_build moc_build rcc_build uic_build
 
 .include <bsd.port.mk>
diff --git x11-themes/kde4-windeco-crystal/Makefile x11-themes/kde4-windeco-crystal/Makefile
index ef8843663fec..f25f96e9f5ad 100644
--- x11-themes/kde4-windeco-crystal/Makefile
+++ x11-themes/kde4-windeco-crystal/Makefile
@@ -14,9 +14,9 @@ COMMENT=	Transparent KDE window decoration
 
 LICENSE=	GPLv2
 
-USES=		cmake:outsource,noninja kde:4 tar:bzip2
+USES=		cmake:outsource,noninja kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4 workspace
-USE_QT4=	qmake_build moc_build rcc_build uic_build \
+USE_QT=		qmake_build moc_build rcc_build uic_build \
 		corelib gui qt3support
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
diff --git x11-themes/kde4-windeco-dekorator/Makefile x11-themes/kde4-windeco-dekorator/Makefile
index d02b4ec3ab32..9358b046f581 100644
--- x11-themes/kde4-windeco-dekorator/Makefile
+++ x11-themes/kde4-windeco-dekorator/Makefile
@@ -16,9 +16,9 @@ LICENSE=	GPLv2
 
 LIB_DEPENDS=	libqimageblitz.so:x11/qimageblitz
 
-USES=		cmake kde:4 tar:bzip2
+USES=		cmake kde:4 qt:4 tar:bzip2
 USE_KDE=	kdelibs automoc4 workspace
-USE_QT4=	corelib qmake_build moc_build rcc_build uic_build
+USE_QT=		corelib qmake_build moc_build rcc_build uic_build
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
 .include <bsd.port.mk>
diff --git x11-themes/kdeartwork-kde4/Makefile x11-themes/kdeartwork-kde4/Makefile
index 96c279dca918..401e94d8b8a1 100644
--- x11-themes/kdeartwork-kde4/Makefile
+++ x11-themes/kdeartwork-kde4/Makefile
@@ -10,9 +10,9 @@ PKGNAMESUFFIX=	-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE Artworks Themes
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs libkexiv2 workspace automoc4
-USE_QT4=	corelib gui opengl \
+USE_QT=		corelib gui opengl \
 		moc_build qmake_build rcc_build uic_build
 USE_XORG=	x11 xt
 
diff --git x11-themes/kf5-breeze-icons/Makefile x11-themes/kf5-breeze-icons/Makefile
index 60f7e028a028..4d92214512cf 100644
--- x11-themes/kf5-breeze-icons/Makefile
+++ x11-themes/kf5-breeze-icons/Makefile
@@ -10,9 +10,9 @@ COMMENT=	Breeze icon theme for KDE
 LICENSE=	LGPL3+
 LICENSE_FILE=	${WRKSRC}/COPYING-ICONS
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core qmake_build testlib
+USE_QT=		buildtools_build core qmake_build testlib
 
 NO_ARCH=	yes
 
diff --git x11-themes/kf5-kemoticons/Makefile x11-themes/kf5-kemoticons/Makefile
index 0ae902b146c1..eeea21e2ecb6 100644
--- x11-themes/kf5-kemoticons/Makefile
+++ x11-themes/kf5-kemoticons/Makefile
@@ -7,8 +7,8 @@ CATEGORIES=	x11-themes kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 library to convert emoticons
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	archive config coreaddons ecm service
-USE_QT5=	buildtools_build core gui qmake_build widgets xml
+USE_QT=		buildtools_build core gui qmake_build widgets xml
 
 .include <bsd.port.mk>
diff --git x11-themes/kf5-kiconthemes/Makefile x11-themes/kf5-kiconthemes/Makefile
index 768683279e64..8133d80d8e4a 100644
--- x11-themes/kf5-kiconthemes/Makefile
+++ x11-themes/kf5-kiconthemes/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	x11-themes kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 library for handling icons in applications
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	archive auth codecs config configwidgets coreaddons ecm \
 		i18n itemviews widgetsaddons
-USE_QT5=	buildtools_build concurrent core dbus gui qmake_build \
+USE_QT=		buildtools_build concurrent core dbus gui qmake_build \
 		script svg widgets xml
 
 .include <bsd.port.mk>
diff --git x11-themes/kf5-oxygen-icons5/Makefile x11-themes/kf5-oxygen-icons5/Makefile
index 3c5d18c75600..2b6ea378d49f 100644
--- x11-themes/kf5-oxygen-icons5/Makefile
+++ x11-themes/kf5-oxygen-icons5/Makefile
@@ -7,7 +7,7 @@ CATEGORIES=	x11-themes kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	The Oxygen icon theme for KDE
 
-USES=		cmake:outsource kde:5 tar:xz
+USES=		cmake:outsource kde:5 qt:5 tar:xz
 USE_KDE=	ecm_build  # We only install icons.
 
 # The qmake dependency is only needed so that kf5-e-c-m can query qmake for
@@ -15,7 +15,7 @@ USE_KDE=	ecm_build  # We only install icons.
 # We explicitly prevent it from looking for qt5-core and specify qmake's path
 # to avoid needlessly depending on qt5-core; we're just installing a ton of
 # icon files and do not even use the paths queried from qmake.
-USE_QT5=	qmake_build
+USE_QT=		qmake_build
 CMAKE_ARGS=	-DCMAKE_DISABLE_FIND_PACKAGE_Qt5Core=TRUE \
 		-DQMAKE_EXECUTABLE:PATH=${QMAKE}
 
diff --git x11-themes/kf5-qqc2-desktop-style/Makefile x11-themes/kf5-qqc2-desktop-style/Makefile
index db4f65f88e6e..4b82b3bc690d 100644
--- x11-themes/kf5-qqc2-desktop-style/Makefile
+++ x11-themes/kf5-qqc2-desktop-style/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	x11-themes kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt QuickControl2 style for KDE
 
-USES=		cmake:outsource kde:5 pkgconfig tar:xz
+USES=		cmake:outsource kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons ecm iconthemes \
 		kirigami2 widgetsaddons
-USE_QT5=	gui network qml quick widgets xml \
+USE_QT=		gui network qml quick widgets xml \
 		buildtools_build core qmake_build
 
 .include <bsd.port.mk>
diff --git x11-themes/lumina-themes/Makefile x11-themes/lumina-themes/Makefile
index 46b9e3499361..2f5ad2dd3db6 100644
--- x11-themes/lumina-themes/Makefile
+++ x11-themes/lumina-themes/Makefile
@@ -11,8 +11,8 @@ COMMENT=	Lumina desktop wallpapers/colors
 LICENSE=	BSD2CLAUSE CC0-1.0
 LICENSE_COMB=	multi
 
-USES=	qmake
-USE_QT5=	qmake_build
+USES=	qmake qt:5
+USE_QT=		qmake_build
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
diff --git x11-themes/plasma5-breeze-gtk/Makefile x11-themes/plasma5-breeze-gtk/Makefile
index c26f05535452..b267ccbe7692 100644
--- x11-themes/plasma5-breeze-gtk/Makefile
+++ x11-themes/plasma5-breeze-gtk/Makefile
@@ -10,9 +10,9 @@ COMMENT=	Plasma5 Breeze visual style for Gtk
 LICENSE=	LGPL21
 LICENSE_FILE=	${WRKSRC}/COPYING.LIB
 
-USES=		cmake:outsource cpe kde:5 pkgconfig tar:xz
+USES=		cmake:outsource cpe kde:5 pkgconfig qt:5 tar:xz
 USE_GNOME=	gdkpixbuf2
 USE_KDE=	ecm
-USE_QT5=	core buildtools_build qmake_build
+USE_QT=		core buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git x11-themes/plasma5-breeze-kde4/Makefile x11-themes/plasma5-breeze-kde4/Makefile
index cc25b2070887..bf51321ded56 100644
--- x11-themes/plasma5-breeze-kde4/Makefile
+++ x11-themes/plasma5-breeze-kde4/Makefile
@@ -14,9 +14,9 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 CMAKE_ON=	USE_KDE4
 
 USES=		cmake:outsource compiler:c++11-lang cpe gettext \
-		kde:4 pkgconfig tar:xz
+		kde:4 pkgconfig qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	corelib dbus gui svg \
+USE_QT=		corelib dbus gui svg \
 		moc_build qmake_build rcc_build uic_build
 USE_XORG=	x11 xcb
 
diff --git x11-themes/plasma5-breeze/Makefile x11-themes/plasma5-breeze/Makefile
index 6aa7f9c773cc..a676eee99b16 100644
--- x11-themes/plasma5-breeze/Makefile
+++ x11-themes/plasma5-breeze/Makefile
@@ -11,11 +11,11 @@ LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
 USES=		cmake:outsource compiler:c++11-lib cpe \
-		gettext kde:5 pkgconfig tar:xz
+		gettext kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	auth breeze-icons codecs config configwidgets coreaddons \
 		decoration ecm frameworkintegration guiaddons i18n kcmutils \
 		plasma-framework service wayland widgetsaddons windowsystem
-USE_QT5=	core dbus gui network qml quick widgets x11extras xml \
+USE_QT=		core dbus gui network qml quick widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	xcb
 
diff --git x11-themes/plasma5-kde-gtk-config/Makefile x11-themes/plasma5-kde-gtk-config/Makefile
index 8ac395d8d42f..838a902381d5 100644
--- x11-themes/plasma5-kde-gtk-config/Makefile
+++ x11-themes/plasma5-kde-gtk-config/Makefile
@@ -16,12 +16,12 @@ BUILD_DEPENDS=	gsettings-desktop-schemas>=0:devel/gsettings-desktop-schemas
 RUN_DEPENDS=	gsettings-desktop-schemas>=0:devel/gsettings-desktop-schemas
 
 USES=		cmake:outsource compiler:c++11-lib cpe gettext \
-		kde:5 pkgconfig tar:xz
+		kde:5 pkgconfig qt:5 tar:xz
 USE_GNOME=	cairo gdkpixbuf2 gtk20 gtk30 glib20
 USE_KDE=	archive attica auth codecs completion config configwidgets \
 		coreaddons ecm i18n iconthemes jobwidgets kcmutils kio \
 		newstuff service widgetsaddons xmlgui
-USE_QT5=	concurrent core dbus gui network testlib widgets xml \
+USE_QT=		concurrent core dbus gui network testlib widgets xml \
 		buildtools_build qmake_build
 USE_XORG=	xcursor
 
diff --git x11-themes/plasma5-oxygen/Makefile x11-themes/plasma5-oxygen/Makefile
index 8a7115f513b7..df3e7de311d9 100644
--- x11-themes/plasma5-oxygen/Makefile
+++ x11-themes/plasma5-oxygen/Makefile
@@ -13,12 +13,12 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 LICENSE_FILE_LGPL21=	${WRKSRC}/COPYING.LIB
 
 USES=		cmake:outsource compiler:c++11-lib cpe gettext \
-		kde:5 pkgconfig tar:xz
+		kde:5 pkgconfig qt:5 tar:xz
 USE_LDCONFIG=	yes
 USE_KDE=	auth codecs completion config configwidgets coreaddons decoration ecm \
 		frameworkintegration guiaddons i18n kcmutils service \
 		wayland widgetsaddons windowsystem
-USE_QT5=	core dbus gui network qml quick widgets x11extras xml \
+USE_QT=		core dbus gui network qml quick widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	xcb
 
diff --git x11-themes/plasma5-plasma-workspace-wallpapers/Makefile x11-themes/plasma5-plasma-workspace-wallpapers/Makefile
index 20b1f2a201f3..ba74b35307f0 100644
--- x11-themes/plasma5-plasma-workspace-wallpapers/Makefile
+++ x11-themes/plasma5-plasma-workspace-wallpapers/Makefile
@@ -12,9 +12,9 @@ LICENSE_COMB=	multi
 LICENSE_FILE=	${WRKSRC}/COPYING
 LICENSE_FILE_LGPL3=	${WRKSRC}/COPYING.LGPL3
 
-USES=		cmake:outsource cpe kde:5 tar:xz
+USES=		cmake:outsource cpe kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build qmake_build
+USE_QT=		buildtools_build qmake_build
 
 # The qmake dependency is only needed so that kf5-e-c-m can query qmake for
 # some installation directories.
diff --git x11-themes/qt4-style-Kvantum/Makefile x11-themes/qt4-style-Kvantum/Makefile
index c52398a4f02a..ba41b524947d 100644
--- x11-themes/qt4-style-Kvantum/Makefile
+++ x11-themes/qt4-style-Kvantum/Makefile
@@ -15,8 +15,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 USE_GITHUB=	yes
 GH_ACCOUNT=	tsujan
 
-USES=		compiler:c++11-lang qmake
-USE_QT4=	corelib gui svg rcc_build uic_build moc_build
+USES=		compiler:c++11-lang qmake qt:4
+USE_QT=		corelib gui svg rcc_build uic_build moc_build
 USE_XORG=	x11 xext
 
 WRKSRC_SUBDIR=	${PORTNAME}
diff --git x11-themes/qt4-style-float/Makefile x11-themes/qt4-style-float/Makefile
index 9af918331844..c2360a4f57c2 100644
--- x11-themes/qt4-style-float/Makefile
+++ x11-themes/qt4-style-float/Makefile
@@ -15,8 +15,8 @@ COMMENT=	Style for Qt 4 and KDE
 
 LICENSE=	GPLv2
 
-USES=		tar:bzip2 qmake
-USE_QT4=	corelib gui moc_build rcc_build
+USES=		qt:4 tar:bzip2 qmake
+USE_QT=		corelib gui moc_build rcc_build
 
 WRKSRC=		${WRKDIR}/floatstyle-${PORTVERSION}
 
diff --git x11-themes/qt4-style-phase/Makefile x11-themes/qt4-style-phase/Makefile
index f9ae9cd3df2a..20b5dba3f029 100644
--- x11-themes/qt4-style-phase/Makefile
+++ x11-themes/qt4-style-phase/Makefile
@@ -15,8 +15,8 @@ COMMENT=	Widget style for Qt 4 and KDE 4
 
 LICENSE=	MIT
 
-USES=		tar:bzip2 qmake
-USE_QT4=	corelib gui moc_build
+USES=		qt:4 tar:bzip2 qmake
+USE_QT=		corelib gui moc_build
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
diff --git x11-themes/qt4-style-quantumstyle/Makefile x11-themes/qt4-style-quantumstyle/Makefile
index efa8c9648cb3..9c2982af6c5a 100644
--- x11-themes/qt4-style-quantumstyle/Makefile
+++ x11-themes/qt4-style-quantumstyle/Makefile
@@ -16,8 +16,8 @@ COMMENT=	SVG themeable style for Qt 4 and KDE
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		qmake
-USE_QT4=	corelib gui svg rcc_build uic_build moc_build
+USES=		qmake qt:4
+USE_QT=		corelib gui svg rcc_build uic_build moc_build
 
 WRKSRC=		${WRKDIR}/QuantumStyle
 
diff --git x11-themes/qt5-style-Kvantum/Makefile x11-themes/qt5-style-Kvantum/Makefile
index ab91f57f6424..a31fcbf89cb3 100644
--- x11-themes/qt5-style-Kvantum/Makefile
+++ x11-themes/qt5-style-Kvantum/Makefile
@@ -15,8 +15,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 USE_GITHUB=	yes
 GH_ACCOUNT=	tsujan
 
-USES=		compiler:c++11-lang qmake
-USE_QT5=	core gui svg widgets x11extras buildtools_build linguisttools_build
+USES=		compiler:c++11-lang qmake qt:5
+USE_QT=		core gui svg widgets x11extras buildtools_build linguisttools_build
 USE_XORG=	x11 xext
 USE_GL=		gl
 
diff --git x11-themes/qt5-style-plugins/Makefile x11-themes/qt5-style-plugins/Makefile
index 09fe13b260a4..88970a8db600 100644
--- x11-themes/qt5-style-plugins/Makefile
+++ x11-themes/qt5-style-plugins/Makefile
@@ -3,7 +3,7 @@
 
 PORTNAME=	qt5-style-plugins
 PORTVERSION=	5.0.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	x11-themes
 MASTER_SITES=	QT/community_releases/additional_qt_src_pkgs/
 DISTNAME=	qtstyleplugins-src-${PORTVERSION}
@@ -14,8 +14,8 @@ COMMENT=	Additional Styles for Qt 5 and KDE
 
 LICENSE=	LGPL21
 
-USES=		qmake
-USE_QT5=	buildtools_build core gui widgets
+USES=		qmake qt:5
+USE_QT=		buildtools_build core gui widgets
 USE_GL+=	gl
 
 WRKSRC=		${WRKDIR}/qtstyleplugins-src-${PORTVERSION}
diff --git x11-themes/qt5-style-plugins/pkg-plist x11-themes/qt5-style-plugins/pkg-plist
index 44825186d54b..1bd3061b5e14 100644
--- x11-themes/qt5-style-plugins/pkg-plist
+++ x11-themes/qt5-style-plugins/pkg-plist
@@ -1,4 +1,7 @@
 lib/cmake/Qt5Widgets/Qt5Widgets_.cmake
 %%QT_PLUGINDIR%%/styles/libqcleanlooksstyle.so
+%%DEBUG%%%%QT_PLUGINDIR%%/styles/libqcleanlooksstyle.so.debug
 %%QT_PLUGINDIR%%/styles/libqmotifstyle.so
+%%DEBUG%%%%QT_PLUGINDIR%%/styles/libqmotifstyle.so.debug
 %%QT_PLUGINDIR%%/styles/libqplastiquestyle.so
+%%DEBUG%%%%QT_PLUGINDIR%%/styles/libqplastiquestyle.so.debug
diff --git x11-themes/qtcurve/Makefile x11-themes/qtcurve/Makefile
index 2bee5251dae2..763ed88c10b8 100644
--- x11-themes/qtcurve/Makefile
+++ x11-themes/qtcurve/Makefile
@@ -9,7 +9,7 @@ MAINTAINER=	jhale@FreeBSD.org
 COMMENT?=	Widget styles for Qt and GTK+ toolkits
 
 .if !defined(QTCURVE_SLAVE)
-USES=		metaport
+USES=		metaport qt:4
 # There is no NO_PATCH
 PATCHDIR=	${MASTERDIR}/none
 
@@ -76,8 +76,8 @@ post-install:
 WITH_qt4=	On # required for KDE 4
 PKGNAMEPREFIX=	kde4-style-
 USE_KDE=	kdelibs workspace automoc4
-USES+=		kde:4
-USE_QT4=	corelib dbus gui svg moc_build qmake_build rcc_build uic_build
+USES+=		kde:4 qt:4
+USE_QT=		corelib dbus gui svg moc_build qmake_build rcc_build uic_build
 BUILD_WRKSRC=	${WRKSRC}/qt4
 .endif
 
@@ -85,25 +85,27 @@ BUILD_WRKSRC=	${WRKSRC}/qt4
 CONFLICTS_INSTALL=	qt5-style-qtcurve
 WITH_qt5=	On # required for KF5
 PKGNAMEPREFIX=	kf5-style-
-USES+=		kde:5
+USES+=		kde:5 qt:5
 USE_KDE=	archive completion config configwidgets coreaddons \
 		ecm_build frameworkintegration guiaddons i18n iconthemes \
 		kdelibs4support kio widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui printsupport svg widgets x11extras \
+USE_QT=		core dbus gui printsupport svg widgets x11extras \
 		buildtools_build qmake_build
 BUILD_WRKSRC=	${WRKSRC}/qt5
 .endif
 
 .if ${QTCURVE_SLAVE} == "qt4"
 PKGNAMEPREFIX=	qt4-style-
-USE_QT4=	corelib dbus gui svg moc_build qmake_build rcc_build uic_build
+USES+=		qt:4
+USE_QT=		corelib dbus gui svg moc_build qmake_build rcc_build uic_build
 PLIST_FILES=	${QT_PLUGINDIR_REL}/styles/qtcurve.so
 .endif
 
 .if ${QTCURVE_SLAVE} == "qt5"
 CONFLICTS_INSTALL=	kf5-style-qtcurve
 PKGNAMEPREFIX=	qt5-style-
-USE_QT5=	core dbus gui svg widgets x11extras \
+USES+=		qt:5
+USE_QT=		core dbus gui svg widgets x11extras \
 		buildtools_build qmake_build
 PLIST_FILES=	${QT_PLUGINDIR_REL}/styles/qtcurve.so
 .endif
diff --git x11-toolkits/attica/Makefile x11-toolkits/attica/Makefile
index ef4bf2e94a4d..1bbbc2a2b179 100644
--- x11-toolkits/attica/Makefile
+++ x11-toolkits/attica/Makefile
@@ -11,10 +11,10 @@ MASTER_SITES=	KDE/stable/${PORTNAME}
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Open Collaboration Services API library
 
-USE_QT4=	network qtestlib_build xml \
+USE_QT=		network qtestlib_build xml \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
-USES=		cmake:outsource tar:bzip2
+USES=		cmake:outsource qt:4 tar:bzip2
 CMAKE_ARGS=	-DATTICA_ENABLE_TESTS:BOOL=OFF \
 		-DQT4_BUILD:BOOL=ON
 USE_CXXSTD=	gnu++98
diff --git x11-toolkits/kf5-attica/Makefile x11-toolkits/kf5-attica/Makefile
index d8ffcf89fea3..0db75cf1e976 100644
--- x11-toolkits/kf5-attica/Makefile
+++ x11-toolkits/kf5-attica/Makefile
@@ -13,8 +13,8 @@ LICENSE=	LGPL21 LGPL3
 LICENSE_COMB=	dual
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 pathfix tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 pathfix qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core gui network qmake_build testlib_build widgets
+USE_QT=		buildtools_build core gui network qmake_build testlib_build widgets
 
 .include <bsd.port.mk>
diff --git x11-toolkits/kf5-kcompletion/Makefile x11-toolkits/kf5-kcompletion/Makefile
index 3d694e10d383..8abbf2482af1 100644
--- x11-toolkits/kf5-kcompletion/Makefile
+++ x11-toolkits/kf5-kcompletion/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	x11-toolkits kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 text completion helpers and widgets
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	config ecm widgetsaddons
-USE_QT5=	buildtools_build core gui linguisttools qmake_build \
+USE_QT=		buildtools_build core gui linguisttools qmake_build \
 		widgets xml
 
 .include <bsd.port.mk>
diff --git x11-toolkits/kf5-kconfigwidgets/Makefile x11-toolkits/kf5-kconfigwidgets/Makefile
index a21c60dc382b..c6d28d4c8001 100644
--- x11-toolkits/kf5-kconfigwidgets/Makefile
+++ x11-toolkits/kf5-kconfigwidgets/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	x11-toolkits kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 widgets for configuration dialogs
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 shebangfix tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 shebangfix tar:xz
 USE_KDE=	archive auth codecs config coreaddons doctools ecm guiaddons \
 		i18n widgetsaddons
-USE_QT5=	buildtools_build core dbus gui qmake_build widgets xml
+USE_QT=		buildtools_build core dbus gui qmake_build widgets xml
 
 SHEBANG_FILES=	src/preparetips5
 
diff --git x11-toolkits/kf5-kdesignerplugin/Makefile x11-toolkits/kf5-kdesignerplugin/Makefile
index c7aaa18d6c8d..4bc420ab4ef8 100644
--- x11-toolkits/kf5-kdesignerplugin/Makefile
+++ x11-toolkits/kf5-kdesignerplugin/Makefile
@@ -7,12 +7,12 @@ CATEGORIES=	x11-toolkits kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 integration of Frameworks widgets in Qt Designer/Creator
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons doctools ecm i18n iconthemes itemviews \
 		jobwidgets kdewebkit kio plotting service solid sonnet \
 		textwidgets widgetsaddons xmlgui
-USE_QT5=	buildtools_build core dbus designer gui linguisttools \
+USE_QT=		buildtools_build core dbus designer gui linguisttools \
 		network qmake_build webkit widgets xml
 
 .include <bsd.port.mk>
diff --git x11-toolkits/kf5-kguiaddons/Makefile x11-toolkits/kf5-kguiaddons/Makefile
index 81e3e2bf943a..9ff3e969e1fc 100644
--- x11-toolkits/kf5-kguiaddons/Makefile
+++ x11-toolkits/kf5-kguiaddons/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	x11-toolkits kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 addons to QtGui
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core gui qmake_build testlib widgets x11extras
+USE_QT=		buildtools_build core gui qmake_build testlib widgets x11extras
 USE_XORG=	ice sm x11 xcb xext
 
 .include <bsd.port.mk>
diff --git x11-toolkits/kf5-kirigami2/Makefile x11-toolkits/kf5-kirigami2/Makefile
index 35d6201fdf43..3411fb102f8a 100644
--- x11-toolkits/kf5-kirigami2/Makefile
+++ x11-toolkits/kf5-kirigami2/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	x11-toolkits kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	QtQuick based components set
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	ecm kdeclarative
-USE_QT5=	core dbus gui linguisttools network \
+USE_QT=		core dbus gui linguisttools network \
 		qml quick quickcontrols2 svg testlib widgets \
 		buildtools_build qmake_build
 
diff --git x11-toolkits/kf5-kitemviews/Makefile x11-toolkits/kf5-kitemviews/Makefile
index 973e8506f0cd..045e5dba6f76 100644
--- x11-toolkits/kf5-kitemviews/Makefile
+++ x11-toolkits/kf5-kitemviews/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	x11-toolkits kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 widget addons for Qt Model/View
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core gui linguisttools qmake_build \
+USE_QT=		buildtools_build core gui linguisttools qmake_build \
 		testlib widgets
 
 .include <bsd.port.mk>
diff --git x11-toolkits/kf5-kjobwidgets/Makefile x11-toolkits/kf5-kjobwidgets/Makefile
index 71f547d47d0c..b14ec6414550 100644
--- x11-toolkits/kf5-kjobwidgets/Makefile
+++ x11-toolkits/kf5-kjobwidgets/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	x11-toolkits kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 widgets for tracking KJob instance
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	coreaddons ecm widgetsaddons
-USE_QT5=	buildtools_build core dbus gui linguisttools \
+USE_QT=		buildtools_build core dbus gui linguisttools \
 		qmake_build widgets x11extras
 
 .include <bsd.port.mk>
diff --git x11-toolkits/kf5-ktextwidgets/Makefile x11-toolkits/kf5-ktextwidgets/Makefile
index ef7ea882e0af..0e0fcc4c5b3f 100644
--- x11-toolkits/kf5-ktextwidgets/Makefile
+++ x11-toolkits/kf5-ktextwidgets/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	x11-toolkits kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 advanced text editing widgets
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs completion config configwidgets \
 		coreaddons dbusaddons ecm guiaddons i18n \
 		iconthemes itemviews service sonnet \
 		widgetsaddons windowsystem
-USE_QT5=	buildtools_build core dbus gui qmake_build widgets xml
+USE_QT=		buildtools_build core dbus gui qmake_build widgets xml
 
 .include <bsd.port.mk>
diff --git x11-toolkits/kf5-kwidgetsaddons/Makefile x11-toolkits/kf5-kwidgetsaddons/Makefile
index 8266ea1ca2bb..d16a30c7e2c9 100644
--- x11-toolkits/kf5-kwidgetsaddons/Makefile
+++ x11-toolkits/kf5-kwidgetsaddons/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	x11-toolkits kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 addons to QtWidgets
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core gui linguisttools \
+USE_QT=		buildtools_build core gui linguisttools \
 		qmake_build uiplugin uitools testlib widgets
 
 .include <bsd.port.mk>
diff --git x11-toolkits/kf5-kxmlgui/Makefile x11-toolkits/kf5-kxmlgui/Makefile
index 7cfb82101b1e..f753c6c4004a 100644
--- x11-toolkits/kf5-kxmlgui/Makefile
+++ x11-toolkits/kf5-kxmlgui/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	x11-toolkits kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 user configurable main windows
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	attica5 auth codecs config configwidgets coreaddons ecm \
 		globalaccel i18n iconthemes itemviews sonnet textwidgets \
 		widgetsaddons windowsystem
-USE_QT5=	buildtools_build core dbus gui network printsupport \
+USE_QT=		buildtools_build core dbus gui network printsupport \
 		qmake_build widgets xml
 
 .include <bsd.port.mk>
diff --git x11-toolkits/kproperty/Makefile x11-toolkits/kproperty/Makefile
index dda001556961..bcf49f800eef 100644
--- x11-toolkits/kproperty/Makefile
+++ x11-toolkits/kproperty/Makefile
@@ -9,9 +9,9 @@ DIST_SUBDIR=		KDE/${PORTNAME}
 MAINTAINER=		kde@FreeBSD.org
 COMMENT=		Property editing framwork
 
-USES=			cmake:outsource gettext kde:5 tar:xz
+USES=			cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=		ecm config coreaddons guiaddons i18n widgetsaddons
-USE_QT5=		core gui widgets xml \
+USE_QT=			core gui widgets xml \
 			buildtools_build qmake_build qml
 
 CONFLICTS_INSTALL=	calligra-2*
diff --git x11-toolkits/nucleo/Makefile x11-toolkits/nucleo/Makefile
index d537dcd3361e..25f261123f64 100644
--- x11-toolkits/nucleo/Makefile
+++ x11-toolkits/nucleo/Makefile
@@ -51,6 +51,7 @@ GNUTLS_CONFIGURE_OFF=	--without-gnutls
 MDNSRESPONDER_LIB_DEPENDS=	libdns_sd.so:net/mDNSResponder
 
 QT4_USE=		QT4=moc_build,corelib
+QT4_USES=		qmake:no_env
 QT4_CONFIGURE_OFF=	--without-qt
 QT4_MAKE_ARGS=		QT4MOC="${MOC}"
 
@@ -60,10 +61,6 @@ QT4_MAKE_ARGS=		QT4MOC="${MOC}"
 CONFIGURE_ARGS+=	--without-dns-sd
 .endif
 
-.if ${PORT_OPTIONS:MQT4}
-QT_NONSTANDARD=		yes
-.endif
-
 post-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/nucleo
 
diff --git x11-toolkits/plasma5-kdeplasma-addons/Makefile x11-toolkits/plasma5-kdeplasma-addons/Makefile
index 74ff3df55f79..3fbb77c4e7e7 100644
--- x11-toolkits/plasma5-kdeplasma-addons/Makefile
+++ x11-toolkits/plasma5-kdeplasma-addons/Makefile
@@ -8,14 +8,14 @@ MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 addons to improve the Plasma experience
 
 USES=		cmake:outsource compiler:c++11-lib cpe gettext \
-		kde:5 pkgconfig tar:xz
+		kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	activities archive attica auth bookmarks codecs completion \
 		config configwidgets coreaddons crash ecm emoticons guiaddons \
 		i18n iconthemes init itemmodels itemviews jobwidgets kcmutils \
 		kdelibs4support kio kross newstuff notifications package parts\
 		plasma-framework plasma-workspace runner service solid sonnet \
 		textwidgets unitconversion widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus graphicaleffects gui location network printsupport \
+USE_QT=		core dbus graphicaleffects gui location network printsupport \
 		qml quick script webchannel webengine widgets x11extras xml \
 		buildtools_build qmake_build
 
diff --git x11-toolkits/py-qt4-gui/Makefile x11-toolkits/py-qt4-gui/Makefile
index 2447fee58281..ac3f983f64ce 100644
--- x11-toolkits/py-qt4-gui/Makefile
+++ x11-toolkits/py-qt4-gui/Makefile
@@ -12,10 +12,10 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtGui module
 CONFIGURE_ARGS=	--enable QtGui
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_PYQT=	sip_build core_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib gui imageformats_run inputmethods_run iconengines_run \
+USE_QT=		corelib gui imageformats_run inputmethods_run iconengines_run \
 		moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
diff --git x11-toolkits/py-qt5-gui/Makefile x11-toolkits/py-qt5-gui/Makefile
index 0450f2d2714d..32c0175d2c51 100644
--- x11-toolkits/py-qt5-gui/Makefile
+++ x11-toolkits/py-qt5-gui/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtGui module
 CONFIGURE_ARGS=	--enable QtGui
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui qmake_build imageformats_run
+USE_QT=		core gui qmake_build imageformats_run
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git x11-toolkits/py-qt5-quick/Makefile x11-toolkits/py-qt5-quick/Makefile
index a65505ab2c25..3d92ead5a086 100644
--- x11-toolkits/py-qt5-quick/Makefile
+++ x11-toolkits/py-qt5-quick/Makefile
@@ -10,10 +10,10 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtQuick module
 CONFIGURE_ARGS=	--enable QtQuick
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_PYQT=	sip_build core_run gui_run
 USE_PYTHON=	flavors
-USE_QT5=	core quick qmake_build
+USE_QT=		core quick qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git x11-toolkits/py-qt5-widgets/Makefile x11-toolkits/py-qt5-widgets/Makefile
index 02cec4363d9c..560c96a8b1c7 100644
--- x11-toolkits/py-qt5-widgets/Makefile
+++ x11-toolkits/py-qt5-widgets/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtWidgets module
 CONFIGURE_ARGS=	--enable QtWidgets
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run gui_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui widgets qmake_build
+USE_QT=		core gui widgets qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git x11-toolkits/qml-box2d/Makefile x11-toolkits/qml-box2d/Makefile
index a0e0846ec6fd..09e8d61973f4 100644
--- x11-toolkits/qml-box2d/Makefile
+++ x11-toolkits/qml-box2d/Makefile
@@ -7,11 +7,11 @@ CATEGORIES=	x11-toolkits
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	QML Box2D plugin
 
-USES=		qmake:outsource
+USES=		qmake:outsource qt:5
 USE_GITHUB=	yes
 GH_TAGNAME=	21e57f
 USE_GL=		gl
-USE_QT5=	core gui network qml quick \
+USE_QT=		core gui network qml quick \
 		buildtools_build qmake_build
 USE_LDCONFIG=	${QT_QMLDIR}/Box2D.2.0/
 
diff --git x11-toolkits/qt4-declarative/Makefile x11-toolkits/qt4-declarative/Makefile
index cf001d247274..b5d3cf0cd33e 100644
--- x11-toolkits/qt4-declarative/Makefile
+++ x11-toolkits/qt4-declarative/Makefile
@@ -9,9 +9,9 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt declarative framework for dynamic user interfaces
 
-USE_QT4=	qmake_build moc_build rcc_build uic_build corelib gui network \
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build rcc_build uic_build corelib gui network \
 		opengl script sql svg xml xmlpatterns
-QT_DIST=	yes
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git x11-toolkits/qt4-gui/Makefile x11-toolkits/qt4-gui/Makefile
index e151530d70f1..385c092543a2 100644
--- x11-toolkits/qt4-gui/Makefile
+++ x11-toolkits/qt4-gui/Makefile
@@ -14,9 +14,8 @@ LIB_DEPENDS=	libpng.so:graphics/png \
 		libfontconfig.so:x11-fonts/fontconfig
 RUN_DEPENDS=	xdg-open:devel/xdg-utils
 
-USE_QT4=	qmake_build moc_build rcc_build uic_build corelib
-QT_DIST=	yes
-USES=		pkgconfig
+USE_QT=		moc_build rcc_build uic_build corelib
+USES=		pkgconfig qmake:no_env qt-dist:4
 
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git x11-toolkits/qt4pas/Makefile x11-toolkits/qt4pas/Makefile
index c730a02007bb..687efdec0431 100644
--- x11-toolkits/qt4pas/Makefile
+++ x11-toolkits/qt4pas/Makefile
@@ -12,9 +12,9 @@ MAINTAINER=	acm@FreeBSD.org
 COMMENT=	Qt4 binding for FreePascal
 
 USE_LDCONFIG=	yes
-USE_QT4=	corelib gui network script webkit \
+USE_QT=		corelib gui network script webkit \
 		moc_build
-USES=		qmake
+USES=		qmake qt:4
 
 QT4_VER_MIN=	4.5.3
 
diff --git x11-toolkits/qt5-canvas3d/Makefile x11-toolkits/qt5-canvas3d/Makefile
index e2c39c316d2e..a8e94d7c1489 100644
--- x11-toolkits/qt5-canvas3d/Makefile
+++ x11-toolkits/qt5-canvas3d/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt canvas3d module
 
-USE_QT5=	core gui network qml quick buildtools_build
-QT_DIST=	${PORTNAME}
-USES=		qmake
+USE_QT=		core gui network qml quick buildtools_build
+USES=		qmake qt-dist:5,canvas3d
 
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
diff --git x11-toolkits/qt5-charts/Makefile x11-toolkits/qt5-charts/Makefile
index be6437521842..6f77c7150d6a 100644
--- x11-toolkits/qt5-charts/Makefile
+++ x11-toolkits/qt5-charts/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 5 charts module
 
-USES=		qmake tar:xz
-USE_QT5=	core network gui widgets qml quick designer \
+USES=		qmake qt-dist:5,charts tar:xz
+USE_QT=		core network gui widgets qml quick designer \
 		buildtools_build qmake_build
-QT_DIST=	${PORTNAME}
 
 .include <bsd.port.mk>
diff --git x11-toolkits/qt5-datavis3d/Makefile x11-toolkits/qt5-datavis3d/Makefile
index 02532c246b85..b209c5e19485 100644
--- x11-toolkits/qt5-datavis3d/Makefile
+++ x11-toolkits/qt5-datavis3d/Makefile
@@ -8,10 +8,9 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 5 3D data visualization module
 
-USE_QT5=	core network gui widgets qml quick designer buildtools_build
-QT_DIST=	${PORTNAME}
+USE_QT=		core network gui widgets qml quick designer buildtools_build
 
-USES=		qmake
+USES=		qmake qt-dist:5,datavis3d
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 .include <bsd.port.mk>
diff --git x11-toolkits/qt5-gamepad/Makefile x11-toolkits/qt5-gamepad/Makefile
index dfcb112d058f..7307c54f2198 100644
--- x11-toolkits/qt5-gamepad/Makefile
+++ x11-toolkits/qt5-gamepad/Makefile
@@ -8,10 +8,9 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 5 Gamepad Module
 
-USE_QT5=	core gui qml quick buildtools_build
-QT_DIST=	${PORTNAME}
+USE_QT=		core gui qml quick buildtools_build
 
-USES=		qmake:norecursive
+USES=		qmake:norecursive qt-dist:5,gamepad
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 .include <bsd.port.mk>
diff --git x11-toolkits/qt5-gtkplatform/Makefile x11-toolkits/qt5-gtkplatform/Makefile
index dca8d8c816c1..d9581113466a 100644
--- x11-toolkits/qt5-gtkplatform/Makefile
+++ x11-toolkits/qt5-gtkplatform/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	gtkplatform
 DISTVERSION=	0.2.2
+PORTREVISION=	1
 CATEGORIES=	x11-toolkits
 PKGNAMEPREFIX=	qt5-
 
@@ -19,9 +20,9 @@ LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
 		libudev.so:devel/libudev-devd \
 		libxkbcommon.so:x11/libxkbcommon
 
-USES=		qmake:outsource pkgconfig
+USES=		qmake:outsource pkgconfig qt:5
 USE_GNOME=	gtk30 cairo gdkpixbuf2
-USE_QT5=	buildtools_build core gui widgets dbus
+USE_QT=		buildtools_build core gui widgets dbus
 USE_XORG=	x11 xext xrender
 USE_GL=		gl egl
 
diff --git x11-toolkits/qt5-gtkplatform/pkg-plist x11-toolkits/qt5-gtkplatform/pkg-plist
index 2cee35a4e587..490f4c319cf0 100644
--- x11-toolkits/qt5-gtkplatform/pkg-plist
+++ x11-toolkits/qt5-gtkplatform/pkg-plist
@@ -1,2 +1,3 @@
 lib/cmake/Qt5Gui/Qt5Gui_QGtkIntegrationPlugin.cmake
 %%QT_PLUGINDIR%%/platforms/libqgtk.so
+%%DEBUG%%%%QT_PLUGINDIR%%/platforms/libqgtk.so.debug
diff --git x11-toolkits/qt5-gui/Makefile x11-toolkits/qt5-gui/Makefile
index 350c049de0e5..36a9e109cba3 100644
--- x11-toolkits/qt5-gui/Makefile
+++ x11-toolkits/qt5-gui/Makefile
@@ -22,16 +22,19 @@ LIB_DEPENDS=	libdbus-1.so:devel/dbus \
 		libxkbcommon.so:x11/libxkbcommon
 RUN_DEPENDS=	xdg-open:devel/xdg-utils
 
-USES=		jpeg localbase
+USES=		jpeg localbase qmake:no_env qt-dist:5,base
 USE_GL=		gl egl
 USE_GNOME=	glib20
-USE_QT5=	core dbus network qmake_build buildtools_build
-QT_DIST=	base
+USE_QT=		core dbus network qmake_build buildtools_build
 USE_XORG=	ice sm x11 xi xrender
 HAS_CONFIGURE=	yes
 CONFIGURE_ARGS=	-no-eglfs \
 		-no-evdev \
 		-system-harfbuzz
+# Explicitely set to c++14 as to net get c++17/c++1z, as libX11's headers
+# are using the obsolete 'register' key word.
+CONFIGURE_ARGS+=	-c++std c++14
+
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 BUILD_WRKSRC=	${WRKSRC}/src/${PORTNAME}
diff --git x11-toolkits/qt5-quick/Makefile x11-toolkits/qt5-quick/Makefile
index 1f890a349867..8136051518f5 100644
--- x11-toolkits/qt5-quick/Makefile
+++ x11-toolkits/qt5-quick/Makefile
@@ -9,10 +9,9 @@ MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt declarative framework for dynamic user interfaces
 
 USE_GL=		gl
-USE_QT5=	core gui network qml sql testlib \
+USE_QT=		core gui network qml sql testlib \
 		widgets xmlpatterns buildtools_build
-QT_DIST=	declarative
-USES=		python:build qmake:norecursive
+USES=		python:build qmake:norecursive qt-dist:5,declarative
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 CONFLICTS=	qt5-declarative-render2d-*
diff --git x11-toolkits/qt5-quickcontrols/Makefile x11-toolkits/qt5-quickcontrols/Makefile
index 814bf5352edc..5c243bd2467f 100644
--- x11-toolkits/qt5-quickcontrols/Makefile
+++ x11-toolkits/qt5-quickcontrols/Makefile
@@ -12,10 +12,9 @@ BROKEN_aarch64=		fails to install: pkg-static: Unable to access file Application
 BROKEN_armv6=		fails to install: pkg-static: Unable to access file ApplicationWindow.qmlc: No such file or directory
 BROKEN_armv7=		fails to install: pkg-static: Unable to access file ApplicationWindow.qmlc: No such file or directory
 
-USES=		qmake
-USE_QT5=	core gui qml quick widgets \
+USES=		qmake qt-dist:5,quickcontrols
+USE_QT=		core gui qml quick widgets \
 		buildtools_build
-QT_DIST=	quickcontrols
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 .include <bsd.port.mk>
diff --git x11-toolkits/qt5-quickcontrols2/Makefile x11-toolkits/qt5-quickcontrols2/Makefile
index 5c5fdb580519..98a35516d01a 100644
--- x11-toolkits/qt5-quickcontrols2/Makefile
+++ x11-toolkits/qt5-quickcontrols2/Makefile
@@ -12,8 +12,8 @@ BROKEN_aarch64=		fails to install: pkg-static: Unable to access file Application
 BROKEN_armv6=		fails to install: pkg-static: Unable to access file ApplicationWindow.qmlc: No such file or directory
 BROKEN_armv7=		fails to install: pkg-static: Unable to access file ApplicationWindow.qmlc: No such file or directory
 
-USES=		qmake:norecursive
-USE_QT5=	core gui qml quick widgets \
+USES=		qmake:norecursive qt:5
+USE_QT=		core gui qml quick widgets \
 		buildtools_build
 QT_DIST=	${PORTNAME}
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
diff --git x11-toolkits/qt5-uiplugin/Makefile x11-toolkits/qt5-uiplugin/Makefile
index d49aa82e69c1..421bb08003b9 100644
--- x11-toolkits/qt5-uiplugin/Makefile
+++ x11-toolkits/qt5-uiplugin/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Custom Qt widget plugin interface for Qt Designer
 
-USE_QT5=	core gui widgets
-QT_DIST=	tools
-USES=		qmake
+USE_QT=		core gui widgets
+USES=		qmake qt-dist:5,tools
 
 BUILD_WRKSRC=   ${WRKSRC}/src/designer/src/${PORTNAME}
 INSTALL_WRKSRC= ${WRKSRC}/src/designer/src/${PORTNAME}
diff --git x11-toolkits/qt5-virtualkeyboard/Makefile x11-toolkits/qt5-virtualkeyboard/Makefile
index 8dc4d55a1a8b..1a59758d0c6f 100644
--- x11-toolkits/qt5-virtualkeyboard/Makefile
+++ x11-toolkits/qt5-virtualkeyboard/Makefile
@@ -8,10 +8,9 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt 5 Virtual Keyboard Module
 
-USE_QT5=	core network gui widgets svg qml quick buildtools_build
-QT_DIST=	${PORTNAME}
+USE_QT=		core network gui widgets svg qml quick buildtools_build
 
-USES=		qmake
+USES=		qmake qt-dist:5,virtualkeyboard
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 .include <bsd.port.mk>
diff --git x11-toolkits/qt5-widgets/Makefile x11-toolkits/qt5-widgets/Makefile
index a1d8f5c2c6e0..2a0223b0348d 100644
--- x11-toolkits/qt5-widgets/Makefile
+++ x11-toolkits/qt5-widgets/Makefile
@@ -8,8 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt C++ widgets module
 
-USE_QT5=	core gui qmake_build buildtools_build
-QT_DIST=	base
+USES=		qmake:no_env qt-dist:5,base
+USE_QT=		core gui qmake_build buildtools_build
 USE_XORG=	x11
 HAS_CONFIGURE=	yes
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
@@ -26,7 +26,7 @@ OPTIONS_DEFINE=	GTK3
 OPTIONS_SUB=	YES
 
 GTK3_DESC=	GTK+-based Qt theme
-GTK3_USE=	GNOME=gtk30 QT5=dbus
+GTK3_USE=	GNOME=gtk30 QT=dbus
 GTK3_CONFIGURE_ON=	-gtk
 GTK3_CONFIGURE_OFF=	-no-gtk
 
diff --git x11-toolkits/qt5pas/Makefile x11-toolkits/qt5pas/Makefile
index 425a9b5510ca..3c28495ddfbd 100644
--- x11-toolkits/qt5pas/Makefile
+++ x11-toolkits/qt5pas/Makefile
@@ -9,8 +9,8 @@ MAINTAINER=	acm@FreeBSD.org
 COMMENT=	Qt5 binding for FreePascal
 
 USE_LDCONFIG=	yes
-USES=		qmake
-USE_QT5=	buildtools_build core gui network printsupport x11extras
+USES=		qmake qt:5
+USE_QT=		buildtools_build core gui network printsupport x11extras
 
 QT5_VER_MIN=	5.6.1
 
diff --git x11-toolkits/qtermwidget-l10n/Makefile x11-toolkits/qtermwidget-l10n/Makefile
index d36d76694120..99bf7e8e3f17 100644
--- x11-toolkits/qtermwidget-l10n/Makefile
+++ x11-toolkits/qtermwidget-l10n/Makefile
@@ -17,8 +17,8 @@ DISTINFO_FILE=	${MASTERDIR}/distinfo
 DESCR=		${MASTERDIR}/pkg-descr
 PLIST=		${.CURDIR}/pkg-plist
 
-USES=		cmake:outsource lxqt pkgconfig tar:xz
-USE_QT5=	buildtools_build qmake_build linguisttools
+USES=		cmake:outsource lxqt pkgconfig qt:5 tar:xz
+USE_QT=		buildtools_build qmake_build linguisttools
 USE_LXQT=	buildtools
 
 CMAKE_ARGS+=	-DWITH_COMPTON_CONF:BOOL=OFF \
diff --git x11-toolkits/qtermwidget/Makefile x11-toolkits/qtermwidget/Makefile
index 4a08113ca4f5..f51a4ea0adbc 100644
--- x11-toolkits/qtermwidget/Makefile
+++ x11-toolkits/qtermwidget/Makefile
@@ -16,9 +16,9 @@ BROKEN_armv6=		fails to compile: Emulation.cpp:135:14: 'ScreenWindow' does not r
 BROKEN_armv7=		fails to compile: Emulation.cpp:135:14: 'ScreenWindow' does not refer to a value
 
 USES=	cmake:outsource compiler:c++11-lang gettext-runtime lxqt \
-	pkgconfig tar:xz
+	pkgconfig qt:5 tar:xz
 USE_LDCONFIG=	yes
-USE_QT5=	buildtools_build core gui qmake_build linguisttools widgets
+USE_QT=		buildtools_build core gui qmake_build linguisttools widgets
 USE_LXQT=	buildtools
 
 .include <bsd.port.mk>
diff --git x11-toolkits/qwt5-designerplugin/Makefile x11-toolkits/qwt5-designerplugin/Makefile
index c27e5e4819ac..d53944e7186b 100644
--- x11-toolkits/qwt5-designerplugin/Makefile
+++ x11-toolkits/qwt5-designerplugin/Makefile
@@ -12,8 +12,8 @@ COMMENT=	Qt Designer plugin for Qwt
 
 LIB_DEPENDS=	libqwt.so:x11-toolkits/qwt5
 
-USES=		gmake qmake tar:bzip2
-USE_QT4=	designer moc_build rcc_build
+USES=		gmake qmake qt:4 tar:bzip2
+USE_QT=		designer moc_build rcc_build
 QMAKE_ARGS+=	CONFIG+=QwtDesigner \
 		PLUGINDIR=${PREFIX}/${QT_PLUGINDIR_REL}
 PORTSCOUT=	limit:^5\.
diff --git x11-toolkits/qwt5/Makefile x11-toolkits/qwt5/Makefile
index 20e017dc9d68..484104595b79 100644
--- x11-toolkits/qwt5/Makefile
+++ x11-toolkits/qwt5/Makefile
@@ -9,8 +9,8 @@ PKGNAMESUFFIX=	5
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Qt Widgets for Technical Applications
 
-USES=		gmake qmake tar:bzip2
-USE_QT4=	gui svg moc_build
+USES=		gmake qmake qt:4 tar:bzip2
+USE_QT=		gui svg moc_build
 USE_LDCONFIG=	yes
 PORTSCOUT=	limit:^5\.
 
diff --git x11-toolkits/qwt6/Makefile x11-toolkits/qwt6/Makefile
index bf08f9b6ed7c..93a14cd35ab8 100644
--- x11-toolkits/qwt6/Makefile
+++ x11-toolkits/qwt6/Makefile
@@ -25,9 +25,11 @@ PLIST_SUB=	SHLIB_VER=${PORTVERSION} \
 QMAKE_ARGS+=	PLUGINDIR=${PREFIX}/${QT_PLUGINDIR_REL}
 
 .if ${FLAVOR} == qt4
-USE_QT4=	corelib designer gui opengl svg xml moc_build rcc_build script
+USES+=		qt:4
+USE_QT=		corelib designer gui opengl svg xml moc_build rcc_build script
 .else
-USE_QT5=	buildtools_build widgets gui core designer gui opengl svg xml printsupport concurrent
+USES+=		qt:5
+USE_QT=		buildtools_build widgets gui core designer gui opengl svg xml printsupport concurrent
 .endif
 
 OPTIONS_DEFINE=	DOCS
diff --git x11-toolkits/soqt/Makefile x11-toolkits/soqt/Makefile
index d133c0c15768..217a3a3f3397 100644
--- x11-toolkits/soqt/Makefile
+++ x11-toolkits/soqt/Makefile
@@ -16,9 +16,8 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.GPL
 
 LIB_DEPENDS=	libCoin.so:graphics/Coin
 
-USES=		gmake libtool pathfix pkgconfig
-USE_QT4=	corelib opengl moc_build
-QT_NONSTANDARD=	yes
+USES=		gmake libtool pathfix pkgconfig qmake:no_env qt:4
+USE_QT=		corelib opengl moc_build
 USE_GL=		gl
 GNU_CONFIGURE=	yes
 CONFIGURE_ENV=	QTDIR="${PREFIX}" MOC="${MOC}"
diff --git x11-wm/plasma5-kdecoration/Makefile x11-wm/plasma5-kdecoration/Makefile
index d2e4a25bf9c0..1dac2e4c77fe 100644
--- x11-wm/plasma5-kdecoration/Makefile
+++ x11-wm/plasma5-kdecoration/Makefile
@@ -10,9 +10,9 @@ COMMENT=	Plasma5 library to create window decorations
 LICENSE=	LGPL21
 LICENSE_FILE=	${WRKSRC}/COPYING.LIB
 
-USES=		cmake:outsource compiler:c++11-lib cpe kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib cpe kde:5 qt:5 tar:xz
 USE_LDCONFIG=	yes
 USE_KDE=	ecm
-USE_QT5=	core gui testlib buildtools_build qmake_build
+USE_QT=		core gui testlib buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git x11-wm/plasma5-kwin/Makefile x11-wm/plasma5-kwin/Makefile
index 33abd1bddb00..59843fca4d55 100644
--- x11-wm/plasma5-kwin/Makefile
+++ x11-wm/plasma5-kwin/Makefile
@@ -28,7 +28,7 @@ BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:multimedia/v4l_compat \
 RUN_DEPENDS=	Xwayland:x11-servers/xwayland
 
 USES=		cmake:outsource compiler:c++11-lib cpe gettext \
-		kde:5 pkgconfig tar:xz
+		kde:5 pkgconfig qt:5 tar:xz
 USE_GL=		egl
 USE_KDE=	activities activities attica auth breeze codecs \
 		completion config configwidgets coreaddons crash decoration \
@@ -37,7 +37,7 @@ USE_KDE=	activities activities attica auth breeze codecs \
 		newstuff notifications plasma-framework service sonnet \
 		textwidgets wayland widgetsaddons windowsystem xmlgui
 USE_LDCONFIG=	yes
-USE_QT5=	concurrent core dbus gui multimedia network qml quick script \
+USE_QT=		concurrent core dbus gui multimedia network qml quick script \
 		sensors testlib uiplugin uitools widgets x11extras xml \
 		buildtools_build qmake_build \
 		quickcontrols2_run virtualkeyboard_run
diff --git x11-wm/qlwm/Makefile x11-wm/qlwm/Makefile
index bbf648b8f612..546e30ec20de 100644
--- x11-wm/qlwm/Makefile
+++ x11-wm/qlwm/Makefile
@@ -15,7 +15,8 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 MAKE_JOBS_UNSAFE= yes
 
-USE_QT4=	corelib gui moc_build qmake_build
+USES=	qt:4
+USE_QT=		corelib gui moc_build qmake_build
 
 PORTDOCS=	CHANGES README
 
diff --git x11/antimicro/Makefile x11/antimicro/Makefile
index bf88421aeb77..b6592b47badc 100644
--- x11/antimicro/Makefile
+++ x11/antimicro/Makefile
@@ -20,8 +20,8 @@ GH_ACCOUNT=	antimicro #Ryochan7
 LDFLAGS+=	-L${LOCALBASE}/lib
 
 USE_XORG=	x11 xi xtst
-USE_QT5=	core gui linguisttools_build qmake_build buildtools_build widgets network
+USE_QT=		core gui linguisttools_build qmake_build buildtools_build widgets network
 USE_SDL=	sdl2
-USES=		cmake:outsource pkgconfig desktop-file-utils shared-mime-info
+USES=		cmake:outsource pkgconfig desktop-file-utils qt:5 shared-mime-info
 
 .include <bsd.port.mk>
diff --git x11/cool-retro-term/Makefile x11/cool-retro-term/Makefile
index 286c407a5fd7..1abc93dced40 100644
--- x11/cool-retro-term/Makefile
+++ x11/cool-retro-term/Makefile
@@ -17,8 +17,8 @@ GH_ACCOUNT=	Swordfish90
 GH_PROJECT=	qmltermwidget:qtw
 GH_TAGNAME=	v0.1.0:qtw
 
-USES=		desktop-file-utils qmake
-USE_QT5=	qmake_build buildtools_build core gui qml quick widgets \
+USES=		desktop-file-utils qmake qt:5
+USE_QT=		qmake_build buildtools_build core gui qml quick widgets \
 		graphicaleffects_run quickcontrols_run
 
 .include <bsd.port.pre.mk>
diff --git x11/dsbautostart/Makefile x11/dsbautostart/Makefile
index eae549152399..a3c9739fb65d 100644
--- x11/dsbautostart/Makefile
+++ x11/dsbautostart/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Manage commands to be executed at X session start
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		tar:tgz qmake
+USES=		qt:5 tar:tgz qmake
 
 USE_GL=		gl
-USE_QT5=	buildtools_build core gui linguisttools_build widgets
+USE_QT=		buildtools_build core gui linguisttools_build widgets
 
 .include <bsd.port.mk>
diff --git x11/kactivities/Makefile x11/kactivities/Makefile
index 5a8d73303cdb..afa1961a9380 100644
--- x11/kactivities/Makefile
+++ x11/kactivities/Makefile
@@ -10,9 +10,9 @@ DIST_SUBDIR=	KDE/${PORTVERSION}
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Kactivities library
 
-USES=		cmake:outsource compiler:c++11-lib kde:4 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs soprano nepomuk-core
-USE_QT4=	declarative moc_build qmake_build rcc_build uic_build
+USE_QT=		declarative moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 
 post-patch:
diff --git x11/kactivitymanagerd/Makefile x11/kactivitymanagerd/Makefile
index d15fe3c684b9..bb9a130b281a 100644
--- x11/kactivitymanagerd/Makefile
+++ x11/kactivitymanagerd/Makefile
@@ -11,10 +11,10 @@ DIST_SUBDIR=	KDE/${PORTVERSION}
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Activity Manager daemon
 
-USES=		cmake:outsource compiler:c++11-lib kde:4 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 kdelibs soprano nepomuk-core \
 		kactivities
-USE_QT4=	declarative opengl script sql \
+USE_QT=		declarative opengl script sql \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 DISTINFO_FILE=	${.CURDIR}/../kactivities/distinfo
diff --git x11/kde-baseapps-kde4/Makefile x11/kde-baseapps-kde4/Makefile
index c7774e714cbe..f50536b4cb46 100644
--- x11/kde-baseapps-kde4/Makefile
+++ x11/kde-baseapps-kde4/Makefile
@@ -11,11 +11,11 @@ COMMENT=	Basic applications for KDE
 
 LIB_DEPENDS=	libtidy.so:www/tidy-lib
 
-USES=		cmake:outsource gettext kde:4 tar:xz
+USES=		cmake:outsource gettext kde:4 qt:4 tar:xz
 USE_GNOME=	glib20
 USE_KDE=	kdelibs baloo baloo-widgets libkonq \
 		automoc4 kactivities
-USE_QT4=	corelib dbus gui script xml \
+USE_QT=		corelib dbus gui script xml \
 		moc_build qmake_build rcc_build uic_build
 USE_XORG=	x11 xt
 USE_LDCONFIG=	yes
diff --git x11/kde-runtime-kde4/Makefile x11/kde-runtime-kde4/Makefile
index f87f4f795fbf..42e35e84d96d 100644
--- x11/kde-runtime-kde4/Makefile
+++ x11/kde-runtime-kde4/Makefile
@@ -26,11 +26,11 @@ LIB_DEPENDS=	libexiv2.so:graphics/exiv2 \
 BUILD_DEPENDS=	${LOCALBASE}/lib/libssh.so:security/libssh
 RUN_DEPENDS=	cagibid:net/cagibi
 
-USES=		cmake:outsource gettext jpeg kde:4 samba:lib shared-mime-info \
+USES=		cmake:outsource gettext jpeg kde:4 qt:4 samba:lib shared-mime-info \
 		shebangfix tar:xz
 USE_KDE=	kactivities kdelibs oxygen-icons5 \
 		attica automoc4 pimlibs soprano strigi nepomuk-core
-USE_QT4=	corelib dbus declarative designer_build gui phonon \
+USE_QT=		corelib dbus declarative designer_build gui phonon \
 		network qtestlib script svg webkit xml \
 		moc_build qmake_build rcc_build uic_build
 USE_XORG=	ice sm x11 xau xcursor xext xft xdmcp xpm
diff --git x11/kde-workspace-kde4/Makefile x11/kde-workspace-kde4/Makefile
index e9a2f948a622..87c94f80a63b 100644
--- x11/kde-workspace-kde4/Makefile
+++ x11/kde-workspace-kde4/Makefile
@@ -42,12 +42,12 @@ RUN_DEPENDS=	${KDE_PREFIX}/env/xdg-env.sh:misc/kde4-xdg-env \
 		${KDE_PREFIX}/share/apps/ksplash/Themes/Default/Theme.rc:x11-themes/kde-base-artwork-kde4
 
 USES=		cmake:outsource,noninja compiler:c++11-lib gettext gmake jpeg kde:4 \
-		pkgconfig shebangfix tar:xz
+		pkgconfig qt:4 shebangfix tar:xz
 USE_GL=		gl glu
 USE_GNOME=	glib20 libxml2
 USE_KDE=	kactivities kdelibs nepomuk-core oxygen-icons5 \
 		pimlibs akonadi automoc4 ontologies qimageblitz soprano strigi
-USE_QT4=	corelib dbus declarative designer_build gui network \
+USE_QT=		corelib dbus declarative designer_build gui network \
 		opengl phonon qtestlib script sql svg webkit xml \
 		moc_build qmake_build rcc_build uic_build
 USE_XORG=	ice sm kbproto x11 xau xcb xcomposite xcursor xdamage xdmcp xext xfixes \
@@ -90,7 +90,8 @@ GPS_CMAKE_ON=	-DWITH_libgps:BOOL=ON
 GPS_CMAKE_OFF=	-DWITH_libgps:BOOL=OFF
 
 GSTREAMER_DESC=	Multimedia via Phonon-GStreamer
-GSTREAMER_USE=	QT4=phonon-gst_run
+GSTREAMER_USES=	qt:4
+GSTREAMER_USE=	QT=phonon-gst_run
 
 KACTIVITY_DESC=		Activity Manager daemon
 KACTIVITY_RUN_DEPENDS=	${KDE_PREFIX}/bin/kactivitymanagerd:x11/kactivitymanagerd
diff --git x11/kde5/Makefile x11/kde5/Makefile
index bf93841a75f2..47c59cc9d5a5 100644
--- x11/kde5/Makefile
+++ x11/kde5/Makefile
@@ -12,9 +12,9 @@ LICENSE=	LGPL20
 RUN_DEPENDS=	kde-baseapps>=0:x11/kde-baseapps \
 		kwalletmanager5:security/kwalletmanager
 
-USES=		kde:5 metaport
+USES=		kde:5 metaport qt:5
 USE_KDE=	plasma-desktop_run
-USE_QT5=	# empty
+USE_QT=		# empty
 
 OPTIONS_DEFINE=	KDEADMIN KDEEDU \
 		KDEGAMES KDEGRAPHICS KDEMULTIMEDIA KDENETWORK \
diff --git x11/kdelibs-kde4/Makefile x11/kdelibs-kde4/Makefile
index 08411281caa3..ea05e49ab677 100644
--- x11/kdelibs-kde4/Makefile
+++ x11/kdelibs-kde4/Makefile
@@ -34,11 +34,11 @@ RUN_DEPENDS=	${LOCALBASE}/share/icons/hicolor/index.theme:misc/hicolor-icon-them
 KDE_APPLICATIONS_VERSION=	17.08.3
 
 USES=		cmake:outsource fam gettext grantlee:4 jpeg kde:4 perl5 \
-		shared-mime-info shebangfix tar:xz ssl
+		qt:4 shared-mime-info shebangfix tar:xz ssl
 USE_GNOME=	libxml2 libxslt
 USE_KDE=	oxygen-icons5 \
 		attica automoc4 ontologies soprano strigi
-USE_QT4=	corelib dbus declarative designer_build gui \
+USE_QT=		corelib dbus declarative designer_build gui \
 		network opengl phonon qt3support \
 		qtestlib script sql svg webkit xml \
 		moc_build qmake_build rcc_build uic_build \
diff --git x11/kf5-frameworkintegration/Makefile x11/kf5-frameworkintegration/Makefile
index 3ab54f7b27d6..ea9559666a46 100644
--- x11/kf5-frameworkintegration/Makefile
+++ x11/kf5-frameworkintegration/Makefile
@@ -8,10 +8,10 @@ MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 workspace and cross-framework integration plugins
 
 USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig \
-		tar:xz
+		qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons ecm i18n \
 		iconthemes kio newstuff notifications package widgetsaddons
-USE_QT5=	buildtools_build core dbus gui qmake_build widgets \
+USE_QT=		buildtools_build core dbus gui qmake_build widgets \
 		x11extras xml
 USE_XORG=	xcb xcursor
 
diff --git x11/kf5-frameworks/Makefile x11/kf5-frameworks/Makefile
index 7b9d0557e9ff..988139d0d6a7 100644
--- x11/kf5-frameworks/Makefile
+++ x11/kf5-frameworks/Makefile
@@ -9,11 +9,11 @@ PKGNAMEPREFIX=	kf5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 frameworks meta port
 
-USES=		metaport kde:5
+USES=		metaport kde:5 qt:5
 # remove:
 #   * bluez-qt as we do have bluez
 USE_KDE=	${_USE_FRAMEWORKS_ALL:Nbluez-qt}
 # pull bsd.qt.mk for QT_PLUGINDIR in the kf5-dependencies
-USE_QT5=	#
+USE_QT=		#
 
 .include <bsd.port.mk>
diff --git x11/kf5-kactivities-stats/Makefile x11/kf5-kactivities-stats/Makefile
index a5879dca1800..f3b458a6af28 100644
--- x11/kf5-kactivities-stats/Makefile
+++ x11/kf5-kactivities-stats/Makefile
@@ -10,8 +10,8 @@ COMMENT=	KF5 statistics for activities
 LIB_DEPENDS=	libboost_system.so:devel/boost-libs
 RUN_DEPENDS=	kactivitymanagerd:x11/plasma5-kactivitymanagerd
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 pathfix tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 pathfix qt:5 tar:xz
 USE_KDE=	activities config ecm
-USE_QT5=	buildtools_build core dbus qmake_build sql
+USE_QT=		buildtools_build core dbus qmake_build sql
 
 .include <bsd.port.mk>
diff --git x11/kf5-kactivities/Makefile x11/kf5-kactivities/Makefile
index 3a0d85c4f9ca..7b984c9f7889 100644
--- x11/kf5-kactivities/Makefile
+++ x11/kf5-kactivities/Makefile
@@ -9,11 +9,11 @@ COMMENT=	KF5 runtime and library to organize work in separate activities
 
 LIB_DEPENDS=	libboost_system.so:devel/boost-libs
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pathfix tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pathfix qt:5 tar:xz
 USE_KDE=	bookmarks config configwidgets coreaddons dbusaddons ecm \
 		globalaccel i18n kcmutils kdeclarative  kio package \
 		service widgetsaddons windowsystem xmlgui
-USE_QT5=	buildtools_build core dbus gui network qmake_build qml \
+USE_QT=		buildtools_build core dbus gui network qmake_build qml \
 		quick sql widgets
 
 .include <bsd.port.mk>
diff --git x11/kf5-kded/Makefile x11/kf5-kded/Makefile
index 3fe5459c74b2..f94f6d820018 100644
--- x11/kf5-kded/Makefile
+++ x11/kf5-kded/Makefile
@@ -7,9 +7,9 @@ CATEGORIES=	x11 kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 extensible deamon for providing system level services
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons crash dbusaddons doctools ecm \
 		init service
-USE_QT5=	buildtools_build core dbus gui qmake_build widgets
+USE_QT=		buildtools_build core dbus gui qmake_build widgets
 
 .include <bsd.port.mk>
diff --git x11/kf5-kdelibs4support/Makefile x11/kf5-kdelibs4support/Makefile
index 67ffdb3e274a..ef265da64148 100644
--- x11/kf5-kdelibs4support/Makefile
+++ x11/kf5-kdelibs4support/Makefile
@@ -9,7 +9,7 @@ COMMENT=	KF5 porting aid from KDELibs4
 
 BUILD_DEPENDS=	p5-URI>=0:net/p5-URI
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 shebangfix \
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 shebangfix \
 		tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons doctools emoticons globalaccel guiaddons \
@@ -18,7 +18,7 @@ USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		widgetsaddons windowsystem xmlgui \
 		designerplugin_build designerplugin_run \
 		itemmodels_run
-USE_QT5=	buildtools_build core dbus designer gui network \
+USE_QT=		buildtools_build core dbus designer gui network \
 		printsupport qmake_build svg testlib widgets \
 		x11extras xml
 USE_XORG=	ice sm x11 xext
diff --git x11/kf5-kglobalaccel/Makefile x11/kf5-kglobalaccel/Makefile
index c98a29090ab7..eb1fe18f2409 100644
--- x11/kf5-kglobalaccel/Makefile
+++ x11/kf5-kglobalaccel/Makefile
@@ -9,10 +9,10 @@ COMMENT=	KF5 library to add support for global workspace shortcuts
 
 LIB_DEPENDS=	libxcb-keysyms.so:x11/xcb-util-keysyms
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 qt:5 tar:xz
 USE_KDE=	ecm config coreaddons crash dbusaddons i18n service \
 		windowsystem
-USE_QT5=	buildtools_build core dbus gui linguisttools qmake_build \
+USE_QT=		buildtools_build core dbus gui linguisttools qmake_build \
 		testlib widgets x11extras
 USE_XORG=	xcb
 
diff --git x11/kf5-kinit/Makefile x11/kf5-kinit/Makefile
index e88f8a56a75a..0cd9b32ec94e 100644
--- x11/kf5-kinit/Makefile
+++ x11/kf5-kinit/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	x11 kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 process launcher to speed up launching KDE applications
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	completion config coreaddons crash doctools ecm i18n \
 		jobwidgets kio service widgetsaddons windowsystem
-USE_QT5=	buildtools_build core dbus gui network qmake_build widgets
+USE_QT=		buildtools_build core dbus gui network qmake_build widgets
 USE_XORG=	x11 xcb
 
 .include <bsd.port.mk>
diff --git x11/kf5-krunner/Makefile x11/kf5-krunner/Makefile
index 0c10e52f7136..22112e5dff27 100644
--- x11/kf5-krunner/Makefile
+++ x11/kf5-krunner/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	x11 kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 parallelized query system
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	config coreaddons ecm i18n kio package plasma-framework \
 		service solid threadweaver
-USE_QT5=	buildtools_build core gui network qmake_build qml \
+USE_QT=		buildtools_build core gui network qmake_build qml \
 		quick widgets
 
 .include <bsd.port.mk>
diff --git x11/kf5-kwayland/Makefile x11/kf5-kwayland/Makefile
index 9bc4cfc99b56..566e42288206 100644
--- x11/kf5-kwayland/Makefile
+++ x11/kf5-kwayland/Makefile
@@ -15,9 +15,9 @@ LICENSE_COMB=	dual
 LICENSE_FILE_LGPL21=	${WRKSRC}/COPYING.LIB
 
 USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig \
-		tar:xz
+		qt:5 tar:xz
 USE_GL=		egl
 USE_KDE=	ecm
-USE_QT5=	buildtools_build concurrent core gui qmake_build testlib
+USE_QT=		buildtools_build concurrent core gui qmake_build testlib
 
 .include <bsd.port.mk>
diff --git x11/kf5-kwindowsystem/Makefile x11/kf5-kwindowsystem/Makefile
index 46943c4463ad..903d5596bd2f 100644
--- x11/kf5-kwindowsystem/Makefile
+++ x11/kf5-kwindowsystem/Makefile
@@ -9,9 +9,9 @@ COMMENT=	KF5 library for access to the windowing system
 
 LIB_DEPENDS=	libxcb-keysyms.so:x11/xcb-util-keysyms
 
-USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lib kde:5 pkgconfig qt:5 tar:xz
 USE_KDE=	ecm
-USE_QT5=	buildtools_build core gui linguisttools qmake_build \
+USE_QT=		buildtools_build core gui linguisttools qmake_build \
 		testlib widgets x11extras
 USE_XORG=	ice sm x11 xcb xext xfixes xrender
 
diff --git x11/kf5-plasma-framework/Makefile x11/kf5-plasma-framework/Makefile
index 2e87b1586559..81fd012dc088 100644
--- x11/kf5-plasma-framework/Makefile
+++ x11/kf5-plasma-framework/Makefile
@@ -7,14 +7,14 @@ CATEGORIES=	x11 kde kde-frameworks
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KF5 plugin based UI runtime used to write user interfaces
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 pkgconfig qt:5 tar:xz
 USE_GL=		egl gl
 USE_KDE=	activities archive auth codecs completion config \
 		configwidgets coreaddons dbusaddons doctools globalaccel \
 		guiaddons i18n iconthemes jobwidgets kirigami2 kio package \
 		notifications service wayland windowsystem xmlgui kdeclarative \
 		widgetsaddons
-USE_QT5=	buildtools_build core dbus gui network qmake_build qml \
+USE_QT=		buildtools_build core dbus gui network qmake_build qml \
 		quick script sql svg widgets x11extras xml
 USE_XORG=	ice sm x11 xcb xext xrandr
 
diff --git x11/kgamma-kde4/Makefile x11/kgamma-kde4/Makefile
index 8001281dfebf..64e1ac1493f9 100644
--- x11/kgamma-kde4/Makefile
+++ x11/kgamma-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	x11 kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE 4 monitor calibration tool
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4
-USE_QT4=	moc_build qmake_build rcc_build uic_build
+USE_QT=		moc_build qmake_build rcc_build uic_build
 USE_XORG=	x11 xxf86vm
 
 .include <bsd.port.mk>
diff --git x11/konsole-kde4/Makefile x11/konsole-kde4/Makefile
index db29ce6a90ca..9786b11011ef 100644
--- x11/konsole-kde4/Makefile
+++ x11/konsole-kde4/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	x11 kde kde-kde4
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	KDE terminal emulator
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	automoc4 libkonq
-USE_QT4=	xml moc_build qmake_build rcc_build uic_build
+USE_QT=		xml moc_build qmake_build rcc_build uic_build
 USE_XORG=	x11 xrender
 CMAKE_ARGS+=	-DCMAKE_REQUIRED_FLAGS:STRING="-L${LOCALBASE}/lib"
 
diff --git x11/konsole/Makefile x11/konsole/Makefile
index eac4835cec04..1eded20cc54b 100644
--- x11/konsole/Makefile
+++ x11/konsole/Makefile
@@ -11,13 +11,13 @@ BUILD_DEPENDS=	${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-
 		docbook-xml>0:textproc/docbook-xml
 RUN_DEPENDS=	keditbookmarks:deskutils/keditbookmarks
 
-USES=		cmake:outsource gettext pkgconfig kde:5 tar:xz
+USES=		cmake:outsource gettext pkgconfig kde:5 qt:5 tar:xz
 USE_KDE=	auth attica bookmarks codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm emoticons globalaccel guiaddons i18n \
 		iconthemes init itemmodels jobwidgets kdelibs4support kio \
 		newstuff notifications notifyconfig parts pty service sonnet \
 		textwidgets widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network printsupport script scripttools sql \
+USE_QT=		core dbus gui network printsupport script scripttools sql \
 		widgets xml \
 		buildtools_build qmake_build
 
diff --git x11/leechcraft/Makefile x11/leechcraft/Makefile
index 079b7440981e..5285af44345d 100644
--- x11/leechcraft/Makefile
+++ x11/leechcraft/Makefile
@@ -20,8 +20,8 @@ LIB_DEPENDS=	libqwt6.so:x11-toolkits/qwt6@qt4 \
 #LC_REV=		1526-g7fdb92a
 INSTALLS_ICONS=	yes
 USE_LDCONFIG=	yes
-USES=		cmake pkgconfig tar:xz
-USE_QT4=	corelib declarative gui network script sql sql-sqlite3_run \
+USES=		cmake pkgconfig qt:4 tar:xz
+USE_QT=		corelib declarative gui network script sql sql-sqlite3_run \
 		webkit xml qmake_build moc_build rcc_build uic_build \
 		linguisttools_build
 USE_XORG=	x11
@@ -370,12 +370,12 @@ OPTIONS_DEFAULT=AGGREGATOR ANHERO ANOTIFI AUSCRIE AZOTH BLASQ BLOGIQUE CERTMGR \
     ${PORT_OPTIONS:MLAUGHTY} || ${PORT_OPTIONS:MLIZNOO} || \
     ${PORT_OPTIONS:MLMP}     || ${PORT_OPTIONS:MSYSNOTIFY} || \
     ${PORT_OPTIONS:MVROOBY}  || ${PORT_OPTIONS:MXTAZY}
-USE_QT4+=	dbus
+USE_QT+=	dbus
 .endif
 
 .if ${PORT_OPTIONS:MBLASQ} || ${PORT_OPTIONS:MBLOGIQUE} || \
     ${PORT_OPTIONS:MLACKMAN}
-USE_QT4+=	xmlpatterns
+USE_QT+=	xmlpatterns
 .endif
 
 .if ${PORT_OPTIONS:MAZOTH} || ${PORT_OPTIONS:MBLASQ} || \
diff --git x11/libfm-qt/Makefile x11/libfm-qt/Makefile
index 63d3a6c3bf53..f8bf47c2ff75 100644
--- x11/libfm-qt/Makefile
+++ x11/libfm-qt/Makefile
@@ -16,8 +16,8 @@ LIB_DEPENDS=	libfm.so:x11/libfm \
 	libexif.so:graphics/libexif
 
 USES=	cmake:outsource compiler:c++11-lib gettext-runtime lxqt pkgconfig \
-	shared-mime-info tar:xz
-USE_QT5=	buildtools_build qmake_build core gui linguisttools widgets \
+	qt:5 shared-mime-info tar:xz
+USE_QT=		buildtools_build qmake_build core gui linguisttools widgets \
 	x11extras
 USE_GNOME=	glib20
 USE_XORG=	xcb
diff --git x11/libfmqt-l10n/Makefile x11/libfmqt-l10n/Makefile
index 7d4e356e9259..da8d5fcd20b0 100644
--- x11/libfmqt-l10n/Makefile
+++ x11/libfmqt-l10n/Makefile
@@ -17,8 +17,8 @@ DISTINFO_FILE=	${MASTERDIR}/distinfo
 DESCR=	${MASTERDIR}/pkg-descr
 PLIST=	${.CURDIR}/pkg-plist
 
-USES=	cmake:outsource lxqt pkgconfig tar:xz
-USE_QT5=	buildtools_build qmake_build linguisttools
+USES=	cmake:outsource lxqt pkgconfig qt:5 tar:xz
+USE_QT=		buildtools_build qmake_build linguisttools
 USE_LXQT=	buildtools
 
 CMAKE_ARGS+=	-DWITH_COMPTON_CONF:BOOL=OFF \
diff --git x11/libkonq-kde4/Makefile x11/libkonq-kde4/Makefile
index 332f30d0e164..c3f9e8cc1b3a 100644
--- x11/libkonq-kde4/Makefile
+++ x11/libkonq-kde4/Makefile
@@ -11,9 +11,9 @@ COMMENT=	Core library for Konqueror
 
 LIB_DEPENDS=	libphonon.so:multimedia/phonon
 
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs automoc4 soprano
-USE_QT4=	corelib dbus gui network svg xml \
+USE_QT=		corelib dbus gui network svg xml \
 		moc_build qmake_build rcc_build uic_build
 USE_LDCONFIG=	yes
 USE_XORG=	x11
diff --git x11/lumina-core/Makefile x11/lumina-core/Makefile
index b57a924e2165..c72870c3fca7 100644
--- x11/lumina-core/Makefile
+++ x11/lumina-core/Makefile
@@ -39,11 +39,11 @@ RUN_DEPENDS+=	gstreamer1-plugins-core>=0:multimedia/gstreamer1-plugins-core
 
 MAKE_JOBS_UNSAFE=yes
 
-USES=		qmake
+USES=		qmake qt:5
 USE_GL=		gl
 USE_XORG=	x11 xdamage xcb
 USE_LDCONFIG=	yes
-USE_QT5=	core gui widgets network svg multimedia imageformats \
+USE_QT=		core gui widgets network svg multimedia imageformats \
 		buildtools_build x11extras concurrent
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
@@ -51,13 +51,13 @@ GH_PROJECT=	lumina
 GH_TAGNAME=	b6536c1547571ae8dd0618bed752e2e0025bf2a7
 WRKSRC_SUBDIR=	src-qt5/core
 
-#Setup the qmake configuration options
+#Setup the qmake qt:5 configuration options
 .if ${PORT_OPTIONS:MTRUEOS}
 QMAKE_ARGS=	DEFAULT_SETTINGS=TrueOS
 .endif
 
 .if${PORT_OPTIONS:MI18N}
-USE_QT5+=	linguist_build
+USE_QT+=	linguist_build
 QMAKE_ARGS+=CONFIG+=WITH_I18N
 .endif
 
diff --git x11/lumina-coreutils/Makefile x11/lumina-coreutils/Makefile
index 8f5e30471868..99919da7bcfc 100644
--- x11/lumina-coreutils/Makefile
+++ x11/lumina-coreutils/Makefile
@@ -24,9 +24,9 @@ I18N_DESC=	Install localization files
 
 MAKE_JOBS_UNSAFE=yes
 
-USES=		qmake
+USES=		qmake qt:5
 USE_LDCONFIG=	yes
-USE_QT5=	core gui widgets network svg imageformats \
+USE_QT=		core gui widgets network svg imageformats \
 		buildtools_build x11extras concurrent multimedia
 USE_GITHUB=	yes
 GH_ACCOUNT=	trueos
@@ -35,7 +35,7 @@ GH_TAGNAME=	b6536c1547571ae8dd0618bed752e2e0025bf2a7
 WRKSRC_SUBDIR=	src-qt5/core-utils
 
 .if${PORT_OPTIONS:MI18N}
-USE_QT5+=	linguist_build
+USE_QT+=	linguist_build
 QMAKE_ARGS+=CONFIG+=WITH_I18N
 .endif
 
diff --git x11/pcdm/Makefile x11/pcdm/Makefile
index 2b8e031a108d..e5daf103fd3b 100644
--- x11/pcdm/Makefile
+++ x11/pcdm/Makefile
@@ -19,8 +19,8 @@ MAKE_ARGS=	PREFIX=${STAGEDIR}${PREFIX}
 
 CONFLICTS=	pcbsd-utils-qt*
 
-USES=		qmake
-USE_QT5=	core gui network svg multimedia imageformats \
+USES=		qmake qt:5
+USE_QT=		core gui network svg multimedia imageformats \
 		buildtools_build x11extras concurrent linguisttools_build
 USE_OPENRC_SUBR=pcdm
 
diff --git x11/plasma-scriptengine-python-kde4/Makefile x11/plasma-scriptengine-python-kde4/Makefile
index aae0a332f80f..980652004ae1 100644
--- x11/plasma-scriptengine-python-kde4/Makefile
+++ x11/plasma-scriptengine-python-kde4/Makefile
@@ -11,9 +11,9 @@ MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma scriptengine for Python
 
 NO_ARCH=	yes
-USES=		cmake:outsource kde:4 python:2.7 tar:xz
+USES=		cmake:outsource kde:4 python:2.7 qt:4 tar:xz
 USE_KDE=	kdelibs pykde4 automoc4
-USE_QT4=	qmake_build moc_build uic_build rcc_build
+USE_QT=		qmake_build moc_build uic_build rcc_build
 DISTINFO_FILE=	${.CURDIR:H:H}/x11/kde-workspace-kde4/distinfo
 
 KDE_APPLICATIONS_VERSION=	15.08.0
diff --git x11/plasma-scriptengine-ruby-kde4/Makefile x11/plasma-scriptengine-ruby-kde4/Makefile
index 5820f6ac0a7d..366aba1b67d7 100644
--- x11/plasma-scriptengine-ruby-kde4/Makefile
+++ x11/plasma-scriptengine-ruby-kde4/Makefile
@@ -11,9 +11,9 @@ MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma scriptengine for Ruby
 
 NO_ARCH=	yes
-USES=		cmake:outsource kde:4 tar:xz
+USES=		cmake:outsource kde:4 qt:4 tar:xz
 USE_KDE=	kdelibs korundum automoc4
-USE_QT4=	qmake_build moc_build uic_build rcc_build
+USE_QT=		qmake_build moc_build uic_build rcc_build
 USE_RUBY=	yes
 DISTINFO_FILE=	${.CURDIR:H:H}/x11/kde-workspace-kde4/distinfo
 
diff --git x11/plasma5-kactivitymanagerd/Makefile x11/plasma5-kactivitymanagerd/Makefile
index 70809492aca8..d31a7cb05bc6 100644
--- x11/plasma5-kactivitymanagerd/Makefile
+++ x11/plasma5-kactivitymanagerd/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	x11 kde kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	System service to manage user's activities, track the usage patterns
 
-USES=		cmake:outsource compiler:c++11-lib gettext kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons dbusaddons ecm \
 		globalaccel i18n kio service widgetsaddons windowsystem xmlgui
-USE_QT5=	concurrent core dbus gui network sql widgets xml \
+USE_QT=		concurrent core dbus gui network sql widgets xml \
 		buildtools_build qmake_build
 
 # https://bugs.kde.org/show_bug.cgi?id=305529#c10
diff --git x11/plasma5-kgamma5/Makefile x11/plasma5-kgamma5/Makefile
index 4ef10f62acc2..a116bf56125c 100644
--- x11/plasma5-kgamma5/Makefile
+++ x11/plasma5-kgamma5/Makefile
@@ -7,13 +7,13 @@ CATEGORIES=	x11 kde kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 monitor's gamma settings
 
-USES=		cmake:outsource cpe gettext kde:5 tar:xz
+USES=		cmake:outsource cpe gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth bookmarks codecs completion config configwidgets \
 		coreaddons crash doctools ecm emoticons guiaddons i18n \
 		iconthemes init itemmodels itemviews jobwidgets \
 		kdelibs4support kio notifications parts service solid sonnet \
 		textwidgets unitconversion widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network printsupport widgets x11extras xml \
+USE_QT=		core dbus gui network printsupport widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	ice sm x11 xext xxf86vm
 
diff --git x11/plasma5-kscreen/Makefile x11/plasma5-kscreen/Makefile
index 4a6637a9642c..37217c01abc8 100644
--- x11/plasma5-kscreen/Makefile
+++ x11/plasma5-kscreen/Makefile
@@ -7,10 +7,10 @@ CATEGORIES=	x11 kde kde-plasma
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 screen management library
 
-USES=		cmake:outsource cpe gettext kde:5 tar:xz
+USES=		cmake:outsource cpe gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons dbusaddons ecm \
 		globalaccel i18n libkscreen widgetsaddons xmlgui
-USE_QT5=	core dbus gui network qml quick testlib widgets xml \
+USE_QT=		core dbus gui network qml quick testlib widgets xml \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git x11/plasma5-kwayland-integration/Makefile x11/plasma5-kwayland-integration/Makefile
index 757cf9aabba3..b626a7c09170 100644
--- x11/plasma5-kwayland-integration/Makefile
+++ x11/plasma5-kwayland-integration/Makefile
@@ -11,9 +11,9 @@ LIB_DEPENDS=	libepoxy.so:graphics/libepoxy \
 		libwayland-client.so:graphics/wayland
 BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:multimedia/v4l_compat
 
-USES=		cmake:outsource compiler:c++11-lib cpe kde:5 tar:xz
+USES=		cmake:outsource compiler:c++11-lib cpe kde:5 qt:5 tar:xz
 USE_KDE=	ecm idletime wayland windowsystem
-USE_QT5=	core gui widgets \
+USE_QT=		core gui widgets \
 		buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git x11/plasma5-libkscreen/Makefile x11/plasma5-libkscreen/Makefile
index b91a8531dbc6..e3ab6e23793f 100644
--- x11/plasma5-libkscreen/Makefile
+++ x11/plasma5-libkscreen/Makefile
@@ -8,9 +8,9 @@ MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Plasma5 screen management library
 
 USES=		cmake:outsource compiler:c++11-lib cpe kde:5 pathfix \
-		pkgconfig tar:xz
+		pkgconfig qt:5 tar:xz
 USE_KDE=	ecm wayland
-USE_QT5=	core dbus gui testlib x11extras \
+USE_QT=		core dbus gui testlib x11extras \
 		buildtools_build qmake_build
 USE_XORG=	x11 xcb xrandr
 
diff --git x11/plasma5-plasma-desktop/Makefile x11/plasma5-plasma-desktop/Makefile
index 57d232f04e62..8a4e7367ea60 100644
--- x11/plasma5-plasma-desktop/Makefile
+++ x11/plasma5-plasma-desktop/Makefile
@@ -23,7 +23,7 @@ BUILD_DEPENDS=	xf86-input-evdev>0:x11-drivers/xf86-input-evdev \
 		xf86-input-libinput>0:x11-drivers/xf86-input-libinput
 
 USES=		cmake:outsource compiler:c++11-lib cpe desktop-file-utils \
-		gettext kde:5 pkgconfig tar:xz
+		gettext kde:5 pkgconfig qt:5 tar:xz
 USE_GNOME=	glib20
 USE_KDE=	activities activities-stats archive attica auth baloo \
 		bookmarks codecs completion config configwidgets coreaddons \
@@ -37,7 +37,7 @@ USE_KDE=	activities activities-stats archive attica auth baloo \
 		widgetsaddons windowsystem xmlgui
 USE_KDE+=	drkonqi_run infocenter_run kmenuedit_run ksysguard_run \
 		polkit-kde-agent-1_run systemsettings_run
-USE_QT5=	concurrent core dbus gui network phonon4 printsupport qml \
+USE_QT=		concurrent core dbus gui network phonon4 printsupport qml \
 		quick sql svg widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	ice sm x11 xcb xcursor xext xfixes xft xi xrender
diff --git x11/plasma5-plasma-integration/Makefile x11/plasma5-plasma-integration/Makefile
index 7a690c6a4e38..0c3b0451cc79 100644
--- x11/plasma5-plasma-integration/Makefile
+++ x11/plasma5-plasma-integration/Makefile
@@ -10,12 +10,12 @@ COMMENT=	Qt Platform Theme integration plugins for the Plasma workspaces
 RUN_DEPENDS=	hack-font>=0:x11-fonts/hack-font
 
 USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 pkgconfig \
-		shebangfix tar:xz
+		qt:5 shebangfix tar:xz
 USE_KDE=	auth bookmarks breeze codecs completion config configwidgets \
 		coreaddons ecm i18n iconthemes itemviews jobwidgets kio \
 		notifications service solid wayland \
 		widgetsaddons windowsystem xmlgui
-USE_QT5=	concurrent core dbus gui network qml quick quickcontrols2 widgets \
+USE_QT=		concurrent core dbus gui network qml quick quickcontrols2 widgets \
 		x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	xcb xcursor
diff --git x11/plasma5-plasma-workspace/Makefile x11/plasma5-plasma-workspace/Makefile
index 9dc7f16e8d34..d893524fdcf3 100644
--- x11/plasma5-plasma-workspace/Makefile
+++ x11/plasma5-plasma-workspace/Makefile
@@ -22,7 +22,7 @@ RUN_DEPENDS=	ck-launch-session:sysutils/consolekit2\
 		iso-codes>=0:misc/iso-codes
 
 USES=		cmake:outsource compiler:c++11-lib cpe gettext kde:5 pkgconfig \
-		tar:xz
+		qt:5 tar:xz
 USE_KDE=	activities activitymanagerd attica auth baloo bookmarks \
 		codecs completion config configwidgets coreaddons crash \
 		dbusaddons doctools emoticons filemetadata globalaccel \
@@ -36,7 +36,7 @@ USE_KDE=	activities activitymanagerd attica auth baloo bookmarks \
 		widgetsaddons windowsystem xmlgui xmlrpcclient \
 		breeze_run breeze-icons_run oxygen-icons5_run \
 		kde-cli-tools_run kded_run milou_run
-USE_QT5=	concurrent core dbus graphicaleffects gui network phonon4 \
+USE_QT=		concurrent core dbus graphicaleffects gui network phonon4 \
 		printsupport qdbus qml quick quickcontrols_run script sql \
 		testlib webkit widgets x11extras xml \
 		paths_run \
diff --git x11/plasma5-plasma/Makefile x11/plasma5-plasma/Makefile
index df4e671b2202..dcc69916c28d 100644
--- x11/plasma5-plasma/Makefile
+++ x11/plasma5-plasma/Makefile
@@ -10,13 +10,13 @@ COMMENT=	KDE5 plasma meta port
 
 LICENSE=	LGPL20
 
-USES=		kde:5 metaport
+USES=		kde:5 metaport qt:5
 # remove:
 #   * bluedevil as we do have bluez
 #   * plasma-pa don't depend on plamsa-pa by default
 #   * breeze-kde4 don't pull in qt4 bits
 USE_KDE=	${_USE_PLASMA_ALL:Nplasma-pa:Nbreeze-kde4}
 # pull bsd.qt.mk for QT_PLUGINDIR in the kf5-dependencies
-USE_QT5=	#
+USE_QT=		#
 
 .include <bsd.port.mk>
diff --git x11/py-qt4-opengl/Makefile x11/py-qt4-opengl/Makefile
index 373e33c0e7c6..cba0d335ecfd 100644
--- x11/py-qt4-opengl/Makefile
+++ x11/py-qt4-opengl/Makefile
@@ -12,11 +12,11 @@ COMMENT=	Python bindings for the Qt4 toolkit, QtOpenGL module
 CONFIGURE_ARGS=	--enable QtOpenGL
 PYQT_DIST=	yes
 
-USES=		python pyqt:4
+USES=		python pyqt:4 qt:4
 USE_GL=		gl
 USE_PYQT=	sip_build core_run gui_run
 USE_PYTHON=	flavors
-USE_QT4=	corelib gui opengl moc_build qmake_build
+USE_QT=		corelib gui opengl moc_build qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git x11/py-qt5-opengl/Makefile x11/py-qt5-opengl/Makefile
index b853e3e07ae7..f6bfde6ed4a1 100644
--- x11/py-qt5-opengl/Makefile
+++ x11/py-qt5-opengl/Makefile
@@ -10,11 +10,11 @@ COMMENT=	Python bindings for the Qt5 toolkit, QtOpenGL module
 CONFIGURE_ARGS=	--enable QtOpenGL
 PYQT_DIST=	yes
 
-USES=		python pyqt:5
+USES=		python pyqt:5 qt:5
 USE_GL=		gl
 USE_PYQT=	sip_build core_run gui_run widgets_run
 USE_PYTHON=	flavors
-USE_QT5=	core gui opengl widgets qmake_build
+USE_QT=		core gui opengl widgets qmake_build
 
 OPTIONS_DEFINE=	API DEBUG
 OPTIONS_DEFAULT=API
diff --git x11/qimageblitz/Makefile x11/qimageblitz/Makefile
index 6d631143b865..cab8ed570e18 100644
--- x11/qimageblitz/Makefile
+++ x11/qimageblitz/Makefile
@@ -11,8 +11,8 @@ MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Graphical effects and filters library for KDE4
 
 USE_LDCONFIG=	yes
-USE_QT4=	corelib gui qmake_build moc_build uic_build rcc_build
-USES=		cmake tar:bzip2
+USE_QT=		corelib gui qmake_build moc_build uic_build rcc_build
+USES=		cmake qt:4 tar:bzip2
 USE_CXXSTD=	gnu++98
 
 post-patch:
diff --git x11/qt4-graphicssystems-opengl/Makefile x11/qt4-graphicssystems-opengl/Makefile
index 893928f5bc78..0cfc3208a17a 100644
--- x11/qt4-graphicssystems-opengl/Makefile
+++ x11/qt4-graphicssystems-opengl/Makefile
@@ -10,8 +10,8 @@ PKGNAMESUFFIX=	-opengl
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt OpenGL rendering engine (experimental)
 
-USE_QT4=	qmake_build opengl
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		opengl
 
 HAS_CONFIGURE=	yes
 USE_GL=		glu
diff --git x11/qt4-inputmethods/Makefile x11/qt4-inputmethods/Makefile
index a8704ab20d33..6b811cf1cb5c 100644
--- x11/qt4-inputmethods/Makefile
+++ x11/qt4-inputmethods/Makefile
@@ -10,8 +10,8 @@ PKGNAMEPREFIX=	qt4-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt input methods
 
-USE_QT4=	qmake_build moc_build corelib gui
-QT_DIST=	yes
+USES=		qmake:no_env qt-dist:4
+USE_QT=		moc_build corelib gui
 
 HAS_CONFIGURE=	yes
 
diff --git x11/qt5-qev/Makefile x11/qt5-qev/Makefile
index c769bf53e5a9..dafa723f3ed7 100644
--- x11/qt5-qev/Makefile
+++ x11/qt5-qev/Makefile
@@ -8,15 +8,14 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt QWidget events introspection tool
 
-USE_QT5=	core widgets
-QT_DIST=	tools
-USES=		qmake
+USE_QT=		core widgets
+USES=		qmake qt-dist:5,tools
 
 WRKSRC_SUBDIR=	src/${PORTNAME}
 
-# qev is not connected to qttool's build system, so we cannot just run qmake
+# qev is not connected to qttool's build system, so we cannot just run qmake qt-dist:5,tools
 # and set {BUILD,INSTALL}_WRKSRC.
-# Instead, we run qmake from src/${PORTNAME} but need to copy .qmake.conf to
+# Instead, we run qmake qt-dist:5,tools from src/${PORTNAME} but need to copy .qmake qt-dist:5,tools.conf to
 # it for all required variables to be set (MODULE_VERSION etc).
 post-patch:
 	${CP} ${WRKSRC}/../../.qmake.conf ${WRKSRC}
diff --git x11/qt5-x11extras/Makefile x11/qt5-x11extras/Makefile
index e8b29fadb3df..c84cc938dc4e 100644
--- x11/qt5-x11extras/Makefile
+++ x11/qt5-x11extras/Makefile
@@ -8,9 +8,8 @@ PKGNAMEPREFIX=	qt5-
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	Qt platform-specific features for X11-based systems
 
-USE_QT5=	core gui
-QT_DIST=	x11extras
-USES=		qmake
+USE_QT=		core gui
+USES=		qmake qt-dist:5,x11extras
 USE_LDCONFIG=	${PREFIX}/${QT_LIBDIR_REL}
 
 .include <bsd.port.mk>
diff --git x11/qterminal-l10n/Makefile x11/qterminal-l10n/Makefile
index 569c175a0321..4c2bfff2099c 100644
--- x11/qterminal-l10n/Makefile
+++ x11/qterminal-l10n/Makefile
@@ -17,8 +17,8 @@ DISTINFO_FILE=	${MASTERDIR}/distinfo
 DESCR=	${MASTERDIR}/pkg-descr
 PLIST=	${.CURDIR}/pkg-plist
 
-USES=	cmake:outsource lxqt pkgconfig tar:xz
-USE_QT5=	buildtools_build qmake_build linguisttools
+USES=	cmake:outsource lxqt pkgconfig qt:5 tar:xz
+USE_QT=		buildtools_build qmake_build linguisttools
 USE_LXQT=	buildtools
 
 CMAKE_ARGS+=	-DWITH_COMPTON_CONF:BOOL=OFF \
diff --git x11/qterminal/Makefile x11/qterminal/Makefile
index e0ab1bf52710..dc5a34826ab3 100644
--- x11/qterminal/Makefile
+++ x11/qterminal/Makefile
@@ -15,8 +15,8 @@ RUN_DEPENDS=	liberation-fonts-ttf>=2.00:x11-fonts/liberation-fonts-ttf \
 	qterminal-l10n>0:x11/qterminal-l10n
 
 USES=	cmake:outsource compiler:c++11-lang gettext-runtime \
-	localbase:ldflags lxqt pkgconfig tar:xz
-USE_QT5=	buildtools_build core gui qmake_build dbus linguisttools \
+	localbase:ldflags lxqt pkgconfig qt:5 tar:xz
+USE_QT=		buildtools_build core gui qmake_build dbus linguisttools \
 	widgets x11extras
 USE_XORG=	x11
 USE_LXQT=	buildtools lxqt
diff --git x11/qxkb/Makefile x11/qxkb/Makefile
index 2730fdd1eb3a..9b0810a4432a 100644
--- x11/qxkb/Makefile
+++ x11/qxkb/Makefile
@@ -13,8 +13,8 @@ LICENSE=	GPLv2+
 
 LIB_DEPENDS=	libxkbfile.so:x11/libxkbfile
 
-USES=		cmake
-USE_QT4=	linguisttools_build moc_build qmake_build rcc_build uic_build \
+USES=		cmake qt:4
+USE_QT=		linguisttools_build moc_build qmake_build rcc_build uic_build \
 		corelib gui svg
 
 USE_GITHUB=	yes
diff --git x11/radare-cutter/Makefile x11/radare-cutter/Makefile
index 85cd35b7373a..745875cecafa 100644
--- x11/radare-cutter/Makefile
+++ x11/radare-cutter/Makefile
@@ -16,12 +16,12 @@ RUN_DEPENDS=	python3:lang/python3
 
 LIB_DEPENDS=	libr2.so:devel/radare2
 
-USES=		pkgconfig python:3.4+ qmake
+USES=		pkgconfig python:3.4+ qmake qt:5
 USE_GITHUB=	yes
 GH_ACCOUNT=	radareorg
 GH_PROJECT=	cutter
 
-USE_QT5=	buildtools_build core gui svg webengine widgets
+USE_QT=		buildtools_build core gui svg webengine widgets
 
 WRKSRC_SUBDIR=	src
 
diff --git x11/rsibreak/Makefile x11/rsibreak/Makefile
index cae03fd3b40a..099948696140 100644
--- x11/rsibreak/Makefile
+++ x11/rsibreak/Makefile
@@ -12,10 +12,10 @@ COMMENT=	KDE RSI prevention tool
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	auth codecs config configwidgets coreaddons crash dbusaddons doctools ecm \
 		iconthemes i18n idletime notifications notifyconfig \
 		sonnet textwidgets xmlgui widgetsaddons windowsystem
-USE_QT5=	core dbus gui widgets xml buildtools_build qmake_build
+USE_QT=		core dbus gui widgets xml buildtools_build qmake_build
 
 .include <bsd.port.mk>
diff --git x11/sddm/Makefile x11/sddm/Makefile
index f99aa29e2bd8..bff1b21d31f6 100644
--- x11/sddm/Makefile
+++ x11/sddm/Makefile
@@ -8,9 +8,9 @@ CATEGORIES=	x11
 MAINTAINER=	kde@FreeBSD.org
 COMMENT=	QML based login manager
 
-USES=		cmake:outsource desktop-file-utils kde:5
+USES=		cmake:outsource desktop-file-utils kde:5 qt:5
 USE_KDE=	ecm
-USE_QT5=	concurrent core dbus gui linguisttools multimedia network \
+USE_QT=		concurrent core dbus gui linguisttools multimedia network \
 		printsupport qml quick script sql webkit widgets \
 		buildtools_build qmake_build
 USE_XORG=	xcb
diff --git x11/yakuake-kde4/Makefile x11/yakuake-kde4/Makefile
index 0cf8ca57b8ce..3d4919293a3e 100644
--- x11/yakuake-kde4/Makefile
+++ x11/yakuake-kde4/Makefile
@@ -16,10 +16,10 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 RUN_DEPENDS=	konsole:x11/konsole-kde4
 
-USES=		cmake gettext kde:4 shebangfix tar:xz
+USES=		cmake gettext kde:4 qt:4 shebangfix tar:xz
 SHEBANG_FILES=	data/updaters/yakuake-${PORTVERSION}-startupnotification.pl
 USE_KDE=	automoc4 kdelibs
-USE_QT4=	qmake_build moc_build rcc_build uic_build
+USE_QT=		qmake_build moc_build rcc_build uic_build
 
 PLIST_SUB=	VERSION="${PORTVERSION}"
 
diff --git x11/yakuake/Makefile x11/yakuake/Makefile
index 5218205d6632..979dd69557d5 100644
--- x11/yakuake/Makefile
+++ x11/yakuake/Makefile
@@ -14,12 +14,12 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 RUN_DEPENDS=	konsole:x11/konsole
 
-USES=		cmake:outsource gettext kde:5 tar:xz
+USES=		cmake:outsource gettext kde:5 qt:5 tar:xz
 USE_KDE=	attica auth archive codecs completion config configwidgets \
 		coreaddons crash dbusaddons ecm globalaccel i18n iconthemes \
 		jobwidgets kio newstuff notifications notifyconfig parts \
 		service sonnet textwidgets widgetsaddons windowsystem xmlgui
-USE_QT5=	core dbus gui network widgets x11extras xml \
+USE_QT=		core dbus gui network widgets x11extras xml \
 		buildtools_build qmake_build
 USE_XORG=	x11