git: a0aa88c3b084 - main - sysutils/screen: Option to disable socketdir

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Mon, 09 May 2022 18:11:12 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a0aa88c3b0847349a629018414b0c97f66e0155a

commit a0aa88c3b0847349a629018414b0c97f66e0155a
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-04-04 15:01:28 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-05-09 17:48:12 +0000

    sysutils/screen: Option to disable socketdir
    
    Some users may prefer not to have screen sockets in /tmp/screens (EUID== 0)
    and /tmp/uscreens (EUID != 0), preferring instead to keep screen sockets in
    the user's home directory. Enabling the NOSOCKETDIR option accomplishes
    this.
    
    Reported by:    "John W. O'Brien" <john@saltant.com>
    MFH:            2022Q2
---
 sysutils/screen/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sysutils/screen/Makefile b/sysutils/screen/Makefile
index 595f4c1236e7..53d60822795b 100644
--- a/sysutils/screen/Makefile
+++ b/sysutils/screen/Makefile
@@ -18,7 +18,8 @@ COMMENT=	Multi-screen window manager
 
 LICENSE=	GPLv3
 
-OPTIONS_DEFINE=		INFO NETHACK XTERM_256 SYSTEM_SCREENRC MULTIUSER
+OPTIONS_DEFINE=		INFO NETHACK XTERM_256 SYSTEM_SCREENRC MULTIUSER \
+			NOSOCKETDIR
 OPTIONS_DEFAULT=	INFO NETHACK XTERM_256 SOCKETS SYSTEM_SCREENRC \
 			NCURSES_DEFAULT MULTIUSER
 OPTIONS_SINGLE=		IPC NCURSES
@@ -35,6 +36,7 @@ MULTIUSER_PLIST_SUB_OFF=MULTISUID="@(,,0555) "
 NCURSES_DEFAULT_DESC=	Depend on ncurses (ports if installed, otherwise base)
 NCURSES_BASE_DESC=	Depend on ncurses in base
 NCURSES_PORT_DESC=	Depend on devel/ncurses in ports
+NOSOCKETDIR_DESC=	Use ~/.screen instead of socketdir
 
 NCURSES_DEFAULT_USES=	ncurses
 NCURSES_BASE_USES=	ncurses:base
@@ -76,6 +78,10 @@ CFLAGS+=	-DCOLORS256
 CFLAGS+=	-DNONETHACK
 .endif
 
+.if ! ${PORT_OPTIONS:MNOSOCKETDIR}
+CONFIGURE_ARGS+=	--disable-socket-dir
+.endif
+
 post-patch:
 	@${RM} ${WRKSRC}/doc/screen.info*