diff --git a/dev-libs/tvision/files/tvision-2.2.3-fix-ncurses.patch b/dev-libs/tvision/files/tvision-2.2.3-fix-ncurses.patch new file mode 100644 index 0000000000000..cfe3a0937dc50 --- /dev/null +++ b/dev-libs/tvision/files/tvision-2.2.3-fix-ncurses.patch @@ -0,0 +1,22 @@ +https://bugs.gentoo.org/930113 +--- a/classes/unix/unixscr.cc 2026-04-10 19:20:16.696979830 -0000 ++++ b/classes/unix/unixscr.cc 2026-04-10 19:19:38.871760425 -0000 +@@ -299,7 +299,8 @@ + } + + /* Configure curses */ +- stdscr->_flags |= _ISPAD; ++ WINDOW *pad; ++ pad = newpad(getmaxy(stdscr), getmaxx(stdscr)); + // Make curses interpret the escape sequences + keypad(stdscr,TRUE); + // SET: remove the buffering and pass the values directly to us. The man +@@ -749,7 +750,7 @@ + #endif + // SET: Enhanced the cleanup + // 1) Undo this nasty trick or curses will fail to do the rest: +- stdscr->_flags &= ~_ISPAD; ++ //stdscr->_flags &= ~_ISPAD; + // 2) Now reset the attributes, there is no "default color", is an atribute + // I know the name of only some attributes: 0=normal (what we need), + // 1=bold, 4=underline, 5=blink, 7=inverse and I think they are 9: diff --git a/dev-libs/tvision/tvision-2.2.3-r1.ebuild b/dev-libs/tvision/tvision-2.2.3-r1.ebuild new file mode 100644 index 0000000000000..1d789322f73c9 --- /dev/null +++ b/dev-libs/tvision/tvision-2.2.3-r1.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +MY_PN="rh${PN}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="Text User Interface that implements the well known CUA widgets" +HOMEPAGE="https://tvision.sourceforge.net/" +SRC_URI="https://github.com/set-soft/${PN}/releases/download/v${PV}/${MY_P}.src.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="examples gpm nls" + +DOCS=( readme.txt THANKS TODO ) +HTML_DOCS=( www-site/. ) + +RDEPEND=" + dev-libs/libbsd + media-libs/allegro:0[X] + sys-apps/util-linux + sys-libs/ncurses:0= + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXau + x11-libs/libXdmcp + x11-libs/libXext + x11-libs/libXmu + x11-libs/libXt + x11-libs/libxcb:= + gpm? ( sys-libs/gpm ) +" +DEPEND="${RDEPEND}" +BDEPEND="sys-devel/gettext" + +PATCHES=( + "${FILESDIR}"/${PN}-2.2.1.4-flags.patch + "${FILESDIR}"/${PN}-2.2.1.4-ldconfig.patch + "${FILESDIR}"/${P}-0001-Added-ar-command-now-can-be-configured-from-the-envi.patch + "${FILESDIR}"/${P}-0002-Added-configuration-option-to-exclude-libgpm.patch + "${FILESDIR}"/${P}-0003-Adjusted-c-years.patch + "${FILESDIR}"/${P}-0004-Made-ar-command-configurable.patch + "${FILESDIR}"/${PN}-2.2.3-fix-ncurses.patch +) + +src_configure() { + tc-export CC CXX AR + + local myconf=() + myconf+=( + --fhs + --prefix="${EPREFIX}/usr" + # avoid stripping + --with-debug + --with-pthread + --without-static + --x-include="${EPREFIX}/usr/include/X11" + ) + + use gpm || myconf+=( --without-gpm ) + use nls || myconf+=( --no-intl ) + + # Note: Do not use econf here, this isn't an autoconf configure script, + # but a perl based script which simply calls config.pl + einfo "Running ./configure ${myconf[@]}" + ./configure ${myconf[@]} || die +} + +src_install() { + emake DESTDIR="${D}" install \ + prefix="\${DESTDIR}${EPREFIX}/usr" \ + libdir="\$(prefix)/$(get_libdir)" + + einstalldocs + + if use examples; then + docompress -x /usr/share/doc/${PF}/examples + docinto examples + dodoc -r examples/* + fi +}