diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2023-02-03 19:02:35 -0500 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2023-02-03 19:09:23 -0500 |
commit | 21c0c6af8b87ba5851aea4128dcbc635ecbe8e9e (patch) | |
tree | 020429abbbf8d09f4127b2eed5959ca7a12064cc | |
parent | app-emulation/wine-staging: add 8.1 (diff) | |
download | gentoo-21c0c6af8b87ba5851aea4128dcbc635ecbe8e9e.tar.gz gentoo-21c0c6af8b87ba5851aea4128dcbc635ecbe8e9e.tar.bz2 gentoo-21c0c6af8b87ba5851aea4128dcbc635ecbe8e9e.zip |
x11-terms/kitty: generate example kitty.conf in live
Upstream recently documented the command to generate it and
always kind of wanted this readily available for users to
consult without having to dig where/how to get it. This way
also ensures will match current version rather than grab the
latest sample from the website.
tc-is-cross being required is untested but adding as a safety
(kitty does have some CHOST .so but unsure if gets used here).
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
-rw-r--r-- | x11-terms/kitty/kitty-9999.ebuild | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/x11-terms/kitty/kitty-9999.ebuild b/x11-terms/kitty/kitty-9999.ebuild index 835ba06f2ce4..a3cfd5a50b60 100644 --- a/x11-terms/kitty/kitty-9999.ebuild +++ b/x11-terms/kitty/kitty-9999.ebuild @@ -131,8 +131,20 @@ src_compile() { edo "${EPYTHON}" setup.py linux-package "${conf[@]}" use test && edo "${EPYTHON}" setup.py build-launcher "${conf[@]}" - [[ ${PV} == 9999 ]] || mv linux-package/share/doc/{${PN},${PF}} || die - rm -r linux-package/share/terminfo || die + rm -r linux-package/share/terminfo || die # provided by kitty-terminfo + + if [[ ${PV} == 9999 ]]; then + mkdir -p linux-package/share/doc/${PF} || die + else + mv linux-package/share/doc/{${PN},${PF}} || die + fi + + # generate default config as reference, command taken from docs/conf.rst + if ! tc-is-cross-compiler; then + linux-package/bin/kitty +runpy \ + 'from kitty.config import *; print(commented_out_default_config())' \ + > linux-package/share/doc/${PF}/kitty.conf || die + fi } src_test() { |