aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authortcberner <tcberner@FreeBSD.org>2016-11-25 19:26:18 +0800
committertcberner <tcberner@FreeBSD.org>2016-11-25 19:26:18 +0800
commit55f7359e80995c6eaa340227de24619740df4ee2 (patch)
tree973608510af537315210040470a0ac41e5757a04 /Mk
parente0665402eb374b40548d4348dd59461e80a5c538 (diff)
downloadfreebsd-ports-gnome-55f7359e80995c6eaa340227de24619740df4ee2.tar.gz
freebsd-ports-gnome-55f7359e80995c6eaa340227de24619740df4ee2.tar.zst
freebsd-ports-gnome-55f7359e80995c6eaa340227de24619740df4ee2.zip
Update the dependency code in bsd.qt.mk to the one from kde.mk
The dependency code from kde.mk can add LIB_DEPENDS if the sense-file is a library. Import this into bsd.qt.mk PR: 214744 Reviewed by: rakuco, mat Approved by: mat (mentor), rakuco (mentor) Exp-run by: antoine Differential Revision: https://reviews.freebsd.org/D8602
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.qt.mk146
1 files changed, 84 insertions, 62 deletions
diff --git a/Mk/bsd.qt.mk b/Mk/bsd.qt.mk
index f3f7f22b74b3..f92fe9b0e0e5 100644
--- a/Mk/bsd.qt.mk
+++ b/Mk/bsd.qt.mk
@@ -313,7 +313,7 @@ _USE_QT5_ONLY= 3d buildtools canvas3d concurrent connectivity core \
uiplugin uitools webchannel websockets widgets x11extras
3d_PORT= graphics/${_QT_RELNAME}-3d
-3d_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}3DCore.so
+3d_LIB= libQt${_QT_LIBVER}3DCore.so
accessible_PORT= accessibility/${_QT_RELNAME}-accessible
accessible_PATH= ${QT_PLUGINDIR}/accessible/libqtaccessiblewidgets.so
@@ -325,7 +325,7 @@ assistant-adp_PORT= devel/${_QT_RELNAME}-assistant-adp
assistant-adp_PATH= ${QT_BINDIR}/assistant_adp
assistantclient_PORT= devel/${_QT_RELNAME}-libqtassistantclient
-assistantclient_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}AssistantClient.so
+assistantclient_LIB= libQt${_QT_LIBVER}AssistantClient.so
buildtools_PORT= devel/${_QT_RELNAME}-buildtools
buildtools_PATH= ${MOC}
@@ -334,7 +334,7 @@ canvas3d_PORT= x11-toolkits/${_QT_RELNAME}-canvas3d
canvas3d_PATH= ${QT_QMLDIR}/QtCanvas3D/qmldir
clucene_PORT= textproc/clucene-${_QT_RELNAME}
-clucene_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}CLucene.so
+clucene_LIB= libQt${_QT_LIBVER}CLucene.so
codecs-cn_PORT= chinese/${_QT_RELNAME}-codecs-cn
codecs-cn_PATH= ${QT_PLUGINDIR}/codecs/libqcncodecs.so
@@ -349,22 +349,22 @@ codecs-tw_PORT= chinese/${_QT_RELNAME}-codecs-tw
codecs-tw_PATH= ${QT_PLUGINDIR}/codecs/libqtwcodecs.so
concurrent_PORT= devel/${_QT_RELNAME}-concurrent
-concurrent_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Concurrent.so
+concurrent_LIB= libQt${_QT_LIBVER}Concurrent.so
connectivity_PORT= comms/${_QT_RELNAME}-connectivity
-connectivity_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Bluetooth.so
+connectivity_LIB= libQt${_QT_LIBVER}Bluetooth.so
core_PORT= devel/${_QT_RELNAME}-core
-core_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Core.so
+core_LIB= libQt${_QT_LIBVER}Core.so
corelib_PORT= devel/${_QT_RELNAME}-corelib
-corelib_PATH= ${core_PATH}
+corelib_LIB= ${core_LIB}
dbus_PORT= devel/dbus-${_QT_RELNAME}
-dbus_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}DBus.so
+dbus_LIB= libQt${_QT_LIBVER}DBus.so
declarative_PORT= x11-toolkits/${_QT_RELNAME}-declarative
-declarative_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Declarative.so
+declarative_LIB= libQt${_QT_LIBVER}Declarative.so
demo_PORT= misc/${_QT_RELNAME}-qtdemo
demo_PATH= ${QT_BINDIR}/qtdemo
@@ -385,10 +385,10 @@ graphicssystems-opengl_PORT= x11/${_QT_RELNAME}-graphicssystems-opengl
graphicssystems-opengl_PATH= ${QT_PLUGINDIR}/graphicssystems/libqglgraphicssystem.so
gui_PORT= x11-toolkits/${_QT_RELNAME}-gui
-gui_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Gui.so
+gui_LIB= libQt${_QT_LIBVER}Gui.so
help_PORT= devel/${_QT_RELNAME}-help
-help_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Help.so
+help_LIB= libQt${_QT_LIBVER}Help.so
help-tools_PORT= devel/${_QT_RELNAME}-help-tools
help-tools_PATH= ${QT_BINDIR}/qhelpgenerator
@@ -409,7 +409,7 @@ linguisttools_PORT= devel/${_QT_RELNAME}-linguisttools
linguisttools_PATH= ${LRELEASE}
location_PORT= devel/${_QT_RELNAME}-location
-location_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Location.so
+location_LIB= libQt${_QT_LIBVER}Location.so
l10n_PORT= misc/${_QT_RELNAME}-l10n
l10n_PATH= ${_QT_RELNAME}-l10n>=${_QT_VERSION:R:R}
@@ -421,13 +421,13 @@ moc_PORT= devel/${_QT_RELNAME}-moc
moc_PATH= ${MOC}
multimedia_PORT= multimedia/${_QT_RELNAME}-multimedia
-multimedia_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Multimedia.so
+multimedia_LIB= libQt${_QT_LIBVER}Multimedia.so
network_PORT= net/${_QT_RELNAME}-network
-network_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Network.so
+network_LIB= libQt${_QT_LIBVER}Network.so
opengl_PORT= graphics/${_QT_RELNAME}-opengl
-opengl_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}OpenGL.so
+opengl_LIB= libQt${_QT_LIBVER}OpenGL.so
paths_PORT= sysutils/${_QT_RELNAME}-qtpaths
paths_PATH= ${QT_BINDIR}/qtpaths
@@ -436,10 +436,10 @@ pixeltool_PORT= graphics/${_QT_RELNAME}-pixeltool
pixeltool_PATH= ${QT_BINDIR}/pixeltool
phonon_PORT= multimedia/phonon
-phonon_PATH= ${QT_LIBDIR}/libphonon.so
+phonon_LIB= libphonon.so
phonon4_PORT= multimedia/${_QT_RELNAME}-phonon4
-phonon4_PATH= ${QT_LIBDIR}/libphonon4${_QT_RELNAME}.so
+phonon4_LIB= libphonon4${_QT_RELNAME}.so
phonon-gst_PORT= multimedia/phonon-gstreamer
phonon-gst_PATH= ${QT_PLUGINDIR}/phonon_backend/libphonon_gstreamer.so
@@ -448,7 +448,7 @@ porting_PORT= devel/${_QT_RELNAME}-porting
porting_PATH= ${QT_BINDIR}/qt3to4
printsupport_PORT= print/${_QT_RELNAME}-printsupport
-printsupport_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}PrintSupport.so
+printsupport_LIB= libQt${_QT_LIBVER}PrintSupport.so
qdbus_PORT= devel/${_QT_RELNAME}-qdbus
qdbus_PATH= ${QT_BINDIR}/qdbus
@@ -472,28 +472,28 @@ qmake_PORT= devel/qmake${_QT_VERSION:R:R}
qmake_PATH= ${QMAKE}
qml_PORT= lang/${_QT_RELNAME}-qml
-qml_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Qml.so
+qml_LIB= libQt${_QT_LIBVER}Qml.so
qmlviewer_PORT= devel/${_QT_RELNAME}-qmlviewer
qmlviewer_PATH= ${QT_BINDIR}/qmlviewer
qt3support_PORT= devel/${_QT_RELNAME}-qt3support
-qt3support_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}3Support.so
+qt3support_LIB= libQt${_QT_LIBVER}3Support.so
qtconfig_PORT= misc/${_QT_RELNAME}-qtconfig
qtconfig_PATH= ${QT_BINDIR}/qtconfig${_QT_BINSUFX}
qtestlib_PORT= ${testlib_PORT}
-qtestlib_PATH= ${testlib_PATH}
+qtestlib_LIB= ${testlib_LIB}
quick_PORT= x11-toolkits/${_QT_RELNAME}-quick
-quick_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Quick.so
+quick_LIB= libQt${_QT_LIBVER}Quick.so
quickcontrols_PORT= x11-toolkits/${_QT_RELNAME}-quickcontrols
quickcontrols_PATH= ${QT_QMLDIR}/QtQuick/Controls/qmldir
quickcontrols2_PORT= x11-toolkits/${_QT_RELNAME}-quickcontrols2
-quickcontrols2_PATH= ${QT_QMLDIR}/Qt/labs/controls/qmldir
+quickcontrols2_LIB= libQt${_QT_LIBVER}LabsTemplates.so
qvfb_PORT= devel/${_QT_RELNAME}-qvfb
qvfb_PATH= ${QT_BINDIR}/qvfb${_QT_BINSUFX}
@@ -502,45 +502,45 @@ rcc_PORT= devel/${_QT_RELNAME}-rcc
rcc_PATH= ${RCC}
sensors_PORT= comms/${_QT_RELNAME}-sensors
-sensors_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Sensors.so
+sensors_LIB= libQt${_QT_LIBVER}Sensors.so
script_PORT= devel/${_QT_RELNAME}-script
-script_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Script.so
+script_LIB= libQt${_QT_LIBVER}Script.so
scripttools_PORT= devel/${_QT_RELNAME}-scripttools
-scripttools_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}ScriptTools.so
+scripttools_LIB= libQt${_QT_LIBVER}ScriptTools.so
serialbus_PORT= comms/${_QT_RELNAME}-serialbus
-serialbus_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}SerialBus.so
+serialbus_LIB= libQt${_QT_LIBVER}SerialBus.so
serialport_PORT= comms/${_QT_RELNAME}-serialport
-serialport_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}SerialPort.so
+serialport_LIB= libQt${_QT_LIBVER}SerialPort.so
sql_PORT= databases/${_QT_RELNAME}-sql
-sql_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Sql.so
+sql_LIB= libQt${_QT_LIBVER}Sql.so
sql-pgsql_PATH= ${QT_PLUGINDIR}/sqldrivers/libqsqlpsql.so
-.if ${_QT_VERSION:M4*}
+. if ${_QT_VERSION:M4*}
sql-sqlite2_PORT= databases/${_QT_RELNAME}-sqlite-plugin
-.endif
+. endif
sql-sqlite3_PATH= ${QT_PLUGINDIR}/sqldrivers/libqsqlite.so
-.for db in ibase mysql odbc pgsql sqlite2 sqlite3 tds
-.if ${_QT_VERSION:M4*}
+. for db in ibase mysql odbc pgsql sqlite2 sqlite3 tds
+. if ${_QT_VERSION:M4*}
sql-${db}_PORT?= databases/${_QT_RELNAME}-${db}-plugin
-.else
+. else
sql-${db}_PORT?= databases/${_QT_RELNAME}-sqldrivers-${db}
-.endif
+. endif
sql-${db}_PATH?= ${QT_PLUGINDIR}/sqldrivers/libqsql${db:C/^sql//}.so
-.endfor
+. endfor
svg_PORT= graphics/${_QT_RELNAME}-svg
-svg_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Svg.so
+svg_LIB= libQt${_QT_LIBVER}Svg.so
testlib_PORT= devel/${_QT_RELNAME}-testlib
-testlib_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Test.so
+testlib_LIB= libQt${_QT_LIBVER}Test.so
uic_PORT= devel/${_QT_RELNAME}-uic
uic_PATH= ${UIC}
@@ -555,47 +555,69 @@ uitools_PORT= devel/${_QT_RELNAME}-uitools
uitools_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}UiTools.a
webchannel_PORT= www/${_QT_RELNAME}-webchannel
-webchannel_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}WebChannel.so
+webchannel_LIB= libQt${_QT_LIBVER}WebChannel.so
websockets_PORT= www/${_QT_RELNAME}-websockets
-websockets_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}WebSockets.so
+websockets_LIB= libQt${_QT_LIBVER}WebSockets.so
webkit_PORT= www/webkit-${_QT_RELNAME}
-webkit_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}WebKit.so
+webkit_LIB= libQt${_QT_LIBVER}WebKit.so
widgets_PORT= x11-toolkits/${_QT_RELNAME}-widgets
-widgets_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Widgets.so
+widgets_LIB= libQt${_QT_LIBVER}Widgets.so
x11extras_PORT= x11/${_QT_RELNAME}-x11extras
-x11extras_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}X11Extras.so
+x11extras_LIB= libQt${_QT_LIBVER}X11Extras.so
xml_PORT= textproc/${_QT_RELNAME}-xml
-xml_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Xml.so
+xml_LIB= libQt${_QT_LIBVER}Xml.so
xmlpatterns_PORT= textproc/${_QT_RELNAME}-xmlpatterns
-xmlpatterns_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}XmlPatterns.so
+xmlpatterns_LIB= libQt${_QT_LIBVER}XmlPatterns.so
xmlpatterns-tool_PORT= textproc/${_QT_RELNAME}-xmlpatterns-tool
xmlpatterns-tool_PATH= ${QT_BINDIR}/xmlpatterns
-_USE_QT_ALL+= ${_USE_QT${_QT_VERSION:R:R}_ONLY}
-.for comp in ${_USE_QT_ALL}
-${comp}_BUILD_DEPENDS?= ${${comp}_PATH}:${${comp}_PORT}
-${comp}_RUN_DEPENDS?= ${${comp}_PATH}:${${comp}_PORT}
-${comp}_build_BUILD_DEPENDS?= ${${comp}_BUILD_DEPENDS}
-${comp}_run_RUN_DEPENDS?= ${${comp}_RUN_DEPENDS}
-_USE_QT_ALL_SUFFIXED+= ${comp} ${comp}_build ${comp}_run
-.endfor
-
_USE_QT= ${USE_QT${_QT_VERSION:R:R}}
-.for comp in ${_USE_QT:O:u}
-. if ${_USE_QT_ALL_SUFFIXED:M${comp}}
-BUILD_DEPENDS+= ${${comp}_BUILD_DEPENDS}
-RUN_DEPENDS+= ${${comp}_RUN_DEPENDS}
-. else
-IGNORE?= can't be installed: unknown USE_QT${_QT_VERSION:R:R} component '${comp}' #'
-. endif
-.endfor
+_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"