pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

split clang-static-analyzer-git from clang-git



Module Name:	pkgsrc-wip
Committed By:	Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By:	tnn
Date:		Mon Feb 22 03:15:20 2016 +0100
Changeset:	76769886ea12d5e2296b9fbb8069b8cbfbab2291

Modified Files:
	Makefile
	clang-git/Makefile
	clang-git/PLIST
	clang-git/distinfo
Added Files:
	clang-git/Makefile.common
	clang-git/patches/patch-tools_clang-format_CMakeLists.txt
	clang-static-analyzer-git/DESCR
	clang-static-analyzer-git/Makefile
	clang-static-analyzer-git/PLIST

Log Message:
split clang-static-analyzer-git from clang-git

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=76769886ea12d5e2296b9fbb8069b8cbfbab2291

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |  1 +
 clang-git/Makefile                                 | 94 ++--------------------
 clang-git/Makefile.common                          | 91 +++++++++++++++++++++
 clang-git/PLIST                                    | 20 +----
 clang-git/distinfo                                 |  1 +
 .../patch-tools_clang-format_CMakeLists.txt        | 15 ++++
 clang-static-analyzer-git/DESCR                    |  9 +++
 clang-static-analyzer-git/Makefile                 | 20 +++++
 clang-static-analyzer-git/PLIST                    | 14 ++++
 9 files changed, 159 insertions(+), 106 deletions(-)

diffs:
diff --git a/Makefile b/Makefile
index 2a53361..a96041d 100644
--- a/Makefile
+++ b/Makefile
@@ -348,6 +348,7 @@ SUBDIR+=	cl-unicode
 SUBDIR+=	cl-who
 SUBDIR+=	clamassassin
 SUBDIR+=	clang-git
+SUBDIR+=	clang-static-analyzer-git
 SUBDIR+=	classgen
 SUBDIR+=	classias
 SUBDIR+=	classic-mac-font-pack
diff --git a/clang-git/Makefile b/clang-git/Makefile
index 1b8d58f..c9b0dd9 100644
--- a/clang-git/Makefile
+++ b/clang-git/Makefile
@@ -1,92 +1,12 @@
-# $NetBSD: Makefile.common,v 1.7 2015/07/20 05:49:53 adam Exp $
+# $NetBSD$
 
 PKGNAME=	clang-3.9.0
-CATEGORIES=	lang devel
+PYTHON_FOR_BUILD_ONLY=	yes
 
-GIT_REPOSITORIES=	clang
-GIT_REPO.clang=		https://github.com/llvm-mirror/clang.git
+CMAKE_ARGS+=	-DCLANG_ENABLE_STATIC_ANALYZER=OFF
 
-MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE=	http://clang.llvm.org/
-COMMENT=	C language family frontend for LLVM
-LICENSE=	modified-bsd
+# There are some contrib utilities written in python here.
+# We don't want to add a python runtime dependency for that.
+CHECK_INTERPRETER_SKIP+=	share/clang/*
 
-WRKSRC=			${WRKDIR}/${PKGBASE}
-CONFIGURE_DIRS=		${WRKDIR}/build
-CMAKE_ARG_PATH=		${WRKSRC}
-
-USE_LANGUAGES=		c c++
-USE_CMAKE+=		yes
-GCC_REQD+=		4.8
-
-CMAKE_ARGS+=	-DCMAKE_BUILD_TYPE=Release
-CMAKE_ARGS+=	-DCMAKE_C_COMPILER=gcc
-CMAKE_ARGS+=	-DCMAKE_CXX_COMPILER=g++
-# Try to optimize building LLVM for now.
-CMAKE_ARGS+=	-DLLVM_TARGETS_TO_BUILD="X86"
-
-REPLACE_PERL+=		test/make_test_dirs.pl
-REPLACE_PERL+=		tools/scan-build/bin/scan-build
-REPLACE_PERL+=		tools/scan-build/libexec/c++-analyzer
-REPLACE_PERL+=		tools/scan-build/libexec/ccc-analyzer
-REPLACE_PERL+=		utils/TestUtils/pch-test.pl
-REPLACE_PERL+=		utils/analyzer/reducer.pl
-REPLACE_PERL+=		utils/analyzer/update_plist_test.pl
-REPLACE_PERL+=		www/demo/index.cgi
-
-REPLACE_PYTHON+=	bindings/python/examples/cindex/cindex-dump.py
-REPLACE_PYTHON+=	bindings/python/examples/cindex/cindex-includes.py
-REPLACE_PYTHON+=	docs/tools/dump_ast_matchers.py
-REPLACE_PYTHON+=	docs/tools/dump_format_style.py
-REPLACE_PYTHON+=	tools/clang-format/clang-format-diff.py
-REPLACE_PYTHON+=	tools/clang-format/git-clang-format
-REPLACE_PYTHON+=	tools/scan-build/bin/set-xcode-analyzer
-REPLACE_PYTHON+=	tools/scan-view/bin/scan-view
-REPLACE_PYTHON+=	utils/ABITest/ABITestGen.py
-REPLACE_PYTHON+=	utils/CIndex/completion_logger_server.py
-REPLACE_PYTHON+=	utils/CaptureCmd
-REPLACE_PYTHON+=	utils/CmpDriver
-REPLACE_PYTHON+=	utils/FindSpecRefs
-REPLACE_PYTHON+=	utils/FuzzTest
-REPLACE_PYTHON+=	utils/TestUtils/deep-stack.py
-REPLACE_PYTHON+=	utils/analyzer/CmpRuns.py
-REPLACE_PYTHON+=	utils/analyzer/SATestAdd.py
-REPLACE_PYTHON+=	utils/analyzer/SATestBuild.py
-REPLACE_PYTHON+=	utils/analyzer/SumTimerInfo.py
-REPLACE_PYTHON+=	utils/analyzer/ubiviz
-REPLACE_PYTHON+=	utils/check_cfc/check_cfc.py
-REPLACE_PYTHON+=	utils/check_cfc/obj_diff.py
-REPLACE_PYTHON+=	utils/check_cfc/test_check_cfc.py
-REPLACE_PYTHON+=	utils/token-delta.py
-REPLACE_PYTHON+=	www/builtins.py
-
-.include "../../mk/compiler.mk"
-
-# patch NetBSD::GetCXXStdlibType
-.if ${OPSYS} == "NetBSD" && !empty(PKGSRC_COMPILER:Mgcc)
-SUBST_CLASSES+=			libcxx
-SUBST_STAGE.libcxx=		pre-configure
-SUBST_MESSAGE.libcxx=		Patching toolchain to use libstdc++ as we're using GCC
-SUBST_FILES.libcxx=		lib/Driver/ToolChains.cpp
-SUBST_FILES.libcxx+=		lib/Driver/Tools.cpp
-SUBST_SED.libcxx=		-e 's,(Major >= 7 || Major == 0),(false),'
-
-CMAKE_ARGS+=			-DCLANG_DEFAULT_CXX_STDLIB:STRING="libstdc++"
-.endif
-
-TEST_TARGET=		clang-test
-TEST_ENV+=		LD_LIBRARY_PATH=${WRKDIR}/build/lib
-
-post-extract:
-	${RUN} mkdir -p ${WRKDIR}/build
-
-.include "../../devel/googletest/buildlink3.mk"
-.include "../../textproc/libxml2/buildlink3.mk"
-.include "../../wip/mk/git-package.mk"
-.include "../../devel/zlib/buildlink3.mk"
-.include "../../lang/python/extension.mk"
-.include "../../lang/python/pyversion.mk"
-.include "../../lang/python/application.mk"
-.include "../../lang/python/tool.mk"
-.include "../../wip/llvm-git/buildlink3.mk"
-.include "../../mk/bsd.pkg.mk"
+.include "../../wip/clang-git/Makefile.common"
diff --git a/clang-git/Makefile.common b/clang-git/Makefile.common
new file mode 100644
index 0000000..8244022
--- /dev/null
+++ b/clang-git/Makefile.common
@@ -0,0 +1,91 @@
+# $NetBSD$
+
+CATEGORIES=	lang devel
+
+GIT_REPOSITORIES=	clang
+GIT_REPO.clang=		https://github.com/llvm-mirror/clang.git
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://clang.llvm.org/
+COMMENT=	C language family frontend for LLVM
+LICENSE=	modified-bsd
+
+DISTINFO_FILE=		${.CURDIR}/../../wip/clang-git/distinfo
+PATCHDIR=		${.CURDIR}/../../wip/clang-git/patches
+WRKSRC=			${WRKDIR}/clang
+CONFIGURE_DIRS=		${WRKDIR}/build
+CMAKE_ARG_PATH=		${WRKSRC}
+
+USE_LANGUAGES=		c c++
+USE_CMAKE+=		yes
+GCC_REQD+=		4.8
+
+CMAKE_ARGS+=	-DCMAKE_BUILD_TYPE=Release
+CMAKE_ARGS+=	-DCMAKE_C_COMPILER=gcc
+CMAKE_ARGS+=	-DCMAKE_CXX_COMPILER=g++
+# XXX can't disable static-analyzer without also disabling ARCMT
+CMAKE_ARGS+=	-DCLANG_ENABLE_ARCMT=OFF
+
+REPLACE_PERL+=		test/make_test_dirs.pl
+REPLACE_PERL+=		tools/scan-build/bin/scan-build
+REPLACE_PERL+=		tools/scan-build/libexec/c++-analyzer
+REPLACE_PERL+=		tools/scan-build/libexec/ccc-analyzer
+REPLACE_PERL+=		utils/TestUtils/pch-test.pl
+REPLACE_PERL+=		utils/analyzer/reducer.pl
+REPLACE_PERL+=		utils/analyzer/update_plist_test.pl
+REPLACE_PERL+=		www/demo/index.cgi
+
+REPLACE_PYTHON+=	bindings/python/examples/cindex/cindex-dump.py
+REPLACE_PYTHON+=	bindings/python/examples/cindex/cindex-includes.py
+REPLACE_PYTHON+=	docs/tools/dump_ast_matchers.py
+REPLACE_PYTHON+=	docs/tools/dump_format_style.py
+REPLACE_PYTHON+=	tools/clang-format/clang-format-diff.py
+REPLACE_PYTHON+=	tools/clang-format/git-clang-format
+REPLACE_PYTHON+=	tools/scan-build/bin/set-xcode-analyzer
+REPLACE_PYTHON+=	tools/scan-view/bin/scan-view
+REPLACE_PYTHON+=	utils/ABITest/ABITestGen.py
+REPLACE_PYTHON+=	utils/CIndex/completion_logger_server.py
+REPLACE_PYTHON+=	utils/CaptureCmd
+REPLACE_PYTHON+=	utils/CmpDriver
+REPLACE_PYTHON+=	utils/FindSpecRefs
+REPLACE_PYTHON+=	utils/FuzzTest
+REPLACE_PYTHON+=	utils/TestUtils/deep-stack.py
+REPLACE_PYTHON+=	utils/analyzer/CmpRuns.py
+REPLACE_PYTHON+=	utils/analyzer/SATestAdd.py
+REPLACE_PYTHON+=	utils/analyzer/SATestBuild.py
+REPLACE_PYTHON+=	utils/analyzer/SumTimerInfo.py
+REPLACE_PYTHON+=	utils/analyzer/ubiviz
+REPLACE_PYTHON+=	utils/check_cfc/check_cfc.py
+REPLACE_PYTHON+=	utils/check_cfc/obj_diff.py
+REPLACE_PYTHON+=	utils/check_cfc/test_check_cfc.py
+REPLACE_PYTHON+=	utils/token-delta.py
+REPLACE_PYTHON+=	www/builtins.py
+
+.include "../../mk/compiler.mk"
+
+# patch NetBSD::GetCXXStdlibType
+.if ${OPSYS} == "NetBSD" && !empty(PKGSRC_COMPILER:Mgcc)
+SUBST_CLASSES+=			libcxx
+SUBST_STAGE.libcxx=		pre-configure
+SUBST_MESSAGE.libcxx=		Patching toolchain to use libstdc++ as we're using GCC
+SUBST_FILES.libcxx=		lib/Driver/ToolChains.cpp
+SUBST_FILES.libcxx+=		lib/Driver/Tools.cpp
+SUBST_SED.libcxx=		-e 's,(Major >= 7 || Major == 0),(false),'
+
+CMAKE_ARGS+=			-DCLANG_DEFAULT_CXX_STDLIB:STRING="libstdc++"
+.endif
+
+TEST_TARGET=		clang-test
+TEST_ENV+=		LD_LIBRARY_PATH=${WRKDIR}/build/lib
+# test dependency
+#.include "../../devel/googletest/buildlink3.mk"
+
+post-extract:
+	${RUN} mkdir -p ${WRKDIR}/build
+
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../wip/mk/git-package.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../lang/python/tool.mk"
+.include "../../wip/llvm-git/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/clang-git/PLIST b/clang-git/PLIST
index 2b1f6db..a8b42ea 100644
--- a/clang-git/PLIST
+++ b/clang-git/PLIST
@@ -3,12 +3,8 @@ bin/c-index-test
 bin/clang
 bin/clang++
 bin/clang-3.9
-bin/clang-check
 bin/clang-cl
 bin/clang-format
-bin/git-clang-format
-bin/scan-build
-bin/scan-view
 include/clang-c/BuildSystem.h
 include/clang-c/CXCompilationDatabase.h
 include/clang-c/CXErrorCode.h
@@ -541,7 +537,6 @@ lib/cmake/clang/ClangTargets-release.cmake
 lib/cmake/clang/ClangTargets.cmake
 lib/libclang.so
 lib/libclang.so.3.9
-lib/libclangARCMigrate.a
 lib/libclangAST.a
 lib/libclangASTMatchers.a
 lib/libclangAnalysis.a
@@ -560,24 +555,11 @@ lib/libclangRewrite.a
 lib/libclangRewriteFrontend.a
 lib/libclangSema.a
 lib/libclangSerialization.a
-lib/libclangStaticAnalyzerCheckers.a
-lib/libclangStaticAnalyzerCore.a
-lib/libclangStaticAnalyzerFrontend.a
 lib/libclangTooling.a
 lib/libclangToolingCore.a
-libexec/c++-analyzer
-libexec/ccc-analyzer
-man/man1/scan-build.1
 share/clang/clang-format-bbedit.applescript
 share/clang/clang-format-diff.py
 share/clang/clang-format-sublime.py
 share/clang/clang-format.el
 share/clang/clang-format.py
-share/scan-build/scanview.css
-share/scan-build/sorttable.js
-share/scan-view/FileRadar.scpt
-share/scan-view/GetRadarVersion.scpt
-share/scan-view/Reporter.py
-share/scan-view/ScanView.py
-share/scan-view/bugcatcher.ico
-share/scan-view/startfile.py
+share/clang/git-clang-format
diff --git a/clang-git/distinfo b/clang-git/distinfo
index 7931384..9fdd4cc 100644
--- a/clang-git/distinfo
+++ b/clang-git/distinfo
@@ -12,3 +12,4 @@ Size (libcxx-3.6.2.src.tar.xz) = 944020 bytes
 SHA1 (llvm-3.6.2.src.tar.xz) = 7a00257eb2bc9431e4c77c3a36b033072c54bc7e
 RMD160 (llvm-3.6.2.src.tar.xz) = 521cbc5fe2925ea3c6e90c7a31f752a04045c972
 Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes
+SHA1 (patch-tools_clang-format_CMakeLists.txt) = a1052c71728467625a40234719580cb34688a568
diff --git a/clang-git/patches/patch-tools_clang-format_CMakeLists.txt b/clang-git/patches/patch-tools_clang-format_CMakeLists.txt
new file mode 100644
index 0000000..8df7b6f
--- /dev/null
+++ b/clang-git/patches/patch-tools_clang-format_CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+
+git-clang-format is a git integration for clang-format,
+written in python. It could be moved to a separate package
+to avoid a python runtime dependency here, but for now I just opted
+to move it to share/clang and skip the interpreter check.
+
+--- tools/clang-format/CMakeLists.txt.orig	2016-02-21 01:22:56.000000000 +0000
++++ tools/clang-format/CMakeLists.txt
+@@ -25,4 +25,4 @@ install(PROGRAMS clang-format-diff.py DE
+ install(PROGRAMS clang-format-sublime.py DESTINATION share/clang)
+ install(PROGRAMS clang-format.el DESTINATION share/clang)
+ install(PROGRAMS clang-format.py DESTINATION share/clang)
+-install(PROGRAMS git-clang-format DESTINATION bin)
++install(PROGRAMS git-clang-format DESTINATION share/clang)
diff --git a/clang-static-analyzer-git/DESCR b/clang-static-analyzer-git/DESCR
new file mode 100644
index 0000000..c1dca52
--- /dev/null
+++ b/clang-static-analyzer-git/DESCR
@@ -0,0 +1,9 @@
+The Clang Static Analyzer is a source code analysis tool that finds
+bugs in C, C++, and Objective-C programs.
+
+The standalone tool is invoked from the command line, and is intended
+to be run in tandem with a build of a codebase.
+
+The analyzer is 100% open source and is part of the Clang project.
+Like the rest of Clang, the analyzer is implemented as a C++ library
+that can be used by other tools and applications
diff --git a/clang-static-analyzer-git/Makefile b/clang-static-analyzer-git/Makefile
new file mode 100644
index 0000000..0ae5f1e
--- /dev/null
+++ b/clang-static-analyzer-git/Makefile
@@ -0,0 +1,20 @@
+# $NetBSD$
+
+PKGNAME=	clang-static-analyzer-3.9.0
+#PKGNAME=	${DISTNAME:S/clang/clang-static-analyzer/}
+
+DEPENDS+=	clang>=${PKGVERSION_NOREV}:../../wip/clang-git
+
+USE_TOOLS+=	perl:run
+
+BUILD_TARGET=	clang-check scan-build scan-view
+
+INSTALL_DIRS=	../build/tools/clang-check ../build/tools/scan-build ../build/tools/scan-view
+
+CMAKE_ARGS+=	-DCLANG_ENABLE_STATIC_ANALYZER=ON
+
+REPLACE_PYTHON=	# defined
+PYTHON_VERSIONS_INCOMPATIBLE=	33 34 35 # not yet ported as of 3.5
+
+.include "../../lang/python/application.mk"
+.include "../../wip/clang-git/Makefile.common"
diff --git a/clang-static-analyzer-git/PLIST b/clang-static-analyzer-git/PLIST
new file mode 100644
index 0000000..38c0d89
--- /dev/null
+++ b/clang-static-analyzer-git/PLIST
@@ -0,0 +1,14 @@
+bin/clang-check
+bin/scan-build
+bin/scan-view
+libexec/c++-analyzer
+libexec/ccc-analyzer
+man/man1/scan-build.1
+share/scan-build/scanview.css
+share/scan-build/sorttable.js
+share/scan-view/FileRadar.scpt
+share/scan-view/GetRadarVersion.scpt
+share/scan-view/Reporter.py
+share/scan-view/ScanView.py
+share/scan-view/bugcatcher.ico
+share/scan-view/startfile.py


Home | Main Index | Thread Index | Old Index