diff options
Diffstat (limited to 'Mk/bsd.qt.mk')
| -rw-r--r-- | Mk/bsd.qt.mk | 154 |
1 files changed, 104 insertions, 50 deletions
diff --git a/Mk/bsd.qt.mk b/Mk/bsd.qt.mk index 67e7769533fa..60e5b0ec6b5a 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.6.2 +QT5_VERSION?= 5.7.1 _QT_RELNAME= qt${_QT_VERSION:R:R} _QT_VERSION= # empty @@ -51,9 +51,6 @@ IGNORE?= can't be installed: bsd.qt.mk may only be included via USE_QT[${_QT_SU QT_NONSTANDARD= yes MASTER_SITES= ${MASTER_SITE_QT} -# Useless, as it must be defined before including bsd.port.pre.mk (at least -# because of bsd.options.mk). -#PKGNAMEPREFIX?= ${_QT_RELNAME}- DISTINFO_FILE?= ${.CURDIR:H:H}/devel/${_QT_RELNAME}/distinfo LICENSE?= LGPL21 @@ -91,9 +88,12 @@ 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 connectivity declarative graphicaleffects imageformats \ - location multimedia quickcontrols quickcontrols2 script sensors serialbus serialport svg tools \ - translations webchannel websockets x11extras xmlpatterns +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 webchannel webkit websockets x11extras \ + xmlpatterns . endif . endif @@ -147,6 +147,7 @@ CONFIGURE_ARGS+=-nomake examples -nomake tests \ . if ${ARCH} == i386 && empty(MACHINE_CPU:Msse2) CONFIGURE_ARGS+=-no-sse2 . endif + . endif . if defined(WANT_QT_DEBUG) || defined(WITH_DEBUG) @@ -173,7 +174,7 @@ CONFIGURE_ARGS+=-verbose _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 . else -_EXTRA_PATCHES_QT5= ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-src_corelib_global_qcompilerdetection.h \ +_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 . endif EXTRA_PATCHES?= ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-configure \ @@ -205,22 +206,24 @@ QMAKE_ARGS+= QT_CONFIG+="${QT_CONFIG:N-*:O:u}" 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) -.if ${_QT_VERSION:M4*} -QT_BINDIR_REL?= bin -QT_LIBDIR_REL?= lib/${_QT_RELNAME} -QT_PLUGINDIR_REL?= ${QT_LIBDIR_REL}/plugins -QT_IMPORTDIR_REL?= ${QT_LIBDIR_REL}/imports -.endif - # 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_ARCHDIR_REL?=${QT_LIBDIR_REL}/${_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 @@ -231,26 +234,26 @@ 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 -_QT_BINSUFX= -${_QT_RELNAME} .else QT_MKSPECDIR_REL= ${QT_ARCHDIR_REL}/mkspecs _QT_LIBVER= ${_QT_VERSION:R:R} -_QT_BINSUFX= # empty .endif -LRELEASE?= ${QT_BINDIR}/lrelease${_QT_BINSUFX} -LUPDATE?= ${QT_BINDIR}/lupdate${_QT_BINSUFX} -MOC?= ${QT_BINDIR}/moc${_QT_BINSUFX} +LRELEASE?= ${QT_BINDIR}/lrelease +LUPDATE?= ${QT_BINDIR}/lupdate +MOC?= ${QT_BINDIR}/moc RCC?= ${QT_BINDIR}/rcc -UIC?= ${QT_BINDIR}/uic${_QT_BINSUFX} -QMAKE?= ${QT_BINDIR}/qmake${_QT_BINSUFX} +UIC?= ${QT_BINDIR}/uic +QMAKE?= ${QT_BINDIR}/qmake # Needed to redefine the qmake target for internal Qt configuration. _QMAKE?= ${QMAKE} QMAKESPEC?= ${QT_MKSPECDIR}/freebsd-${QMAKE_COMPILER} @@ -264,19 +267,21 @@ QMAKE_COMPILER= $$(ccver="$$(${CXX} --version)"; case "$$ccver" in *clang*) echo # Import QMAKE_ENV and QMAKE_ARGS definitions. USES+= qmake:_env -.for dir in INC ARCH PLUGIN LIBEXEC IMPORT \ - QML DATA DOC L10N ETC EXAMPLE TEST MKSPEC +.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}" -.endfor - -.for dir in BIN LIB -QT_${dir}DIR= ${PREFIX}/${QT_${dir}DIR_REL} -. if 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} + .endif # !defined(_POSTMKINCLUDED) && !defined(Qt_Pre_Include) .if defined(_POSTMKINCLUDED) && !defined(Qt_Post_Include) @@ -284,7 +289,7 @@ PLIST_SUB+= QT_${dir}DIR="${QT_${dir}DIR_REL}" Qt_Post_Include= bsd.qt.mk .if !defined(QT_NONSTANDARD) -CONFIGURE_ENV+= QTDIR="${PREFIX}" QMAKE="${QMAKE}" \ +CONFIGURE_ENV+= QTDIR="${QT_ARCHDIR}" QMAKE="${QMAKE}" \ MOC="${MOC}" RCC="${RCC}" UIC="${UIC}" \ QMAKESPEC="${QMAKESPEC}" CONFIGURE_ARGS+=--with-qt-includes=${QT_INCDIR} \ @@ -306,11 +311,13 @@ _USE_QT4_ONLY= accessible assistant-adp assistantclient clucene codecs-cn codecs phonon-gst porting qdoc3 qmlviewer qt3support qtconfig \ qtestlib qvfb rcc uic uic3 xmlpatterns-tool -_USE_QT5_ONLY= 3d buildtools canvas3d concurrent connectivity core \ - examples graphicaleffects location paths phonon4 \ - printsupport qdbus qdoc qdoc-data qev qml quick quickcontrols \ - quickcontrols2 sensors serialbus serialport sql-tds \ - uiplugin uitools webchannel websockets widgets x11extras +_USE_QT5_ONLY= 3d buildtools canvas3d charts concurrent connectivity \ + core datavis3d declarative-render2d examples gamepad \ + graphicaleffects location paths phonon4 printsupport \ + qdbus qdoc qdoc-data qev qml quick quickcontrols \ + quickcontrols2 scxml sensors serialbus serialport \ + sql-tds uiplugin uitools virtualkeyboard webchannel \ + websockets widgets x11extras 3d_PORT= graphics/${_QT_RELNAME}-3d 3d_LIB= libQt${_QT_LIBVER}3DCore.so @@ -319,10 +326,10 @@ accessible_PORT= accessibility/${_QT_RELNAME}-accessible accessible_PATH= ${QT_PLUGINDIR}/accessible/libqtaccessiblewidgets.so assistant_PORT= devel/${_QT_RELNAME}-assistant -assistant_PATH= ${QT_BINDIR}/assistant${_QT_BINSUFX} +assistant_PATH= ${QT_BINDIR}/assistant assistant-adp_PORT= devel/${_QT_RELNAME}-assistant-adp -assistant-adp_PATH= ${QT_BINDIR}/assistant_adp +assistant-adp_PATH= ${PREFIX}/bin/assistant_adp assistantclient_PORT= devel/${_QT_RELNAME}-libqtassistantclient assistantclient_LIB= libQt${_QT_LIBVER}AssistantClient.so @@ -333,7 +340,10 @@ buildtools_PATH= ${MOC} canvas3d_PORT= x11-toolkits/${_QT_RELNAME}-canvas3d canvas3d_PATH= ${QT_QMLDIR}/QtCanvas3D/qmldir -clucene_PORT= textproc/clucene-${_QT_RELNAME} +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 @@ -360,17 +370,23 @@ core_LIB= libQt${_QT_LIBVER}Core.so corelib_PORT= devel/${_QT_RELNAME}-corelib corelib_LIB= ${core_LIB} -dbus_PORT= devel/dbus-${_QT_RELNAME} +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 +declarative-render2d_PORT= x11-toolkits/${_QT_RELNAME}-declarative-render2d +declarative-render2d_PATH= ${QT_PLUGINDIR}/scenegraph/libsoftwarecontext.so + demo_PORT= misc/${_QT_RELNAME}-qtdemo demo_PATH= ${QT_BINDIR}/qtdemo designer_PORT= devel/${_QT_RELNAME}-designer -designer_PATH= ${QT_BINDIR}/designer${_QT_BINSUFX} +designer_PATH= ${QT_BINDIR}/designer doc_PORT= misc/${_QT_RELNAME}-doc doc_PATH= ${_QT_RELNAME}-doc>=${_QT_VERSION:R:R} @@ -378,6 +394,9 @@ 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= ${QT_QMLDIR}/QtGraphicalEffects/qmldir @@ -403,7 +422,7 @@ inputmethods_PORT= x11/${_QT_RELNAME}-inputmethods inputmethods_PATH= ${QT_PLUGINDIR}/inputmethods/libqimsw-multi.so linguist_PORT= devel/${_QT_RELNAME}-linguist -linguist_PATH= ${QT_BINDIR}/linguist${_QT_BINSUFX} +linguist_PATH= ${QT_BINDIR}/linguist linguisttools_PORT= devel/${_QT_RELNAME}-linguisttools linguisttools_PATH= ${LRELEASE} @@ -415,7 +434,7 @@ l10n_PORT= misc/${_QT_RELNAME}-l10n l10n_PATH= ${_QT_RELNAME}-l10n>=${_QT_VERSION:R:R} makeqpf_PORT= devel/${_QT_RELNAME}-makeqpf -makeqpf_PATH= ${QT_BINDIR}/makeqpf${_QT_BINSUFX} +makeqpf_PATH= ${QT_BINDIR}/makeqpf moc_PORT= devel/${_QT_RELNAME}-moc moc_PATH= ${MOC} @@ -468,7 +487,7 @@ qdoc3_PATH= ${QT_BINDIR}/qdoc3 qev_PORT= x11/${_QT_RELNAME}-qev qev_PATH= ${QT_BINDIR}/qev -qmake_PORT= devel/qmake${_QT_VERSION:R:R} +qmake_PORT= devel/${_QT_RELNAME}-qmake qmake_PATH= ${QMAKE} qml_PORT= lang/${_QT_RELNAME}-qml @@ -481,7 +500,7 @@ qt3support_PORT= devel/${_QT_RELNAME}-qt3support qt3support_LIB= libQt${_QT_LIBVER}3Support.so qtconfig_PORT= misc/${_QT_RELNAME}-qtconfig -qtconfig_PATH= ${QT_BINDIR}/qtconfig${_QT_BINSUFX} +qtconfig_PATH= ${QT_BINDIR}/qtconfig qtestlib_PORT= ${testlib_PORT} qtestlib_LIB= ${testlib_LIB} @@ -493,10 +512,10 @@ quickcontrols_PORT= x11-toolkits/${_QT_RELNAME}-quickcontrols quickcontrols_PATH= ${QT_QMLDIR}/QtQuick/Controls/qmldir quickcontrols2_PORT= x11-toolkits/${_QT_RELNAME}-quickcontrols2 -quickcontrols2_LIB= libQt${_QT_LIBVER}LabsTemplates.so +quickcontrols2_LIB= libQt${_QT_LIBVER}QuickControls2.so qvfb_PORT= devel/${_QT_RELNAME}-qvfb -qvfb_PATH= ${QT_BINDIR}/qvfb${_QT_BINSUFX} +qvfb_PATH= ${QT_BINDIR}/qvfb rcc_PORT= devel/${_QT_RELNAME}-rcc rcc_PATH= ${RCC} @@ -510,6 +529,9 @@ 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 @@ -554,13 +576,16 @@ uiplugin_PATH= ${QT_INCDIR}/QtUiPlugin/QtUiPlugin uitools_PORT= devel/${_QT_RELNAME}-uitools uitools_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}UiTools.a +virtualkeyboard_PORT= x11-toolkits/${_QT_RELNAME}-virtualkeyboard +virtualkeyboard_PATH= ${QT_PLUGINDIR}/platforminputcontexts/libqtvirtualkeyboardplugin.so + webchannel_PORT= www/${_QT_RELNAME}-webchannel webchannel_LIB= libQt${_QT_LIBVER}WebChannel.so websockets_PORT= www/${_QT_RELNAME}-websockets websockets_LIB= libQt${_QT_LIBVER}WebSockets.so -webkit_PORT= www/webkit-${_QT_RELNAME} +webkit_PORT= www/${_QT_RELNAME}-webkit webkit_LIB= libQt${_QT_LIBVER}WebKit.so widgets_PORT= x11-toolkits/${_QT_RELNAME}-widgets @@ -639,6 +664,10 @@ _QT_TOOLS+= qdbuscpp2xml qdbusxml2cpp _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} @@ -647,6 +676,28 @@ qtbase-pre-configure: ${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 @@ -674,6 +725,9 @@ qt5-pre-configure: # 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 |
