diff options
author | jperkin <jperkin@pkgsrc.org> | 2018-06-22 14:34:43 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2018-06-22 14:34:43 +0000 |
commit | 4bc64e7ea59713b80fe4c35d89b4fb4a0f651237 (patch) | |
tree | 513edbfd82ff3bd564a688518d3f29f07c8c686f /x11/vte3 | |
parent | 117aec79a759f1abe9a8d80cfa34489e8bffc893 (diff) | |
download | pkgsrc-4bc64e7ea59713b80fe4c35d89b4fb4a0f651237.tar.gz |
vte3: Don't use packet mode on SunOS.
Fixes runtime pty handling. Bump PKGREVISION.
Diffstat (limited to 'x11/vte3')
-rw-r--r-- | x11/vte3/Makefile | 3 | ||||
-rw-r--r-- | x11/vte3/distinfo | 6 | ||||
-rw-r--r-- | x11/vte3/patches/patch-src_pty.cc | 37 | ||||
-rw-r--r-- | x11/vte3/patches/patch-src_vte.cc | 39 |
4 files changed, 76 insertions, 9 deletions
diff --git a/x11/vte3/Makefile b/x11/vte3/Makefile index e94f64113f3..039d02421d8 100644 --- a/x11/vte3/Makefile +++ b/x11/vte3/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.14 2018/06/12 23:00:34 youri Exp $ +# $NetBSD: Makefile,v 1.15 2018/06/22 14:34:43 jperkin Exp $ DISTNAME= vte-0.52.2 PKGNAME= ${DISTNAME:S/vte/vte3/} +PKGREVISION= 1 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_GNOME:=sources/vte/0.52/} EXTRACT_SUFX= .tar.xz diff --git a/x11/vte3/distinfo b/x11/vte3/distinfo index a9ca3e78663..1b5b4e98ad6 100644 --- a/x11/vte3/distinfo +++ b/x11/vte3/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.7 2018/06/21 09:34:50 jperkin Exp $ +$NetBSD: distinfo,v 1.8 2018/06/22 14:34:43 jperkin Exp $ SHA1 (vte-0.52.2.tar.xz) = be8de64f8584ada23461db8e0a4dce2e650de5ce RMD160 (vte-0.52.2.tar.xz) = 3707a2a4a0ca7bbc562dbf2d570e7e4a4a15afef @@ -6,6 +6,6 @@ SHA512 (vte-0.52.2.tar.xz) = fc760973efa1eb1f100447cdf0d9b944b74f5ba7e3ae1ae1d0a Size (vte-0.52.2.tar.xz) = 1011696 bytes SHA1 (patch-configure) = 9a570f27c0ec4e4680d517a8c2498b37728d52ae SHA1 (patch-src_app_app.cc) = 99fa242665d799205df305af5c0b15938db92c7c -SHA1 (patch-src_pty.cc) = cc2e0be62a90ffefcb21f8b07cb25f281b30df1e -SHA1 (patch-src_vte.cc) = b07315fef8593e6b51427ac039b9b4724e9fd18b +SHA1 (patch-src_pty.cc) = 4bcd447b214d59da69ea8c0bc5100cce27623f63 +SHA1 (patch-src_vte.cc) = 9886ae82daa8c4ad55ce85e2dec3216d3e46221a SHA1 (patch-src_vtedraw.cc) = 1deab7738ae7c7bbb53e5b951df4d8a6ad9312f9 diff --git a/x11/vte3/patches/patch-src_pty.cc b/x11/vte3/patches/patch-src_pty.cc index dd5cfc82184..954e130d118 100644 --- a/x11/vte3/patches/patch-src_pty.cc +++ b/x11/vte3/patches/patch-src_pty.cc @@ -1,9 +1,10 @@ -$NetBSD: patch-src_pty.cc,v 1.2 2018/05/15 09:50:49 jperkin Exp $ +$NetBSD: patch-src_pty.cc,v 1.3 2018/06/22 14:34:43 jperkin Exp $ NetBSD fix Use correct includes on SunOS. +Don't use packet mode on SunOS. ---- src/pty.cc.orig 2018-04-09 21:43:51.000000000 +0000 +--- src/pty.cc.orig 2018-05-21 19:30:33.000000000 +0000 +++ src/pty.cc @@ -60,7 +60,9 @@ #ifdef HAVE_PTY_H @@ -16,7 +17,22 @@ Use correct includes on SunOS. #include <stropts.h> #endif #include <glib.h> -@@ -624,7 +626,12 @@ _vte_pty_open_posix(void) +@@ -605,12 +607,14 @@ fd_setup(int fd) + return -1; + } + ++#ifndef __sun + if (fd_set_cpkt(fd) < 0) { + vte::util::restore_errno errsv; + _vte_debug_print(VTE_DEBUG_PTY, + "%s failed: %s", "ioctl(TIOCPKT)", g_strerror(errsv)); + return -1; + } ++#endif + + return 0; + } +@@ -632,7 +636,12 @@ _vte_pty_open_posix(void) fd = posix_openpt(O_RDWR | O_NOCTTY | O_NONBLOCK | O_CLOEXEC); #ifndef __linux__ /* Other kernels may not support CLOEXEC or NONBLOCK above, so try to fall back */ @@ -30,3 +46,18 @@ Use correct includes on SunOS. if (fd == -1 && errno == EINVAL) { /* Try without NONBLOCK and apply the flag afterward */ need_nonblocking = true; +@@ -668,12 +677,14 @@ _vte_pty_open_posix(void) + } + #endif /* !linux */ + ++#ifndef __sun + if (fd_set_cpkt(fd) < 0) { + vte::util::restore_errno errsv; + _vte_debug_print(VTE_DEBUG_PTY, + "%s failed: %s", "ioctl(TIOCPKT)", g_strerror(errsv)); + return -1; + } ++#endif + + _vte_debug_print(VTE_DEBUG_PTY, "Allocated pty on fd %d.\n", (int)fd); + diff --git a/x11/vte3/patches/patch-src_vte.cc b/x11/vte3/patches/patch-src_vte.cc index 3428e9866a0..09734b954e8 100644 --- a/x11/vte3/patches/patch-src_vte.cc +++ b/x11/vte3/patches/patch-src_vte.cc @@ -1,8 +1,9 @@ -$NetBSD: patch-src_vte.cc,v 1.1 2018/05/15 09:50:49 jperkin Exp $ +$NetBSD: patch-src_vte.cc,v 1.2 2018/06/22 14:34:43 jperkin Exp $ Use correct includes on SunOS. +Don't use packet mode on SunOS. ---- src/vte.cc.orig 2018-04-09 21:43:51.000000000 +0000 +--- src/vte.cc.orig 2018-05-21 19:31:53.000000000 +0000 +++ src/vte.cc @@ -25,6 +25,9 @@ #include <string.h> @@ -14,3 +15,37 @@ Use correct includes on SunOS. #include <errno.h> #include <fcntl.h> #include <math.h> +@@ -3970,6 +3973,9 @@ VteTerminalPrivate::pty_io_read(GIOChann + bp = chunk->data + chunk->len; + len = 0; + do { ++#ifdef __sun ++ int ret = read (fd, bp, rem); ++#else + /* We'd like to read (fd, bp, rem); but due to TIOCPKT mode + * there's an extra input byte returned at the beginning. + * We need to see what that byte is, but otherwise drop it +@@ -3980,6 +3986,7 @@ VteTerminalPrivate::pty_io_read(GIOChann + int ret = read (fd, bp - 1, rem + 1); + pkt_header = bp[-1]; + bp[-1] = save; ++#endif + switch (ret){ + case -1: + err = errno; +@@ -3988,6 +3995,7 @@ VteTerminalPrivate::pty_io_read(GIOChann + eof = TRUE; + goto out; + default: ++#ifndef __sun + ret--; + + if (pkt_header & TIOCPKT_IOCTL) { +@@ -4008,6 +4016,7 @@ VteTerminalPrivate::pty_io_read(GIOChann + } else if (pkt_header & TIOCPKT_START) { + pty_scroll_lock_changed(false); + } ++#endif + + bp += ret; + rem -= ret; |