<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[142505] trunk/dports</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/142505">142505</a></dd>
<dt>Author</dt> <dd>mcalhoun@macports.org</dd>
<dt>Date</dt> <dd>2015-11-13 08:13:51 -0800 (Fri, 13 Nov 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>qt5 and qt5-mac
* rename qt5-mac to qt5
* restructure qt5 to be a series of (subport) modules
* upgrade 5.4.2 -&gt; 5.5.1</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdports_resourcesport10groupqmake510tcl">trunk/dports/_resources/port1.0/group/qmake5-1.0.tcl</a></li>
<li><a href="#trunkdports_resourcesport10groupqt510tcl">trunk/dports/_resources/port1.0/group/qt5-1.0.tcl</a></li>
<li><a href="#trunkdportsaquaqt5Portfile">trunk/dports/aqua/qt5/Portfile</a></li>
<li><a href="#trunkdportsaquaqt5filespatchmachtestdiff">trunk/dports/aqua/qt5/files/patch-machtest.diff</a></li>
<li><a href="#trunkdportsaquaqt5filespatchshareddiff">trunk/dports/aqua/qt5/files/patch-shared.diff</a></li>
<li><a href="#trunkdportsaquaqt5filespatchtst_benchlibcallgrinddiff">trunk/dports/aqua/qt5/files/patch-tst_benchlibcallgrind.diff</a></li>
<li><a href="#trunkdportsaquaqt5filespatchtst_qpluginloaderdiff">trunk/dports/aqua/qt5/files/patch-tst_qpluginloader.diff</a></li>
<li><a href="#trunkdportsaquaqt5macPortfile">trunk/dports/aqua/qt5-mac/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/dports/aqua/qt5/</li>
<li><a href="#trunkdportsaquaqt5filespatchadd_sdkdiff">trunk/dports/aqua/qt5/files/patch-add_sdk.diff</a></li>
<li><a href="#trunkdportsaquaqt5filespatchconfigurediff">trunk/dports/aqua/qt5/files/patch-configure.diff</a></li>
<li><a href="#trunkdportsaquaqt5filespatchfix_sdkdiff">trunk/dports/aqua/qt5/files/patch-fix_sdk.diff</a></li>
<li><a href="#trunkdportsaquaqt5filespatchicuprodiff">trunk/dports/aqua/qt5/files/patch-icu.pro.diff</a></li>
<li><a href="#trunkdportsaquaqt5filespatchmidifixdiff">trunk/dports/aqua/qt5/files/patch-midifix.diff</a></li>
<li><a href="#trunkdportsaquaqt5filespatchpcfilesdiff">trunk/dports/aqua/qt5/files/patch-pcfiles.diff</a></li>
<li><a href="#trunkdportsaquaqt5filespatchqtwebengine32diff">trunk/dports/aqua/qt5/files/patch-qtwebengine32.diff</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkdportsaquaqt5filespatchtst_qaccessibilitymac_helpersdiff">trunk/dports/aqua/qt5/files/patch-tst_qaccessibilitymac_helpers.diff</a></li>
<li><a href="#trunkdportsaquaqt5filespatchtst_qarraydatadiff">trunk/dports/aqua/qt5/files/patch-tst_qarraydata.diff</a></li>
<li>trunk/dports/aqua/qt5-mac/files/</li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdports_resourcesport10groupqmake510tcl"></a>
<div class="modfile"><h4>Modified: trunk/dports/_resources/port1.0/group/qmake5-1.0.tcl (142504 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/_resources/port1.0/group/qmake5-1.0.tcl        2015-11-13 15:24:04 UTC (rev 142504)
+++ trunk/dports/_resources/port1.0/group/qmake5-1.0.tcl        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -37,14 +37,70 @@
</span><span class="cx"> # PortGroup                     qmake5 1.0
</span><span class="cx"> 
</span><span class="cx"> PortGroup                       qt5 1.0
</span><ins>+PortGroup                       active_variants 1.1
</ins><span class="cx"> 
</span><del>-configure.cmd                   ${qt_qmake_cmd} -r
-configure.pre_args-replace      --prefix=${prefix} PREFIX=${prefix}
</del><ins>+# with the -r option, the examples do not install correctly (no source code)
+#     the install_sources target is not created in the Makefile(s)
+configure.cmd                   ${qt_qmake_cmd}
+#configure.cmd                   ${qt_qmake_cmd} -r
+
+configure.pre_args-replace      --prefix=${prefix} &quot;PREFIX=${prefix}&quot;
</ins><span class="cx"> configure.universal_args-delete --disable-dependency-tracking
</span><span class="cx"> 
</span><del>-# qmake defaults to -mmacosx-version-min=10.6, which implies stdlib is libstdc++, which caused problems
-#    (see https://trac.macports.org/wiki/FAQ#libcpp)
-configure.pre_args-append       &quot;QMAKE_MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target}&quot;
</del><ins>+# specify build configuration (compiler, 32-bit/64-bit, etc.)
+if { ![option universal_variant] || ![variant_isset universal] } {
+    configure.args-append -spec ${qt_qmake_spec}
+} else {
+    lappend merger_configure_args(i386)   -spec ${qt_qmake_spec_32}
+    lappend merger_configure_args(x86_64) -spec ${qt_qmake_spec_64}
+}
</ins><span class="cx"> 
</span><del>-# qt5-mac does not currently support debug.
-configure.pre_args-append       &quot;CONFIG+=release&quot;   
</del><ins>+# if qtbase was build as a universal,
+#    QT_ARCH and QT_TARGET_ARCH may be set incorrectly in ${qt_mkspecs_dir}/qconfig.pri,
+#    so set them manually
+if { ![option universal_variant] || ![variant_isset universal] } {
+    pre-configure {
+        if {[active_variants qt5-qtbase universal &quot;&quot;]} {
+            configure.args-append \
+                QT_ARCH=${build_arch} \
+                QT_TARGET_ARCH=${build_arch}
+        }
+    }
+} else {
+    foreach arch ${configure.universal_archs} {
+        lappend merger_configure_args(${arch}) \
+            QT_ARCH=${arch} \
+            QT_TARGET_ARCH=${arch}
+    }
+}
+
+if {![info exists qt5_qmake_request_no_debug]} {
+    variant debug description {Build both release and debug libraries} {}
+
+    # accommodating variant request varies depending on how qtbase was built
+    pre-configure {
+
+        # determine if qmake builds debug libraries by default (set via variants)
+        if {[active_variants qt5-qtbase debug &quot;&quot;]} {
+            set base_debug true
+        } else {
+            set base_debug false
+        }
+
+        # determine if the user wants to build debug libraries
+        if { [variant_exists debug] &amp;&amp; [variant_isset debug] } {
+            set this_debug true
+        } else {
+            set this_debug false
+        }
+
+        # determine of qmake's default and user requests are compatible; override qmake if necessary
+        if { ${this_debug} &amp;&amp; !${base_debug}  } {
+            configure.args-append &quot;QT_CONFIG+=\&quot;debug_and_release build_all\&quot;&quot;
+        }
+
+        if { !${this_debug} &amp;&amp; ${base_debug}  } {
+            configure.args-append &quot;QT_CONFIG-=\&quot;debug_and_release build_all\&quot; CONFIG-=\&quot;debug\&quot;&quot;
+        }
+    }
+}
</ins></span></pre></div>
<a id="trunkdports_resourcesport10groupqt510tcl"></a>
<div class="modfile"><h4>Modified: trunk/dports/_resources/port1.0/group/qt5-1.0.tcl (142504 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/_resources/port1.0/group/qt5-1.0.tcl        2015-11-13 15:24:04 UTC (rev 142504)
+++ trunk/dports/_resources/port1.0/group/qt5-1.0.tcl        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -37,35 +37,20 @@
</span><span class="cx"> 
</span><span class="cx"> # no universal binary support in Qt 5
</span><span class="cx"> #     see http://lists.qt-project.org/pipermail/interest/2012-December/005038.html
</span><del>-#     see also https://bugreports.qt-project.org/browse/QTBUG-24952
</del><ins>+#     and https://bugreports.qt.io/browse/QTBUG-24952
+supported_archs i386 x86_64
</ins><span class="cx"> if { ![exists universal_variant] || [option universal_variant] } {
</span><span class="cx">     PortGroup muniversal 1.0
</span><del>-    #universal_archs_supported i386 x86_64
</del><ins>+    universal_archs_supported i386 x86_64
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-# check for +debug variant of this port, and make sure Qt was
-# installed with +debug as well; if not, error out.
-platform darwin {
-    pre-extract {
-        if {[variant_exists debug] &amp;&amp; \
-            [variant_isset debug] &amp;&amp; \
-           ![info exists building_qt5]} {
-            if {![file exists ${qt_frameworks_dir}/QtCore.framework/QtCore_debug]} {
-                return -code error &quot;\n\nERROR:\n\
-In order to install this port as +debug,
-Qt5 must also be installed with +debug.\n&quot;
-            }
-        }
-    }
-}
-
</del><span class="cx"> # standard Qt5 name
</span><span class="cx"> global qt_name
</span><span class="cx"> set qt_name             qt5
</span><span class="cx"> 
</span><span class="cx"> # standard install directory
</span><span class="cx"> global qt_dir
</span><del>-set qt_dir               ${prefix}/libexec/qt5-mac
</del><ins>+set qt_dir               ${prefix}/libexec/qt5
</ins><span class="cx"> 
</span><span class="cx"> # standard Qt non-.app executables directory
</span><span class="cx"> global qt_bins_dir
</span><span class="lines">@@ -134,13 +119,13 @@
</span><span class="cx"> global qt_mkspecs_dir
</span><span class="cx"> set qt_mkspecs_dir      ${qt_dir}/mkspecs
</span><span class="cx"> 
</span><del>-# standard Qt .app executables directory, if created?
</del><ins>+# standard Qt .app executables directory, if created
</ins><span class="cx"> global qt_apps_dir
</span><del>-set qt_apps_dir         ${qt_bins_dir}
</del><ins>+set qt_apps_dir         ${applications_dir}/Qt5
</ins><span class="cx"> 
</span><span class="cx"> # standard CMake module directory for Qt-related files
</span><span class="cx"> #global qt_cmake_module_dir
</span><del>-#set qt_cmake_module_dir ${qt_libs_dir}/cmake
</del><ins>+set qt_cmake_module_dir ${qt_libs_dir}/cmake
</ins><span class="cx"> 
</span><span class="cx"> # standard qmake command location
</span><span class="cx"> global qt_qmake_cmd
</span><span class="lines">@@ -163,8 +148,10 @@
</span><span class="cx"> set qt_pkg_config_dir   ${qt_libs_dir}/pkgconfig
</span><span class="cx"> 
</span><span class="cx"> # standard qmake spec
</span><del>-# other platforms required? (see http://doc.qt.io/qt-5/supported-platforms.html and http://doc.qt.io/QtSupportedPlatforms/index.html)
-global qt_qmake_spec
</del><ins>+# other platforms required
+#     see http://doc.qt.io/qt-5/supported-platforms.html
+#     and http://doc.qt.io/QtSupportedPlatforms/index.html
+global qt_qmake_spe
</ins><span class="cx"> global qt_qmake_spec_32
</span><span class="cx"> global qt_qmake_spec_64
</span><span class="cx"> compiler.whitelist clang
</span><span class="lines">@@ -173,7 +160,7 @@
</span><span class="cx"> set qt_qmake_spec_64 macx-clang
</span><span class="cx"> 
</span><span class="cx"> if { ![option universal_variant] || ![variant_isset universal] } {
</span><del>-    if { ${build_arch} eq &quot;i386&quot; } {
</del><ins>+    if { ${configure.build_arch} eq &quot;i386&quot; } {
</ins><span class="cx">         set qt_qmake_spec ${qt_qmake_spec_32}
</span><span class="cx">     } else {
</span><span class="cx">         set qt_qmake_spec ${qt_qmake_spec_64}
</span><span class="lines">@@ -183,79 +170,52 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> # standard cmake info for Qt5
</span><del>-global qt_cmake_defines
-set qt_cmake_defines    \
-    &quot;-DQT_QT_INCLUDE_DIR=${qt_includes_dir} \
-     -DQT_QMAKESPEC=${qt_qmake_spec} \
-     -DQT_ZLIB_LIBRARY=${prefix}/lib/libz.dylib \
-     -DQT_PNG_LIBRARY=${prefix}/lib/libpng.dylib&quot;
</del><ins>+#global qt_cmake_defines
+#set qt_cmake_defines    \
+#    &quot;-DQT_QT_INCLUDE_DIR=${qt_includes_dir} \
+#     -DQT_QMAKESPEC=${qt_qmake_spec} \
+#     -DQT_ZLIB_LIBRARY=${prefix}/lib/libz.dylib \
+#     -DQT_PNG_LIBRARY=${prefix}/lib/libpng.dylib&quot;
</ins><span class="cx"> 
</span><del>-# set Qt understood arch types, based on user preference
-options qt_arch_types
-default qt_arch_types   {[string map {i386 x86} [get_canonical_archs]]}
-
-# allow for depending on either qt5-mac and qt5-mac-devel, simultaneously
-
</del><span class="cx"> if {![info exists building_qt5]} {
</span><del>-    if {${os.platform} eq &quot;darwin&quot;} {
-
-        # see if the framework install exists, and if so depend on it;
-        # if not, depend on the library version
-
-        if {[file exists ${qt_frameworks_dir}/QtCore/QtCore]} {
-            depends_lib-append path:Library/Frameworks/QtCore/QtCore:qt5-mac
-        } else {
-            depends_lib-append path:lib/libQtCore.5.dylib:qt5-mac
-        }
-    }
</del><ins>+    depends_lib-append port:qt5-qtbase
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> # standard configure environment, when not building qt5
</span><span class="cx"> 
</span><span class="cx"> if {![info exists building_qt5]} {
</span><del>-    configure.env-append \
-        QTDIR=${qt_dir} \
-        QMAKE=${qt_qmake_cmd} \
-        MOC=${qt_moc_cmd}
</del><ins>+#    configure.env-append \
+#        QTDIR=${qt_dir} \
+#        QMAKE=${qt_qmake_cmd} \
+#        MOC=${qt_moc_cmd}
</ins><span class="cx"> 
</span><del>-    if { ![option universal_variant] || ![variant_isset universal] } {
-        configure.env-append QMAKESPEC=${qt_qmake_spec}
-    } else {
-        set merger_configure_env(i386)   &quot;QMAKESPEC=${qt_qmake_spec_32}&quot;
-        set merger_configure_env(x86_64) &quot;QMAKESPEC=${qt_qmake_spec_64}&quot;
-    }
-
</del><span class="cx">     # make sure the Qt binaries' directory is in the path, if it is
</span><span class="cx">     # not the current prefix
</span><span class="cx"> 
</span><del>-    if {${qt_dir} ne ${prefix}} {
-        configure.env-append PATH=${qt_dir}/bin:$env(PATH)
-    }
-} else {
-    configure.env-append QMAKE_NO_DEFAULTS=&quot;&quot;
-}
</del><ins>+#    if {${qt_dir} ne ${prefix}} {
+#        configure.env-append PATH=${qt_dir}/bin:$env(PATH)
+#    }
</ins><span class="cx"> 
</span><del>-# standard build environment, when not building qt5
</del><ins>+    # standard build environment, when not building qt5
</ins><span class="cx"> 
</span><del>-if {![info exists building_qt5]} {
-    build.env-append \
-        QTDIR=${qt_dir} \
-        QMAKE=${qt_qmake_cmd} \
-        MOC=${qt_moc_cmd}
</del><ins>+    #build.env-append \
+        #QTDIR=${qt_dir} \
+        #QMAKE=${qt_qmake_cmd} \
+        #MOC=${qt_moc_cmd}
</ins><span class="cx"> 
</span><del>-    if { ![option universal_variant] || ![variant_isset universal] } {
-        build.env-append QMAKESPEC=${qt_qmake_spec}
-    } else {
-        set merger_build_env(i386)   &quot;QMAKESPEC=${qt_qmake_spec_32}&quot;
-        set merger_build_env(x86_64) &quot;QMAKESPEC=${qt_qmake_spec_64}&quot;
-    }
</del><ins>+    #if { ![option universal_variant] || ![variant_isset universal] } {
+    #    build.env-append QMAKESPEC=${qt_qmake_spec}
+    #} else {
+    #    set merger_build_env(i386)   &quot;QMAKESPEC=${qt_qmake_spec_32}&quot;
+    #    set merger_build_env(x86_64) &quot;QMAKESPEC=${qt_qmake_spec_64}&quot;
+    #}
</ins><span class="cx"> 
</span><span class="cx">     # make sure the Qt binaries' directory is in the path, if it is
</span><span class="cx">     # not the current prefix
</span><span class="cx"> 
</span><del>-    if {${qt_dir} ne ${prefix}} {
-        build.env-append    PATH=${qt_dir}/bin:$env(PATH)
-    }
</del><ins>+    #if {${qt_dir} ne ${prefix}} {
+    #    build.env-append    PATH=${qt_bins_dir}:$env(PATH)
+    #}
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> # use PKGCONFIG for Qt discovery in configure scripts
</span><span class="lines">@@ -273,23 +233,23 @@
</span><span class="cx"> 
</span><span class="cx"> # standard destroot environment, when not building qt5
</span><span class="cx"> 
</span><del>-if {![info exists building_qt5]} {
-    destroot.env-append \
-        QTDIR=${qt_dir} \
-        QMAKE=${qt_qmake_cmd} \
-        MOC=${qt_moc_cmd}
</del><ins>+#if {![info exists building_qt5]} {
+#    destroot.env-append \
+#        QTDIR=${qt_dir} \
+#        QMAKE=${qt_qmake_cmd} \
+#        MOC=${qt_moc_cmd}
</ins><span class="cx"> 
</span><del>-    if { ![option universal_variant] || ![variant_isset universal] } {
-        build.env-append QMAKESPEC=${qt_qmake_spec}
-    } else {
-        set destroot_build_env(i386)   &quot;QMAKESPEC=${qt_qmake_spec_32}&quot;
-        set destroot_build_env(x86_64) &quot;QMAKESPEC=${qt_qmake_spec_64}&quot;
-    }
</del><ins>+#    if { ![option universal_variant] || ![variant_isset universal] } {
+#        build.env-append QMAKESPEC=${qt_qmake_spec}
+#    } else {
+#        set destroot_build_env(i386)   &quot;QMAKESPEC=${qt_qmake_spec_32}&quot;
+#        set destroot_build_env(x86_64) &quot;QMAKESPEC=${qt_qmake_spec_64}&quot;
+#    }
</ins><span class="cx"> 
</span><span class="cx">     # make sure the Qt binaries' directory is in the path, if it is
</span><span class="cx">     # not the current prefix
</span><span class="cx"> 
</span><del>-    if {${qt_dir} ne ${prefix}} {
-        destroot.env-append PATH=${qt_dir}/bin:$env(PATH)
-    }
-}
</del><ins>+#    if {${qt_dir} ne ${prefix}} {
+#        destroot.env-append PATH=${qt_dir}/bin:$env(PATH)
+#    }
+#}
</ins></span></pre></div>
<a id="trunkdportsaquaqt5Portfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/aqua/qt5/Portfile (142422 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5-mac/Portfile        2015-11-11 21:41:38 UTC (rev 142422)
+++ trunk/dports/aqua/qt5/Portfile        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -3,10 +3,12 @@
</span><span class="cx"> 
</span><span class="cx"> PortSystem          1.0
</span><span class="cx"> 
</span><del>-name                qt5-mac
-version             5.4.2
-revision            1
</del><ins>+name                qt5
+version             5.5.1
+
+# get Qt's version numbers
</ins><span class="cx"> set branch          [join [lrange [split ${version} .] 0 1] .]
</span><ins>+set qt_major        [lindex [split ${version} .] 0]
</ins><span class="cx"> 
</span><span class="cx"> categories          aqua
</span><span class="cx"> platforms           macosx
</span><span class="lines">@@ -14,20 +16,26 @@
</span><span class="cx"> license             {LGPL-2.1 GPL-3}
</span><span class="cx"> 
</span><span class="cx"> homepage            http://qt.io
</span><del>-description         Qt Tool Kit ${branch}
-long_description    Qt Tool Kit: A cross-platform framework \
-    (headers, data, and libraries) for writing \
-    cross-platform GUI-based applications.
</del><span class="cx"> 
</span><del>-distname            qt-everywhere-opensource-src-${version}
</del><ins>+# generate documentation from complete code base
+# generate modules from separate downloads
+if { ${subport} ne &quot;${name}-docs&quot; } {
+    master_sites        http://download.qt.io/official_releases/qt/${branch}/${version}/submodules
+} else {
+    master_sites        http://download.qt.io/official_releases/qt/${branch}/${version}/single/
+}
</ins><span class="cx"> 
</span><del>-master_sites        http://download.qt.io/official_releases/qt/${branch}/${version}/single/
</del><ins>+if { ${subport} ne ${name} } {
+    # file sizes are significantly smaller using xz
+    use_xz yes
+}
</ins><span class="cx"> 
</span><del>-checksums           rmd160  3382c482a99e114560f56a9fe9501b8cabf334a9 \
-                    sha256  cfc768c55f0a0cd232bed914a9022528f8f2e50cb010bf0e4f3f62db3dfa17bd
-
-if { ${os.major} &lt; 11 } {
</del><ins>+if { ${os.platform} ne &quot;darwin&quot; } {
</ins><span class="cx">     pre-fetch {
</span><ins>+        ui_warn &quot;${subport} is untested on \&quot;${os.platform}\&quot;.&quot;
+    }
+} elseif { ${os.major} &lt; 11 } {
+    pre-fetch {
</ins><span class="cx">         ui_error &quot;OS X prior to 10.8 (Mountain Lion) is not a Reference Configuration for Qt.&quot;
</span><span class="cx">         ui_error &quot;OS X prior to 10.7 (Lion) is not even tested.&quot;
</span><span class="cx">         ui_error &quot;See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations&quot;
</span><span class="lines">@@ -46,7 +54,7 @@
</span><span class="cx">             ui_warn &quot;See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations&quot;
</span><span class="cx">         }
</span><span class="cx">     } else {
</span><del>-        if { ${build_arch} eq &quot;i386&quot; } {
</del><ins>+        if { ${configure.build_arch} eq &quot;i386&quot; } {
</ins><span class="cx">             pre-fetch {
</span><span class="cx">                 ui_warn &quot;32-bit mode is not a Reference Configuration for Qt.&quot;
</span><span class="cx">                 ui_warn &quot;See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations&quot;
</span><span class="lines">@@ -55,44 +63,759 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-if { ${subport} eq &quot;${name}-docs&quot;  } {
</del><ins>+############################################################################### Modules Not Considered
+#
+# No qt5             (Doesn't Install Anything)
+# No qtactiveqt      (Windows Only)
+# No qtandroidextras (Android Only)
+# No qtdoc           (Doesn't Install Anything)
+# No qtwayland       (Linux Only)
+# No qtx11extras     (X11 Only)
+# No qtwinextras     (Windows Only)
+#
+###############################################################################
+
+############################################################################### Finding Dependencies
+#
+# grep -r &quot;%dependencies&quot; *
+# find ./ -name sync.profile
+#
+# grep -r qtCompileTest *
+#
+# find ./ -name config.tests
+#
+# find ./ -name Find\*.cmake
+#
+###############################################################################
+
+############################################################################### Notes
+#
+# qtconnectivity checks for bluetooth libraries
+#    bluez and bluez_le (Linux Only)
+#    btapi10_2_1 libbb2 (Blackberry Only)
+#
+# qtconnectivity depends on
+#    qtandroidextras    (Android Only)
+#
+# qttools depends on
+#    qtactiveqt (Windows Only)
+#
+# qtwebkit has tests for libraries in:
+#     Tools/qmake/mkspecs/features/configure.prf
+#     Tools/qmake/config.tests/
+#
+###############################################################################
+
+############################################################################### TODO
+#
+# TODO: possible to trim dependencies of qtbase?
+# TODO: force qttools to not depend on (deprecated) qtwebkit?
+# TODO: do not use rpath?
+# TODO: support older versions of OS X via different versions of Qt 5
+#
+###############################################################################
+
+############################################################################### Module Format
+#
+# &quot;Qt Module Name&quot; {
+#     checksum, rmd160
+#     checksum, sha256
+#     dependencies, build
+#     dependencies, lib
+#     dependencies, Qt module name
+#     Qt components provided
+#     included in &quot;standard&quot; installation of Qt (empty string is no, explanation string is yes)
+#     variant overrides
+# }
+#
+# module info found at https://doc.qt.io/qt-5/qtmodules.html
+#
+###############################################################################
+array set modules {
+    qt3d {
+        181929ce80c7e88e4230239c260242749771f8ad
+        e380906e2bcbd825dab45043bf063dd88b793c0d5fb050ee915bf4e2b58b1bf7
+        &quot;&quot;
+        &quot;port:assimp&quot;
+        &quot;qtbase qtxmlpatterns qtdeclarative qtimageformats&quot;
+        {&quot;Qt3D Core&quot; &quot;Qt3D Renderer&quot; &quot;Qt3D Quick&quot; &quot;Qt3D Quick Renderer&quot; &quot;Qt3D Input&quot;}
+        &quot;technology preview module&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtbase {
+        ce4bccd0703aaf8d904fbecd1f334ef13d698a44
+        dfa4e8a4d7e4c6b69285e7e8833eeecd819987e1bdbe5baa6b6facd4420de916
+        &quot;&quot;
+        &quot;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&quot;
+        &quot;&quot;
+        {&quot;Qt Gui&quot; &quot;Qt Widgets&quot; &quot;Qt Print Support&quot; &quot;Qt OpenGL&quot; &quot;Qt Core&quot; &quot;Qt XML&quot; &quot;Qt SQL&quot; &quot;Qt Network&quot; &quot;Qt Test&quot; &quot;Qt D-Bus&quot; &quot;Qt Concurrent&quot; &quot;Qt Platform Headers&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtcanvas3d {
+        ed68d3c61b0c67818626595a7bba14a627f5120b
+        759b171030d7110751943643885c1484c7900fed7737424d202e36bdeba0b080
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtdeclarative&quot;
+        {&quot;Qt Canvas 3D&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtconnectivity {
+        ff138deaf87850b047c1e472188a2455b2e0ff54
+        3637e6def8582fc0fb3684179b93650720ba2da1311a560d358296153f245023
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtdeclarative qtxmlpatterns&quot;
+        {&quot;Qt Bluetooth&quot; &quot;Qt NFC&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtdeclarative {
+        1d8939c42f4b510443365479ffe8bc525e0faac6
+        5fd14eefb83fff36fb17681693a70868f6aaf6138603d799c16466a094b26791
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtxmlpatterns&quot;
+        {&quot;Qt QML&quot; &quot;Qt Quick&quot; &quot;Qt Quick Widgets&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtenginio {
+        5b23212c3da401b9c74f33a6486ba18166f129f6
+        a79936bd5b6a35aba28dd282291b28c8fa869b8d86652c62efe5e268d94defe2
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtdeclarative qtxmlpatterns&quot;
+        {&quot;Enginio&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtgraphicaleffects {
+        43f6a91f75863f8333fc6b70456f1b0d175b55e4
+        9bca0f8db3a4289eceebfa9504915440fe3fa6301d90b65705e4ece528c12d47
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtdeclarative qtxmlpatterns&quot;
+        {&quot;Qt Graphical Effects&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtimageformats {
+        75000000ddfbb83b960b73c07d2083b85dcd81fa
+        c97fee00c602f9f089fea480546d6e9d61a2b2297c2f163bfd9f8aba92b754a5
+        &quot;&quot;
+        &quot;port:jasper port:libmng port:tiff port:webp&quot;
+        &quot;qtbase&quot;
+        {&quot;Qt Image Formats&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtlocation {
+        3792eedc159db6bf15eef706ee218f3cc5759a51
+        1fe948cb87649f4450be921cf3cdefc311595a80ef6a7a7b7484901baa0d6316
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtxmlpatterns qtdeclarative qtquickcontrols&quot;
+        {&quot;Qt Location&quot; &quot;Qt Positioning&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtmacextras {
+        e31be686e79c1cf4a70357921f0caad4cd496c79
+        025350fdcc936118539ee3703115549b4547def329d3d959b9db5bd853ec9058
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase&quot;
+        {&quot;Qt Mac Extras&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtmultimedia {
+        68049da5e203e484de766c17d683a34a888e0603
+        7cc7ca99f41587c188303670499e5c75101f9a8cb6178e8f29cc941e637d957f
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtxmlpatterns qtdeclarative&quot;
+        {&quot;Qt Multimedia&quot; &quot;Qt Multimedia Widgets&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtquick1 {
+        dd1c71468426a5b9fe4f5297a6f2b04c9caddc78
+        c812a7e59a8b9f0a87693181059933e15fef04bc875b6486cd653be1b9b51f2c
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtscript qtxmlpatterns qtdeclarative qttools qtwebkit&quot;
+        {&quot;Qt Declarative&quot;}
+        &quot;deprecated&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtquickcontrols {
+        3975fbb34a74d55f88f47b436b6fca6ce3f7c078
+        1b7a8389d656066c629bd2cb520b39a7eb041d184b567dd1b9639b88d841fcf0
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtdeclarative qtxmlpatterns&quot;
+        {&quot;Qt Quick Controls&quot; &quot;Qt Quick Dialogs&quot; &quot;Qt Quick Layouts&quot; &quot;Qt Quick Extras&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtscript {
+        7d8ff8c4462b21b83212dd780030a01bd00b8ca9
+        cd46dddd998f22bcb06447e0407fef81f7052f25bc770b1c27625654cee828fd
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase&quot;
+        {&quot;Qt Script&quot; &quot;Qt Script Tools&quot;}
+        &quot;deprecated in favor QJS* in Qt QML&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtsensors {
+        9a3eaad761efaefc0a56258c0bd64e01d0889cba
+        5d264fc0729a5d7679bd4eb8d7a0a9b142ed38d09fa68fc7dfe57f64afc8eeea
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtxmlpatterns qtdeclarative&quot;
+        {&quot;Qt Sensors&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtserialport {
+        00c53b307fd6ad509aedc6ed0b3a464ac3d8e809
+        a034dbfb023db1b9b9de54390f7e76a48c1d1eb12533b0ffd574505c99968f7a
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase&quot;
+        {&quot;Qt Serial Port&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtsvg {
+        db1dd37355a1e4b40a37decc1df60d574ab14088
+        f7f588be48befd9ccab5a6086832551b8899e8bed9e603ddea979581e05a91c7
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase&quot;
+        {&quot;Qt SVG&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qttools {
+        279aacc94f7fa583a59d3fe005ecb3e598e92b32
+        4361f6ce49717058160908297841a18b94645cec593d1b48fb126c9d06c87bfd
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtxmlpatterns qtdeclarative qtwebkit&quot;
+        {&quot;Qt Help&quot; &quot;Qt UI Tools&quot; &quot;Qt Designer&quot; }
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qttranslations {
+        f9c956935768cea5c935a10493963f7e411dc255
+        41f800710f0bc6ca263f1e54f1fa22be7043962999304e73ce9887ebefc7a4c6
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qttools&quot;
+        {&quot;translation files&quot;}
+        &quot;&quot;
+        &quot;variant overrides: ~examples ~tests ~debug noarch&quot;
+    }
+    qtwebchannel {
+        fca861f785f9d718aa17853bf7a3c072efcd53b7
+        7f4295ee57cd4ecba3cb263452d2a08d501b45c9a2b8b7794b6a97d7652f15d0
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtwebsockets qtdeclarative&quot;
+        {&quot;Qt WebChannel&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtwebengine {
+        0c24bb89cc72a18c06e2fd613db1eb879ada2a2a
+        7c4d328dd305991aaf0c3450615f4a8e5d80152194bee6f5925bd8d3477e2b90
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtdeclarative qtxmlpatterns qtquickcontrols qtwebchannel&quot;
+        {&quot;Qt WebEngine&quot; &quot;Qt WebEngine Widgets&quot;}
+        &quot;very large and relatively new; requires newer version of XCode&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtxmlpatterns {
+        403a3b2377728629b6a3f1073b24af3f3360adf7
+        b537eb0252988e3805a32a16c65038973371d647baf246fdf703bde725d0e8ec
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase&quot;
+        {&quot;Qt XML Patterns&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtwebsockets {
+        83dcc5d07dca6c1cccfaed13cd16fde940ad0b94
+        cf4e834a867b90337188be504ef20184c52666370f721e704952988f8cb12deb
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtdeclarative&quot;
+        {&quot;Qt WebSockets&quot;}
+        &quot;&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtwebkit {
+        0594ec1150f7899d72f57d8ff2f108f3f75faaf9
+        77583f9dbd3e6ad874386df71b165dc3ce88efdabbc6e5d97a959ee2187d6d69
+        &quot;&quot;
+        &quot;port:fontconfig port:icu port:leveldb port:webp port:libxml2 port:libxslt port:zlib port:sqlite3&quot;
+        &quot;qtbase qtxmlpatterns qtdeclarative qtlocation qtmultimedia qtsensors qtwebchannel&quot;
+        {&quot;Qt WebKit&quot; &quot;Qt WebKit Widgets&quot;}
+        &quot;deprecated in favor of Qt WebEngine&quot;
+        &quot;variant overrides: &quot;
+    }
+    qtwebkit-examples {
+        6d2a3aee163e419fbc6ec56a941c4354e8e93b7d
+        098935b42d6d249027d1a635e4e70edc3d2969dd860f825b36aec06fc72e46c6
+        &quot;&quot;
+        &quot;&quot;
+        &quot;qtbase qtwebkit qtscript qtsvg qtxmlpatterns qtdeclarative qttools&quot;
+        {&quot;examples for Qt WebKit&quot;}
+        &quot;deprecated in favor of Qt WebEngine; doen't provide functionality&quot;
+        &quot;variant overrides: ++examples&quot;
+    }
+}
+
+############################################################################### SQL Plugin Format
+#
+# {
+#     variant name
+#     dependency, library
+#     include path
+#     link requirement
+#     obsolete? (empty string is no)
+# }
+#
+###############################################################################
+array set sql_plugins {
+    {sqlite SQLite} {
+        {
+            &quot;sqlite3&quot;
+            &quot;port:sqlite3&quot;
+            &quot;${prefix}/include&quot;
+            &quot;-L${prefix}/lib -lsqlite3&quot;
+            &quot;&quot;
+        }
+    }
+    {psql PostgreSQL} {
+        {
+            &quot;postgresql94&quot;
+            &quot;port:postgresql94&quot;
+            &quot;${prefix}/include/postgresql94&quot;
+            &quot;-L${prefix}/lib/postgresql94 -lpq&quot;
+            &quot;&quot;
+        }
+        {
+            &quot;postgresql84&quot;
+            &quot;port:postgresql84&quot;
+            &quot;${prefix}/include/postgresql84&quot;
+            &quot;-L${prefix}/lib/postgresql84 -lpq&quot;
+            &quot;&quot;
+        }
+    }
+    {mysql MySQL} {
+        {
+            &quot;mysql56&quot;
+            &quot;port:mysql56&quot;
+            &quot;${prefix}/include/mysql56/mysql&quot;
+            &quot;-L${prefix}/lib/mysql56/mysql -lmysqlclient_r&quot;
+            &quot;&quot;
+        }
+    }
+}
+
+foreach {module module_info} [array get modules] {
+
+    subport ${name}-${module} {
+        distname        ${module}-opensource-src-${version}
+
+        # see https://bugreports.qt.io/browse/QTBUG-35514
+        build.target
+
+        checksums                              \
+            rmd160  [lindex ${module_info} 0]  \
+            sha256  [lindex ${module_info} 1]
+
+        foreach deps [lindex ${module_info} 2] {
+            depends_build-append [subst ${deps}]
+        }
+
+        foreach deps [lindex ${module_info} 3] {
+            depends_lib-append [subst ${deps}]
+        }
+
+        foreach qtdeps [lindex ${module_info} 4] {
+            depends_lib-append port:${name}-${qtdeps}
+        }
+
+        description       Tools and Module(s) for Qt Tool Kit ${qt_major}
+
+        set modules_provided_list [lindex ${module_info} 5]
+        if { [llength ${modules_provided_list}] == 1 } {
+            set modules_provided_join [lindex ${modules_provided_list} 0]
+        } elseif { [llength ${modules_provided_list}] == 2 } {
+            set modules_provided_join [join ${modules_provided_list} &quot; and &quot;]
+        } else {
+            set modules_provided_join [join [list [join [lrange ${modules_provided_list} 0 end-1] &quot;, &quot;] [lindex ${modules_provided_list} end]] &quot;, and &quot;]
+        }
+
+        long_description  &quot;Tools and Module(s) for Qt Tool Kit ${qt_major}: ${modules_provided_join}&quot;
+    }
+}
+
+subport ${name}-docs {
+    distname            qt-everywhere-opensource-src-${version}
+
+    checksums                                             \
+        rmd160  42bf7768dafb868f2cdef857fd3e444520f2a706  \
+        sha256  6f028e63d4992be2b4a5526f2ef3bfa2fe28c5c757554b11d9e8d86189652518
+
+    description         Documentation for Qt Tool Kit ${qt_major}
+    long_description    Documentation for Qt Tool Kit ${qt_major}
+
+    supported_archs   noarch
</ins><span class="cx">     universal_variant no
</span><ins>+
+    build.target      docs
+    destroot.target   install_docs
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-if { ${subport} eq ${name} || ${subport} eq &quot;${name}-docs&quot; } {
</del><ins>+# see http://doc.qt.io/qt-5/sql-driver.html for info on building SQL Database Drivers
+foreach {sql_names sql_info} [array get sql_plugins] {
+    set driver [lindex ${sql_names} 0]
+    set dbms   [lindex ${sql_names} 1]
+
+    subport ${name}-${driver}-plugin {
+        distname        qtbase-opensource-src-${version}
+
+        checksums                               \
+            rmd160  [lindex $modules(qtbase) 0] \
+            sha256  [lindex $modules(qtbase) 1]
+
+        description       ${dbms} Database Driver for Qt Tool Kit ${qt_major}
+        long_description  ${dbms} Database Driver for Qt Tool Kit ${qt_major}
+
+        # if there is more than one version of the database system, create variants for each version
+        if { [llength ${sql_info}] &gt; 1 } {
+
+            set any_variant_set false
+
+            foreach variant_info ${sql_info} {
+
+                set varName [lindex ${variant_info} 0]
+
+                # find every other variant so it can be marked as conflicting
+                set conflicts_list &quot;&quot;
+                foreach variant_info2 ${sql_info} {
+                    set varName2 [lindex ${variant_info2} 0]
+
+                    if { ${varName} ne ${varName2} } {
+                        lappend conflicts_list ${varName2}
+                    }
+                }
+
+                # get only the numbers from the name
+                regexp {[0-9].} ${varName} varVer
+
+                variant ${varName} conflicts ${conflicts_list} description &quot;use version ${varVer} of ${dbms}&quot; {}
+
+                # check if any variant has been set
+                if { [variant_isset ${varName}] } {
+                    set any_variant_set true
+                }
+            }
+
+            # ensure at least one variant is set
+            if { !${any_variant_set} } {
+                default_variants-append +[lindex [lindex ${sql_info} 0] 0]
+            }
+        }
+
+        foreach variant_info ${sql_info} {
+            set varName [lindex ${variant_info} 0]
+
+            if { ( [variant_exists ${varName}] &amp;&amp; [variant_isset ${varName}] ) || [llength ${sql_info}]==1 } {
+                depends_lib-append [lindex ${variant_info} 1]
+
+                configure.args-append                                    \
+                    [subst INCLUDEPATH+=\&quot;[lindex ${variant_info} 2]\&quot;]  \
+                    [subst LIBS+=\&quot;[lindex ${variant_info} 3]\&quot;]
+            }
+        }
+
+        # for single architecture, easier to use
+        #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/${driver},
+        #    but doesn't work for universal build
+        configure.dir ${worksrcpath}/src/plugins/sqldrivers/${driver}
+        build.dir     ${configure.dir}
+        destroot.dir  ${configure.dir}
+    }
+}
+
+if { ${subport} eq ${name} } {
+    # the main port is Meta-port to install various modules
+
+    description         Qt Tool Kit ${qt_major}
+    long_description    Qt Tool Kit: A cross-platform framework \
+        (headers, data, and libraries) for writing \
+        cross-platform GUI-based applications.
+
+    fetch {}
+    checksum {}
+    configure {}
+    build {}
+
+    # create a dummy file so the port can be successfully activated
+    destroot {
+        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${subport}
+        set docfile   [open ${destroot}${prefix}/share/doc/${subport}/README.txt &quot;w&quot;]
+        puts ${docfile} &quot;Meta-port for ${name}&quot;
+        puts ${docfile} &quot;${long_description}&quot;
+        close ${docfile}
+    }
+
+    foreach {module module_info} [array get modules] {
+        if { [lindex ${module_info} 6] eq &quot;&quot; } {
+            depends_lib-append port:${name}-${module}
+        }
+    }
+    depends_lib-append port:${name}-sqlite-plugin
+
+    supported_archs   noarch
+    universal_variant no
+
+} elseif { ${subport} ne &quot;${name}-qtbase&quot; &amp;&amp; ${subport} ne &quot;${name}-docs&quot; } {
+    # these subports use qmake
+
+    # special case
+    if { ${subport} eq &quot;${name}-qtlocation&quot; } {
+        # qtlocation uses
+        #    GeoClue (http://freedesktop.org/wiki/Software/GeoClue/) and
+        #    Gypsy (http://gypsy.freedesktop.org)
+        #    if they can be found
+        # Ensure that test fails even if software is installed
+        post-patch {
+            foreach test { geoclue geoclue-satellite gypsy } {
+                reinplace &quot;s|return 0;|return 0;\\\n#error turn off test|g&quot; ${worksrcpath}/config.tests/${test}/main.cpp
+            }
+        }
+    }
+
+    # special case
+    if { ${subport} eq &quot;${name}-qtwebkit&quot; } {
+        # qmake uses pkgconfig to look for icu
+        # This feature does not work without &quot;CONFIG += link_pkgconfig&quot;
+        patchfiles-append patch-icu.pro.diff
+
+        # qtwebkit uses
+        #    glx
+        #    libXcomposite
+        #    libXrender
+        #    if they can be found
+        # Ensure that test fails even if software is installed
+        post-patch {
+            foreach test { glx libXcomposite libXrender } {
+                reinplace &quot;s|return 0;|return 0;\\\n#error turn off test|g&quot; ${worksrcpath}/Tools/qmake/config.tests/${test}/${test}.cpp
+            }
+        }
+    }
+
+    # special case
+    if { ${subport} eq &quot;${name}-qtwebengine&quot; } {
+        # see https://wiki.qt.io/QtWebEngine
+        PortGroup           xcodeversion 1.0
+        minimum_xcodeversions   {12 5.1}
+
+        # see https://codereview.qt-project.org/#/c/125968/
+        patchfiles-append patch-qtwebengine32.diff
+
+        # at some point prior to OS X 10.11, MIDI types were unified
+        patchfiles-append patch-midifix.diff
+
+        # see https://codereview.qt-project.org/#/c/127759/
+        patchfiles-append patch-fix_sdk.diff
+
+        # UsingTheRightCompiler (https://trac.macports.org/wiki/UsingTheRightCompiler)
+        build.env-append      CXX=${configure.cxx}
+        configure.args-append QMAKE_LINK=${configure.cxx}
+    }
+
+    # detremint which variants are to be turned off
+    set request_examples true
+    set request_tests    true
+    set def_var          &quot;&quot;
+
+    set current_module [string range ${subport} [string length &quot;${name}-&quot;] end]
+    # is subport a module or an SQL plugin?
+    if { [info exists modules(${current_module})] } {
+        # subport is a module
+
+        set module_info    $modules(${current_module})
+
+        if { [lsearch -exact [lindex ${module_info} 7] &quot;~universal&quot;] != -1 } {
+            universal_variant no
+        }
+
+        if { [lsearch -exact [lindex ${module_info} 7] &quot;noarch&quot;] != -1 } {
+            supported_archs   noarch
+            universal_variant no
+        }
+
+        if { [lsearch -exact [lindex ${module_info} 7] &quot;~debug&quot;] != -1 } {
+            set qt5_qmake_request_no_debug true
+        }
+
+        if { [lsearch -exact [lindex ${module_info} 7] &quot;~examples&quot;] != -1 } {
+            set request_examples false
+        }
+
+        if { [lsearch -exact [lindex ${module_info} 7] &quot;~tests&quot;] != -1 } {
+            set request_tests    false
+        }
+
+        if { [lsearch -exact [lindex ${module_info} 7] &quot;++examples&quot;] != -1 } {
+            set request_examples true
+            lappend def_var &quot;+examples&quot;
+        }
+    } else {
+        # subport is an SQL plugin
+    }
+
+    if { ${request_examples} } {
+        variant examples description {Build examples} {}
+    }
+
+    if { ${request_tests} } {
+        variant tests description {Enable tests} {}
+    }
+
+    if { ${def_var} ne &quot;&quot; } {
+        default_variants-append ${def_var}
+    }
+
+    # special case
+    if { ${subport} eq &quot;${name}-qtwebkit-examples&quot; &amp;&amp; ![variant_isset examples] } {
+        # create a dummy file so the port can be successfully activated
+        post-destroot {
+            xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${subport}
+            set docfile [open ${destroot}${prefix}/share/doc/${subport}/README.txt &quot;w&quot;]
+            puts ${docfile} &quot;Without the examples variant, no examples are installed&quot;
+            puts ${docfile} &quot;${long_description}&quot;
+            close ${docfile}
+        }
+    }
+
+    # special case
+    if { ${subport} eq &quot;${name}-qtsensors&quot; &amp;&amp; [variant_isset examples] } {
+        if { [variant_isset debug] } {
+            set debug &quot;_debug&quot;
+        } else {
+            set debug &quot;&quot;
+        }
+        # fix library path names or MacPorts will try to reinstall
+        post-destroot {
+            foreach dylib &quot;grue/Grue/libdeclarative_grue${debug}.dylib grue/libgruesensor.1.dylib grue/sensors/libqtsensors_grue${debug}.dylib sensor_explorer/Explorer/libdeclarative_explorer${debug}.dylib&quot; {
+                system &quot;/usr/bin/install_name_tool -id ${qt_examples_dir}/sensors/${dylib} ${destroot}${qt_examples_dir}/sensors/${dylib}&quot;
+            }
+            foreach dylib &quot;grue/Grue/libdeclarative_grue${debug}.dylib grue/sensors/libqtsensors_grue${debug}.dylib&quot; {
+                system &quot;/usr/bin/install_name_tool -change libgruesensor.1.dylib ${qt_examples_dir}/sensors/grue/libgruesensor.1.dylib ${destroot}${qt_examples_dir}/sensors/${dylib}&quot;
+            }
+        }
+    }
+
+    PortGroup           qmake5 1.0
+
+    # accommodating variant request varies depending on how qtbase was built
+    pre-configure {
+
+        # determine if qmake builds examples by default (set via variants)
+        if {[active_variants ${name}-qtbase examples &quot;&quot;]} {
+            set base_examples true
+        } else {
+            set base_examples false
+        }
+
+        # determine if qmake runs tests by default (set via varians)
+        if {[active_variants ${name}-qtbase tests &quot;&quot;]} {
+            set base_tests true
+        } else {
+            set base_tests false
+        }
+
+        # determine if the user wants to build examples
+        if { [variant_exists examples] &amp;&amp; [variant_isset examples] } {
+            set this_examples true
+        } else {
+            set this_examples false
+        }
+
+        # determine if the user wants to run tests
+        if { [variant_exists tests] &amp;&amp; [variant_isset tests] } {
+            set this_tests true
+        } else {
+            set this_tests false
+        }
+
+        # determine of qmake's default and user requests are compatible; override qmake if necessary
+        if { ${this_examples} &amp;&amp; !${base_examples}  } {
+            configure.args-append &quot;QT_BUILD_PARTS+=\&quot;examples\&quot;&quot;
+        }
+
+        if { !${this_examples} &amp;&amp; ${base_examples}  } {
+            configure.args-append &quot;QT_BUILD_PARTS-=\&quot;examples\&quot;&quot;
+        }
+
+        if { ${this_tests} &amp;&amp; !${base_tests}  } {
+            configure.args-append &quot;QT_BUILD_PARTS+=\&quot;tests\&quot;&quot;
+        }
+
+        if { !${this_tests} &amp;&amp; ${base_tests}  } {
+            configure.args-append &quot;QT_BUILD_PARTS-=\&quot;tests\&quot;&quot;
+        }
+    }
+} else {
+    # these subports do NOT use qmake (they use configure script)
+
</ins><span class="cx">     # use the qt5 group; set 'building_qt5' so that the portgroup
</span><span class="cx">     # does not include certain parts
</span><span class="cx">     set building_qt5    1
</span><span class="cx">     PortGroup           conflicts_build 1.0
</span><span class="cx">     PortGroup           qt5 1.0
</span><span class="cx">     PortGroup           xcodeversion 1.0
</span><ins>+    PortGroup           cxx11 1.0
</ins><span class="cx"> 
</span><span class="cx">     conflicts           qt3 qt3-mac qt4-mac
</span><span class="cx"> 
</span><del>-    minimum_xcodeversions   {11 4.1}
</del><ins>+    minimum_xcodeversions   {11 4.3}
</ins><span class="cx"> 
</span><del>-    # See https://bugreports.qt.io/browse/QTBUG-34902
</del><ins>+    # see https://bugreports.qt.io/browse/QTBUG-34902
</ins><span class="cx">     conflicts_build-append  qt4-mac
</span><span class="cx"> 
</span><del>-    # Kuba states in https://trac.macports.org/ticket/44207#comment:7 
-    #  &quot;There's no reason to have parallel building disabled. Really.&quot;
-    #use_parallel_build no
</del><ins>+    # special case
+    if { ${subport} ne &quot;${name}-docs&quot; } {
+        # qmake automatically makes certain commands (QMAKE_CC, etc.) absolute paths
+        # add one more for consistency (QMAKE_LINK_C)
+        patchfiles-append patch-add_sdk.diff
</ins><span class="cx"> 
</span><del>-    # qtwebengine/src/core/gyp_run.pro buils an executable using g++
-    # This causes an error if UsingTheRightCompiler (https://trac.macports.org/wiki/UsingTheRightCompiler)
-    # Quick fix is to use full path to g++ (should use ${configure.cxx} instead?)
-    # N.B. that the python executable is found from the configuration environment
-    #patchfiles-append patch-ninja-compiler.diff
</del><ins>+        # the build system automatically use OpenGL frameworks (-framework OpenGL -framework AGL)
+        # the build system also uses pkgconfig to look for an OpenGL installation (gl.pc)
+        # if mesa is installed, the build system will try to use both OpenGL systems
+        # later, this will cause problems
+        #    Undefined symbols: &quot;_CGLGetCurrentContext&quot;
+        patchfiles-append patch-configure.diff
</ins><span class="cx"> 
</span><del>-    #needed? qtwebengine/src/3rdparty/chromium/build/gyp_helper.py
</del><ins>+        # see https://codereview.qt-project.org/#/c/122729/
+        patchfiles-append patch-pcfiles.diff
+    }
</ins><span class="cx"> 
</span><del>-    # qtwebengine/src/core/gyp_run.pro
-    #    calls
-    #   qtwebengine/tools/buildscripts/gyp_qtwebengine
-    # gyp_qtwebengine insists on x64 and libcpp ?
-
-    # qtwebengine/src/3rdparty/ninja/bootstrap.py calls g++ (must set CXX)
-
</del><span class="cx">     if { [variant_isset tests] } {
</span><span class="cx">         # header file QtCore/private/qmachparser_p.h is included only if &quot;defined(QT_BUILD_INTERNAL) &amp;&amp; defined(Q_OF_MACH_O)&quot;
</span><span class="cx">         #     code from header is used only &quot;ifdef Q_OF_MACH_O&quot;
</span><span class="lines">@@ -100,46 +823,19 @@
</span><span class="cx">         #     assume the header include code is correct
</span><span class="cx">         patchfiles-append patch-tst_qpluginloader.diff
</span><span class="cx"> 
</span><del>-        # see http://stackoverflow.com/questions/14506151/invalid-symbol-redefinition-in-inline-asm-on-llvm
-        patchfiles-append patch-tst_benchlibcallgrind.diff
</del><ins>+        if { ${configure.build_arch} eq &quot;i386&quot; || [variant_isset universal] } {
+            # see http://stackoverflow.com/questions/14506151/invalid-symbol-redefinition-in-inline-asm-on-llvm
+            # only runs test code on 32-bit systems
+            patchfiles-append patch-tst_benchlibcallgrind.diff
</ins><span class="cx"> 
</span><del>-        # When testing, ensure that a universal object file is not inadvertently created.
-        patchfiles-append patch-machtest.diff
-
-        # On testing of 32-bit systems,
-        #  Pre-patch: QCOMPARE(unsigned long const&amp;, unsigned int const&amp;
-        # Post-patch: QCOMPARE(unsigned int  const&amp;, unsigned int const&amp;
-        # Function template is only instantiated for same first and second arguments.
-        patchfiles-append patch-tst_qarraydata.diff
-
-        # During testing, NSStringFromRect requires NSRect.
-        patchfiles-append patch-tst_qaccessibilitymac_helpers.diff
-    }
-
-    # see #44934 (and #35067 for the qt4-mac version)
-    if { true } {
-        set framework_list [split ${qt_frameworks_dir} '/']
-        set qt_list        [split ${qt_dir} '/']
-
-        while {[llength ${qt_list}] &amp;&amp; [llength ${framework_list}]} {
-            set var_qt        [lindex $qt_list        0]
-            set var_framework [lindex $framework_list 0]
-
-            if { ${var_qt} ne ${var_framework} } {
-                break
-            }
-
-            # remove first element from list
-            set qt_list        [lreplace ${qt_list}        0 0]
-            set framework_list [lreplace ${framework_list} 0 0]
</del><ins>+            # this test might still cause problems, but with 5.4.2-&gt;5.5.0, it is no longer run
+            # tests/auto/corelib/plugin/qpluginloader/qpluginloader.pro:
+            #     -macx-*: SUBDIRS += machtest
+            #     +macx-*: contains(QT_CONFIG, private_tests): SUBDIRS += machtest
+            #
+            # When testing, ensure that a universal object file is not inadvertently created.
+            patchfiles-append patch-machtest.diff
</ins><span class="cx">         }
</span><del>-        set libreplace [string repeat ../ [llength ${qt_list}]][join ${framework_list} /]
-        if { ${libreplace} ne &quot;lib&quot; } {
-            patchfiles-append patch-shared.diff
-            post-patch {
-                reinplace &quot;s|__MACPORTS_FRAMWORK_DIR__|${libreplace}|g&quot; ${worksrcpath}/qttools/src/macdeployqt/shared/shared.cpp
-            }
-        }
</del><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     # --prefix is not recognized.
</span><span class="lines">@@ -179,7 +875,7 @@
</span><span class="cx">         -shared           \
</span><span class="cx">         -largefile        \
</span><span class="cx">         -accessibility
</span><del>-    
</del><ins>+
</ins><span class="cx">     foreach driver { db2 ibase mysql oci odbc psql sqlite sqlite2 tds } {
</span><span class="cx">         configure.args-append -no-sql-${driver}
</span><span class="cx">     }
</span><span class="lines">@@ -192,6 +888,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     configure.args-append \
</span><ins>+        -no-testcocoon    \
+        -no-gcov          \
</ins><span class="cx">         -force-pkg-config
</span><span class="cx"> 
</span><span class="cx">     # Third Party Libraries:
</span><span class="lines">@@ -204,9 +902,11 @@
</span><span class="cx">         -system-freetype    \
</span><span class="cx">         -system-harfbuzz    \
</span><span class="cx">         -openssl-linked     \
</span><ins>+        -no-libproxy        \
</ins><span class="cx">         -system-pcre        \
</span><span class="cx">         --disable-xcb       \
</span><del>-        --disable-xkbcommon \
</del><ins>+        -no-xkbcommon-x11   \
+        -no-xkbcommon-evdev \
</ins><span class="cx">         -no-xinput2         \
</span><span class="cx">         -no-xcb-xlib        \
</span><span class="cx">         -glib               \
</span><span class="lines">@@ -224,11 +924,12 @@
</span><span class="cx">         -widgets                \
</span><span class="cx">         -rpath                  \
</span><span class="cx">         -verbose                \
</span><del>-        -no-optimized-qmake     \
</del><ins>+        -optimized-qmake        \
</ins><span class="cx">         -nis                    \
</span><span class="cx">         -cups                   \
</span><span class="cx">         -iconv                  \
</span><span class="cx">         -no-evdev               \
</span><ins>+        -no-tslib               \
</ins><span class="cx">         -icu                    \
</span><span class="cx">         -fontconfig             \
</span><span class="cx">         -strip                  \
</span><span class="lines">@@ -241,8 +942,10 @@
</span><span class="cx">         -no-directfb            \
</span><span class="cx">         -no-linuxfb             \
</span><span class="cx">         -no-kms                 \
</span><ins>+        -no-libinput            \
+        -no-gstreamer           \
</ins><span class="cx">         -no-system-proxies
</span><del>-    
</del><ins>+
</ins><span class="cx">     # MacOS/iOS options:
</span><span class="cx">     configure.args-append    \
</span><span class="cx">         -framework
</span><span class="lines">@@ -251,7 +954,7 @@
</span><span class="cx">         configure.args-append \
</span><span class="cx">             -sdk [string tolower [join [lrange [split [lindex [split ${configure.sdkroot} &quot;/&quot;] end] &quot;.&quot;] 0 end-1] &quot;.&quot;]]
</span><span class="cx">     }
</span><del>-    
</del><ins>+
</ins><span class="cx">     # configure options that don't show up in configure --help
</span><span class="cx">     configure.args-append \
</span><span class="cx">         -no-libudev       \
</span><span class="lines">@@ -284,65 +987,21 @@
</span><span class="cx">     configure.universal_cflags
</span><span class="cx">     configure.universal_cxxflags
</span><span class="cx">     configure.universal_cppflags
</span><del>-}
</del><span class="cx"> 
</span><del>-if { ${subport} eq ${name} } {
-    depends_lib                              \
-        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
</del><ins>+    # cofigure script looks for perl but doesn't seem to use it for our configuration
</ins><span class="cx"> 
</span><del>-    # see https://bugreports.qt.io/browse/QTBUG-35514
-    build.target
</del><ins>+    # configure script uses gawk if it can find it,
+    #    so require it for consistency
+    depends_build-append port:gawk
</ins><span class="cx"> 
</span><ins>+    # unless overridden, configure script uses gmake if it can find it
+    configure.env-append MAKE=${build.cmd}
+}
+
+# special case
+if { ${subport} eq &quot;${name}-qtbase&quot; } {
</ins><span class="cx">     if { [variant_isset universal] } {
</span><del>-        merger-post-destroot {
-            foreach arch ${universal_archs_to_use} {
-                set dir ${destroot}-${arch}
</del><span class="cx"> 
</span><del>-                # Libs.private contains the value of ${worksrcpath}-${arch}, which prevents merging
-                reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_libs_dir}/pkgconfig/Qt5WebKit.pc
-
-                foreach prlfl [glob ${dir}${qt_libs_dir}/*.framework/*.prl] {
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${prlfl}
-                }
-
-                foreach prlfl [glob ${dir}${qt_libs_dir}/*.prl] {
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${prlfl}
-                }
-
-                reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_mkspecs_dir}/modules/qt_lib_bootstrap_private.pri
-                reinplace &quot;s|macx-clang-32|macx-clang|g&quot;              ${dir}${qt_libs_dir}/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake
-                
-                
-                if { [variant_isset examples] } {
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
-                    reinplace -E &quot;/\\w*-arch \\\\/d&quot;                      ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
-                    reinplace -E &quot;/\\w*${arch} \\\\/d&quot;                    ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
-                    reinplace -E {s:-arch +[^ ]+::g}                      ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
-                    reinplace &quot;s|macx-clang-32|macx-clang|g&quot;              ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
-
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/multimedia/spectrum/fftreal.framework/fftreal.prl
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/multimedia/spectrum/spectrum.app/Contents/Frameworks/fftreal.framework/fftreal.prl
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/sensors/grue/libgruesensor.prl
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
-                    if { [variant_isset debug] } {
-                        reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/widgets/tools/plugandpaint/plugins/libpnp_basictools_debug.prl
-                    }
-                }
-            }
-        }
-
</del><span class="cx">         post-destroot {
</span><span class="cx">             # delete preprocessor comments surrounding QT_CPU_FEATURES.i386 and QT_CPU_FEATURES.x86_64
</span><span class="cx">             reinplace &quot;/^#ifndef.*$/d&quot; ${destroot}${qt_mkspecs_dir}/qmodule.pri
</span><span class="lines">@@ -350,35 +1009,10 @@
</span><span class="cx">             reinplace &quot;/^#endif.*$/d&quot;  ${destroot}${qt_mkspecs_dir}/qmodule.pri
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        # The file ${prefix}/share/qt5/mkspecs/qconfig.pri is still not properly merged
-        # The solution is ???.
</del><ins>+        # The file ${qt_mkspecs_dir}/qconfig.pri is still not properly merged
+        # A workaround is to set QT_ARCH and QT_TARGET_ARCH manually (see e.g. the qmake5 PortGroup)
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    post-destroot {
-        # see #44204
-        foreach f [glob -nocomplain -tails -directory ${destroot}${qt_libs_dir} *.framework] {
-            set framework [file rootname ${f}]
-
-            set include_list   [split ${qt_includes_dir}   '/']
-            set framework_list [split ${qt_libs_dir} '/']
-
-            while {[llength ${include_list}] &amp;&amp; [llength ${framework_list}]} {
-                set var_include   [lindex $include_list   0]
-                set var_framework [lindex $framework_list 0]
-
-                if { ${var_include} ne ${var_framework} } {
-                    break
-                }
-
-                # remove first element from list
-                set include_list   [lreplace ${include_list} 0 0]
-                set framework_list [lreplace ${framework_list} 0 0]
-            }
-
-            ln -s [string repeat ../ [llength ${include_list}]][join ${framework_list} /]/${f}/Headers ${destroot}${qt_includes_dir}/${framework}
-        }
-    }
-
</del><span class="cx">     variant tests description {Enable tests} {
</span><span class="cx">         configure.args-replace {-nomake tests} {-make tests}
</span><span class="cx">     }
</span><span class="lines">@@ -387,7 +1021,7 @@
</span><span class="cx">         configure.args-replace {-nomake examples} {-make examples}
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    variant debug description {Build both release and debug library} {
</del><ins>+    variant debug description {Build both release and debug libraries} {
</ins><span class="cx">         configure.args-replace -release -debug-and-release
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -395,79 +1029,182 @@
</span><span class="cx">         depends_lib-append port:pulseaudio
</span><span class="cx">         configure.args-replace -no-pulseaudio -pulseaudio
</span><span class="cx">     }
</span><ins>+
+    variant gstreamer description {Compile GStreamer support} {
+        depends_lib-append port:gstreamer1 port:gstreamer1-gst-plugins-base
+        configure.args-replace -no-gstreamer {-gstreamer 1.0}
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-subport ${name}-docs {
-    depends_lib-append \
-        path:${qt_bins_dir}/qdoc:${name} \
-        path:${qt_plugins_dir}/sqldrivers/libqsqlite.dylib:${name}-sqlite3-plugin
</del><ins>+# special case
+if { ${subport} eq &quot;${name}-docs&quot; } {
</ins><span class="cx"> 
</span><del>-    supported_archs   noarch
</del><ins>+    depends_lib-append                                                           \
+        path:${qt_bins_dir}/qdoc:${name}-qtbase                                  \
+        path:${qt_plugins_dir}/sqldrivers/libqsqlite.dylib:${name}-sqlite-plugin \
+        path:${qt_bins_dir}/qhelpgenerator:${name}-qttools
</ins><span class="cx"> 
</span><del>-    build.target      docs
-    destroot.target   install_docs
-
</del><span class="cx">     post-extract {
</span><span class="cx">         # For the most part, generated makefiles use ${prefix}/bin/qdoc.
</span><del>-        ln -s ${qt_bins_dir}/qdoc ${worksrcpath}/qtbase/bin
</del><ins>+        ln -s ${qt_bins_dir}/qdoc ${worksrcpath}/qtbase/bin/
</ins><span class="cx"> 
</span><span class="cx">         # Similarly, location of qhelpgenerator is expected in ${worksrcpath}
</span><del>-        xinstall -d -m 755 ${worksrcpath}/qttools/bin/
</del><ins>+        xinstall -d -m 0755 ${worksrcpath}/qttools/bin/
</ins><span class="cx">         ln -s ${qt_bins_dir}/qhelpgenerator ${worksrcpath}/qttools/bin/
</span><span class="cx"> 
</span><span class="cx">         # Without this file, the makefile ${worksrcpath}/qtwebkit/Source/WebCore/Makefile.WebCore.Target
</span><span class="cx">         #    keeps generating itself over and over again.
</span><span class="cx">         # This file is only created when the library is being built, however.
</span><del>-        xinstall -d -m 755 ${worksrcpath}/qtwebkit/Source/WebCore/generated
</del><ins>+        xinstall -d -m 0755 ${worksrcpath}/qtwebkit/Source/WebCore/generated
</ins><span class="cx">         touch ${worksrcpath}/qtwebkit/Source/WebCore/generated/InspectorBackendCommands.qrc
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-# See http://doc.qt.io/qt-5/sql-driver.html for info on building SQL Database Drivers
</del><ins>+if { [variant_exists universal] &amp;&amp; [variant_isset universal] } {
+    merger-post-destroot {
+        foreach arch ${universal_archs_to_use} {
</ins><span class="cx"> 
</span><del>-subport ${name}-sqlite3-plugin {
-    PortGroup           qmake5 1.0
</del><ins>+            set dir ${destroot}-${arch}
</ins><span class="cx"> 
</span><del>-    depends_lib-append port:sqlite3
</del><ins>+            foreach prlfl [glob -nocomplain ${dir}${qt_libs_dir}/*.framework/*.prl] {
+                reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${prlfl}
+            }
</ins><span class="cx"> 
</span><del>-    # for single architecture, easier to use
-    #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/sqlite,
-    #    but doesn't work for universal build
-    configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/sqlite
-    build.dir     ${configure.dir}
-    destroot.dir  ${configure.dir}
</del><ins>+            foreach prlfl [glob -nocomplain ${dir}${qt_libs_dir}/*.prl] {
+                reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${prlfl}
+            }
</ins><span class="cx"> 
</span><del>-    configure.args-append &quot;INCLUDEPATH+=${prefix}/include&quot; &quot;LIBS+=\&quot;-L${prefix}/lib -lsqlite3\&quot;&quot;
</del><ins>+            foreach prlfl [glob -nocomplain ${dir}${qt_examples_dir}/widgets/tools/plugandpaint/plugins/*.prl] {
+                reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${prlfl}
+            }
+
+            if { [file exists ${dir}${qt_libs_dir}/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake] } {
+                reinplace &quot;s|macx-clang-32|macx-clang|g&quot; ${dir}${qt_libs_dir}/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake
+            }
+
+            # Libs.private contains the value of ${worksrcpath}-${arch}, which prevents merging
+            if { [file exists ${dir}${qt_libs_dir}/pkgconfig/Qt5WebKit.pc] } {
+                reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_libs_dir}/pkgconfig/Qt5WebKit.pc
+            }
+            if { [file exists ${dir}${qt_libs_dir}/pkgconfig/Qt5WebEngineCore.pc] } {
+                reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_libs_dir}/pkgconfig/Qt5WebEngineCore.pc
+            }
+
+            if { [file exists ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile] } {
+                reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
+                reinplace -E &quot;/\\w*-arch \\\\/d&quot;                      ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
+                reinplace -E &quot;/\\w*${arch} \\\\/d&quot;                    ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
+                reinplace -E {s:-arch +[^ ]+::g}                      ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
+                reinplace &quot;s|macx-clang-32|macx-clang|g&quot;              ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
+            }
+
+            if { [file exists ${dir}${qt_examples_dir}/multimedia/spectrum/fftreal.framework/fftreal.prl] } {
+                reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/multimedia/spectrum/fftreal.framework/fftreal.prl
+            }
+
+            if { [file exists ${dir}${qt_examples_dir}/multimedia/spectrum/spectrum.app/Contents/Frameworks/fftreal.framework/fftreal.prl] } {
+                reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/multimedia/spectrum/spectrum.app/Contents/Frameworks/fftreal.framework/fftreal.prl
+            }
+
+            if { [file exists ${dir}${qt_examples_dir}/sensors/grue/libgruesensor.prl   ] } {
+                reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/sensors/grue/libgruesensor.prl
+            }
+        }
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-subport ${name}-psql84-plugin {
-    PortGroup           qmake5 1.0
</del><ins>+# see #44934 (and #35067 for the qt4-mac version)
+if { ${subport} eq &quot;${name}-qttools&quot; } {
+    set framework_list [split ${qt_frameworks_dir} '/']
+    set qt_list        [split ${qt_dir} '/']
</ins><span class="cx"> 
</span><del>-    depends_lib-append port:postgresql84
</del><ins>+    while {[llength ${qt_list}] &amp;&amp; [llength ${framework_list}]} {
+        set var_qt        [lindex $qt_list        0]
+        set var_framework [lindex $framework_list 0]
</ins><span class="cx"> 
</span><del>-    # for single architecture, easier to use
-    #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/psql,
-    #    but doesn't work for universal build
-    configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/psql
-    build.dir     ${configure.dir}
-    destroot.dir  ${configure.dir}
</del><ins>+        if { ${var_qt} ne ${var_framework} } {
+            break
+        }
</ins><span class="cx"> 
</span><del>-    configure.args-append &quot;INCLUDEPATH+=${prefix}/include/postgresql84&quot; &quot;LIBS+=\&quot;-L${prefix}/lib/postgresql84 -lpq\&quot;&quot;
</del><ins>+        # remove first element from list
+        set qt_list        [lreplace ${qt_list}        0 0]
+        set framework_list [lreplace ${framework_list} 0 0]
+    }
+    set libreplace [string repeat ../ [llength ${qt_list}]][join ${framework_list} /]
+    if { ${libreplace} ne &quot;lib&quot; } {
+        patchfiles-append patch-shared.diff
+        post-patch {
+            reinplace &quot;s|__MACPORTS_FRAMWORK_DIR__|${libreplace}|g&quot; ${worksrcpath}/src/macdeployqt/shared/shared.cpp
+        }
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-subport ${name}-mysql56-plugin {
-    PortGroup           qmake5 1.0
</del><ins>+if { ${subport} ne ${name} } {
+    post-destroot {
+        # see #44204
+        foreach f [glob -nocomplain -tails -directory ${destroot}${qt_libs_dir} *.framework] {
+            set framework [file rootname ${f}]
</ins><span class="cx"> 
</span><del>-    depends_lib-append port:mysql56
</del><ins>+            set include_list   [split ${qt_includes_dir}   '/']
+            set framework_list [split ${qt_libs_dir} '/']
</ins><span class="cx"> 
</span><del>-    # for single architecture, easier to use
-    #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/mysql,
-    #    but doesn't work for universal build
-    configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/mysql
-    build.dir     ${configure.dir}
-    destroot.dir  ${configure.dir}
</del><ins>+            while {[llength ${include_list}] &amp;&amp; [llength ${framework_list}]} {
+                set var_include   [lindex $include_list   0]
+                set var_framework [lindex $framework_list 0]
</ins><span class="cx"> 
</span><del>-    configure.args-append &quot;INCLUDEPATH+=${prefix}/include/mysql56/mysql&quot; &quot;LIBS+=\&quot;-L${prefix}/lib/mysql56/mysql -lmysqlclient_r\&quot;&quot;
</del><ins>+                if { ${var_include} ne ${var_framework} } {
+                    break
+                }
+
+                # remove first element from list
+                set include_list   [lreplace ${include_list} 0 0]
+                set framework_list [lreplace ${framework_list} 0 0]
+            }
+
+            xinstall -d -m 0755 ${destroot}${qt_includes_dir}
+            ln -s [string repeat ../ [llength ${include_list}]][join ${framework_list} /]/${f}/Headers ${destroot}${qt_includes_dir}/${framework}
+        }
+
+        # .app and non-.app programs are both put in qt_bins_dir
+        # put a link of any .app programs in the ${qt_apps_dir}
+        if { ${qt_bins_dir} ne ${qt_apps_dir} } {
+            xinstall -d -m 0755 ${destroot}${qt_apps_dir}
+            foreach app [glob -nocomplain -tails -directory ${destroot}${qt_bins_dir} *.app] {
+                ln -s ${qt_bins_dir}/${app} ${destroot}${qt_apps_dir}
+            }
+        }
+
+        # put configuration files in places they will be found automatically
+        if { ${qt_libs_dir} ne &quot;${prefix}/lib&quot; } {
+
+            # put link to pkgconfig files in place where pkgconfig will find it
+            # most Qt 5 pkgconfig files begin with Qt5, so link should not conflict with any other Qt installations
+            #    exceptions: Enginio (new in Qt 5.3)
+            xinstall -d -m 0755 ${destroot}${prefix}/lib/pkgconfig
+            foreach pcfile [glob -nocomplain -tails -directory ${destroot}${qt_libs_dir}/pkgconfig *.pc] {
+                ln -s ${qt_libs_dir}/pkgconfig/${pcfile} ${destroot}${prefix}/lib/pkgconfig
+            }
+
+            # put link to cmake files in place where cmake will find it
+            # most Qt 5 cmake directories begin with Qt5, so link should not conflict with any other Qt installations
+            #    exceptions: Enginio (new in Qt 5.3)
+            xinstall -d -m 0755 ${destroot}${prefix}/lib/cmake
+            foreach cmakedir [glob -type d -nocomplain -tails -directory ${destroot}${qt_libs_dir}/cmake *] {
+                xinstall -d -m 0755 ${destroot}${prefix}/lib/cmake/${cmakedir}
+                foreach cmakefile [glob -tails -directory ${destroot}${qt_libs_dir}/cmake/${cmakedir} *.cmake] {
+                    ln -s ${qt_libs_dir}/cmake/${cmakedir}/${cmakefile} ${destroot}${prefix}/lib/cmake/${cmakedir}/
+                }
+            }
+
+            # if cmake finds configuration files in ${prefix}/lib/cmake, CMAKE_CURRENT_LIST_DIR expands to ${prefix}/lib/cmake/xxx
+            # cmake configuration files actually installed in ${qt_cmake_module_dir}/xxx
+            foreach cmakedir [glob -type d -nocomplain -tails -directory ${destroot}${qt_libs_dir}/cmake *] {
+                foreach cmakefile [glob -nocomplain -directory ${destroot}${qt_libs_dir}/cmake/${cmakedir} *.cmake] {
+                    reinplace &quot;s|\\\${CMAKE_CURRENT_LIST_DIR}|${qt_cmake_module_dir}/${cmakedir}|g&quot; ${cmakefile}
+                }
+            }
+        }
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> livecheck.type      regex
</span></span></pre></div>
<a id="trunkdportsaquaqt5filespatchadd_sdkdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/aqua/qt5/files/patch-add_sdk.diff (0 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5/files/patch-add_sdk.diff                                (rev 0)
+++ trunk/dports/aqua/qt5/files/patch-add_sdk.diff        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+--- mkspecs/features/mac/sdk.prf.orig        2015-06-29 13:05:10.000000000 -0700
++++ mkspecs/features/mac/sdk.prf        2015-10-06 21:59:22.000000000 -0700
+@@ -43,7 +43,7 @@
+ QMAKESPEC_NAME = $$basename(QMAKESPEC)
+
+ # Resolve SDK version of various tools
+-for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB)) {
++for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_FIX_RPATH QMAKE_AR QMAKE_RANLIB QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_LINK_C)) {
+     tool_variable = QMAKE_MAC_SDK.$${QMAKESPEC_NAME}.$${QMAKE_MAC_SDK}.$${tool}
+     !isEmpty($$tool_variable) {
+         $$tool = $$eval($$tool_variable)
</ins></span></pre></div>
<a id="trunkdportsaquaqt5filespatchconfigurediff"></a>
<div class="addfile"><h4>Added: trunk/dports/aqua/qt5/files/patch-configure.diff (0 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5/files/patch-configure.diff                                (rev 0)
+++ trunk/dports/aqua/qt5/files/patch-configure.diff        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+--- configure.orig        2015-10-12 21:35:07.000000000 -0700
++++ configure        2015-10-18 12:19:26.000000000 -0700
+@@ -4230,7 +4230,7 @@

+     local incdir_raw incdir_mod cflags
+     local libdir_raw libdir_mod libs
+-    if [ -n &quot;$PKG_CONFIG&quot; ] &amp;&amp; $PKG_CONFIG --exists $pkg_name 2&gt;/dev/null; then
++    if [ -n &quot;$PKG_CONFIG&quot; ] &amp;&amp; [ &quot;$qmake_postfix&quot; != &quot;OPENGL&quot; ]  &amp;&amp; $PKG_CONFIG --exists $pkg_name 2&gt;/dev/null; then
+         incdir_raw=`$PKG_CONFIG --cflags-only-I $pkg_name 2&gt;/dev/null`
+         cflags=`$PKG_CONFIG --cflags-only-other $pkg_name 2&gt;/dev/null`
+         libdir_raw=`$PKG_CONFIG --libs-only-L $pkg_name 2&gt;/dev/null`
</ins></span></pre></div>
<a id="trunkdportsaquaqt5filespatchfix_sdkdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/aqua/qt5/files/patch-fix_sdk.diff (0 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5/files/patch-fix_sdk.diff                                (rev 0)
+++ trunk/dports/aqua/qt5/files/patch-fix_sdk.diff        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -0,0 +1,60 @@
</span><ins>+From 146ebe26dce3289eb440bed7d5d0a7988ff5f5c9 Mon Sep 17 00:00:00 2001
+From: Sylvain Defresne &lt;sdefresne@chromium.org&gt;
+Date: Fri, 18 Sep 2015 22:18:57 +0200
+Subject: [PATCH] &lt;tools/gyp&gt; [Backport] Fallback to '.tbd' for system missing
+ '.dylib'.
+
+With Xcode 7 the '.dylib' for system libraries are no longer present
+but instead only '.tbd' are shipped maybe in an effort to reduce the
+size of the SDK download.
+
+Change XcodeSettings._AdjustLibrary() to look for a '.tbd' file for
+system libraries (those whose path starts by &quot;$(SDKROOT)&quot;). Only do
+the substitution if the '.dylib' cannot be found and a '.tbd' file
+with the same path exists.
+
+BUG=517914
+R=justincohen@chromium.org, mark@chromium.org
+
+Review URL: https://codereview.chromium.org/1275133004 .
+
+Patch from Sylvain Defresne &lt;sdefresne@chromium.org&gt;.
+
+Change-Id: I8e81340b1258501a2e5f4952c606ae7204b0d74f
+Reviewed-by: Kai Koehne &lt;kai.koehne@theqtcompany.com&gt;
+---
+ chromium/tools/gyp/pylib/gyp/xcode_emulation.py | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/chromium/tools/gyp/pylib/gyp/xcode_emulation.py b/chromium/tools/gyp/pylib/gyp/xcode_emulation.py
+index ac5ffea..14bd7a9 100644
+--- src/3rdparty/chromium/tools/gyp/pylib/gyp/xcode_emulation.py
++++ src/3rdparty/chromium/tools/gyp/pylib/gyp/xcode_emulation.py
+@@ -1006,7 +1006,23 @@ class XcodeSettings(object):
+     sdk_root = self._SdkPath(config_name)
+     if not sdk_root:
+       sdk_root = ''
+-    return l.replace('$(SDKROOT)', sdk_root)
++    # Xcode 7 started shipping with &quot;.tbd&quot; (text based stubs) files instead of
++    # &quot;.dylib&quot; without providing a real support for them. What it does, for
++    # &quot;/usr/lib&quot; libraries, is do &quot;-L/usr/lib -lname&quot; which is dependent on the
++    # library order and cause collision when building Chrome.
++    #
++    # Instead substitude &quot;.tbd&quot; to &quot;.dylib&quot; in the generated project when the
++    # following conditions are both true:
++    # - library is referenced in the gyp file as &quot;$(SDKROOT)/**/*.dylib&quot;,
++    # - the &quot;.dylib&quot; file does not exists but a &quot;.tbd&quot; file do.
++    library = l.replace('$(SDKROOT)', sdk_root)
++    if l.startswith('$(SDKROOT)'):
++      basename, ext = os.path.splitext(library)
++      if ext == '.dylib' and not os.path.exists(library):
++        tbd_library = basename + '.tbd'
++        if os.path.exists(tbd_library):
++          library = tbd_library
++    return library

+   def AdjustLibraries(self, libraries, config_name=None):
+     &quot;&quot;&quot;Transforms entries like 'Cocoa.framework' in libraries into entries like
+-- 
+2.4.9 (Apple Git-60)
+
</ins></span></pre></div>
<a id="trunkdportsaquaqt5filespatchicuprodiff"></a>
<div class="addfile"><h4>Added: trunk/dports/aqua/qt5/files/patch-icu.pro.diff (0 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5/files/patch-icu.pro.diff                                (rev 0)
+++ trunk/dports/aqua/qt5/files/patch-icu.pro.diff        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+--- Tools/qmake/config.tests/icu/icu.pro.orig        2015-07-16 11:45:20.000000000 -0700
++++ Tools/qmake/config.tests/icu/icu.pro        2015-07-16 11:46:05.000000000 -0700
+@@ -14,6 +14,7 @@
+         LIBS += -licuin -licuuc -licudt
+     }
+ } else:!contains(QT_CONFIG,no-pkg-config):packagesExist(&quot;icu-i18n&quot;) {
++    CONFIG += link_pkgconfig
+     PKGCONFIG += icu-i18n
+ } else {
+     LIBS += -licui18n -licuuc -licudata
</ins></span></pre></div>
<a id="trunkdportsaquaqt5filespatchmachtestdiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/aqua/qt5/files/patch-machtest.diff (142422 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5-mac/files/patch-machtest.diff        2015-11-11 21:41:38 UTC (rev 142422)
+++ trunk/dports/aqua/qt5/files/patch-machtest.diff        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -1,15 +1,15 @@
</span><del>---- qtbase/tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro.orig        2014-06-19 03:08:00.000000000 -0700
-+++ qtbase/tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro        2014-06-27 11:09:55.000000000 -0700
-@@ -4,10 +4,10 @@
-     generate-bad.pl

</del><ins>+--- tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro.orig        2015-07-05 12:53:46.000000000 -0700
++++ tests/auto/corelib/plugin/qpluginloader/machtest/machtest.pro        2015-07-05 12:53:25.000000000 -0700
+@@ -7,10 +7,10 @@
+ load(qt)
+
</ins><span class="cx">  i386.target = good.i386.dylib
</span><del>--i386.commands = $(CXX) $(CXXFLAGS) -shared -arch i386 -o $@ -I$$[QT_INSTALL_HEADERS/get] $&lt;
-+i386.commands = $(CXX) $(filter-out -arch i386 x86_64,$(CXXFLAGS)) -shared -arch i386 -o $@ -I$$[QT_INSTALL_HEADERS/get] $&lt;
</del><ins>+-i386.commands = $(CXX) $(CXXFLAGS) -shared -arch i386 -o $@ -I$(INCPATH) $&lt;
++i386.commands = $(CXX) $(filter-out -arch i386 x86_64,$(CXXFLAGS)) -shared -arch i386 -o $@ -I$(INCPATH) $&lt;
</ins><span class="cx">  i386.depends += $$PWD/../fakeplugin.cpp
</span><span class="cx">  x86_64.target = good.x86_64.dylib
</span><del>--x86_64.commands = $(CXX) $(CXXFLAGS) -shared -arch x86_64 -o $@ -I$$[QT_INSTALL_HEADERS/get] $&lt;
-+x86_64.commands = $(CXX) $(filter-out -arch i386 x86_64,$(CXXFLAGS)) -shared -arch x86_64 -o $@ -I$$[QT_INSTALL_HEADERS/get] $&lt;
</del><ins>+-x86_64.commands = $(CXX) $(CXXFLAGS) -shared -arch x86_64 -o $@ -I$(INCPATH) $&lt;
++x86_64.commands = $(CXX) $(filter-out -arch i386 x86_64,$(CXXFLAGS)) -shared -arch x86_64 -o $@ -I$(INCPATH) $&lt;
</ins><span class="cx">  x86_64.depends += $$PWD/../fakeplugin.cpp
</span><del>- 
</del><ins>+
</ins><span class="cx">  # Current Mac OS X toolchains have no compiler for PPC anymore
</span></span></pre></div>
<a id="trunkdportsaquaqt5filespatchmidifixdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/aqua/qt5/files/patch-midifix.diff (0 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5/files/patch-midifix.diff                                (rev 0)
+++ trunk/dports/aqua/qt5/files/patch-midifix.diff        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -0,0 +1,25 @@
</span><ins>+--- .//src/3rdparty/chromium/media/midi/midi_manager_mac.cc.orig        2015-10-12 21:36:43.000000000 -0700
++++ .//src/3rdparty/chromium/media/midi/midi_manager_mac.cc        2015-11-11 09:31:28.000000000 -0700
+@@ -17,10 +17,6 @@
+ using base::SysCFStringRefToUTF8;
+ using std::string;

+-// NB: System MIDI types are pointer types in 32-bit and integer types in
+-// 64-bit. Therefore, the initialization is the simplest one that satisfies both
+-// (if possible).
+-
+ namespace media {

+ namespace {
+@@ -206,11 +202,7 @@
+   // This method is called on a separate high-priority thread owned by CoreMIDI.

+   MidiManagerMac* manager = static_cast&lt;MidiManagerMac*&gt;(read_proc_refcon);
+-#if __LP64__
+   MIDIEndpointRef source = reinterpret_cast&lt;uintptr_t&gt;(src_conn_refcon);
+-#else
+-  MIDIEndpointRef source = static_cast&lt;MIDIEndpointRef&gt;(src_conn_refcon);
+-#endif

+   // Dispatch to class method.
+   manager-&gt;ReadMidi(source, packet_list);
</ins></span></pre></div>
<a id="trunkdportsaquaqt5filespatchpcfilesdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/aqua/qt5/files/patch-pcfiles.diff (0 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5/files/patch-pcfiles.diff                                (rev 0)
+++ trunk/dports/aqua/qt5/files/patch-pcfiles.diff        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+From 3964b683f849baade1576ea2f50aab631970df58 Mon Sep 17 00:00:00 2001
+From: Martin Afanasjew &lt;martin@afanasjew.de&gt;
+Date: Sun, 27 Sep 2015 14:39:06 +0200
+Subject: [PATCH] qmake: Fix 'Libs:' line in .pc files on OS X
+
+On OS X with a framework-based build of Qt, the 'Libs:' line of the
+.pc files generated by `qmake` references the framework. This requires
+two separate arguments to the linker: The fixed string '-framework' and
+the name of the framework (e.g. 'QtCore'). Only the latter might need
+quoting. Prior to this fix, they were treated as a single argument (e.g.
+'-framework QtCore'), thus always quoted because of the contained space,
+and later lead to errors when trying to link a Qt framework discovered
+via `pkg-config`.
+
+Change-Id: I5c11ee651048832007e2ee4ebcbcf2e3212c8f48
+Task-number: QTBUG-47162
+Reviewed-by: Oswald Buddenhagen &lt;oswald.buddenhagen@theqtcompany.com&gt;
+---
+ qmake/generators/makefile.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
+index 4a03faf..7d4026c 100644
+--- qmake/generators/makefile.cpp
++++ qmake/generators/makefile.cpp
+@@ -3253,7 +3253,8 @@ MakefileGenerator::writePkgConfigFile()
+         int suffix = bundle.lastIndexOf(&quot;.framework&quot;);
+         if (suffix != -1)
+             bundle = bundle.left(suffix);
+-        pkgConfiglibName = &quot;-framework &quot; + bundle + &quot; &quot;;
++        t &lt;&lt; &quot;-framework &quot;;
++        pkgConfiglibName = bundle.toQString();
+     } else {
+         if (!project-&gt;values(&quot;QMAKE_DEFAULT_LIBDIRS&quot;).contains(libDir))
+             t &lt;&lt; &quot;-L${libdir} &quot;;
+-- 
+2.4.9 (Apple Git-60)
+
</ins></span></pre></div>
<a id="trunkdportsaquaqt5filespatchqtwebengine32diff"></a>
<div class="addfile"><h4>Added: trunk/dports/aqua/qt5/files/patch-qtwebengine32.diff (0 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5/files/patch-qtwebengine32.diff                                (rev 0)
+++ trunk/dports/aqua/qt5/files/patch-qtwebengine32.diff        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -0,0 +1,28 @@
</span><ins>+From 1e4a0d70224cf48ae9834858848a5d68fd0a96c5 Mon Sep 17 00:00:00 2001
+From: Joerg Bornemann &lt;joerg.bornemann@theqtcompany.com&gt;
+Date: Thu, 17 Sep 2015 17:09:50 +0200
+Subject: [PATCH] enable OS X 32 bit build
+
+Task-number: QTBUG-48228
+Change-Id: Ic8ee640316b95b2e7e2de9115330821dfae0e905
+Reviewed-by: Kai Koehne &lt;kai.koehne@theqtcompany.com&gt;
+---
+ tools/qmake/mkspecs/features/functions.prf | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf
+index ef0320d..69d3fd3 100644
+--- tools/qmake/mkspecs/features/functions.prf
++++ tools/qmake/mkspecs/features/functions.prf
+@@ -14,7 +14,7 @@ defineTest(isPlatformSupported) {

+   linux-g++*:!isGCCVersionSupported(): return(false)
+   !isPythonVersionSupported(): return(false)
+-  linux-g++*|win32-msvc2013|macx-clang: return(true)
++  linux-g++*|win32-msvc2013|macx-clang*: return(true)
+   boot2qt: return(true)

+   skipBuild(&quot;Qt WebEngine can currently only be built for Linux (GCC), Windows (MSVC 2013), OS X (XCode 5.1+) or Qt for Device Creation.&quot;)
+-- 
+2.4.9 (Apple Git-60)
+
</ins></span></pre></div>
<a id="trunkdportsaquaqt5filespatchshareddiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/aqua/qt5/files/patch-shared.diff (142422 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5-mac/files/patch-shared.diff        2015-11-11 21:41:38 UTC (rev 142422)
+++ trunk/dports/aqua/qt5/files/patch-shared.diff        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><del>---- qttools/src/macdeployqt/shared/shared.cpp.orig        2015-02-16 21:57:17.000000000 -0700
-+++ qttools/src/macdeployqt/shared/shared.cpp        2015-05-31 10:36:56.000000000 -0700
-@@ -196,7 +196,7 @@
</del><ins>+--- src/macdeployqt/shared/shared.cpp.orig        2015-02-16 21:57:17.000000000 -0700
++++ src/macdeployqt/shared/shared.cpp        2015-05-31 10:36:56.000000000 -0700
+@@ -233,7 +233,7 @@
</ins><span class="cx">                  state = DylibName;
</span><span class="cx">                  continue;
</span><span class="cx">              } else if (part &lt; parts.count() &amp;&amp; parts.at(part).endsWith(&quot;.framework&quot;)) {
</span></span></pre></div>
<a id="trunkdportsaquaqt5filespatchtst_benchlibcallgrinddiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/aqua/qt5/files/patch-tst_benchlibcallgrind.diff (142422 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5-mac/files/patch-tst_benchlibcallgrind.diff        2015-11-11 21:41:38 UTC (rev 142422)
+++ trunk/dports/aqua/qt5/files/patch-tst_benchlibcallgrind.diff        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><del>---- qtbase/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp.orig        2014-06-28 00:25:11.000000000 -0700
-+++ qtbase/tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp        2014-06-19 03:08:01.000000000 -0700
-@@ -81,9 +81,9 @@
</del><ins>+--- tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp.orig        2014-06-28 00:25:11.000000000 -0700
++++ tests/auto/testlib/selftests/benchlibcallgrind/tst_benchlibcallgrind.cpp        2014-06-19 03:08:01.000000000 -0700
+@@ -73,9 +73,9 @@
</ins><span class="cx">      QBENCHMARK {
</span><span class="cx">          __asm__ __volatile__(
</span><span class="cx">              &quot;mov $100000000,%%eax   \n&quot;
</span></span></pre></div>
<a id="trunkdportsaquaqt5filespatchtst_qaccessibilitymac_helpersdiff"></a>
<div class="delfile"><h4>Deleted: trunk/dports/aqua/qt5/files/patch-tst_qaccessibilitymac_helpers.diff (142422 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5-mac/files/patch-tst_qaccessibilitymac_helpers.diff        2015-11-11 21:41:38 UTC (rev 142422)
+++ trunk/dports/aqua/qt5/files/patch-tst_qaccessibilitymac_helpers.diff        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -1,11 +0,0 @@
</span><del>---- qtbase/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm.orig        2014-06-19 03:08:01.000000000 -0700
-+++ qtbase/tests/auto/other/qaccessibilitymac/tst_qaccessibilitymac_helpers.mm        2014-06-28 00:58:02.000000000 -0700
-@@ -116,7 +116,7 @@

- - (AXUIElementRef) ref { return reference; }
- - (void) print {
--    NSLog(@&quot;Accessible Object role: '%@', description: '%@', value: '%@', rect: '%@'&quot;, self.role, self.description, self.value, NSStringFromRect(self.rect));
-+    NSLog(@&quot;Accessible Object role: '%@', description: '%@', value: '%@', rect: '%@'&quot;, self.role, self.description, self.value, NSStringFromRect(NSRectFromCGRect(self.rect)));
-     NSLog(@&quot;    Children: %ld&quot;, [[self childList] count]);
- }

</del></span></pre></div>
<a id="trunkdportsaquaqt5filespatchtst_qarraydatadiff"></a>
<div class="delfile"><h4>Deleted: trunk/dports/aqua/qt5/files/patch-tst_qarraydata.diff (142422 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5-mac/files/patch-tst_qarraydata.diff        2015-11-11 21:41:38 UTC (rev 142422)
+++ trunk/dports/aqua/qt5/files/patch-tst_qarraydata.diff        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -1,11 +0,0 @@
</span><del>---- qtbase/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp~        2014-06-19 03:07:59.000000000 -0700
-+++ qtbase/tests/auto/corelib/tools/qarraydata/tst_qarraydata.cpp        2014-06-27 23:17:34.000000000 -0700
-@@ -797,7 +797,7 @@
-                     + minAlignment - Q_ALIGNOF(QArrayData)));

-         // Data is aligned
--        QCOMPARE(quintptr(data-&gt;data()) % alignment, quintptr(0u));
-+        QCOMPARE(quintptr(quintptr(data-&gt;data()) % alignment), quintptr(0));

-         // Check that the allocated array can be used. Best tested with a
-         // memory checker, such as valgrind, running.
</del></span></pre></div>
<a id="trunkdportsaquaqt5filespatchtst_qpluginloaderdiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/aqua/qt5/files/patch-tst_qpluginloader.diff (142422 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5-mac/files/patch-tst_qpluginloader.diff        2015-11-11 21:41:38 UTC (rev 142422)
+++ trunk/dports/aqua/qt5/files/patch-tst_qpluginloader.diff        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -1,16 +1,16 @@
</span><del>---- .//qtbase/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp.orig        2015-05-30 18:33:03.000000000 -0700
-+++ .//qtbase/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp        2015-05-30 18:34:54.000000000 -0700
</del><ins>+--- tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp.orig        2015-05-30 18:33:03.000000000 -0700
++++ tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp        2015-05-30 18:34:54.000000000 -0700
</ins><span class="cx"> @@ -311,7 +311,7 @@
</span><del>- 
</del><ins>+
</ins><span class="cx">  void tst_QPluginLoader::loadMachO_data()
</span><span class="cx">  {
</span><span class="cx"> -#ifdef Q_OF_MACH_O
</span><span class="cx"> +#if defined(QT_BUILD_INTERNAL) &amp;&amp; defined(Q_OF_MACH_O)
</span><span class="cx">      QTest::addColumn&lt;int&gt;(&quot;parseResult&quot;);
</span><del>- 
</del><ins>+
</ins><span class="cx">      QTest::newRow(&quot;/dev/null&quot;) &lt;&lt; int(QMachOParser::NotSuitable);
</span><span class="cx"> @@ -347,7 +347,7 @@
</span><del>- 
</del><ins>+
</ins><span class="cx">  void tst_QPluginLoader::loadMachO()
</span><span class="cx">  {
</span><span class="cx"> -#ifdef Q_OF_MACH_O
</span></span></pre></div>
<a id="trunkdportsaquaqt5macPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/aqua/qt5-mac/Portfile (142504 => 142505)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/aqua/qt5-mac/Portfile        2015-11-13 15:24:04 UTC (rev 142504)
+++ trunk/dports/aqua/qt5-mac/Portfile        2015-11-13 16:13:51 UTC (rev 142505)
</span><span class="lines">@@ -4,472 +4,24 @@
</span><span class="cx"> PortSystem          1.0
</span><span class="cx"> 
</span><span class="cx"> name                qt5-mac
</span><del>-version             5.4.2
-revision            1
-set branch          [join [lrange [split ${version} .] 0 1] .]
-
-categories          aqua
-platforms           macosx
-maintainers         mcalhoun openmaintainer
</del><ins>+version             5.5.1
</ins><span class="cx"> license             {LGPL-2.1 GPL-3}
</span><ins>+categories          aqua
</ins><span class="cx"> 
</span><del>-homepage            http://qt.io
-description         Qt Tool Kit ${branch}
-long_description    Qt Tool Kit: A cross-platform framework \
-    (headers, data, and libraries) for writing \
-    cross-platform GUI-based applications.
-
-distname            qt-everywhere-opensource-src-${version}
-
-master_sites        http://download.qt.io/official_releases/qt/${branch}/${version}/single/
-
-checksums           rmd160  3382c482a99e114560f56a9fe9501b8cabf334a9 \
-                    sha256  cfc768c55f0a0cd232bed914a9022528f8f2e50cb010bf0e4f3f62db3dfa17bd
-
-if { ${os.major} &lt; 11 } {
-    pre-fetch {
-        ui_error &quot;OS X prior to 10.8 (Mountain Lion) is not a Reference Configuration for Qt.&quot;
-        ui_error &quot;OS X prior to 10.7 (Lion) is not even tested.&quot;
-        ui_error &quot;See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations&quot;
-        return -code error &quot;unsupported OS&quot;
-    }
-} elseif { ${os.major} &gt; 14 } {
-    pre-fetch {
-        ui_warn &quot;OS X subsequent to 10.10 (Yosemite) is not a Reference Configuration for Qt.&quot;
-        ui_warn &quot;See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations&quot;
-    }
-} else {
-    # 11 &lt;= ${os.major} &lt;= 14
-    if { [variant_isset universal] } {
-        pre-fetch {
-            ui_warn &quot;Multiple architectures is not a Reference Configuration for Qt.&quot;
-            ui_warn &quot;See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations&quot;
-        }
-    } else {
-        if { ${build_arch} eq &quot;i386&quot; } {
-            pre-fetch {
-                ui_warn &quot;32-bit mode is not a Reference Configuration for Qt.&quot;
-                ui_warn &quot;See http://doc.qt.io/qt-5/supported-platforms.html#reference-configurations&quot;
-            }
-        }
-    }
-}
-
-if { ${subport} eq &quot;${name}-docs&quot;  } {
-    universal_variant no
-}
-
-if { ${subport} eq ${name} || ${subport} eq &quot;${name}-docs&quot; } {
-    # use the qt5 group; set 'building_qt5' so that the portgroup
-    # does not include certain parts
-    set building_qt5    1
-    PortGroup           conflicts_build 1.0
-    PortGroup           qt5 1.0
-    PortGroup           xcodeversion 1.0
-
-    conflicts           qt3 qt3-mac qt4-mac
-
-    minimum_xcodeversions   {11 4.1}
-
-    # See https://bugreports.qt.io/browse/QTBUG-34902
-    conflicts_build-append  qt4-mac
-
-    # Kuba states in https://trac.macports.org/ticket/44207#comment:7 
-    #  &quot;There's no reason to have parallel building disabled. Really.&quot;
-    #use_parallel_build no
-
-    # qtwebengine/src/core/gyp_run.pro buils an executable using g++
-    # This causes an error if UsingTheRightCompiler (https://trac.macports.org/wiki/UsingTheRightCompiler)
-    # Quick fix is to use full path to g++ (should use ${configure.cxx} instead?)
-    # N.B. that the python executable is found from the configuration environment
-    #patchfiles-append patch-ninja-compiler.diff
-
-    #needed? qtwebengine/src/3rdparty/chromium/build/gyp_helper.py
-
-    # qtwebengine/src/core/gyp_run.pro
-    #    calls
-    #   qtwebengine/tools/buildscripts/gyp_qtwebengine
-    # gyp_qtwebengine insists on x64 and libcpp ?
-
-    # qtwebengine/src/3rdparty/ninja/bootstrap.py calls g++ (must set CXX)
-
-    if { [variant_isset tests] } {
-        # header file QtCore/private/qmachparser_p.h is included only if &quot;defined(QT_BUILD_INTERNAL) &amp;&amp; defined(Q_OF_MACH_O)&quot;
-        #     code from header is used only &quot;ifdef Q_OF_MACH_O&quot;
-        #     the two must be consistent
-        #     assume the header include code is correct
-        patchfiles-append patch-tst_qpluginloader.diff
-
-        # see http://stackoverflow.com/questions/14506151/invalid-symbol-redefinition-in-inline-asm-on-llvm
-        patchfiles-append patch-tst_benchlibcallgrind.diff
-
-        # When testing, ensure that a universal object file is not inadvertently created.
-        patchfiles-append patch-machtest.diff
-
-        # On testing of 32-bit systems,
-        #  Pre-patch: QCOMPARE(unsigned long const&amp;, unsigned int const&amp;
-        # Post-patch: QCOMPARE(unsigned int  const&amp;, unsigned int const&amp;
-        # Function template is only instantiated for same first and second arguments.
-        patchfiles-append patch-tst_qarraydata.diff
-
-        # During testing, NSStringFromRect requires NSRect.
-        patchfiles-append patch-tst_qaccessibilitymac_helpers.diff
-    }
-
-    # see #44934 (and #35067 for the qt4-mac version)
-    if { true } {
-        set framework_list [split ${qt_frameworks_dir} '/']
-        set qt_list        [split ${qt_dir} '/']
-
-        while {[llength ${qt_list}] &amp;&amp; [llength ${framework_list}]} {
-            set var_qt        [lindex $qt_list        0]
-            set var_framework [lindex $framework_list 0]
-
-            if { ${var_qt} ne ${var_framework} } {
-                break
-            }
-
-            # remove first element from list
-            set qt_list        [lreplace ${qt_list}        0 0]
-            set framework_list [lreplace ${framework_list} 0 0]
-        }
-        set libreplace [string repeat ../ [llength ${qt_list}]][join ${framework_list} /]
-        if { ${libreplace} ne &quot;lib&quot; } {
-            patchfiles-append patch-shared.diff
-            post-patch {
-                reinplace &quot;s|__MACPORTS_FRAMWORK_DIR__|${libreplace}|g&quot; ${worksrcpath}/qttools/src/macdeployqt/shared/shared.cpp
-            }
-        }
-    }
-
-    # --prefix is not recognized.
-    configure.pre_args-delete       --prefix=${prefix}
-
-    # --disable-dependency-tracking is not recognized.
-    configure.universal_args-delete --disable-dependency-tracking
-
-    # Installation options:
-    #-extprefix     SYSROOT/PREFIX
-    #-hostprefix    EXTPREFIX
-    #-libexecdir    ARCHDATADIR/libexec
-    #-hostbindir    HOSTPREFIX/bin
-    #-hostlibdir    HOSTPREFIX/lib
-    configure.args-append                      \
-        -prefix         ${qt_dir}              \
-        -bindir         ${qt_bins_dir}         \
-        -headerdir      ${qt_includes_dir}     \
-        -libdir         ${qt_libs_dir}         \
-        -archdatadir    ${qt_archdata_dir}     \
-        -plugindir      ${qt_plugins_dir}      \
-        -importdir      ${qt_imports_dir}      \
-        -qmldir         ${qt_qml_dir}          \
-        -datadir        ${qt_data_dir}         \
-        -docdir         ${qt_docs_dir}         \
-        -translationdir ${qt_translations_dir} \
-        -sysconfdir     ${qt_sysconf_dir}      \
-        -examplesdir    ${qt_examples_dir}     \
-        -testsdir       ${qt_tests_dir}        \
-        -hostdatadir    ${qt_host_data_dir}
-
-    # Configure options:
-    configure.args-append \
-        -release          \
-        -opensource       \
-        -confirm-license  \
-        -shared           \
-        -largefile        \
-        -accessibility
-    
-    foreach driver { db2 ibase mysql oci odbc psql sqlite sqlite2 tds } {
-        configure.args-append -no-sql-${driver}
-    }
-
-    if { ![variant_isset universal] } {
-        configure.args-append &quot;-platform ${qt_qmake_spec}&quot;
-    } else {
-        set merger_configure_args(i386)   &quot;-platform ${qt_qmake_spec_32}&quot;
-        set merger_configure_args(x86_64) &quot;-platform ${qt_qmake_spec_64}&quot;
-    }
-
-    configure.args-append \
-        -force-pkg-config
-
-    # Third Party Libraries:
-    configure.args-append   \
-        -system-zlib        \
-        -no-mtdev           \
-        -no-journald        \
-        -system-libpng      \
-        -system-libjpeg     \
-        -system-freetype    \
-        -system-harfbuzz    \
-        -openssl-linked     \
-        -system-pcre        \
-        --disable-xcb       \
-        --disable-xkbcommon \
-        -no-xinput2         \
-        -no-xcb-xlib        \
-        -glib               \
-        -no-pulseaudio      \
-        -no-alsa            \
-        -no-gtkstyle
-
-    # Additional options:
-    configure.args-append       \
-        {-make libs}            \
-        {-make tools}           \
-        {-nomake examples}      \
-        {-nomake tests}         \
-        -gui                    \
-        -widgets                \
-        -rpath                  \
-        -verbose                \
-        -no-optimized-qmake     \
-        -nis                    \
-        -cups                   \
-        -iconv                  \
-        -no-evdev               \
-        -icu                    \
-        -fontconfig             \
-        -strip                  \
-        -no-pch                 \
-        -dbus-linked            \
-        -no-use-gold-linker     \
-        -no-separate-debug-info \
-        -no-xcb                 \
-        -no-eglfs               \
-        -no-directfb            \
-        -no-linuxfb             \
-        -no-kms                 \
-        -no-system-proxies
-    
-    # MacOS/iOS options:
-    configure.args-append    \
-        -framework
-
-    if {${configure.sdkroot} ne &quot;&quot;} {
-        configure.args-append \
-            -sdk [string tolower [join [lrange [split [lindex [split ${configure.sdkroot} &quot;/&quot;] end] &quot;.&quot;] 0 end-1] &quot;.&quot;]]
-    }
-    
-    # configure options that don't show up in configure --help
-    configure.args-append \
-        -no-libudev       \
-        -no-egl           \
-        -no-openvg
-
-    # Qt builds part of the system using environment provided my MacPorts.
-    # It builds the rest using its own internal environment.
-    # For consistency, clear MacPorts environment.
-    configure.cxx_stdlib
-    configure.sdkroot
-    configure.cc_archflags
-    configure.cxx_archflags
-    configure.objc_archflags
-    configure.objcxx_archflags
-    configure.ld_archflags
-    configure.cppflags
-    configure.cflags
-    configure.cxxflags
-    configure.objcflags
-    configure.objcxxflags
-    configure.ldflags
-    configure.pipe  no
-    if { [variant_isset universal] } {
-        set merger_arch_flag no
-    }
-    configure.march
-    configure.mtune
-    configure.universal_ldflags
-    configure.universal_cflags
-    configure.universal_cxxflags
-    configure.universal_cppflags
-}
-
</del><span class="cx"> if { ${subport} eq ${name} } {
</span><del>-    depends_lib                              \
-        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
-
-    # see https://bugreports.qt.io/browse/QTBUG-35514
-    build.target
-
-    if { [variant_isset universal] } {
-        merger-post-destroot {
-            foreach arch ${universal_archs_to_use} {
-                set dir ${destroot}-${arch}
-
-                # Libs.private contains the value of ${worksrcpath}-${arch}, which prevents merging
-                reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_libs_dir}/pkgconfig/Qt5WebKit.pc
-
-                foreach prlfl [glob ${dir}${qt_libs_dir}/*.framework/*.prl] {
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${prlfl}
-                }
-
-                foreach prlfl [glob ${dir}${qt_libs_dir}/*.prl] {
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${prlfl}
-                }
-
-                reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_mkspecs_dir}/modules/qt_lib_bootstrap_private.pri
-                reinplace &quot;s|macx-clang-32|macx-clang|g&quot;              ${dir}${qt_libs_dir}/cmake/Qt5Core/Qt5CoreConfigExtrasMkspecDir.cmake
-                
-                
-                if { [variant_isset examples] } {
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
-                    reinplace -E &quot;/\\w*-arch \\\\/d&quot;                      ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
-                    reinplace -E &quot;/\\w*${arch} \\\\/d&quot;                    ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
-                    reinplace -E {s:-arch +[^ ]+::g}                      ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
-                    reinplace &quot;s|macx-clang-32|macx-clang|g&quot;              ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
-
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/multimedia/spectrum/fftreal.framework/fftreal.prl
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/multimedia/spectrum/spectrum.app/Contents/Frameworks/fftreal.framework/fftreal.prl
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/sensors/grue/libgruesensor.prl
-                    reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/declarative/tutorials/gettingStarted/parts/part5/filedialog/Makefile
-                    if { [variant_isset debug] } {
-                        reinplace &quot;s|${worksrcpath}-${arch}|${worksrcpath}|g&quot; ${dir}${qt_examples_dir}/widgets/tools/plugandpaint/plugins/libpnp_basictools_debug.prl
-                    }
-                }
-            }
-        }
-
-        post-destroot {
-            # delete preprocessor comments surrounding QT_CPU_FEATURES.i386 and QT_CPU_FEATURES.x86_64
-            reinplace &quot;/^#ifndef.*$/d&quot; ${destroot}${qt_mkspecs_dir}/qmodule.pri
-            reinplace &quot;/^#else.*$/d&quot;   ${destroot}${qt_mkspecs_dir}/qmodule.pri
-            reinplace &quot;/^#endif.*$/d&quot;  ${destroot}${qt_mkspecs_dir}/qmodule.pri
-        }
-
-        # The file ${prefix}/share/qt5/mkspecs/qconfig.pri is still not properly merged
-        # The solution is ???.
-    }
-
-    post-destroot {
-        # see #44204
-        foreach f [glob -nocomplain -tails -directory ${destroot}${qt_libs_dir} *.framework] {
-            set framework [file rootname ${f}]
-
-            set include_list   [split ${qt_includes_dir}   '/']
-            set framework_list [split ${qt_libs_dir} '/']
-
-            while {[llength ${include_list}] &amp;&amp; [llength ${framework_list}]} {
-                set var_include   [lindex $include_list   0]
-                set var_framework [lindex $framework_list 0]
-
-                if { ${var_include} ne ${var_framework} } {
-                    break
-                }
-
-                # remove first element from list
-                set include_list   [lreplace ${include_list} 0 0]
-                set framework_list [lreplace ${framework_list} 0 0]
-            }
-
-            ln -s [string repeat ../ [llength ${include_list}]][join ${framework_list} /]/${f}/Headers ${destroot}${qt_includes_dir}/${framework}
-        }
-    }
-
-    variant tests description {Enable tests} {
-        configure.args-replace {-nomake tests} {-make tests}
-    }
-
-    variant examples description {Build examples} {
-        configure.args-replace {-nomake examples} {-make examples}
-    }
-
-    variant debug description {Build both release and debug library} {
-        configure.args-replace -release -debug-and-release
-    }
-
-    variant pulseaudio description {Compile PulseAudio support} {
-        depends_lib-append port:pulseaudio
-        configure.args-replace -no-pulseaudio -pulseaudio
-    }
</del><ins>+    replaced_by     qt5
+} elseif { ${subport} eq &quot;${name}-docs&quot;  } {
+    replaced_by     qt5-docs
+} elseif { ${subport} eq &quot;${name}-sqlite3-plugin&quot;  } {
+    replaced_by     qt5-sqlite-plugin
+} elseif { ${subport} eq &quot;${name}-psql84-plugin&quot;  } {
+    replaced_by     qt5-psql-plugin
+} elseif { ${subport} eq &quot;${name}-mysql56-plugin&quot;  } {
+    replaced_by     qt5-mysql-plugin
</ins><span class="cx"> }
</span><ins>+PortGroup           obsolete 1.0
</ins><span class="cx"> 
</span><del>-subport ${name}-docs {
-    depends_lib-append \
-        path:${qt_bins_dir}/qdoc:${name} \
-        path:${qt_plugins_dir}/sqldrivers/libqsqlite.dylib:${name}-sqlite3-plugin
-
-    supported_archs   noarch
-
-    build.target      docs
-    destroot.target   install_docs
-
-    post-extract {
-        # For the most part, generated makefiles use ${prefix}/bin/qdoc.
-        ln -s ${qt_bins_dir}/qdoc ${worksrcpath}/qtbase/bin
-
-        # Similarly, location of qhelpgenerator is expected in ${worksrcpath}
-        xinstall -d -m 755 ${worksrcpath}/qttools/bin/
-        ln -s ${qt_bins_dir}/qhelpgenerator ${worksrcpath}/qttools/bin/
-
-        # Without this file, the makefile ${worksrcpath}/qtwebkit/Source/WebCore/Makefile.WebCore.Target
-        #    keeps generating itself over and over again.
-        # This file is only created when the library is being built, however.
-        xinstall -d -m 755 ${worksrcpath}/qtwebkit/Source/WebCore/generated
-        touch ${worksrcpath}/qtwebkit/Source/WebCore/generated/InspectorBackendCommands.qrc
-    }
-}
-
-# See http://doc.qt.io/qt-5/sql-driver.html for info on building SQL Database Drivers
-
-subport ${name}-sqlite3-plugin {
-    PortGroup           qmake5 1.0
-
-    depends_lib-append port:sqlite3
-
-    # for single architecture, easier to use
-    #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/sqlite,
-    #    but doesn't work for universal build
-    configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/sqlite
-    build.dir     ${configure.dir}
-    destroot.dir  ${configure.dir}
-
-    configure.args-append &quot;INCLUDEPATH+=${prefix}/include&quot; &quot;LIBS+=\&quot;-L${prefix}/lib -lsqlite3\&quot;&quot;
-}
-
-subport ${name}-psql84-plugin {
-    PortGroup           qmake5 1.0
-
-    depends_lib-append port:postgresql84
-
-    # for single architecture, easier to use
-    #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/psql,
-    #    but doesn't work for universal build
-    configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/psql
-    build.dir     ${configure.dir}
-    destroot.dir  ${configure.dir}
-
-    configure.args-append &quot;INCLUDEPATH+=${prefix}/include/postgresql84&quot; &quot;LIBS+=\&quot;-L${prefix}/lib/postgresql84 -lpq\&quot;&quot;
-}
-
-subport ${name}-mysql56-plugin {
-    PortGroup           qmake5 1.0
-
-    depends_lib-append port:mysql56
-
-    # for single architecture, easier to use
-    #    worksrcdir ${worksrcdir}/qtbase/src/plugins/sqldrivers/mysql,
-    #    but doesn't work for universal build
-    configure.dir ${worksrcpath}/qtbase/src/plugins/sqldrivers/mysql
-    build.dir     ${configure.dir}
-    destroot.dir  ${configure.dir}
-
-    configure.args-append &quot;INCLUDEPATH+=${prefix}/include/mysql56/mysql&quot; &quot;LIBS+=\&quot;-L${prefix}/lib/mysql56/mysql -lmysqlclient_r\&quot;&quot;
-}
-
-livecheck.type      regex
-livecheck.url       http://download.qt.io/archive/qt/${branch}/
-livecheck.regex     (\\d+(\\.\\d+)+)
</del><ins>+subport ${name}-docs { }
+subport ${name}-sqlite3-plugin { }
+subport ${name}-psql84-plugin { }
+subport ${name}-mysql56-plugin { }
</ins></span></pre>
</div>
</div>

</body>
</html>