1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit desktop flag-o-matic multilib
8 DESCRIPTION="Terminal Emulator for X Windows"
9 HOMEPAGE="https://invisible-island.net/xterm/"
10 SRC_URI="ftp://ftp.invisible-island.net/${PN}/${P}.tgz"
14 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
15 IUSE="+openpty sixel toolbar truetype unicode Xaw3d xinerama"
17 BDEPEND="virtual/pkgconfig
19 DEPEND="kernel_linux? ( sys-libs/libutempter )
20 kernel_FreeBSD? ( sys-libs/libutempter )
21 media-libs/fontconfig:1.0
22 >=sys-libs/ncurses-5.7-r7:0=
32 unicode? ( x11-apps/luit )
33 Xaw3d? ( x11-libs/libXaw3d )
34 xinerama? ( x11-libs/libXinerama )"
36 media-fonts/font-misc-misc
39 DOCS=( README{,.i18n} ctlseqs.txt )
42 DEFAULTS_DIR="${EPREFIX}"/usr/share/X11/app-defaults
47 # Workaround for ncurses[tinfo] until upstream fixes their buildsystem using
48 # something sane like pkg-config or ncurses5-config and stops guessing libs
49 # Everything gets linked against ncurses anyways, so don't shout
50 append-libs $(pkg-config --libs ncurses)
53 --disable-full-tgetent
63 --enable-load-vt-fonts
68 --libdir="${EPREFIX}"/etc
69 --with-app-defaults="${DEFAULTS_DIR}"
73 $(use_enable sixel sixel-graphics)
75 $(use_enable truetype freetype)
76 $(use_enable unicode luit)
77 $(use_enable unicode mini-luit)
81 econf "${myeconfargs[@]}"
91 # Fix permissions -- it grabs them from live system, and they can
92 # be suid or sgid like they were in pre-unix98 pty or pre-utempter days,
93 # respectively (#69510).
94 # (info from Thomas Dickey) - Donnie Berkholz <spyderous@gentoo.org>
95 fperms 0755 /usr/bin/xterm
97 # restore the navy blue
98 sed -i -e 's:blue2$:blue:' "${ED}${DEFAULTS_DIR}"/XTerm-color || die