summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2022-11-07 10:41:28 -0500
committerIonen Wolkens <ionen@gentoo.org>2022-11-07 10:57:23 -0500
commit9239c3f8e92c257a1294b617eab07029ee5a6a39 (patch)
tree594bef0d80b16bb5f134737c2671bc4ffb41f252 /x11-terms
parentx11-terms/kitty: switch test restrictions to req use (diff)
downloadgentoo-9239c3f8e92c257a1294b617eab07029ee5a6a39.tar.gz
gentoo-9239c3f8e92c257a1294b617eab07029ee5a6a39.tar.bz2
gentoo-9239c3f8e92c257a1294b617eab07029ee5a6a39.zip
x11-terms/kitty: add 0.26.5
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'x11-terms')
-rw-r--r--x11-terms/kitty/Manifest2
-rw-r--r--x11-terms/kitty/kitty-0.26.5.ebuild132
2 files changed, 134 insertions, 0 deletions
diff --git a/x11-terms/kitty/Manifest b/x11-terms/kitty/Manifest
index e10fd0593cb7..9447e44e5cd5 100644
--- a/x11-terms/kitty/Manifest
+++ b/x11-terms/kitty/Manifest
@@ -1,2 +1,4 @@
DIST kitty-0.26.4.tar.xz 4749148 BLAKE2B fe15d2bd3afda49fcdc911d0ada5824dffe7eac69cd22581b86f50b0d20330ef10bf567d4adfafe5e06d20f9d7a10c8acfcffb95a3d5c47c50327576d9600761 SHA512 4d3ef5ba2ca54d0f5cd84ece771297c19c05bd276fc235f92c76d469ad17e55b54de696dce38c9039ae9825c7609e03e937536261c4fb680e936865ee0e4441e
DIST kitty-0.26.4.tar.xz.sig 566 BLAKE2B 8ac544b077cc30f811be665226e413e3074d3490b99b790c37ff871017131be76163a526f6c5eca6a711724975a4e3d6a6d897f2bacafac6b8f71f8ce141dd8d SHA512 f851daebc0c9d75f39c1e02a3ca14ab77f350c7f606e4e00f4513e084ca86e329dc2da033a6292aaedf683995932e83c58d273552d2afd26a0e541e89bdd4bf9
+DIST kitty-0.26.5.tar.xz 4749988 BLAKE2B 488969b4d7c6aed489a540a8e3bee183345fcfb7e05ae5604f4af40f0720ed931cff82cf389e2fa4015eed74762c0630481a99eeb9302c22c89c4f3e247170d4 SHA512 086ae03d0e382afbe3001e357ef51388c7a8e81fa5b4bf9ce8b123a7fc8bfff3bd68d074e926f540a1f2b83062baa831e44d29c017cabfe8221bebe49b64e808
+DIST kitty-0.26.5.tar.xz.sig 566 BLAKE2B 377202d46e66854e0cf1998506e0fafca54b33d85264e47c13aa4b98d272c786809375f1e277ec169291e06809f11b5b061ec1243a708711fa2350243ad1eca2 SHA512 0c691d8becff2b0f24e09b941d7315efaac831beacfed6f66b9186bde9c502f2ae86289f4b0d8fa6a34624dce7a1e958ba2d0502fd87003ba08b07fa07c6ae17
diff --git a/x11-terms/kitty/kitty-0.26.5.ebuild b/x11-terms/kitty/kitty-0.26.5.ebuild
new file mode 100644
index 000000000000..8fb28a0e4d6d
--- /dev/null
+++ b/x11-terms/kitty/kitty-0.26.5.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} )
+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 ~riscv ~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="
+ ${PYTHON_REQUIRED_USE}
+ || ( X wayland )
+ test? ( X transfer wayland )"
+RESTRICT="!test? ( 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
+}