$NetBSD: patch-tools_clang_tools_scan-build_scan-build,v 1.1 2014/10/01 09:41:02 wiz Exp $ Adapt paths for pkgsrc installation. --- tools/clang/tools/scan-build/scan-build.orig 2014-07-17 08:40:35.000000000 +0000 +++ tools/clang/tools/scan-build/scan-build @@ -437,7 +437,7 @@ sub CopyFiles { my $Dir = shift; - my $JS = Cwd::realpath("$RealBin/sorttable.js"); + my $JS = Cwd::realpath("$RealBin/../share/llvm/static-analyzer/sorttable.js"); DieDiag("Cannot find 'sorttable.js'.\n") if (! -r $JS); @@ -447,7 +447,7 @@ sub CopyFiles { DieDiag("Could not copy 'sorttable.js' to '$Dir'.\n") if (! -r "$Dir/sorttable.js"); - my $CSS = Cwd::realpath("$RealBin/scanview.css"); + my $CSS = Cwd::realpath("$RealBin/../share/llvm/static-analyzer/scanview.css"); DieDiag("Cannot find 'scanview.css'.\n") if (! -r $CSS); @@ -1657,8 +1657,8 @@ $HtmlDir = GetHTMLRunDir($HtmlDir); # Determine the location of ccc-analyzer. my $AbsRealBin = Cwd::realpath($RealBin); -my $Cmd = "$AbsRealBin/libexec/ccc-analyzer"; -my $CmdCXX = "$AbsRealBin/libexec/c++-analyzer"; +my $Cmd = "$AbsRealBin/../libexec/ccc-analyzer"; +my $CmdCXX = "$AbsRealBin/../libexec/c++-analyzer"; # Portability: use less strict but portable check -e (file exists) instead of # non-portable -x (file is executable). On some windows ports -x just checks @@ -1726,7 +1726,7 @@ if (defined $OutputFormat) { if ($ViewResults and -r "$HtmlDir/index.html") { Diag "Analysis run complete.\n"; Diag "Viewing analysis results in '$HtmlDir' using scan-view.\n"; - my $ScanView = Cwd::realpath("$RealBin/scan-view"); + my $ScanView = Cwd::realpath("$RealBin/../share/llvm/static-analyzer/scan-view"); if (! -x $ScanView) { $ScanView = "scan-view"; } exec $ScanView, "$HtmlDir"; }