# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= screen VERSION= 5.0.0 KEYWORDS= sysutils VARIANTS= std SDESC[std]= Multi-screen window manager HOMEPAGE= https://www.gnu.org/software/screen/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= GNU/screen DISTFILE[1]= screen-5.0.0.tar.gz:main DF_INDEX= 1 SPKGS[std]= set primary man OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none ONLY_FOR_OPSYS= freebsd linux midnightbsd BUILD_DEPENDS= openpam:dev:std BUILDRUN_DEPENDS= openpam:primary:std USES= autoreconf gmake cpe ncurses makeinfo LICENSE= GPLv3+:primary LICENSE_TERMS= primary:{{WRKDIR}}/TERMS LICENSE_FILE= GPLv3+:{{WRKSRC}}/COPYING LICENSE_AWK= TERMS:"^$$" LICENSE_SOURCE= TERMS:{{WRKSRC}}/screen.h LICENSE_SCHEME= solo CPE_VENDOR= gnu FPC_EQUIVALENT= sysutils/screen50 MUST_CONFIGURE= gnu MAKE_ARGS= WITH_MAN=1 PLIST_SUB= VER=5.0.0 CFLAGS= -I{{NCURSESINC}} -DCOLORS256 LDFLAGS= -L{{NCURSESLIB}} post-patch: ${RM} ${WRKSRC}/doc/screen.info* post-install: ${INSTALL_DATA} ${FILESDIR}/screenrc.sample \ ${STAGEDIR}${PREFIX}/etc/screenrc.sample [FILE:512:descriptions/desc.primary] Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). Each virtual terminal provides the functions of a DEC VT100 terminal and, in addition, several control functions from the ANSI X3.64 (ISO 6429) and ISO 2022 standards (e.g. insert/delete line and support for multiple character sets). There is a scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows moving text regions between windows. [FILE:98:distinfo] f04a39d00a0e5c7c86a55338808903082ad5df4d73df1a2fd3425976aed94971 895882 screen-5.0.0.tar.gz [FILE:157:manifests/plist.primary] @sample etc/screenrc.sample bin/ screen screen-%%VER%% share/screen/utf8encodings/ 01 02 03 04 18 19 a1 a3 bf c2 c3 c4 c6 c7 c8 cc cd d6 [FILE:24:manifests/plist.man] share/man/man1/screen.1 [FILE:1020:patches/patch-doc__Makefile.in] --- doc/Makefile.in.orig 2024-08-28 19:55:03 UTC +++ doc/Makefile.in @@ -31,7 +31,10 @@ info screen.info: screen.texinfo $(MAKEINFO) $(srcdir)/screen.texinfo -o screen.info install: installdirs +ifeq (${WITH_MAN},1) $(INSTALL_DATA) $(srcdir)/screen.1 $(DESTDIR)$(mandir)/man1/screen.1 +endif +ifeq (${WITH_INFO},1) -$(MAKE) screen.info -if test -f screen.info; then d=.; else d=$(srcdir); fi; \ if test -f $$d/screen.info; then \ @@ -40,13 +43,19 @@ install: installdirs install-info --info-dir=$(DESTDIR)$(infodir) $$d/screen.info; \ else true; fi; \ fi +endif uninstall: rm -f $(DESTDIR)$(mandir)/man1/screen.1 rm -f $(DESTDIR)$(infodir)/screen.info* installdirs: - $(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(infodir) +ifeq (${WITH_MAN},1) + $(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(mandir)/man1 +endif +ifeq (${WITH_INFO},1) + $(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(infodir) +endif mostlyclean: -rm -f *.cp *.cps *.fn *.fns *.ky *.kys *.pg *.tp *.vr [FILE:328:patches/patch-doc_screen.1] --- doc/screen.1.orig 2024-08-28 19:55:03 UTC +++ doc/screen.1 @@ -241,7 +241,7 @@ does not start .IR screen , but prints a list of .I pid.tty.host -strings identifying your +strings and creation timestamps identifying your .I screen sessions. Sessions marked `detached' can be resumed with \*Qscreen \-r\*U. Those marked [FILE:699:patches/patch-misc.c] --- misc.c.orig 2024-08-28 19:55:03 UTC +++ misc.c @@ -34,6 +34,10 @@ #include #include /* mkdir() declaration */ #include +#if defined(__FreeBSD__) +#include +#include +#endif #include #include #include @@ -238,3 +242,19 @@ int AddXChars(char *buf, int len, char * *p = 0; return p - buf; } + +#if defined(__FreeBSD__) +time_t +SessionCreationTime(fifo) +const char *fifo; +{ + int pid = atoi(fifo); + if (pid <= 0) return 0; + + struct kinfo_proc * kip = kinfo_getproc(pid); + if (kip == 0) return 0; + time_t start = kip->ki_start.tv_sec; + free (kip); + return start; +} +#endif [FILE:298:patches/patch-misc.h] --- misc.h.orig 2024-08-28 19:55:03 UTC +++ misc.h @@ -28,6 +28,9 @@ void xsetegid (int); int AddXChar (char *, int); int AddXChars (char *, int, char *); +time_t SessionCreationTime(const char *fifo); + + #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #endif /* SCREEN_MISC_H */ [FILE:506:patches/patch-os.h] --- os.h.orig 2024-08-28 19:55:03 UTC +++ os.h @@ -148,7 +148,7 @@ typedef char* slot_t; /* used internally */ #ifndef TERMCAP_BUFSIZE -# define TERMCAP_BUFSIZE 1023 +# define TERMCAP_BUFSIZE 1024 #endif /* @@ -161,6 +161,6 @@ typedef char* slot_t; /* used internally /* Changing those you won't be able to attach to your old sessions * when changing those values in official tree don't forget to bump * MSG_VERSION */ -#define MAXTERMLEN 32 +#define MAXTERMLEN 63 #define MAXLOGINLEN 256 [FILE:2516:patches/patch-socket.c] --- socket.c.orig 2024-08-28 19:55:03 UTC +++ socket.c @@ -126,11 +126,13 @@ int FindSocket(int *fdp, int *nfoundp, i char *firstn = NULL; int nfound = 0, ngood = 0, ndead = 0, nwipe = 0, npriv = 0; int nperfect = 0; + char timestr[64]; struct sent { struct sent *next; int mode; char *name; - } *slist, **slisttail, *sent, *nsent; + time_t time_created; + } *slist, **slisttail, *sent, *nsent, *schosen; if (match) { matchlen = strlen(match); @@ -207,8 +209,17 @@ int FindSocket(int *fdp, int *nfoundp, i sent->next = NULL; sent->name = SaveStr(name); sent->mode = mode; +#if defined(__FreeBSD__) + sent->time_created = SessionCreationTime(name); + for (slisttail = &slist; *slisttail; slisttail = &((*slisttail)->next)) { + if ((*slisttail)->time_created < sent->time_created) break; + } + sent->next = *slisttail; + *slisttail = sent; +#else *slisttail = sent; slisttail = &sent->next; +#endif nfound++; sockfd = MakeClientSocket(0); /* MakeClientSocket sets ids back to eff */ @@ -287,31 +298,36 @@ int FindSocket(int *fdp, int *nfoundp, i break; } for (sent = slist; sent; sent = sent->next) { + if (sent->time_created == 0) { + sprintf(timestr, "??" "?"); + } else { + strftime(timestr, 64, "%x %X", localtime(&sent->time_created)); + } switch (sent->mode) { case 0700: - printf("\t%s\t(Attached)\n", sent->name); + printf("\t%s\t(%s)\t(Attached)\n", sent->name, timestr); break; case 0600: - printf("\t%s\t(Detached)\n", sent->name); + printf("\t%s\t(%s)\t(Detached)\n", sent->name, timestr); break; case 0701: - printf("\t%s\t(Multi, attached)\n", sent->name); + printf("\t%s\t(%s)\t(Multi, attached)\n", sent->name, timestr); break; case 0601: - printf("\t%s\t(Multi, detached)\n", sent->name); + printf("\t%s\t(%s)\t(Multi, detached)\n", sent->name, timestr); break; case -1: /* No trigraphs here! */ - printf("\t%s\t(Dead ?%c?)\n", sent->name, '?'); + printf("\t%s\t(%s)\t(Dead ?%c?)\n", sent->name, timestr, '?'); break; case -2: - printf("\t%s\t(Removed)\n", sent->name); + printf("\t%s\t(%s)\t(Removed)\n", sent->name, timestr); break; case -3: - printf("\t%s\t(Remote or dead)\n", sent->name); + printf("\t%s\t(%s)\t(Remote or dead)\n", sent->name, timestr); break; case -4: - printf("\t%s\t(Private)\n", sent->name); + printf("\t%s\t(%s)\t(Private)\n", sent->name, timestr); break; } } [FILE:335:patches/patch-terminfo__checktc.c] --- terminfo/checktc.c.orig 2024-08-28 19:55:03 UTC +++ terminfo/checktc.c @@ -171,6 +171,7 @@ char *s; fflush(stdout); } +#ifndef __FreeBSD__ void CPutStr(s, c) char *s; int c; @@ -178,6 +179,7 @@ int c; tputs(tgoto(s, 0, c), 1, putcha); fflush(stdout); } +#endif /* __FreeBSD__ */ void CCPutStr(s, x, y) char *s; [FILE:422:patches/patch-utmp.c] --- utmp.c.orig 2024-08-28 19:55:03 UTC +++ utmp.c @@ -30,6 +30,7 @@ #include "utmp.h" +#include #include #include #include @@ -64,9 +65,7 @@ static struct utmpx *getutslot(slot_t); static int utmpok; static char UtmpName[] = UTMPXFILE; -#ifndef UTMP_HELPER static int utmpfd = -1; -#endif #undef D_loginhost #define D_loginhost D_utmp_logintty.ut_host [FILE:323:files/screenrc.sample] startup_message off defscrollback 5000 termcapinfo xterm ti@:te@ termcapinfo xterm-color ti@:te@ hardstatus alwayslastline hardstatus string '%{gk}[%{G}%H%{g}][%= %{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}]%{=b C}[%m/%d/%y %C %A]%{W}' vbell off shell -$SHELL logtstamp on logtstamp after 1