pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

opentmux: Import opentmux-0.1 as wip/opentmux



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <iamleot%gmail.com@localhost>
Pushed By:	leot
Date:		Thu Oct 22 22:23:09 2026 +0200
Changeset:	e8c03dcb07818980b3647a0533e52196fb91e481

Added Files:
	opentmux/DESCR
	opentmux/Makefile
	opentmux/PLIST
	opentmux/distinfo
	opentmux/patches/patch-client.c
	opentmux/patches/patch-compat_imsg-buffer.c
	opentmux/patches/patch-compat_queue.h
	opentmux/patches/patch-proc.c
	opentmux/patches/patch-tmux.c

Log Message:
opentmux: Import opentmux-0.1 as wip/opentmux

This is a fork of tmux-3.6a before any AI was introduced into the
project.

tmux is a terminal multiplexer: it enables a number of terminals to be
created, accessed, and controlled from a single screen. tmux may be
detached from a screen and continue running in the background, then
later reattached.

This release runs on OpenBSD, FreeBSD, NetBSD, Linux, macOS and
Solaris.

Completely based on misc/tmux.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e8c03dcb07818980b3647a0533e52196fb91e481

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 opentmux/DESCR                              | 10 ++++++
 opentmux/Makefile                           | 52 +++++++++++++++++++++++++++++
 opentmux/PLIST                              |  3 ++
 opentmux/distinfo                           | 10 ++++++
 opentmux/patches/patch-client.c             | 17 ++++++++++
 opentmux/patches/patch-compat_imsg-buffer.c | 17 ++++++++++
 opentmux/patches/patch-compat_queue.h       | 34 +++++++++++++++++++
 opentmux/patches/patch-proc.c               | 17 ++++++++++
 opentmux/patches/patch-tmux.c               | 29 ++++++++++++++++
 9 files changed, 189 insertions(+)

