aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.qt.mk
blob: d00341ea373d48ffac44c4f3f39f8898509245ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
#-*- mode: Makefile; tab-width: 4; -*-
# ex:ts=4
#
# $FreeBSD$
#
# Variables:
# QT_NONSTANDARD    - Suppress modification of configure and make environment.
# QT_DIST       - Package being built is part of the Qt distribution.
#
# Global switches (add this to /etc/make.conf):
# WITH_KDE_PHONON   - If set, standalone phonon will be used instead of Qt.
#               Required for KDE 4.4.0
# QT4_OPTIONS       - A list of 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)
#               - Qt style that renders using GTK (QGTKSTYLE)

.if !defined(_POSTMKINCLUDED) && !defined(Qt_Pre_Include)
Qt_Include_MAINTAINER=  kde@FreeBSD.org
Qt_Pre_Include=     bsd.qt.mk

.if !defined(QT_NONSTANDARD)
CONFIGURE_ARGS+=--with-qt-includes=${QT_INCDIR} \
        --with-qt-libraries=${QT_LIBDIR} \
        --with-extra-libs=${LOCALBASE}/lib \
        --with-extra-includes=${LOCALBASE}/include
CONFIGURE_ENV+= MOC="${MOC}" UIC="${UIC}" CPPFLAGS="${CPPFLAGS} ${QTCPPFLAGS}" LIBS="${QTCFGLIBS}" \
        QMAKE="${QMAKE}" QMAKESPEC="${QMAKESPEC}" QTDIR="${QT_PREFIX}"
MAKE_ENV+=  QMAKESPEC="${QMAKESPEC}"
.endif # !defined(QT_NONSTANDARD)

.if defined(QT_DIST)
MD5_FILE=   ${PORTSDIR}/devel/qt4/distinfo
MASTER_SITES=   ${MASTER_SITE_QT}
DISTNAME=   qt-everywhere-opensource-src-${QT4_VERSION}
DIST_SUBDIR=    KDE
#CONFLICTS+=    Currently there are no conflicts \o/

CONFIGURE_ARGS+=-fast -platform ${QMAKESPEC} \
        -L${PREFIX}/${QT_LIBDIR_REL} \
        -qt-gif -system-libjpeg -system-libpng \
        -system-libmng -system-libtiff -system-zlib \
        -opensource -confirm-license \
        -no-pch \
        -prefix ${PREFIX} \
        -bindir ${PREFIX}/bin \
        -libdir ${PREFIX}/${QT_LIBDIR_REL} \
        -docdir ${PREFIX}/share/doc/qt4 \
        -headerdir ${PREFIX}/${QT_INCDIR_REL} \
        -plugindir ${PREFIX}/${QT_PLUGINDIR_REL} \
        -datadir ${PREFIX}/share/qt4 \
        -translationdir ${PREFIX}/share/qt4/translations \
        -sysconfdir ${PREFIX}/etc/xdg \
        -examplesdir ${PREFIX}/share/examples/qt4/examples \
        -demosdir ${PREFIX}/share/examples/qt4/demos

