# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= screen VERSION= 4.9.1 REVISION= 1 KEYWORDS= sysutils VARIANTS= standard SDESC[standard]= Multi-screen window manager HOMEPAGE= https://www.gnu.org/software/screen/ CONTACT= nobody DOWNLOAD_GROUPS= main SITES[main]= GNU/screen DISTFILE[1]= screen-4.9.1.tar.gz:main DF_INDEX= 1 SPKGS[standard]= single OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BROKEN[netbsd]= pkgsrc patches only available for NetBSD 10 USES= autoreconf gmake cpe ncurses CPE_VENDOR= gnu FPC_EQUIVALENT= sysutils/screen MUST_CONFIGURE= gnu MAKE_ARGS= WITH_MAN=1 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.single] 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] 26cef3e3c42571c0d484ad6faf110c5c15091fbf872b06fa7aa4766c7405ac69 1040785 screen-4.9.1.tar.gz [FILE:162:manifests/plist.single] @sample etc/screenrc.sample bin/screen share/man/man1/screen.1.gz share/screen/utf8encodings/ 01 02 03 04 18 19 a1 bf c2 c3 c4 c6 c7 c8 cc cd d6 [FILE:2601:patches/patch-Makefile.in] --- Makefile.in.orig 2023-08-16 00:29:26 UTC +++ Makefile.in @@ -83,19 +83,13 @@ screen: $(OFILES) $(OPTIONS) $(CFLAGS) $< install_bin: .version screen installdirs - -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \ - then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi - $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN) - -chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN) -# This doesn't work if $(bindir)/screen is a symlink - -if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi - rm -f $(DESTDIR)$(bindir)/screen - (cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen) cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS) + $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/screen + -chown root:wheel $(DESTDIR)$(bindir)/screen && chmod 4755 $(DESTDIR)$(bindir)/screen ############################################################################### install: installdirs install_bin - cd doc ; $(MAKE) install + cd doc ; $(MAKE) $(MAKE_ARGS) install -if [ -d $(DESTDIR)/usr/lib/terminfo ]; then \ PATH="$$PATH:/usr/5bin" tic ${srcdir}/terminfo/screeninfo.src; \ chmod 644 $(DESTDIR)/usr/lib/terminfo/s/screen*; \ @@ -108,7 +102,7 @@ install: installdirs install_bin installdirs: # Path leading to ETCSCREENRC and Socketdirectory not checked. $(srcdir)/etc/mkinstalldirs $(DESTDIR)$(bindir) $(DESTDIR)$(SCREENENCODINGS) - cd doc ; $(MAKE) installdirs + cd doc ; $(MAKE) $(MAKE_ARGS) installdirs uninstall: .version rm -f $(DESTDIR)$(bindir)/$(SCREEN) @@ -350,7 +344,10 @@ layout.o: layout.h viewport.h canvas.h l viewport.o: layout.h viewport.h canvas.h viewport.c config.h screen.h os.h osdef.h ansi.h acls.h \ comm.h layer.h term.h image.h display.h window.h extern.h \ braille.h -list_generic.o: list_generic.h list_generic.c layer.h screen.h osdef.h -list_display.o: list_generic.h list_display.c layer.h screen.h osdef.h -list_window.o: list_generic.h list_window.c window.h layer.h screen.h osdef.h comm.h +list_generic.o: list_generic.h list_generic.c layer.h screen.h os.h osdef.h ansi.h acls.h \ + comm.h layer.h term.h image.h display.h window.h +list_display.o: list_generic.h list_display.c layer.h screen.h os.h osdef.h ansi.h acls.h \ + comm.h layer.h term.h image.h display.h window.h +list_window.o: list_generic.h list_window.c window.h layer.h screen.h os.h osdef.h ansi.h acls.h \ + comm.h layer.h term.h image.h display.h window.h [FILE:873:patches/patch-attacher.c] --- attacher.c.orig 2023-08-16 00:29:26 UTC +++ attacher.c @@ -732,7 +732,7 @@ LockTerminal() printf("\n"); prg = getenv("LOCKPRG"); - if (prg && strcmp(prg, "builtin") && !access(prg, X_OK)) + if (prg && (strcmp(prg, "builtin") || strcmp(prg,"builtin-passwd")) && !access(prg, X_OK)) { signal(SIGCHLD, SIG_DFL); debug1("lockterminal: '%s' seems executable, execl it!\n", prg); @@ -751,7 +751,11 @@ LockTerminal() Panic(errno, "setuid"); #endif closeallfiles(0); /* important: /etc/shadow may be open */ - execl(prg, "SCREEN-LOCK", NULL); + if (strcmp(prg,"builtin-passwd")) + /* use system passsword for lock */ + execl(prg, "SCREEN-LOCK", "-p", "-n", NULL); + else + execl(prg, "SCREEN-LOCK", NULL); exit(errno); } if (pid == -1) [FILE:3187:patches/patch-configure.ac] --- configure.ac.orig 2023-08-16 00:29:26 UTC +++ configure.ac @@ -669,28 +669,19 @@ AC_TRY_LINK([ tgetent((char *)0, (char *)0); ],, olibs="$LIBS" -LIBS="-lcurses $olibs" -AC_CHECKING(libcurses) -AC_TRY_LINK([ - #include - #include -],[ -#ifdef __hpux -__sorry_hpux_libcurses_is_totally_broken_in_10_10(); -#else -tgetent((char *)0, (char *)0); -#endif -],, -LIBS="-ltermcap $olibs" -AC_CHECKING(libtermcap) +LIBS="-lxxcurses $olibs" +AC_CHECKING(libxxcurses) +AC_TRY_LINK(,[ -tgetent((char *)0, (char *)0); ],, +LIBS="-lxxtermcap $olibs" +AC_CHECKING(libxxtermcap) AC_TRY_LINK([ #include #include ],[ tgetent((char *)0, (char *)0); ],, -LIBS="-ltermlib $olibs" -AC_CHECKING(libtermlib) +LIBS="-lxxtermlib $olibs" +AC_CHECKING(libxxtermlib) AC_TRY_LINK([ #include #include @@ -759,7 +750,7 @@ fi if test "$cross_compiling" = no ; then AC_CHECKING(for SVR4 ptys) sysvr4ptys= -if test -c /dev/ptmx ; then +if test -c /nonexistent ; then AC_TRY_LINK([ #include ], [ @@ -795,12 +786,9 @@ dnl ptys=`echo /dev/ptyp??` dnl else dnl ptys=`echo $pdir/pty??` dnl fi -if test "$ptys" != "$pdir/pty??" ; then -p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'` -p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'` -AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0") -AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1") -fi +# XXX: hardcoded, since port must be devfs and various setups independent +AC_DEFINE_UNQUOTED(PTYRANGE0,"pqrsPQRSlmnoLMNO") +AC_DEFINE_UNQUOTED(PTYRANGE1,"0123456789abcdefghijklmnopqrstuv") fi dnl **** pty mode/group handling **** @@ -900,13 +888,17 @@ fi dnl dnl **** utmp handling **** dnl -AC_CHECKING(getutent) +AC_CHECKING(getutxent) AC_TRY_LINK([ #include /* to get time_t on SCO */ #include -#if defined(SVR4) && !defined(DGUX) +#if (defined(SVR4) && !defined(DGUX)) || defined(__FreeBSD__) || defined(__DragonFly__) #include #define utmp utmpx +# if defined __DragonFly__ +#define pututline pututxline +#define getutent getutxent +# endif #else #include #endif @@ -917,7 +909,7 @@ AC_TRY_LINK([ [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 @@ -931,15 +923,19 @@ AC_TRY_LINK([ #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__) || defined(__DragonFly__) #include #define utmp utmpx +# if defined __DragonFly__ +#define pututline pututxline +#define getutent getutxent +# endif #else #include #endif [FILE:1020:patches/patch-doc__Makefile.in] --- doc/Makefile.in.orig 2023-08-16 00:29:26 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:856:patches/patch-os.h] --- os.h.orig 2023-08-16 00:29:26 UTC +++ os.h @@ -250,9 +250,11 @@ extern int errno; #endif #if defined(UTMPOK) || defined(BUGGYGETLOGIN) -# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux) +# if (defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)) || defined(__FreeBSD__) || defined(__DragonFly__) # include -# define UTMPFILE UTMPX_FILE +# ifdef UTMPX_FILE /* GNU extension */ +# define UTMPFILE UTMPX_FILE +# endif # define utmp utmpx # define getutent getutxent # define getutid getutxid @@ -524,6 +526,6 @@ typedef struct fd_set { int fds_bits[1]; /* 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:347:patches/patch-osdef.h.in] --- osdef.h.in.orig 2023-08-16 00:29:26 UTC +++ osdef.h.in @@ -111,7 +111,7 @@ extern int setsid __P((void)); extern int setpgid __P((int, int)); extern int tcsetpgrp __P((int, int)); #endif -extern int ioctl __P((int, unsigned long, char *)); +extern int ioctl __P((int, unsigned long, ...)); extern int kill __P((int, int)); [FILE:318:patches/patch-pty.c] --- pty.c.orig 2023-08-16 00:29:26 UTC +++ pty.c @@ -35,6 +35,13 @@ #include /* for openpty() */ #endif +#if defined(__DragonFly__) +#include /* for openpty() */ +#endif +#if defined(__FreeBSD__) +#include /* for openpty() */ +#endif + #include "config.h" #include "screen.h" [FILE:456:patches/patch-resize.c] --- resize.c.orig 2023-08-16 00:29:26 UTC +++ resize.c @@ -683,6 +683,17 @@ int wi, he, hi; he = MAXWIDTH; } + if (wi > 1000) + { + Msg(0, "Window width too large, truncated"); + wi = 1000; + } + if (he > 1000) + { + Msg(0, "Window height too large, truncated"); + he = 1000; + } + if (p->w_width == wi && p->w_height == he && p->w_histheight == hi) { debug("ChangeWindowSize: No change.\n"); [FILE:364:patches/patch-screen.c] --- screen.c.orig 2023-08-16 00:29:26 UTC +++ screen.c @@ -2234,7 +2234,7 @@ static char *pad_expand(char *buf, char pn2 = pn = p + padlen; r = winmsg_numrend; while (p >= buf) { - if (r && *p != 127 && p - buf == winmsg_rendpos[r - 1]) { + if (r && p - buf == winmsg_rendpos[r - 1]) { winmsg_rendpos[--r] = pn - buf; continue; } [FILE:281:patches/patch-socket.c] --- socket.c.orig 2023-08-16 00:29:26 UTC +++ socket.c @@ -26,6 +26,11 @@ **************************************************************** */ +#ifdef __sun__ +#define _XPG6 +#define _XOPEN_SOURCE 500 +#endif + #include "config.h" #include #include [FILE:346:patches/patch-termcap.c] --- termcap.c.orig 2023-08-16 00:29:26 UTC +++ termcap.c @@ -361,11 +361,7 @@ int he; if (D_CG0) { if (D_CS0 == 0) -#ifdef TERMINFO - D_CS0 = "\033(%p1%c"; -#else - D_CS0 = "\033(%."; -#endif + D_CS0 = "\033(%p1%c"; /* Old ncurses can't handle %. */ if (D_CE0 == 0) D_CE0 = "\033(B"; D_AC = 0; [FILE:384:patches/patch-terminfo__checktc.c] --- terminfo/checktc.c.orig 2023-08-16 00:29:26 UTC +++ terminfo/checktc.c @@ -171,6 +171,7 @@ char *s; fflush(stdout); } +#if !defined(__FreeBSD__) && !defined(__DragonFly__) 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__ || __DragonFly__*/ void CCPutStr(s, x, y) char *s; [FILE:3235:patches/patch-utmp.c] --- utmp.c.orig 2023-08-16 00:29:26 UTC +++ utmp.c @@ -38,6 +38,9 @@ #include #endif +#if defined(__DragonFly__) || defined(__FreeBSD__) +#define MyBSD +#endif extern struct display *display; #ifdef CAREFULUTMP @@ -89,10 +92,12 @@ static void makedead __P((struct utmp *) static int pututslot __P((slot_t, struct utmp *, char *, struct win *)); static struct utmp *getutslot __P((slot_t)); #ifndef GETUTENT +# if defined(linux) 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)); @@ -102,9 +107,13 @@ static struct utmp *xpututline __P((stru static int utmpok; static char UtmpName[] = UTMPFILE; +# ifdef MyBSD +static int utmpfd = -1; +# else #ifndef UTMP_HELPER static int utmpfd = -1; #endif +# endif # if defined(GETUTENT) && (!defined(SVR4) || defined(__hpux)) && ! defined(__CYGWIN__) @@ -409,12 +418,14 @@ struct win *wi; register slot_t slot; struct utmp u; int saved_ut; +#ifndef MyBSD #ifdef UTHOST char *p; char host[sizeof(D_loginhost) + 15]; #else char *host = 0; #endif /* UTHOST */ +#endif /* !MyBSD */ wi->w_slot = (slot_t)0; if (!utmpok || wi->w_type != W_TYPE_PTY) @@ -435,6 +446,7 @@ struct win *wi; makeuser(&u, stripdev(wi->w_tty), LoginName, wi->w_pid); #ifdef UTHOST +#ifndef MyBSD host[sizeof(host) - 15] = '\0'; if (display) { @@ -477,9 +489,19 @@ struct win *wi; # if !defined(_SEQUENT_) && !defined(sequent) strncpy(u.ut_host, host, sizeof(u.ut_host)); # endif +#else /* ! MyBSD */ +# if !defined(_SEQUENT_) && !defined(sequent) + if (display) + strncpy(u.ut_host, D_loginhost, sizeof(u.ut_host)); +# endif +#endif /* ! MyBSD */ #endif /* UTHOST */ +#ifdef MyBSD + if (pututslot(slot, &u, D_loginhost, wi) == 0) +#else if (pututslot(slot, &u, host, wi) == 0) +#endif { Msg(errno,"Could not write %s", UtmpName); UT_CLOSE; @@ -607,7 +629,7 @@ makedead(u) struct utmp *u; { u->ut_type = DEAD_PROCESS; -#if (!defined(linux) || defined(EMPTY)) && !defined(__CYGWIN__) +#if (!defined(linux) || defined(EMPTY)) && !defined(__CYGWIN__) && !defined(MyBSD) u->ut_exit.e_termination = 0; u->ut_exit.e_exit = 0; #endif @@ -640,7 +662,11 @@ int pid; /* must use temp variable because of NetBSD/sparc64, where * ut_xtime is long(64) but time_t is int(32) */ (void)time(&now); +#ifdef MyBSD + u->ut_tv.tv_sec = now; +#else u->ut_time = now; +#endif } static slot_t @@ -670,6 +696,7 @@ initutmp() return (utmpfd = open(UtmpName, O_RDWR)) >= 0; } +#if !defined(MyBSD) static void setutent() { @@ -694,6 +721,7 @@ getutent() return 0; return &uent; } +#endif static struct utmp * getutslot(slot) @@ -750,9 +778,17 @@ int pid; { time_t now; strncpy(u->ut_line, line, sizeof(u->ut_line)); +#ifdef MyBSD + strncpy(u->ut_user, user, sizeof(u->ut_user)); +#else strncpy(u->ut_name, user, sizeof(u->ut_name)); +#endif (void)time(&now); +#ifdef MyBSD + u->ut_tv.tv_sec = now; +#else u->ut_time = now; +#endif } static slot_t [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