diffs:
diff --git a/opentmux/DESCR b/opentmux/DESCR
new file mode 100644
index 0000000000..406b05c29e
--- /dev/null
+++ b/opentmux/DESCR
@@ -0,0 +1,10 @@
+This is a fork of tmux-3.6a before any AI was introduced into the
+project.
+
+tmux is a terminal multiplexer: it enables a number of terminals to be
+created, accessed, and controlled from a single screen. tmux may be
+detached from a screen and continue running in the background, then
+later reattached.
+
+This release runs on OpenBSD, FreeBSD, NetBSD, Linux, macOS and
+Solaris.
diff --git a/opentmux/Makefile b/opentmux/Makefile
new file mode 100644
index 0000000000..5beb1322c0
--- /dev/null
+++ b/opentmux/Makefile
@@ -0,0 +1,52 @@
+# $NetBSD: Makefile,v 1.71 2026/10/21 19:22:45 ktnb Exp $
+
+DISTNAME=		opentmux-0.1
+CATEGORIES=		misc
+MASTER_SITES=		${MASTER_SITE_CODEBERG:=opentmux/}
+CODEBERG_RELEASE=	v${PKGVERSION_NOREV}
+
+MAINTAINER=	leot%NetBSD.org@localhost
+HOMEPAGE=	https://codeberg.org/opentmux/opentmux/
+COMMENT=	Fork of tmux-3.6a before any AI was introduced
+LICENSE=	modified-bsd
+
+CONFLICTS=	tmux-[0-9]*
+
+GNU_CONFIGURE=	yes
+
+CONFIGURE_ARGS+=	--enable-sixel
+
+USE_TOOLS+=	pkg-config
+USE_FEATURES+=	strnlen
+
+SUBST_CLASSES+=			sysconfdir
+SUBST_STAGE.sysconfdir=		pre-configure
+SUBST_MESSAGE.sysconfdir=	Do not force sysconfdir to /etc
+SUBST_FILES.sysconfdir=		configure configure.ac
+SUBST_SED.sysconfdir=		-e '/Default opentmux\.conf goes in \/etc/d'
+SUBST_SED.sysconfdir+=		-e '/sysconfdir=\/etc/d'
+
+# opentmux expects setupterm in libcurses, but it is in libterminfo
+CONFIGURE_ARGS+=	ac_cv_lib_curses_setupterm=yes
+LDFLAGS.NetBSD+=	-lterminfo
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/compiler.mk"
+.if ${MACHINE_PLATFORM:MSunOS-5.1[0-9]-*} && \
+    ${CC_VERSION:Mgcc-4.[6-9].*}
+BUILDLINK_TRANSFORM+=	opt:-D_XPG4_2:-D_XPG6
+.endif
+
+# https://trac.macports.org/changeset/127986
+.if ${MACHINE_PLATFORM:MDarwin-1[0-9].*}
+CPPFLAGS+=	-D__DARWIN_VERS_1050=0
+.endif
+
+.if ${OPSYS} == "Darwin" || ${OPSYS} == "QNX"
+CONFIGURE_ARGS+=	--enable-utf8proc
+.include "../../converters/utf8proc/buildlink3.mk"
+.endif
+
+.include "../../devel/libevent/buildlink3.mk"
+.include "../../mk/curses.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/opentmux/PLIST b/opentmux/PLIST
new file mode 100644
index 0000000000..ea3ed12c0e
--- /dev/null
+++ b/opentmux/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2009/03/06 12:16:17 hasso Exp $
+bin/tmux
+man/man1/tmux.1
diff --git a/opentmux/distinfo b/opentmux/distinfo
new file mode 100644
index 0000000000..de228ebd75
--- /dev/null
+++ b/opentmux/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.64 2026/10/21 19:22:45 ktnb Exp $
+
+BLAKE2s (opentmux-0.1.tar.gz) = b88a89da63fc550d3a68d0e6cd0108ade9e3aec3026d124b8511d3ff8c64ec29
+SHA512 (opentmux-0.1.tar.gz) = 5d024cdfd35dfc77a93fce6f05b01547463af1a4977977f96b7cdfb1976a200244afa965479a9fe0e5e28368b0dc7db8f940b27706ed97e421ec16d7094ae1c3
+Size (opentmux-0.1.tar.gz) = 1363878 bytes
+SHA1 (patch-client.c) = 5fe1e0c82665b805573dab59c7f3faa5fc2c8abe
+SHA1 (patch-compat_imsg-buffer.c) = a4946b98414a0fbd8d3799f2622c5e736bb90833
+SHA1 (patch-compat_queue.h) = a65435dedb40f653f3c2650a6d2189743f5a6dcd
+SHA1 (patch-proc.c) = 500f9f7d33fdd7a554e77ec0a04358aac0eb0521
+SHA1 (patch-tmux.c) = 9d7901d4f8e2be49d542f294d0eda92e3a9c9a07
diff --git a/opentmux/patches/patch-client.c b/opentmux/patches/patch-client.c
new file mode 100644
index 0000000000..4bc0add6e2
--- /dev/null
+++ b/opentmux/patches/patch-client.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-client.c,v 1.4 2025/10/05 11:04:21 leot Exp $
+
+Add support for QNX.
+
+--- client.c.orig	2024-10-02 08:41:47.000000000 +0000
++++ client.c
+@@ -32,6 +32,10 @@
+ 
+ #include "tmux.h"
+ 
++#ifndef SA_RESTART
++# define SA_RESTART 0
++#endif
++
+ static struct tmuxproc	*client_proc;
+ static struct tmuxpeer	*client_peer;
+ static uint64_t		 client_flags;
diff --git a/opentmux/patches/patch-compat_imsg-buffer.c b/opentmux/patches/patch-compat_imsg-buffer.c
new file mode 100644
index 0000000000..2e5aec6698
--- /dev/null
+++ b/opentmux/patches/patch-compat_imsg-buffer.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-compat_imsg-buffer.c,v 1.3 2026/01/18 20:30:49 wiz Exp $
+
+Add support for QNX.
+
+--- compat/imsg-buffer.c.orig	2025-06-24 14:04:21.000000000 +0000
++++ compat/imsg-buffer.c
+@@ -45,6 +45,10 @@
+ #undef be64toh
+ #define be64toh ntohll
+ 
++#if defined(__QNX__) && !defined(IOV_MAX)
++# define IOV_MAX 16
++#endif
++
+ struct ibufqueue {
+ 	TAILQ_HEAD(, ibuf)	bufs;
+ 	uint32_t		queued;
diff --git a/opentmux/patches/patch-compat_queue.h b/opentmux/patches/patch-compat_queue.h
new file mode 100644
index 0000000000..17afc86591
--- /dev/null
+++ b/opentmux/patches/patch-compat_queue.h
@@ -0,0 +1,34 @@
+$NetBSD: patch-compat_queue.h,v 1.3 2024/10/27 17:53:30 leot Exp $
+
+Fix build with xcode 16 and 4.2.
+
+--- compat/queue.h.orig	2024-10-27 17:47:06.209141804 +0000
++++ compat/queue.h
+@@ -32,6 +32,27 @@
+  *	@(#)queue.h	8.5 (Berkeley) 8/20/94
+  */
+ 
++#ifndef __has_include
++#define __has_include(x) 0
++#endif
++
++#if defined(__APPLE__)
++#  if __has_include(<sys/queue.h>)
++#    include <sys/queue.h>
++#    if !defined(TAILQ_REPLACE)
++#define TAILQ_REPLACE(head, elm, elm2, field) do {			\
++	if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != NULL)	\
++		(elm2)->field.tqe_next->field.tqe_prev =		\
++		    &(elm2)->field.tqe_next;				\
++	else								\
++		(head)->tqh_last = &(elm2)->field.tqe_next;		\
++	(elm2)->field.tqe_prev = (elm)->field.tqe_prev;			\
++	*(elm2)->field.tqe_prev = (elm2);				\
++} while (0)
++#    endif
++#  endif
++#endif
++
+ #ifndef	_COMPAT_QUEUE_H_
+ #define	_COMPAT_QUEUE_H_
+ 
diff --git a/opentmux/patches/patch-proc.c b/opentmux/patches/patch-proc.c
new file mode 100644
index 0000000000..3c490f9711
--- /dev/null
+++ b/opentmux/patches/patch-proc.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-proc.c,v 1.2 2025/10/05 11:04:21 leot Exp $
+
+Add support for QNX.
+
+--- proc.c.orig	2024-02-13 10:16:07.000000000 +0000
++++ proc.c
+@@ -33,6 +33,10 @@
+ 
+ #include "tmux.h"
+ 
++#ifndef SA_RESTART
++# define SA_RESTART 0
++#endif
++
+ struct tmuxproc {
+ 	const char	 *name;
+ 	int		  exit;
diff --git a/opentmux/patches/patch-tmux.c b/opentmux/patches/patch-tmux.c
new file mode 100644
index 0000000000..7de8c8d81a
--- /dev/null
+++ b/opentmux/patches/patch-tmux.c
@@ -0,0 +1,29 @@
+$NetBSD: patch-tmux.c,v 1.2 2025/10/05 11:04:21 leot Exp $
+
+Add support for QNX.
+
+--- tmux.c.orig	2024-10-05 05:57:07.000000000 +0000
++++ tmux.c
+@@ -22,7 +22,9 @@
+ 
+ #include <errno.h>
+ #include <fcntl.h>
+-#include <langinfo.h>
++#ifndef __QNX__
++# include <langinfo.h>
++#endif
+ #include <locale.h>
+ #include <pwd.h>
+ #include <signal.h>
+@@ -361,9 +363,11 @@ main(int argc, char **argv)
+ 	    setlocale(LC_CTYPE, "C.UTF-8") == NULL) {
+ 		if (setlocale(LC_CTYPE, "") == NULL)
+ 			errx(1, "invalid LC_ALL, LC_CTYPE or LANG");
++#ifndef __QNX__
+ 		s = nl_langinfo(CODESET);
+ 		if (strcasecmp(s, "UTF-8") != 0 && strcasecmp(s, "UTF8") != 0)
+ 			errx(1, "need UTF-8 locale (LC_CTYPE) but have %s", s);
++#endif
+ 	}
+ 
+ 	setlocale(LC_TIME, "");


Home | Main Index | Thread Index | Old Index