Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/x11/vte3 vte3: Fix printf usage for NetBSD.
details: https://anonhg.NetBSD.org/pkgsrc/rev/4cc45d196778
branches: trunk
changeset: 434679:4cc45d196778
user: nia <nia%pkgsrc.org@localhost>
date: Sat Jun 20 16:00:07 2020 +0000
description:
vte3: Fix printf usage for NetBSD.
diffstat:
x11/vte3/Makefile | 5 +-
x11/vte3/distinfo | 9 +-
x11/vte3/patches/patch-bindings_vala_app.vala | 15 +++
x11/vte3/patches/patch-src_decoder-cat.cc | 24 +++++
x11/vte3/patches/patch-src_parser-cat.cc | 24 +++++
x11/vte3/patches/patch-src_pty.cc | 122 +++++++++++++++++++++++++-
x11/vte3/patches/patch-src_vte.cc | 29 +++++-
7 files changed, 219 insertions(+), 9 deletions(-)
diffs (truncated from 305 to 300 lines):
diff -r 162977aed66d -r 4cc45d196778 x11/vte3/Makefile
--- a/x11/vte3/Makefile Sat Jun 20 15:25:01 2020 +0000
+++ b/x11/vte3/Makefile Sat Jun 20 16:00:07 2020 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.26 2020/06/20 00:10:24 ryoon Exp $
+# $NetBSD: Makefile,v 1.27 2020/06/20 16:00:07 nia Exp $
DISTNAME= vte-0.60.3
PKGNAME= ${DISTNAME:S/vte/vte3/}
+PKGREVISION= 1
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/vte/0.60/}
EXTRACT_SUFX= .tar.xz
@@ -20,8 +21,6 @@
# for c++14 \todo
GCC_REQD+= 5
-BUILDLINK_TRANSFORM+= rm:-Werror=format=2 # for %m in printf
-
.include "../../devel/meson/build.mk"
.include "../../converters/fribidi/buildlink3.mk"
.include "../../devel/glib2/buildlink3.mk"
diff -r 162977aed66d -r 4cc45d196778 x11/vte3/distinfo
--- a/x11/vte3/distinfo Sat Jun 20 15:25:01 2020 +0000
+++ b/x11/vte3/distinfo Sat Jun 20 16:00:07 2020 +0000
@@ -1,11 +1,14 @@
-$NetBSD: distinfo,v 1.11 2020/06/20 00:10:24 ryoon Exp $
+$NetBSD: distinfo,v 1.12 2020/06/20 16:00:07 nia Exp $
SHA1 (vte-0.60.3.tar.xz) = ba1e2f241326a2e146336832c21c41b61e0e55af
RMD160 (vte-0.60.3.tar.xz) = 2615d28eaaf9293038f305d26e62e049f503064a
SHA512 (vte-0.60.3.tar.xz) = 3694fe711e0b3eb9d6ba37ad8036f5d3cca4265635ed7afcde750a8445b17f820d1c55b557d0ea1c8a5a45e5408915d8da2ffd65b4d397c6582f288812ae1f18
Size (vte-0.60.3.tar.xz) = 535504 bytes
+SHA1 (patch-bindings_vala_app.vala) = 09444285f642ab48849bbbc1ae663bee3567b8d4
SHA1 (patch-src_app_app.cc) = ff76c74840342195a4d318418474f69e385f6571
-SHA1 (patch-src_pty.cc) = 841aa8246db98a83d68ee7b5131df7e492787238
-SHA1 (patch-src_vte.cc) = 563a990fd00c8ec68d4afba90f3c45a76c76e404
+SHA1 (patch-src_decoder-cat.cc) = 438b934314a440f04ab586022fdb057b6512167b
+SHA1 (patch-src_parser-cat.cc) = 2ee7d7113b4688a631021bcbef13ee6196f534e9
+SHA1 (patch-src_pty.cc) = a9f52d89f356eb0a34de90748a7881d34ae27f12
+SHA1 (patch-src_vte.cc) = 6f8c3a7d64be7a813b740d098d51e17d3187b2ce
SHA1 (patch-src_vtedraw.cc) = 1deab7738ae7c7bbb53e5b951df4d8a6ad9312f9
SHA1 (patch-src_widget.cc) = adcecb612c6a0945f13c26e3b6a89131bcab4b1f
diff -r 162977aed66d -r 4cc45d196778 x11/vte3/patches/patch-bindings_vala_app.vala
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/vte3/patches/patch-bindings_vala_app.vala Sat Jun 20 16:00:07 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-bindings_vala_app.vala,v 1.1 2020/06/20 16:00:07 nia Exp $
+
+NetBSD build fix.
+
+--- bindings/vala/app.vala.orig 2020-05-13 09:51:07.000000000 +0000
++++ bindings/vala/app.vala
+@@ -492,7 +492,7 @@ class Window : Gtk.ApplicationWindow
+
+ switch (pid) {
+ case -1: /* error */
+- printerr("Error forking: %m");
++ printerr("Error forking: %s", strerror(errno));
+ break;
+ case 0: /* child */ {
+ pty.child_setup();
diff -r 162977aed66d -r 4cc45d196778 x11/vte3/patches/patch-src_decoder-cat.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/vte3/patches/patch-src_decoder-cat.cc Sat Jun 20 16:00:07 2020 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_decoder-cat.cc,v 1.1 2020/06/20 16:00:07 nia Exp $
+
+Fix NetBSD build.
+
+--- src/decoder-cat.cc.orig 2020-05-13 09:51:07.000000000 +0000
++++ src/decoder-cat.cc
+@@ -422,7 +422,7 @@ private:
+
+ for (auto i = 0; i < options.repeat(); ++i) {
+ if (i > 0 && lseek(fd, 0, SEEK_SET) != 0) {
+- g_printerr("Failed to seek: %m\n");
++ g_printerr("Failed to seek: %s\n", strerror(errno));
+ return false;
+ }
+
+@@ -472,7 +472,7 @@ public:
+ } else {
+ fd = ::open(filename, O_RDONLY);
+ if (fd == -1) {
+- g_printerr("Error opening file %s: %m\n", filename);
++ g_printerr("Error opening file %s: %s\n", filename, strerror(errno));
+ }
+ }
+ if (fd != -1) {
diff -r 162977aed66d -r 4cc45d196778 x11/vte3/patches/patch-src_parser-cat.cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/vte3/patches/patch-src_parser-cat.cc Sat Jun 20 16:00:07 2020 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_parser-cat.cc,v 1.1 2020/06/20 16:00:07 nia Exp $
+
+Fix NetBSD build.
+
+--- src/parser-cat.cc.orig 2020-05-13 09:51:07.000000000 +0000
++++ src/parser-cat.cc
+@@ -706,7 +706,7 @@ private:
+
+ for (auto i = 0; i < repeat; ++i) {
+ if (i > 0 && lseek(fd, 0, SEEK_SET) != 0) {
+- g_printerr("Failed to seek: %m\n");
++ g_printerr("Failed to seek: %s\n", strerror(errno));
+ return false;
+ }
+
+@@ -747,7 +747,7 @@ public:
+ } else {
+ fd = open(filename, O_RDONLY);
+ if (fd == -1) {
+- g_printerr("Error opening file %s: %m\n", filename);
++ g_printerr("Error opening file %s: %s\n", filename, strerror(errno));
+ }
+ }
+ if (fd != -1) {
diff -r 162977aed66d -r 4cc45d196778 x11/vte3/patches/patch-src_pty.cc
--- a/x11/vte3/patches/patch-src_pty.cc Sat Jun 20 15:25:01 2020 +0000
+++ b/x11/vte3/patches/patch-src_pty.cc Sat Jun 20 16:00:07 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_pty.cc,v 1.4 2020/06/20 00:10:24 ryoon Exp $
+$NetBSD: patch-src_pty.cc,v 1.5 2020/06/20 16:00:07 nia Exp $
NetBSD fix
Use correct includes on SunOS.
@@ -17,6 +17,94 @@
#include <stropts.h>
#endif
#include <glib.h>
+@@ -111,7 +113,7 @@ Pty::child_setup() const noexcept
+ sigset_t set;
+ sigemptyset(&set);
+ if (pthread_sigmask(SIG_SETMASK, &set, nullptr) == -1) {
+- _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %m\n", "pthread_sigmask");
++ _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %s\n", "pthread_sigmask", strerror(errno));
+ _exit(127);
+ }
+
+@@ -134,7 +136,7 @@ Pty::child_setup() const noexcept
+ */
+ _vte_debug_print (VTE_DEBUG_PTY, "Starting new session\n");
+ if (setsid() == -1) {
+- _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %m\n", "setsid");
++ _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %s\n", "setsid", strerror(errno));
+ _exit(127);
+ }
+ }
+@@ -158,7 +160,7 @@ Pty::child_setup() const noexcept
+ if (fd == -1 &&
+ errno != EINVAL &&
+ errno != ENOTTY) {
+- _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %m\n", "ioctl(TIOCGPTPEER)");
++ _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %s\n", "ioctl(TIOCGPTPEER)", strerror(errno));
+ _exit(127);
+ }
+
+@@ -168,7 +170,7 @@ Pty::child_setup() const noexcept
+ if (fd == -1) {
+ auto const name = ptsname(masterfd);
+ if (name == nullptr) {
+- _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %m\n", "ptsname");
++ _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %s\n", "ptsname", strerror(errno));
+ _exit(127);
+ }
+
+@@ -178,7 +180,7 @@ Pty::child_setup() const noexcept
+
+ fd = ::open(name, fd_flags);
+ if (fd == -1) {
+- _vte_debug_print (VTE_DEBUG_PTY, "Failed to open PTY: %m\n");
++ _vte_debug_print (VTE_DEBUG_PTY, "Failed to open PTY: %s\n", strerror(errno));
+ _exit(127);
+ }
+ }
+@@ -192,7 +194,7 @@ Pty::child_setup() const noexcept
+ */
+ if (!(m_flags & VTE_PTY_NO_CTTY)) {
+ if (ioctl(fd, TIOCSCTTY, fd) != 0) {
+- _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %m\n", "ioctl(TIOCSCTTY)");
++ _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %s\n", "ioctl(TIOCSCTTY)", strerror(errno));
+ _exit(127);
+ }
+ }
+@@ -533,7 +535,7 @@ Pty::set_size(int rows,
+ if (ret != 0) {
+ vte::util::restore_errno errsv;
+ _vte_debug_print(VTE_DEBUG_PTY,
+- "Failed to set size on %d: %m\n", master);
++ "Failed to set size on %d: %s\n", master, strerror(errno));
+ }
+
+ return ret == 0;
+@@ -574,7 +576,7 @@ Pty::get_size(int* rows,
+
+ vte::util::restore_errno errsv;
+ _vte_debug_print(VTE_DEBUG_PTY,
+- "Failed to read size from fd %d: %m\n", master);
++ "Failed to read size from fd %d: %s\n", master, strerror(errno));
+
+ return false;
+ }
+@@ -614,13 +616,13 @@ fd_setup(int fd)
+ {
+ if (grantpt(fd) != 0) {
+ vte::util::restore_errno errsv;
+- _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %m\n", "grantpt");
++ _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %s\n", "grantpt", strerror(errno));
+ return -1;
+ }
+
+ if (unlockpt(fd) != 0) {
+ vte::util::restore_errno errsv;
+- _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %m\n", "unlockpt");
++ _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %s\n", "unlockpt", strerror(errno));
+ return -1;
+ }
+
@@ -638,12 +640,14 @@ fd_setup(int fd)
return -1;
}
@@ -46,7 +134,7 @@
if (fd == -1 && errno == EINVAL) {
/* Try without NONBLOCK and apply the flag afterward */
need_nonblocking = true;
-@@ -701,12 +710,14 @@ _vte_pty_open_posix(void)
+@@ -701,22 +710,24 @@ _vte_pty_open_posix(void)
}
#endif /* !linux */
@@ -61,3 +149,33 @@
if (grantpt(fd) != 0) {
vte::util::restore_errno errsv;
+- _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %m\n", "grantpt");
++ _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %s\n", "grantpt", strerror(errno));
+ return {};
+ }
+
+ if (unlockpt(fd) != 0) {
+ vte::util::restore_errno errsv;
+- _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %m\n", "unlockpt");
++ _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %s\n", "unlockpt", strerror(errno));
+ return {};
+ }
+
+@@ -757,7 +768,7 @@ Pty::set_utf8(bool utf8) const noexcept
+ struct termios tio;
+ if (tcgetattr(fd(), &tio) == -1) {
+ vte::util::restore_errno errsv;
+- _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %m", "tcgetattr");
++ _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %s", "tcgetattr", strerror(errno));
+ return false;
+ }
+
+@@ -772,7 +783,7 @@ Pty::set_utf8(bool utf8) const noexcept
+ if (saved_cflag != tio.c_iflag &&
+ tcsetattr(fd(), TCSANOW, &tio) == -1) {
+ vte::util::restore_errno errsv;
+- _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %m", "tcsetattr");
++ _vte_debug_print(VTE_DEBUG_PTY, "%s failed: %s", "tcsetattr", strerror(errno));
+ return false;
+ }
+ #endif
diff -r 162977aed66d -r 4cc45d196778 x11/vte3/patches/patch-src_vte.cc
--- a/x11/vte3/patches/patch-src_vte.cc Sat Jun 20 15:25:01 2020 +0000
+++ b/x11/vte3/patches/patch-src_vte.cc Sat Jun 20 16:00:07 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_vte.cc,v 1.3 2020/06/20 00:10:24 ryoon Exp $
+$NetBSD: patch-src_vte.cc,v 1.4 2020/06/20 16:00:07 nia Exp $
Use correct includes on SunOS.
Don't use packet mode on SunOS.
@@ -48,3 +48,30 @@
break;
}
} while (rem);
+@@ -4052,7 +4060,7 @@ out:
+ case EBUSY: /* do nothing */
+ break;
+ default:
+- _vte_debug_print (VTE_DEBUG_IO, "Error reading from child: %m");
++ _vte_debug_print (VTE_DEBUG_IO, "Error reading from child: %s", strerror(errno));
+ break;
+ }
+
+@@ -7655,7 +7663,7 @@ Terminal::set_size(long columns,
+ * in case something went awry.
+ */
+ if (!pty()->set_size(rows, columns))
+- g_warning("Failed to set PTY size: %m\n");
++ g_warning("Failed to set PTY size: %s\n", strerror(errno));
+ refresh_size();
+ } else {
+ m_row_count = rows;
+@@ -10074,7 +10082,7 @@ Terminal::set_pty(vte::base::Pty *new_pt
+ set_size(m_column_count, m_row_count);
+
+ if (!pty()->set_utf8(data_syntax() == DataSyntax::eECMA48_UTF8))
Home |
Main Index |
Thread Index |
Old Index