PLIST_SUB+= SHLIB_VER=${QT4_VERSION} \
        SHLIB_SHVER=${QT4_VERSION:C/.[0-9]+$//}

.if defined(PACKAGE_BUILDING)
CONFIGURE_ARGS+=-no-mmx -no-3dnow -no-sse -no-sse2
.endif #defined(PACKAGE_BUILDING)

# .if defined(PORTNAME) && ${PORTNAME} != "xmlpatterns"
# CONFIGURE_ARGS+=-no-exceptions
# .endif

.if defined(WANT_QT_DEBUG) || defined(WITH_DEBUG)
CONFIGURE_ARGS+=-debug
PLIST_SUB+= DEBUG=""
.else
CONFIGURE_ARGS+=-release -no-separate-debug-info
PLIST_SUB+= DEBUG="@comment "
.endif

.if defined(WANT_QT_VERBOSE_CONFIGURE)
CONFIGURE_ARGS+=-verbose
.endif
.endif #defined(QT_DIST)

QT_INCDIR_REL=  include/qt4
QT_LIBDIR_REL=  lib/qt4
QT_PLUGINDIR_REL=   lib/qt4/plugins

PLIST_SUB+= QT_INCDIR_REL=${QT_INCDIR_REL} \
        QT_LIBDIR_REL=${QT_LIBDIR_REL} \
        QT_PLUGINDIR_REL=${QT_PLUGINDIR_REL}

QT_PREFIX?= ${LOCALBASE}
QT_INCDIR?= ${QT_PREFIX}/${QT_INCDIR_REL}
QT_LIBDIR?= ${QT_PREFIX}/${QT_LIBDIR_REL}
QT_PLUGINDIR?=  ${QT_PREFIX}/${QT_PLUGINDIR_REL}
MOC?=       ${QT_PREFIX}/bin/moc-qt4
UIC?=       ${QT_PREFIX}/bin/uic-qt4
RCC?=       ${QT_PREFIX}/bin/rcc
QMAKE?=     ${QT_PREFIX}/bin/qmake-qt4
QMAKESPEC?= ${QT_PREFIX}/share/qt4/mkspecs/freebsd-g++
QMAKEFLAGS+=    QMAKE_CC="${CC}" QMAKE_CXX="${CXX}" QMAKE_LINK_SHLIB="${CXX}" \
        QMAKE_LINK="${CXX}" QMAKE_CFLAGS="${CFLAGS}" \
        QMAKE_CXXFLAGS="${CXXFLAGS}" \
        QMAKE_CFLAGS_THREAD="${PTHREAD_CFLAGS}" \
        QMAKE_LFLAGS_THREAD="${PTHREAD_LIBS}"

.if ${OSVERSION} < 700042 && ${ARCH} == "amd64"
QTCPPFLAGS?=    -fno-gcse
.else
QTCPPFLAGS?=
.endif
QTCGFLIBS?=

.endif # !defined(_POSTMKINCLUDED) && !defined(Qt_Pre_Include)

#
# QT4 version
# Don't forget to update ${PORTSDIR}/devel/qt4/files/patch-configure !
#
QT4_VERSION?=       4.6.1

_QT_COMPONENTS_ALL= accessible assistant assistant-adp assistantclient \
            clucene codecs-cn codecs-jp codecs-kr codecs-tw corelib \
            dbus demo designer doc help help-tools gui iconengines imageformats \
            inputmethods linguist l10n makeqpf moc multimedia network \
            opengl pixeltool porting phonon phonon-gst qdbusviewer qdoc3 \
            qmake qt3support qtconfig qtestlib qvfb rcc script scripttools \
            sql sql-ibase sql-mysql sql-odbc sql-pgsql sql-sqlite2 sql-sqlite3 \
            svg uic uic3 webkit xml xmlpatterns xmlpatterns-tool

accessible_PORT=    accessibility/qt4-accessible
accessible_DEPENDS= ${QT_PLUGINDIR}/accessible/libqtaccessiblewidgets.so

assistant_PORT=     devel/qt4-assistant
assistant_DEPENDS=  ${QT_PREFIX}/bin/assistant-qt4

assistant-adp_PORT= devel/qt4-assistant-adp
assistant-adp_DEPENDS=  ${QT_PREFIX}/bin/assistant_adp

assistantclient_PORT=       devel/qt4-libqtassistantclient
assistantclient_DEPENDS=    ${QT_LIBDIR}/libQtAssistantClient.so

clucene_PORT=       textproc/qt4-clucene
clucene_DEPENDS=    ${QT_LIBDIR}/libQtCLucene.so

codecs-cn_PORT=     chinese/qt4-codecs-cn
codecs-cn_DEPENDS=  ${QT_PLUGINDIR}/codecs/libqcncodecs.so

codecs-jp_PORT=     japanese/qt4-codecs-jp
codecs-jp_DEPENDS=  ${QT_PLUGINDIR}/codecs/libqjpcodecs.so

codecs-kr_PORT=     korean/qt4-codecs-kr
codecs-kr_DEPENDS=  ${QT_PLUGINDIR}/codecs/libqkrcodecs.so

codecs-tw_PORT=     chinese/qt4-codecs-tw
codecs-tw_DEPENDS=  ${QT_PLUGINDIR}/codecs/libqtwcodecs.so

corelib_PORT=       devel/qt4-corelib
corelib_DEPENDS=    ${QT_LIBDIR}/libQtCore.so

dbus_PORT=  devel/dbus-qt4
dbus_DEPENDS=   ${QT_LIBDIR}/libQtDBus.so

demo_PORT=  misc/qt4-qtdemo
demo_DEPENDS=   ${QT_PREFIX}/bin/qtdemo

designer_PORT=      devel/qt4-designer
designer_DEPENDS=   ${QT_PREFIX}/bin/designer-qt4

doc_PORT=   misc/qt4-doc
doc_DEPENDS=    qt4-doc>=4

gui_PORT=   x11-toolkits/qt4-gui
gui_DEPENDS=    ${QT_LIBDIR}/libQtGui.so

help_PORT=  devel/qt4-help
help_DEPENDS=   ${QT_LIBDIR}/libQtHelp.so

help-tools_PORT=    devel/qt4-help-tools
help-tools_DEPENDS= ${QT_PREFIX}/bin/qhelpgenerator

iconengines_PORT=   graphics/qt4-iconengines
iconengines_DEPENDS=    ${QT_PLUGINDIR}/iconengines/libqsvgicon.so

imageformats_PORT=  graphics/qt4-imageformats
imageformats_DEPENDS=   ${QT_PLUGINDIR}/imageformats/libqjpeg.so

inputmethods_PORT=  x11/qt4-inputmethods
inputmethods_DEPENDS=   ${QT_PLUGINDIR}/inputmethods/libqimsw-multi.so

linguist_PORT=      devel/qt4-linguist
linguist_DEPENDS=   ${QT_PREFIX}/bin/linguist-qt4

l10n_PORT=  misc/qt4-l10n
l10n_DEPENDS=   qt4-l10n>=4

makeqpf_PORT=       devel/qt4-makeqpf
makeqpf_DEPENDS=    ${QT_PREFIX}/bin/makeqpf-qt4

moc_PORT=   devel/qt4-moc
moc_DEPENDS=    ${MOC}

multimedia_PORT=    multimedia/qt4-multimedia
multimedia_DEPENDS= ${QT_LIBDIR}/libQtMultimedia.so

network_PORT=       net/qt4-network
network_DEPENDS=    ${QT_LIBDIR}/libQtNetwork.so

opengl_PORT=    x11/qt4-opengl
opengl_DEPENDS= ${QT_LIBDIR}/libQtOpenGL.so

pixeltool_PORT=     graphics/qt4-pixeltool
pixeltool_DEPENDS=  ${QT_PREFIX}/bin/pixeltool

.if defined(WITH_KDE_PHONON)
phonon_PORT=    multimedia/phonon
.else
phonon_PORT=    multimedia/qt4-phonon
.endif
phonon_DEPENDS= ${QT_LIBDIR}/libphonon.so

.if defined(WITH_KDE_PHONON)
phonon-gst_PORT=    multimedia/phonon-gstreamer
.else
phonon-gst_PORT=    multimedia/qt4-phonon-gst
.endif
phonon-gst_DEPENDS= ${QT_PLUGINDIR}/phonon_backend/libphonon_gstreamer.so

porting_PORT=       devel/qt4-porting
porting_DEPENDS=    ${QT_PREFIX}/bin/qt3to4

qdbusviewer_PORT=   devel/qt4-qdbusviewer
qdbusviewer_DEPENDS=    ${QT_PREFIX}/bin/qdbusviewer

qdoc3_PORT= devel/qt4-qdoc3
qdoc3_DEPENDS=  ${QT_PREFIX}/bin/qdoc3

qmake_PORT= devel/qmake4
qmake_DEPENDS=  ${QMAKE}

qt3support_PORT=    devel/qt4-qt3support
qt3support_DEPENDS= ${QT_LIBDIR}/libQt3Support.so

qtconfig_PORT=      misc/qt4-qtconfig
qtconfig_DEPENDS=   ${QT_PREFIX}/bin/qtconfig-qt4

qtestlib_PORT=      devel/qt4-qtestlib
qtestlib_DEPENDS=   ${QT_LIBDIR}/libQtTest.so

qvfb_PORT=  devel/qt4-qvfb
qvfb_DEPENDS=   ${QT_PREFIX}/bin/qvfb-qt4

rcc_PORT=       devel/qt4-rcc
rcc_DEPENDS=        ${RCC}

script_PORT=        devel/qt4-script
script_DEPENDS=     ${QT_LIBDIR}/libQtScript.so

scripttools_PORT=   devel/qt4-scripttools
scripttools_DEPENDS=    ${QT_LIBDIR}/libQtScriptTools.so

sql_PORT=   databases/qt4-sql
sql_DEPENDS=    ${QT_LIBDIR}/libQtSql.so

sql-ibase_PORT=     databases/qt4-ibase-plugin
sql-ibase_DEPENDS=  ${QT_PLUGINDIR}/sqldrivers/libqsqlibase.so

sql-mysql_PORT=     databases/qt4-mysql-plugin
sql-mysql_DEPENDS=  ${QT_PLUGINDIR}/sqldrivers/libqsqlmysql.so

sql-odbc_PORT=      databases/qt4-odbc-plugin
sql-odbc_DEPENDS=   ${QT_PLUGINDIR}/sqldrivers/libqsqlodbc.so

sql-pgsql_PORT=     databases/qt4-pgsql-plugin
sql-pgsql_DEPENDS=  ${QT_PLUGINDIR}/sqldrivers/libqsqlpsql.so

sql-sqlite2_PORT=   databases/qt4-sqlite-plugin
sql-sqlite2_DEPENDS=    ${QT_PLUGINDIR}/sqldrivers/libqsqlite2.so

sql-sqlite3_PORT=   databases/qt4-sqlite3-plugin
sql-sqlite3_DEPENDS=    ${QT_PLUGINDIR}/sqldrivers/libqsqlite.so

svg_PORT=   graphics/qt4-svg
svg_DEPENDS=    ${QT_LIBDIR}/libQtSvg.so

uic_PORT=   devel/qt4-uic
uic_DEPENDS=    ${UIC}

uic3_PORT=  devel/qt4-uic3
uic3_DEPENDS=   ${QT_PREFIX}/bin/uic3

webkit_PORT=    www/qt4-webkit
webkit_DEPENDS= ${QT_LIBDIR}/libQtWebKit.so

xml_PORT=   textproc/qt4-xml
xml_DEPENDS=    ${QT_LIBDIR}/libQtXml.so

xmlpatterns_PORT=   textproc/qt4-xmlpatterns
xmlpatterns_DEPENDS=    ${QT_LIBDIR}/libQtXmlPatterns.so

xmlpatterns-tool_PORT=      textproc/qt4-xmlpatterns-tool
xmlpatterns-tool_DEPENDS=   ${QT_PREFIX}/bin/xmlpatterns

.if defined(_POSTMKINCLUDED) && !defined(Qt_Post_Include)
Qt_Post_Include= bsd.qt.mk

.for component in ${_QT_COMPONENTS_ALL}
${component}_BUILD_DEPENDS?=    ${${component}_DEPENDS}:${PORTSDIR}/${${component}_PORT}
${component}_RUN_DEPENDS?=  ${${component}_DEPENDS}:${PORTSDIR}/${${component}_PORT}

${component}_build_BUILD_DEPENDS?=  ${${component}_BUILD_DEPENDS}
${component}_run_RUN_DEPENDS?=      ${${component}_RUN_DEPENDS}

_QT_COMPONENTS_ALL_SUFFIXED+=   ${component} ${component}_build ${component}_run
.endfor

.if defined(QT_COMPONENTS)
. for component in ${QT_COMPONENTS:O:u}
.  if ${_QT_COMPONENTS_ALL_SUFFIXED:M${component}}!= ""
BUILD_DEPENDS+= ${${component}_BUILD_DEPENDS}
RUN_DEPENDS+=   ${${component}_RUN_DEPENDS}
.  else
IGNORE= can't be installed: unknown Qt 4 component '${component}'
.  endif
. endfor
.endif

.endif