48 | | if { ${os.major} <= 7 } { |
49 | | # |
50 | | # Qt 5 does not support ppc |
51 | | # see http://doc.qt.io/qt-5/osx-requirements.html |
52 | | # |
53 | | set qt_name qt5 |
54 | | # |
55 | | } elseif { ${os.major} <= 9 } { |
56 | | # |
57 | | # Mac OS X Tiger (10.4) |
58 | | # Mac OS X Leopard (10.5) |
59 | | # |
60 | | # never supported by Qt 5 |
61 | | # |
62 | | set qt_name qt5 |
63 | | # |
64 | | } elseif { ${os.major} == 10 } { |
65 | | # |
66 | | # Mac OS X Snow Leopard (10.6) |
67 | | # |
68 | | # Qt 5.3: Deployment only |
69 | | # Qt 5.0-5.2: Occasionally tested |
70 | | # |
71 | | set qt_name qt5 |
72 | | # |
73 | | } elseif { ${os.major} == 11 } { |
74 | | # |
75 | | # Mac OS X Lion (10.7) |
76 | | # |
77 | | # Qt 5.6: Deployment only |
78 | | # Qt 5.5: Occasionally tested |
79 | | # Qt 5.4: Supported |
80 | | # |
81 | | set qt_name qt5 |
82 | | # |
83 | | } elseif { ${os.major} <= 12 } { |
84 | | # |
85 | | # OS X Mountain Lion (10.8) |
86 | | # OS X Mavericks (10.9) |
87 | | # OS X Yosemite (10.10) |
88 | | # OS X El Capitan (10.11) |
89 | | # |
90 | | # Qt 5.7: Supported |
91 | | # Qt 5.6: Supported |
92 | | # |
93 | | set qt_name qt5 |
94 | | # |
95 | | } elseif { ${os.major} <= 16 } { |
96 | | # |
97 | | # macOS Sierra (10.12) |
98 | | # as of Qt version 5.7, there is no official support |
99 | | # |
100 | | set qt_name qt5 |
101 | | # |
| 56 | if { ${os.major} <= 7 } { |
| 57 | # |
| 58 | # Qt 5 does not support ppc |
| 59 | # see http://doc.qt.io/qt-5/osx-requirements.html |
| 60 | # |
| 61 | return qt55 |
| 62 | # |
| 63 | } elseif { ${os.major} <= 9 } { |
| 64 | # |
| 65 | # Mac OS X Tiger (10.4) |
| 66 | # Mac OS X Leopard (10.5) |
| 67 | # |
| 68 | # never supported by Qt 5 |
| 69 | # |
| 70 | return qt55 |
| 71 | # |
| 72 | } elseif { ${os.major} == 10 } { |
| 73 | # |
| 74 | # Mac OS X Snow Leopard (10.6) |
| 75 | # |
| 76 | # Qt 5.3: Deployment only |
| 77 | # Qt 5.0-5.2: Occasionally tested |
| 78 | # |
| 79 | return qt55 |
| 80 | # |
| 81 | } elseif { ${os.major} == 11 } { |
| 82 | # |
| 83 | # Mac OS X Lion (10.7) |
| 84 | # |
| 85 | # Qt 5.6: Deployment only |
| 86 | # Qt 5.5: Occasionally tested |
| 87 | # Qt 5.4: Supported |
| 88 | # |
| 89 | return qt56 |
| 90 | # |
| 91 | } elseif { ${os.major} <= 15 } { |
| 92 | # |
| 93 | # OS X Mountain Lion (10.8) |
| 94 | # OS X Mavericks (10.9) |
| 95 | # OS X Yosemite (10.10) |
| 96 | # OS X El Capitan (10.11) |
| 97 | # |
| 98 | # Qt 5.7: Supported |
| 99 | # Qt 5.6: Supported |
| 100 | # |
| 101 | if {${cxx_stdlib} eq "libstdc++"} { |
| 102 | return qt56 |
| 103 | } else { |
| 104 | return qt5 |
| 105 | } |
| 106 | # |
| 107 | } elseif { ${os.major} <= 16 } { |
| 108 | # |
| 109 | # macOS Sierra (10.12) |
| 110 | # as of Qt version 5.7, there is no official support |
| 111 | # |
| 112 | if {${cxx_stdlib} eq "libstdc++"} { |
| 113 | return qt56 |
| 114 | } else { |
| 115 | return qt5 |
| 116 | } |
| 117 | # |
| 118 | } else { |
| 119 | # |
| 120 | # macOS ??? (???) |
| 121 | # |
| 122 | if {${cxx_stdlib} eq "libstdc++"} { |
| 123 | return qt56 |
| 124 | } else { |
| 125 | return qt5 |
| 126 | } |
| 127 | } |
| 284 | # a procedure for declaring dependencies on Qt5 components, which will expand them |
| 285 | # into the appropriate subports for the Qt5 flavour installed |
| 286 | # e.g. qt5.depends_component qtbase qtsvg qtdeclarative |
| 287 | proc qt5.depends_component-append {first args} { |
| 288 | global qt_name qt5.using_kde |
| 289 | |
| 290 | set args [linsert $args[set list {}] 0 ${first}] |
| 291 | foreach comp ${args} { |
| 292 | |
| 293 | if { ![tbool qt5.using_kde] } { |
| 294 | set qt_port_name ${qt_name}-${comp} |
| 295 | } else { |
| 296 | switch -exact ${comp} { |
| 297 | qtwebkit - |
| 298 | qtwebengine - |
| 299 | qtwebview { |
| 300 | # these components are subports |
| 301 | set qt_port_name ${qt_name}-${comp} |
| 302 | } |
| 303 | default { |
| 304 | # qt5*-kde provides all components except those above |
| 305 | set qt_port_name ${qt_name} |
| 306 | } |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | switch -exact ${comp} { |
| 311 | qtquickcontrols2 { |
| 312 | depends_lib-append path:lib/pkgconfig/Qt5QuickControls2.pc:${qt_port_name} |
| 313 | } |
| 314 | qtbase { |
| 315 | depends_lib-append path:lib/pkgconfig/Qt5Core.pc:${qt_port_name} |
| 316 | } |
| 317 | qtwebengine { |
| 318 | depends_lib-append path:lib/pkgconfig/Qt5WebEngine.pc:${qt_port_name} |
| 319 | } |
| 320 | qtdeclarative { |
| 321 | depends_lib-append path:lib/pkgconfig/Qt5Qml.pc:${qt_port_name} |
| 322 | } |
| 323 | qtserialport { |
| 324 | depends_lib-append path:lib/pkgconfig/Qt5SerialPort.pc:${qt_port_name} |
| 325 | } |
| 326 | qtsensors { |
| 327 | depends_lib-append path:lib/pkgconfig/Qt5Sensors.pc:${qt_port_name} |
| 328 | } |
| 329 | qtcharts { |
| 330 | depends_lib-append path:lib/pkgconfig/Qt5Charts.pc:${qt_port_name} |
| 331 | } |
| 332 | qtwebkit { |
| 333 | depends_lib-append path:lib/pkgconfig/Qt5WebKit.pc:${qt_port_name} |
| 334 | } |
| 335 | qtwebchannel { |
| 336 | depends_lib-append path:lib/pkgconfig/Qt5WebChannel.pc:${qt_port_name} |
| 337 | } |
| 338 | qtdeclarative-render2d { |
| 339 | depends_lib-append path:lib/cmake/Qt5Quick/Qt5Quick_ContextPlugin.cmake:${qt_port_name} |
| 340 | } |
| 341 | qtimageformats { |
| 342 | depends_lib-append path:lib/cmake/Qt5Gui/Qt5Gui_QTiffPlugin.cmake:${qt_port_name} |
| 343 | } |
| 344 | qtvirtualkeyboard { |
| 345 | depends_lib-append path:lib/cmake/Qt5Gui/Qt5Gui_QVirtualKeyboardPlugin.cmake:${qt_port_name} |
| 346 | } |
| 347 | qtsvg { |
| 348 | depends_lib-append path:lib/pkgconfig/Qt5Svg.pc:${qt_port_name} |
| 349 | } |
| 350 | qtmacextras { |
| 351 | depends_lib-append path:lib/pkgconfig/Qt5MacExtras.pc:${qt_port_name} |
| 352 | } |
| 353 | qtlocation { |
| 354 | depends_lib-append path:lib/pkgconfig/Qt5Location.pc:${qt_port_name} |
| 355 | } |
| 356 | qtxmlpatterns { |
| 357 | depends_lib-append path:lib/pkgconfig/Qt5XmlPatterns.pc:${qt_port_name} |
| 358 | } |
| 359 | qtserialbus { |
| 360 | depends_lib-append path:lib/pkgconfig/Qt5SerialBus.pc:${qt_port_name} |
| 361 | } |
| 362 | qtmultimedia { |
| 363 | depends_lib-append path:lib/pkgconfig/Qt5Multimedia.pc:${qt_port_name} |
| 364 | } |
| 365 | qtcanvas3d { |
| 366 | depends_lib-append path:libexec/qt5/qml/QtCanvas3D/libqtcanvas3d.dylib:${qt_port_name} |
| 367 | } |
| 368 | qtdatavis3d { |
| 369 | depends_lib-append path:lib/pkgconfig/Qt5DataVisualization.pc:${qt_port_name} |
| 370 | } |
| 371 | qtgraphicaleffects { |
| 372 | depends_lib-append path:libexec/qt5/qml/QtGraphicalEffects/libqtgraphicaleffectsplugin.dylib:${qt_port_name} |
| 373 | } |
| 374 | qtpurchasing { |
| 375 | depends_lib-append path:lib/pkgconfig/Qt5Purchasing.pc:${qt_port_name} |
| 376 | } |
| 377 | qtscript { |
| 378 | depends_lib-append path:lib/pkgconfig/Qt5Script.pc:${qt_port_name} |
| 379 | } |
| 380 | qtscxml { |
| 381 | depends_lib-append path:lib/pkgconfig/Qt5Scxml.pc:${qt_port_name} |
| 382 | } |
| 383 | qt3d { |
| 384 | depends_lib-append path:lib/pkgconfig/Qt53DCore.pc:${qt_port_name} |
| 385 | } |
| 386 | qtconnectivity { |
| 387 | depends_lib-append path:lib/pkgconfig/Qt5Bluetooth.pc:${qt_port_name} |
| 388 | } |
| 389 | qtgamepad { |
| 390 | depends_lib-append path:lib/pkgconfig/Qt5Gamepad.pc:${qt_port_name} |
| 391 | } |
| 392 | qtwebview { |
| 393 | depends_lib-append path:lib/pkgconfig/Qt5WebView.pc:${qt_port_name} |
| 394 | } |
| 395 | qttools { |
| 396 | depends_lib-append path:lib/pkgconfig/Qt5Designer.pc:${qt_port_name} |
| 397 | } |
| 398 | qtquickcontrols { |
| 399 | depends_lib-append path:libexec/qt5/qml/QtQuick/Controls/libqtquickcontrolsplugin.dylib:${qt_port_name} |
| 400 | } |
| 401 | qtwebsockets { |
| 402 | depends_lib-append path:lib/pkgconfig/Qt5WebSockets.pc:${qt_port_name} |
| 403 | } |
| 404 | qttranslations { |
| 405 | depends_lib-append path:libexec/qt5/translations/qt_ar.qm:${qt_port_name} |
| 406 | } |
| 407 | mysql-plugin { |
| 408 | depends_lib-append path:lib/cmake/Qt5Sql/Qt5Sql_QMYSQLDriverPlugin.cmake:${qt_port_name} |
| 409 | } |
| 410 | psql-plugin { |
| 411 | depends_lib-append path:lib/cmake/Qt5Sql/Qt5Sql_QPSQLDriverPlugin.cmake:${qt_port_name} |
| 412 | } |
| 413 | sqlite-plugin { |
| 414 | depends_lib-append path:lib/cmake/Qt5Sql/Qt5Sql_QSQLiteDriverPlugin.cmake:${qt_port_name} |
| 415 | } |
| 416 | qtquick1 { |
| 417 | depends_lib-append path:lib/pkgconfig/Qt5Declarative.pc:${qt_port_name} |
| 418 | } |
| 419 | qtenginio { |
| 420 | depends_lib-append path:lib/pkgconfig/Enginio.pc:${qt_port_name} |
| 421 | } |
| 422 | default { |
| 423 | return -code error "unknown component" |
| 424 | } |
| 425 | } |
| 426 | } |
| 427 | } |
| 428 | |