git: 43808d10e235 - main - sysutils/screen*: Rename screen and introduce a meta port

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Thu, 29 Aug 2024 03:36:17 UTC
The branch main has been updated by cy:

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

commit 43808d10e2359ee97c2a37d851bbb78e72eeabe3
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2024-08-29 02:33:47 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2024-08-29 03:35:49 +0000

    sysutils/screen*: Rename screen and introduce a meta port
    
    This is in preparation for the import of screen 5.0.0. I've tried
    screen-devel (5.0.0 prelrelease). There were some bugs and
    inconsistencies with screen 4.9.1. So we move screen to screen49
    to maintain a version of screen that is known to work.
    
    This implements the concept of a master screen port by renaming it to
    screen49 and creating a slave port called screen.  The idea of this is
    similar in concept used with the cfengine or krb5 family of ports.
    Users should never need to change port origins when a new stable
    version of screen is committed.
    
    People can install the screen port or package as before. However if they
    choose to use the other screen port/package they may remove screen and
    install the versioned "master" port/package directly.
    
    This is in preparation for import of screen 5.0.0 into the ports
    collection. Unfortunately my initial testing of screen 5.0.0 using the
    screen-devel port uncovered an annoying (to me) bug, which I have opened
    an issue with our upstream. I have not found the time to test their
    patches enough to feel comfortalbe replacing the existing screen 4.9.1
    with 5.0.0. When 5.0.0 will be imported as sysutils/screen50, it will
    not become the default master port until we believe it won't become
    a source of many bugzilla bugs.
---
 sysutils/Makefile                                  |   1 +
 sysutils/screen/Makefile                           | 121 +-------------------
 sysutils/screen49/Makefile                         | 123 +++++++++++++++++++++
 sysutils/{screen => screen49}/distinfo             |   0
 .../{screen => screen49}/files/patch-attacher.c    |   0
 .../{screen => screen49}/files/patch-configure.ac  |   0
 .../files/patch-doc__Makefile.in                   |   0
 .../{screen => screen49}/files/patch-doc_screen.1  |   0
 sysutils/{screen => screen49}/files/patch-extern.h |   0
 sysutils/{screen => screen49}/files/patch-misc.c   |   0
 sysutils/{screen => screen49}/files/patch-os.h     |   0
 .../{screen => screen49}/files/patch-osdef.h.in    |   0
 sysutils/{screen => screen49}/files/patch-resize.c |   0
 sysutils/{screen => screen49}/files/patch-screen.c |   0
 sysutils/{screen => screen49}/files/patch-socket.c |   0
 .../{screen => screen49}/files/patch-termcap.c     |   0
 .../files/patch-terminfo__checktc.c                |   0
 sysutils/{screen => screen49}/files/patch-utmp.c   |   0
 .../{screen => screen49}/files/screenrc.sample     |   0
 sysutils/{screen => screen49}/pkg-descr            |   0
 sysutils/{screen => screen49}/pkg-message          |   0
 sysutils/{screen => screen49}/pkg-plist            |   0
 22 files changed, 128 insertions(+), 117 deletions(-)

diff --git a/sysutils/Makefile b/sysutils/Makefile
index 6ee668d98969..8f08eb311fdf 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -1361,6 +1361,7 @@
     SUBDIR += schedutils
     SUBDIR += schilyutils
     SUBDIR += screen
+    SUBDIR += screen49
     SUBDIR += screen-devel
     SUBDIR += screenfetch
     SUBDIR += screenie
diff --git a/sysutils/screen/Makefile b/sysutils/screen/Makefile
index f963b853b839..29a375dce6ae 100644
--- a/sysutils/screen/Makefile
+++ b/sysutils/screen/Makefile
@@ -1,119 +1,6 @@
-PORTNAME=	screen
-PORTVERSION=	4.9.1
-PORTREVISION=	5
-CATEGORIES=	sysutils
-MASTER_SITES=	GNU \
-		ftp://ftp.gnu.org/gnu/screen/ \
-		ftp://gnu.mirror.iweb.com/screen/ \
-		http://gnu.mirror.iweb.com/screen/ \
-		http://mirror.sdunix.com/gnu/ \
-		ftp://mirrors.kernel.org/gnu/screen/ \
-		http://cschubert.com/distfiles/ \
-		LOCAL/cy
+VERSIONS=		49
+SCREEN_VERSION?=	49
 
-MAINTAINER=	cy@FreeBSD.org
-COMMENT=	Multi-screen window manager
-WWW=		https://www.gnu.org/software/screen/
+MASTERDIR=		${.CURDIR}/../screen${SCREEN_VERSION}
 
