From dbdc9539a9aff589adbc81a7440e596cad5e3bdb Mon Sep 17 00:00:00 2001 From: lotherk Date: Tue, 17 Nov 2026 23:16:04 +0000 Subject: [PATCH] splinter: _XOPEN_SOURCE for fchmod (XSI, not base POSIX); recipe tracked NetBSD's declares fchmod only with _XOPEN_SOURCE or _NETBSD_SOURCE; with plain _POSIX_C_SOURCE=200809L config.c got an implicit declaration (build/logs/splinter-build-2026-11-17d.log). Both the project's Makefile default and the recipe's appended CFLAGS carry -D_XOPEN_SOURCE=700 now. ext/src/splinter/pkgsrc needed pkgsrc/' hides every directory of that name (ext/AGENTS.md says so for imports). --- ext/src/splinter/Makefile | 2 +- ext/src/splinter/pkgsrc/Makefile | 44 ++++++++++++++++++++++++++++++++ ext/src/splinter/pkgsrc/PLIST | 19 ++++++++++++++ ext/src/splinter/pkgsrc/distinfo | 5 ++++ 4 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 ext/src/splinter/pkgsrc/Makefile create mode 100644 ext/src/splinter/pkgsrc/PLIST create mode 100644 ext/src/splinter/pkgsrc/distinfo diff --git a/ext/src/splinter/Makefile b/ext/src/splinter/Makefile index 3b62a2286d..2f0aee33ef 100644 --- a/ext/src/splinter/Makefile +++ b/ext/src/splinter/Makefile @@ -13,7 +13,7 @@ # each symbol in the process. Two copies would mean two registries. CC ?= cc -CFLAGS ?= -std=c99 -O2 -Wall -Wextra -Werror -D_POSIX_C_SOURCE=200809L \ +CFLAGS ?= -std=c99 -O2 -Wall -Wextra -Werror -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 \ -fPIC -Iinclude -Isrc/backend -Isrc/frontend -Ivendor/libmcp -Ivendor/netbsd-curses/libcurses LDFLAGS ?= LIBS ?= -lpthread diff --git a/ext/src/splinter/pkgsrc/Makefile b/ext/src/splinter/pkgsrc/Makefile new file mode 100644 index 0000000000..a94ae57fd3 --- /dev/null +++ b/ext/src/splinter/pkgsrc/Makefile @@ -0,0 +1,44 @@ +# $NetBSD$ +# +# Makronix: splinter is the project's own C99/POSIX agent harness +# (ext/src/splinter, IMPORT). It is built from the archive tools/ext-dist.sh +# makes out of ext/src/splinter, so there is no MASTER_SITES. + +DISTNAME= splinter-0.1 +CATEGORIES= misc +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} + +MAINTAINER= lotherk@lother.io +COMMENT= C99/POSIX agent harness with a curses interface +LICENSE= modified-bsd + +# The top Makefile is POSIX make; it runs the vendored NetBSD curses through +# $(MAKE) -f GNUmakefile, which is GNU make. The build host's GNU make is +# what USE_TOOLS brings; the target compiler comes from pkgsrc's wrappers. +USE_TOOLS+= gmake +MAKE_PROGRAM= ${GMAKE} + +NO_CONFIGURE= yes +NO_BUILDLINK= yes +BUILD_TARGET= all +INSTALL_TARGET= install + +MAKE_FLAGS+= PREFIX=${PREFIX} +MAKE_FLAGS+= DESTDIR=${DESTDIR} + +# splinter's Makefile has its own CFLAGS default: the dialect, the include +# paths of the source tree and -fPIC. A CFLAGS on the command line replaces +# that default, so the package's flags are appended here. No -Werror: a +# warning in the distribution is not a reason to stop the build. One line +# and escaped spaces: a continuation ate the space before -fPIC (measured +# 2026-11-17: "make: PIC -Iinclude ... No such file or directory"). +SPL_CFLAGS= -std=c99\ -D_POSIX_C_SOURCE=200809L\ -D_XOPEN_SOURCE=700\ -fPIC\ -Iinclude\ -Isrc/backend\ -Isrc/frontend\ -Ivendor/libmcp\ -Ivendor/netbsd-curses/libcurses +MAKE_FLAGS+= CFLAGS=${CFLAGS:Q}\ ${SPL_CFLAGS} + +# libsplinter.so is what the binaries and the plugins link against +LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib +MAKE_FLAGS+= LDFLAGS=${LDFLAGS:Q} +MAKE_FLAGS+= LIBS=-lpthread + +.include "../../mk/pthread.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/ext/src/splinter/pkgsrc/PLIST b/ext/src/splinter/pkgsrc/PLIST new file mode 100644 index 0000000000..d506e47741 --- /dev/null +++ b/ext/src/splinter/pkgsrc/PLIST @@ -0,0 +1,19 @@ +bin/splinter +bin/splinterctl +lib/libsplinter.so +lib/splinter/plugins/a2a.so +lib/splinter/plugins/cli.so +lib/splinter/plugins/clock.so +lib/splinter/plugins/cps.so +lib/splinter/plugins/focus.so +lib/splinter/plugins/junction.so +lib/splinter/plugins/kids.so +lib/splinter/plugins/lcm.so +lib/splinter/plugins/mcp.so +lib/splinter/plugins/processes.so +lib/splinter/plugins/provider.so +lib/splinter/plugins/reminder.so +lib/splinter/plugins/ring.so +lib/splinter/plugins/scheduler.so +lib/splinter/plugins/self.so +lib/splinter/plugins/status.so diff --git a/ext/src/splinter/pkgsrc/distinfo b/ext/src/splinter/pkgsrc/distinfo new file mode 100644 index 0000000000..957abd15df --- /dev/null +++ b/ext/src/splinter/pkgsrc/distinfo @@ -0,0 +1,5 @@ +$NetBSD$ + +BLAKE2s (splinter-0.1.tar.gz) = e5467cbb05199ff7db60985b4fa86375e722864209d1a757b8d8e58c1101f084 +SHA512 (splinter-0.1.tar.gz) = 462aea43dc63cb7f909c6957e4a0950cd852942c4b36d6196cf86274023dbc0c2d97e76093e817449166fa28c3eba56e2af5d839c2ae3b1475e29d4e87d58769 +Size (splinter-0.1.tar.gz) = 1274712 bytes