<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.

</pre>
<p><a href="https://github.com/macports/macports-ports/commit/8072db1cdfa91602ff50feb840ae1cceb9799e23">https://github.com/macports/macports-ports/commit/8072db1cdfa91602ff50feb840ae1cceb9799e23</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 8072db1cdfa91602ff50feb840ae1cceb9799e23
</span>Author: Ken Cunningham <kencu@macports.org>
AuthorDate: Tue Apr 21 21:05:11 2020 -0700

<span style='display:block; white-space:pre;color:#404040;'>    llvm-10: use the system python2.7 if present
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    LLVM requires python 2.7, but the system installation
</span><span style='display:block; white-space:pre;color:#404040;'>    is sufficient for it's needs. No need to require
</span><span style='display:block; white-space:pre;color:#404040;'>    python27 be installed on every system for this.
</span>---
 lang/llvm-10/Portfile | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-10/Portfile b/lang/llvm-10/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 7910c8d..4832a24 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/llvm-10/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/llvm-10/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -51,7 +51,7 @@ if {${subport} eq "llvm-${llvm_version}"} {
</span>                         that can be built using the Clang frontend as a \
                         library to parse C/C++ code.
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    depends_lib         port:libxml2 port:libomp port:llvm-${llvm_version} port:python27
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    depends_lib         port:libxml2 port:libomp port:llvm-${llvm_version}
</span>     depends_run         port:clang_select port:ld64
     depends_skip_archcheck-append ld64 subversion
 
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -75,8 +75,7 @@ if {${subport} eq "llvm-${llvm_version}"} {
</span>     description         the LLVM debugger
     long_description    Lldb is the "LLVM native" debugger.
 
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    depends_lib         port:libxml2 port:libomp port:llvm-${llvm_version} port:python27 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-                        port:ncurses
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    depends_lib         port:libxml2 port:libomp port:llvm-${llvm_version} port:ncurses
</span>     depends_build-append port:swig-python port:doxygen
 
     # Clang doesn't actually use any of these, but the LLVM makefile
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -317,9 +316,7 @@ if {${subport} eq "llvm-${llvm_version}"} {
</span>         -DCLANG_ENABLE_STATIC_ANALYZER=OFF \
         -DLLVM_BUILD_RUNTIME=ON \
         -DLIBCXX_ENABLE_SHARED=OFF \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        -DLIBCXX_INSTALL_LIBRARY=OFF \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        -DPYTHON_EXECUTABLE=${prefix}/bin/python2.7 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        -DPYTHON_INCLUDE_DIR=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        -DLIBCXX_INSTALL_LIBRARY=OFF
</span> }
 
 # llvm-3.5 and later requires a C++11 runtime
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -370,11 +367,18 @@ if {[lsearch -exact $PortInfo(depends_build) port:cctools] != -1} {
</span> 
 
 platform darwin {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    # requires a newer python than the system default
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-    if {${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-        depends_build-append port:python27
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    # use the system python27 at present
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    if {[file exists /usr/bin/python2.7]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set pythonfullpath /usr/bin/python2.7
</span>         configure.args-append \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-            -DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/python2.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python2.7 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            -DPYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        set pythonfullpath ${prefix}/bin/python2.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        depends_lib-append   port:python27
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            -DPYTHON_EXECUTABLE:FILEPATH=${prefix}/bin/python2.7 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            -DPYTHON_INCLUDE_DIR=${prefix}/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
</span>     }
 }
 
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -591,7 +595,9 @@ if {${subport} eq "llvm-${llvm_version}"} {
</span>                 ${worksrcpath}/tools/clang/tools/scan-build/libexec/ccc-analyzer \
                 ${worksrcpath}/tools/clang/tools/scan-build/libexec/c++-analyzer \
                 ${worksrcpath}/tools/clang/tools/scan-build/bin/scan-build
<span style='display:block; white-space:pre;background:#ffe0e0;'>-            reinplace "s|/usr/bin/env python|${prefix}/bin/python2.7|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            # pythonfullpath is set above, depending on presence of system python2.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+            reinplace "s|/usr/bin/env python|${pythonfullpath}|g" \
</span>                 ${worksrcpath}/tools/clang/tools/scan-build/bin/set-xcode-analyzer \
                 ${worksrcpath}/tools/clang/tools/scan-view/bin/scan-view
         }
</pre><pre style='margin:0'>

</pre>