-CONFLICTS=	screen-devel*
-
-LICENSE=	GPLv3
-
-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
-OPTIONS_SINGLE_IPC=	SOCKETS NAMED_PIPES
-OPTIONS_SINGLE_NCURSES=	NCURSES_DEFAULT NCURSES_BASE NCURSES_PORT
-NETHACK_DESC=		Enable nethack-style messages
-XTERM_256_DESC=		Enable support for 256 colour xterm
-SOCKETS_DESC=		Use new (4.2.1+) sockets for IPC (default)
-NAMED_PIPES_DESC=	Use legacy (4.0.3) named pipes for IPC (override)
-SYSTEM_SCREENRC_DESC=	Install system screenrc with helpful status line
-MULTIUSER_DESC=		Install setuid-root screen to support multiuser
-MULTIUSER_PLIST_SUB=	MULTISUID="@(,,4555) "
-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
-NCURSES_PORT_USES=	ncurses:port
-
-OPTIONS_SUB=
-
-USES=		autoreconf:build gmake cpe
-MAKE_ARGS+=	WITH_MAN=1
-
-CPE_VENDOR=	gnu
-
-.include <bsd.port.options.mk>
-
-GNU_CONFIGURE=	yes
-GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share
-CFLAGS+=	-I${NCURSESINC}
-LDFLAGS+=	-L${NCURSESLIB}
-
-.if ${PORT_OPTIONS:MINFO}
-INFO=		screen
-MAKE_ARGS+=	WITH_INFO=1
-USES+=		makeinfo
-.endif
-
-# Enables support for 256 colour xterm.  Note that you may need to
-# set up a custom termcap entry or .screenrc which modifies termcap
-# to contain the following: Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm
-#
-.if ${PORT_OPTIONS:MXTERM_256}
-CFLAGS+=	-DCOLORS256
-.endif
-
-.if ! ${PORT_OPTIONS:MNETHACK}
-CFLAGS+=	-DNONETHACK
-.endif
-
-.if ${PORT_OPTIONS:MNOSOCKETDIR}
-CONFIGURE_ARGS+=	--disable-socket-dir
-.endif
-
-.if defined(SCREEN_SOCKET_DIR)
-CONFIGURE_ARGS+=	--with-socket-dir=${SCREEN_SOCKET_DIR}
-.endif
-
-post-patch:
-	@${RM} ${WRKSRC}/doc/screen.info*
-
-# Bug 191029:	Users can choose whether to use sockets or named pipes.
-#		Choose sockets if you don't know what the difference is.
-#		Choose named pipes if your environment is heterogeneous,
-#		using both screen 4.0.3 and 4.2.1.
-# Bug 191017
-
-pre-configure:
-	cd ${WRKSRC} && ./autogen.sh
-
-post-configure-NAMED_PIPES-on:
-	@${ECHO_CMD} '#define NAMEDPIPE 1' >> ${WRKSRC}/config.h
-	@${ECHO_CMD} User selected named pipes override set.
-
-ETCDIR?=	${PREFIX}/etc
-
-post-install:
-	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
-	${INSTALL_DATA} ${WRKSRC}/etc/etcscreenrc \
-		${STAGEDIR}${EXAMPLESDIR}/screenrc.sample-1
-	${INSTALL_DATA} ${FILESDIR}/screenrc.sample \
-		${STAGEDIR}${EXAMPLESDIR}/screenrc.sample-2
-	@${MKDIR} ${STAGEDIR}${ETCDIR}
-.if ${PORT_OPTIONS:MSYSTEM_SCREENRC}
-	${INSTALL_DATA} ${FILESDIR}/screenrc.sample \
-		${STAGEDIR}${ETCDIR}/screenrc.sample
-.else
-	${INSTALL_DATA} ${WRKSRC}/etc/etcscreenrc \
-		${STAGEDIR}${ETCDIR}/screenrc.sample
-.endif
-
-.include <bsd.port.mk>
+.include "${MASTERDIR}/Makefile"
diff --git a/sysutils/screen49/Makefile b/sysutils/screen49/Makefile
new file mode 100644
index 000000000000..a7173267826b
--- /dev/null
+++ b/sysutils/screen49/Makefile
@@ -0,0 +1,123 @@
+PORTNAME=	screen
+PORTVERSION=	4.9.1
+PORTREVISION=	5
+CATEGORIES=	sysutils
+MASTER_SITES=	GNU \
+		ftp://ftp.gnu.org/gnu/screen/ \
+		ftp://gnu.mirror.iweb.com/screen/ \
+		http://gnu.mirror.iweb.com/screen/ \
+		http://mirror.sdunix.com/gnu/ \
+		ftp://mirrors.kernel.org/gnu/screen/ \
+		http://cschubert.com/distfiles/ \
+		LOCAL/cy
+.if !defined(MASTERDIR)
+PKGNAMESUFFIX=	49
+CONFLICTS=	screen-*
+.endif
+
+MAINTAINER=	cy@FreeBSD.org
+COMMENT=	Multi-screen window manager
+WWW=		https://www.gnu.org/software/screen/
+
+CONFLICTS+=	screen-devel*
+
+LICENSE=	GPLv3
+
+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
+OPTIONS_SINGLE_IPC=	SOCKETS NAMED_PIPES
+OPTIONS_SINGLE_NCURSES=	NCURSES_DEFAULT NCURSES_BASE NCURSES_PORT
+NETHACK_DESC=		Enable nethack-style messages
+XTERM_256_DESC=		Enable support for 256 colour xterm
+SOCKETS_DESC=		Use new (4.2.1+) sockets for IPC (default)
+NAMED_PIPES_DESC=	Use legacy (4.0.3) named pipes for IPC (override)
+SYSTEM_SCREENRC_DESC=	Install system screenrc with helpful status line
+MULTIUSER_DESC=		Install setuid-root screen to support multiuser
+MULTIUSER_PLIST_SUB=	MULTISUID="@(,,4555) "
+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
+NCURSES_PORT_USES=	ncurses:port
+
+OPTIONS_SUB=
+
+USES=		autoreconf:build gmake cpe
+MAKE_ARGS+=	WITH_MAN=1
+
+CPE_VENDOR=	gnu
+
+.include <bsd.port.options.mk>
+
+GNU_CONFIGURE=	yes
+GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share
+CFLAGS+=	-I${NCURSESINC}
+LDFLAGS+=	-L${NCURSESLIB}
+
+.if ${PORT_OPTIONS:MINFO}
+INFO=		screen
+MAKE_ARGS+=	WITH_INFO=1
+USES+=		makeinfo
+.endif
+
+# Enables support for 256 colour xterm.  Note that you may need to
+# set up a custom termcap entry or .screenrc which modifies termcap
+# to contain the following: Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm
+#
+.if ${PORT_OPTIONS:MXTERM_256}
+CFLAGS+=	-DCOLORS256
+.endif
+
+.if ! ${PORT_OPTIONS:MNETHACK}
+CFLAGS+=	-DNONETHACK
+.endif
+
+.if ${PORT_OPTIONS:MNOSOCKETDIR}
+CONFIGURE_ARGS+=	--disable-socket-dir
+.endif
+
+.if defined(SCREEN_SOCKET_DIR)
+CONFIGURE_ARGS+=	--with-socket-dir=${SCREEN_SOCKET_DIR}
+.endif
+
+post-patch:
+	@${RM} ${WRKSRC}/doc/screen.info*
+
+# Bug 191029:	Users can choose whether to use sockets or named pipes.
+#		Choose sockets if you don't know what the difference is.
+#		Choose named pipes if your environment is heterogeneous,
+#		using both screen 4.0.3 and 4.2.1.
+# Bug 191017
+
+pre-configure:
+	cd ${WRKSRC} && ./autogen.sh
+
+post-configure-NAMED_PIPES-on:
+	@${ECHO_CMD} '#define NAMEDPIPE 1' >> ${WRKSRC}/config.h
+	@${ECHO_CMD} User selected named pipes override set.
+
+ETCDIR?=	${PREFIX}/etc
+
+post-install:
+	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+	${INSTALL_DATA} ${WRKSRC}/etc/etcscreenrc \
+		${STAGEDIR}${EXAMPLESDIR}/screenrc.sample-1
+	${INSTALL_DATA} ${FILESDIR}/screenrc.sample \
+		${STAGEDIR}${EXAMPLESDIR}/screenrc.sample-2
+	@${MKDIR} ${STAGEDIR}${ETCDIR}
+.if ${PORT_OPTIONS:MSYSTEM_SCREENRC}
+	${INSTALL_DATA} ${FILESDIR}/screenrc.sample \
+		${STAGEDIR}${ETCDIR}/screenrc.sample
+.else
+	${INSTALL_DATA} ${WRKSRC}/etc/etcscreenrc \
+		${STAGEDIR}${ETCDIR}/screenrc.sample
+.endif
+
+.include <bsd.port.mk>
diff --git a/sysutils/screen/distinfo b/sysutils/screen49/distinfo
similarity index 100%
rename from sysutils/screen/distinfo
rename to sysutils/screen49/distinfo
diff --git a/sysutils/screen/files/patch-attacher.c b/sysutils/screen49/files/patch-attacher.c
similarity index 100%
rename from sysutils/screen/files/patch-attacher.c
rename to sysutils/screen49/files/patch-attacher.c
diff --git a/sysutils/screen/files/patch-configure.ac b/sysutils/screen49/files/patch-configure.ac
similarity index 100%
rename from sysutils/screen/files/patch-configure.ac
rename to sysutils/screen49/files/patch-configure.ac
diff --git a/sysutils/screen/files/patch-doc__Makefile.in b/sysutils/screen49/files/patch-doc__Makefile.in
similarity index 100%
rename from sysutils/screen/files/patch-doc__Makefile.in
rename to sysutils/screen49/files/patch-doc__Makefile.in
diff --git a/sysutils/screen/files/patch-doc_screen.1 b/sysutils/screen49/files/patch-doc_screen.1
similarity index 100%
rename from sysutils/screen/files/patch-doc_screen.1
rename to sysutils/screen49/files/patch-doc_screen.1
diff --git a/sysutils/screen/files/patch-extern.h b/sysutils/screen49/files/patch-extern.h
similarity index 100%
rename from sysutils/screen/files/patch-extern.h
rename to sysutils/screen49/files/patch-extern.h
diff --git a/sysutils/screen/files/patch-misc.c b/sysutils/screen49/files/patch-misc.c
similarity index 100%
rename from sysutils/screen/files/patch-misc.c
rename to sysutils/screen49/files/patch-misc.c
diff --git a/sysutils/screen/files/patch-os.h b/sysutils/screen49/files/patch-os.h
similarity index 100%
rename from sysutils/screen/files/patch-os.h
rename to sysutils/screen49/files/patch-os.h
diff --git a/sysutils/screen/files/patch-osdef.h.in b/sysutils/screen49/files/patch-osdef.h.in
similarity index 100%
rename from sysutils/screen/files/patch-osdef.h.in
rename to sysutils/screen49/files/patch-osdef.h.in
diff --git a/sysutils/screen/files/patch-resize.c b/sysutils/screen49/files/patch-resize.c
similarity index 100%
rename from sysutils/screen/files/patch-resize.c
rename to sysutils/screen49/files/patch-resize.c
diff --git a/sysutils/screen/files/patch-screen.c b/sysutils/screen49/files/patch-screen.c
similarity index 100%
rename from sysutils/screen/files/patch-screen.c
rename to sysutils/screen49/files/patch-screen.c
diff --git a/sysutils/screen/files/patch-socket.c b/sysutils/screen49/files/patch-socket.c
similarity index 100%
rename from sysutils/screen/files/patch-socket.c
rename to sysutils/screen49/files/patch-socket.c
diff --git a/sysutils/screen/files/patch-termcap.c b/sysutils/screen49/files/patch-termcap.c
similarity index 100%
rename from sysutils/screen/files/patch-termcap.c
rename to sysutils/screen49/files/patch-termcap.c
diff --git a/sysutils/screen/files/patch-terminfo__checktc.c b/sysutils/screen49/files/patch-terminfo__checktc.c
similarity index 100%
rename from sysutils/screen/files/patch-terminfo__checktc.c
rename to sysutils/screen49/files/patch-terminfo__checktc.c
diff --git a/sysutils/screen/files/patch-utmp.c b/sysutils/screen49/files/patch-utmp.c
similarity index 100%
rename from sysutils/screen/files/patch-utmp.c
rename to sysutils/screen49/files/patch-utmp.c
diff --git a/sysutils/screen/files/screenrc.sample b/sysutils/screen49/files/screenrc.sample
similarity index 100%
rename from sysutils/screen/files/screenrc.sample
rename to sysutils/screen49/files/screenrc.sample
diff --git a/sysutils/screen/pkg-descr b/sysutils/screen49/pkg-descr
similarity index 100%
rename from sysutils/screen/pkg-descr
rename to sysutils/screen49/pkg-descr
diff --git a/sysutils/screen/pkg-message b/sysutils/screen49/pkg-message
similarity index 100%
rename from sysutils/screen/pkg-message
rename to sysutils/screen49/pkg-message
diff --git a/sysutils/screen/pkg-plist b/sysutils/screen49/pkg-plist
similarity index 100%
rename from sysutils/screen/pkg-plist
rename to sysutils/screen49/pkg-plist