<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/030723c68ed0bd359f75cfa51308b5b4b41545ee">https://github.com/macports/macports-ports/commit/030723c68ed0bd359f75cfa51308b5b4b41545ee</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 030723c68ed0bd359f75cfa51308b5b4b41545ee
</span>Author: Ken Cunningham <kencu@macports.org>
AuthorDate: Thu Jun 3 12:52:59 2021 -0700
<span style='display:block; white-space:pre;color:#404040;'> clang-12: manipulate bins before generating wrappers
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> one of these manipulations needs to come before the
</span><span style='display:block; white-space:pre;color:#404040;'> wrappers are made, the rest come after as they
</span><span style='display:block; white-space:pre;color:#404040;'> shouldn't have wrappers.
</span>---
lang/llvm-12/Portfile | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/llvm-12/Portfile b/lang/llvm-12/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index eebb887da0b..991098541dd 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/llvm-12/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/llvm-12/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -301,6 +301,13 @@ if {${subport} eq "clang-${llvm_version}"} {
</span> }
post-destroot {
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${subport} eq "clang-${llvm_version}"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # remove the clang symlink and replace it with the actual binary
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ delete ${destroot}${sub_prefix}/bin/clang
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file rename ${destroot}${sub_prefix}/bin/clang-${llvm_version} ${destroot}${sub_prefix}/bin/clang
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # generate a versioned wrapper script for each file in the bin directory
foreach bin [glob ${destroot}${sub_prefix}/bin/*] {
set bin_filename [string map "${sub_prefix} ${prefix}" ${bin}]-${suffix}
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -322,14 +329,9 @@ post-destroot {
</span> }
if {${subport} eq "clang-${llvm_version}"} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # fix errant permissions on the flang binary
system "chmod 755 ${destroot}${sub_prefix}/bin/flang"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- # remove the clang symlink and replace it with the actual binary
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- delete ${destroot}${sub_prefix}/bin/clang
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- file rename ${destroot}${sub_prefix}/bin/clang-${llvm_version} ${destroot}${sub_prefix}/bin/clang
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span> # fix the cmake scripts to point to the versioned files
reinplace "s|/bin/clang-${llvm_version}|/bin/clang|g" \
"${destroot}${sub_prefix}/lib/cmake/clang/ClangTargets-release.cmake"
</pre><pre style='margin:0'>
</pre>