<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/8c58a5efb361d8b95dc38834e38619677b30b224">https://github.com/macports/macports-ports/commit/8c58a5efb361d8b95dc38834e38619677b30b224</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 8c58a5efb361d8b95dc38834e38619677b30b224
</span>Author: Marcus Calhoun-Lopez <mcalhoun@macports.org>
AuthorDate: Tue Dec 27 10:26:18 2016 -0700
<span style='display:block; white-space:pre;color:#404040;'> qt5*-qtbase: respect configure.compiler
</span>---
aqua/qt5/Portfile | 29 +++++++++++++++++++++++++++++
aqua/qt5/files/patch-mkspecs_compiler.diff | 13 +++++++++++++
aqua/qt55/Portfile | 29 +++++++++++++++++++++++++++++
aqua/qt55/files/patch-mkspecs_compiler.diff | 13 +++++++++++++
4 files changed, 84 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/aqua/qt5/Portfile b/aqua/qt5/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index d7b9395..4197b89 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/aqua/qt5/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/aqua/qt5/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -613,6 +613,35 @@ foreach {module module_info} [array get modules] {
</span> copy ${worksrcpath}/mkspecs ${worksrcpath}/mkspecs-save
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # use compiler specified by configure.compiler
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${configure.compiler} ne "clang" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-mkspecs_compiler.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "s|__MACPORTS_CC__|${configure.cc}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/mkspecs/common/clang.conf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "s|__MACPORTS_CXX__|${configure.cxx}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/mkspecs/common/clang.conf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [string match macports-clang-* ${configure.compiler}] && [vercmp ${xcodeversion} "7.0"] >= 0 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # non-Xcode clang does not seem to be able to understand tbd files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # for an explanation of tbd files, see
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # http://stackoverflow.com/questions/31450690/why-xcode-7-shows-tbd-instead-of-dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # see https://trac.macports.org/ticket/53151
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-fetch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "This configuration is known to fail"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "See https://trac.macports.org/ticket/53151"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "As a workaround, do not set configure.compiler manually"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error "incompatible configuration"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # change default compiler flags for the purpose of building qtbase
patchfiles-append patch-mkspecs.diff
post-patch {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/aqua/qt5/files/patch-mkspecs_compiler.diff b/aqua/qt5/files/patch-mkspecs_compiler.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..b6a99ee
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/aqua/qt5/files/patch-mkspecs_compiler.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- mkspecs/common/clang.conf.orig 2016-12-01 01:17:04.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ mkspecs/common/clang.conf 2016-12-26 05:05:56.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4,8 +4,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QMAKE_COMPILER = gcc clang llvm # clang pretends to be gcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-QMAKE_CC = clang
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-QMAKE_CXX = clang++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++QMAKE_CC = __MACPORTS_CC__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++QMAKE_CXX = __MACPORTS_CXX__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QMAKE_LINK_C = $$QMAKE_CC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QMAKE_LINK_C_SHLIB = $$QMAKE_CC
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/aqua/qt55/Portfile b/aqua/qt55/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index a221faa..023e104 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/aqua/qt55/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/aqua/qt55/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -609,6 +609,35 @@ foreach {module module_info} [array get modules] {
</span> copy ${worksrcpath}/mkspecs ${worksrcpath}/mkspecs-save
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # use compiler specified by configure.compiler
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${configure.compiler} ne "clang" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append patch-mkspecs_compiler.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-patch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "s|__MACPORTS_CC__|${configure.cc}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/mkspecs/common/clang.conf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "s|__MACPORTS_CXX__|${configure.cxx}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/mkspecs/common/clang.conf
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [string match macports-clang-* ${configure.compiler}] && [vercmp ${xcodeversion} "7.0"] >= 0 } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # non-Xcode clang does not seem to be able to understand tbd files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # for an explanation of tbd files, see
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # http://stackoverflow.com/questions/31450690/why-xcode-7-shows-tbd-instead-of-dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # see https://trac.macports.org/ticket/53151
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-fetch {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "This configuration is known to fail"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "See https://trac.macports.org/ticket/53151"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "As a workaround, do not set configure.compiler manually"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return -code error "incompatible configuration"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # change default compiler flags for the purpose of building qtbase
patchfiles-append patch-mkspecs.diff
post-patch {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/aqua/qt55/files/patch-mkspecs_compiler.diff b/aqua/qt55/files/patch-mkspecs_compiler.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..b6a99ee
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/aqua/qt55/files/patch-mkspecs_compiler.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- mkspecs/common/clang.conf.orig 2016-12-01 01:17:04.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ mkspecs/common/clang.conf 2016-12-26 05:05:56.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4,8 +4,8 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QMAKE_COMPILER = gcc clang llvm # clang pretends to be gcc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-QMAKE_CC = clang
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-QMAKE_CXX = clang++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++QMAKE_CC = __MACPORTS_CC__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++QMAKE_CXX = __MACPORTS_CXX__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QMAKE_LINK_C = $$QMAKE_CC
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ QMAKE_LINK_C_SHLIB = $$QMAKE_CC
</span></pre><pre style='margin:0'>
</pre>