# ChangeLog for dev-libs/tvision
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/tvision/ChangeLog,v 1.16 2007/01/06 04:13:29 kugelfang Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/tvision/ChangeLog,v 1.17 2007/01/12 15:37:32 truedfx Exp $
+
+*tvision-2.1.0_pre2 (12 Jan 2007)
+
+ 12 Jan 2007; Harald van Dijk <truedfx@gentoo.org>
+ -files/tvision-2.0.3-gcc4.patch, +files/tvision-2.1.0_pre2-gcc41.patch,
+ +files/tvision-2.1.0_pre2-outb.patch,
+ +files/tvision-2.1.0_pre2-underflow.patch, +tvision-2.1.0_pre2.ebuild:
+ Version bump plus a buffer underflow fix (#160591)
06 Jan 2007; Danny van Dyk <kugelfang@gentoo.org> -tvision-2.0.1.ebuild,
-tvision-2.0.3.ebuild:
--- /dev/null
+MD5 e5d7fe4202bc9e09e81ac0ed561dcd34 rhtvision_2.1.0-2.tar.gz 1590449
+RMD160 e1b27322a9b75e20d13682e4895e05cf369e3017 rhtvision_2.1.0-2.tar.gz 1590449
+SHA256 fef19d839069dea2cd5459f24a190883a3b2b600a60d6f7823f456d8e6889412 rhtvision_2.1.0-2.tar.gz 1590449
--- /dev/null
+--- tvision/include/tv/inputln.h
++++ tvision/include/tv/inputln.h
+@@ -201,7 +201,7 @@
+ { return name; }
+
+ protected:
+- TInputLine::TInputLine(StreamableInit) :
++ TInputLine(StreamableInit) :
+ TInputLineBaseT<char,TDrawBuffer>(streamableInit) {}
+
+ public:
--- /dev/null
+Recent kernel headers no longer provide asm/io.h.
+
+--- tvision/classes/linux/linuxdis.cc
++++ tvision/classes/linux/linuxdis.cc
+@@ -300,7 +300,11 @@
+ *****************************************************************************/
+
+ #ifdef h386LowLevel
++#if HAVE_OUTB_IN_SYS
++#include <sys/io.h>
++#else
+ #include <asm/io.h>
++#endif
+
+ static inline
+ unsigned char I(unsigned char i)
+--- tvision/classes/linux/linuxscr.cc
++++ tvision/classes/linux/linuxscr.cc
+@@ -123,7 +123,11 @@
+ #include <tv/linux/log.h>
+
+ #ifdef h386LowLevel
++ #if HAVE_OUTB_IN_SYS
++ #include <sys/io.h>
++ #else
+ #include <asm/io.h>
++ #endif
+ #endif
+
+ // What a hell is that?!
+--- tvision/config.pl
++++ tvision/config.pl
+@@ -77,7 +77,7 @@
+ # glibc I use but the fact is that the needed tricks make it very Linux
+ # dependent.
+ LookForPThread() if $OSf eq 'Linux';
+- #LookForOutB();
++ LookForOutB();
+ }
+ if ($Compf eq 'Cygwin')
+ {# Cygwin incorporates a XFree86 port
--- /dev/null
+Bug #160591; fixes a buffer underflow.
+Reported by B Douglas Hilton <b.d.hilton@verizon.net>
+
+--- tvision/classes/ttermina.cc
++++ tvision/classes/ttermina.cc
+@@ -233,7 +233,7 @@
+ }
+ }
+ }
+- while (pos-->=queBack);
++ while (pos-->queBack);
+
+ return queBack;
+ }
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/tvision/tvision-2.1.0_pre2.ebuild,v 1.1 2007/01/12 15:37:32 truedfx Exp $
+
+inherit eutils multilib
+
+DESCRIPTION="Text User Interface that implements the well known CUA widgets"
+HOMEPAGE="http://tvision.sourceforge.net/"
+SRC_URI="mirror://sourceforge/tvision/rhtvision_${PV/_pre/-}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+S=${WORKDIR}/${PN}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-gcc41.patch
+ epatch "${FILESDIR}"/${P}-outb.patch
+ epatch "${FILESDIR}"/${P}-underflow.patch
+}
+
+src_compile() {
+ ./configure \
+ --prefix=/usr \
+ --fhs \
+ || die
+ emake || die
+}
+
+src_install() {
+ einstall libdir="\$(prefix)/$(get_libdir)"|| die
+ dosym rhtvision /usr/include/tvision
+ dodoc readme.txt THANKS TODO
+ dohtml -r www-site
+}