svn commit: r452160 - in head/devel/llvm40: . files
Brooks Davis
brooks at FreeBSD.org
Sun Oct 15 18:26:21 UTC 2017
Author: brooks
Date: Sun Oct 15 18:26:19 2017
New Revision: 452160
URL: https://svnweb.freebsd.org/changeset/ports/452160
Log:
Fix hardcoded version in clang-format. [0]
Run ccache-update-links on install and deinstall. [1]
PR: 220995 [0], 217572 [1]
Added:
head/devel/llvm40/files/clang-patch-tools_clang_tools_clang-format_clang-format-sublime.py
- copied unchanged from r451914, head/devel/llvm50/files/clang-patch-tools_clang_tools_clang-format_clang-format-sublime.py
head/devel/llvm40/files/clang-patch-tools_clang_tools_clang-format_git-clang-format
- copied unchanged from r451914, head/devel/llvm50/files/clang-patch-tools_clang_tools_clang-format_git-clang-format
Modified:
head/devel/llvm40/Makefile
head/devel/llvm40/files/clang-patch-tools_clang_tools_clang-format_clang-format.py
head/devel/llvm40/pkg-plist
Modified: head/devel/llvm40/Makefile
==============================================================================
--- head/devel/llvm40/Makefile Sun Oct 15 18:13:36 2017 (r452159)
+++ head/devel/llvm40/Makefile Sun Oct 15 18:26:19 2017 (r452160)
@@ -2,7 +2,7 @@
PORTNAME= llvm
DISTVERSION= 4.0.1
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR}
PKGNAMESUFFIX= ${LLVM_SUFFIX}
@@ -61,6 +61,8 @@ CLANG_EXTRA_PATCHES= \
${PATCHDIR}/clang-patch-fopenmp.diff \
${PATCHDIR}/clang-patch-tools_clang_lib_Headers_CMakeLists.txt \
${PATCHDIR}/clang-patch-tools_clang_tools_clang-format_clang-format.py \
+ ${PATCHDIR}/clang-patch-tools_clang_tools_clang-format_clang-format-sublime.py \
+ ${PATCHDIR}/clang-patch-tools_clang_tools_clang-format_git-clang-format \
${PATCHDIR}/clang-patch-tools_clang_tools_scan-build_libexec_ccc-analyzer
CLANG_CONFLICTS_INSTALL= clang-devel-3.[1234567]*
CLANG_DISTFILES= cfe-${DISTVERSION}.src${EXTRACT_SUFX}
@@ -361,6 +363,10 @@ post-patch:
post-patch-CLANG-on:
${REINPLACE_CMD} -e 's|%%LLVM_PREFIX%%|${LLVM_PREFIX}|' \
${PATCH_WRKSRC}/tools/clang/lib/Driver/Tools.cpp
+ ${REINPLACE_CMD} -e 's|%%LLVM_SUFFIX%%|${LLVM_SUFFIX}|' \
+ ${PATCH_WRKSRC}/tools/clang/tools/clang-format/clang-format.py \
+ ${PATCH_WRKSRC}/tools/clang/tools/clang-format/clang-format-sublime.py \
+ ${PATCH_WRKSRC}/tools/clang/tools/clang-format/git-clang-format
post-patch-COMPILER_RT-on:
cd ${WRKSRC_compiler_rt} && patch < ${PATCHDIR}/compiler-rt-patch-canonical-syscalls
@@ -491,6 +497,8 @@ build-plist:
if ($$0 ~ /lib.*omp/) {printf "%%%%OPENMP%%%%"} \
if ($$0 ~ /LLVMgold/) {printf "%%%%GOLD%%%%"} \
if ($$0 !~ /libclang_rt/) {print}}' ${PLIST}.tmp >> ${PLIST}
+ ${ECHO_CMD} '@postexec if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi' >> ${PLIST}
+ ${ECHO_CMD} '@postunexec if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi' >> ${PLIST}
${RM} ${PLIST}.tmp
check-commands:
Copied: head/devel/llvm40/files/clang-patch-tools_clang_tools_clang-format_clang-format-sublime.py (from r451914, head/devel/llvm50/files/clang-patch-tools_clang_tools_clang-format_clang-format-sublime.py)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/llvm40/files/clang-patch-tools_clang_tools_clang-format_clang-format-sublime.py Sun Oct 15 18:26:19 2017 (r452160, copy of r451914, head/devel/llvm50/files/clang-patch-tools_clang_tools_clang-format_clang-format-sublime.py)
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- tools/clang/tools/clang-format/clang-format-sublime.py.orig
++++ tools/clang/tools/clang-format/clang-format-sublime.py
+@@ -18,7 +18,7 @@
+ import subprocess
+
+ # Change this to the full path if clang-format is not on the path.
+-binary = 'clang-format'
++binary = 'clang-format%%LLVM_SUFFIX%%'
+
+ # 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
Modified: head/devel/llvm40/files/clang-patch-tools_clang_tools_clang-format_clang-format.py
==============================================================================
--- head/devel/llvm40/files/clang-patch-tools_clang_tools_clang-format_clang-format.py Sun Oct 15 18:13:36 2017 (r452159)
+++ head/devel/llvm40/files/clang-patch-tools_clang_tools_clang-format_clang-format.py Sun Oct 15 18:26:19 2017 (r452160)
@@ -5,7 +5,7 @@
# set g:clang_format_path to the path to clang-format if it is not on the path
# Change this to the full path if clang-format is not on the path.
-binary = 'clang-format'
-+binary = 'clang-format39'
++binary = 'clang-format%%LLVM_SUFFIX%%'
if vim.eval('exists("g:clang_format_path")') == "1":
binary = vim.eval('g:clang_format_path')
Copied: head/devel/llvm40/files/clang-patch-tools_clang_tools_clang-format_git-clang-format (from r451914, head/devel/llvm50/files/clang-patch-tools_clang_tools_clang-format_git-clang-format)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/llvm40/files/clang-patch-tools_clang_tools_clang-format_git-clang-format Sun Oct 15 18:26:19 2017 (r452160, copy of r451914, head/devel/llvm50/files/clang-patch-tools_clang_tools_clang-format_git-clang-format)
@@ -0,0 +1,32 @@
+
+$FreeBSD$
+
+--- tools/clang/tools/clang-format/git-clang-format.orig
++++ tools/clang/tools/clang-format/git-clang-format
+@@ -90,7 +90,7 @@
+ usage=usage, formatter_class=argparse.RawDescriptionHelpFormatter,
+ description=desc)
+ p.add_argument('--binary',
+- default=config.get('clangformat.binary', 'clang-format'),
++ default=config.get('clangformat.binary', 'clang-format%%LLVM_SUFFIX%%'),
+ help='path to clang-format'),
+ p.add_argument('--commit',
+ default=config.get('clangformat.commit', 'HEAD'),
+@@ -344,7 +344,7 @@
+
+
+ def run_clang_format_and_save_to_tree(changed_lines, revision=None,
+- binary='clang-format', style=None):
++ binary='clang-format%%LLVM_SUFFIX%%', style=None):
+ """Run clang-format on each file and save the result to a git tree.
+
+ Returns the object ID (SHA-1) of the created tree."""
+@@ -397,7 +397,7 @@
+
+
+ def clang_format_to_blob(filename, line_ranges, revision=None,
+- binary='clang-format', style=None):
++ binary='clang-format%%LLVM_SUFFIX%%', style=None):
+ """Run clang-format on the given file and save the result to a git blob.
+
+ Runs on the file in `revision` if not None, or on the file in the working
Modified: head/devel/llvm40/pkg-plist
==============================================================================
--- head/devel/llvm40/pkg-plist Sun Oct 15 18:13:36 2017 (r452159)
+++ head/devel/llvm40/pkg-plist Sun Oct 15 18:26:19 2017 (r452160)
@@ -2636,3 +2636,5 @@ llvm%%LLVM_LIB_VER%%/lib/libLTO.so.4
%%LIT%%%%PYTHON_SITELIBDIR%%/lit%%LLVM_SUFFIX%%/main.py
%%LIT%%%%PYTHON_SITELIBDIR%%/lit%%LLVM_SUFFIX%%/run.py
%%LIT%%%%PYTHON_SITELIBDIR%%/lit%%LLVM_SUFFIX%%/util.py
+ at postexec if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi
+ at postunexec if type ccache-update-links >/dev/null 2>&1; then ccache-update-links -v; fi
More information about the svn-ports-head
mailing list