pkgsrc-WIP-changes archive

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

Add an unfinished port for include-what-you-use.



Module Name:	pkgsrc-wip
Committed By:	Benny Siegert <bsiegert%NetBSD.org@localhost>
Pushed By:	bsiegert
Date:		Wed Dec 30 15:42:58 2015 +0100
Changeset:	2cba6ffe10a29fa7f26b8e3fcd9b2df7dcb4064d

Added Files:
	include-what-you-use/DESCR
	include-what-you-use/Makefile
	include-what-you-use/PLIST
	include-what-you-use/distinfo

Log Message:
Add an unfinished port for include-what-you-use.

"Include what you use" means this: for every symbol (type, function
variable, or macro) that you use in foo.cc, either foo.cc or foo.h
should #include a .h file that exports the declaration of that symbol.
The include-what-you-use tool is a program that can be built with the
clang libraries in order to analyze #includes of source files to find
include-what-you-use violations, and suggest fixes for them.

The main goal of include-what-you-use is to remove superfluous #includes.
It does this both by figuring out what #includes are not actually needed
for this file (for both .cc and .h files), and replacing #includes with
forward-declares when possible.

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

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

diffstat:
 include-what-you-use/DESCR    | 11 +++++++++++
 include-what-you-use/Makefile | 18 ++++++++++++++++++
 include-what-you-use/PLIST    |  1 +
 include-what-you-use/distinfo |  6 ++++++
 4 files changed, 36 insertions(+)

diffs:
diff --git a/include-what-you-use/DESCR b/include-what-you-use/DESCR
new file mode 100644
index 0000000..a0894c3
--- /dev/null
+++ b/include-what-you-use/DESCR
@@ -0,0 +1,11 @@
+"Include what you use" means this: for every symbol (type, function
+variable, or macro) that you use in foo.cc, either foo.cc or foo.h
+should #include a .h file that exports the declaration of that symbol.
+The include-what-you-use tool is a program that can be built with the
+clang libraries in order to analyze #includes of source files to find
+include-what-you-use violations, and suggest fixes for them.
+
+The main goal of include-what-you-use is to remove superfluous
+#includes. It does this both by figuring out what #includes are not
+actually needed for this file (for both .cc and .h files), and replacing
+#includes with forward-declares when possible.
diff --git a/include-what-you-use/Makefile b/include-what-you-use/Makefile
new file mode 100644
index 0000000..2d2a236
--- /dev/null
+++ b/include-what-you-use/Makefile
@@ -0,0 +1,18 @@
+# $NetBSD$
+
+DISTNAME=	include-what-you-use-0.5.src
+PKGNAME=	${DISTNAME:.src=}
+CATEGORIES=	devel
+MASTER_SITES=	http://include-what-you-use.org/downloads/
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	http://include-what-you-use.org/downloads/
+COMMENT=	Analyze \#includes in C and C++ source files
+#LICENSE=	# TODO: (see mk/license.mk)
+
+WRKSRC=		${WRKDIR}/include-what-you-use
+USE_CMAKE=	yes
+USE_LANGUAGES=	c c++
+
+.include "../../lang/libLLVM/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/include-what-you-use/PLIST b/include-what-you-use/PLIST
new file mode 100644
index 0000000..48d96a5
--- /dev/null
+++ b/include-what-you-use/PLIST
@@ -0,0 +1 @@
+@comment $NetBSD$
diff --git a/include-what-you-use/distinfo b/include-what-you-use/distinfo
new file mode 100644
index 0000000..8c2b2af
--- /dev/null
+++ b/include-what-you-use/distinfo
@@ -0,0 +1,6 @@
+$NetBSD$
+
+SHA1 (include-what-you-use-0.5.src.tar.gz) = 6d4e3040ecb2906f93d72ba14e61381f0a8c2509
+RMD160 (include-what-you-use-0.5.src.tar.gz) = 73f92c5d018e9a49c34307a4ff5c5848b78a0e99
+SHA512 (include-what-you-use-0.5.src.tar.gz) = 805395873b59e4f4236853ba9ac6818d60968190ad485d580ea80d69c518eb8c44822a4281a4219b4ccc02e2dc8f3db5c470170e27e67ea0d8e04ef78da9078c
+Size (include-what-you-use-0.5.src.tar.gz) = 404081 bytes


Home | Main Index | Thread Index | Old Index