<pre style='margin:0'>
Michael Dickens (michaelld) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/67619cf9071d4b6583cc8178dc02904a6c55c4b3">https://github.com/macports/macports-ports/commit/67619cf9071d4b6583cc8178dc02904a6c55c4b3</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 67619cf uhd*: tweaks for installing on using *libstdc++ on older OS X
</span>67619cf is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 67619cf9071d4b6583cc8178dc02904a6c55c4b3
</span>Author: Michael Dickens <michaelld@macports.org>
AuthorDate: Tue Jul 10 13:56:16 2018 -0400
<span style='display:block; white-space:pre;color:#404040;'> uhd*: tweaks for installing on using *libstdc++ on older OS X
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Use "_GLIBCXX_USE_C99_MATH_TR1" to get math functions into std:: . This setting in turn requires "-std=gnu++11" to build properly, so have to turn on C++11 GNU extensions.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Don't use C++11 GNU extensions when using libc++, since UHD builds fine without them and Clang doesn't really do anything when them anyway.
</span>---
science/uhd/Portfile | 37 ++++++++++++++++++++++++++++++++++---
1 file changed, 34 insertions(+), 3 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/science/uhd/Portfile b/science/uhd/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 1518bf8..3066a3a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/science/uhd/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/science/uhd/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -145,13 +145,44 @@ configure.args-append \
</span> configure.args-append \
-DCMAKE_MODULES_DIR=${prefix}/share/cmake
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# try to enable C++11 for older compilers too. for some reason cmake
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# doesn't recognize libstdc++ compilers as being c++11 capable, even
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# though some are. set this and hope for the best ...
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# on much older installs ...
</span>
if {${configure.cxx_stdlib} eq "macports-libstdc++" ||
${configure.cxx_stdlib} eq "libstdc++"} {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # for some reason cmake doesn't recognize libstdc++ compilers as
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # being c++11 capable, even though some are. set this and hope for
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # the best.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> configure.cxxflags-append -std=gnu++11
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # when using GCC on older OSX, certain math functions will not be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # part of std:: without this macro defined. This macro required
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # c++11 to be enabled, which is addressed in the next item.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cxxflags-append -D_GLIBCXX_USE_C99_MATH_TR1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # enable C/CXX standard extensions (e.g., "gnu++11" and "gnu11"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # instead of than "c++11" and "c11"). UHD itself does not require
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # these extensions, but when compiling with GCC on older OSX they
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # allow for various various math functions to be in std:: ... so,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # enable them.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_CXX_EXTENSIONS=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_C_EXTENSIONS=ON
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # disable C/CXX standard extensions (e.g., "gnu++11" and "gnu11"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # rather than "c++11" and "c11"). UHD itself does not require
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # these extensions, and when compiling with Clang they don't
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # really do anything anyway; so, just disable them.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_CXX_EXTENSIONS=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_C_EXTENSIONS=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> }
# per user concensus: enable all variants except +debug and +universal
</pre><pre style='margin:0'>
</pre>