<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/b3dba978d4c1da840d2afa1f9c01c37423f0af18">https://github.com/macports/macports-ports/commit/b3dba978d4c1da840d2afa1f9c01c37423f0af18</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit b3dba978d4c1da840d2afa1f9c01c37423f0af18
</span>Author: Christopher Nielsen <mascguy@github.com>
AuthorDate: Fri May 7 12:30:44 2021 -0400
<span style='display:block; white-space:pre;color:#404040;'> mpiutil: new portgroup
</span>---
_resources/port1.0/group/mpiutil-1.0.tcl | 45 ++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/mpiutil-1.0.tcl b/_resources/port1.0/group/mpiutil-1.0.tcl
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..3a3d70d0f59
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/mpiutil-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,45 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</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;'>+# This PortGroup provides shared logic, and helpers, for our MPI ports.
</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;'>+proc mpiutil_add_compiler_depends_lib {cname} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cport_name ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # As we are making wrappers, we depend on the compilers to exist.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Add them to depends_lib, not just depends_build.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[regexp {clang[3-9]\d} ${cname}] == 1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Ports for Clang versions < 10 are named: clang-<major>.<minor>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cport_name [regsub {(\d)(\d)} ${cname} {-\1.\2}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {[regexp {clang\d\d} ${cname}] == 1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Ports for Clang version >= 10 are named: clang-<major><minor>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cport_name [regsub {(\d)(\d)} ${cname} {-\1\2}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } elseif {([regexp {gcc\d} ${cname}] == 1) || ([regexp {gcc\d\d} ${cname}] == 1)} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Ports for GCC have names exactly matching our subports, so use as-is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cport_name ${cname}
</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 {${cport_name} ne ""} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "mpiutil_add_compiler_depends_lib: Adding compiler to depends_lib: ${cport_name}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:${cport_name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "mpiutil_add_compiler_depends_lib: Not adding compiler to depends_lib; cname: ${cname}"
</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;'>+ return 0
</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;'>+proc mpiutil_set_binary_eligibility {subport cname} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[lsearch -exact {mp llvm clang} ${cname}] != -1} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Force local builds with Xcode-provided compilers (avoid issues with
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # different Xcode versions on buildbot and user machines)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "mpiutil_set_binary_eligibility: Disabling binary use for subport: ${subport}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ archive_sites
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_debug "mpiutil_set_binary_eligibility: Not disabling binary use for subport: ${subport}"
</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;'>+ return 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span></pre><pre style='margin:0'>
</pre>