From 47d961284ee5012426d7ed9aa694c5092ec77d09 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Sat, 17 Jan 2015 17:50:24 -0800
Subject: [PATCH 1001/1012] MacPorts Only: Prepare clang-format for replacement
 with absolute path

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit d95bdf342037ee815fa21e871dd9479bc3572550)

Conflicts:
	tools/clang-format/clang-format.el
	tools/clang-format/clang-format.py

(cherry picked from commit be249dfc99009e07f65c01463ac62d9592aa00d7)
---
 tools/clang-format/clang-format-bbedit.applescript | 2 +-
 tools/clang-format/clang-format-diff.py            | 2 +-
 tools/clang-format/clang-format-sublime.py         | 2 +-
 tools/clang-format/clang-format.el                 | 2 +-
 tools/clang-format/clang-format.py                 | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git llvm_release_34/tools/clang/tools/clang-format/clang-format-bbedit.applescript macports_release_34/tools/clang/tools/clang-format/clang-format-bbedit.applescript
index fa88fe9..eb09448 100644
--- llvm_release_34/tools/clang/tools/clang-format/clang-format-bbedit.applescript
+++ macports_release_34/tools/clang/tools/clang-format/clang-format-bbedit.applescript
@@ -15,7 +15,7 @@ tell application "BBEdit"
 end tell
 
 set filePath to urlToPOSIXPath(fileURL)
-set newContents to do shell script "/path/to/clang-format -offset=" & selectionOffset & " -length=" & selectionLength & " " & quoted form of filePath
+set newContents to do shell script "@CLANG_FORMAT_PATH@ -offset=" & selectionOffset & " -length=" & selectionLength & " " & quoted form of filePath
 
 tell application "BBEdit"
 	-- "set contents of text document 1 to newContents" scrolls to the bottom while
diff --git llvm_release_34/tools/clang/tools/clang-format/clang-format-diff.py macports_release_34/tools/clang/tools/clang-format/clang-format-diff.py
index 60b8fb7..0a70143 100755
--- llvm_release_34/tools/clang/tools/clang-format/clang-format-diff.py
+++ macports_release_34/tools/clang/tools/clang-format/clang-format-diff.py
@@ -31,7 +31,7 @@ import sys
 
 
 # Change this to the full path if clang-format is not on the path.
-binary = 'clang-format'
+binary = '@CLANG_FORMAT_PATH@'
 
 
 def main():
diff --git llvm_release_34/tools/clang/tools/clang-format/clang-format-sublime.py macports_release_34/tools/clang/tools/clang-format/clang-format-sublime.py
index 16ff56e..4b68104 100644
--- llvm_release_34/tools/clang/tools/clang-format/clang-format-sublime.py
+++ macports_release_34/tools/clang/tools/clang-format/clang-format-sublime.py
@@ -18,7 +18,7 @@ import sublime_plugin
 import subprocess
 
 # Change this to the full path if clang-format is not on the path.
-binary = 'clang-format'
+binary = '@CLANG_FORMAT_PATH@'
 
 # Change this to format according to other formatting styles. See the output of
 # 'clang-format --help' for a list of supported styles. The default looks for
diff --git llvm_release_34/tools/clang/tools/clang-format/clang-format.el macports_release_34/tools/clang/tools/clang-format/clang-format.el
index 520a3e2..f63731b 100644
--- llvm_release_34/tools/clang/tools/clang-format/clang-format.el
+++ macports_release_34/tools/clang/tools/clang-format/clang-format.el
@@ -13,7 +13,7 @@
 
 ;; *Location of the clang-format binary. If it is on your PATH, a full path name
 ;; need not be specified.
-(defvar clang-format-binary "clang-format")
+(defvar clang-format-binary "@CLANG_FORMAT_PATH@")
 
 (defun clang-format-region ()
   "Use clang-format to format the currently active region."
diff --git llvm_release_34/tools/clang/tools/clang-format/clang-format.py macports_release_34/tools/clang/tools/clang-format/clang-format.py
index f5a5756..666ab46 100644
--- llvm_release_34/tools/clang/tools/clang-format/clang-format.py
+++ macports_release_34/tools/clang/tools/clang-format/clang-format.py
@@ -24,7 +24,7 @@ import sys
 import vim
 
 # Change this to the full path if clang-format is not on the path.
-binary = 'clang-format'
+binary = '@CLANG_FORMAT_PATH@'
 
 # Change this to format according to other formatting styles. See the output of
 # 'clang-format --help' for a list of supported styles. The default looks for
-- 
2.10.1

