SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
37
devel/include-what-you-use/Makefile
Normal file
37
devel/include-what-you-use/Makefile
Normal file
|
@ -0,0 +1,37 @@
|
|||
COMMENT= tool to analyse \#includes in C and C++ source files
|
||||
CATEGORIES= devel
|
||||
DISTNAME= include-what-you-use-0.17.src
|
||||
PKGNAME= ${DISTNAME:.src=}
|
||||
REVISION= 0
|
||||
|
||||
HOMEPAGE= https://include-what-you-use.org
|
||||
MASTER_SITES= ${HOMEPAGE}/downloads/
|
||||
WRKDIST= ${WRKDIR}/include-what-you-use
|
||||
|
||||
MAINTAINER= Jonathan Gray <jsg@openbsd.org>
|
||||
|
||||
# BSD
|
||||
PERMIT_PACKAGE= Yes
|
||||
|
||||
WANTLIB= ${COMPILER_LIBCXX} c clang-cpp m pthread
|
||||
LLVM_V= 13.0.0
|
||||
BUILD_DEPENDS= devel/llvm>=${LLVM_V}
|
||||
RUN_DEPENDS= devel/llvm>=${LLVM_V}
|
||||
|
||||
MODULES= devel/cmake lang/python
|
||||
MODPY_BUILDDEP= No
|
||||
MODPY_ADJ_FILES= *.py
|
||||
|
||||
COMPILER= base-clang ports-gcc
|
||||
COMPILER_LANGS= c++
|
||||
|
||||
DOCDIR= ${PREFIX}/share/doc/include-what-you-use
|
||||
|
||||
do-test:
|
||||
cd ${WRKSRC} && ./run_iwyu_tests.py
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${DOCDIR}/
|
||||
${INSTALL_DATA} ${WRKSRC}/README.md ${WRKSRC}/docs/* ${DOCDIR}/
|
||||
|
||||
.include <bsd.port.mk>
|
2
devel/include-what-you-use/distinfo
Normal file
2
devel/include-what-you-use/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (include-what-you-use-0.17.src.tar.gz) = 7KfAT4tBa2OF7QDjNmmn+kaTzSbLcrUizeVYgo6wxmU=
|
||||
SIZE (include-what-you-use-0.17.src.tar.gz) = 747285
|
106
devel/include-what-you-use/patches/patch-iwyu_include_picker_cc
Normal file
106
devel/include-what-you-use/patches/patch-iwyu_include_picker_cc
Normal file
|
@ -0,0 +1,106 @@
|
|||
Index: iwyu_include_picker.cc
|
||||
--- iwyu_include_picker.cc.orig
|
||||
+++ iwyu_include_picker.cc
|
||||
@@ -133,8 +133,6 @@ const IncludeMapEntry libc_symbol_map[] = {
|
||||
{ "imaxdiv_t", kPrivate, "<inttypes.h>", kPublic },
|
||||
{ "intmax_t", kPrivate, "<stdint.h>", kPublic },
|
||||
{ "uintmax_t", kPrivate, "<stdint.h>", kPublic },
|
||||
- { "ino64_t", kPrivate, "<sys/types.h>", kPublic },
|
||||
- { "ino64_t", kPrivate, "<dirent.h>", kPublic },
|
||||
{ "ino_t", kPrivate, "<sys/types.h>", kPublic },
|
||||
{ "ino_t", kPrivate, "<dirent.h>", kPublic },
|
||||
{ "ino_t", kPrivate, "<sys/stat.h>", kPublic },
|
||||
@@ -163,8 +161,6 @@ const IncludeMapEntry libc_symbol_map[] = {
|
||||
{ "mode_t", kPrivate, "<sys/stat.h>", kPublic },
|
||||
{ "nlink_t", kPrivate, "<sys/types.h>", kPublic },
|
||||
{ "nlink_t", kPrivate, "<sys/stat.h>", kPublic },
|
||||
- { "off64_t", kPrivate, "<sys/types.h>", kPublic },
|
||||
- { "off64_t", kPrivate, "<unistd.h>", kPublic },
|
||||
{ "off_t", kPrivate, "<sys/types.h>", kPublic },
|
||||
{ "off_t", kPrivate, "<aio.h>", kPublic },
|
||||
{ "off_t", kPrivate, "<fcntl.h>", kPublic },
|
||||
@@ -195,13 +191,10 @@ const IncludeMapEntry libc_symbol_map[] = {
|
||||
{ "sigevent", kPrivate, "<time.h>", kPublic },
|
||||
{ "siginfo_t", kPrivate, "<signal.h>", kPublic },
|
||||
{ "siginfo_t", kPrivate, "<sys/wait.h>", kPublic },
|
||||
- { "sigset_t", kPrivate, "<signal.h>", kPublic },
|
||||
- { "sigset_t", kPrivate, "<spawn.h>", kPublic },
|
||||
{ "sigset_t", kPrivate, "<sys/select.h>", kPublic },
|
||||
{ "sigval", kPrivate, "<signal.h>", kPublic },
|
||||
{ "sockaddr", kPrivate, "<sys/socket.h>", kPublic },
|
||||
{ "socklen_t", kPrivate, "<sys/socket.h>", kPublic },
|
||||
- { "socklen_t", kPrivate, "<netdb.h>", kPublic },
|
||||
{ "ssize_t", kPrivate, "<sys/types.h>", kPublic },
|
||||
{ "ssize_t", kPrivate, "<aio.h>", kPublic },
|
||||
{ "ssize_t", kPrivate, "<monetary.h>", kPublic },
|
||||
@@ -282,6 +275,7 @@ const IncludeMapEntry libc_symbol_map[] = {
|
||||
{ "size_t", kPrivate, "<unistd.h>", kPublic },
|
||||
{ "size_t", kPrivate, "<wchar.h>", kPublic },
|
||||
{ "size_t", kPrivate, "<wordexp.h>", kPublic },
|
||||
+ { "size_t", kPrivate, "<sys/types.h>", kPublic },
|
||||
// Macros that can be defined in more than one file, don't have the
|
||||
// same __foo_defined guard that other types do, so the grep above
|
||||
// doesn't discover them. Until I figure out a better way, I just
|
||||
@@ -302,6 +296,10 @@ const IncludeMapEntry libc_symbol_map[] = {
|
||||
{ "calloc", kPrivate, "<stdlib.h>", kPublic },
|
||||
{ "realloc", kPrivate, "<stdlib.h>", kPublic },
|
||||
{ "free", kPrivate, "<stdlib.h>", kPublic },
|
||||
+ { "htonl", kPrivate, "<arpa/inet.h>", kPublic },
|
||||
+ { "htons", kPrivate, "<arpa/inet.h>", kPublic },
|
||||
+ { "ntohl", kPrivate, "<arpa/inet.h>", kPublic },
|
||||
+ { "ntohs", kPrivate, "<arpa/inet.h>", kPublic },
|
||||
// Entries for NULL
|
||||
{ "NULL", kPrivate, "<stddef.h>", kPublic }, // 'canonical' location for NULL
|
||||
{ "NULL", kPrivate, "<clocale>", kPublic },
|
||||
@@ -354,7 +352,7 @@ const IncludeMapEntry libstdcpp_symbol_map[] = {
|
||||
{ "std::size_t", kPrivate, "<cwchar>", kPublic },
|
||||
};
|
||||
|
||||
-const IncludeMapEntry libc_include_map[] = {
|
||||
+const IncludeMapEntry glibc_include_map[] = {
|
||||
// Private -> public include mappings for GNU libc
|
||||
// ( cd /usr/include && grep '^ *# *include' {sys/,net/,}* | perl -nle 'm/^([^:]+).*<([^>]+)>/ && print qq@ { "<$2>", kPrivate, "<$1>", kPublic },@' | grep bits/ | sort )
|
||||
// When I saw more than one mapping for these, I typically picked
|
||||
@@ -561,6 +559,42 @@ const IncludeMapEntry libc_include_map[] = {
|
||||
{ "<sys/ucontext.h>", kPrivate, "<ucontext.h>", kPublic },
|
||||
// Exports guaranteed by the C standard
|
||||
{ "<stdint.h>", kPublic, "<inttypes.h>", kPublic },
|
||||
+};
|
||||
+
|
||||
+// Private -> public include mappings for OpenBSD libc
|
||||
+const IncludeMapEntry libc_include_map[] = {
|
||||
+ { "<machine/_float.h>", kPrivate, "<float.h>", kPublic },
|
||||
+ { "<machine/_types.h>", kPrivate, "<sys/_types.h>", kPrivate },
|
||||
+ { "<machine/atomic.h>", kPrivate, "<sys/atomic.h>", kPublic },
|
||||
+ { "<machine/cdefs.h>", kPrivate, "<sys/cdefs.h>", kPublic },
|
||||
+ { "<machine/disklabel.h>", kPrivate, "<sys/disklabel.h>", kPublic },
|
||||
+ { "<machine/endian.h>", kPrivate, "<sys/endian.h>", kPrivate },
|
||||
+ { "<machine/limits.h>", kPrivate, "<sys/limits.h>", kPrivate },
|
||||
+ { "<machine/param.h>", kPrivate, "<sys/param.h>", kPublic },
|
||||
+ { "<machine/ptrace.h>", kPrivate, "<sys/ptrace.h>", kPublic },
|
||||
+ { "<machine/signal.h>", kPrivate, "<sys/signal.h>", kPrivate },
|
||||
+ { "<machine/stdarg.h>", kPrivate, "<sys/stdarg.h>", kPrivate },
|
||||
+ { "<machine/stdint.h>", kPrivate, "<sys/stdint.h>", kPrivate },
|
||||
+ { "<machine/varargs.h>", kPrivate, "<sys/varags.h>", kPrivate },
|
||||
+ { "<netinet6/in6.h>", kPrivate, "<netinet/in.h>", kPublic },
|
||||
+ { "<sys/_endian.h>", kPrivate, "<sys/endian.h>", kPrivate },
|
||||
+ { "<sys/_time.h>", kPrivate, "<time.h>", kPublic },
|
||||
+ { "<sys/_types.h>", kPrivate, "<sys/types.h>", kPublic },
|
||||
+ { "<sys/endian.h>", kPrivate, "<endian.h>", kPublic },
|
||||
+ { "<sys/dirent.h>", kPrivate, "<dirent.h>", kPublic },
|
||||
+ { "<sys/errno.h>", kPrivate, "<errno.h>", kPublic },
|
||||
+ { "<sys/fcntl.h>", kPrivate, "<fcntl.h>", kPublic },
|
||||
+ { "<sys/limits.h>", kPrivate, "<limits.h>", kPublic },
|
||||
+ { "<sys/poll.h>", kPrivate, "<poll.h>", kPublic },
|
||||
+ { "<sys/signal.h>", kPrivate, "<signal.h>", kPublic },
|
||||
+ { "<sys/stdarg.h>", kPrivate, "<stdarg.h>", kPublic },
|
||||
+ { "<sys/stdint.h>", kPrivate, "<stdint.h>", kPublic },
|
||||
+ { "<sys/syslimits.h>", kPrivate, "<limits.h>", kPublic },
|
||||
+ { "<sys/syslog.h>", kPrivate, "<syslog.h>", kPublic },
|
||||
+ { "<sys/termios.h>", kPrivate, "<termios.h>", kPublic },
|
||||
+ { "<sys/unistd.h>", kPrivate, "<unistd.h>", kPublic },
|
||||
+ { "<sys/uuid.h>", kPrivate, "<uuid.h>", kPublic },
|
||||
+ { "<sys/varargs.h>", kPrivate, "<varargs.h>", kPublic },
|
||||
};
|
||||
|
||||
const IncludeMapEntry stdlib_c_include_map[] = {
|
11
devel/include-what-you-use/pkg/DESCR
Normal file
11
devel/include-what-you-use/pkg/DESCR
Normal file
|
@ -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.
|
28
devel/include-what-you-use/pkg/PLIST
Normal file
28
devel/include-what-you-use/pkg/PLIST
Normal file
|
@ -0,0 +1,28 @@
|
|||
bin/fix_includes.py
|
||||
@bin bin/include-what-you-use
|
||||
bin/iwyu_tool.py
|
||||
@man man/man1/include-what-you-use.1
|
||||
share/doc/include-what-you-use/
|
||||
share/doc/include-what-you-use/IWYUMappings.md
|
||||
share/doc/include-what-you-use/IWYUPragmas.md
|
||||
share/doc/include-what-you-use/IWYUStyle.md
|
||||
share/doc/include-what-you-use/README.md
|
||||
share/doc/include-what-you-use/WhatIsAUse.md
|
||||
share/doc/include-what-you-use/WhyIWYU.md
|
||||
share/doc/include-what-you-use/WhyIWYUIsDifficult.md
|
||||
share/include-what-you-use/
|
||||
share/include-what-you-use/boost-1.64-all-private.imp
|
||||
share/include-what-you-use/boost-1.64-all.imp
|
||||
share/include-what-you-use/boost-all-private.imp
|
||||
share/include-what-you-use/boost-all.imp
|
||||
share/include-what-you-use/clang-6.intrinsics.imp
|
||||
share/include-what-you-use/gcc-8.intrinsics.imp
|
||||
share/include-what-you-use/gcc.libc.imp
|
||||
share/include-what-you-use/gcc.stl.headers.imp
|
||||
share/include-what-you-use/gcc.symbols.imp
|
||||
share/include-what-you-use/iwyu.gcc.imp
|
||||
share/include-what-you-use/libcxx.imp
|
||||
share/include-what-you-use/qt4.imp
|
||||
share/include-what-you-use/qt5_11.imp
|
||||
share/include-what-you-use/qt5_4.imp
|
||||
share/include-what-you-use/stl.c.headers.imp
|
Loading…
Add table
Add a link
Reference in a new issue