svn commit: r450176 - in head/devel/llvm50: . files
Brooks Davis
brooks at FreeBSD.org
Tue Sep 19 23:44:37 UTC 2017
Author: brooks
Date: Tue Sep 19 23:44:35 2017
New Revision: 450176
URL: https://svnweb.freebsd.org/changeset/ports/450176
Log:
Disable LLDB builds on 10.x as they don't link.
Attempt to correct default targets. [0]
Fix more references to clang-format50 and use a more future proof
patching approach. [1]
Build and install pp-trace with the EXTRAS target.
PR: 219779 [0], 220995 [1], 222380 [2]
Added:
head/devel/llvm50/files/clang-patch-tools_clang_tools_clang-format_clang-format-sublime.py (contents, props changed)
head/devel/llvm50/files/clang-patch-tools_clang_tools_clang-format_git-clang-format (contents, props changed)
Modified:
head/devel/llvm50/Makefile
head/devel/llvm50/files/clang-patch-tools_clang_tools_clang-format_clang-format.py
head/devel/llvm50/pkg-plist
Modified: head/devel/llvm50/Makefile
==============================================================================
--- head/devel/llvm50/Makefile Tue Sep 19 23:36:53 2017 (r450175)
+++ head/devel/llvm50/Makefile Tue Sep 19 23:44:35 2017 (r450176)
@@ -2,6 +2,7 @@
PORTNAME= llvm
DISTVERSION= 5.0.0
+PORTREVISON= 1
CATEGORIES= devel lang
MASTER_SITES= http://llvm.org/${PRE_}releases/${LLVM_RELEASE}/${RCDIR}
PKGNAMESUFFIX= ${LLVM_SUFFIX}
@@ -39,6 +40,8 @@ SUB_LIST= LLVM_PREFIX="${LLVM_PREFIX}" LLVM_SUFFIX="${
CMAKE_INSTALL_PREFIX= ${LLVM_PREFIX}
CMAKE_ARGS= -DLLVM_BUILD_LLVM_DYLIB=ON
+CMAKE_ARGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=${CONFIGURE_TARGET}
+CMAKE_ARGS+= -DLLVM_HOST_TRIPLE=${CONFIGURE_TARGET}
# Following commit https://github.com/kitware/cmake/commit/956054
# we need to either change the whole man-shuffle below, or simply
# redefine CMAKE_INSTALL_MANDIR
@@ -50,6 +53,7 @@ OPTIONS_DEFINE_i386= COMPILER_RT
OPTIONS_DEFAULT= CLANG EXTRAS LIT LLD LLDB
OPTIONS_DEFAULT_amd64= COMPILER_RT GOLD OPENMP
OPTIONS_DEFAULT_i386= COMPILER_RT
+OPTIONS_EXCLUDE_FreeBSD_10= LLDB
OPTIONS_SUB= yes
CLANG_DESC= Build clang
@@ -58,6 +62,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}
@@ -168,7 +174,8 @@ EXTRAS_COMMANDS+= \
clang-reorder-fields \
clang-tidy \
find-all-symbols \
- modularize
+ modularize \
+ pp-trace
EXTRAS_LIBS= libclangApplyReplacements \
libclangChangeNamespace \
libclangIncludeFixer \
@@ -356,6 +363,10 @@ post-patch:
post-patch-CLANG-on:
${REINPLACE_CMD} -e 's|%%LLVM_PREFIX%%|${LLVM_PREFIX}|' \
${PATCH_WRKSRC}/tools/clang/lib/Driver/ToolChains/CommonArgs.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-build-COMPILER_RT-on:
${MKDIR} ${WRKDIR}/compiler-rt-build
Added: 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/llvm50/files/clang-patch-tools_clang_tools_clang-format_clang-format-sublime.py Tue Sep 19 23:44:35 2017 (r450176)
@@ -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/llvm50/files/clang-patch-tools_clang_tools_clang-format_clang-format.py
==============================================================================
--- head/devel/llvm50/files/clang-patch-tools_clang_tools_clang-format_clang-format.py Tue Sep 19 23:36:53 2017 (r450175)
+++ head/devel/llvm50/files/clang-patch-tools_clang_tools_clang-format_clang-format.py Tue Sep 19 23:44:35 2017 (r450176)
@@ -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')
Added: 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/llvm50/files/clang-patch-tools_clang_tools_clang-format_git-clang-format Tue Sep 19 23:44:35 2017 (r450176)
@@ -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/llvm50/pkg-plist
==============================================================================
--- head/devel/llvm50/pkg-plist Tue Sep 19 23:36:53 2017 (r450175)
+++ head/devel/llvm50/pkg-plist Tue Sep 19 23:44:35 2017 (r450176)
@@ -64,6 +64,7 @@ bin/sancov%%LLVM_SUFFIX%%
%%EXTRAS%%bin/clang-tidy%%LLVM_SUFFIX%%
%%EXTRAS%%bin/find-all-symbols%%LLVM_SUFFIX%%
%%EXTRAS%%bin/modularize%%LLVM_SUFFIX%%
+%%EXTRAS%%bin/pp-trace%%LLVM_SUFFIX%%
%%LLD%%bin/lld%%LLVM_SUFFIX%%
%%LLD%%bin/lld-link%%LLVM_SUFFIX%%
%%LIT%%bin/lit%%LLVM_SUFFIX%%
More information about the svn-ports-all
mailing list