diff --git a/sysutils/screen/Makefile b/sysutils/screen/Makefile index 2d780da3f761..75a4b756814e 100644 --- a/sysutils/screen/Makefile +++ b/sysutils/screen/Makefile @@ -1,100 +1,100 @@ PORTNAME= screen DISTVERSION= 5.0.1 -PORTREVISION= 5 +PORTREVISION= 6 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/ CONFLICTS+= screen-devel LICENSE= GPLv3 OPTIONS_DEFINE= INFO SYSTEM_SCREENRC MULTIUSER \ NOSOCKETDIR OPTIONS_DEFAULT= INFO SYSTEM_SCREENRC \ NCURSES_DEFAULT MULTIUSER OPTIONS_SINGLE= NCURSES OPTIONS_SINGLE_NCURSES= NCURSES_DEFAULT NCURSES_BASE NCURSES_PORT 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 CONFIGURE_ARGS= --with-system_screenrc=${ETCDIR}/screenrc MAKE_ARGS+= WITH_MAN=1 CPE_VENDOR= gnu .include GNU_CONFIGURE= yes GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share CFLAGS+= -I${NCURSESINC} -DSVR4 -DGETUTENT 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:MNOSOCKETDIR} CONFIGURE_ARGS+= --disable-socket-dir .endif .if defined(SCREEN_SOCKET_DIR) CONFIGURE_ARGS+= --enable-socket-dir=${SCREEN_SOCKET_DIR} .endif # 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 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/files/patch-telnet.c b/sysutils/screen/files/patch-telnet.c new file mode 100644 index 000000000000..16caef08be2f --- /dev/null +++ b/sysutils/screen/files/patch-telnet.c @@ -0,0 +1,11 @@ +--- telnet.c.orig 2025-05-15 15:31:27 UTC ++++ telnet.c +@@ -228,7 +228,7 @@ void TelProcessLine(char **bufpp, size_t *lenp) + *lenp = 0; + } + +-int DoTelnet(char *buf, size_t *lenp, int f) ++int DoTelnet(char *buf, int *lenp, int f) + { + int echo = !fore->w_telropts[TO_ECHO]; + int cmode = fore->w_telropts[TO_SGA]; diff --git a/sysutils/screen/files/patch-telnet.h b/sysutils/screen/files/patch-telnet.h new file mode 100644 index 000000000000..26863b5dd67d --- /dev/null +++ b/sysutils/screen/files/patch-telnet.h @@ -0,0 +1,11 @@ +--- telnet.h.orig 2025-05-15 15:31:27 UTC ++++ telnet.h +@@ -9,7 +9,7 @@ void TelProcessLine(char **, size_t *); + int TelOpenAndConnect(Window *); + int TelIsline(Window *); + void TelProcessLine(char **, size_t *); +-int DoTelnet(char *, size_t *, int); ++int DoTelnet(char *, int *, int); + int TelIn(Window *, char *, size_t, int); + void TelBreak(Window *); + void TelWindowSize(Window *); diff --git a/sysutils/screen/files/patch-window.c b/sysutils/screen/files/patch-window.c new file mode 100644 index 000000000000..6c101e84a901 --- /dev/null +++ b/sysutils/screen/files/patch-window.c @@ -0,0 +1,148 @@ +--- window.c.orig 2025-05-15 15:31:27 UTC ++++ window.c +@@ -61,7 +61,7 @@ static void WinRestore(void); + static void WinClearLine(int, int, int, int); + static int WinResize(int, int); + static void WinRestore(void); +-static int DoAutolf(char *, size_t *, int); ++static int DoAutolf(char *, int *, int); + static void ZombieProcess(char **, size_t *); + static void win_readev_fn(Event *, void *); + static void win_writeev_fn(Event *, void *); +@@ -74,9 +74,9 @@ static int ForkWindow(Window *, char **, char *); + static void win_destroyev_fn(Event *, void *); + + static int ForkWindow(Window *, char **, char *); +-static void zmodem_found(Window *, int, char *, size_t); ++static void zmodem_found(Window *, int, char *, int); + static void zmodemFin(char *, size_t, void *); +-static int zmodem_parse(Window *, char *, size_t); ++static int zmodem_parse(Window *, char *, int); + + bool VerboseCreate = false; /* XXX move this to user.h */ + +@@ -191,10 +191,10 @@ const struct LayFuncs WinLf = { + NULL + }; + +-static int DoAutolf(char *buf, size_t *lenp, int fr) ++static int DoAutolf(char *buf, int *lenp, int fr) + { + char *p; +- size_t len = *lenp; ++ int len = *lenp; + int trunc = 0; + + for (p = buf; len > 0; p++, len--) { +@@ -215,7 +215,7 @@ static void WinProcess(char **bufpp, size_t *lenp) + + static void WinProcess(char **bufpp, size_t *lenp) + { +- size_t l2 = 0, f, *ilen, l = *lenp, trunc; ++ int l2 = 0, f, *ilen, l = *lenp, trunc; + char *ibuf; + + fore = (Window *)flayer->l_data; +@@ -291,7 +291,7 @@ static void ZombieProcess(char **bufpp, size_t *lenp) + + static void ZombieProcess(char **bufpp, size_t *lenp) + { +- size_t l = *lenp; ++ int l = *lenp; + char *buf = *bufpp, b1[10], b2[10]; + + fore = (Window *)flayer->l_data; +@@ -699,7 +699,7 @@ int MakeWindow(struct NewWindow *newwin) + p->w_readev.data = p->w_writeev.data = (char *)p; + p->w_readev.handler = win_readev_fn; + p->w_writeev.handler = win_writeev_fn; +- p->w_writeev.condpos = (int *)&p->w_inlen; ++ p->w_writeev.condpos = &p->w_inlen; + evenq(&p->w_readev); + evenq(&p->w_writeev); + p->w_paster.pa_slowev.type = EV_TIMEOUT; +@@ -1344,7 +1344,7 @@ int winexec(char **av) + pwin->p_readev.data = pwin->p_writeev.data = (char *)w; + pwin->p_readev.handler = pseu_readev_fn; + pwin->p_writeev.handler = pseu_writeev_fn; +- pwin->p_writeev.condpos = (int *)&pwin->p_inlen; ++ pwin->p_writeev.condpos = &pwin->p_inlen; + if (pwin->p_fdpat & (F_PFRONT << F_PSHIFT * 2 | F_PFRONT << F_PSHIFT)) + evenq(&pwin->p_readev); + evenq(&pwin->p_writeev); +@@ -1378,7 +1378,7 @@ void FreePseudowin(Window *w) + } + evdeq(&pwin->p_readev); + evdeq(&pwin->p_writeev); +- if (w->w_readev.condneg == (int *)&pwin->p_inlen) ++ if (w->w_readev.condneg == &pwin->p_inlen) + w->w_readev.condpos = w->w_readev.condneg = NULL; + evenq(&w->w_readev); + free((char *)pwin); +@@ -1484,7 +1484,7 @@ static void win_readev_fn(Event *event, void *data) + size = IOSIZE - p->w_pwin->p_inlen; + if (size <= 0) { + event->condpos = &const_IOSIZE; +- event->condneg = (int *)&p->w_pwin->p_inlen; ++ event->condneg = &p->w_pwin->p_inlen; + return; + } + } +@@ -1563,7 +1563,7 @@ static void win_writeev_fn(Event *event, void *data) + static void win_writeev_fn(Event *event, void *data) + { + Window *p = (Window *)data; +- size_t len; ++ int len; + if (p->w_inlen) { + if ((len = write(event->fd, p->w_inbuf, p->w_inlen)) <= 0) + len = p->w_inlen; /* dead window */ +@@ -1600,7 +1600,7 @@ static void pseu_readev_fn(Event *event, void *data) + size = IOSIZE - p->w_inlen; + if (size <= 0) { + event->condpos = &const_IOSIZE; +- event->condneg = (int *)&p->w_inlen; ++ event->condneg = &p->w_inlen; + return; + } + } +@@ -1643,7 +1643,7 @@ static void pseu_writeev_fn(Event *event, void *data) + { + Window *p = (Window *)data; + struct pseudowin *pw = p->w_pwin; +- size_t len; ++ int len; + + if (pw->p_inlen == 0) + return; +@@ -1683,10 +1683,10 @@ static void win_destroyev_fn(Event *event, void *data) + WindowDied(p, p->w_exitstatus, 1); + } + +-static int zmodem_parse(Window *p, char *bp, size_t len) ++static int zmodem_parse(Window *p, char *bp, int len) + { + char *b2 = bp; +- for (size_t i = 0; i < len; i++, b2++) { ++ for (int i = 0; i < len; i++, b2++) { + if (p->w_zauto == 0) { + for (; i < len; i++, b2++) + if (*b2 == 030) +@@ -1756,7 +1756,7 @@ static void zmodemFin(char *buf, size_t len, void *dat + } + } + +-static void zmodem_found(Window *p, int send, char *bp, size_t len) ++static void zmodem_found(Window *p, int send, char *bp, int len) + { + char *s; + size_t n; +@@ -1792,7 +1792,7 @@ static void zmodem_found(Window *p, int send, char *bp + display = d; + evdeq(&D_blockedev); + D_readev.condpos = &const_IOSIZE; +- D_readev.condneg = (int *)&p->w_inlen; ++ D_readev.condneg = &p->w_inlen; + ClearAll(); + GotoPos(0, 0); + SetRendition(&mchar_blank); diff --git a/sysutils/screen/files/patch-window.h b/sysutils/screen/files/patch-window.h new file mode 100644 index 000000000000..348fcc223062 --- /dev/null +++ b/sysutils/screen/files/patch-window.h @@ -0,0 +1,23 @@ +--- window.h.orig 2025-05-15 15:31:27 UTC ++++ window.h +@@ -79,7 +79,7 @@ struct pseudowin { + char p_cmd[MAXSTR]; + char p_tty[MAXSTR]; + char p_inbuf[IOSIZE]; /* buffered writing to p_ptyfd */ +- size_t p_inlen; ++ int p_inlen; + }; + + /* bits for fdpat: */ +@@ -157,9 +157,9 @@ struct Window { + int w_poll_zombie_timeout; + int w_ptyfd; /* fd of the master pty */ + char w_inbuf[IOSIZE]; +- size_t w_inlen; ++ int w_inlen; + char w_outbuf[IOSIZE]; +- size_t w_outlen; ++ int w_outlen; + bool w_aflag; /* (-a option) */ + bool w_dynamicaka; /* should we change name */ + char *w_title; /* name of the window */