diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2022-08-29 00:57:54 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2022-08-29 01:01:07 -0400 |
commit | 7e9e4f11b80dd818eda2ba760ecee7a2a13b4d9b (patch) | |
tree | dc22f3412dea200d6be72c60954032e1ae3534b2 /x11-terms | |
parent | x11-terms/kitty-terminfo: add 0.26.0 (diff) | |
download | gentoo-7e9e4f11b80dd818eda2ba760ecee7a2a13b4d9b.tar.gz gentoo-7e9e4f11b80dd818eda2ba760ecee7a2a13b4d9b.tar.bz2 gentoo-7e9e4f11b80dd818eda2ba760ecee7a2a13b4d9b.zip |
x11-terms/kitty: add 0.26.0
Still skipping py3.11 for now. Even if make it ignore
deprecation warning failure, the prewarm tests still fail.
Now using build-launcher for tests, PATH or symlink now confuses tests
(test.py actually has a #!./kitty/launcher shebang rather than python),
and build-launcher is only a single link command after linux-package.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'x11-terms')
-rw-r--r-- | x11-terms/kitty/Manifest | 2 | ||||
-rw-r--r-- | x11-terms/kitty/kitty-0.26.0.ebuild | 131 |
2 files changed, 133 insertions, 0 deletions
diff --git a/x11-terms/kitty/Manifest b/x11-terms/kitty/Manifest index 866620661c46..8fa744e12d5a 100644 --- a/x11-terms/kitty/Manifest +++ b/x11-terms/kitty/Manifest @@ -1,2 +1,4 @@ DIST kitty-0.25.2.tar.xz 4681940 BLAKE2B 9aa43711c833541f364100465dfd1c13251ed59d5777634a5f193cc0544743295a772de85c64b4657e2cbca3d88f77019b0fe26b25c8b0908c1cc108b480ecf6 SHA512 ac858b525abbdeb137989a7971c51651d46bffedde048ed572bbb4c31119a4e0f9f424edbdbfd14fe2e043b4a7c8a1a1f8ee6591906e40a655d9f783b21f31a6 DIST kitty-0.25.2.tar.xz.sig 566 BLAKE2B 38435c7c418b421321ad29e1935f2280b1df215cb95b1025b3c85a0cc7e3279f1a0f79b05af9c698d4121a4f2e23a81774406a3ba77d0b5e669a36e1e58621b6 SHA512 cc16d4d22c043a30d9712cee211b4560873aa3e6ddc799881c791c72c6a4bfb7822a01683c62afcf67814889dfbc312d9f8b1f2200ab7f89a937addbf76c99b9 +DIST kitty-0.26.0.tar.xz 4719488 BLAKE2B 02e06ed8dd6bfdca789efe53211a27855582b2baa845558efd454a9ee8d2d6a71749f8baaad6ac6ba3f5b0878b2786302a26be190dec544488c3918de70ab581 SHA512 e8e041cb8cbe8560e35126d9f717111e0094ef9dd260ade07017f36d8e8e18fd4198cf186198b78089b8a05baa98a512d273b24b7f3f0d4f9f6d06107eb76c58 +DIST kitty-0.26.0.tar.xz.sig 566 BLAKE2B 9f05eb2083ea59f41284dcbf405be46f99fdc910167b522c4d281d8626e59d2e843f82f4526c17d7370e17bf72c3c372e490704702dc851fb3623fae7210db76 SHA512 c9057512767a6a93cd2ba1e621a10a1979aa4788a2fb16e5747df915647efe4a981cc1db772588a8f331d1988bb6f4918cc5e071bcd4dbbe86a7fc228d0856c3 diff --git a/x11-terms/kitty/kitty-0.26.0.ebuild b/x11-terms/kitty/kitty-0.26.0.ebuild new file mode 100644 index 000000000000..3ee9cbb30121 --- /dev/null +++ b/x11-terms/kitty/kitty-0.26.0.ebuild @@ -0,0 +1,131 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit edo optfeature multiprocessing python-single-r1 toolchain-funcs xdg + +if [[ ${PV} == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/kovidgoyal/kitty.git" +else + inherit verify-sig + SRC_URI=" + https://github.com/kovidgoyal/kitty/releases/download/v${PV}/${P}.tar.xz + verify-sig? ( https://github.com/kovidgoyal/kitty/releases/download/v${PV}/${P}.tar.xz.sig )" + VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}/usr/share/openpgp-keys/kovidgoyal.gpg" + KEYWORDS="~amd64 ~ppc64 ~x86" +fi + +DESCRIPTION="Fast, feature-rich, GPU-based terminal" +HOMEPAGE="https://sw.kovidgoyal.net/kitty/" + +LICENSE="GPL-3" +SLOT="0" +IUSE="+X test transfer wayland" +REQUIRED_USE=" + || ( X wayland ) + ${PYTHON_REQUIRED_USE}" +RESTRICT="!X? ( test ) !test? ( test ) !transfer? ( test ) !wayland? ( test )" + +# dlopen: fontconfig,libglvnd +RDEPEND=" + ${PYTHON_DEPS} + dev-libs/openssl:= + media-libs/fontconfig + media-libs/harfbuzz:= + media-libs/lcms:2 + media-libs/libglvnd[X?] + media-libs/libpng:= + sys-apps/dbus + sys-libs/zlib:= + x11-libs/libxkbcommon[X?] + x11-misc/xkeyboard-config + ~x11-terms/kitty-shell-integration-${PV} + ~x11-terms/kitty-terminfo-${PV} + X? ( x11-libs/libX11 ) + transfer? ( net-libs/librsync:= ) + wayland? ( dev-libs/wayland )" +DEPEND=" + ${RDEPEND} + X? ( + x11-base/xorg-proto + x11-libs/libXcursor + x11-libs/libXi + x11-libs/libXinerama + x11-libs/libXrandr + ) + wayland? ( dev-libs/wayland-protocols )" +BDEPEND=" + ${PYTHON_DEPS} + sys-libs/ncurses + virtual/pkgconfig + test? ( $(python_gen_cond_dep 'dev-python/pillow[${PYTHON_USEDEP}]') ) + wayland? ( dev-util/wayland-scanner )" +[[ ${PV} == 9999 ]] || BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-kovidgoyal )" + +src_prepare() { + default + + # seds unfortunately feel easier on maintainenance than patches here + sed -e "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" \ + -e "$(usev !X '/gl_libs =/s/=.*/= []/')" \ + -e "/num_workers =/s/=.*/= $(makeopts_jobs)/" \ + -e "s/cflags.append.*-O3.*/pass/" -e 's/-O3//' \ + -i setup.py || die + + if use !transfer; then + sed -i 's/rs_cflag =/& []#/;/files.*rsync/d' setup.py || die + rm -r kittens/transfer || die + fi + + # test relies on 'who' command which doesn't detect users with pid-sandbox + rm kitty_tests/utmp.py || die + + # test may fail/hang depending on environment and shell initialization scripts + rm kitty_tests/{shell_integration,ssh}.py || die + + # skip docs for live version + [[ ${PV} != 9999 ]] || sed -i '/exists.*_build/,/docs(ddir)/d' setup.py || die +} + +src_compile() { + tc-export CC + export PKGCONFIG_EXE=$(tc-getPKG_CONFIG) + + local conf=( + --disable-link-time-optimization + --ignore-compiler-warnings + --libdir-name=$(get_libdir) + --shell-integration="enabled no-rc" + --update-check-interval=0 + --verbose + ) + + 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 +} + +src_test() { + KITTY_CONFIG_DIRECTORY=${T} ./test.py || die # shebang is kitty +} + +src_install() { + insinto /usr + doins -r linux-package/. + + fperms +x /usr/bin/kitty \ + /usr/$(get_libdir)/kitty/shell-integration/ssh/{askpass.py,kitty} +} + +pkg_postinst() { + xdg_pkg_postinst + + optfeature "in-terminal image display with kitty icat" media-gfx/imagemagick + optfeature "audio-based terminal bell support" media-libs/libcanberra + optfeature "opening links from the terminal" x11-misc/xdg-utils +} |