From: Stuart Henderson Subject: x11/notion update To: Stefan Hagen Cc: ports Date: Mon, 8 Jun 2026 22:11:34 +0100 this updates to a newer version of notion, unbreaking build with llvm 22. lua version detection was changed a bit upstream, rather than yet more hacks to cope (a common theme with ports using lua) I've just committed a change to the lua ports to install links to the binaries under names that are more commonly used in other OS, so this diff requires either rebuilding lua from brand new ports, or temporarily adding them locally: # cd /usr/local/bin # ln lua54 lua5.4 # ln luac54 luac5.4 ok? Index: Makefile =================================================================== RCS file: /cvs/ports/x11/notion/Makefile,v diff -u -p -r1.3 Makefile --- Makefile 10 Dec 2023 20:14:33 -0000 1.3 +++ Makefile 8 Jun 2026 21:07:48 -0000 @@ -1,7 +1,6 @@ COMMENT= light, keyboard friendly static tiling window manager -DIST_TUPLE= github raboof notion 4.0.2 . -REVISION= 0 +DIST_TUPLE= github raboof notion 4.0.5 . CATEGORIES= x11 @@ -14,8 +13,8 @@ PERMIT_PACKAGE= Yes MODULES= lang/lua -# works with lua 5.1-5.3 -MODLUA_VERSION= 5.3 +# works with lua 5.1-5.4 +MODLUA_VERSION= 5.4 WANTLIB += ICE SM X11 Xext Xft Xinerama Xrandr c intl WANTLIB += m readline ${MODLUA_WANTLIB} @@ -29,7 +28,8 @@ USE_GMAKE= Yes MAKE_FLAGS= ETCDIR=$(SYSCONFDIR)/notion \ LOCALBASE=${LOCALBASE} \ - NOTION_RELEASE=${GH_TAGNAME} + NOTION_RELEASE=${GH_TAGNAME} \ + LUA_VERSION=${MODLUA_VERSION} FAKE_FLAGS= ETCDIR=$(PREFIX)/share/examples/notion \ MANDIR=$(PREFIX)/man \ PREFIX=${TRUEPREFIX} @@ -39,12 +39,5 @@ LDFLAGS+= -L${LOCALBASE}/lib -L$(MODLUA_ NOTION_DIR= ${SYSCONFDIR}/notion SUBST_VARS+= NOTION_DIR - -# XXX should set LUA_VERSION in MAKE_FLAGS instead, but that doesn't work -# with our non-standard lua binary/pkg-config naming scheme - -pre-configure: - sed -e 's/5\.3\ 5\.2 5\.1/$(MODLUA_DEP_VERSION)/g' -i \ - $(WRKSRC)/build/lua-detect.mk .include Index: distinfo =================================================================== RCS file: /cvs/ports/x11/notion/distinfo,v diff -u -p -r1.2 distinfo --- distinfo 10 Dec 2023 20:14:33 -0000 1.2 +++ distinfo 8 Jun 2026 21:07:48 -0000 @@ -1,2 +1,2 @@ -SHA256 (raboof-notion-4.0.2.tar.gz) = 3O/WINAo9lQcFYecPbIY3ggd986NLpy0/H3dm5JTtpg= -SIZE (raboof-notion-4.0.2.tar.gz) = 790842 +SHA256 (raboof-notion-4.0.5.tar.gz) = Wpn5ZH/af1NUvuZhctQGq3CKcZccEZbzmJ6Nt0QhQUQ= +SIZE (raboof-notion-4.0.5.tar.gz) = 794165 Index: patches/patch-build_libs_mk =================================================================== RCS file: /cvs/ports/x11/notion/patches/patch-build_libs_mk,v diff -u -p -r1.2 patch-build_libs_mk --- patches/patch-build_libs_mk 11 Mar 2022 20:16:49 -0000 1.2 +++ patches/patch-build_libs_mk 8 Jun 2026 21:07:48 -0000 @@ -3,7 +3,7 @@ libtu,libext need want gettext Index: build/libs.mk --- build/libs.mk.orig +++ build/libs.mk -@@ -19,8 +19,8 @@ else +@@ -10,14 +10,14 @@ CFLAGS += -DNOTION_RELEASE='"$(NOTION_RELEASE)"' LIBS_SUBDIRS += libtu LIBTU_DIR = $(TOPDIR)/libtu @@ -12,9 +12,7 @@ Index: build/libs.mk +LIBTU_INCLUDES = -I$(TOPDIR) -I${LOCALBASE}/include +LIBTU_LIBS = -L$(LIBTU_DIR) -L${LOCALBASE}/lib -lintl -liconv -ltu - endif - -@@ -39,8 +39,8 @@ else + #libextl LIBS_SUBDIRS += libextl LIBEXTL_DIR = $(TOPDIR)/libextl @@ -24,4 +22,3 @@ Index: build/libs.mk +LIBEXTL_LIBS = -L$(LIBEXTL_DIR) -L${LOCALBASE}/lib -lintl -liconv -lextl MKEXPORTS = $(LUA) $(LIBEXTL_DIR)/libextl-mkexports - Index: patches/patch-libtu_test_Makefile =================================================================== RCS file: patches/patch-libtu_test_Makefile diff -N patches/patch-libtu_test_Makefile --- patches/patch-libtu_test_Makefile 11 Mar 2022 20:16:49 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,21 +0,0 @@ -Index: libtu/test/Makefile ---- libtu/test/Makefile.orig -+++ libtu/test/Makefile -@@ -6,7 +6,7 @@ include $(TOPDIR)/build/system-inc.mk - - SOURCES=../misc.c ../tokenizer.c ../util.c ../output.c - --LIBS += $(LUA_LIBS) $(DL_LIBS) -lm -+LIBS += $(LUA_LIBS) $(DL_LIBS) $(LIBTU_LIBS) -lm - INCLUDES += $(LIBTU_INCLUDES) - CFLAGS += $(XOPEN_SOURCE) $(C99_SOURCE) - -@@ -17,6 +17,6 @@ include $(TOPDIR)/build/rules.mk - ###################################### - - test: $(SOURCES) -- $(CC) $(CFLAGS) -o tutest $(SOURCES) tutest.c $(LIBS) -+ $(CC) $(CFLAGS) $(INCLUDES) -o tutest $(SOURCES) tutest.c $(LIBS) - ./tutest - $(RM) ./tutest -\ No newline at end of file Index: patches/patch-man_Makefile =================================================================== RCS file: /cvs/ports/x11/notion/patches/patch-man_Makefile,v diff -u -p -r1.2 patch-man_Makefile --- patches/patch-man_Makefile 11 Mar 2022 20:16:49 -0000 1.2 +++ patches/patch-man_Makefile 8 Jun 2026 21:07:48 -0000 @@ -1,13 +1,7 @@ Index: man/Makefile --- man/Makefile.orig +++ man/Makefile -@@ -8,12 +8,12 @@ include $(TOPDIR)/build/system-inc.mk - - ###################################### - --SHELL=bash -o pipefail -+SHELL=sh -o pipefail - +@@ -13,7 +13,7 @@ SHELL=sh -e TARGETS=notion.1 notionflux.1 welcome.txt MKMAN=$(LUA) ../build/mkman.lua Index: patches/patch-mod_notionflux_mod_notionflux_c =================================================================== RCS file: patches/patch-mod_notionflux_mod_notionflux_c diff -N patches/patch-mod_notionflux_mod_notionflux_c --- patches/patch-mod_notionflux_mod_notionflux_c 11 Mar 2022 20:16:49 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,80 +0,0 @@ -stdio is defined already in stdio.h - -Index: mod_notionflux/mod_notionflux.c ---- mod_notionflux/mod_notionflux.c.orig -+++ mod_notionflux/mod_notionflux.c -@@ -36,7 +36,7 @@ - - typedef struct{ - int fd; -- FILE *stdout; -+ FILE *stdoutput; - int ndata; - char *data; - } Buf; -@@ -64,9 +64,9 @@ static void close_conn(Buf *buf) - close(buf->fd); - buf->fd=-1; - buf->ndata=0; -- if(buf->stdout!=NULL){ -- fclose(buf->stdout); -- buf->stdout=NULL; -+ if(buf->stdoutput!=NULL){ -+ fclose(buf->stdoutput); -+ buf->stdoutput=NULL; - } - if(buf->data!=NULL){ - free(buf->data); -@@ -147,11 +147,11 @@ static void receive_data(int fd, void *buf_) - bool success=FALSE; - int idx=buf-bufs; - -- if(buf->stdout==NULL){ /* no fd received yet, must be the very beginning */ -- int stdout_fd=unix_recv_fd(fd); -- if(stdout_fd==-2) -+ if(buf->stdoutput==NULL){ /* no fd received yet, must be the very beginning */ -+ int stdoutput_fd=unix_recv_fd(fd); -+ if(stdoutput_fd==-2) - goto closefd; -- if(stdout_fd==-3){ -+ if(stdoutput_fd==-3){ - char const *err="Magic number mismatch on notionflux socket - " - "is notionflux the same version as notion?"; - writes(fd, "E"); -@@ -160,13 +160,13 @@ static void receive_data(int fd, void *buf_) - goto closefd; - } - -- if(stdout_fd==-1) { -+ if(stdoutput_fd==-1) { - if(errno==EWOULDBLOCK || errno==EAGAIN) - return; /* try again later */ - warn("No file descriptor received from notionflux, closing."); - goto closefd; - } -- if((buf->stdout=fdopen(stdout_fd, "w"))==NULL) { -+ if((buf->stdoutput=fdopen(stdoutput_fd, "w"))==NULL) { - warn("fdopen() failed on fd from notionflux"); - goto closefd; - } -@@ -239,9 +239,9 @@ EXTL_SAFE - EXTL_EXPORT - bool mod_notionflux_xwrite(int idx, const char *str) - { -- if (idx<0 || idx>=MAX_SERVED || bufs[idx].stdout==NULL) -+ if (idx<0 || idx>=MAX_SERVED || bufs[idx].stdoutput==NULL) - return FALSE; -- return fputs(str, bufs[idx].stdout)!=EOF; -+ return fputs(str, bufs[idx].stdoutput)!=EOF; - } - - static void connection_attempt(int lfd, void *UNUSED(data)) -@@ -410,7 +410,7 @@ bool mod_notionflux_init() - - for(i=0; i