summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-terms/xvt')
-rw-r--r--x11-terms/xvt/Manifest2
-rw-r--r--x11-terms/xvt/files/xvt-int-main.patch23
-rw-r--r--x11-terms/xvt/files/xvt-makefile.patch20
-rw-r--r--x11-terms/xvt/files/xvt-pts.patch12
-rw-r--r--x11-terms/xvt/files/xvt-ttyinit-svr4pty.diff63
-rw-r--r--x11-terms/xvt/metadata.xml10
-rw-r--r--x11-terms/xvt/xvt-2.1-r3.ebuild48
7 files changed, 178 insertions, 0 deletions
diff --git a/x11-terms/xvt/Manifest b/x11-terms/xvt/Manifest
new file mode 100644
index 000000000000..7f77b58dc1ee
--- /dev/null
+++ b/x11-terms/xvt/Manifest
@@ -0,0 +1,2 @@
+DIST xvt-1.0.tar.Z 59445 SHA256 399013beff538467a307d8a5f132e47ea4f5e18d60aba62c4d438f3ae1f086a1 SHA512 671fdc931526821e9228c327d2231e0f241997c632b0f084b2be02b99296ececa64f2de2769e92c3682c0aa2e9cf8dc61ac561ffd1d10136256029d24f872a1b WHIRLPOOL 31bec7b379c44c691f9a56c9052bf7b45a6df763f06750494d2bb5b747b7cb515e681f9e215de85f1173f1da31121e826a41ed49b7e7b1fc32e2b132c7d6d636
+DIST xvt-2.1.diff.gz 39941 SHA256 c51e0b1ea281ce83138d6a3f724c21b65c6257cf5438d8d0d5c34a8006348607 SHA512 c229cb98ef3de7b4ab76b81ae888fc3a59ff9fcf5807ecdc58f8e5b634f9c2e618d2b3c17b4cd6410903004a712aac1c1d329751a48f05d605a7eb23dd58d612 WHIRLPOOL 9c0dcf583100a0637cd6dc126c2eb34c278b13399405c6a49adc2f2e3f964ca67a2743b83cf4958bc97f1ff3d48d2660d44f20e6d018596139240375b60084f2
diff --git a/x11-terms/xvt/files/xvt-int-main.patch b/x11-terms/xvt/files/xvt-int-main.patch
new file mode 100644
index 000000000000..81baa76ce5e0
--- /dev/null
+++ b/x11-terms/xvt/files/xvt-int-main.patch
@@ -0,0 +1,23 @@
+--- xvt-1.0/xvt.c.orig 2009-09-04 15:49:13.000000000 +0200
++++ xvt-1.0/xvt.c 2009-09-04 15:49:13.000000000 +0200
+@@ -41,9 +41,9 @@
+ #endif /* UKC_LOCATIONS */
+
+ #ifdef __STDC__
+-void main(int,char **);
++int main(int,char **);
+ #else
+-void main();
++int main();
+ #endif
+
+ extern int debugging;
+@@ -67,7 +67,7 @@
+ * master end of the pseudo-teletype pair with the command talking to
+ * the slave.
+ */
+-void
++int
+ main(argc,argv)
+ int argc;
+ char **argv;
diff --git a/x11-terms/xvt/files/xvt-makefile.patch b/x11-terms/xvt/files/xvt-makefile.patch
new file mode 100644
index 000000000000..368fdeeb00be
--- /dev/null
+++ b/x11-terms/xvt/files/xvt-makefile.patch
@@ -0,0 +1,20 @@
+--- xvt-1.0/Makefile.orig 2009-09-04 15:45:08.000000000 +0200
++++ xvt-1.0/Makefile 2009-09-04 15:46:00.000000000 +0200
+@@ -27,7 +27,7 @@
+ #ARCH=AIX3
+ #ARCH=ULTRIX
+ #ARCH=HPUX
+-#ARCH=LINUX
++ARCH=LINUX
+ #
+ #
+ # If this line is uncommented then `Make config' will unclude several options
+@@ -107,7 +107,7 @@
+ OBJ=xvt.o xsetup.o command.o screen.o sbar.o ttyinit.o
+ SRC=xvt.c xsetup.c command.c screen.c sbar.c ttyinit.c
+ #
+-CFLAGS=-O $(INCLUDE) $(OPTIONS) $(DEFS) -D$(ARCH)
++CFLAGS+= $(INCLUDE) $(OPTIONS) $(DEFS) -D$(ARCH)
+ #
+ xvt: $(OBJ)
+ $(CC) $(LDFLAGS) -o xvt $(OBJ) $(LIB) -lX11
diff --git a/x11-terms/xvt/files/xvt-pts.patch b/x11-terms/xvt/files/xvt-pts.patch
new file mode 100644
index 000000000000..a86504ad29e5
--- /dev/null
+++ b/x11-terms/xvt/files/xvt-pts.patch
@@ -0,0 +1,12 @@
+--- a/ttyinit.c
++++ b/ttyinit.c
+@@ -25,6 +25,9 @@
+
+ char xvt_ttyinit_c_sccsid[] = "@(#)ttyinit.c 1.3 11/1/94 (UKC)";
+
++#ifdef LINUX
++#define _XOPEN_SOURCE
++#endif
+ #ifdef __STDC__
+ #include <stdarg.h>
+ #else
diff --git a/x11-terms/xvt/files/xvt-ttyinit-svr4pty.diff b/x11-terms/xvt/files/xvt-ttyinit-svr4pty.diff
new file mode 100644
index 000000000000..a858250c1d8a
--- /dev/null
+++ b/x11-terms/xvt/files/xvt-ttyinit-svr4pty.diff
@@ -0,0 +1,63 @@
+--- ttyinit.c 2004-08-24 18:51:18.510722064 +0100
++++ ttyinit.c.new 2004-08-24 18:50:30.539014872 +0100
+@@ -46,6 +46,7 @@
+ #include <pwd.h>
+ #include <errno.h>
+ #include <string.h>
++#include <stropts.h>
+ #include "xvt.h"
+ #include "token.h"
+ #include "command.h"
+@@ -410,44 +411,6 @@
+ get_pseudo_tty(pmaster,pslave)
+ int *pmaster, *pslave;
+ {
+-#ifdef BSD_PTY
+- int mfd, sfd;
+- char *s3, *s4;
+- static char ptyc3[] = "pqrstuvwxyz";
+- static char ptyc4[] = "0123456789abcdef";
+- static char ptynam[] = "/dev/ptyxx";
+- static char ttynam[] = "/dev/ttyxx";
+-
+- /* First find a master pty that we can open.
+- */
+- mfd = -1;
+- for (s3 = ptyc3; *s3 != 0; s3++) {
+- for (s4 = ptyc4; *s4 != 0; s4++) {
+- ptynam[8] = ttynam[8] = *s3;
+- ptynam[9] = ttynam[9] = *s4;
+- if ((mfd = open(ptynam,O_RDWR)) >= 0) {
+- if (geteuid() == 0 || access(ttynam,R_OK|W_OK) == 0)
+- break;
+- else {
+- close(mfd);
+- mfd = -1;
+- }
+- }
+- }
+- if (mfd >= 0)
+- break;
+- }
+- if (mfd < 0) {
+- error("Can't open a pseudo teletype");
+- return(NULL);
+- }
+- if ((sfd = open(ttynam,O_RDWR)) < 0) {
+- error("could not open slave tty %s",ttynam);
+- return(NULL);
+- }
+-#endif /* BSD_PTY */
+-
+-#ifdef SVR4_PTY
+ char *ttynam;
+ int mfd, sfd;
+
+@@ -464,7 +427,6 @@
+ }
+ ioctl(sfd,I_PUSH,"ptem");
+ ioctl(sfd,I_PUSH,"ldterm");
+-#endif /* SVR4_PTY */
+
+ *pslave = sfd;
+ *pmaster = mfd;
diff --git a/x11-terms/xvt/metadata.xml b/x11-terms/xvt/metadata.xml
new file mode 100644
index 000000000000..a0c8ba6f17ed
--- /dev/null
+++ b/x11-terms/xvt/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>maintainer-needed@gentoo.org</email>
+ </maintainer>
+ <longdescription lang="en">
+ A tiny vt100 terminal emulator for X.
+ </longdescription>
+</pkgmetadata>
diff --git a/x11-terms/xvt/xvt-2.1-r3.ebuild b/x11-terms/xvt/xvt-2.1-r3.ebuild
new file mode 100644
index 000000000000..4f872a1a6bfe
--- /dev/null
+++ b/x11-terms/xvt/xvt-2.1-r3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="2"
+
+inherit eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A tiny vt100 terminal emulator for X"
+HOMEPAGE="ftp://ftp.x.org/R5contrib/xvt-1.0.README"
+SRC_URI="ftp://ftp.x.org/R5contrib/xvt-1.0.tar.Z
+ mirror://gentoo/xvt-2.1.diff.gz"
+
+LICENSE="xvt"
+SLOT="0"
+KEYWORDS="alpha amd64 ppc x86"
+IUSE=""
+
+RDEPEND="x11-libs/libX11"
+DEPEND="${RDEPEND}
+ x11-proto/xproto"
+
+S=${WORKDIR}/${PN}-1.0
+
+src_prepare() {
+ # this brings the distribution upto version 2.1
+ epatch "${WORKDIR}"/${P}.diff
+
+ # fix #61393
+ epatch "${FILESDIR}/${PN}-ttyinit-svr4pty.diff"
+
+ # CFLAGS, CC #241554
+ epatch "${FILESDIR}/${PN}-makefile.patch"
+
+ # int main, not void main
+ epatch "${FILESDIR}/${PN}-int-main.patch"
+
+ # fix segfault (bug #363883)
+ epatch "${FILESDIR}/${PN}-pts.patch"
+
+ tc-export CC
+}
+
+src_install() {
+ dobin xvt || die "dobin failed"
+ doman xvt.1
+ dodoc README
+}