7 # USE_QT* - List of Qt modules to depend on, with optional '_build'
8 # and '_run' suffixes. Define it empty to include this file
9 # without depending on Qt ports.
10 # QT_DIST - The port belongs to the Qt distribution. Set to 'yes' for
11 # Qt 4, or to the distribution name(s) for newer versions.
12 # QT_NONSTANDARD - Suppress modification of configure and make environment.
14 # Global switches (for inclusion into /etc/make.conf):
15 # QT4_OPTIONS - A list of (Qt 4-only) global options; can be CUPS, NAS
16 # and/or QGTKSTYLE. If set, Qt will be built with support
18 # * Common UNIX Printing System (CUPS);
19 # * Network Audio System (NAS);
20 # * GTK+-based Qt theme (QGTKSTYLE).
22 .if !defined(_POSTMKINCLUDED) && !defined(Qt_Pre_Include)
24 Qt_Include_MAINTAINER= kde@FreeBSD.org
25 Qt_Pre_Include= bsd.qt.mk
27 # Qt versions currently supported by the framework.
32 QT_PREFIX?= ${LOCALBASE}
34 _QT_RELNAME= qt${_QT_VERSION:R:R}
36 .for ver in ${_QT_SUPPORTED}
37 . if defined(USE_QT${ver})
38 . if empty(_QT_VERSION)
39 _QT_VERSION= ${QT${ver}_VERSION}
41 # Reject different USE_QT*.
42 IGNORE?= can't be installed: different Qt versions specified via USE_QT[${_QT_SUPPORTED:S/ //g}] #'
47 .if empty(_QT_VERSION)
48 # The file was included without USE_QT*.
49 IGNORE?= can't be installed: bsd.qt.mk may only be included via USE_QT[${_QT_SUPPORTED:S/ //g}] #'
55 . if ! ${.MAKEFLAGS:MPREFIX=*}
59 MASTER_SITES= ${MASTER_SITE_QT}
60 # Useless, as it must be defined before including bsd.port.pre.mk (at least
61 # because of bsd.options.mk).
62 #PKGNAMEPREFIX?= ${_QT_RELNAME}-
63 DISTINFO_FILE= ${.CURDIR:H:H}/devel/${_QT_RELNAME}/distinfo
65 # Can go after a while.
66 CONFLICTS_BUILD=qt-3.* qt-copy-3.*
70 . if !exists(${PKGDIR}/pkg-descr)
71 DESCR?= ${.CURDIR:H:H}/devel/${_QT_RELNAME}/pkg-descr
75 DESTDIRNAME= INSTALL_ROOT
77 . if ${_QT_VERSION:M4*}
78 MASTER_SITE_SUBDIR= official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/
79 DISTNAME= qt-everywhere-opensource-src-${_QT_VERSION}
82 . if ${_QT_VERSION:M*-*}
84 MASTER_SITE_SUBDIR= development_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules/
86 MASTER_SITE_SUBDIR= official_releases/qt/${_QT_VERSION:R}/${_QT_VERSION}/submodules/
88 DISTNAME= ${QT_DIST:S,^,qt,:S,$,-opensource-src-${_QT_VERSION},}
89 DISTFILES= ${DISTNAME:S,$,${EXTRACT_SUFX},}
90 DIST_SUBDIR= KDE/Qt/${_QT_VERSION}
93 . if ${.TARGETS:Mmakesum} || ${.TARGETS:Mfetch} && \
94 defined(DISABLE_SIZE) && defined(NO_CHECKSUM)
95 # Ensure that the "makesum" target (with its inner "fetch" one) uses
96 # devel/qt*/distinfo for every port.
97 QT_DIST= base declarative doc graphicaleffects imageformats \
98 multimedia quick1 quickcontrols script serialport svg tools \
99 translations webkit webkit-examples x11extras xmlpatterns
102 . if ${QT_DIST} == "base" && ${PORTNAME} != "qmake"
103 # Qt configure requires pkg-config to detect dependencies.
106 # Use mkspecs installed in QMAKEPATH/mkspecs when building qtbase.
107 CONFIGURE_ENV+= QMAKEPATH="${QT_MKSPECDIR:H}"
108 MAKE_ENV+= QMAKEPATH="${QT_MKSPECDIR:H}"
111 # -nomake flags aren't enough.
112 EXTRACT_AFTER_ARGS?= ${DISTNAME:S,$,/examples,:S,^,--exclude ,} \
113 ${DISTNAME:S,$,/tests,:S,^,--exclude ,}
114 . endif # ! ${_QT_VERSION:M4*}
116 CONFIGURE_ENV+= MAKE="${MAKE:T}"
118 CONFIGURE_ARGS+=-opensource -confirm-license \
119 -platform ${QMAKESPEC} \
122 -bindir ${PREFIX}/${QT_BINDIR_REL} \
123 -headerdir ${PREFIX}/${QT_INCDIR_REL} \
124 -libdir ${PREFIX}/${QT_LIBDIR_REL} \
125 -plugindir ${PREFIX}/${QT_PLUGINDIR_REL} \
126 -importdir ${PREFIX}/${QT_IMPORTDIR_REL} \
127 -datadir ${PREFIX}/${QT_DATADIR_REL} \
128 -docdir ${PREFIX}/${QT_DOCDIR_REL} \
129 -translationdir ${PREFIX}/${QT_L10NDIR_REL} \
130 -sysconfdir ${PREFIX}/${QT_ETCDIR_REL}
132 . if ${_QT_VERSION:M4*}
133 CONFIGURE_ARGS+=-fast \
134 -system-libjpeg -system-libpng \
135 -system-libmng -system-libtiff -system-zlib \
137 -examplesdir ${PREFIX}/${QT_EXAMPLEDIR_REL}/examples \
138 -demosdir ${PREFIX}/${QT_EXAMPLEDIR_REL}/demos
140 CONFIGURE_ARGS+=-dont-process \
141 -nomake examples -nomake tests \
142 -archdatadir ${PREFIX}/${QT_ARCHDIR_REL} \
143 -libexecdir ${PREFIX}/${QT_LIBEXECDIR_REL} \
144 -qmldir ${PREFIX}/${QT_QMLDIR_REL} \
145 -examplesdir ${PREFIX}/${QT_EXAMPLEDIR_REL} \
146 -testsdir ${PREFIX}/${QT_TESTDIR_REL}
149 . if defined(WANT_QT_DEBUG) || defined(WITH_DEBUG)
151 STRIP= # It's done prior to bsd.qt.mk inclusion.
152 CONFIGURE_ARGS+=-debug -separate-debug-info
153 # Override configuration in global qconfig.pri.
154 QMAKE_ARGS+= QT_CONFIG+="debug separate_debug_info" \
158 CONFIGURE_ARGS+=-release -no-separate-debug-info
159 QMAKE_ARGS+= QT_CONFIG+="release" \
160 QT_CONFIG-="debug separate_debug_info"
161 PLIST_SUB+= DEBUG="@comment "
164 . if defined(WANT_QT_VERBOSE_CONFIGURE)
165 CONFIGURE_ARGS+=-verbose
168 . if ${QT_DIST} == "base" || ${_QT_VERSION:M4*}
169 EXTRA_PATCHES?= ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-configure \
170 ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-config.tests-unix-compile.test \
171 ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-libtool
172 . if ${_QT_VERSION:M5*}
173 EXTRA_PATCHES+= ${.CURDIR:H:H}/devel/qt5-core/files/extrapatch-src__corelib__tools__qdatetime.cpp
174 . elif ${_QT_VERSION:M4*}
175 EXTRA_PATCHES?= ${EXTRA_PATCHES} \
176 ${.CURDIR:H:H}/devel/${_QT_RELNAME}/files/extrapatch-src-corelib-global-qglobal.h
180 # Override settings installed in qconfig.h and *.pri files. The flags will be
181 # installed along with the port, but have to be passed as arguments while
182 # building the port itself. Flags prefixed with "-" (e.g., "-CUPS" and "-cups")
183 # are needed to disable some features.
184 . if !defined(${QT_MODNAME}) || empty(${QT_MODNAME})
185 # Used for both qconfig-*.h and qt_config_*.pri; it can't be empty.
186 QT_MODNAME= ${PORTNAME}
188 QT_DEFINES?= # For qconfig.h flags (without "QT_" prefix).
189 QT_CONFIG?= # For *.pri files QT_CONFIG flags.
191 QMAKE_ARGS+= DEFINES+="${QT_DEFINES:O:u:C/^([^-])/QT_\1/:C/^-/QT_NO_/:O}"
192 . if ${QT_DEFINES:N-*}
193 # Use a script to cleanup qconfig-modules.h (see qt-post-install).
194 PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
197 . if ${QT_CONFIG:N-*}
198 QMAKE_ARGS+= QT_CONFIG+="${QT_CONFIG:N-*:O:u}"
200 . if ${QT_CONFIG:M-*}
201 QMAKE_ARGS+= QT_CONFIG-="${QT_CONFIG:M-*:O:u:C/^-//}"
204 PLIST_SUB+= SHORTVER=${_QT_VERSION:R} \
205 FULLVER=${_QT_VERSION:C/-.*//}
206 .endif # defined(QT_DIST)
208 .if !defined(QT_NONSTANDARD)
209 CONFIGURE_ENV+= QTDIR="${QT_PREFIX}" QMAKE="${QMAKE}" \
210 MOC="${MOC}" RCC="${RCC}" UIC="${UIC}" \
211 QMAKESPEC="${QMAKESPEC}"
212 CONFIGURE_ARGS+=--with-qt-includes=${QT_INCDIR} \
213 --with-qt-libraries=${QT_LIBDIR} \
214 --with-extra-includes=${LOCALBASE}/include \
215 --with-extra-libs=${LOCALBASE}/lib
216 .endif # !defined(QT_NONSTANDARD)
218 .if ${_QT_VERSION:M4*}
220 QT_LIBDIR_REL?= lib/${_QT_RELNAME}
221 QT_PLUGINDIR_REL?= ${QT_LIBDIR_REL}/plugins
222 QT_IMPORTDIR_REL?= ${QT_LIBDIR_REL}/imports
225 # A wrapper (qtchooser) is used to invoke binaries.
226 QT_BINDIR_REL?= ${QT_ARCHDIR_REL}/bin
227 QT_INCDIR_REL?= include/${_QT_RELNAME}
229 QT_ARCHDIR_REL?=${QT_LIBDIR_REL}/${_QT_RELNAME}
230 QT_PLUGINDIR_REL?= ${QT_ARCHDIR_REL}/plugins
231 QT_LIBEXECDIR_REL?= libexec/${_QT_RELNAME}
232 QT_IMPORTDIR_REL?= ${QT_ARCHDIR_REL}/imports
233 QT_QMLDIR_REL?= ${QT_ARCHDIR_REL}/qml
234 QT_DATADIR_REL?=share/${_QT_RELNAME}
235 QT_DOCDIR_REL?= share/doc/${_QT_RELNAME}
236 QT_L10NDIR_REL?=${QT_DATADIR_REL}/translations
237 QT_ETCDIR_REL?= etc/xdg
238 QT_EXAMPLEDIR_REL?= share/examples/${_QT_RELNAME}
239 QT_TESTDIR_REL?=${QT_DATADIR_REL}/tests
242 .if ${_QT_VERSION:M4*}
243 QT_MKSPECDIR_REL= ${QT_DATADIR_REL}/mkspecs
246 _QT_BINSUFX= -${_QT_RELNAME}
248 QT_MKSPECDIR_REL= ${QT_ARCHDIR_REL}/mkspecs
250 _QT_LIBVER= ${_QT_VERSION:R:R}
254 LRELEASE?= ${QT_BINDIR}/lrelease${_QT_BINSUFX}
255 LUPDATE?= ${QT_BINDIR}/lupdate${_QT_BINSUFX}
256 MOC?= ${QT_BINDIR}/moc${_QT_BINSUFX}
257 RCC?= ${QT_BINDIR}/rcc
258 UIC?= ${QT_BINDIR}/uic${_QT_BINSUFX}
259 QMAKE?= ${QT_BINDIR}/qmake${_QT_BINSUFX}
260 # Needed to redefine the qmake target for internal Qt configuration.
262 QMAKESPEC?= ${QT_MKSPECDIR}/freebsd-${QMAKE_COMPILER}
264 # The whole Qt distribution should be built with the same compiler, but it's
265 # better to support custom settings. Dereferencing the detection allows to
266 # avoid forking a shell on each inclusion of this file, and to catch any CXX
267 # customization (via USE_GCC, etc.).
270 # Import QMAKE_ENV and QMAKE_ARGS definitions.
273 PLIST_SUB+= QT_PREFIX="${QT_PREFIX}"
275 .for dir in BIN INC LIB ARCH PLUGIN LIBEXEC IMPORT \
276 QML DATA DOC L10N ETC EXAMPLE TEST MKSPEC
277 QT_${dir}DIR= ${QT_PREFIX}/${QT_${dir}DIR_REL}
278 PLIST_SUB+= QT_${dir}DIR="${QT_${dir}DIR_REL}"
281 .endif # !defined(_POSTMKINCLUDED) && !defined(Qt_Pre_Include)
283 .if defined(_POSTMKINCLUDED) && !defined(Qt_Post_Include)
285 Qt_Post_Include= bsd.qt.mk
287 _USE_QT_ALL= assistant clucene dbus declarative designer gui help \
288 imageformats linguist multimedia network opengl pixeltool \
289 qdbusviewer qmake script scripttools sql sql-ibase sql-mysql \
290 sql-odbc sql-pgsql sql-sqlite2 sql-sqlite3 svg testlib webkit \
293 _USE_QT4_ONLY= accessible assistant-adp assistantclient codecs-cn codecs-jp \
294 codecs-kr codecs-tw corelib demo doc graphicssystems-opengl \
295 help-tools iconengines inputmethods l10n makeqpf moc phonon \
296 phonon-gst porting qdoc3 qmlviewer qt3support qtconfig \
297 qtestlib qvfb rcc uic uic3 xmlpatterns-tool
299 _USE_QT5_ONLY= buildtools concurrent core graphicaleffects linguisttools \
300 printsupport qdbus qdoc qev qml qmldevtools quick \
301 quickcontrols uitools widgets x11extras
303 accessible_PORT= accessibility/${_QT_RELNAME}-accessible
304 accessible_PATH= ${QT_PLUGINDIR}/accessible/libqtaccessiblewidgets.so
306 assistant_PORT= devel/${_QT_RELNAME}-assistant
307 assistant_PATH= ${QT_BINDIR}/assistant${_QT_BINSUFX}
309 assistant-adp_PORT= devel/${_QT_RELNAME}-assistant-adp
310 assistant-adp_PATH= ${QT_BINDIR}/assistant_adp
312 assistantclient_PORT= devel/${_QT_RELNAME}-libqtassistantclient
313 assistantclient_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}AssistantClient.so
315 buildtools_PORT= devel/${_QT_RELNAME}-buildtools
316 buildtools_PATH= ${MOC}
318 clucene_PORT= textproc/clucene-${_QT_RELNAME}
319 clucene_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}CLucene.so
321 codecs-cn_PORT= chinese/${_QT_RELNAME}-codecs-cn
322 codecs-cn_PATH= ${QT_PLUGINDIR}/codecs/libqcncodecs.so
324 codecs-jp_PORT= japanese/${_QT_RELNAME}-codecs-jp
325 codecs-jp_PATH= ${QT_PLUGINDIR}/codecs/libqjpcodecs.so
327 codecs-kr_PORT= korean/${_QT_RELNAME}-codecs-kr
328 codecs-kr_PATH= ${QT_PLUGINDIR}/codecs/libqkrcodecs.so
330 codecs-tw_PORT= chinese/${_QT_RELNAME}-codecs-tw
331 codecs-tw_PATH= ${QT_PLUGINDIR}/codecs/libqtwcodecs.so
333 concurrent_PORT= devel/${_QT_RELNAME}-concurrent
334 concurrent_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Concurrent.so
336 core_PORT= devel/${_QT_RELNAME}-core
337 core_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Core.so
339 corelib_PORT= devel/${_QT_RELNAME}-corelib
340 corelib_PATH= ${core_PATH}
342 dbus_PORT= devel/dbus-${_QT_RELNAME}
343 dbus_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}DBus.so
345 declarative_PORT= x11-toolkits/${_QT_RELNAME}-declarative
346 declarative_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Declarative.so
348 demo_PORT= misc/${_QT_RELNAME}-qtdemo
349 demo_PATH= ${QT_BINDIR}/qtdemo
351 designer_PORT= devel/${_QT_RELNAME}-designer
352 designer_PATH= ${QT_BINDIR}/designer${_QT_BINSUFX}
354 doc_PORT= misc/${_QT_RELNAME}-doc
355 doc_PATH= ${_QT_RELNAME}-doc>=${_QT_VERSION:R:R}
357 graphicaleffects_PORT= graphics/${_QT_RELNAME}-graphicaleffects
358 graphicaleffects_PATH= ${QT_QMLDIR}/QtGraphicalEffects/qmldir
360 graphicssystems-opengl_PORT= x11/${_QT_RELNAME}-graphicssystems-opengl
361 graphicssystems-opengl_PATH= ${QT_PLUGINDIR}/graphicssystems/libqglgraphicssystem.so
363 gui_PORT= x11-toolkits/${_QT_RELNAME}-gui
364 gui_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Gui.so
366 help_PORT= devel/${_QT_RELNAME}-help
367 help_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Help.so
369 help-tools_PORT= devel/${_QT_RELNAME}-help-tools
370 help-tools_PATH= ${QT_BINDIR}/qhelpgenerator
372 iconengines_PORT= graphics/${_QT_RELNAME}-iconengines
373 iconengines_PATH= ${QT_PLUGINDIR}/iconengines/libqsvgicon.so
375 imageformats_PORT= graphics/${_QT_RELNAME}-imageformats
376 imageformats_PATH= ${QT_PLUGINDIR}/imageformats/libqtiff.so
378 inputmethods_PORT= x11/${_QT_RELNAME}-inputmethods
379 inputmethods_PATH= ${QT_PLUGINDIR}/inputmethods/libqimsw-multi.so
381 linguist_PORT= devel/${_QT_RELNAME}-linguist
382 linguist_PATH= ${QT_BINDIR}/linguist${_QT_BINSUFX}
384 linguisttools_PORT= devel/${_QT_RELNAME}-linguisttools
385 linguisttools_PATH= ${LRELEASE}
387 l10n_PORT= misc/${_QT_RELNAME}-l10n
388 l10n_PATH= ${_QT_RELNAME}-l10n>=${_QT_VERSION:R:R}
390 makeqpf_PORT= devel/${_QT_RELNAME}-makeqpf
391 makeqpf_PATH= ${QT_BINDIR}/makeqpf${_QT_BINSUFX}
393 moc_PORT= devel/${_QT_RELNAME}-moc
396 multimedia_PORT= multimedia/${_QT_RELNAME}-multimedia
397 multimedia_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Multimedia.so
399 network_PORT= net/${_QT_RELNAME}-network
400 network_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Network.so
402 opengl_PORT= graphics/${_QT_RELNAME}-opengl
403 opengl_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}OpenGL.so
405 pixeltool_PORT= graphics/${_QT_RELNAME}-pixeltool
406 pixeltool_PATH= ${QT_BINDIR}/pixeltool
408 phonon_PORT= multimedia/phonon
409 phonon_PATH= ${QT_LIBDIR}/libphonon.so
411 phonon-gst_PORT= multimedia/phonon-gstreamer
412 phonon-gst_PATH= ${QT_PLUGINDIR}/phonon_backend/libphonon_gstreamer.so
414 porting_PORT= devel/${_QT_RELNAME}-porting
415 porting_PATH= ${QT_BINDIR}/qt3to4
417 printsupport_PORT= print/${_QT_RELNAME}-printsupport
418 printsupport_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}PrintSupport.so
420 qdbus_PORT= devel/${_QT_RELNAME}-qdbus
421 qdbus_PATH= ${QT_BINDIR}/qdbus
423 qdbusviewer_PORT= devel/${_QT_RELNAME}-qdbusviewer
424 qdbusviewer_PATH= ${QT_BINDIR}/qdbusviewer
426 qdoc_PORT= devel/${_QT_RELNAME}-qdoc
427 qdoc_PATH= ${QT_BINDIR}/qdoc
429 qdoc3_PORT= devel/${_QT_RELNAME}-qdoc3
430 qdoc3_PATH= ${QT_BINDIR}/qdoc3
432 qev_PORT= x11/${_QT_RELNAME}-qev
433 qev_PATH= ${QT_BINDIR}/qev
435 qmake_PORT= devel/qmake${_QT_VERSION:R:R}
438 qml_PORT= lang/${_QT_RELNAME}-qml
439 qml_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Qml.so
441 qmldevtools_PORT= devel/${_QT_RELNAME}-qmldevtools
442 qmldevtools_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}QmlDevTools.a
444 qmlviewer_PORT= devel/${_QT_RELNAME}-qmlviewer
445 qmlviewer_PATH= ${QT_BINDIR}/qmlviewer
447 qt3support_PORT= devel/${_QT_RELNAME}-qt3support
448 qt3support_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}3Support.so
450 qtconfig_PORT= misc/${_QT_RELNAME}-qtconfig
451 qtconfig_PATH= ${QT_BINDIR}/qtconfig${_QT_BINSUFX}
453 qtestlib_PORT= ${testlib_PORT}
454 qtestlib_PATH= ${testlib_PATH}
456 quick_PORT= x11-toolkits/${_QT_RELNAME}-quick
457 quick_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Quick.so
459 quickcontrols_PORT= x11-toolkits/${_QT_RELNAME}-quickcontrols
460 quickcontrols_PATH= ${QT_QMLDIR}/QtQuick/Controls/qmldir
462 qvfb_PORT= devel/${_QT_RELNAME}-qvfb
463 qvfb_PATH= ${QT_BINDIR}/qvfb${_QT_BINSUFX}
465 rcc_PORT= devel/${_QT_RELNAME}-rcc
468 script_PORT= devel/${_QT_RELNAME}-script
469 script_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Script.so
471 scripttools_PORT= devel/${_QT_RELNAME}-scripttools
472 scripttools_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}ScriptTools.so
474 sql_PORT= databases/${_QT_RELNAME}-sql
475 sql_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Sql.so
477 sql-pgsql_PATH= ${QT_PLUGINDIR}/sqldrivers/libqsqlpsql.so
479 .if ${_QT_VERSION:M4*}
480 sql-sqlite2_PORT= databases/${_QT_RELNAME}-sqlite-plugin
483 sql-sqlite3_PATH= ${QT_PLUGINDIR}/sqldrivers/libqsqlite.so
485 .for db in ibase mysql odbc pgsql sqlite2 sqlite3
486 .if ${_QT_VERSION:M4*}
487 sql-${db}_PORT?= databases/${_QT_RELNAME}-${db}-plugin
489 sql-${db}_PORT?= databases/${_QT_RELNAME}-sqldrivers-${db}
491 sql-${db}_PATH?= ${QT_PLUGINDIR}/sqldrivers/libqsql${db:C/^sql//}.so
494 svg_PORT= graphics/${_QT_RELNAME}-svg
495 svg_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Svg.so
497 testlib_PORT= devel/${_QT_RELNAME}-testlib
498 testlib_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Test.so
500 uic_PORT= devel/${_QT_RELNAME}-uic
503 uic3_PORT= devel/${_QT_RELNAME}-uic3
504 uic3_PATH= ${QT_BINDIR}/uic3
506 uitools_PORT= devel/${_QT_RELNAME}-uitools
507 uitools_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}UiTools.a
509 webkit_PORT= www/webkit-${_QT_RELNAME}
510 webkit_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}WebKit.so
512 widgets_PORT= x11-toolkits/${_QT_RELNAME}-widgets
513 widgets_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Widgets.so
515 x11extras_PORT= x11/${_QT_RELNAME}-x11extras
516 x11extras_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}X11Extras.so
518 xml_PORT= textproc/${_QT_RELNAME}-xml
519 xml_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}Xml.so
521 xmlpatterns_PORT= textproc/${_QT_RELNAME}-xmlpatterns
522 xmlpatterns_PATH= ${QT_LIBDIR}/libQt${_QT_LIBVER}XmlPatterns.so
524 xmlpatterns-tool_PORT= textproc/${_QT_RELNAME}-xmlpatterns-tool
525 xmlpatterns-tool_PATH= ${QT_BINDIR}/xmlpatterns
527 _USE_QT_ALL+= ${_USE_QT${_QT_VERSION:R:R}_ONLY}
528 .for comp in ${_USE_QT_ALL}
529 ${comp}_BUILD_DEPENDS?= ${${comp}_PATH}:${PORTSDIR}/${${comp}_PORT}
530 ${comp}_RUN_DEPENDS?= ${${comp}_PATH}:${PORTSDIR}/${${comp}_PORT}
531 ${comp}_build_BUILD_DEPENDS?= ${${comp}_BUILD_DEPENDS}
532 ${comp}_run_RUN_DEPENDS?= ${${comp}_RUN_DEPENDS}
533 _USE_QT_ALL_SUFFIXED+= ${comp} ${comp}_build ${comp}_run
536 _USE_QT= ${USE_QT${_QT_VERSION:R:R}}
537 .for comp in ${_USE_QT:O:u}
538 . if ${_USE_QT_ALL_SUFFIXED:M${comp}}
539 BUILD_DEPENDS+= ${${comp}_BUILD_DEPENDS}
540 RUN_DEPENDS+= ${${comp}_RUN_DEPENDS}
542 IGNORE?= can't be installed: unknown USE_QT${_QT_VERSION:R:R} component '${comp}' #'
546 .if defined(QT_DIST) && ! ${_QT_VERSION:M4*}
547 . if ${QT_DIST} == "base"
548 # qtbase requires some tools to be symlinked to the build directory.
550 . if ${PORTNAME} != "qmake"
553 . if ${PORTNAME} != "buildtools"
554 _QT_TOOLS+= ${MOC} qdoc ${RCC}
556 . if ${PORTNAME} != "dbus"
557 _QT_TOOLS+= qdbuscpp2xml qdbusxml2cpp
559 . if ${PORTNAME} != "widgets"
563 pre-configure: qtbase-pre-configure
564 qtbase-pre-configure:
565 . if ${PORTNAME} != "qmake"
566 @(cd ${WRKSRC} && ${SETENV} ${QMAKE_ENV} ${QMAKE} ${QMAKE_ARGS})
567 # @${RM} -rf ${CONFIGURE_WRKSRC}/mkspecs
568 # @${MKDIR} ${CONFIGURE_WRKSRC}/mkspecs
570 . for tool in ${_QT_TOOLS}
571 @${TEST} -e ${QT_BINDIR}/${tool:T} && \
572 ${LN} -sf ${QT_BINDIR}/${tool:T} ${CONFIGURE_WRKSRC}/bin/${tool:T} || \
576 . if ${PORTNAME} != "qmake"
577 _QMAKE_WRKSRC= ${BUILD_WRKSRC}
578 QMAKE_SOURCE_PATH= ${_QMAKE_WRKSRC}
579 _QMAKE= ${CONFIGURE_WRKSRC}/bin/qmake
581 post-configure: qmake-configure
583 . endif # ${QT_DIST} == "base"
585 pre-install: qt-pre-install
587 # Search both in CONFIGURE_WRKSRC and WRKSRC, as the former is not
588 # a subdirectory of the latter for out-of-source builds.
589 @${FIND} ${WRKSRC} ${CONFIGURE_WRKSRC} -name "Makefile*" -type f | \
590 ${XARGS} ${REINPLACE_CMD} -e 's,${PREFIX}/${QT_LIBDIR_REL}/pkgconfig,${PREFIX}/libdata/pkgconfig,g'
592 post-install: qt-post-install
594 . if ${QT_DEFINES:N-*}
595 # We can't use SUB_FILES with a shared pkg-deinstall.in.
596 # We need it to be a script instead of a group of @unexecs, otherwise
597 # qconfig-modules.h cleanup will be run in pre-deinstall stage, which is
598 # useless. This will probably be replaced by a Keywords/ script in the future.
599 @${SED} -e 's,%%QT_MODNAME%%,${QT_MODNAME},g' \
600 -e 's,%%QT_INCDIR%%,${QT_INCDIR},g' \
601 ${.CURDIR:H:H}/devel/${_QT_RELNAME}/${FILESDIR:T}/${PKGDEINSTALL:T}.in > \
603 @${MKDIR} ${STAGEDIR}${QT_INCDIR}/QtCore/modules
605 > ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
606 . for def in ${QT_DEFINES:N-*:O:u}
607 @${ECHO_CMD} "#if !defined(QT_${def}) && !defined(QT_NO_${def})" \
608 >> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
609 ${ECHO_CMD} "# define QT_${def}" \
610 >> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
611 @${ECHO_CMD} "#endif" \
612 >> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
614 >> ${STAGEDIR}${QT_INCDIR}/QtCore/modules/qconfig-${QT_MODNAME}.h
616 @${ECHO_CMD} "@cwd ${QT_PREFIX}" >> ${TMPPLIST}
617 @${ECHO_CMD} "${QT_INCDIR_REL}/QtCore/modules/qconfig-${QT_MODNAME}.h" \
619 @${ECHO_CMD} "@exec echo '#include <QtCore/modules/qconfig-${QT_MODNAME}.h>' >> %D/${QT_INCDIR_REL}/QtCore/qconfig-modules.h" >> ${TMPPLIST}
620 . endif # ${QT_DEFINES:N-*}
621 . if ${QT_CONFIG:N-*}
622 @${MKDIR} ${STAGEDIR}${QT_MKSPECDIR}/modules
623 ${ECHO_CMD} "QT_CONFIG += ${QT_CONFIG:N-*:O:u}" \
624 > ${STAGEDIR}${QT_MKSPECDIR}/modules/qt_config_${QT_MODNAME}.pri
625 @${ECHO_CMD} "@cwd ${QT_PREFIX}" >> ${TMPPLIST}
626 @${ECHO_CMD} "${QT_MKSPECDIR_REL}/modules/qt_config_${QT_MODNAME}.pri" \
628 . endif # ${QT_CONFIG:N-*}
629 .endif # defined(QT_DIST) && ! ${_QT_VERSION:M4*}
631 .endif # defined(_POSTMKINCLUDED) && !defined(Qt_Post_Include)