<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/c357174b951b73a86390823bd391177ca118cc59">https://github.com/macports/macports-ports/commit/c357174b951b73a86390823bd391177ca118cc59</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit c357174b951b73a86390823bd391177ca118cc59
</span>Author: Ken Cunningham <kencu@macports.org>
AuthorDate: Sun Jun 27 17:54:29 2021 -0700
<span style='display:block; white-space:pre;color:#404040;'> llvm/clang-3.3: harmonize python usage
</span>---
lang/llvm-3.3/Portfile | 50 +++++++++++++++++++-------------------------------
1 file changed, 19 insertions(+), 31 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-3.3/Portfile b/lang/llvm-3.3/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index be677e860f7..a02620d03fb 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/llvm-3.3/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/llvm-3.3/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -122,22 +122,26 @@ configure.args --enable-bindings=none --enable-libffi --enable-shared -
</span> --enable-debug-symbols --disable-debug-runtime \
--prefix="${sub_prefix}" --disable-assertions
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if {${subport} eq "llvm-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- select.group llvm
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- select.file ${filespath}/mp-${subport}
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # Tiger also needs a newer python to build llvm
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${os.platform} eq "darwin" && ${os.major} < 9} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {${cxx_stdlib} eq "libc++"} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.cxx_stdlib libstdc++
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-append port:python27-bootstrap
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-append --with-python=${bootstrap_prefix}/bin/python2.7
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-append port:python27
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-append --with-python=${prefix}/bin/python2.7
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set pythonfullpath /usr/bin/python2.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# older systems need a newer python
</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;'>+ if {${cxx_stdlib} eq "libc++"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # force to libstdc++ so we can use default bootstrap compilers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.cxx_stdlib libstdc++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:python27-bootstrap
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set pythonfullpath ${bootstrap_prefix}/bin/python2.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:python27
</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;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append --with-python=${pythonfullpath}
</span>
<span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${subport} eq "llvm-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ select.group llvm
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ select.file ${filespath}/mp-${subport}
</span> } elseif {${subport} eq "clang-${llvm_version}"} {
select.group clang
select.file ${filespath}/mp-${subport}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -302,32 +306,16 @@ if {${subport} eq "llvm-${llvm_version}"} {
</span> default_variants-append +arm_runtime
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set pythonver ""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set pythonverdot ""
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- default_variants-append +python27
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- variant python27 description {Use python 2.7} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set pythonver 27
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set pythonverdot 2.7
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_build-append port:python27
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- configure.args-append --with-python=${prefix}/bin/python2.7
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> variant analyzer description {Install clang static analyzer} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[string equal "${pythonver}" ""]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_error "You must select a python variant to use the clang static analyzer (+analyzer)"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- error "Invalid variant combination"
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- depends_run-append port:perl5 port:python${pythonver}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_run-append port:perl5
</span>
post-patch {
reinplace "s|/usr/bin/env perl|${prefix}/bin/perl5|g" \
${worksrcpath}/tools/clang/tools/scan-build/ccc-analyzer \
${worksrcpath}/tools/clang/tools/scan-build/c++-analyzer \
${worksrcpath}/tools/clang/tools/scan-build/scan-build
<span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|/usr/bin/env python|${prefix}/bin/python${pythonverdot}|g" \
</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/set-xcode-analyzer \
${worksrcpath}/tools/clang/tools/scan-view/scan-view
}
</pre><pre style='margin:0'>
</pre>