From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A9F8D158087 for ; Wed, 3 Nov 2021 06:41:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 01FC7E0870; Wed, 3 Nov 2021 06:41:28 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BE568E0870 for ; Wed, 3 Nov 2021 06:41:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D225B342D35 for ; Wed, 3 Nov 2021 06:41:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 718C71AD for ; Wed, 3 Nov 2021 06:41:22 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1635921411.0c349b95e730918fb9af59fffd8e09489b27faf2.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: x11-terms/kitty/, x11-terms/kitty/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: x11-terms/kitty/files/kitty-0.23.1-flags.patch x11-terms/kitty/kitty-0.23.1-r1.ebuild X-VCS-Directories: x11-terms/kitty/files/ x11-terms/kitty/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 0c349b95e730918fb9af59fffd8e09489b27faf2 X-VCS-Branch: master Date: Wed, 3 Nov 2021 06:41:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: eda71db0-ceea-4006-a004-53441e7df655 X-Archives-Hash: da766665328a08c859f5e0be52c0de2a commit: 0c349b95e730918fb9af59fffd8e09489b27faf2 Author: Ionen Wolkens gentoo org> AuthorDate: Tue Oct 26 23:28:08 2021 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Wed Nov 3 06:36:51 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c349b95 x11-terms/kitty: revamp ebuild * EAPI-8 * enable py3.10 * make glfw-x11.so optional with IUSE=+X wrt bug #713702 * move most glfw dlopen() deps to DEPEND-only, they are not essential at runtime for kitty save for libglvnd * add wayland-scanner BDEPEND (if missing it silently skips glfw-wayland.so despite USE=wayland) * export PKGCONFIG_EXE to use right pkg-config * disable LTO, same reason was already stripping -O3 (if wanted, should be set by users in CFLAGS -- there is no custom LTO paths) * use intended --ignore-compiler-warnings to disable -Werror and simplify -flags.patch to hopefully need less rebasing * replace -tests.patch used to find bin/kitty by setting PATH * drop terminfo patch, let kitty install its own /usr/lib64/kitty terminfo and only skip /usr/share/terminfo from kitty-terminfo * pin kitty-terminfo to match, the >-r0 check will be removable next version and is there to avoid collisions (pinning not always /essential/, but on a same system they originate from the same package and should match) * add test dep on dev-python/pillow used by 1 test * remove unnessary fix shebang (these don't have executable bits and are used through kitty's linked libpython) * make libcanberra an optfeature wrt bug #775266 * for imagemagick optfeature, don't use the virtual so it's not noisy if users have *magick installed but not the virtual * change HOMEPAGE to actual homepage, github is shown from remote-id Closes: https://bugs.gentoo.org/713702 Closes: https://bugs.gentoo.org/775266 Signed-off-by: Ionen Wolkens gentoo.org> x11-terms/kitty/files/kitty-0.23.1-flags.patch | 17 ++++ x11-terms/kitty/kitty-0.23.1-r1.ebuild | 118 +++++++++++++++++++++++++ 2 files changed, 135 insertions(+) diff --git a/x11-terms/kitty/files/kitty-0.23.1-flags.patch b/x11-terms/kitty/files/kitty-0.23.1-flags.patch new file mode 100644 index 00000000000..8f23393f8a0 --- /dev/null +++ b/x11-terms/kitty/files/kitty-0.23.1-flags.patch @@ -0,0 +1,17 @@ +--- a/setup.py ++++ b/setup.py +@@ -295,3 +295,3 @@ + fortify_source = '' if sanitize and is_macos else '-D_FORTIFY_SOURCE=2' +- optimize = df if debug or sanitize else '-O3' ++ optimize = '' + sanitize_args = get_sanitize_args(cc, ccver) if sanitize else set() +@@ -319,3 +319,3 @@ + 'OVERRIDE_LDFLAGS', +- '-Wall ' + ' '.join(sanitize_args) + ('' if debug else ' -O3') ++ '-Wall ' + ' '.join(sanitize_args) + ) +@@ -807,4 +807,2 @@ + libs.append('-lprofiler') +- else: +- cflags.append('-O3') + if bundle_type.endswith('-freeze'): diff --git a/x11-terms/kitty/kitty-0.23.1-r1.ebuild b/x11-terms/kitty/kitty-0.23.1-r1.ebuild new file mode 100644 index 00000000000..2a7084b9f1c --- /dev/null +++ b/x11-terms/kitty/kitty-0.23.1-r1.ebuild @@ -0,0 +1,118 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +inherit optfeature python-single-r1 toolchain-funcs xdg + +if [[ ${PV} == 9999 ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/kovidgoyal/kitty.git" +else + SRC_URI="https://github.com/kovidgoyal/kitty/releases/download/v${PV}/${P}.tar.xz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="Fast, feature-rich, GPU-based terminal" +HOMEPAGE="https://sw.kovidgoyal.net/kitty/" + +LICENSE="GPL-3" +SLOT="0" +IUSE="+X debug test wayland" +REQUIRED_USE=" + || ( X wayland ) + ${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" + +RDEPEND=" + ${PYTHON_DEPS} + media-libs/fontconfig + media-libs/freetype:2 + 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-terminfo-${PV} + >x11-terms/kitty-terminfo-0.23.1-r0 + X? ( x11-libs/libX11 ) + 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 )" + +PATCHES=( + "${FILESDIR}"/${PN}-0.23.1-flags.patch +) + +src_prepare() { + default + + sed "s/'x11 wayland'/'$(usev X x11) $(usev wayland)'/" -i setup.py || die + sed "s/else linux_backends/else [$(usev X "'x11',")$(usev wayland "'wayland'")]/" \ + -i kitty_tests/check_build.py || die + use X || sed "/glfw_path('x11')/s/x11/wayland/" -i kitty_tests/glfw.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 setup=( + ${EPYTHON} setup.py + --disable-link-time-optimization + --ignore-compiler-warnings + --libdir-name=$(get_libdir) + --update-check-interval=0 + --verbose + $(usev debug --debug) + linux-package + ) + + echo "${setup[*]}" + "${setup[@]}" || die "setup.py failed to compile ${PN}" + + [[ ${PV} == 9999 ]] || mv linux-package/share/doc/{${PN},${PF}} || die + rm -r linux-package/share/terminfo || die +} + +src_test() { + PATH=linux-package/bin:${PATH} KITTY_CONFIG_DIRECTORY=${T} \ + ${EPYTHON} test.py || die +} + +src_install() { + insinto /usr + doins -r linux-package/. + + fperms +x /usr/bin/kitty +} + +pkg_postinst() { + xdg_icon_cache_update + + optfeature "displaying images in the terminal" \ + media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] + + optfeature "audio-based terminal bell support" media-libs/libcanberra +}