1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit toolchain-funcs
8 DESCRIPTION="Zile is a small Emacs clone"
9 HOMEPAGE="https://www.gnu.org/software/zile/"
10 SRC_URI="mirror://gnu/zile/${P}.tar.gz"
14 KEYWORDS="~alpha amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
16 RESTRICT="!test? ( test )"
18 RDEPEND="sys-libs/ncurses:0="
21 test? ( valgrind? ( dev-util/valgrind ) )"
23 PATCHES=("${FILESDIR}"/${P}-{userhome,gets}.patch)
26 # --without-emacs to suppress tests for GNU Emacs #630652
29 $(use test && use_with valgrind || echo "--without-valgrind") \
30 CURSES_LIB="$("$(tc-getPKG_CONFIG)" --libs ncurses)"
34 if tput cup 0 0 >/dev/null || tput cuu1 >/dev/null; then
35 # We have a sane terminal that can move the cursor
38 ewarn "Terminal type \"${TERM}\" is too stupid to run zile"
39 ewarn "Running the tests with TERM=vt100 instead"
40 TERM=vt100 emake check
45 emake DESTDIR="${D}" install
47 # FAQ is installed by the build system in /usr/share/zile
48 dodoc AUTHORS BUGS NEWS README THANKS
50 # Zile should never install charset.alias (even on non-glibc arches)
51 rm -f "${ED}"/usr/lib/charset.alias