Ticket #55630: clang-cmake-module.diff

File clang-cmake-module.diff, 2.9 KB (added by RJVB (René Bertin), 7 years ago)
  • lang/llvm-4.0/Portfile

    diff --git a/lang/llvm-4.0/Portfile b/lang/llvm-4.0/Portfile
    index 6354d48..6c5b7f7 100644
    a b set clang_executable_version 4.0 
    1313set lldb_executable_version 4.0.1
    1414name                    llvm-${llvm_version}
    1515revision                2
    16 subport                 clang-${llvm_version} { revision 4 }
     16subport                 clang-${llvm_version} { revision 5 }
    1717subport                 lldb-${llvm_version} {}
    1818set suffix              mp-${llvm_version}
    1919set sub_prefix          ${prefix}/libexec/llvm-${llvm_version}
    if {${subport} eq "clang-${llvm_version}"} { 
    443443
    444444        delete ${destroot}${sub_prefix}/bin/clang
    445445        file rename ${destroot}${sub_prefix}/bin/clang-${clang_executable_version} ${destroot}${sub_prefix}/bin/clang
     446        reinplace "s|/bin/clang-${clang_executable_version}|/bin/clang|g" \
     447            "${destroot}${sub_prefix}/lib/cmake/clang/ClangTargets-release.cmake"
    446448    }
    447449}
    448450
  • lang/llvm-5.0/Portfile

    diff --git a/lang/llvm-5.0/Portfile b/lang/llvm-5.0/Portfile
    index 6096457..4fe6324 100644
    a b set llvm_version_no_dot 50 
    1212set clang_executable_version 5.0
    1313set lldb_executable_version 5.0.1
    1414name                    llvm-${llvm_version}
    15 subport                 clang-${llvm_version} {}
     15subport                 clang-${llvm_version} { revision 1 }
    1616subport                 lldb-${llvm_version} {}
    1717set suffix              mp-${llvm_version}
    1818set sub_prefix          ${prefix}/libexec/llvm-${llvm_version}
    if {${subport} eq "clang-${llvm_version}"} { 
    453453
    454454        delete ${destroot}${sub_prefix}/bin/clang
    455455        file rename ${destroot}${sub_prefix}/bin/clang-${clang_executable_version} ${destroot}${sub_prefix}/bin/clang
     456        reinplace "s|/bin/clang-${clang_executable_version}|/bin/clang|g" \
     457            "${destroot}${sub_prefix}/lib/cmake/clang/ClangTargets-release.cmake"
    456458    }
    457459}
    458460
  • lang/llvm-devel/Portfile

    diff --git a/lang/llvm-devel/Portfile b/lang/llvm-devel/Portfile
    index 5207613..0832ca9 100644
    a b set llvm_version_no_dot devel 
    1212set clang_executable_version 6.0
    1313set lldb_executable_version 6.0.0
    1414name                    llvm-${llvm_version}
    15 subport                 clang-${llvm_version} {}
     15subport                 clang-${llvm_version} { revision 1 }
    1616subport                 lldb-${llvm_version} {}
    1717set suffix              mp-${llvm_version}
    1818set sub_prefix          ${prefix}/libexec/llvm-${llvm_version}
    if {${subport} eq "clang-${llvm_version}"} { 
    430430
    431431        delete ${destroot}${sub_prefix}/bin/clang
    432432        file rename ${destroot}${sub_prefix}/bin/clang-${clang_executable_version} ${destroot}${sub_prefix}/bin/clang
     433        reinplace "s|/bin/clang-${clang_executable_version}|/bin/clang|g" \
     434            "${destroot}${sub_prefix}/lib/cmake/clang/ClangTargets-release.cmake"
    433435    }
    434436}
    435437