summaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2018-01-06 21:30:31 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2018-01-06 21:30:31 +0000
commitf6ceca63504679b05ea4fc24a195a301e2303d1f (patch)
treea6e116c43545a3682fe63db4bdca54e6fb24567e /Mk
parentsysutils/cloudabi-utils: Upgrade to upstream version 0.36. (diff)
Update Qt5 ports to 5.9.3.
This took quite a lot of time because Qt's own build system underwent several changes in 5.8.0 that took a while to adapt to. And, of course, qt5-webengine is a behemoth that we need to patch like crazy due to its bundling of Chromium. In fact, most of the Chromium patches in qt5-webengine have been imported with no changes from www/chromium@433510 ("www/chromium: update to 56.0.2924.87"). New port: accessibility/qt5-speech Bigger changes to Qt5 ports we had to make: - Qt now allows using a configure.json file to define configuration options and specify configuration checks that can be done when qmake is invoked. However, configure.json checks done in a subdirectory only propagates to subdirectories, and checks elsewhere will fail if all .pro files are being parsed at once (i.e. qmake -recursive), so several ports had to switch to USES=qmake:norecursive along with manual additional qmake invocations in subdirectories in order to work. It's been mentioned in a few places such as Qt's bug tracker that qmake's recursive mode is pretty much deprecated, so we might switch to non-recursive mode by default in the future. - Uses/qmake.mk: Introduce QMAKE_CONFIGURE_ARGS. qmake now accepts arbitrary options such as '-foo' and '-no-bar' at the end of the command-line. They can be specified in QMAKE_CONFIGURE_ARGS. - graphics/qt5-wayland: The port can only be built if graphics/mesa-libs is built with the WAYLAND option, so a corresponding option (off by default) was added to the port. - misc/qt5-doc: Switch to a pre-built documentation tarball. The existing port was not working with Qt 5.9. Instead of trying to fix it, switch to what Gentoo does and fetch a tarball that already contains all documentation so that we do not have to build anything at all. The tarball's name and location in download.qt.io look a bit weird, but it seems to work fine. - www/qt5-webengine: Use binutils from ports, Chromium's GN build system generates a build.ninja that uses ar(1) with the @file syntax that is not supported by BSD ar, so we need to use GNU ar from binutils. - x11-toolkits/qt5-declarative-render2d: This port was merged into the main Qt Declarative repository upstream, and into x11-toolkits/qt5-quick in the ports tree. Changes to other ports we had to make: - biology/ugene: Drop a '#define point "."' that is not present in more recent versions of the port. Defining a macro with such a common name causes build issues with Qt 5.9, which uses |point| as an argument name in methods. - cad/qelectrotech: Fix plist with Qt 5.9. Directories are no longer installed with `cp -f -R', but rather `qmake install qinstall', which does not install %%DATADIR%%/elements/10_electric/20_manufacturers_articles/bosch_rexroth/.directory That's a local file that should not even have been part of the tarball anyway. - chinese/gcin-qt5: Add additional private Qt directories (which should not be used in the first place) to get the port to build with Qt 5.9. - devel/qtcreator: Fix plist with Qt 5.9. Something changed in qdoc and some test classes no longer generate documentation files. - security/keepassx-devel: Import a patch sent upstream almost a year ago to fix the build with Qt 5.9. Thanks to antoine for the exp-run, and tcberner and Laurent Cimon <laurent@nuxi.ca> for landing changes in our qt-5.9 branch. PR: 224849
Notes
Notes: svn path=/head/; revision=458293
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/qmake.mk9
-rw-r--r--Mk/bsd.qt.mk49
2 files changed, 34 insertions, 24 deletions
diff --git a/Mk/Uses/qmake.mk b/Mk/Uses/qmake.mk
index eddb1695ba27..41b0da9c6d0f 100644
--- a/Mk/Uses/qmake.mk
+++ b/Mk/Uses/qmake.mk
@@ -16,6 +16,11 @@
# Default: ${CONFIGURE_ENV}
# QMAKE_ARGS - Arguments passed to qmake.
# Default: see below
+# QMAKE_CONFIGURE_ARGS - Extra arguments passed to qmake after everything
+# else, such as "-foo -no-bar". The arguments are usually
+# set in configure.json. This variable is specific to
+# qmake from Qt 5.
+# Default: empty
# QMAKE_SOURCE_PATH - Path to qmake project files.
# Default: ${WRKSRC} if out-of-source build is
# requested, empty otherwise.
@@ -105,7 +110,9 @@ DESTDIRNAME= INSTALL_ROOT
qmake-configure:
@${MKDIR} ${_QMAKE_WRKSRC}
@cd ${_QMAKE_WRKSRC} && \
- ${SETENV} ${QMAKE_ENV} ${_QMAKE} ${QMAKE_ARGS} ${QMAKE_SOURCE_PATH}
+ ${SETENV} ${QMAKE_ENV} ${_QMAKE} ${QMAKE_ARGS} \
+ ${QMAKE_SOURCE_PATH} \
+ ${QMAKE_CONFIGURE_ARGS:?--:} ${QMAKE_CONFIGURE_ARGS}
.if !target(do-configure) && ! ${qmake_ARGS:M_env}
_USES_configure+= 450:qmake-configure
diff --git a/Mk/bsd.qt.mk b/Mk/bsd.qt.mk
index 2b8589f5bfff..85d11ac85694 100644
--- a/Mk/bsd.qt.mk
+++ b/Mk/bsd.qt.mk
@@ -27,7 +27,7 @@ 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.7.1
+QT5_VERSION?= 5.9.3
_QT_RELNAME= qt${_QT_VERSION:R:R}
_QT_VERSION= # empty
@@ -88,23 +88,19 @@ LDFLAGS+= -Wl,--as-needed
# 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 base canvas3d charts connectivity datavis3d declarative \
- declarative-render2d gamepad graphicaleffects imageformats \
- location multimedia quickcontrols quickcontrols2 script scxml \
- sensors serialbus serialport svg tools translations \
- virtualkeyboard wayland webchannel webengine \
- websockets x11extras xmlpatterns
+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 webengine websockets webview \
+ winextras x11extras xmlpatterns
. endif
. endif
. if ${QT_DIST} == "base" && ${PORTNAME} != "qmake"
# Qt configure requires pkg-config to detect dependencies.
USES+= pkgconfig
-
-# Set QMAKESPEC when building qtbase so that qmake (called by the configure
-# script) can find the mkspecs we create ourselves in devel/qmake5.
-CONFIGURE_ENV+= QMAKESPEC="${QMAKESPEC}"
-MAKE_ENV+= QMAKESPEC="${QMAKESPEC}"
. endif
# -nomake is only used by qtbase's configure script.
@@ -117,7 +113,6 @@ EXTRACT_AFTER_ARGS?= ${DISTNAME:S,$,/examples,:S,^,--exclude ,} \
CONFIGURE_ENV+= MAKE="${MAKE:T}"
CONFIGURE_ARGS+=-opensource -confirm-license \
- -platform ${QMAKESPEC} \
-no-pch \
-prefix ${PREFIX} \
-bindir ${PREFIX}/${QT_BINDIR_REL} \
@@ -132,6 +127,7 @@ CONFIGURE_ARGS+=-opensource -confirm-license \
. if ${_QT_VERSION:M4*}
CONFIGURE_ARGS+=-fast \
+ -platform ${QMAKESPEC} \
-system-libjpeg -system-libpng \
-system-libmng -system-libtiff -system-zlib \
-no-phonon-backend \
@@ -139,6 +135,7 @@ CONFIGURE_ARGS+=-fast \
-demosdir ${PREFIX}/${QT_EXAMPLEDIR_REL}/demos
. else
CONFIGURE_ARGS+=-nomake examples -nomake tests \
+ -platform ${QMAKESPEC:T} \
-archdatadir ${PREFIX}/${QT_ARCHDIR_REL} \
-libexecdir ${PREFIX}/${QT_LIBEXECDIR_REL} \
-qmldir ${PREFIX}/${QT_QMLDIR_REL} \
@@ -150,6 +147,9 @@ CONFIGURE_ARGS+=-no-sse2
# 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)
@@ -174,16 +174,16 @@ CONFIGURE_ARGS+=-verbose
. 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-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
. 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-config.tests_unix_arch.test
+ ${.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 \
- ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-config.tests-unix-compile.test \
${_EXTRA_PATCHES_QT4} ${_EXTRA_PATCHES_QT5}
. endif
@@ -287,6 +287,11 @@ PLIST_SUB+= QT_${dir}DIR="${QT_${dir}DIR_REL}"
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)
@@ -317,10 +322,10 @@ _USE_QT4_ONLY= accessible assistant-adp assistantclient clucene codecs-cn codecs
qtestlib qvfb rcc uic uic3 xmlpatterns-tool
_USE_QT5_ONLY= 3d buildtools canvas3d charts concurrent connectivity \
- core datavis3d declarative-render2d diag examples gamepad \
+ core datavis3d diag examples gamepad \
graphicaleffects location paths phonon4 plugininfo printsupport \
qdbus qdoc qdoc-data qev qml quick quickcontrols \
- quickcontrols2 scxml sensors serialbus serialport \
+ quickcontrols2 scxml sensors serialbus serialport speech \
sql-tds uiplugin uitools virtualkeyboard wayland webchannel \
webengine websockets websockets-qml widgets x11extras
@@ -384,9 +389,6 @@ dbus_LIB= libQt${_QT_LIBVER}DBus.so
declarative_PORT= x11-toolkits/${_QT_RELNAME}-declarative
declarative_LIB= libQt${_QT_LIBVER}Declarative.so
-declarative-render2d_PORT= x11-toolkits/${_QT_RELNAME}-declarative-render2d
-declarative-render2d_PATH= ${LOCALBASE}/${QT_PLUGINDIR_REL}/scenegraph/libsoftwarecontext.so
-
demo_PORT= misc/${_QT_RELNAME}-qtdemo
demo_PATH= ${LOCALBASE}/${QT_BINDIR_REL}/qtdemo
@@ -549,6 +551,9 @@ 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
@@ -727,8 +732,6 @@ qtbase-post-patch:
. if ${PORTNAME} != "qmake"
_QMAKE= ${CONFIGURE_WRKSRC}/bin/qmake
-
-post-configure: qmake-configure
. endif
. endif # ${QT_DIST} == "base"