commit: 21c0c6af8b87ba5851aea4128dcbc635ecbe8e9e Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Sat Feb 4 00:02:35 2023 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Sat Feb 4 00:09:23 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21c0c6af
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 <AT> gentoo.org> x11-terms/kitty/kitty-9999.ebuild | 16 ++++++++++++++-- 1 file 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() {