<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/ee12379f28f944f85e0a7b3af0f2f53e52620c40">https://github.com/macports/macports-ports/commit/ee12379f28f944f85e0a7b3af0f2f53e52620c40</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit ee12379f28f944f85e0a7b3af0f2f53e52620c40
</span>Author: Fred Wright <fw@fwright.net>
AuthorDate: Tue Dec 31 18:00:49 2019 -0800

<span style='display:block; white-space:pre;color:#404040;'>    gpsd: Fix build failures on 10.6.
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    This tweaks the compiler selection when building for OSX <10.7.
</span><span style='display:block; white-space:pre;color:#404040;'>    See the comments in the Portfile for more details.
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Since this is only fixing build failures, there is no revbump.
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    TESTED:
</span><span style='display:block; white-space:pre;color:#404040;'>    Used "port test" and "port install" as the primary test, with the
</span><span style='display:block; white-space:pre;color:#404040;'>    default variants, all binary variants with the default python27, each
</span><span style='display:block; white-space:pre;color:#404040;'>    single binary variant with the default python27, and the xgps variant
</span><span style='display:block; white-space:pre;color:#404040;'>    (except on 10.5) with each non-default python.  Ran this on a
</span><span style='display:block; white-space:pre;color:#404040;'>    MacPro/10.9, a MacPro/10.14, a MacPro 10.15, a MacBook Pro/10.9, a
</span><span style='display:block; white-space:pre;color:#404040;'>    PowerBook G4/10.5, and VMs for all 10.5-10.13 versions.  This was all
</span><span style='display:block; white-space:pre;color:#404040;'>    done for both the normal and -devel ports.
</span>---
 net/gpsd/Portfile | 41 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/gpsd/Portfile b/net/gpsd/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 0c4fd2e..3d1e9b6 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/gpsd/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/gpsd/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -64,6 +64,7 @@ if {${subport} eq ${name}} {
</span> 
 # GPSD requires Python 2.6, 2.7, or 3.2+; don't use 2.6, 3.2, or
 # 3.3, since we're weaning MP off of them.
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Some programs currently have issues with Python 3.8, so omit that for now.
</span> 
 set pythons_suffixes {27 34 35 36 37}
 
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -103,9 +104,47 @@ return -code error "Invalid Python variant selection"
</span> 
 set pyver_dotted [join [split ${pyver_no_dot} ""] .]
 
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# KLUDGE: GPSD currently expects the Python extensions to build with the same
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# C compiler as was used to build Python itself.  This causes build failures
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# when the "Python C compiler" and the compiler chosen for GPSD have
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# configuration incompatibilities (or if the "Python C compiler" is absent).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Until this is fixed in GPSD upstream, some fiddling with compiler selection
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# is needed here.  This is especially kludgy since it requires knowledge of
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# how the Python port chooses the compiler.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# At the moment, the known failing case is when building with +python27
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# (the default) on 10.6, but here we just copy the condition from the python27
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Portfile.  However, unlike the latter, we don't include the clang_dependency
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# portgroup outside the conditional, since it's not known to be needed in such
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# cases, and its mere presence alters the compiler selection.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The upstream code will not have this fixed in the (imminent) new release.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[variant_isset python27]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # Code copied (approximately) from python27 Portfile
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    if {${os.platform} eq "darwin" && ${os.major} < 11 && ${cxx_stdlib} eq "libc++"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        PortGroup           clang_dependency 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        clang_dependency.extra_versions 3.7
</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;'>+# KLUDGE: Another problem is that the hack to avoid the daemon() deprecation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# warning causes clang-9.0++ to choke when targeting 10.6.  The relevant code
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# shouldn't really be built as C++ at all, but until that's fixed, we avoid
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# the problem by blacklisting clang-9.0 with +qt on OSX <10.7.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The upstream code will not have this fixed in the (imminent) new release.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {[variant_isset qt]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    if {${os.platform} eq "darwin" && ${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        compiler.blacklist-append macports-clang-9.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;'>+
</span> # NOTE:  All Python dependencies which are conceptually depends_run actually
 # need to be depends_lib, since the build procedure references them, usually
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# just to verify theire existence.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# just to verify their existence.
</span> 
 depends_lib-append      port:python${pyver_no_dot} \
                         port:py${pyver_no_dot}-serial
</pre><pre style='margin:0'>

</pre>