From c82070940ae61f18c9e7c8bf2e05d73ac8244ab1 Mon Sep 17 00:00:00 2001 From: FX Coudert Date: Sat, 16 Feb 2019 15:26:18 +0100 Subject: [PATCH] llvm@5: fix Perl escaping --- Formula/llvm@5.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Formula/llvm@5.rb b/Formula/llvm@5.rb index e08dd40191..418a038065 100644 --- a/Formula/llvm@5.rb +++ b/Formula/llvm@5.rb @@ -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"