git: e968616046a3 - stable/14 - pkgbase: Move headers and libs out of runtime and utilities

From: Doug Rabson <dfr_at_FreeBSD.org>
Date: Sun, 12 Nov 2023 11:31:16 UTC
The branch stable/14 has been updated by dfr:

URL: https://cgit.FreeBSD.org/src/commit/?id=e968616046a32e4ac7b98b2aa7935c3a64f66ada

commit e968616046a32e4ac7b98b2aa7935c3a64f66ada
Author:     Doug Rabson <dfr@FreeBSD.org>
AuthorDate: 2023-09-11 08:38:46 +0000
Commit:     Doug Rabson <dfr@FreeBSD.org>
CommitDate: 2023-11-12 10:37:16 +0000

    pkgbase: Move headers and libs out of runtime and utilities
    
    Headers from src/include were in the runtime-dev package but
    subdirectories of src/include ended up in utilities-dev by default.
    Neither package is a good choice - the headers in src/include are not
    useful without the libraries contained in clibs-dev.
    
    This moves the standard C headers to clibs-dev (C++ headers are already
    in this package). While working on this, I found that various clang
    libraries and headers were also bundled into utilities-dev by default
    so these are also moved to clang-dev.
    
    I also added a FreeBSD-build-essential meta package to make it simple to
    install all the toolchain parts.
    
    PR:             254173
    Reviewed byb:   manu
    MFC after:      1 week
    Differential Revision: https://reviews.freebsd.org/D41815
    
    (cherry picked from commit 78847e1e592789dc85bddf4d2f1d9a8ce4614ff1)
---
 include/Makefile                 | 2 +-
 include/Makefile.inc             | 2 ++
 lib/clang/Makefile.inc           | 1 +
 lib/csu/Makefile.inc             | 1 +
 lib/libclang_rt/Makefile.inc     | 1 +
 release/packages/generate-ucl.sh | 3 +++
 6 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/Makefile b/include/Makefile
index d8cdbfed3663..f5985ebf091a 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -4,7 +4,7 @@
 
 .include <src.opts.mk>
 
-PACKAGE=runtime
+PACKAGE=clibs
 CLEANFILES= osreldate.h version
 SUBDIR= arpa protocols rpcsvc rpc xlocale
 .if ${MACHINE_CPUARCH} == "amd64"
diff --git a/include/Makefile.inc b/include/Makefile.inc
new file mode 100644
index 000000000000..14d7bf96e6bc
--- /dev/null
+++ b/include/Makefile.inc
@@ -0,0 +1,2 @@
+# Make sure all our subdirectory headers end up in clibs-dev
+PACKAGE=clibs
diff --git a/lib/clang/Makefile.inc b/lib/clang/Makefile.inc
index 0a2ae8f6b802..2dfc966726b0 100644
--- a/lib/clang/Makefile.inc
+++ b/lib/clang/Makefile.inc
@@ -1,6 +1,7 @@
 
 .include <bsd.compiler.mk>
 
+PACKAGE=	clang
 MK_PIE:=	no	# Explicit libXXX.a references
 
 .if ${COMPILER_TYPE} == "clang"
diff --git a/lib/csu/Makefile.inc b/lib/csu/Makefile.inc
index faf01b293b92..55aaf589f48f 100644
--- a/lib/csu/Makefile.inc
+++ b/lib/csu/Makefile.inc
@@ -1,3 +1,4 @@
+PACKAGE=	clibs-dev
 
 NO_WMISSING_VARIABLE_DECLARATIONS=
 # Can't instrument these files since that breaks non-sanitized programs.
diff --git a/lib/libclang_rt/Makefile.inc b/lib/libclang_rt/Makefile.inc
index 4832815643ae..263d1e340f3d 100644
--- a/lib/libclang_rt/Makefile.inc
+++ b/lib/libclang_rt/Makefile.inc
@@ -1,6 +1,7 @@
 
 .include <bsd.compiler.mk>
 
+PACKAGE=	clang
 CRTSRC=		${SRCTOP}/contrib/llvm-project/compiler-rt
 .include "compiler-rt-vars.mk"
 
diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh
index aef08e50c037..9e9680559428 100755
--- a/release/packages/generate-ucl.sh
+++ b/release/packages/generate-ucl.sh
@@ -44,6 +44,9 @@ main() {
 		certctl)
 			pkgdeps="caroot openssl"
 			;;
+		clang)
+			pkgdeps="lld clang-dev libcompiler_rt-dev"
+			;;
 
 		# -dev packages that have no corresponding non-dev package
 		# as a dependency.