Skip to content

Commit 83fb452

Browse files
committed
screen - update from 4.9.1 to 5.0.0
1 parent cb9c39e commit 83fb452

File tree

9 files changed

+107
-102
lines changed

9 files changed

+107
-102
lines changed

build/screen/build.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
. ../../lib/build.sh
1919

2020
PROG=screen
21-
VER=4.9.1
21+
VER=5.0.0
2222
PKG=terminal/screen
2323
SUMMARY="GNU Screen terminal multiplexer"
2424
DESC="A full-screen window manager that multiplexes a physical "
@@ -31,6 +31,12 @@ set_standard XPG6
3131
CONFIGURE_OPTS+="
3232
--with-sys-screenrc=/etc/screenrc
3333
--enable-colors256
34+
--enable-utmp
35+
"
36+
37+
CONFIGURE_OPTS[WS]+="
38+
ac_cv_search_tgetent=-lncurses
39+
ac_cv_search_openpty=\"none required\"
3440
"
3541

3642
build_init() {

build/screen/patches/Makefile.in.patch

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ diff -wpruN --no-dereference '--exclude=*.orig' a~/Makefile.in a/Makefile.in
88
-bindir = $(exec_prefix)/bin
99
+bindir = @bindir@
1010

11-
VERSION = @VERSION@
11+
VERSION = @PACKAGE_VERSION@
1212
SCREEN = screen-$(VERSION)

build/screen/patches/gcc14.patch

+12-51
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,19 @@
1-
diff -wpruN --no-dereference '--exclude=*.orig' a~/configure.ac a/configure.ac
2-
--- a~/configure.ac 1970-01-01 00:00:00
3-
+++ a/configure.ac 1970-01-01 00:00:00
4-
@@ -493,7 +493,7 @@ main()
5-
}
6-
l = sizeof(a);
7-
close(0);
8-
- if (accept(s1, &a, &l))
9-
+ if (accept(s1, (struct sockaddr *)&a, &l))
10-
return 1;
11-
FD_SET(0, &f);
12-
if (select(1, &f, 0, 0, 0) == -1)
13-
@@ -914,7 +914,7 @@ AC_TRY_LINK([
14-
#define pututline _pututline
15-
#endif
16-
],
17-
-[int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT),
18-
+[int x = DEAD_PROCESS; pututline(NULL); getutent();], AC_DEFINE(GETUTENT),
19-
olibs="$LIBS"
20-
LIBS="$LIBS -lgen"
21-
AC_CHECKING(getutent with -lgen)
22-
@@ -931,7 +931,7 @@ AC_TRY_LINK([
23-
#define pututline _pututline
24-
#endif
25-
],
26-
-[int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT), LIBS="$olibs")
27-
+[int x = DEAD_PROCESS; pututline(NULL); getutent();], AC_DEFINE(GETUTENT), LIBS="$olibs")
28-
)
29-
AC_CHECKING(ut_host)
30-
AC_TRY_COMPILE([
31-
@@ -962,6 +962,7 @@ fi
32-
AC_CHECKING(getloadavg)
33-
AC_TRY_LINK([
34-
#include <stdlib.h>
35-
+ #include <sys/loadavg.h>
36-
],[
37-
getloadavg((double *)0, 0);],
38-
AC_DEFINE(LOADAV_GETLOADAVG) load=1,
39-
diff -wpruN --no-dereference '--exclude=*.orig' a~/os.h a/os.h
40-
--- a~/os.h 1970-01-01 00:00:00
41-
+++ a/os.h 1970-01-01 00:00:00
42-
@@ -131,7 +131,7 @@ extern int errno;
43-
# define rindex strrchr
44-
# define bzero(poi,len) memset(poi,0,len)
45-
# define bcmp memcmp
46-
-# define killpg(pgrp,sig) kill( -(pgrp), sig)
47-
+//# define killpg(pgrp,sig) kill( -(pgrp), sig)
48-
#endif
1+
diff -wpruN --no-dereference '--exclude=*.orig' a~/termcap.c a/termcap.c
2+
--- a~/termcap.c 1970-01-01 00:00:00
3+
+++ a/termcap.c 1970-01-01 00:00:00
4+
@@ -32,6 +32,7 @@
5+
6+
#include <sys/types.h>
7+
#include <stdint.h>
8+
+#include <strings.h>
9+
10+
#include "screen.h"
4911

50-
#ifndef HAVE_GETCWD
5112
diff -wpruN --no-dereference '--exclude=*.orig' a~/utmp.c a/utmp.c
5213
--- a~/utmp.c 1970-01-01 00:00:00
5314
+++ a/utmp.c 1970-01-01 00:00:00
54-
@@ -35,6 +35,8 @@
55-
#include "extern.h"
15+
@@ -39,6 +39,8 @@
16+
#include "screen.h"
5617

5718
#ifdef HAVE_UTEMPTER
5819
+#include <sys/types.h>
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff -wpruN --no-dereference '--exclude=*.orig' a~/tty.c a/tty.c
2+
--- a~/tty.c 1970-01-01 00:00:00
3+
+++ a/tty.c 1970-01-01 00:00:00
4+
@@ -802,6 +802,7 @@ static void consredir_readev_fn(Event *
5+
6+
int TtyGrabConsole(int fd, bool on, char *rc_name)
7+
{
8+
+#if defined(SRIOCSREDIR) || defined(TIOCCONS)
9+
Display *d;
10+
#ifdef SRIOCSREDIR
11+
int cfd;
12+
@@ -881,6 +882,10 @@ int TtyGrabConsole(int fd, bool on, char
13+
consredir_ev.handler = consredir_readev_fn;
14+
evenq(&consredir_ev);
15+
return 0;
16+
+#else
17+
+ Msg(0, "Grabbing console not supported");
18+
+ return -1;
19+
+#endif
20+
}
21+
22+
/*

build/screen/patches/ncurses.patch

-25
This file was deleted.

build/screen/patches/openpty.patch

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Pending https://www.illumos.org/issues/5386
2+
3+
diff -wpruN --no-dereference '--exclude=*.orig' a~/pty.c a/pty.c
4+
--- a~/pty.c 1970-01-01 00:00:00
5+
+++ a/pty.c 1970-01-01 00:00:00
6+
@@ -46,6 +46,56 @@
7+
8+
int pty_preopen = 0;
9+
10+
+#ifdef __illumos__
11+
+#include <sys/stropts.h>
12+
+static int
13+
+openpty_failure(int c, int s, int e)
14+
+{
15+
+ if (s >= 0)
16+
+ (void) close(s);
17+
+ if (c >= 0)
18+
+ (void) close(c);
19+
+ errno = e;
20+
+ return (-1);
21+
+}
22+
+
23+
+static int
24+
+openpty(int *controlp, int *subordp, char *name, const struct termios *termp,
25+
+ const struct winsize *winp)
26+
+{
27+
+ int c = -1;
28+
+ int s = -1;
29+
+ char *sname;
30+
+ int e;
31+
+
32+
+ if ((c = posix_openpt(O_RDWR | O_NOCTTY)) < 0)
33+
+ return (-1);
34+
+ if (grantpt(c) < 0 || unlockpt(c) < 0)
35+
+ return (openpty_failure(c, s, errno));
36+
+ if ((sname = ptsname(c)) == NULL ||
37+
+ (s = open(sname, O_RDWR | O_NOCTTY)) < 0) {
38+
+ return (openpty_failure(c, s, errno));
39+
+ }
40+
+
41+
+ if (ioctl(s, __I_PUSH_NOCTTY, "ptem") < 0 ||
42+
+ ioctl(s, __I_PUSH_NOCTTY, "ldterm") < 0) {
43+
+ return (openpty_failure(c, s, errno));
44+
+ }
45+
+
46+
+ if (termp != NULL && tcsetattr(s, TCSAFLUSH, termp) != 0)
47+
+ return (openpty_failure(c, s, errno));
48+
+ if (winp != NULL && ioctl(s, TIOCSWINSZ, winp) != 0)
49+
+ return (openpty_failure(c, s, errno));
50+
+
51+
+ if (name != NULL)
52+
+ strcpy(name, sname);
53+
+
54+
+ *controlp = c;
55+
+ *subordp = s;
56+
+ return (0);
57+
+}
58+
+#endif
59+
+
60+
/***************************************************************/
61+
62+
int OpenPTY(char **ttyn)

build/screen/patches/series

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Makefile.in.patch
2-
ncurses.patch
3-
unneededlibs.patch
2+
openpty.patch
3+
grabconsole.patch
44
gcc14.patch

build/screen/patches/unneededlibs.patch

-21
This file was deleted.

doc/packages.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
| system/test/epolltest | 20240808 | https://github.com/omniosorg/epoll-test-suite
108108
| system/test/fio | 3.37 | https://github.com/axboe/fio/tags
109109
| system/watch | 3.3.16 | https://gitlab.com/api/v4/projects/procps-ng%2Fprocps/releases https://gitlab.com/procps-ng/procps/-/releases
110-
| terminal/screen | 4.9.1 | https://ftp.gnu.org/gnu/screen/
110+
| terminal/screen | 5.0.0 | https://ftp.gnu.org/gnu/screen/
111111
| terminal/tmux | 3.4 | https://github.com/tmux/tmux/releases http://tmux.github.io/
112112
| text/gawk | 5.3.0 | https://ftp.gnu.org/gnu/gawk/
113113
| text/gnu-diffutils | 3.10 | http://git.savannah.gnu.org/cgit/diffutils.git/refs/tags

0 commit comments

Comments
 (0)