diff --git a/sysutils/screen/Makefile b/sysutils/screen/Makefile index a75a39f3146b..0ca99d2f6c9a 100644 --- a/sysutils/screen/Makefile +++ b/sysutils/screen/Makefile @@ -1,121 +1,120 @@ PORTNAME= screen -PORTVERSION= 4.9.0 -PORTREVISION= 7 +PORTVERSION= 4.9.1 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 MAINTAINER= cy@FreeBSD.org COMMENT= Multi-screen window manager WWW= https://www.gnu.org/software/screen/ 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 .if ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == i386 || \ ${ARCH:Mpowerpc*} SSP_CFLAGS?= -fno-stack-protector .endif GNU_CONFIGURE= yes 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 diff --git a/sysutils/screen/distinfo b/sysutils/screen/distinfo index 203a25ac276f..21d74bb6e156 100644 --- a/sysutils/screen/distinfo +++ b/sysutils/screen/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1647532509 -SHA256 (screen-4.9.0.tar.gz) = f9335281bb4d1538ed078df78a20c2f39d3af9a4e91c57d084271e0289c730f4 -SIZE (screen-4.9.0.tar.gz) = 798229 +TIMESTAMP = 1692454303 +SHA256 (screen-4.9.1.tar.gz) = 26cef3e3c42571c0d484ad6faf110c5c15091fbf872b06fa7aa4766c7405ac69 +SIZE (screen-4.9.1.tar.gz) = 1040785 diff --git a/sysutils/screen/files/patch-configure.ac b/sysutils/screen/files/patch-configure.ac index cee1a130731e..77608dbebb05 100644 --- a/sysutils/screen/files/patch-configure.ac +++ b/sysutils/screen/files/patch-configure.ac @@ -1,50 +1,55 @@ ---- configure.ac.orig 2022-01-28 06:06:02.670611602 -0800 -+++ configure.ac 2022-03-17 10:09:55.599298000 -0700 -@@ -811,11 +811,11 @@ +--- configure.ac.orig 2023-08-15 17:29:26.000000000 -0700 ++++ configure.ac 2023-08-19 07:32:42.246552000 -0700 +@@ -669,7 +669,7 @@ + tgetent((char *)0, (char *)0); + ],, + olibs="$LIBS" +-LIBS="-lcurses $olibs" ++LIBS="-lcurses $olibs"; CC="$CC -I/usr/local/include" + AC_CHECKING(libcurses) + AC_TRY_LINK([ + #include +@@ -900,11 +900,11 @@ dnl dnl **** utmp handling **** dnl -AC_CHECKING(getutent) +AC_CHECKING(getutxent) AC_TRY_LINK([ - #include /* to get time_t on SCO */ - #include + #include /* to get time_t on SCO */ + #include -#if defined(SVR4) && !defined(DGUX) -+#if (defined(SVR4) && !defined(DGUX)) || defined(__FreeBSD__) - #include ++#if defined(SVR4) && !defined(DGUX) || defined(__FreeBSD__) + #include #define utmp utmpx #else -@@ -825,14 +825,14 @@ - #define pututline _pututline - #endif - ], --[int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT), -+[int x = DEAD_PROCESS; pututxline((struct utmp *)0); getutxent();], AC_DEFINE(GETUTENT), +@@ -917,11 +917,11 @@ + [int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT), olibs="$LIBS" LIBS="$LIBS -lgen" -AC_CHECKING(getutent with -lgen) +AC_CHECKING(getutxent with -lgen) AC_TRY_LINK([ - #include - #include + #include + #include -#if defined(SVR4) && !defined(DGUX) +#if defined(SVR4) && !defined(DGUX) || defined(__FreeBSD__) - #include + #include #define utmp utmpx #else -@@ -842,13 +842,13 @@ +@@ -931,13 +931,13 @@ #define pututline _pututline #endif ], -[int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT), LIBS="$olibs") +[int x = DEAD_PROCESS; pututxline((struct utmp *)0); getutxent();], AC_DEFINE(GETUTENT), LIBS="$olibs") ) AC_CHECKING(ut_host) AC_TRY_COMPILE([ #include #include -#if defined(SVR4) && !defined(DGUX) +#if defined(SVR4) && !defined(DGUX) || defined(__FreeBSD__) #include #define utmp utmpx #else diff --git a/sysutils/screen/files/patch-utmp.c b/sysutils/screen/files/patch-utmp.c index 008106464429..0573d96ceab5 100644 --- a/sysutils/screen/files/patch-utmp.c +++ b/sysutils/screen/files/patch-utmp.c @@ -1,113 +1,156 @@ ---- utmp.c.orig 2017-01-17 11:28:29.397404660 -0800 -+++ utmp.c 2017-02-10 16:48:34.902236000 -0800 +--- utmp.c.orig 2023-08-15 17:29:26.000000000 -0700 ++++ utmp.c 2023-08-19 08:57:48.376313000 -0700 @@ -26,6 +26,7 @@ **************************************************************** */ +#include #include #include #include +@@ -89,11 +90,13 @@ + static int pututslot __P((slot_t, struct utmp *, char *, struct win *)); + static struct utmp *getutslot __P((slot_t)); + #ifndef GETUTENT ++#if 0 + static struct utmp *getutent __P((void)); + static void endutent __P((void)); + static int initutmp __P((void)); + static void setutent __P((void)); + #endif ++#endif + #if defined(linux) && defined(GETUTENT) + static struct utmp *xpututline __P((struct utmp *utmp)); + # define pututline xpututline +@@ -102,9 +105,7 @@ + + static int utmpok; + static char UtmpName[] = UTMPFILE; +-#ifndef UTMP_HELPER + static int utmpfd = -1; +-#endif + + + # if defined(GETUTENT) && (!defined(SVR4) || defined(__hpux)) && ! defined(__CYGWIN__) @@ -409,12 +410,6 @@ register slot_t slot; struct utmp u; int saved_ut; -#ifdef UTHOST - char *p; - char host[sizeof(D_loginhost) + 15]; -#else - char *host = 0; -#endif /* UTHOST */ wi->w_slot = (slot_t)0; if (!utmpok || wi->w_type != W_TYPE_PTY) @@ -435,51 +430,13 @@ makeuser(&u, stripdev(wi->w_tty), LoginName, wi->w_pid); #ifdef UTHOST - host[sizeof(host) - 15] = '\0'; - if (display) - { - strncpy(host, D_loginhost, sizeof(host) - 15); - if (D_loginslot != (slot_t)0 && D_loginslot != (slot_t)-1 && host[0] != '\0') - { - /* - * we want to set our ut_host field to something like - * ":ttyhf:s.0" or - * "faui45:s.0" or - * "132.199.81.4:s.0" (even this may hurt..), but not - * "faui45.informati"......:s.0 - * HPUX uses host:0.0, so chop at "." and ":" (Eric Backus) - */ - for (p = host; *p; p++) - if ((*p < '0' || *p > '9') && (*p != '.')) - break; - if (*p) - { - for (p = host; *p; p++) - if (*p == '.' || (*p == ':' && p != host)) - { - *p = '\0'; - break; - } - } - } - else - { - strncpy(host + 1, stripdev(D_usertty), sizeof(host) - 15 - 1); - host[0] = ':'; - } - } - else - strncpy(host, "local", sizeof(host) - 15); - - sprintf(host + strlen(host), ":S.%d", wi->w_number); - debug1("rlogin hostname: '%s'\n", host); - # if !defined(_SEQUENT_) && !defined(sequent) - strncpy(u.ut_host, host, sizeof(u.ut_host)); + if (display) + strncpy(u.ut_host, D_loginhost, sizeof(u.ut_host)); # endif #endif /* UTHOST */ - if (pututslot(slot, &u, host, wi) == 0) + if (pututslot(slot, &u, D_loginhost, wi) == 0) { Msg(errno,"Could not write %s", UtmpName); UT_CLOSE; -@@ -598,7 +555,7 @@ +@@ -607,7 +564,7 @@ struct utmp *u; { u->ut_type = DEAD_PROCESS; -#if (!defined(linux) || defined(EMPTY)) && !defined(__CYGWIN__) +#if (!defined(linux) || defined(EMPTY)) && !defined(__CYGWIN__) && !defined(__FreeBSD__) u->ut_exit.e_termination = 0; u->ut_exit.e_exit = 0; #endif -@@ -631,7 +588,11 @@ +@@ -640,7 +597,11 @@ /* must use temp variable because of NetBSD/sparc64, where * ut_xtime is long(64) but time_t is int(32) */ (void)time(&now); - u->ut_time = now; +#if defined(__FreeBSD_version) && __FreeBSD_version < 900000 + u->ut_time = now; +#else + u->ut_tv.tv_sec = now; +#endif } static slot_t -@@ -743,7 +704,11 @@ +@@ -670,6 +631,7 @@ + return (utmpfd = open(UtmpName, O_RDWR)) >= 0; + } + ++#if 0 + static void + setutent() + { +@@ -694,6 +656,7 @@ + return 0; + return &uent; + } ++#endif + + static struct utmp * + getutslot(slot) +@@ -750,9 +713,13 @@ + { + time_t now; strncpy(u->ut_line, line, sizeof(u->ut_line)); - strncpy(u->ut_name, user, sizeof(u->ut_name)); +- strncpy(u->ut_name, user, sizeof(u->ut_name)); ++ strncpy(u->ut_user, user, sizeof(u->ut_user)); (void)time(&now); - u->ut_time = now; +#if defined(__FreeBSD_version) && __FreeBSD_version < 900000 + u->ut_time = now; +#else + u->ut_tv.tv_sec = now; +#endif } static slot_t diff --git a/sysutils/screen/pkg-plist b/sysutils/screen/pkg-plist index e03f87d0ccc1..943bab573f47 100644 --- a/sysutils/screen/pkg-plist +++ b/sysutils/screen/pkg-plist @@ -1,26 +1,26 @@ bin/screen -%%MULTISUID%%bin/screen-4.9.0 +%%MULTISUID%%bin/screen-4.9.1 man/man1/screen.1.gz %%DATADIR%%/utf8encodings/01 %%DATADIR%%/utf8encodings/02 %%DATADIR%%/utf8encodings/03 %%DATADIR%%/utf8encodings/04 %%DATADIR%%/utf8encodings/18 %%DATADIR%%/utf8encodings/19 %%DATADIR%%/utf8encodings/a1 %%DATADIR%%/utf8encodings/bf %%DATADIR%%/utf8encodings/c2 %%DATADIR%%/utf8encodings/c3 %%DATADIR%%/utf8encodings/c4 %%DATADIR%%/utf8encodings/c6 %%DATADIR%%/utf8encodings/c7 %%DATADIR%%/utf8encodings/c8 %%DATADIR%%/utf8encodings/cc %%DATADIR%%/utf8encodings/cd %%DATADIR%%/utf8encodings/d6 @comment We always install the same screenrc it just depends on if we @comment are installing the the one bundled with source, or the one from @comment FILESDIR/screenrc.sample @sample %%ETCDIR%%/screenrc.sample %%EXAMPLESDIR%%/screenrc.sample-1 %%EXAMPLESDIR%%/screenrc.sample-2