Subject: [alpine-aports] [PATCH] testing/xterm: update to v320 & fix pty

From: Stuart Cardall <[email-masked]>
Date: Sat, 29 Aug 2015 00:13:36 +0000

---
 testing/xterm/APKBUILD      | 15 ++++++++++-----
 testing/xterm/fix-pty.patch | 21 +++++++++++++++++++++
 2 files changed, 31 insertions(+), 5 deletions(-)
 create mode 100644 testing/xterm/fix-pty.patch

diff --git a/testing/xterm/APKBUILD b/testing/xterm/APKBUILD
index 526a060..ff47ef8 100644
--- a/testing/xterm/APKBUILD
+++ b/testing/xterm/APKBUILD
@@ -1,7 +1,7 @@
 # Contributor: Carlo Landmeter <[email-masked]>
 # Maintainer:
 pkgname=xterm
-pkgver=318
+pkgver=320
 pkgrel=0
 pkgdesc="X Terminal Emulator"
 url="http://invisible-island.net/xterm"
@@ -12,7 +12,9 @@ depends_dev="libxaw-dev libxft-dev ncurses-dev"
 makedepends="$depends_dev"
 install=""
 subpackages="$pkgname-doc"
-source="ftp://invisible-island.net/xterm/xterm-$pkgver.tgz"
+source="ftp://invisible-island.net/xterm/xterm-$pkgver.tgz
+	fix-pty.patch
+	"
 
 _builddir="$srcdir"/xterm-$pkgver
 prepare() {
@@ -68,6 +70,9 @@ package() {
 	rm -f "$pkgdir"/usr/lib/*.la
 }
 
-md5sums="598d1122f501116fbfed8a642d8ea6c1  xterm-318.tgz"
-sha256sums="e71f2b0fb11d6c723c1f9af10fc01048b776f44c1636aa1b71e5eff77deb81d7  xterm-318.tgz"
-sha512sums="d1ff9b4359a49f47cc9e5e7d6311242b7beef57e554389fe3033f69263b871ad5ba89d74b428d79564f013efced2d2d36cfac987aed8ab873722fdeb8fd6abf6  xterm-318.tgz"
+md5sums="0d7f0e6390d132ae59876b3870e5783d  xterm-320.tgz
+50ad7eb624278b6b3fd59a0b281271d2  fix-pty.patch"
+sha256sums="a60dbb574334c081425fa30f011cd9f571e3be7a91e2a84e252461798bce24a7  xterm-320.tgz
+aaaacf4ed38a8e3124cd7384930c3eadeba04862921f74eab37ba7599deaf322  fix-pty.patch"
+sha512sums="6c234b5564ce1276136bc3ef8ef5d6703ed9dc3af3b0fd7c8c713c0876276fc4bb55cee7137f9a8c45df66531b6bd8eb778bd7660ea35c4aa8aa80ba17ba1263  xterm-320.tgz
+9aa68a138b741e5592c102df7210758280cb5babd8d3a5aa966fde664e1c2b4a0753e81ed2efcf6829c1caba7cb9778eaa5ec334db7dc19abfad7058e213770a  fix-pty.patch"
diff --git a/testing/xterm/fix-pty.patch b/testing/xterm/fix-pty.patch
new file mode 100644
index 0000000..40ae80a
--- /dev/null
+++ b/testing/xterm/fix-pty.patch
@@ -0,0 +1,21 @@
+# fixed by Dalias #
+--- a/main.c.orig	2015-08-19 00:25:35.000000000 +0000
++++ b/main.c	2015-08-28 23:43:21.631378928 +0000
+@@ -2628,7 +2628,7 @@
+ 
+ #if defined(USE_OPENPTY)
+     result = openpty(pty, &opened_tty, ttydev, NULL, NULL);
+-#elif defined(HAVE_POSIX_OPENPT) && defined(HAVE_PTSNAME) && defined(HAVE_GRANTPT_PTY_ISATTY)
++#elif defined(HAVE_POSIX_OPENPT) && defined(HAVE_PTSNAME)
+     if ((*pty = posix_openpt(O_RDWR)) >= 0) {
+ 	char *name = ptsname(*pty);
+ 	if (name != 0) {
+@@ -3708,7 +3708,7 @@
+ 	    /*
+ 	     * now in child process
+ 	     */
+-#if defined(_POSIX_SOURCE) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__)
++#if defined(_POSIX_VERSION) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__)
+ 	    int pgrp = setsid();	/* variable may not be used... */
+ #else
+ 	    int pgrp = getpid();
-- 
2.5.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---