Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Feb 2016 15:05:22 +0000 (UTC)
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r409295 - in head/devel: . include-what-you-use
Message-ID:  <201602211505.u1LF5MJn073016@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: koobs
Date: Sun Feb 21 15:05:22 2016
New Revision: 409295
URL: https://svnweb.freebsd.org/changeset/ports/409295

Log:
  [NEW] devel/include-what-you-use: Clang tool to analyze #includes in C and C++ sources
  
  "Include what you use" means this: for every symbol (type, function,
  variable, or macro) that you use in foo.cc (or foo.cpp), either foo.cc
  or foo.h should include a .h file that exports the declaration of that
  symbol. (Similarly, for foo_test.cc, either foo_test.cc or foo.h should
  do the including.) Obviously symbols defined in foo.cc itself are
  excluded from this requirement.
  
  This puts us in a state where every file includes the headers it needs
  to declare the symbols that it uses. When every file includes what it
  uses, then it is possible to edit any file and remove unused headers,
  without fear of accidentally breaking the upwards dependencies of
  that file. It also becomes easy to automatically track and update
  dependencies in the source code.
  
  WWW: http://include-what-you-use.org

Added:
  head/devel/include-what-you-use/
  head/devel/include-what-you-use/Makefile   (contents, props changed)
  head/devel/include-what-you-use/distinfo   (contents, props changed)
  head/devel/include-what-you-use/pkg-descr   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Sun Feb 21 14:59:53 2016	(r409294)
+++ head/devel/Makefile	Sun Feb 21 15:05:22 2016	(r409295)
@@ -1034,6 +1034,7 @@
     SUBDIR += idutils
     SUBDIR += ifd-test
     SUBDIR += imake
+    SUBDIR += include-what-you-use
     SUBDIR += inilib
     SUBDIR += iniparser
     SUBDIR += initutil

Added: head/devel/include-what-you-use/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/include-what-you-use/Makefile	Sun Feb 21 15:05:22 2016	(r409295)
@@ -0,0 +1,29 @@
+# Created by: Kubilay Kocak <koobs@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME=	include-what-you-use
+PORTVERSION=	0.5
+CATEGORIES=	devel
+
+MAINTAINER=	koobs@FreeBSD.org
+COMMENT=	Tool for use with clang to analyze #includes in C and C++ source files
+
+LICENSE=	NCSA
+LICENSE_FILE=	${WRKSRC}/LICENSE.TXT
+
+BUILD_DEPENDS=	clang37:${PORTSDIR}/lang/clang37
+RUN_DEPENDS=	clang37:${PORTSDIR}/lang/clang37
+
+USES=		cmake:outsource ncurses python:run
+USE_GITHUB=	yes
+
+GH_TAGNAME=	clang_3.7
+
+CMAKE_ARGS+=	-DIWYU_LLVM_INCLUDE_PATH=${LOCALBASE}/llvm37/include \
+		-DIWYU_LLVM_LIB_PATH=${LOCALBASE}/llvm37/lib
+
+PLIST_FILES=	bin/fix_includes.py \
+		bin/include-what-you-use \
+		bin/iwyu_tool.py
+
+.include <bsd.port.mk>

Added: head/devel/include-what-you-use/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/include-what-you-use/distinfo	Sun Feb 21 15:05:22 2016	(r409295)
@@ -0,0 +1,2 @@
+SHA256 (include-what-you-use-include-what-you-use-0.5-clang_3.7_GH0.tar.gz) = d5ba65de1da9ccbe65f92e80f8d5b0563b0935be13a15c129d6dbdd9dac841a0
+SIZE (include-what-you-use-include-what-you-use-0.5-clang_3.7_GH0.tar.gz) = 404410

Added: head/devel/include-what-you-use/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/include-what-you-use/pkg-descr	Sun Feb 21 15:05:22 2016	(r409295)
@@ -0,0 +1,15 @@
+"Include what you use" means this: for every symbol (type, function,
+variable, or macro) that you use in foo.cc (or foo.cpp), either foo.cc
+or foo.h should include a .h file that exports the declaration of that
+symbol. (Similarly, for foo_test.cc, either foo_test.cc or foo.h should
+do the including.) Obviously symbols defined in foo.cc itself are
+excluded from this requirement.
+
+This puts us in a state where every file includes the headers it needs
+to declare the symbols that it uses. When every file includes what it
+uses, then it is possible to edit any file and remove unused headers,
+without fear of accidentally breaking the upwards dependencies of
+that file. It also becomes easy to automatically track and update
+dependencies in the source code.
+
+WWW: http://include-what-you-use.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602211505.u1LF5MJn073016>