summaryrefslogtreecommitdiff
path: root/package/xterm
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-11-06 19:00:51 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2013-11-06 19:00:51 +0100
commit55bbdd0c376d8e169e5b9363e8b34882f161f9e5 (patch)
tree5f1627900efc77f6037a72e8923926e7dbbaaeb5 /package/xterm
parent0cd497af446f04f0b197f779ff407cf4cb43b7ce (diff)
update xterm to latest upstream, add fixes t owork with musl libc
Diffstat (limited to 'package/xterm')
-rw-r--r--package/xterm/Makefile7
-rw-r--r--package/xterm/patches/patch-main_c41
-rw-r--r--package/xterm/patches/patch-ptyx_h11
-rw-r--r--package/xterm/patches/patch-xterm_h11
-rw-r--r--package/xterm/patches/patch-xterm_io_h11
5 files changed, 78 insertions, 3 deletions
diff --git a/package/xterm/Makefile b/package/xterm/Makefile
index edb7d0a67..5e26c53b8 100644
--- a/package/xterm/Makefile
+++ b/package/xterm/Makefile
@@ -4,9 +4,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= xterm
-PKG_VERSION:= 267
+PKG_VERSION:= 297
PKG_RELEASE:= 1
-PKG_MD5SUM:= 3945ab70cfa2a9e95804157ee1b0f8e8
+PKG_MD5SUM:= 45610ae6fe90cf086fcd75b9cb97bbaf
PKG_DESCR:= Terminal Emulator for X Windows
PKG_SECTION:= x11/apps
PKG_DEPENDS:= libxaw libxt libncurses libxft fontconfig
@@ -20,7 +20,8 @@ include $(TOPDIR)/mk/package.mk
$(eval $(call PKG_template,XTERM,xterm,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-CONFIGURE_ARGS+= --with-app-defaults=/usr/lib/X11/app-defaults
+CONFIGURE_ARGS+= --with-app-defaults=/usr/lib/X11/app-defaults \
+ --disable-pty-handshake
xterm-install:
$(INSTALL_DIR) $(IDIR_XTERM)/usr/bin
diff --git a/package/xterm/patches/patch-main_c b/package/xterm/patches/patch-main_c
new file mode 100644
index 000000000..dbe55d4ed
--- /dev/null
+++ b/package/xterm/patches/patch-main_c
@@ -0,0 +1,41 @@
+--- xterm-297.orig/main.c 2013-05-28 00:11:11.000000000 +0200
++++ xterm-297/main.c 2013-10-31 12:24:52.000000000 +0100
+@@ -2583,7 +2583,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
+@@ -3134,7 +3134,7 @@ find_utmp(struct UTMP_STR *tofind)
+
+ #define close_fd(fd) close(fd), fd = -1
+
+-#if defined(TIOCNOTTY) && (!defined(__GLIBC__) || (__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
++#if defined(TIOCNOTTY) && defined(__linux__)
+ #define USE_NO_DEV_TTY 1
+ #else
+ #define USE_NO_DEV_TTY 0
+@@ -3378,7 +3378,8 @@ spawnXTerm(XtermWidget xw)
+ }
+ #endif /* __MVS__ */
+
+- close_fd(ttyfd);
++ // do not close it here
++ // close_fd(ttyfd);
+ }
+
+ if (get_pty(&screen->respond, XDisplayString(screen->display))) {
+@@ -3807,8 +3808,9 @@ spawnXTerm(XtermWidget xw)
+ eg. by lineedit in the shell, or emacs, etc. then tio
+ will have bad values. Let's just get termio from the
+ new tty and tailor it. */
+- if (ttyGetAttr(ttyfd, &tio) == -1)
++ if (ttyGetAttr(ttyfd, &tio) == -1) {
+ SysError(ERROR_TIOCGETP);
++ }
+ tio.c_lflag |= ECHOE;
+ #endif /* umips */
+ /* Now is also the time to change the modes of the
diff --git a/package/xterm/patches/patch-ptyx_h b/package/xterm/patches/patch-ptyx_h
new file mode 100644
index 000000000..cd2fa7cad
--- /dev/null
+++ b/package/xterm/patches/patch-ptyx_h
@@ -0,0 +1,11 @@
+--- xterm-297.orig/ptyx.h 2013-09-10 20:10:00.000000000 +0200
++++ xterm-297/ptyx.h 2013-10-30 10:30:07.000000000 +0100
+@@ -169,7 +169,7 @@
+ #define USE_PTY_DEVICE 1
+ #define USE_PTY_SEARCH 1
+
+-#if defined(__osf__) || (defined(linux) && defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1)) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
++#if defined(__osf__) || defined(linux) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
+ #undef USE_PTY_DEVICE
+ #undef USE_PTY_SEARCH
+ #define USE_PTS_DEVICE 1
diff --git a/package/xterm/patches/patch-xterm_h b/package/xterm/patches/patch-xterm_h
new file mode 100644
index 000000000..7a3418a11
--- /dev/null
+++ b/package/xterm/patches/patch-xterm_h
@@ -0,0 +1,11 @@
+--- xterm-297.orig/xterm.h 2013-09-10 12:55:04.000000000 +0200
++++ xterm-297/xterm.h 2013-10-30 17:19:53.000000000 +0100
+@@ -99,7 +99,7 @@
+ #define HAVE_PUTENV 1
+ #endif
+
+-#if defined(CSRG_BASED) || defined(__GNU__)
++#if defined(CSRG_BASED) || defined(__linux__)
+ #define USE_POSIX_TERMIOS 1
+ #endif
+
diff --git a/package/xterm/patches/patch-xterm_io_h b/package/xterm/patches/patch-xterm_io_h
new file mode 100644
index 000000000..3ca39b3f6
--- /dev/null
+++ b/package/xterm/patches/patch-xterm_io_h
@@ -0,0 +1,11 @@
+--- xterm-297.orig/xterm_io.h 2013-01-06 16:20:45.000000000 +0100
++++ xterm-297/xterm_io.h 2013-10-30 17:21:10.000000000 +0100
+@@ -66,7 +66,7 @@
+ #endif
+
+ #ifdef linux
+-#define USE_TERMIOS
++#define USE_POSIX_TERMIOS
+ #endif
+
+ #ifdef __SCO__