<pre style='margin:0'>
MarcusCalhoun-Lopez pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/3e2480f5f73673145335c01f2833a292006e9474">https://github.com/macports/macports-ports/commit/3e2480f5f73673145335c01f2833a292006e9474</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 3e2480f5f73673145335c01f2833a292006e9474
</span>Author: Marcus Calhoun-Lopez <mcalhoun@macports.org>
AuthorDate: Sat Dec 31 10:58:54 2016 -0700

<span style='display:block; white-space:pre;color:#404040;'>    qmake5 PG: determine Qt version without qt5 PG
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Different version of Qt handle inclusion of C++11 flags differently.
</span><span style='display:block; white-space:pre;color:#404040;'>    Using pkg-config to determine Qt version works whether
</span><span style='display:block; white-space:pre;color:#404040;'>    qt5, qt56, or qt5-kde provides Qt.
</span>---
 _resources/port1.0/group/qmake5-1.0.tcl | 49 +++++++++++++++++++--------------
 1 file changed, 29 insertions(+), 20 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/qmake5-1.0.tcl b/_resources/port1.0/group/qmake5-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 294bd07..62d386f 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/qmake5-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/qmake5-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -120,29 +120,38 @@ if { ${configure.compiler} ne "clang" } {
</span>         QMAKE_CXX=${configure.cxx}
 }
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if { ${qt_name} eq "qt55" } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    # always use the same standard library
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    configure.args-append                                \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        QMAKE_CXXFLAGS+=-stdlib=${configure.cxx_stdlib}  \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        QMAKE_LFLAGS+=-stdlib=${configure.cxx_stdlib}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    # override C++ flags set in ${prefix}/libexec/qt5/mkspecs/common/clang-mac.conf
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    #    so value of ${configure.cxx_stdlib} can always be used
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    if { ${configure.cxx_stdlib} ne "libc++" } {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        configure.args-append                                      \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-            QMAKE_CXXFLAGS_CXX11-=-stdlib=libc++                   \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-            QMAKE_LFLAGS_CXX11-=-stdlib=libc++                     \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-            QMAKE_CXXFLAGS_CXX11+=-stdlib=${configure.cxx_stdlib}  \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-            QMAKE_LFLAGS_CXX11+=-stdlib=${configure.cxx_stdlib}
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-} else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    if { ${configure.cxx_stdlib} ne "libc++" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-configure {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    set qt_version [exec ${prefix}/bin/pkg-config --modversion Qt5Core]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    if { [vercmp ${qt_version} 5.6.0] >= 0 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        if { ${configure.cxx_stdlib} ne "libc++" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            # override C++ flags set in ${prefix}/libexec/qt5/mkspecs/common/clang-mac.conf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            #    so value of ${configure.cxx_stdlib} can always be used
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            configure.args-append                                \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                QMAKE_CXXFLAGS-=-stdlib=libc++                   \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                QMAKE_LFLAGS-=-stdlib=libc++                     \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                QMAKE_CXXFLAGS+=-stdlib=${configure.cxx_stdlib}  \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                QMAKE_LFLAGS+=-stdlib=${configure.cxx_stdlib}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    } elseif { [vercmp ${qt_version} 5.5.0] == 0 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        # always use the same standard library
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        configure.args-append                                \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            QMAKE_CXXFLAGS+=-stdlib=${configure.cxx_stdlib}  \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            QMAKE_LFLAGS+=-stdlib=${configure.cxx_stdlib}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span>         # override C++ flags set in ${prefix}/libexec/qt5/mkspecs/common/clang-mac.conf
         #    so value of ${configure.cxx_stdlib} can always be used
<span style='display:block; white-space:pre;background:#e0ffe0;'>+        if { ${configure.cxx_stdlib} ne "libc++" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            configure.args-append                                      \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                QMAKE_CXXFLAGS_CXX11-=-stdlib=libc++                   \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                QMAKE_LFLAGS_CXX11-=-stdlib=libc++                     \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                QMAKE_CXXFLAGS_CXX11+=-stdlib=${configure.cxx_stdlib}  \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                QMAKE_LFLAGS_CXX11+=-stdlib=${configure.cxx_stdlib}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        # always use the same standard library
</span>         configure.args-append                                \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-            QMAKE_CXXFLAGS-=-stdlib=libc++                   \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-            QMAKE_LFLAGS-=-stdlib=libc++                     \
</span>             QMAKE_CXXFLAGS+=-stdlib=${configure.cxx_stdlib}  \
             QMAKE_LFLAGS+=-stdlib=${configure.cxx_stdlib}
     }
</pre><pre style='margin:0'>

</pre>