dev-python/jaraco-collections: keyworded 3.0.0 for ia64, bug #717946
[gentoo.git] / x11-terms / xterm / xterm-353.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit desktop flag-o-matic multilib
7
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"
11
12 LICENSE="MIT"
13 SLOT="0"
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"
16
17 BDEPEND="virtual/pkgconfig
18         x11-base/xorg-proto"
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=
23         x11-apps/xmessage
24         x11-libs/libICE
25         x11-libs/libX11
26         x11-libs/libXaw
27         x11-libs/libXft
28         x11-libs/libxkbfile
29         x11-libs/libXmu
30         x11-libs/libXrender
31         x11-libs/libXt
32         unicode? ( x11-apps/luit )
33         Xaw3d? ( x11-libs/libXaw3d )
34         xinerama? ( x11-libs/libXinerama )"
35 RDEPEND="${DEPEND}
36         media-fonts/font-misc-misc
37         x11-apps/rgb"
38
39 DOCS=( README{,.i18n} ctlseqs.txt )
40
41 pkg_setup() {
42         DEFAULTS_DIR="${EPREFIX}"/usr/share/X11/app-defaults
43 }
44
45 src_configure() {
46         # 454736
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)
51
52         local myeconfargs=(
53                 --disable-full-tgetent
54                 --disable-imake
55                 --disable-setgid
56                 --disable-setuid
57                 --enable-256-color
58                 --enable-broken-osc
59                 --enable-broken-st
60                 --enable-dabbrev
61                 --enable-exec-xterm
62                 --enable-i18n
63                 --enable-load-vt-fonts
64                 --enable-logging
65                 --enable-screen-dumps
66                 --enable-warnings
67                 --enable-wide-chars
68                 --libdir="${EPREFIX}"/etc
69                 --with-app-defaults="${DEFAULTS_DIR}"
70                 --with-utempter
71                 --with-x
72                 $(use_enable openpty)
73                 $(use_enable sixel sixel-graphics)
74                 $(use_enable toolbar)
75                 $(use_enable truetype freetype)
76                 $(use_enable unicode luit)
77                 $(use_enable unicode mini-luit)
78                 $(use_with Xaw3d)
79                 $(use_with xinerama)
80         )
81         econf "${myeconfargs[@]}"
82 }
83
84 src_install() {
85         default
86
87         docinto html
88         dodoc xterm.log.html
89         domenu *.desktop
90
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
96
97         # restore the navy blue
98         sed -i -e 's:blue2$:blue:' "${ED}${DEFAULTS_DIR}"/XTerm-color || die
99 }