1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 137798 2015-06-20 06:17:05Z mcalhoun@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name qt5-mac |
---|
7 | version 5.5.0 |
---|
8 | |
---|
9 | # get Qt's version numbers |
---|
10 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
11 | set qt_major [lindex [split ${version} .] 0] |
---|
12 | |
---|
13 | ############################################################################### |
---|
14 | # rather than have SQL version baked into the subport name, |
---|
15 | # create variants for each SQL version |
---|
16 | # subports marked obsolete on dd/mm/yyyy |
---|
17 | ############################################################################### |
---|
18 | subport qt5-mac-mysql56-plugin { |
---|
19 | replaced_by qt5-mac-mysql-plugin |
---|
20 | } |
---|
21 | subport qt5-mac-sqlite3-plugin { |
---|
22 | replaced_by qt5-mac-sqlite-plugin |
---|
23 | } |
---|
24 | subport qt5-mac-psql84-plugin { |
---|
25 | replaced_by qt5-mac-psql-plugin |
---|
26 | } |
---|
27 | if { ${subport} eq "qt5-mac-mysql56-plugin" || ${subport} eq "qt5-mac-sqlite3-plugin" || ${subport} eq "qt5-mac-psql84-plugin" } { |
---|
28 | PortGroup obsolete 1.0 |
---|
29 | return |
---|
30 | } |
---|
31 | ############################################################################### |
---|
32 | |
---|
33 | categories aqua |
---|
34 | platforms macosx |
---|
35 | maintainers mcalhoun openmaintainer |
---|
36 | license {LGPL-2.1 GPL-3} |
---|
37 | |
---|
38 | homepage http://qt.io |
---|
39 | |
---|
40 | # generate documentation from complete code base |
---|
41 | # generate modules from separate downloads |
---|
42 | if { ${subport} ne "${name}-docs" } { |
---|
43 | master_sites http://download.qt.io/official_releases/qt/${branch}/${version}/submodules |
---|
44 | } else { |
---|
45 | master_sites http://download.qt.io/official_releases/qt/${branch}/${version}/single/ |
---|
46 | } |
---|
47 | |
---|
48 | if { ${subport} ne ${name} } { |
---|
49 | # file sizes are significantly smaller using xz |
---|
50 | use_xz yes |
---|
51 | } |
---|
52 | |
---|
53 | if { ${os.platform} ne "darwin" } { |
---|
54 | pre-fetch { |
---|
55 | ui_warn "${subport} is untested on \"${os.platform}\"." |
---|
56 | } |
---|
57 | } elseif { ${os.major} < 11 } { |
---|
58 | pre-fetch { |
---|
59 | ui_error "OS X prior to 10.8 (Mountain Lion) is not a Reference Configuration for Qt." |
---|
60 | ui_error "OS X prior to 10.7 (Lion) is not even tested." |
---|
61 | ui_error "See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations" |
---|
62 | return -code error "unsupported OS" |
---|
63 | } |
---|
64 | } elseif { ${os.major} > 14 } { |
---|
65 | pre-fetch { |
---|
66 | ui_warn "OS X subsequent to 10.10 (Yosemite) is not a Reference Configuration for Qt." |
---|
67 | ui_warn "See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations" |
---|
68 | } |
---|
69 | } else { |
---|
70 | # 11 <= ${os.major} <= 14 |
---|
71 | if { [variant_isset universal] } { |
---|
72 | pre-fetch { |
---|
73 | ui_warn "Multiple architectures is not a Reference Configuration for Qt." |
---|
74 | ui_warn "See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations" |
---|
75 | } |
---|
76 | } else { |
---|
77 | if { ${build_arch} eq "i386" } { |
---|
78 | pre-fetch { |
---|
79 | ui_warn "32-bit mode is not a Reference Configuration for Qt." |
---|
80 | ui_warn "See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations" |
---|
81 | } |
---|
82 | } |
---|
83 | } |
---|
84 | } |
---|
85 | |
---|
86 | ############################################################################### Modules Not Considered |
---|
87 | # |
---|
88 | # No qt5 (Doesn't Install Anything) |
---|
89 | # No qtactiveqt (Windows Only) |
---|
90 | # No qtandroidextras (Android Only) |
---|
91 | # No qtdoc (Doesn't Install Anything) |
---|
92 | # No qtwayland (Linux Only) |
---|
93 | # No qtx11extras (X11 Only) |
---|
94 | # No qtwinextras (Windows Only) |
---|
95 | # |
---|
96 | ############################################################################### |
---|
97 | |
---|
98 | ############################################################################### Finding Dependencies |
---|
99 | # |
---|
100 | # grep -r "%dependencies" * |
---|
101 | # find ./ -name sync.profile |
---|
102 | # |
---|
103 | # grep -r qtCompileTest * |
---|
104 | # |
---|
105 | # find ./ -name config.tests |
---|
106 | # |
---|
107 | # find ./ -name Find\*.cmake |
---|
108 | # |
---|
109 | ############################################################################### |
---|
110 | |
---|
111 | ############################################################################### Notes |
---|
112 | # |
---|
113 | # qtconnectivity checks for bluetooth libraries |
---|
114 | # bluez and bluez_le (Linux Only) |
---|
115 | # btapi10_2_1 libbb2 (Blackberry Only) |
---|
116 | # |
---|
117 | # qtconnectivity depends on |
---|
118 | # qtandroidextras (Android Only) |
---|
119 | # |
---|
120 | # qttools depends on |
---|
121 | # qtactiveqt (Windows Only) |
---|
122 | # |
---|
123 | # qtwebkit has tests for libraries in: |
---|
124 | # Tools/qmake/mkspecs/features/configure.prf |
---|
125 | # Tools/qmake/config.tests/ |
---|
126 | # |
---|
127 | ############################################################################### |
---|
128 | |
---|
129 | ############################################################################### TODO |
---|
130 | # |
---|
131 | # TODO: possible to trim dependencies of qtbase? |
---|
132 | # TODO: force qttools to not depend on (deprecated) qtwebkit? |
---|
133 | # TODO: do not use rpath? |
---|
134 | # TODO: support older versions of OS X via different versions of Qt 5 |
---|
135 | # |
---|
136 | ############################################################################### |
---|
137 | |
---|
138 | ############################################################################### Module Format |
---|
139 | # |
---|
140 | # "Qt Module Name" { |
---|
141 | # checksum, rmd160 |
---|
142 | # checksum, sha256 |
---|
143 | # dependencies, build |
---|
144 | # dependencies, lib |
---|
145 | # dependencies, Qt module name |
---|
146 | # Qt components provided |
---|
147 | # included in "standard" installation of Qt (empty string is no, explanation string is yes) |
---|
148 | # variant overrides |
---|
149 | # } |
---|
150 | # |
---|
151 | # module info found at https://doc.qt.io/qt-5/qtmodules.html |
---|
152 | # |
---|
153 | ############################################################################### |
---|
154 | array set modules { |
---|
155 | qt3d { |
---|
156 | d51649a9806a05116c5f033689675c95b60de0d4 |
---|
157 | bf6c54fbb6f279e9bd6fd67f7faa8e61ac4273baa06a56f8946346adc8c3568e |
---|
158 | "" |
---|
159 | "port:assimp" |
---|
160 | "qtbase qtxmlpatterns qtdeclarative qtimageformats" |
---|
161 | {"Qt3D Core" "Qt3D Renderer" "Qt3D Quick" "Qt3D Quick Renderer" "Qt3D Input"} |
---|
162 | "technology preview module" |
---|
163 | "variant overrides: " |
---|
164 | } |
---|
165 | qtbase { |
---|
166 | 598524a9905391142eda62797d5fcc3d333881f4 |
---|
167 | 893f0691739c00d13ff85bf8d3fd14e1c7a62fbbbcffa44b0491da4d5e570965 |
---|
168 | "" |
---|
169 | "port:zlib port:libpng port:jpeg port:freetype path:bin/dbus-daemon:dbus path:lib/libssl.dylib:openssl port:tiff port:libmng path:lib/pkgconfig/glib-2.0.pc:glib2 port:icu port:pcre port:libiconv port:harfbuzz" |
---|
170 | "" |
---|
171 | {"Qt Gui" "Qt Widgets" "Qt Print Support" "Qt OpenGL" "Qt Core" "Qt XML" "Qt SQL" "Qt Network" "Qt Test" "Qt D-Bus" "Qt Concurrent" "Qt Platform Headers"} |
---|
172 | "" |
---|
173 | "variant overrides: " |
---|
174 | } |
---|
175 | qtcanvas3d { |
---|
176 | 959283bd35ac357a049db06ee6103249c226868f |
---|
177 | 46bec7349f3bf74adae60a5aa3e1a2d58e949f6c23971307a040df3a67f445c7 |
---|
178 | "" |
---|
179 | "" |
---|
180 | "qtbase qtdeclarative" |
---|
181 | {"Qt Canvas 3D"} |
---|
182 | "" |
---|
183 | "variant overrides: " |
---|
184 | } |
---|
185 | qtconnectivity { |
---|
186 | 4ece4d5b7c90f0a6e25d8bf7c7fcaa99a95be476 |
---|
187 | f1cfdd934e11dc114039c84a6a6b83870b56b2966715f1cb266f25bce1524302 |
---|
188 | "" |
---|
189 | "" |
---|
190 | "qtbase qtdeclarative qtxmlpatterns" |
---|
191 | {"Qt Bluetooth" "Qt NFC"} |
---|
192 | "" |
---|
193 | "variant overrides: " |
---|
194 | } |
---|
195 | qtdeclarative { |
---|
196 | 1e402e2c0535682118e29bc3f8a9e3292abc27f2 |
---|
197 | 858a12c5647764da8f81edec4ed444af77888cf931b739c10168064ae96f6773 |
---|
198 | "" |
---|
199 | "" |
---|
200 | "qtbase qtxmlpatterns" |
---|
201 | {"Qt QML" "Qt Quick" "Qt Quick Widgets"} |
---|
202 | "" |
---|
203 | "variant overrides: " |
---|
204 | } |
---|
205 | qtenginio { |
---|
206 | 027441ce05e4086c88034ea4935782caa35d7a6a |
---|
207 | f61c4b2a26550bcb5e81cfcde55b1e521ee021226679dc9f60ab6c55f21f1520 |
---|
208 | "" |
---|
209 | "" |
---|
210 | "qtbase qtdeclarative qtxmlpatterns" |
---|
211 | {"Enginio"} |
---|
212 | "" |
---|
213 | "variant overrides: " |
---|
214 | } |
---|
215 | qtgraphicaleffects { |
---|
216 | 48a4cbbf9e92f6ef624b9627606f604d32336503 |
---|
217 | f143514e7414797f264fea6348635e1db3e15d13e326af4a6b355fecf0a147ee |
---|
218 | "" |
---|
219 | "" |
---|
220 | "qtbase qtdeclarative qtxmlpatterns" |
---|
221 | {"Qt Graphical Effects"} |
---|
222 | "" |
---|
223 | "variant overrides: " |
---|
224 | } |
---|
225 | qtimageformats { |
---|
226 | 31dcaf667ef048fa7c230b009f163ff8007f4600 |
---|
227 | 6479d1d2ac5b7dd85566799e13a173e525cbccd5c8bd43e7db1bdaf772af8955 |
---|
228 | "" |
---|
229 | "port:jasper port:libmng port:tiff port:webp" |
---|
230 | "qtbase" |
---|
231 | {"Qt Image Formats"} |
---|
232 | "" |
---|
233 | "variant overrides: " |
---|
234 | } |
---|
235 | qtlocation { |
---|
236 | 92bac23eeaf61a85b92860a0ed15d70f2cd0dc0b |
---|
237 | 0a2d7ff554fd410e1dca49aebbab393979d51ada9f6e268ebf966fa6a5eecb0c |
---|
238 | "" |
---|
239 | "" |
---|
240 | "qtbase qtxmlpatterns qtdeclarative qtquickcontrols" |
---|
241 | {"Qt Location" "Qt Positioning"} |
---|
242 | "" |
---|
243 | "variant overrides: " |
---|
244 | } |
---|
245 | qtmacextras { |
---|
246 | 5dc14f08ab241ea3778b133b79ed63ddc3ad5057 |
---|
247 | d274b9c11acb117bab72b3b0040765368c1ee4e2550db7410896c803389397e4 |
---|
248 | "" |
---|
249 | "" |
---|
250 | "qtbase" |
---|
251 | {"Qt Mac Extras"} |
---|
252 | "" |
---|
253 | "variant overrides: " |
---|
254 | } |
---|
255 | qtmultimedia { |
---|
256 | 4dd2906fc6b55841460603c2329f940f3b498f44 |
---|
257 | a8bf1bd59bad74bba2906e6a86faa1cf008c8dba5f5a9cdea72eb0ce5f85355b |
---|
258 | "" |
---|
259 | "" |
---|
260 | "qtbase qtxmlpatterns qtdeclarative" |
---|
261 | {"Qt Multimedia" "Qt Multimedia Widgets"} |
---|
262 | "" |
---|
263 | "variant overrides: " |
---|
264 | } |
---|
265 | qtquick1 { |
---|
266 | 39ef1ceccacb14a6c1fcb2a8846469bb577ecdfc |
---|
267 | db563b33e1670bc8a254d53c0a8e29ba501b903fafcd3b7e3d2ab845db0dfa2c |
---|
268 | "" |
---|
269 | "" |
---|
270 | "qtbase qtscript qtxmlpatterns qtdeclarative qttools qtwebkit" |
---|
271 | {"Qt Declarative"} |
---|
272 | "deprecated" |
---|
273 | "variant overrides: " |
---|
274 | } |
---|
275 | qtquickcontrols { |
---|
276 | 305102b9f1d37e84d486c243e5240d99e67fc935 |
---|
277 | df616aa6b390797f92f33115510961d1a53a55c349a18ae21f74b4aff478c2ea |
---|
278 | "" |
---|
279 | "" |
---|
280 | "qtbase qtdeclarative qtxmlpatterns" |
---|
281 | {"Qt Quick Controls" "Qt Quick Dialogs" "Qt Quick Layouts" "Qt Quick Extras"} |
---|
282 | "" |
---|
283 | "variant overrides: " |
---|
284 | } |
---|
285 | qtscript { |
---|
286 | 5e32e0c158886b3117a1955a21c8b1c4e04e3134 |
---|
287 | 343932ea8b2ecb16c3d9b49db55a7975f2f22534055608de4b06b1e38d867e8b |
---|
288 | "" |
---|
289 | "" |
---|
290 | "qtbase" |
---|
291 | {"Qt Script" "Qt Script Tools"} |
---|
292 | "deprecated in favor QJS* in Qt QML" |
---|
293 | "variant overrides: " |
---|
294 | } |
---|
295 | qtsensors { |
---|
296 | b9a0ebaad280296a0d9877d26fcdc41431fac286 |
---|
297 | 8d5a989df94b28dac872f3b28437982ecc6434b38b44da75f1d4bf81915fd14b |
---|
298 | "" |
---|
299 | "" |
---|
300 | "qtbase qtxmlpatterns qtdeclarative" |
---|
301 | {"Qt Sensors"} |
---|
302 | "" |
---|
303 | "variant overrides: " |
---|
304 | } |
---|
305 | qtserialport { |
---|
306 | effa7ba4aa5015373871b9798cd5d09a8a5eb81c |
---|
307 | a60e2d2113c1c3895b71c901921f83b81e9b3c59e3620cf94bd8647730efa866 |
---|
308 | "" |
---|
309 | "" |
---|
310 | "qtbase" |
---|
311 | {"Qt Serial Port"} |
---|
312 | "" |
---|
313 | "variant overrides: " |
---|
314 | } |
---|
315 | qtsvg { |
---|
316 | a3cbb47ff72d2c75f0317c912bd0fe96720581d0 |
---|
317 | 00efdeec66d34dabeddf17c510c0d607179991566a030d461968a16d6322e19f |
---|
318 | "" |
---|
319 | "" |
---|
320 | "qtbase" |
---|
321 | {"Qt SVG"} |
---|
322 | "" |
---|
323 | "variant overrides: " |
---|
324 | } |
---|
325 | qttools { |
---|
326 | 86b50c93b6a72d10cc6af71b6edfabba38a48f2f |
---|
327 | 5b65147187fb7f4456c20ef263f1093709d728f737d6d871a9a5888132fac07d |
---|
328 | "" |
---|
329 | "" |
---|
330 | "qtbase qtxmlpatterns qtdeclarative qtwebkit" |
---|
331 | {"Qt Help" "Qt UI Tools" "Qt Designer" } |
---|
332 | "" |
---|
333 | "variant overrides: " |
---|
334 | } |
---|
335 | qttranslations { |
---|
336 | 5e2f6b66125ab3839f02d126574b22d4f67b2fad |
---|
337 | 5ace1730e101cbfecca56bd775ccb7f8d103ae4ad956da689e01e501c860bf86 |
---|
338 | "" |
---|
339 | "" |
---|
340 | "qtbase qttools" |
---|
341 | {"translation files"} |
---|
342 | "" |
---|
343 | "variant overrides: ~examples ~tests ~debug noarch" |
---|
344 | } |
---|
345 | qtwebchannel { |
---|
346 | 73ee129d22a73c3f74812ed82f806be0ce747878 |
---|
347 | 94f88604ff0b29a30f1a1b13601d4bce9af5c0a96c43869705aee1596aeb2d8d |
---|
348 | "" |
---|
349 | "" |
---|
350 | "qtbase qtwebsockets qtdeclarative" |
---|
351 | {"Qt WebChannel"} |
---|
352 | "" |
---|
353 | "variant overrides: " |
---|
354 | } |
---|
355 | qtwebengine { |
---|
356 | 9b5504e8f39cb3cfa065d0977ce8af5fe2ffdea2 |
---|
357 | d703e60838744283f9a3419bdd8708f2e01d3ed81f18aaadd713342033cbd65a |
---|
358 | "" |
---|
359 | "" |
---|
360 | "qtbase qtdeclarative qtxmlpatterns qtquickcontrols qtwebchannel" |
---|
361 | {"Qt WebEngine" "Qt WebEngine Widgets"} |
---|
362 | "very large and relatively new; doesn't support i386; requires newer version of XCode" |
---|
363 | "variant overrides: ~universal" |
---|
364 | } |
---|
365 | qtxmlpatterns { |
---|
366 | 11193634ecd61e7222bb3c283224a245894b572c |
---|
367 | 672882c670c13c5caec199173cdabffd38474d06979d261bdc6e19738e0cef53 |
---|
368 | "" |
---|
369 | "" |
---|
370 | "qtbase" |
---|
371 | {"Qt XML Patterns"} |
---|
372 | "" |
---|
373 | "variant overrides: " |
---|
374 | } |
---|
375 | qtwebsockets { |
---|
376 | 23b8c617666ec509c62b688dc2054ed7fde5fbc1 |
---|
377 | 1ad465b1b2d1e6dddbdc403af9f69d93b1c408f6903c28ccaa52058df7ee8ae8 |
---|
378 | "" |
---|
379 | "" |
---|
380 | "qtbase qtdeclarative" |
---|
381 | {"Qt WebSockets"} |
---|
382 | "" |
---|
383 | "variant overrides: " |
---|
384 | } |
---|
385 | qtwebkit { |
---|
386 | c9684de0fec248391c316e69f07d087c170f87bb |
---|
387 | 17964996347d040a68b0c378a84b4b3874f1289c0d561b6868f7668402d9eeec |
---|
388 | "" |
---|
389 | "port:fontconfig port:icu port:leveldb port:webp port:libxml2 port:libxslt port:zlib port:sqlite3" |
---|
390 | "qtbase qtxmlpatterns qtdeclarative qtlocation qtmultimedia qtsensors qtwebchannel" |
---|
391 | {"Qt WebKit" "Qt WebKit Widgets"} |
---|
392 | "deprecated in favor of Qt WebEngine" |
---|
393 | "variant overrides: " |
---|
394 | } |
---|
395 | qtwebkit-examples { |
---|
396 | 3a3a21608b6c28580bd0b5151b16d62945d33db4 |
---|
397 | d25564fb56e8e06ad782390c7a7cf2c80f52c1dac5a8cac6ad5382711cd4bd12 |
---|
398 | "" |
---|
399 | "" |
---|
400 | "qtbase qtwebkit qtscript qtsvg qtxmlpatterns qtdeclarative qttools" |
---|
401 | {"examples for Qt WebKit"} |
---|
402 | "deprecated in favor of Qt WebEngine; doen't provide functionality" |
---|
403 | "variant overrides: ++examples" |
---|
404 | } |
---|
405 | } |
---|
406 | |
---|
407 | ############################################################################### SQL Plugin Format |
---|
408 | # |
---|
409 | # { |
---|
410 | # variant name |
---|
411 | # dependency, library |
---|
412 | # include path |
---|
413 | # link requirement |
---|
414 | # obsolete? (empty string is no) |
---|
415 | # } |
---|
416 | # |
---|
417 | ############################################################################### |
---|
418 | array set sql_plugins { |
---|
419 | {sqlite SQLite} { |
---|
420 | { |
---|
421 | "sqlite3" |
---|
422 | "port:sqlite3" |
---|
423 | "${prefix}/include" |
---|
424 | "-L${prefix}/lib -lsqlite3" |
---|
425 | "" |
---|
426 | } |
---|
427 | } |
---|
428 | {psql PostgreSQL} { |
---|
429 | { |
---|
430 | "postgresql94" |
---|
431 | "port:postgresql94" |
---|
432 | "${prefix}/include/postgresql94" |
---|
433 | "-L${prefix}/lib/postgresql94 -lpq" |
---|
434 | "" |
---|
435 | } |
---|
436 | { |
---|
437 | "postgresql84" |
---|
438 | "port:postgresql84" |
---|
439 | "${prefix}/include/postgresql84" |
---|
440 | "-L${prefix}/lib/postgresql84 -lpq" |
---|
441 | "" |
---|
442 | } |
---|
443 | } |
---|
444 | {mysql MySQL} { |
---|
445 | { |
---|
446 | "mysql56" |
---|
447 | "port:mysql56" |
---|
448 | "${prefix}/include/mysql56/mysql" |
---|
449 | "-L${prefix}/lib/mysql56/mysql -lmysqlclient_r" |
---|
450 | "" |
---|
451 | } |
---|
452 | } |
---|
453 | } |
---|
454 | |
---|
455 | foreach {module module_info} [array get modules] { |
---|
456 | |
---|
457 | subport ${name}-${module} { |
---|
458 | distname ${module}-opensource-src-${version} |
---|
459 | |
---|
460 | # see https://bugreports.qt.io/browse/QTBUG-35514 |
---|
461 | build.target |
---|
462 | |
---|
463 | checksums \ |
---|
464 | rmd160 [lindex ${module_info} 0] \ |
---|
465 | sha256 [lindex ${module_info} 1] |
---|
466 | |
---|
467 | foreach deps [lindex ${module_info} 2] { |
---|
468 | depends_build-append [subst ${deps}] |
---|
469 | } |
---|
470 | |
---|
471 | foreach deps [lindex ${module_info} 3] { |
---|
472 | depends_lib-append [subst ${deps}] |
---|
473 | } |
---|
474 | |
---|
475 | foreach qtdeps [lindex ${module_info} 4] { |
---|
476 | depends_lib-append port:${name}-${qtdeps} |
---|
477 | } |
---|
478 | |
---|
479 | description Tools and Module(s) for Qt Tool Kit ${qt_major} |
---|
480 | |
---|
481 | set modules_provided_list [lindex ${module_info} 5] |
---|
482 | if { [llength ${modules_provided_list}] == 1 } { |
---|
483 | set modules_provided_join [lindex ${modules_provided_list} 0] |
---|
484 | } elseif { [llength ${modules_provided_list}] == 2 } { |
---|
485 | set modules_provided_join [join ${modules_provided_list} " and "] |
---|
486 | } else { |
---|
487 | set modules_provided_join [join [list [join [lrange ${modules_provided_list} 0 end-1] ", "] [lindex ${modules_provided_list} end]] ", and "] |
---|
488 | } |
---|
489 | |
---|
490 | long_description "Tools and Module(s) for Qt Tool Kit ${qt_major}: ${modules_provided_join}" |
---|
491 | } |
---|
492 | } |
---|
493 | |
---|
494 | subport ${name}-docs { |
---|
495 | distname qt-everywhere-opensource-src-${version} |
---|
496 | |
---|
497 | checksums \ |
---|
498 | rmd160 47eede15296f2275aadb1f4e4806cea4b8205e45 \ |
---|
499 | sha256 7ea2a16ecb8088e67db86b0835b887d5316121aeef9565d5d19be3d539a2c2af |
---|
500 | |
---|
501 | description Documentation for Qt Tool Kit ${qt_major} |
---|
502 | long_description Documentation for Qt Tool Kit ${qt_major} |
---|
503 | |
---|
504 | supported_archs noarch |
---|
505 | universal_variant no |
---|
506 | |
---|
507 | build.target docs |
---|
508 | destroot.target install_docs |
---|
509 | } |
---|
510 | |
---|
511 | # see http://doc.qt.io/qt-5/sql-driver.html for info on building SQL Database Drivers |
---|
512 | foreach {sql_names sql_info} [array get sql_plugins] { |
---|
513 | set driver [lindex ${sql_names} 0] |
---|
514 | set dbms [lindex ${sql_names} 1] |
---|
515 | |
---|
516 | subport ${name}-${driver}-plugin { |
---|
517 | distname qtbase-opensource-src-${version} |
---|
518 | |
---|
519 | checksums \ |
---|
520 | rmd160 [lindex $modules(qtbase) 0] \ |
---|
521 | sha256 [lindex $modules(qtbase) 1] |
---|
522 | |
---|
523 | description ${dbms} Database Driver for Qt Tool Kit ${qt_major} |
---|
524 | long_description ${dbms} Database Driver for Qt Tool Kit ${qt_major} |
---|
525 | |
---|
526 | # if there is more than one version of the database system, create variants for each version |
---|
527 | if { [llength ${sql_info}] > 1 } { |
---|
528 | |
---|
529 | set any_variant_set false |
---|
530 | |
---|
531 | foreach variant_info ${sql_info} { |
---|
532 | |
---|
533 | set varName [lindex ${variant_info} 0] |
---|
534 | |
---|
535 | # find every other variant so it can be marked as conflicting |
---|
536 | set conflicts_list "" |
---|
537 | foreach variant_info2 ${sql_info} { |
---|
538 | set varName2 [lindex ${variant_info2} 0] |
---|
539 | |
---|
540 | if { ${varName} ne ${varName2} } { |
---|
541 | lappend conflicts_list ${varName2} |
---|
542 | } |
---|
543 | } |
---|
544 | |
---|
545 | # get only the numbers from the name |
---|
546 | regexp {[0-9].} ${varName} varVer |
---|
547 | |
---|
548 | variant ${varName} conflicts ${conflicts_list} description "use version ${varVer} of ${dbms}" {} |
---|
549 | |
---|
550 | # check if any variant has been set |
---|
551 | if { [variant_isset ${varName}] } { |
---|
552 | set any_variant_set true |
---|
553 | } |
---|
554 | } |
---|
555 | |
---|
556 | # ensure at least one variant is set |
---|
557 | if { !${any_variant_set} } { |
---|
558 | default_variants-append +[lindex [lindex ${sql_info} 0] 0] |
---|
559 | } |
---|
560 | } |
---|
561 | |
---|
562 | foreach variant_info ${sql_info} { |
---|
563 | set varName [lindex ${variant_info} 0] |
---|
564 | |
---|
565 | if { ( [variant_exists ${varName}] && [variant_isset ${varName}] ) || [llength ${sql_info}]==1 } { |
---|
566 | depends_lib-append [lindex ${variant_info} 1] |
---|
567 | |
---|
568 | configure.args-append \ |
---|
569 | [subst INCLUDEPATH+=\"[lindex ${variant_info} 2]\"] \ |
---|
570 | [subst LIBS+=\"[lindex ${variant_info} 3]\"] |
---|
571 | } |
---|
572 | } |
---|
573 | |
---|
574 | # for single architecture, easier to use |
---|
575 | # worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/${driver}, |
---|
576 | # but doesn't work for universal build |
---|
577 | configure.dir ${worksrcpath}/src/plugins/sqldrivers/${driver} |
---|
578 | build.dir ${configure.dir} |
---|
579 | destroot.dir ${configure.dir} |
---|
580 | } |
---|
581 | } |
---|
582 | |
---|
583 | if { ${subport} eq ${name} } { |
---|
584 | # the main port is Meta-port to install various modules |
---|
585 | |
---|
586 | description Qt Tool Kit ${qt_major} |
---|
587 | long_description Qt Tool Kit: A cross-platform framework \ |
---|
588 | (headers, data, and libraries) for writing \ |
---|
589 | cross-platform GUI-based applications. |
---|
590 | |
---|
591 | fetch {} |
---|
592 | checksum {} |
---|
593 | configure {} |
---|
594 | build {} |
---|
595 | |
---|
596 | # create a dummy file so the port can be successfully activated |
---|
597 | destroot { |
---|
598 | xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${subport} |
---|
599 | set docfile [open ${destroot}${prefix}/share/doc/${subport}/README.txt "w"] |
---|
600 | puts ${docfile} "Meta-port for ${name}" |
---|
601 | puts ${docfile} "${long_description}" |
---|
602 | close ${docfile} |
---|
603 | } |
---|
604 | |
---|
605 | foreach {module module_info} [array get modules] { |
---|
606 | if { [lindex ${module_info} 6] eq "" } { |
---|
607 | depends_lib-append port:${name}-${module} |
---|
608 | } |
---|
609 | } |
---|
610 | depends_lib-append port:${name}-sqlite-plugin |
---|
611 | |
---|
612 | supported_archs noarch |
---|
613 | universal_variant no |
---|
614 | |
---|
615 | } elseif { ${subport} ne "${name}-qtbase" && ${subport} ne "${name}-docs" } { |
---|
616 | # these subports use qmake |
---|
617 | |
---|
618 | # special case |
---|
619 | if { ${subport} eq "${name}-qtlocation" } { |
---|
620 | # qtlocation uses |
---|
621 | # GeoClue (http://freedesktop.org/wiki/Software/GeoClue/) and |
---|
622 | # Gypsy (http://gypsy.freedesktop.org) |
---|
623 | # if they can be found |
---|
624 | # Ensure that test fails even if software is installed |
---|
625 | post-patch { |
---|
626 | foreach test { geoclue geoclue-satellite gypsy } { |
---|
627 | reinplace "s|return 0;|return 0;\\\n#error turn off test|g" ${worksrcpath}/config.tests/${test}/main.cpp |
---|
628 | } |
---|
629 | } |
---|
630 | } |
---|
631 | |
---|
632 | # special case |
---|
633 | if { ${subport} eq "${name}-qtwebkit" } { |
---|
634 | # qmake uses pkgconfig to look for icu |
---|
635 | # This feature does not work without "CONFIG += link_pkgconfig" |
---|
636 | patchfiles-append patch-icu.pro.diff |
---|
637 | |
---|
638 | # qtwebkit uses |
---|
639 | # glx |
---|
640 | # libXcomposite |
---|
641 | # libXrender |
---|
642 | # if they can be found |
---|
643 | # Ensure that test fails even if software is installed |
---|
644 | post-patch { |
---|
645 | foreach test { glx libXcomposite libXrender } { |
---|
646 | reinplace "s|return 0;|return 0;\\\n#error turn off test|g" ${worksrcpath}/Tools/qmake/config.tests/${test}/${test}.cpp |
---|
647 | } |
---|
648 | } |
---|
649 | } |
---|
650 | |
---|
651 | # special case |
---|
652 | if { ${subport} eq "${name}-qtwebengine" } { |
---|
653 | # qtwebengine only supported on x86_64 (see https://wiki.qt.io/QtWebEngine) |
---|
654 | supported_archs x86_64 |
---|
655 | |
---|
656 | # see https://wiki.qt.io/QtWebEngine |
---|
657 | PortGroup xcodeversion 1.0 |
---|
658 | minimum_xcodeversions {12 5.1} |
---|
659 | |
---|
660 | if {[vercmp ${xcodeversion} 7.0] >= 0} { |
---|
661 | # see https://codereview.qt-project.org/#/c/122729/ |
---|
662 | patchfiles-append patch-remove_sdk.diff |
---|
663 | } |
---|
664 | |
---|
665 | # UsingTheRightCompiler (https://trac.macports.org/wiki/UsingTheRightCompiler) |
---|
666 | build.env-append CXX=${configure.cxx} |
---|
667 | configure.args-append QMAKE_LINK=${configure.cxx} |
---|
668 | } |
---|
669 | |
---|
670 | # detremint which variants are to be turned off |
---|
671 | set request_examples true |
---|
672 | set request_tests true |
---|
673 | set def_var "" |
---|
674 | |
---|
675 | set current_module [string range ${subport} [string length "${name}-"] end] |
---|
676 | # is subport a module or an SQL plugin? |
---|
677 | if { [info exists modules(${current_module})] } { |
---|
678 | # subport is a module |
---|
679 | |
---|
680 | set module_info $modules(${current_module}) |
---|
681 | |
---|
682 | if { [lsearch -exact [lindex ${module_info} 7] "~universal"] != -1 } { |
---|
683 | universal_variant no |
---|
684 | } |
---|
685 | |
---|
686 | if { [lsearch -exact [lindex ${module_info} 7] "noarch"] != -1 } { |
---|
687 | supported_archs noarch |
---|
688 | universal_variant no |
---|
689 | } |
---|
690 | |
---|
691 | if { [lsearch -exact [lindex ${module_info} 7] "~debug"] != -1 } { |
---|
692 | set qt5_qmake_request_no_debug true |
---|
693 | } |
---|
694 | |
---|
695 | if { [lsearch -exact [lindex ${module_info} 7] "~examples"] != -1 } { |
---|
696 | set request_examples false |
---|
697 | } |
---|
698 | |
---|
699 | if { [lsearch -exact [lindex ${module_info} 7] "~tests"] != -1 } { |
---|
700 | set request_tests false |
---|
701 | } |
---|
702 | |
---|
703 | if { [lsearch -exact [lindex ${module_info} 7] "++examples"] != -1 } { |
---|
704 | set request_examples true |
---|
705 | lappend def_var "+examples" |
---|
706 | } |
---|
707 | } else { |
---|
708 | # subport is an SQL plugin |
---|
709 | } |
---|
710 | |
---|
711 | if { ${request_examples} } { |
---|
712 | variant examples description {Build examples} {} |
---|
713 | } |
---|
714 | |
---|
715 | if { ${request_tests} } { |
---|
716 | variant tests description {Enable tests} {} |
---|
717 | } |
---|
718 | |
---|
719 | if { ${def_var} ne "" } { |
---|
720 | default_variants-append ${def_var} |
---|
721 | } |
---|
722 | |
---|
723 | # special case |
---|
724 | if { ${subport} eq "${name}-qtwebkit-examples" && ![variant_isset examples] } { |
---|
725 | # create a dummy file so the port can be successfully activated |
---|
726 | post-destroot { |
---|
727 | xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${subport} |
---|
728 | set docfile [open ${destroot}${prefix}/share/doc/${subport}/README.txt "w"] |
---|
729 | puts ${docfile} "Without the examples variant, no examples are installed" |
---|
730 | puts ${docfile} "${long_description}" |
---|
731 | close ${docfile} |
---|
732 | } |
---|
733 | } |
---|
734 | |
---|
735 | # special case |
---|
736 | if { ${subport} eq "${name}-qtsensors" && [variant_isset examples] } { |
---|
737 | # fix library path names or MacPorts will try to reinstall |
---|
738 | post-destroot { |
---|
739 | foreach dylib { grue/Grue/libdeclarative_grue.dylib grue/libgruesensor.1.dylib grue/sensors/libqtsensors_grue.dylib sensor_explorer/Explorer/libdeclarative_explorer.dylib } { |
---|
740 | system "/usr/bin/install_name_tool -id ${qt_examples_dir}/sensors/${dylib} ${destroot}${qt_examples_dir}/sensors/${dylib}" |
---|
741 | } |
---|
742 | foreach dylib { grue/Grue/libdeclarative_grue.dylib grue/sensors/libqtsensors_grue.dylib } { |
---|
743 | system "/usr/bin/install_name_tool -change libgruesensor.1.dylib ${qt_examples_dir}/sensors/grue/libgruesensor.1.dylib ${destroot}${qt_examples_dir}/sensors/${dylib}" |
---|
744 | } |
---|
745 | } |
---|
746 | } |
---|
747 | |
---|
748 | PortGroup qmake5 1.0 |
---|
749 | |
---|
750 | # accommodating variant request varies depending on how qtbase was built |
---|
751 | pre-configure { |
---|
752 | |
---|
753 | # determine if qmake builds examples by default (set via varians) |
---|
754 | if {[active_variants ${name}-qtbase examples ""]} { |
---|
755 | set base_examples true |
---|
756 | } else { |
---|
757 | set base_examples false |
---|
758 | } |
---|
759 | |
---|
760 | # determine if qmake runs tests by default (set via varians) |
---|
761 | if {[active_variants ${name}-qtbase tests ""]} { |
---|
762 | set base_tests true |
---|
763 | } else { |
---|
764 | set base_tests false |
---|
765 | } |
---|
766 | |
---|
767 | # determine if the user wants to build examples |
---|
768 | if { [variant_exists examples] && [variant_isset examples] } { |
---|
769 | set this_examples true |
---|
770 | } else { |
---|
771 | set this_examples false |
---|
772 | } |
---|
773 | |
---|
774 | # determine if the user wants to run tests |
---|
775 | if { [variant_exists tests] && [variant_isset tests] } { |
---|
776 | set this_tests true |
---|
777 | } else { |
---|
778 | set this_tests false |
---|
779 | } |
---|
780 | |
---|
781 | # determine of qmake's default and user requests are compatible; override qmake if necessary |
---|
782 | if { ${this_examples} && !${base_examples} } { |
---|
783 | configure.args-append "QT_BUILD_PARTS+=\"examples\"" |
---|
784 | } |
---|
785 | |
---|
786 | if { !${this_examples} && ${base_examples} } { |
---|
787 | configure.args-append "QT_BUILD_PARTS-=\"examples\"" |
---|
788 | } |
---|
789 | |
---|
790 | if { ${this_tests} && !${base_tests} } { |
---|
791 | configure.args-append "QT_BUILD_PARTS+=\"tests\"" |
---|
792 | } |
---|
793 | |
---|
794 | if { !${this_tests} && ${base_tests} } { |
---|
795 | configure.args-append "QT_BUILD_PARTS-=\"tests\"" |
---|
796 | } |
---|
797 | } |
---|
798 | } else { |
---|
799 | # these subports do NOT use qmake (they use configure script) |
---|
800 | |
---|
801 | # use the qt5 group; set 'building_qt5' so that the portgroup |
---|
802 | # does not include certain parts |
---|
803 | set building_qt5 1 |
---|
804 | PortGroup conflicts_build 1.0 |
---|
805 | PortGroup qt5 1.0 |
---|
806 | PortGroup xcodeversion 1.0 |
---|
807 | |
---|
808 | conflicts qt3 qt3-mac qt4-mac |
---|
809 | |
---|
810 | minimum_xcodeversions {11 4.3} |
---|
811 | |
---|
812 | # see https://bugreports.qt.io/browse/QTBUG-34902 |
---|
813 | conflicts_build-append qt4-mac |
---|
814 | |
---|
815 | if { ${subport} ne "${name}-docs" } { |
---|
816 | # see https://bugreports.qt.io/browse/QTBUG-47162 |
---|
817 | patchfiles-append patch-pc_file_fix.diff |
---|
818 | |
---|
819 | # see https://bugreports.qt.io/browse/QTBUG-47383 |
---|
820 | patchfiles-append patch-nullable_fix.diff |
---|
821 | |
---|
822 | # see https://bugreports.qt.io/browse/QTBUG-46833 |
---|
823 | patchfiles-append patch-xcode_version_fix.diff |
---|
824 | |
---|
825 | # see https://bugreports.qt.io/browse/QTBUG-46379 |
---|
826 | patchfiles-append patch-tooltip_fix.diff |
---|
827 | |
---|
828 | # see https://codereview.qt-project.org/#/c/115138/ |
---|
829 | patchfiles-append patch-mouse_event_fix.diff |
---|
830 | |
---|
831 | # the build system automatically use OpenGL frameworks (-framework OpenGL -framework AGL) |
---|
832 | # the build system also uses pkgconfig to look for an OpenGL installation (gl.pc) |
---|
833 | # if mesa is installed, the build system will try to use both OpenGL systems |
---|
834 | # later, this will cause problems |
---|
835 | # Undefined symbols: "_CGLGetCurrentContext" |
---|
836 | patchfiles-append patch-configure.diff |
---|
837 | } |
---|
838 | |
---|
839 | if { [variant_isset tests] } { |
---|
840 | # header file QtCore/private/qmachparser_p.h is included only if "defined(QT_BUILD_INTERNAL) && defined(Q_OF_MACH_O)" |
---|
841 | # code from header is used only "ifdef Q_OF_MACH_O" |
---|
842 | # the two must be consistent |
---|
843 | # assume the header include code is correct |
---|
844 | patchfiles-append patch-tst_qpluginloader.diff |
---|
845 | |
---|
846 | if { ${build_arch} eq "i386" || [variant_isset universal] } { |
---|
847 | # see http://stackoverflow.com/questions/14506151/invalid-symbol-redefinition-in-inline-asm-on-llvm |
---|
848 | # only runs test code on 32-bit systems |
---|
849 | patchfiles-append patch-tst_benchlibcallgrind.diff |
---|
850 | |
---|
851 | # this test might still cause problems, but with 5.4.2->5.5.0, it is no longer run |
---|
852 | # tests/auto/corelib/plugin/qpluginloader/qpluginloader.pro: |
---|
853 | # -macx-*: SUBDIRS += machtest |
---|
854 | # +macx-*: contains(QT_CONFIG, private_tests): SUBDIRS += machtest |
---|
855 | # |
---|
856 | # When testing, ensure that a universal object file is not inadvertently created. |
---|
857 | patchfiles-append patch-machtest.diff |
---|
858 | } |
---|
859 | } |
---|
860 | |
---|
861 | # --prefix is not recognized. |
---|
862 | configure.pre_args-delete --prefix=${prefix} |
---|
863 | |
---|
864 | # --disable-dependency-tracking is not recognized. |
---|
865 | configure.universal_args-delete --disable-dependency-tracking |
---|
866 | |
---|
867 | # Installation options: |
---|
868 | #-extprefix SYSROOT/PREFIX |
---|
869 | #-hostprefix EXTPREFIX |
---|
870 | #-libexecdir ARCHDATADIR/libexec |
---|
871 | #-hostbindir HOSTPREFIX/bin |
---|
872 | #-hostlibdir HOSTPREFIX/lib |
---|
873 | configure.args-append \ |
---|
874 | -prefix ${qt_dir} \ |
---|
875 | -bindir ${qt_bins_dir} \ |
---|
876 | -headerdir ${qt_includes_dir} \ |
---|
877 | -libdir ${qt_libs_dir} \ |
---|
878 | -archdatadir ${qt_archdata_dir} \ |
---|
879 | -plugindir ${qt_plugins_dir} \ |
---|
880 | -importdir ${qt_imports_dir} \ |
---|
881 | -qmldir ${qt_qml_dir} \ |
---|
882 | -datadir ${qt_data_dir} \ |
---|
883 | -docdir ${qt_docs_dir} \ |
---|
884 | -translationdir ${qt_translations_dir} \ |
---|
885 | -sysconfdir ${qt_sysconf_dir} \ |
---|
886 | -examplesdir ${qt_examples_dir} \ |
---|
887 | -testsdir ${qt_tests_dir} \ |
---|
888 | -hostdatadir ${qt_host_data_dir} |
---|
889 | |
---|
890 | # Configure options: |
---|
891 | configure.args-append \ |
---|
892 | -release \ |
---|
893 | -opensource \ |
---|
894 | -confirm-license \ |
---|
895 | -shared \ |
---|
896 | -largefile \ |
---|
897 | -accessibility |
---|
898 | |
---|
899 | foreach driver { db2 ibase mysql oci odbc psql sqlite sqlite2 tds } { |
---|
900 | configure.args-append -no-sql-${driver} |
---|
901 | } |
---|
902 | |
---|
903 | if { ![variant_isset universal] } { |
---|
904 | configure.args-append "-platform ${qt_qmake_spec}" |
---|
905 | } else { |
---|
906 | set merger_configure_args(i386) "-platform ${qt_qmake_spec_32}" |
---|
907 | set merger_configure_args(x86_64) "-platform ${qt_qmake_spec_64}" |
---|
908 | } |
---|
909 | |
---|
910 | configure.args-append \ |
---|
911 | -no-testcocoon \ |
---|
912 | -no-gcov \ |
---|
913 | -force-pkg-config |
---|
914 | |
---|
915 | # Third Party Libraries: |
---|
916 | configure.args-append \ |
---|
917 | -system-zlib \ |
---|
918 | -no-mtdev \ |
---|
919 | -no-journald \ |
---|
920 | -system-libpng \ |
---|
921 | -system-libjpeg \ |
---|
922 | -system-freetype \ |
---|
923 | -system-harfbuzz \ |
---|
924 | -openssl-linked \ |
---|
925 | -no-libproxy \ |
---|
926 | -system-pcre \ |
---|
927 | --disable-xcb \ |
---|
928 | -no-xkbcommon-x11 \ |
---|
929 | -no-xkbcommon-evdev \ |
---|
930 | -no-xinput2 \ |
---|
931 | -no-xcb-xlib \ |
---|
932 | -glib \ |
---|
933 | -no-pulseaudio \ |
---|
934 | -no-alsa \ |
---|
935 | -no-gtkstyle |
---|
936 | |
---|
937 | # Additional options: |
---|
938 | configure.args-append \ |
---|
939 | {-make libs} \ |
---|
940 | {-make tools} \ |
---|
941 | {-nomake examples} \ |
---|
942 | {-nomake tests} \ |
---|
943 | -gui \ |
---|
944 | -widgets \ |
---|
945 | -rpath \ |
---|
946 | -verbose \ |
---|
947 | -optimized-qmake \ |
---|
948 | -nis \ |
---|
949 | -cups \ |
---|
950 | -iconv \ |
---|
951 | -no-evdev \ |
---|
952 | -no-tslib \ |
---|
953 | -icu \ |
---|
954 | -fontconfig \ |
---|
955 | -strip \ |
---|
956 | -no-pch \ |
---|
957 | -dbus-linked \ |
---|
958 | -no-use-gold-linker \ |
---|
959 | -no-separate-debug-info \ |
---|
960 | -no-xcb \ |
---|
961 | -no-eglfs \ |
---|
962 | -no-directfb \ |
---|
963 | -no-linuxfb \ |
---|
964 | -no-kms \ |
---|
965 | -no-libinput \ |
---|
966 | -no-gstreamer \ |
---|
967 | -no-system-proxies |
---|
968 | |
---|
969 | # MacOS/iOS options: |
---|
970 | configure.args-append \ |
---|
971 | -framework |
---|
972 | |
---|
973 | if {${configure.sdkroot} ne ""} { |
---|
974 | configure.args-append \ |
---|
975 | -sdk [string tolower [join [lrange [split [lindex [split ${configure.sdkroot} "/"] end] "."] 0 end-1] "."]] |
---|
976 | } |
---|
977 | |
---|
978 | # configure options that don't show up in configure --help |
---|
979 | configure.args-append \ |
---|
980 | -no-libudev \ |
---|
981 | -no-egl \ |
---|
982 | -no-openvg |
---|
983 | |
---|
984 | # Qt builds part of the system using environment provided my MacPorts. |
---|
985 | # It builds the rest using its own internal environment. |
---|
986 | # For consistency, clear MacPorts environment. |
---|
987 | configure.cxx_stdlib |
---|
988 | configure.sdkroot |
---|
989 | configure.cc_archflags |
---|
990 | configure.cxx_archflags |
---|
991 | configure.objc_archflags |
---|
992 | configure.objcxx_archflags |
---|
993 | configure.ld_archflags |
---|
994 | configure.cppflags |
---|
995 | configure.cflags |
---|
996 | configure.cxxflags |
---|
997 | configure.objcflags |
---|
998 | configure.objcxxflags |
---|
999 | configure.ldflags |
---|
1000 | configure.pipe no |
---|
1001 | if { [variant_isset universal] } { |
---|
1002 | set merger_arch_flag no |
---|
1003 | } |
---|
1004 | configure.march |
---|
1005 | configure.mtune |
---|
1006 | configure.universal_ldflags |
---|
1007 | configure.universal_cflags |
---|
1008 | configure.universal_cxxflags |
---|
1009 | configure.universal_cppflags |
---|
1010 | |
---|
1011 | # cofigure script looks for perl but doesn't seem to use it for our configuration |
---|
1012 | |
---|
1013 | # configure script uses gawk if it can find it, |
---|
1014 | # so require it for consistency |
---|
1015 | depends_build-append port:gawk |
---|
1016 | |
---|
1017 | # unless overridden, configure script uses gmake if it can find it |
---|
1018 | configure.env-append MAKE=${build.cmd} |
---|
1019 | } |
---|
1020 | |
---|
1021 | # special case |
---|
1022 | if { ${subport} eq "${name}-qtbase" } { |
---|
1023 | if { [variant_isset universal] } { |
---|
1024 | |
---|
1025 | post-destroot { |
---|
1026 | # delete preprocessor comments surrounding QT_CPU_FEATURES.i386 and QT_CPU_FEATURES.x86_64 |
---|
1027 | reinplace "/^#ifndef.*$/d" ${destroot}${qt_mkspecs_dir}/qmodule.pri |
---|
1028 | reinplace "/^#else.*$/d" ${destroot}${qt_mkspecs_dir}/qmodule.pri |
---|
1029 | reinplace "/^#endif.*$/d" ${destroot}${qt_mkspecs_dir}/qmodule.pri |
---|
1030 | } |
---|
1031 | |
---|
1032 | # The file ${qt_mkspecs_dir}/qconfig.pri is still not properly merged |
---|
1033 | # The solution is ???. |
---|
1034 | } |
---|
1035 | |
---|
1036 | variant tests description {Enable tests} { |
---|
1037 | configure.args-replace {-nomake tests} {-make tests} |
---|
1038 | } |
---|
1039 | |
---|
1040 | variant examples description {Build examples} { |
---|
1041 | configure.args-replace {-nomake examples} {-make examples} |
---|
1042 | } |
---|
1043 | |
---|
1044 | variant debug description {Build both release and debug libraries} { |
---|
1045 | configure.args-replace -release -debug-and-release |
---|
1046 | } |
---|
1047 | |
---|
1048 | variant pulseaudio description {Compile PulseAudio support} { |
---|
1049 | depends_lib-append port:pulseaudio |
---|
1050 | configure.args-replace -no-pulseaudio -pulseaudio |
---|
1051 | } |
---|
1052 | |
---|
1053 | variant gstreamer description {Compile GStreamer support} { |
---|
1054 | depends_lib-append port:gstreamer1 port:gstreamer1-gst-plugins-base |
---|
1055 | configure.args-replace -no-gstreamer {-gstreamer 1.0} |
---|
1056 | } |
---|
1057 | } |
---|
1058 | |
---|
1059 | # special case |
---|
1060 | if { ${subport} eq "${name}-docs" } { |
---|
1061 | |
---|
1062 | depends_lib-append \ |
---|
1063 | path:${qt_bins_dir}/qdoc:${name}-qtbase \ |
---|
1064 | path:${qt_plugins_dir}/sqldrivers/libqsqlite.dylib:${name}-sqlite-plugin \ |
---|
1065 | path:${qt_bins_dir}/qhelpgenerator:${name}-qttools |
---|
1066 | |
---|
1067 | post-extract { |
---|
1068 | # For the most part, generated makefiles use ${prefix}/bin/qdoc. |
---|
1069 | ln -s ${qt_bins_dir}/qdoc ${worksrcpath}/qtbase/bin/ |
---|
1070 | |
---|
1071 | # Similarly, location of qhelpgenerator is expected in ${worksrcpath} |
---|
1072 | xinstall -d -m 0755 ${worksrcpath}/qttools/bin/ |
---|
1073 | ln -s ${qt_bins_dir}/qhelpgenerator ${worksrcpath}/qttools/bin/ |
---|
1074 | |
---|
1075 | # Without this file, the makefile ${worksrcpath}/qtwebkit/Source/WebCore/Makefile.WebCore.Target |
---|
1076 | # keeps generating itself over and over again. |
---|
1077 | # This file is only created when the library is being built, however. |
---|
1078 | xinstall -d -m 0755 ${worksrcpath}/qtwebkit/Source/WebCore/generated |
---|
1079 | touch ${worksrcpath}/qtwebkit/Source/WebCore/generated/InspectorBackendCommands.qrc |
---|
1080 | } |
---|
1081 | } |
---|
1082 | |
---|
1083 | |
---|
1084 | if { [variant_exists universal] && [variant_isset universal] } { |
---|
1085 | merger-post-destroot { |
---|
1086 | foreach arch ${universal_archs_to_use} { |
---|
1087 | |
---|
1088 | set dir ${destroot}-${arch} |
---|
1089 | |
---|
1090 | foreach prlfl [glob -nocomplain ${dir}${qt_libs_dir}/*.framework/*.prl] { |
---|
1091 | reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${prlfl} |
---|
1092 | } |
---|
1093 | |
---|
1094 | foreach prlfl [glob -nocomplain ${dir}${qt_libs_dir}/*.prl] { |
---|
1095 | reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${prlfl} |
---|
1096 | } |
---|
1097 | |
---|
1098 | foreach prlfl [glob -nocomplain ${dir}${qt_examples_dir}/widgets/tools/plugandpaint/plugins/*.prl] { |
---|
1099 | reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${prlfl} |
---|
1100 | } |
---|
1101 | |
---|
1102 | if { [file exists ${dir}${qt_libs_dir}/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake] } { |
---|
1103 | reinplace "s|macx-clang-32|macx-clang|g" ${dir}${qt_libs_dir}/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake |
---|
1104 | } |
---|
1105 | |
---|
1106 | if { [file exists ${dir}${qt_libs_dir}/pkgconfig/Qt5WebKit.pc] } { |
---|
1107 | # Libs.private contains the value of ${worksrcpath}-${arch}, which prevents merging |
---|
1108 | reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_libs_dir}/pkgconfig/Qt5WebKit.pc |
---|
1109 | } |
---|
1110 | |
---|
1111 | if { [file exists ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile] } { |
---|
1112 | reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile |
---|
1113 | reinplace -E "/\\w*-arch \\\\/d" ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile |
---|
1114 | reinplace -E "/\\w*${arch} \\\\/d" ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile |
---|
1115 | reinplace -E {s:-arch +[^ ]+::g} ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile |
---|
1116 | reinplace "s|macx-clang-32|macx-clang|g" ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile |
---|
1117 | } |
---|
1118 | |
---|
1119 | if { [file exists ${dir}${qt_examples_dir}/multimedia/spectrum/fftreal.framework/fftreal.prl] } { |
---|
1120 | reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/multimedia/spectrum/fftreal.framework/fftreal.prl |
---|
1121 | } |
---|
1122 | |
---|
1123 | if { [file exists ${dir}${qt_examples_dir}/multimedia/spectrum/spectrum.app/Contents/Frameworks/fftreal.framework/fftreal.prl] } { |
---|
1124 | reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/multimedia/spectrum/spectrum.app/Contents/Frameworks/fftreal.framework/fftreal.prl |
---|
1125 | } |
---|
1126 | |
---|
1127 | if { [file exists ${dir}${qt_examples_dir}/sensors/grue/libgruesensor.prl ] } { |
---|
1128 | reinplace "s|${worksrcpath}-${arch}|${worksrcpath}|g" ${dir}${qt_examples_dir}/sensors/grue/libgruesensor.prl |
---|
1129 | } |
---|
1130 | } |
---|
1131 | } |
---|
1132 | } |
---|
1133 | |
---|
1134 | # see #44934 (and #35067 for the qt4-mac version) |
---|
1135 | if { ${subport} eq "${name}-qttools" } { |
---|
1136 | set framework_list [split ${qt_frameworks_dir} '/'] |
---|
1137 | set qt_list [split ${qt_dir} '/'] |
---|
1138 | |
---|
1139 | while {[llength ${qt_list}] && [llength ${framework_list}]} { |
---|
1140 | set var_qt [lindex $qt_list 0] |
---|
1141 | set var_framework [lindex $framework_list 0] |
---|
1142 | |
---|
1143 | if { ${var_qt} ne ${var_framework} } { |
---|
1144 | break |
---|
1145 | } |
---|
1146 | |
---|
1147 | # remove first element from list |
---|
1148 | set qt_list [lreplace ${qt_list} 0 0] |
---|
1149 | set framework_list [lreplace ${framework_list} 0 0] |
---|
1150 | } |
---|
1151 | set libreplace [string repeat ../ [llength ${qt_list}]][join ${framework_list} /] |
---|
1152 | if { ${libreplace} ne "lib" } { |
---|
1153 | patchfiles-append patch-shared.diff |
---|
1154 | post-patch { |
---|
1155 | reinplace "s|__MACPORTS_FRAMWORK_DIR__|${libreplace}|g" ${worksrcpath}/src/macdeployqt/shared/shared.cpp |
---|
1156 | } |
---|
1157 | } |
---|
1158 | } |
---|
1159 | |
---|
1160 | if { ${subport} ne ${name} } { |
---|
1161 | post-destroot { |
---|
1162 | # see #44204 |
---|
1163 | foreach f [glob -nocomplain -tails -directory ${destroot}${qt_libs_dir} *.framework] { |
---|
1164 | set framework [file rootname ${f}] |
---|
1165 | |
---|
1166 | set include_list [split ${qt_includes_dir} '/'] |
---|
1167 | set framework_list [split ${qt_libs_dir} '/'] |
---|
1168 | |
---|
1169 | while {[llength ${include_list}] && [llength ${framework_list}]} { |
---|
1170 | set var_include [lindex $include_list 0] |
---|
1171 | set var_framework [lindex $framework_list 0] |
---|
1172 | |
---|
1173 | if { ${var_include} ne ${var_framework} } { |
---|
1174 | break |
---|
1175 | } |
---|
1176 | |
---|
1177 | # remove first element from list |
---|
1178 | set include_list [lreplace ${include_list} 0 0] |
---|
1179 | set framework_list [lreplace ${framework_list} 0 0] |
---|
1180 | } |
---|
1181 | |
---|
1182 | xinstall -d -m 0755 ${destroot}${qt_includes_dir} |
---|
1183 | ln -s [string repeat ../ [llength ${include_list}]][join ${framework_list} /]/${f}/Headers ${destroot}${qt_includes_dir}/${framework} |
---|
1184 | } |
---|
1185 | |
---|
1186 | # .app and non-.app programs are both put in qt_bins_dir |
---|
1187 | # put a link of any .app programs in the ${qt_apps_dir} |
---|
1188 | if { ${qt_bins_dir} ne ${qt_apps_dir} } { |
---|
1189 | xinstall -d -m 0755 ${destroot}${qt_apps_dir} |
---|
1190 | foreach app [glob -nocomplain -tails -directory ${destroot}${qt_bins_dir} *.app] { |
---|
1191 | ln -s ${qt_bins_dir}/${app} ${destroot}${qt_apps_dir} |
---|
1192 | } |
---|
1193 | } |
---|
1194 | |
---|
1195 | # put configuration files in places they will be found automatically |
---|
1196 | if { ${qt_libs_dir} ne "${prefix}/lib" } { |
---|
1197 | |
---|
1198 | # put link to pkgconfig files in place where pkgconfig will find it |
---|
1199 | # most Qt 5 pkgconfig files begin with Qt5, so link should not conflict with any other Qt installations |
---|
1200 | # exceptions: Enginio (new in Qt 5.3) |
---|
1201 | xinstall -d -m 0755 ${destroot}${prefix}/lib/pkgconfig |
---|
1202 | foreach pcfile [glob -nocomplain -tails -directory ${destroot}${qt_libs_dir}/pkgconfig *.pc] { |
---|
1203 | ln -s ${qt_libs_dir}/pkgconfig/${pcfile} ${destroot}${prefix}/lib/pkgconfig |
---|
1204 | } |
---|
1205 | |
---|
1206 | # put link to cmake files in place where cmake will find it |
---|
1207 | # most Qt 5 cmake directories begin with Qt5, so link should not conflict with any other Qt installations |
---|
1208 | # exceptions: Enginio (new in Qt 5.3) |
---|
1209 | xinstall -d -m 0755 ${destroot}${prefix}/lib/cmake |
---|
1210 | foreach cmakedir [glob -type d -nocomplain -tails -directory ${destroot}${qt_libs_dir}/cmake *] { |
---|
1211 | xinstall -d -m 0755 ${destroot}${prefix}/lib/cmake/${cmakedir} |
---|
1212 | foreach cmakefile [glob -tails -directory ${destroot}${qt_libs_dir}/cmake/${cmakedir} *.cmake] { |
---|
1213 | ln -s ${qt_libs_dir}/cmake/${cmakedir}/${cmakefile} ${destroot}${prefix}/lib/cmake/${cmakedir}/ |
---|
1214 | } |
---|
1215 | } |
---|
1216 | |
---|
1217 | # if cmake finds configuration files in ${prefix}/lib/cmake, CMAKE_CURRENT_LIST_DIR expands to ${prefix}/lib/cmake/xxx |
---|
1218 | # cmake configuration files actually installed in ${qt_cmake_module_dir}/xxx |
---|
1219 | foreach cmakedir [glob -type d -nocomplain -tails -directory ${destroot}${qt_libs_dir}/cmake *] { |
---|
1220 | foreach cmakefile [glob -nocomplain -directory ${destroot}${qt_libs_dir}/cmake/${cmakedir} *.cmake] { |
---|
1221 | reinplace "s|\\\${CMAKE_CURRENT_LIST_DIR}|${qt_cmake_module_dir}/${cmakedir}|g" ${cmakefile} |
---|
1222 | } |
---|
1223 | } |
---|
1224 | } |
---|
1225 | } |
---|
1226 | } |
---|
1227 | |
---|
1228 | livecheck.type regex |
---|
1229 | livecheck.url http://download.qt.io/archive/qt/${branch}/ |
---|
1230 | livecheck.regex (\\d+(\\.\\d+)+) |
---|