mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-09 04:11:16 +00:00
xterm: Upgrade to 391
Add a patch to fix build with musl Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
-75
@@ -1,75 +0,0 @@
|
|||||||
From b23d38f1216c4d70738edaa367cf9ecd2dd4b660 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Khem Raj <raj.khem@gmail.com>
|
|
||||||
Date: Fri, 13 Dec 2019 12:59:26 -0800
|
|
||||||
Subject: [PATCH] Add configure time check for setsid
|
|
||||||
|
|
||||||
Do not assume glibc == linux
|
|
||||||
|
|
||||||
Upstream-Status: Pending
|
|
||||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
||||||
|
|
||||||
---
|
|
||||||
configure | 1 +
|
|
||||||
configure.in | 1 +
|
|
||||||
main.c | 4 ++--
|
|
||||||
xtermcfg.hin | 1 +
|
|
||||||
4 files changed, 5 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/configure b/configure
|
|
||||||
index 72342c7..c2ec2ac 100755
|
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -5803,6 +5803,7 @@ for ac_func in \
|
|
||||||
unsetenv \
|
|
||||||
sched_yield \
|
|
||||||
setpgid \
|
|
||||||
+ setsid \
|
|
||||||
strftime \
|
|
||||||
tcgetattr \
|
|
||||||
waitpid \
|
|
||||||
diff --git a/configure.in b/configure.in
|
|
||||||
index 56dbc25..0608c80 100644
|
|
||||||
--- a/configure.in
|
|
||||||
+++ b/configure.in
|
|
||||||
@@ -99,6 +99,7 @@ AC_CHECK_FUNCS( \
|
|
||||||
unsetenv \
|
|
||||||
sched_yield \
|
|
||||||
setpgid \
|
|
||||||
+ setsid \
|
|
||||||
strftime \
|
|
||||||
tcgetattr \
|
|
||||||
waitpid \
|
|
||||||
diff --git a/main.c b/main.c
|
|
||||||
index 24da0eb..332174c 100644
|
|
||||||
--- a/main.c
|
|
||||||
+++ b/main.c
|
|
||||||
@@ -2956,7 +2956,7 @@ main(int argc, char *argv[]ENVP_ARG)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-#if defined(__osf__) || (defined(__GLIBC__) && !defined(USE_USG_PTYS)) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
|
|
||||||
+#if defined(__osf__) || (defined(__linux__) && !defined(USE_USG_PTYS)) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
|
|
||||||
#define USE_OPENPTY 1
|
|
||||||
static int opened_tty = -1;
|
|
||||||
#endif
|
|
||||||
@@ -4205,7 +4205,7 @@ spawnXTerm(XtermWidget xw, unsigned line_speed)
|
|
||||||
/*
|
|
||||||
* now in child process
|
|
||||||
*/
|
|
||||||
-#if defined(_POSIX_SOURCE) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__)
|
|
||||||
+#if HAVE_SETSID
|
|
||||||
int pgrp = setsid(); /* variable may not be used... */
|
|
||||||
#else
|
|
||||||
int pgrp = getpid();
|
|
||||||
diff --git a/xtermcfg.hin b/xtermcfg.hin
|
|
||||||
index 19048cd..e54d2cd 100644
|
|
||||||
--- a/xtermcfg.hin
|
|
||||||
+++ b/xtermcfg.hin
|
|
||||||
@@ -98,6 +98,7 @@
|
|
||||||
#undef HAVE_SCHED_YIELD /* AC_CHECK_FUNCS(sched_yield) */
|
|
||||||
#undef HAVE_SETITIMER /* CF_SETITIMER */
|
|
||||||
#undef HAVE_SETPGID /* AC_CHECK_FUNCS(setpgid) */
|
|
||||||
+#undef HAVE_SETSID /* AC_CHECK_FUNCS(setsid) */
|
|
||||||
#undef HAVE_STDINT_H /* AC_PROG_CC_STDC */
|
|
||||||
#undef HAVE_STDLIB_H /* AC_CHECK_HEADERS(stdlib.h) */
|
|
||||||
#undef HAVE_STDNORETURN_H /* CF_C11_NORETURN */
|
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
From e30ab2d73a21bc55511cbedbb9ae603246dbfcd1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Khem Raj <raj.khem@gmail.com>
|
||||||
|
Date: Thu, 16 May 2024 23:10:00 -0700
|
||||||
|
Subject: [PATCH] include missing pty.h header for openpty()
|
||||||
|
|
||||||
|
On musl this problem is unearthed
|
||||||
|
|
||||||
|
Fix
|
||||||
|
./main.c: In function 'get_pty':
|
||||||
|
./main.c:3123:14: error: implicit declaration of function 'openpty'; did you mean 'openat'? [-Wimplicit-function-declaration]
|
||||||
|
3123 | result = openpty(pty, &opened_tty, ttydev, NULL, NULL);
|
||||||
|
| ^~~~~~~
|
||||||
|
| openat
|
||||||
|
|
||||||
|
Upstream-Status: Submitted [sent to dickey@invisible-island.net]
|
||||||
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||||
|
---
|
||||||
|
main.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
--- a/main.c
|
||||||
|
+++ b/main.c
|
||||||
|
@@ -89,6 +89,7 @@
|
||||||
|
|
||||||
|
#define RES_OFFSET(field) XtOffsetOf(XTERM_RESOURCE, field)
|
||||||
|
|
||||||
|
+#include <pty.h>
|
||||||
|
#include <xterm.h>
|
||||||
|
#include <version.h>
|
||||||
|
#include <graphics.h>
|
||||||
+3
-4
@@ -2,13 +2,12 @@ require recipes-graphics/xorg-app/xorg-app-common.inc
|
|||||||
SUMMARY = "xterm is the standard terminal emulator for the X Window System"
|
SUMMARY = "xterm is the standard terminal emulator for the X Window System"
|
||||||
DEPENDS = "libxaw xorgproto libxext libxau libxinerama libxpm ncurses desktop-file-utils-native"
|
DEPENDS = "libxaw xorgproto libxext libxau libxinerama libxpm ncurses desktop-file-utils-native"
|
||||||
|
|
||||||
LIC_FILES_CHKSUM = "file://xterm.h;beginline=3;endline=31;md5=9c96124b492c0c02356850c243aaeca2"
|
LIC_FILES_CHKSUM = "file://xterm.h;beginline=3;endline=31;md5=1a3032aa728f8fda9d686948940ca58d"
|
||||||
|
|
||||||
SRC_URI = "http://invisible-mirror.net/archives/${BPN}/${BP}.tgz \
|
SRC_URI = "http://invisible-mirror.net/archives/${BPN}/${BP}.tgz \
|
||||||
file://0001-Add-configure-time-check-for-setsid.patch \
|
file://0001-include-missing-pty.h-header-for-openpty.patch \
|
||||||
"
|
"
|
||||||
|
SRC_URI[sha256sum] = "6091371e94de867ce186cc1bc306947b0482d71631847fdeab7982acb20ae6b8"
|
||||||
SRC_URI[sha256sum] = "ac429345e6f937a5945a89d425a265fee6c215fc669dbdc6a0326e21f4c5f674"
|
|
||||||
|
|
||||||
PACKAGECONFIG ?= ""
|
PACKAGECONFIG ?= ""
|
||||||
PACKAGECONFIG[xft] = "--enable-freetype,--disable-freetype,libxft fontconfig freetype-native"
|
PACKAGECONFIG[xft] = "--enable-freetype,--disable-freetype,libxft fontconfig freetype-native"
|
||||||
Reference in New Issue
Block a user