Skip to content

Commit

Permalink
screen - update from 4.9.1 to 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
citrus-it committed Sep 15, 2024
1 parent 929c9a2 commit bb2bc8f
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 102 deletions.
8 changes: 7 additions & 1 deletion build/screen/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
. ../../lib/build.sh

PROG=screen
VER=4.9.1
VER=5.0.0
PKG=terminal/screen
SUMMARY="GNU Screen terminal multiplexer"
DESC="A full-screen window manager that multiplexes a physical "
Expand All @@ -31,6 +31,12 @@ set_standard XPG6
CONFIGURE_OPTS+="
--with-sys-screenrc=/etc/screenrc
--enable-colors256
--enable-utmp
"

CONFIGURE_OPTS[WS]+="
ac_cv_search_tgetent=-lncurses
ac_cv_search_openpty=\"none required\"
"

build_init() {
Expand Down
2 changes: 1 addition & 1 deletion build/screen/patches/Makefile.in.patch
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ diff -wpruN --no-dereference '--exclude=*.orig' a~/Makefile.in a/Makefile.in
-bindir = $(exec_prefix)/bin
+bindir = @bindir@

VERSION = @VERSION@
VERSION = @PACKAGE_VERSION@
SCREEN = screen-$(VERSION)
63 changes: 12 additions & 51 deletions build/screen/patches/gcc14.patch
Original file line number Diff line number Diff line change
@@ -1,58 +1,19 @@
diff -wpruN --no-dereference '--exclude=*.orig' a~/configure.ac a/configure.ac
--- a~/configure.ac 1970-01-01 00:00:00
+++ a/configure.ac 1970-01-01 00:00:00
@@ -493,7 +493,7 @@ main()
}
l = sizeof(a);
close(0);
- if (accept(s1, &a, &l))
+ if (accept(s1, (struct sockaddr *)&a, &l))
return 1;
FD_SET(0, &f);
if (select(1, &f, 0, 0, 0) == -1)
@@ -914,7 +914,7 @@ AC_TRY_LINK([
#define pututline _pututline
#endif
],
-[int x = DEAD_PROCESS; pututline((struct utmp *)0); getutent();], AC_DEFINE(GETUTENT),
+[int x = DEAD_PROCESS; pututline(NULL); getutent();], AC_DEFINE(GETUTENT),
olibs="$LIBS"
LIBS="$LIBS -lgen"
AC_CHECKING(getutent with -lgen)
@@ -931,7 +931,7 @@ 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; pututline(NULL); getutent();], AC_DEFINE(GETUTENT), LIBS="$olibs")
)
AC_CHECKING(ut_host)
AC_TRY_COMPILE([
@@ -962,6 +962,7 @@ fi
AC_CHECKING(getloadavg)
AC_TRY_LINK([
#include <stdlib.h>
+ #include <sys/loadavg.h>
],[
getloadavg((double *)0, 0);],
AC_DEFINE(LOADAV_GETLOADAVG) load=1,
diff -wpruN --no-dereference '--exclude=*.orig' a~/os.h a/os.h
--- a~/os.h 1970-01-01 00:00:00
+++ a/os.h 1970-01-01 00:00:00
@@ -131,7 +131,7 @@ extern int errno;
# define rindex strrchr
# define bzero(poi,len) memset(poi,0,len)
# define bcmp memcmp
-# define killpg(pgrp,sig) kill( -(pgrp), sig)
+//# define killpg(pgrp,sig) kill( -(pgrp), sig)
#endif
diff -wpruN --no-dereference '--exclude=*.orig' a~/termcap.c a/termcap.c
--- a~/termcap.c 1970-01-01 00:00:00
+++ a/termcap.c 1970-01-01 00:00:00
@@ -32,6 +32,7 @@

#include <sys/types.h>
#include <stdint.h>
+#include <strings.h>

#include "screen.h"

#ifndef HAVE_GETCWD
diff -wpruN --no-dereference '--exclude=*.orig' a~/utmp.c a/utmp.c
--- a~/utmp.c 1970-01-01 00:00:00
+++ a/utmp.c 1970-01-01 00:00:00
@@ -35,6 +35,8 @@
#include "extern.h"
@@ -39,6 +39,8 @@
#include "screen.h"

#ifdef HAVE_UTEMPTER
+#include <sys/types.h>
Expand Down
22 changes: 22 additions & 0 deletions build/screen/patches/grabconsole.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff -wpruN --no-dereference '--exclude=*.orig' a~/tty.c a/tty.c
--- a~/tty.c 1970-01-01 00:00:00
+++ a/tty.c 1970-01-01 00:00:00
@@ -802,6 +802,7 @@ static void consredir_readev_fn(Event *

int TtyGrabConsole(int fd, bool on, char *rc_name)
{
+#if defined(SRIOCSREDIR) || defined(TIOCCONS)
Display *d;
#ifdef SRIOCSREDIR
int cfd;
@@ -881,6 +882,10 @@ int TtyGrabConsole(int fd, bool on, char
consredir_ev.handler = consredir_readev_fn;
evenq(&consredir_ev);
return 0;
+#else
+ Msg(0, "Grabbing console not supported");
+ return -1;
+#endif
}

/*
25 changes: 0 additions & 25 deletions build/screen/patches/ncurses.patch

This file was deleted.

62 changes: 62 additions & 0 deletions build/screen/patches/openpty.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Pending https://www.illumos.org/issues/5386

diff -wpruN --no-dereference '--exclude=*.orig' a~/pty.c a/pty.c
--- a~/pty.c 1970-01-01 00:00:00
+++ a/pty.c 1970-01-01 00:00:00
@@ -46,6 +46,56 @@

int pty_preopen = 0;

+#ifdef __illumos__
+#include <sys/stropts.h>
+static int
+openpty_failure(int c, int s, int e)
+{
+ if (s >= 0)
+ (void) close(s);
+ if (c >= 0)
+ (void) close(c);
+ errno = e;
+ return (-1);
+}
+
+static int
+openpty(int *controlp, int *subordp, char *name, const struct termios *termp,
+ const struct winsize *winp)
+{
+ int c = -1;
+ int s = -1;
+ char *sname;
+ int e;
+
+ if ((c = posix_openpt(O_RDWR | O_NOCTTY)) < 0)
+ return (-1);
+ if (grantpt(c) < 0 || unlockpt(c) < 0)
+ return (openpty_failure(c, s, errno));
+ if ((sname = ptsname(c)) == NULL ||
+ (s = open(sname, O_RDWR | O_NOCTTY)) < 0) {
+ return (openpty_failure(c, s, errno));
+ }
+
+ if (ioctl(s, __I_PUSH_NOCTTY, "ptem") < 0 ||
+ ioctl(s, __I_PUSH_NOCTTY, "ldterm") < 0) {
+ return (openpty_failure(c, s, errno));
+ }
+
+ if (termp != NULL && tcsetattr(s, TCSAFLUSH, termp) != 0)
+ return (openpty_failure(c, s, errno));
+ if (winp != NULL && ioctl(s, TIOCSWINSZ, winp) != 0)
+ return (openpty_failure(c, s, errno));
+
+ if (name != NULL)
+ strcpy(name, sname);
+
+ *controlp = c;
+ *subordp = s;
+ return (0);
+}
+#endif
+
/***************************************************************/

int OpenPTY(char **ttyn)
4 changes: 2 additions & 2 deletions build/screen/patches/series
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Makefile.in.patch
ncurses.patch
unneededlibs.patch
openpty.patch
grabconsole.patch
gcc14.patch
21 changes: 0 additions & 21 deletions build/screen/patches/unneededlibs.patch

This file was deleted.

2 changes: 1 addition & 1 deletion doc/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
| system/test/epolltest | 20240808 | https://github.com/omniosorg/epoll-test-suite
| system/test/fio | 3.37 | https://github.com/axboe/fio/tags
| system/watch | 3.3.16 | https://gitlab.com/api/v4/projects/procps-ng%2Fprocps/releases https://gitlab.com/procps-ng/procps/-/releases
| terminal/screen | 4.9.1 | https://ftp.gnu.org/gnu/screen/
| terminal/screen | 5.0.0 | https://ftp.gnu.org/gnu/screen/
| terminal/tmux | 3.4 | https://github.com/tmux/tmux/releases http://tmux.github.io/
| text/gawk | 5.3.0 | https://ftp.gnu.org/gnu/gawk/
| text/gnu-diffutils | 3.10 | http://git.savannah.gnu.org/cgit/diffutils.git/refs/tags
Expand Down

0 comments on commit bb2bc8f

Please sign in to comment.