summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2023-04-15 04:56:45 -0400
committerIonen Wolkens <ionen@gentoo.org>2023-04-15 05:11:52 -0400
commit1a73eb17e29594b15b90ff88b45ade53d173097c (patch)
treed68275482160b0c3c62f52eeb0d72e5b2de13745 /x11-terms
parentx11-terms/kitty-shell-integration: add 0.28.0 (diff)
downloadgentoo-1a73eb17e29594b15b90ff88b45ade53d173097c.tar.gz
gentoo-1a73eb17e29594b15b90ff88b45ade53d173097c.tar.bz2
gentoo-1a73eb17e29594b15b90ff88b45ade53d173097c.zip
x11-terms/kitty: add 0.28.0
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'x11-terms')
-rw-r--r--x11-terms/kitty/Manifest3
-rw-r--r--x11-terms/kitty/kitty-0.28.0.ebuild170
2 files changed, 173 insertions, 0 deletions
diff --git a/x11-terms/kitty/Manifest b/x11-terms/kitty/Manifest
index e92800419388..1587f4f34235 100644
--- a/x11-terms/kitty/Manifest
+++ b/x11-terms/kitty/Manifest
@@ -3,3 +3,6 @@ DIST kitty-0.26.5.tar.xz.sig 566 BLAKE2B 377202d46e66854e0cf1998506e0fafca54b33d
DIST kitty-0.27.1-vendor.tar.xz 695432 BLAKE2B 86c9a316351432e0ff14bf139158816ddabe7e16d91768694a8560a500765b518ba42db26ad24349c05caece5771c5db4fdf7077f06631d1e81ea9ddb52e0391 SHA512 f96366b7896a34202110c98a9f2177482a01102fb822bd33c46eeb6ffe096fce927213950bab658a6649e1874e936c479ea7884d3518a0d054e2f598d6402bdf
DIST kitty-0.27.1.tar.xz 5045588 BLAKE2B 2381b3e9af26bb8a4c4358318289e9ef49ba1e38678ef192fd815ced962644671433a80f124579fb593257351cd8e0a61f845975d61d0d33f42b9d470ef130f0 SHA512 484d451b418defc7256319730d623224e3744d6200989d92839c40c951fdb213fe2ef472ddf968f695e499aa6c35d994ad76bb0eb28bca80ec8644b2ead40d56
DIST kitty-0.27.1.tar.xz.sig 566 BLAKE2B 49cb96d99c48cfe74a50191687fac269cdc33146b5879acbb298c3c9bc7760eda1b2b08839f531d6fe4cf46287d671a1f6a6a24ffe6d6408939d113ba40545db SHA512 b4d24f24ea49c342756d0e458c22e856c4117f07f197ee5294b07ac0a8b5e9d992446b86effb5a7aa1683582cf9ee59bcf651ae4f3952df7783f0a4438042799
+DIST kitty-0.28.0-vendor.tar.xz 1324380 BLAKE2B 0e10660fd5ff95827746ba2f669a8941a1855958e91ca623090c184d972e39ba9b8b8c773321de812429345f75f3b6d75af9f5e70a3aff1e638afa718801133a SHA512 7c871feb7dda605b9b7af42b9136b6047b6442a06e7e7e0a1ff9dd74d845100d70359f88c07e1dc86dc6e39e8e2a850c1a7619a5cbb696b6000957b50783d545
+DIST kitty-0.28.0.tar.xz 7900352 BLAKE2B fea1944e818354522a386d9d6bfa778e70bef3404c3b3f3c87667cee16edc54206540d0ef022f1383e22ed1caf929cc839b226da21c86f9d9b1cda8f8a9a847f SHA512 d133dab019c67367e90cc2e2dce7e614a65400b079cdcfa854f2e1cb7399af7b1ba0f3ef4d30867ae588c9919a772c03ee12457b6dc5922f58c034a6da927127
+DIST kitty-0.28.0.tar.xz.sig 566 BLAKE2B cd52127069a443f7b94de173d7b7497be88420032907a555cea40ad922dfa4a67701e62fbb93dceae280bd21e28a352a02a84e48a3678f63e5312d3121d713e6 SHA512 2d9d147eca26496bdba17551eca64a07437c5ea183c0a748a76418374963742c5cfe20b68c0102b5afe2f9f1b36be58736f014d54c028d33f55d940a32213ac6
diff --git a/x11-terms/kitty/kitty-0.28.0.ebuild b/x11-terms/kitty/kitty-0.28.0.ebuild
new file mode 100644
index 000000000000..4f133e2c0b61
--- /dev/null
+++ b/x11-terms/kitty/kitty-0.28.0.ebuild
@@ -0,0 +1,170 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..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
+ https://dev.gentoo.org/~ionen/distfiles/${P}-vendor.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 ~arm64 ~ppc64 ~riscv ~x86"
+fi
+
+DESCRIPTION="Fast, feature-rich, GPU-based terminal"
+HOMEPAGE="https://sw.kovidgoyal.net/kitty/"
+
+LICENSE="GPL-3 ZLIB"
+LICENSE+=" Apache-2.0 BSD MIT" # go
+SLOT="0"
+IUSE="+X test wayland"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ || ( X wayland )
+ test? ( X 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:=
+ net-libs/librsync:=
+ 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 )
+ wayland? ( dev-libs/wayland )
+ !sci-mathematics/kissat"
+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}
+ >=dev-lang/go-1.20
+ 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 )"
+
+# kitten: written in Go
+# *.so: unsure for their use but they have no objects, so CFLAGS play no part
+QA_FLAGS_IGNORED="
+ usr/bin/kitten
+ usr/lib.*/kitty/kittens/diff/diff_speedup.so
+ usr/lib.*/kitty/kittens/unicode_input/unicode_names.so"
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ git-r3_src_unpack
+ cd "${S}" || die
+ edo go mod vendor
+ else
+ use verify-sig &&
+ verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig}
+ default
+ fi
+}
+
+src_prepare() {
+ default
+
+ # sed unfortunately feels easier on maintenance than patches here
+ local sedargs=(
+ -e "/num_workers =/s/=.*/= $(makeopts_jobs)/"
+ -e "s/cflags.append.*-O3.*/pass/" -e 's/-O3//'
+ -e "s/ld_flags.append('-[sw]')/pass/"
+ )
+
+ # kitty is often popular on wayland-only setups, try to allow this
+ use !X && sedargs+=( -e '/gl_libs =/s/=.*/= []/' ) #857918
+ use !X || use !wayland &&
+ sedargs+=( -e "s/'x11 wayland'/'$(usex X x11 wayland)'/" )
+
+ # skip docs for live version, missing dependencies
+ [[ ${PV} == 9999 ]] && sedargs+=( -e '/exists.*_build/,/docs(ddir)/d' )
+
+ sed -i setup.py "${sedargs[@]}" || die
+
+ local skiptests=(
+ # relies on 'who' command which doesn't detect users with pid-sandbox
+ kitty_tests/utmp.py
+ # may fail/hang depending on environment and shell initialization
+ kitty_tests/{shell_integration,ssh}.py
+ # relies on /proc/self/fd and gets confused when ran from here
+ tools/utils/tpmfile_test.go
+ )
+ use !test || rm "${skiptests[@]}" || die
+}
+
+src_compile() {
+ tc-export CC
+ local -x GOFLAGS="-p=$(makeopts_jobs) -v -x"
+ use ppc64 && [[ $(tc-endian) == big ]] || GOFLAGS+=" -buildmode=pie"
+ local -x 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[@]}"
+
+ 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() {
+ KITTY_CONFIG_DIRECTORY=${T} ./test.py || die # shebang is kitty
+}
+
+src_install() {
+ edo mv linux-package "${ED}"/usr
+}
+
+pkg_postinst() {
+ xdg_pkg_postinst
+
+ optfeature "audio-based terminal bell support" media-libs/libcanberra
+ optfeature "opening links from the terminal" x11-misc/xdg-utils
+}