diff --git a/patches/xterm/jinx-working-patch.patch b/patches/xterm/jinx-working-patch.patch new file mode 100644 index 00000000..d0f11fa8 --- /dev/null +++ b/patches/xterm/jinx-working-patch.patch @@ -0,0 +1,152 @@ +diff --git xterm-clean/Makefile.in xterm-workdir/Makefile.in +index bb6da23..9500664 100644 +--- xterm-clean/Makefile.in ++++ xterm-workdir/Makefile.in +@@ -68,7 +68,7 @@ PIXMAPDIR_DEF = @no_pixmapdir@-DPIXMAP_ROOTDIR=\"@PIXMAPDIR@/\" + CPPFLAGS = -I. -I$(srcdir) -DHAVE_CONFIG_H @CPPFLAGS@ -DDEFCLASS=\"@APP_CLASS@\" $(PIXMAPDIR_DEF) $(EXTRA_CPPFLAGS) + CFLAGS = @CFLAGS@ $(EXTRA_CFLAGS) + LDFLAGS = @LDFLAGS@ @EXTRA_LDFLAGS@ +-LIBS = @LIBS@ ++LIBS = @LIBS@ -lncursesw -ltinfow + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +diff --git xterm-clean/config.sub xterm-workdir/config.sub +index e4c4e09..272cd1c 100755 +--- xterm-clean/config.sub ++++ xterm-workdir/config.sub +@@ -1737,7 +1737,7 @@ case $os in + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. +- gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ ++ gnu* | astral* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ +diff --git xterm-clean/main.c xterm-workdir/main.c +index 3d2ad4c..a998b97 100644 +--- xterm-clean/main.c ++++ xterm-workdir/main.c +@@ -92,6 +92,7 @@ + #include + #include + #include ++#include + + /* xterm uses these X Toolkit resource names, which are exported in array */ + #undef XtNborderWidth +@@ -172,7 +173,7 @@ static GCC_NORETURN void HsSysError(int); + #define KANJI + #endif + +-#ifdef linux ++#if defined(linux) || defined(__astral__) + #define USE_SYSV_PGRP + #define USE_SYSV_SIGNALS + #define WTMP +@@ -315,7 +316,7 @@ ttyslot(void) + #ifndef NOFILE + #define NOFILE OPEN_MAX + #endif +-#elif !(defined(VMS) || defined(WIN32) || defined(Lynx) || defined(__GNU__) || defined(__MVS__)) ++#elif !(defined(VMS) || defined(WIN32) || defined(Lynx) || defined(__GNU__) || defined(__MVS__) || defined(__astral__)) + #include /* for NOFILE */ + #endif + +@@ -716,11 +717,12 @@ static struct { + #endif + + #ifndef TAB3 +-#if defined(OXTABS) +-#define TAB3 OXTABS +-#elif defined(XTABS) +-#define TAB3 XTABS +-#endif ++#define TAB3 0014000 ++//#if defined(OXTABS) ++//#define TAB3 OXTABS ++//#elif defined(XTABS) ++//#define TAB3 XTABS ++//#endif + #endif + + #ifndef TABDLY +@@ -3011,7 +3013,7 @@ main(int argc, char *argv[]ENVP_ARG) + } + #endif + #endif +-#if defined(USE_ANY_SYSV_TERMIO) || defined(__MVS__) || defined(__minix) ++#if defined(USE_ANY_SYSV_TERMIO) || defined(__MVS__) || defined(__minix) || defined(__astral__) + if (0 > (mode = fcntl(screen->respond, F_GETFL, 0))) + SysError(ERROR_F_GETFL); + #ifdef O_NDELAY +@@ -3753,7 +3755,7 @@ ourValidShell(const char *pathname) + return findValidShell(x_strtrim(resource.valid_shells), pathname); + } + +-#if defined(HAVE_GETUSERSHELL) && defined(HAVE_ENDUSERSHELL) ++#if defined(HAVE_GETUSERSHELL) && defined(HAVE_ENDUSERSHELL) && 0 + static Boolean + validShell(const char *pathname) + { +@@ -4496,7 +4498,7 @@ spawnXTerm(XtermWidget xw, unsigned line_speed) + /* make /dev/tty work */ + ioctl(ttyfd, TCSETCTTY, 0); + #endif +-#if ((defined(__GLIBC__) && defined(__FreeBSD_kernel__)) || defined(__GNU__)) && defined(TIOCSCTTY) ++#if ((defined(__GLIBC__) && defined(__FreeBSD_kernel__)) || defined(__GNU__) || defined(__astral__)) && defined(TIOCSCTTY) + /* make /dev/tty work */ + ioctl(ttyfd, TIOCSCTTY, 0); + #endif +diff --git xterm-clean/xterm.h xterm-workdir/xterm.h +index 89590cb..9a99f0c 100644 +--- xterm-clean/xterm.h ++++ xterm-workdir/xterm.h +@@ -80,7 +80,7 @@ + #define HAVE_PUTENV 1 + #endif + +-#if defined(CSRG_BASED) || defined(__GNU__) || defined(__minix) ++#if defined(CSRG_BASED) || defined(__GNU__) || defined(__minix) || defined(__astral__) + #define USE_POSIX_TERMIOS 1 + #endif + +@@ -176,7 +176,7 @@ + #define USE_SYSV_UTMP + #endif + +-#if defined(__GNU__) || defined(__MVS__) || defined(__osf__) ++#if defined(__GNU__) || defined(__MVS__) || defined(__osf__) || defined(__astral__) + #define USE_TTY_GROUP + #endif + +diff --git xterm-clean/xterm_io.h xterm-workdir/xterm_io.h +index 130d365..72ebd01 100644 +--- xterm-clean/xterm_io.h ++++ xterm-workdir/xterm_io.h +@@ -92,13 +92,14 @@ + #undef SYSV /* pretend to be bsd (sgtty.h) */ + #endif /* macII */ + +-#ifdef __GNU__ ++#if defined(__GNU__) || defined(__astral__) + #define USE_POSIX_TERMIOS + #define HAVE_POSIX_OPENPT 1 + #define HAVE_PTSNAME 1 + #define HAVE_GRANTPT_PTY_ISATTY 1 + #endif + ++ + #if defined(__GLIBC__) && !(defined(linux) || defined(__GNU__)) + #define USE_POSIX_TERMIOS /* GNU/KFreeBSD and GNU/KNetBSD */ + #endif +@@ -212,7 +213,7 @@ + #undef FIONCLEX + #endif /* macII */ + +-#if defined(__QNX__) || defined(__GNU__) || defined(__MVS__) || defined(__osf__) ++#if defined(__QNX__) || defined(__GNU__) || defined(__MVS__) || defined(__osf__) || defined(__astral__) + #undef TIOCSLTC /* conflicts with */ + #undef TIOCSLTC + #endif diff --git a/recipes/xterm b/recipes/xterm new file mode 100644 index 00000000..d9780b7b --- /dev/null +++ b/recipes/xterm @@ -0,0 +1,15 @@ +name=xterm +revision=1 +from_source=xterm +imagedeps="base-devel" +hostdeps="xgcc xbinutils pkgconfig libtool" +deps="mlibc libx11 libxaw ncurses" + +build() { + ${source_dir}/configure --host=x86_64-astral --prefix=${prefix} --disable-tcap-fkeys --disable-tcap-query + make -j ${parallelism} SHLIB_LIBS="-ltinfow" +} + +package() { + make install DESTDIR=${dest_dir} +} diff --git a/source-recipes/xterm b/source-recipes/xterm new file mode 100644 index 00000000..3a6e6cba --- /dev/null +++ b/source-recipes/xterm @@ -0,0 +1,9 @@ +name=xterm +version=390 +source_method=tarball +tarball_url="https://invisible-mirror.net/archives/xterm/xterm-${version}.tgz" +tarball_sha512=865ae292a56635ec2811a950763da22cbbb4de463bee75b4595b7387a09227f612c5620986e431631c3d73fe783d862fd9a6694c54c33898327339467b7085b7 + +regenerate() { + true +}