On Wed, Feb 12, 2025 at 06:39:25AM +0100, Anton Lindqvist wrote:
> Hi,
> Update include-what-you-use (IWYU) to version 0.23. As each IWYU release
> is tied to a specific LLVM release, this puts a firm dependency on
> llvm-19 from ports.
>
> Comments? OK?
you missed update-plist, there are some new files
more comments below
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/include-what-you-use/Makefile,v
> diff -u -p -r1.32 Makefile
> --- Makefile 21 Dec 2024 11:39:33 -0000 1.32
> +++ Makefile 2 Feb 2025 07:24:20 -0000
> @@ -1,8 +1,9 @@
> +DPB_PROPERTIES= parallel
why set this? there are only around 16 files to build
> +
> COMMENT= tool to analyse \#includes in C and C++ source files
> CATEGORIES= devel
> -DISTNAME= include-what-you-use-0.20.src
> +DISTNAME= include-what-you-use-0.23.src
> PKGNAME= ${DISTNAME:.src=}
> -REVISION= 1
>
> HOMEPAGE= https://include-what-you-use.org
> SITES= ${HOMEPAGE}/downloads/
> @@ -19,7 +20,7 @@ MODULES= devel/cmake lang/clang lang/py
> MODPY_BUILDDEP= No
> MODPY_ADJ_FILES= *.py
>
> -MODCLANG_VERSION= 16
> +MODCLANG_VERSION= 19
> MODCLANG_COMPILER_LINKS= No
> MODCLANG_RUNDEP= Yes
>
> @@ -27,7 +28,7 @@ LLVM_CMAKE_BASE = ${LOCALBASE}/llvm${MOD
> CONFIGURE_ARGS = -DLLVM_DIR=${LLVM_CMAKE_BASE}/llvm \
> -DClang_DIR=${LLVM_CMAKE_BASE}/clang
>
> -COMPILER= base-clang ports-gcc
> +COMPILER= ports-clang
it builds with base clang, why change this?
> COMPILER_LANGS= c++
>
> DOCDIR= ${PREFIX}/share/doc/include-what-you-use
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/devel/include-what-you-use/distinfo,v
> diff -u -p -r1.12 distinfo
> --- distinfo 15 Nov 2023 02:04:13 -0000 1.12
> +++ distinfo 2 Feb 2025 07:24:20 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (include-what-you-use-0.20.src.tar.gz) =
> dfzh5khfKA+PE/TC0JCxHS/SECtQhXUHyEE6kZt6+Jk=
> -SIZE (include-what-you-use-0.20.src.tar.gz) = 766090
> +SHA256 (include-what-you-use-0.23.src.tar.gz) =
> AATVqRaXF6zy9IEkilv8FcfVXdwrnNx/RhsG6T1Jxz8=
> +SIZE (include-what-you-use-0.23.src.tar.gz) = 812613
> Index: patches/patch-iwyu_include_picker_cc
> ===================================================================
> RCS file:
> /cvs/ports/devel/include-what-you-use/patches/patch-iwyu_include_picker_cc,v
> diff -u -p -r1.10 patch-iwyu_include_picker_cc
> --- patches/patch-iwyu_include_picker_cc 15 Nov 2023 02:04:13 -0000
> 1.10
> +++ patches/patch-iwyu_include_picker_cc 2 Feb 2025 07:24:20 -0000
> @@ -1,47 +1,42 @@
> Index: iwyu_include_picker.cc
> --- iwyu_include_picker.cc.orig
> +++ iwyu_include_picker.cc
> -@@ -136,8 +136,6 @@ const IncludeMapEntry libc_symbol_map[] = {
> +@@ -124,7 +124,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 },
> -@@ -172,8 +170,6 @@ const IncludeMapEntry libc_symbol_map[] = {
> - { "nlink_t", kPrivate, "<sys/stat.h>", kPublic },
> + { "int8_t", kPrivate, "<stdint.h>", kPublic },
> + { "int16_t", kPrivate, "<stdint.h>", kPublic },
> +@@ -147,7 +146,6 @@ const IncludeMapEntry libc_symbol_map[] = {
> + { "nlink_t", kPrivate, "<sys/types.h>", kPublic },
> { "ntohl", kPrivate, "<arpa/inet.h>", kPublic },
> { "ntohs", kPrivate, "<arpa/inet.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 },
> -@@ -208,13 +204,10 @@ const IncludeMapEntry libc_symbol_map[] = {
> - { "sigevent", kPrivate, "<time.h>", kPublic },
> + { "optarg", kPrivate, "<unistd.h>", kPublic },
> + { "opterr", kPrivate, "<unistd.h>", kPublic },
> +@@ -161,10 +159,8 @@ const IncludeMapEntry libc_symbol_map[] = {
> + { "sig_atomic_t", kPrivate, "<signal.h>", kPublic },
> + { "sigevent", kPrivate, "<signal.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 },
> +- { "socklen_t", kPrivate, "<sys/socket.h>", kPublic },
> { "ssize_t", kPrivate, "<sys/types.h>", kPublic },
> - { "ssize_t", kPrivate, "<aio.h>", kPublic },
> - { "ssize_t", kPrivate, "<monetary.h>", kPublic },
> -@@ -296,6 +289,7 @@ const IncludeMapEntry libc_symbol_map[] = {
> - { "size_t", kPrivate, "<unistd.h>", kPublic },
> + { "stack_t", kPrivate, "<signal.h>", kPublic },
> + { "stat", kPrivate, "<sys/stat.h>", kPublic },
> +@@ -190,6 +186,7 @@ const IncludeMapEntry libc_symbol_map[] = {
> + { "size_t", kPrivate, "<time.h>", kPublic },
> + { "size_t", kPrivate, "<uchar.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
> -@@ -321,6 +315,10 @@ const IncludeMapEntry libc_symbol_map[] = {
> +@@ -216,6 +213,10 @@ const IncludeMapEntry libc_symbol_map[] = {
> { "calloc", kPrivate, "<stdlib.h>", kPublic },
> { "realloc", kPrivate, "<stdlib.h>", kPublic },
> { "free", kPrivate, "<stdlib.h>", kPublic },
> @@ -52,16 +47,16 @@ Index: iwyu_include_picker.cc
> // Entries for NULL
> { "NULL", kPrivate, "<stddef.h>", kPublic }, // 'canonical' location for
> NULL
> { "NULL", kPrivate, "<clocale>", kPublic },
> -@@ -377,7 +375,7 @@ const IncludeMapEntry stdlib_cxx_symbol_map[] = {
> - // Symbol -> include mappings for GNU libstdc++
> - const IncludeMapEntry libstdcpp_symbol_map[] = {};
> +@@ -279,7 +280,7 @@ const IncludeMapEntry libstdcpp_symbol_map[] = {
> + { "std::declval", kPrivate, "<utility>", 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
> -@@ -590,6 +588,42 @@ const IncludeMapEntry libc_include_map[] = {
> +@@ -493,6 +494,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 },
>
>