1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7,8} )
8 inherit python-single-r1 toolchain-funcs xdg
10 if [[ ${PV} == "9999" ]] ; then
11 EGIT_REPO_URI="https://github.com/kovidgoyal/kitty.git"
14 SRC_URI="https://github.com/kovidgoyal/kitty/releases/download/v${PV}/${P}.tar.xz"
15 KEYWORDS="~amd64 ~x86"
18 DESCRIPTION="A modern, hackable, featureful, OpenGL-based terminal emulator"
19 HOMEPAGE="https://github.com/kovidgoyal/kitty"
24 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
30 >=media-libs/harfbuzz-1.5.0:=
31 media-libs/libcanberra
37 x11-libs/libxkbcommon[X]
41 virtual/imagemagick-tools
44 >=dev-libs/wayland-protocols-1.17
53 BDEPEND="virtual/pkgconfig"
55 [[ ${PV} == *9999 ]] && BDEPEND+=" >=dev-python/sphinx-1.7"
58 "${FILESDIR}"/${P}-flags.patch
59 "${FILESDIR}"/${PN}-0.14.4-svg-icon.patch
65 # disable wayland as required
66 if ! use wayland; then
67 sed -i "/'x11 wayland'/s/ wayland//" setup.py || die
71 sed -i "/htmldir =/s/appname/'${PF}'/" setup.py || die
77 "${EPYTHON}" setup.py \
78 --verbose $(usex debug --debug "") \
79 --libdir-name $(get_libdir) \
80 linux-package || die "Failed to compile kitty."
84 export KITTY_CONFIG_DIRECTORY=${T}
85 "${EPYTHON}" test.py || die
90 doins -r linux-package/*
91 dobin linux-package/bin/kitty
92 python_fix_shebang "${ED}"
100 xdg_icon_cache_update