llvm@5: fix Perl escaping

This commit is contained in:
FX Coudert 2019-02-16 15:26:18 +01:00
parent f45ccdf258
commit c82070940a

View file

@ -116,9 +116,13 @@ class LlvmAT5 < Formula
system "make", "install-xcode-toolchain"
end
(share/"clang/tools").install Dir["tools/clang/tools/scan-{build,view}"]
(share/"cmake").install "cmake/modules"
inreplace "#{share}/clang/tools/scan-build/bin/scan-build", "$RealBin/bin/clang", "#{bin}/clang"
(share/"clang/tools").install Dir["tools/clang/tools/scan-{build,view}"]
# scan-build is in Perl, so the @ in our path needs to be escaped
inreplace "#{share}/clang/tools/scan-build/bin/scan-build",
"$RealBin/bin/clang", "#{bin}/clang".gsub("@", "\\@")
bin.install_symlink share/"clang/tools/scan-build/bin/scan-build", share/"clang/tools/scan-view/bin/scan-view"
man1.install_symlink share/"clang/tools/scan-build/man/scan-build.1"