summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIonen Wolkens <ionen@gentoo.org>2024-03-21 01:20:49 -0400
committerIonen Wolkens <ionen@gentoo.org>2024-03-21 01:26:30 -0400
commit44e7cac3a687f8b495d7a8a7a96bac4de5f46aa3 (patch)
tree3ac1718fcf30ee31f943e23bd6e9393d7495bf93 /x11-terms
parentx11-terms/kitty-terminfo: add 0.33.1 (diff)
downloadgentoo-44e7cac3a687f8b495d7a8a7a96bac4de5f46aa3.tar.gz
gentoo-44e7cac3a687f8b495d7a8a7a96bac4de5f46aa3.tar.bz2
gentoo-44e7cac3a687f8b495d7a8a7a96bac4de5f46aa3.zip
x11-terms/kitty: add 0.33.1
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.33.1.ebuild192
2 files changed, 195 insertions, 0 deletions
diff --git a/x11-terms/kitty/Manifest b/x11-terms/kitty/Manifest
index 93af838549bd..ff1a6f27a073 100644
--- a/x11-terms/kitty/Manifest
+++ b/x11-terms/kitty/Manifest
@@ -4,3 +4,6 @@ DIST kitty-0.32.2.tar.xz.sig 566 BLAKE2B 42ac9788a4dc63fdbae22667e301decb195f8f8
DIST kitty-0.33.0-vendor.tar.xz 1418544 BLAKE2B 0cb3879637e4c1bf14332252aaec55de720e706fde36606bd4fd3e438e7431e86e95fffbf297d84f60ea028b72ed2f147bbab999022f785402832f3f615e137a SHA512 fa3c996addf4067971a63f70069c9ab41a6655fe107f88eaa97440e7a45a9a9fb609f30acb2f205d9967a48cbb33787969770c1e387b0c6a3bf2d0aea24d2624
DIST kitty-0.33.0.tar.xz 8170952 BLAKE2B d98c1070d53b43dacc0aeefa6b0fc46a51528b196b09e875406f30eceddd65256090b6efb2b1b24f485b32db6d36483a9dc725934ad0327412e789e2f01a3574 SHA512 5dad29e7ff0f83dd14138fd32ee3d556214251a5617ef9bd0c8a8b4032e26cf8973752d0b4221e06afd745ae4a12967fc1194f3d053b0e8451cb7ca97360fa35
DIST kitty-0.33.0.tar.xz.sig 566 BLAKE2B 218cb43b6dcbc8bdf172e9ff99034ec5f8ced0be2cab3c9cf382801b4cbab28b20c26ab6e0a4d4e981372ee6f1800a257babc73196182c7b7a2d1d66d7b73fc9 SHA512 7bdda8c6fbd3ce65fea7e40cb3063776ef0556755c5755b47d1b0b2673e7212aacb3469e3992d6c65c16ffd83e453f2ffa967c94abae5588123f21086575580b
+DIST kitty-0.33.1-vendor.tar.xz 1422996 BLAKE2B 5ea525c501a3e1d845b7338c9644f3b1ba67b7f7f127950ae4493ddb299ad4a9cbe20cd1df7cd6aa49ca53bfb1236a393296c4e64951f9fa9d46d572e3fef47f SHA512 a764e009fd90df31e9aaf90501855949f7fe3c46a383ece60826ecdcbb41cedac1c34587772a6a7c257b42773516d0f753712f94d71689e738139a7291aa961f
+DIST kitty-0.33.1.tar.xz 8166164 BLAKE2B 6592ae99f3e05bda5367186096804175f00f21770e7112bf45fa968d161e70d2fdcf956214e29e048e6973ee14457f5eaca753a761824f1c104ba32552122e33 SHA512 5fa2421baf9fac41d4a8ff89bb5e44d1820012e8c960e25980d597dcebbb44ffa97c03818e8a91015691321eedb9d9f53139a97cbb6bd673053fbfd73c77739b
+DIST kitty-0.33.1.tar.xz.sig 566 BLAKE2B 568d54993d6c66670279364c317fa0778594852e8c2e4012175640c1cf377c96b6897c8f1bb9735f9ae2624b4c2ee7681a056f3974666db536a086732d49d128 SHA512 aa52d901698ca513c7a996f0a45658a0c23a4c82f365aa782fc24ff075352f69465dfe3d090da1f0fc32ff7522d19324161ff6e7985c97280b99b13bdc41e798
diff --git a/x11-terms/kitty/kitty-0.33.1.ebuild b/x11-terms/kitty/kitty-0.33.1.ebuild
new file mode 100644
index 000000000000..8b389e6d48bb
--- /dev/null
+++ b/x11-terms/kitty/kitty-0.33.1.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+inherit edo flag-o-matic go-env optfeature multiprocessing
+inherit 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=/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 BSD-2 MIT MPL-2.0" # 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:=
+ dev-libs/xxhash
+ media-libs/fontconfig
+ media-libs/harfbuzz:=[truetype]
+ 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
+ x11-libs/libXcursor
+ )
+ wayland? ( dev-libs/wayland )
+ !sci-mathematics/kissat
+"
+DEPEND="
+ ${RDEPEND}
+ amd64? ( dev-libs/simde )
+ arm64? ( dev-libs/simde )
+ x86? ( dev-libs/simde )
+ X? (
+ x11-base/xorg-proto
+ x11-libs/libXi
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ )
+ wayland? ( dev-libs/wayland-protocols )
+"
+# bug #919751 wrt go subslot
+BDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-lang/go-1.22:=
+ 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 )"
+
+QA_FLAGS_IGNORED="usr/bin/kitten" # written in Go
+
+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 PKGCONFIG_EXE=$(tc-getPKG_CONFIG)
+
+ go-env_set_compile_environment
+ local -x GOFLAGS="-p=$(makeopts_jobs) -v -x -buildvcs=false"
+ use ppc64 && [[ $(tc-endian) == big ]] || GOFLAGS+=" -buildmode=pie"
+
+ # workaround link errors with Go + gcc + -g3 (bug #924436),
+ # retry now and then to see if can be dropped
+ tc-is-gcc &&
+ CGO_CFLAGS=$(
+ CFLAGS=${CGO_CFLAGS}
+ replace-flags -g3 -g
+ replace-flags -ggdb3 -ggdb
+ printf %s "${CFLAGS}"
+ )
+
+ # workaround simde bug with -mxop (bug #926959)
+ append-cppflags -DSIMDE_X86_XOP_NO_NATIVE=1
+
+ local conf=(
+ --disable-link-time-optimization
+ --ignore-compiler-warnings
+ --libdir-name=$(get_libdir)
+ --shell-integration="enabled no-rc no-sudo"
+ --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
+}