summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-05-16 23:37:43 -0700
committerKhem Raj <raj.khem@gmail.com>2024-05-16 23:57:32 -0700
commitad4ac698f560af852a146cb4a8cdcbd6b9dfe43a (patch)
treea256f7f74d8f7e275e012e8dc1f76b8bec141f1c
parent66f9ec4542dab469a9fef9fddd3bdc3ff94120cc (diff)
downloadmeta-openembedded-ad4ac698f560af852a146cb4a8cdcbd6b9dfe43a.tar.gz
xterm: Upgrade to 391
Add a patch to fix build with musl Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-graphics/xorg-app/xterm/0001-Add-configure-time-check-for-setsid.patch75
-rw-r--r--meta-oe/recipes-graphics/xorg-app/xterm/0001-include-missing-pty.h-header-for-openpty.patch30
-rw-r--r--meta-oe/recipes-graphics/xorg-app/xterm_391.bb (renamed from meta-oe/recipes-graphics/xorg-app/xterm_388.bb)7
3 files changed, 33 insertions, 79 deletions
diff --git a/meta-oe/recipes-graphics/xorg-app/xterm/0001-Add-configure-time-check-for-setsid.patch b/meta-oe/recipes-graphics/xorg-app/xterm/0001-Add-configure-time-check-for-setsid.patch
deleted file mode 100644
index a6cf16e4e..000000000
--- a/meta-oe/recipes-graphics/xorg-app/xterm/0001-Add-configure-time-check-for-setsid.patch
+++ /dev/null
@@ -1,75 +0,0 @@
1From b23d38f1216c4d70738edaa367cf9ecd2dd4b660 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 13 Dec 2019 12:59:26 -0800
4Subject: [PATCH] Add configure time check for setsid
5
6Do not assume glibc == linux
7
8Upstream-Status: Pending
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11---
12 configure | 1 +
13 configure.in | 1 +
14 main.c | 4 ++--
15 xtermcfg.hin | 1 +
16 4 files changed, 5 insertions(+), 2 deletions(-)
17
18diff --git a/configure b/configure
19index 72342c7..c2ec2ac 100755
20--- a/configure
21+++ b/configure
22@@ -5803,6 +5803,7 @@ for ac_func in \
23 unsetenv \
24 sched_yield \
25 setpgid \
26+ setsid \
27 strftime \
28 tcgetattr \
29 waitpid \
30diff --git a/configure.in b/configure.in
31index 56dbc25..0608c80 100644
32--- a/configure.in
33+++ b/configure.in
34@@ -99,6 +99,7 @@ AC_CHECK_FUNCS( \
35 unsetenv \
36 sched_yield \
37 setpgid \
38+ setsid \
39 strftime \
40 tcgetattr \
41 waitpid \
42diff --git a/main.c b/main.c
43index 24da0eb..332174c 100644
44--- a/main.c
45+++ b/main.c
46@@ -2956,7 +2956,7 @@ main(int argc, char *argv[]ENVP_ARG)
47 }
48 }
49
50-#if defined(__osf__) || (defined(__GLIBC__) && !defined(USE_USG_PTYS)) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
51+#if defined(__osf__) || (defined(__linux__) && !defined(USE_USG_PTYS)) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
52 #define USE_OPENPTY 1
53 static int opened_tty = -1;
54 #endif
55@@ -4205,7 +4205,7 @@ spawnXTerm(XtermWidget xw, unsigned line_speed)
56 /*
57 * now in child process
58 */
59-#if defined(_POSIX_SOURCE) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__)
60+#if HAVE_SETSID
61 int pgrp = setsid(); /* variable may not be used... */
62 #else
63 int pgrp = getpid();
64diff --git a/xtermcfg.hin b/xtermcfg.hin
65index 19048cd..e54d2cd 100644
66--- a/xtermcfg.hin
67+++ b/xtermcfg.hin
68@@ -98,6 +98,7 @@
69 #undef HAVE_SCHED_YIELD /* AC_CHECK_FUNCS(sched_yield) */
70 #undef HAVE_SETITIMER /* CF_SETITIMER */
71 #undef HAVE_SETPGID /* AC_CHECK_FUNCS(setpgid) */
72+#undef HAVE_SETSID /* AC_CHECK_FUNCS(setsid) */
73 #undef HAVE_STDINT_H /* AC_PROG_CC_STDC */
74 #undef HAVE_STDLIB_H /* AC_CHECK_HEADERS(stdlib.h) */
75 #undef HAVE_STDNORETURN_H /* CF_C11_NORETURN */
diff --git a/meta-oe/recipes-graphics/xorg-app/xterm/0001-include-missing-pty.h-header-for-openpty.patch b/meta-oe/recipes-graphics/xorg-app/xterm/0001-include-missing-pty.h-header-for-openpty.patch
new file mode 100644
index 000000000..0c9d64c82
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-app/xterm/0001-include-missing-pty.h-header-for-openpty.patch
@@ -0,0 +1,30 @@
1From e30ab2d73a21bc55511cbedbb9ae603246dbfcd1 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 16 May 2024 23:10:00 -0700
4Subject: [PATCH] include missing pty.h header for openpty()
5
6On musl this problem is unearthed
7
8Fix
9./main.c: In function 'get_pty':
10./main.c:3123:14: error: implicit declaration of function 'openpty'; did you mean 'openat'? [-Wimplicit-function-declaration]
11 3123 | result = openpty(pty, &opened_tty, ttydev, NULL, NULL);
12 | ^~~~~~~
13 | openat
14
15Upstream-Status: Submitted [sent to dickey@invisible-island.net]
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 main.c | 1 +
19 1 file changed, 1 insertion(+)
20
21--- a/main.c
22+++ b/main.c
23@@ -89,6 +89,7 @@
24
25 #define RES_OFFSET(field) XtOffsetOf(XTERM_RESOURCE, field)
26
27+#include <pty.h>
28 #include <xterm.h>
29 #include <version.h>
30 #include <graphics.h>
diff --git a/meta-oe/recipes-graphics/xorg-app/xterm_388.bb b/meta-oe/recipes-graphics/xorg-app/xterm_391.bb
index 8578f0cc9..633d025ee 100644
--- a/meta-oe/recipes-graphics/xorg-app/xterm_388.bb
+++ b/meta-oe/recipes-graphics/xorg-app/xterm_391.bb
@@ -2,13 +2,12 @@ require recipes-graphics/xorg-app/xorg-app-common.inc
2SUMMARY = "xterm is the standard terminal emulator for the X Window System" 2SUMMARY = "xterm is the standard terminal emulator for the X Window System"
3DEPENDS = "libxaw xorgproto libxext libxau libxinerama libxpm ncurses desktop-file-utils-native" 3DEPENDS = "libxaw xorgproto libxext libxau libxinerama libxpm ncurses desktop-file-utils-native"
4 4
5LIC_FILES_CHKSUM = "file://xterm.h;beginline=3;endline=31;md5=9c96124b492c0c02356850c243aaeca2" 5LIC_FILES_CHKSUM = "file://xterm.h;beginline=3;endline=31;md5=1a3032aa728f8fda9d686948940ca58d"
6 6
7SRC_URI = "http://invisible-mirror.net/archives/${BPN}/${BP}.tgz \ 7SRC_URI = "http://invisible-mirror.net/archives/${BPN}/${BP}.tgz \
8 file://0001-Add-configure-time-check-for-setsid.patch \ 8 file://0001-include-missing-pty.h-header-for-openpty.patch \
9 " 9 "
10 10SRC_URI[sha256sum] = "6091371e94de867ce186cc1bc306947b0482d71631847fdeab7982acb20ae6b8"
11SRC_URI[sha256sum] = "ac429345e6f937a5945a89d425a265fee6c215fc669dbdc6a0326e21f4c5f674"
12 11
13PACKAGECONFIG ?= "" 12PACKAGECONFIG ?= ""
14PACKAGECONFIG[xft] = "--enable-freetype,--disable-freetype,libxft fontconfig freetype-native" 13PACKAGECONFIG[xft] = "--enable-freetype,--disable-freetype,libxft fontconfig freetype-native"