From 54709712b29ce458e99d54922f31769843271e3b 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/1008] MacPorts Only: Prepare clang-format for replacement
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
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 | 3 +--
tools/clang-format/clang-format.py | 2 +-
5 files changed, 5 insertions(+), 6 deletions(-)
diff --git llvm_master/tools/clang/tools/clang-format/clang-format-bbedit.applescript macports_master/tools/clang/tools/clang-format/clang-format-bbedit.applescript
index fa88fe9004..eb09448be5 100644
--- llvm_master/tools/clang/tools/clang-format/clang-format-bbedit.applescript
+++ macports_master/tools/clang/tools/clang-format/clang-format-bbedit.applescript
@@ -15,7 +15,7 @@ tell application "BBEdit"
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_master/tools/clang/tools/clang-format/clang-format-diff.py macports_master/tools/clang/tools/clang-format/clang-format-diff.py
index ffa30e70dd..a624ad256f 100755
--- llvm_master/tools/clang/tools/clang-format/clang-format-diff.py
+++ macports_master/tools/clang/tools/clang-format/clang-format-diff.py
@@ -55,7 +55,7 @@ def main():
parser.add_argument('-style',
help='formatting style to apply (LLVM, Google, Chromium, '
- parser.add_argument('-binary', default='clang-format',
+ parser.add_argument('-binary', default='@CLANG_FORMAT_PATH@',
help='location of binary to use for clang-format')
args = parser.parse_args()
diff --git llvm_master/tools/clang/tools/clang-format/clang-format-sublime.py macports_master/tools/clang/tools/clang-format/clang-format-sublime.py
index 16ff56e502..4b68104a28 100644
--- llvm_master/tools/clang/tools/clang-format/clang-format-sublime.py
+++ macports_master/tools/clang/tools/clang-format/clang-format-sublime.py
@@ -18,7 +18,7 @@ import sublime_plugin
# Change this to the full path if clang-format is not on the path.
+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_master/tools/clang/tools/clang-format/clang-format.el macports_master/tools/clang/tools/clang-format/clang-format.el
index aa9c3ff4ca..f661969e3c 100644
--- llvm_master/tools/clang/tools/clang-format/clang-format.el
+++ macports_master/tools/clang/tools/clang-format/clang-format.el
(defcustom clang-format-executable
- (or (executable-find "clang-format")