diff options
Diffstat (limited to 'x11-terms/kitty')
-rw-r--r-- | x11-terms/kitty/Manifest | 8 | ||||
-rw-r--r-- | x11-terms/kitty/files/kitty-0.20.3-flags.patch | 53 | ||||
-rw-r--r-- | x11-terms/kitty/files/kitty-9999-flags.patch | 13 | ||||
-rw-r--r-- | x11-terms/kitty/files/kitty-9999-remove-terminfo.patch | 16 | ||||
-rw-r--r-- | x11-terms/kitty/kitty-0.20.3.ebuild | 109 | ||||
-rw-r--r-- | x11-terms/kitty/kitty-9999.ebuild | 4 |
6 files changed, 193 insertions, 10 deletions
diff --git a/x11-terms/kitty/Manifest b/x11-terms/kitty/Manifest index 3c7b64b3aaa8..4e4b34ac2fc1 100644 --- a/x11-terms/kitty/Manifest +++ b/x11-terms/kitty/Manifest @@ -5,10 +5,14 @@ AUX kitty-0.19.1-tests.patch 485 BLAKE2B 7058b51a6c2845d81839d8cd1c379ffc3bdd9e1 AUX kitty-0.20.1-flags.patch 1995 BLAKE2B e563ab5c09d43e8701e6ec5df519c47ae952054da72fedf106809f1c3775f00e172de7146734e10186f75ab10b8b0d42faa2ac6402cac5d57fdd8d5e611d90b0 SHA512 cbc8660909c3e07e16f720528265384bef2152fc33e41fbbef057fcd436216071ebfc0b4956284bd0e8e745ba28ba41221da8fff8d7f9a704fba6b79ea021f6f AUX kitty-0.20.1-remove-terminfo.patch 754 BLAKE2B 12fae3be4b6a9ae6a2c49671e95c24fb9c73e5d18261e4817e5abbbe4419804dc9ba3b387d77fd4fb296108f294c3a8a7f7285814edfa8d5d9e62b7b5cca36b1 SHA512 17101f03975210e183ee1a4370d65a5bd40812dbf253f66038c8f534085974369ee909302109a8315f1c982d00299aef5a7a52a98dadd7ff46f9431ead6f748b AUX kitty-0.20.1-tests.patch 514 BLAKE2B 69c4277b4ffc257cc8320dbfc5be95d72bcb35b70a377f8ef24ecd9a20036313ce52f245efd5f620b47ddea6f688cb0d3b4154d8787a3908d5c255ca26143f80 SHA512 bb5dd23b0e83118fd33296e1ee8c6485e51f29518406e1e875b2f5ec8e7de4103c9ec2b4c99516a3d4fe6134ccf5bf0d54e4a37bee89e64f294da4b0350d337c -AUX kitty-9999-flags.patch 2235 BLAKE2B f434ca8798f2051bcfa487af0eabe2a8142791eb83b9dff4cb815efc93a42a03eeb71b2ed4e4300ab658c79fd6eb742d682025951bfe3f76a105829916708027 SHA512 b46981b5dd75a1554ab722a490c7b6fd281d7698b24998ce875c3a2ba88e048304f0baafc86d0905ac9db2b583799576132eedf47c707681654b23cf64e3d3d9 +AUX kitty-0.20.3-flags.patch 2252 BLAKE2B 62743ee798196ec14ae3899e481271890507563b438ef87f8e7d19f2cfa79def5118aba39bdf402d6d505b208d1082af156c4feb4a113a5bd1fec481c1ffe20f SHA512 2480194e3f5dbee2fe2e70c5c54c69cb497d3dae9914508d3c0488de9227169cb8c023834627d0c55f863498d89890c31110fa3c3ee740b241b99bf299557007 +AUX kitty-9999-flags.patch 2264 BLAKE2B f97139220f48a65fcb7da0cf166b27b9827d5e01f21bc0549f0bf3ce87287f787b167283cf05d82ca15bef7c996da4c512aa6e483900ea4a6c44015de362d11c SHA512 845bd40360730d498de16764423263014bd299c7a9072f12810e859ba851d88d7f1429d2844c7defd0b389694be7ea3dbc2d4e4a4718e35f090440b7d0ef0e84 +AUX kitty-9999-remove-terminfo.patch 666 BLAKE2B e551e919d3a2ea31d53122e1bdd02e492e3ca0f6a0335b94d1e37585f82b2b0340743cd3536b43b9f26865917a01526e09379b02c9f2e55104bb8f4ec8b91b11 SHA512 2ca3ce3bdcbc1c0ec824d496d1682c800960f42289d75d2e92022873c8cf6a6a5095d97241fe5eb3b05949e18ae113719c7542643244d03521c01a857c59f48f DIST kitty-0.19.3.tar.xz 3269628 BLAKE2B b3b673f8ad06baf770b03bcee87b2f405e1ff09d0fa5c6a232fd8df651351a428c8fbd9e2d0dc90ed44a0d6632192bea83650388ee73ebc3b523f51e51168006 SHA512 d1eea7f909c9492542650a83a149fd279c44380cf10387759f10caad57cd4dbabeac1ce84e8142bfa47266ec2562dfa3766ce08e2aee4d8e0ebacea165f101e4 DIST kitty-0.20.1.tar.xz 3449932 BLAKE2B aed9a250fbc7005cd67fd22bfc33de845bea7e39a5561e6957b744f03a5438945f9739ca7066a93889144a5d0289185f337ef4d487c754cba37f242030f1c46a SHA512 19dfa66eb2a2115877b25fbff0ba7a81071bff00c732236f20342aeb619cca88ae4a4e8ce4e73908ac7d7d12fca5232a76e0167754f2e658af02e442cf5ba0cd +DIST kitty-0.20.3.tar.xz 3487500 BLAKE2B 49397ac2aef10e5fc41e351af65050ad510e58915392e6b1b8c022db31f2e5e81ac2cce645468ff213dafb609a30d43934b7388b93227fbbba5af7aa35be74e8 SHA512 9e9d81696bcb0d3894c04b08bc52ccf7aaf533125b3ecfb4c894b8d42dbf8511239c49f1c977d81872ce49fc6b3aa8e8c92b9c944bd31fe59fce6e3750295e58 EBUILD kitty-0.19.3.ebuild 2263 BLAKE2B e7fa23f06184f5542b6356c302b6b6620a911c44f485d1b7cf5069e1917bd93ebdbacc0a7038ca5ea2780f8a9775b8abbf827b5dc99e7978126702d40b1b6472 SHA512 52ba77ad622151de1db9b2a532d20b6f56b3e837d5e27d81fa6c973f8c853eabf82e190b077e9f9558c62a4c69e95e83682c5df1becd3b296deffd8ea9e430b4 EBUILD kitty-0.20.1.ebuild 2441 BLAKE2B a2ec955b3c8c6933357bd064df5b61444c31320e99955ff549e2f9c4c932daa7e83bca770008e4c326ce47d75ddd9a3187f7328593cce94c8356c71222f3db77 SHA512 5f42829e8227f4bfb6c30f1d8a028802ff5ee5e4bf240010b70fc04c50d239234dc276eab090f9807aba3f8468baa3399413a160d308977ec82c6dda2f15ee74 -EBUILD kitty-9999.ebuild 2183 BLAKE2B 4b78f145c0250b3bfb50f5e0f777a3a820290e0860986cb9650fc500b8ccd7163d7bbd81d58ecaadac70a5ebaa901de21f944d934f21ac1815c2d43b3bf17954 SHA512 020310f8278e2c4feef73abe270e59ad167e9fbb286521acdf32e729b9c1e9e69d07411a2cb5a5e5d5fb2c4684f14a50419699270ec24d54bf9a429954448c4e +EBUILD kitty-0.20.3.ebuild 2358 BLAKE2B 5a2b447aafd0495c1c3541fd7a6bc4e8ca16f4ef5434053ed66c103faf22825675571fedb92e9613895db1ff3b3fd961f8d812df679e8acf885f502fb36105ed SHA512 c409ff2ecf6c3de4fde17ffdeb2261d8e3750921db12462e76970e8b78bd2a3a8b084229085565cb83b505d8fcc08022975686f7cc475c2479f2aa6d7d9866d0 +EBUILD kitty-9999.ebuild 2177 BLAKE2B 60b8835d09ca32f7e948cfa411f8ea19aaaeec27ef2edcd7858081b69967dc77a5a771234e49c62c2f984e53b6fd4aacc11fe3f6296ed151c462e60110a25bc7 SHA512 1eb053e488ba994f77110c6db603dde52f65034cdd162d87eea369cc91720042a6531150e1e20ccf37669e3c23155e813063537013c2883098735b2b87991309 MISC metadata.xml 494 BLAKE2B 5a3443128f98dff20576a86dca13468cf0b84504151d40907c08de3763f567b7e3d000ba4eaa22a577c7a30c98507ba0ea33b116f8e123fa8e1109b15ec0af77 SHA512 6c4ab061bc5f9ec3101eb7ce9f51f5bcd4c0b894a432fce00eb4f1623814c186171d67640d8040a3260fcce3dcdbac7ec3a0830d9dd520ae6710ea29f828fa67 diff --git a/x11-terms/kitty/files/kitty-0.20.3-flags.patch b/x11-terms/kitty/files/kitty-0.20.3-flags.patch new file mode 100644 index 000000000000..131d6214b4c1 --- /dev/null +++ b/x11-terms/kitty/files/kitty-0.20.3-flags.patch @@ -0,0 +1,53 @@ +diff --git a/setup.py b/setup.py +index f751107f..69bf39d4 100755 +--- a/setup.py ++++ b/setup.py +@@ -293,7 +293,7 @@ def init_env( + df += ' -Og' + float_conversion = '-Wfloat-conversion' + 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() + cppflags_ = os.environ.get( + 'OVERRIDE_CPPFLAGS', '-D{}DEBUG'.format('' if debug else 'N'), +@@ -308,8 +308,8 @@ def init_env( + cflags_ = os.environ.get( + 'OVERRIDE_CFLAGS', ( + f'-Wextra {float_conversion} -Wno-missing-field-initializers -Wall -Wstrict-prototypes {std}' +- f' -pedantic-errors {werror} {optimize} {sanitize_flag} -fwrapv {stack_protector} {missing_braces}' +- f' -pipe {march} -fvisibility=hidden {fortify_source}' ++ f' -pedantic-errors {optimize} {sanitize_flag} -fwrapv {stack_protector} {missing_braces}' ++ f' {march} -fvisibility=hidden {fortify_source}' + ) + ) + cflags = shlex.split(cflags_) + shlex.split( +@@ -317,7 +317,7 @@ def init_env( + ) + ldflags_ = os.environ.get( + 'OVERRIDE_LDFLAGS', +- '-Wall ' + ' '.join(sanitize_args) + ('' if debug else ' -O3') ++ '-Wall ' + ' '.join(sanitize_args) + ) + ldflags = shlex.split(ldflags_) + ldflags.append('-shared') +@@ -789,9 +789,7 @@ def safe_makedirs(path: str) -> None: + + + def build_launcher(args: Options, launcher_dir: str = '.', bundle_type: str = 'source') -> None: +- cflags = '-Wall -Werror -fpie'.split() +- if args.build_universal_binary: +- cflags += '-arch x86_64 -arch arm64'.split() ++ cflags = '-Wall -fpie'.split() + cppflags = [] + libs: List[str] = [] + if args.profile or args.sanitize: +@@ -803,8 +801,6 @@ def build_launcher(args: Options, launcher_dir: str = '.', bundle_type: str = 's + cflags.append('-g') + if args.profile: + libs.append('-lprofiler') +- else: +- cflags.append('-O3') + if bundle_type.endswith('-freeze'): + cppflags.append('-DFOR_BUNDLE') + cppflags.append('-DPYVER="{}"'.format(sysconfig.get_python_version())) diff --git a/x11-terms/kitty/files/kitty-9999-flags.patch b/x11-terms/kitty/files/kitty-9999-flags.patch index 39042dbd458a..0e773c677650 100644 --- a/x11-terms/kitty/files/kitty-9999-flags.patch +++ b/x11-terms/kitty/files/kitty-9999-flags.patch @@ -17,7 +17,7 @@ index f751107f..69bf39d4 100755 f'-Wextra {float_conversion} -Wno-missing-field-initializers -Wall -Wstrict-prototypes {std}' - f' {werror} {optimize} {sanitize_flag} -fwrapv {stack_protector} {missing_braces}' - f' -pipe {march} -fvisibility=hidden {fortify_source}' -+ f' -pedantic-errors {optimize} {sanitize_flag} -fwrapv {stack_protector} {missing_braces}' ++ f' {optimize} {sanitize_flag} -fwrapv {stack_protector} {missing_braces}' + f' {march} -fvisibility=hidden {fortify_source}' ) ) @@ -31,14 +31,15 @@ index f751107f..69bf39d4 100755 ) ldflags = shlex.split(ldflags_) ldflags.append('-shared') -@@ -789,9 +789,7 @@ def safe_makedirs(path: str) -> None: - - +@@ -789,10 +789,7 @@ + + def build_launcher(args: Options, launcher_dir: str = '.', bundle_type: str = 'source') -> None: -- cflags = '-Wall -Werror -fpie'.split() +- werror = '' if args.ignore_compiler_warnings else '-pedantic-errors -Werror' +- cflags = f'-Wall {werror} -fpie'.split() - if args.build_universal_binary: - cflags += '-arch x86_64 -arch arm64'.split() -+ cflags = '-Wall -fpie'.split() ++ cflags = f'-Wall -fpie'.split() cppflags = [] libs: List[str] = [] if args.profile or args.sanitize: diff --git a/x11-terms/kitty/files/kitty-9999-remove-terminfo.patch b/x11-terms/kitty/files/kitty-9999-remove-terminfo.patch new file mode 100644 index 000000000000..39fe84b3b2a0 --- /dev/null +++ b/x11-terms/kitty/files/kitty-9999-remove-terminfo.patch @@ -0,0 +1,16 @@ +diff --git a/setup.py b/setup.py +index ce5309ee..02f38c61 100755 +--- a/setup.py ++++ a/setup.py +@@ -1082,11 +1082,6 @@ + else: + build_launcher(args, launcher_dir, bundle_type) + os.makedirs(os.path.join(libdir, 'logo')) +- build_terminfo = runpy.run_path('build-terminfo', run_name='import_build') +- for x in (libdir, os.path.join(ddir, 'share')): +- odir = os.path.join(x, 'terminfo') +- safe_makedirs(odir) +- build_terminfo['compile_terminfo'](odir) + shutil.copy2('__main__.py', libdir) + shutil.copy2('logo/kitty-128.png', os.path.join(libdir, 'logo')) + shutil.copy2('logo/kitty.png', os.path.join(libdir, 'logo')) diff --git a/x11-terms/kitty/kitty-0.20.3.ebuild b/x11-terms/kitty/kitty-0.20.3.ebuild new file mode 100644 index 000000000000..35273c44a076 --- /dev/null +++ b/x11-terms/kitty/kitty-0.20.3.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7,8,9} ) + +inherit optfeature python-single-r1 toolchain-funcs xdg + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/kovidgoyal/kitty.git" + inherit git-r3 +else + SRC_URI="https://github.com/kovidgoyal/kitty/releases/download/v${PV}/${P}.tar.xz" + KEYWORDS="~amd64 ~x86" +fi + +DESCRIPTION="A modern, hackable, featureful, OpenGL-based terminal emulator" +HOMEPAGE="https://github.com/kovidgoyal/kitty" + +LICENSE="GPL-3" +SLOT="0" +IUSE="debug wayland" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND=" + ${PYTHON_DEPS} + media-libs/fontconfig + media-libs/freetype:2 + >=media-libs/harfbuzz-1.5.0:= + media-libs/lcms + media-libs/libcanberra + media-libs/libpng:0= + sys-apps/dbus + sys-libs/zlib + x11-libs/libxcb[xkb] + x11-libs/libXcursor + x11-libs/libXi + x11-libs/libXinerama + x11-libs/libxkbcommon[X] + x11-libs/libXrandr + x11-terms/kitty-terminfo + wayland? ( + dev-libs/wayland + >=dev-libs/wayland-protocols-1.17 + ) +" + +DEPEND="${RDEPEND} + media-libs/mesa[X] + sys-libs/ncurses +" + +BDEPEND="virtual/pkgconfig" + +[[ ${PV} == *9999 ]] && BDEPEND+=" >=dev-python/sphinx-1.7" + +PATCHES=( + "${FILESDIR}"/${PN}-0.20.3-flags.patch + "${FILESDIR}"/${PN}-0.14.4-svg-icon.patch + "${FILESDIR}"/${PN}-0.20.1-remove-terminfo.patch + "${FILESDIR}"/${PN}-0.20.1-tests.patch +) + +src_prepare() { + default + + # disable wayland as required + if ! use wayland; then + sed -i "/'x11 wayland'/s/ wayland//" setup.py || die + # also disable wayland tests + sed -i "/if not self.is_ci/d" kitty_tests/check_build.py || die + sed -i "/linux_backends.append('wayland')/d" kitty_tests/check_build.py || die + fi + + # respect doc dir + sed -i "/htmldir =/s/appname/'${PF}'/" setup.py || die + + tc-export CC +} + +src_compile() { + "${EPYTHON}" setup.py \ + --verbose $(usex debug --debug "") \ + --libdir-name $(get_libdir) \ + --update-check-interval=0 \ + linux-package || die "Failed to compile kitty." +} + +src_test() { + export KITTY_CONFIG_DIRECTORY=${T} + "${EPYTHON}" test.py || die +} + +src_install() { + insinto /usr + doins -r linux-package/* + dobin linux-package/bin/kitty + python_fix_shebang "${ED}" +} + +pkg_postinst() { + xdg_icon_cache_update + optfeature "Displaying images in the terminal" virtual/imagemagick-tools +} + +pkg_postrm() { + xdg_icon_cache_update +} diff --git a/x11-terms/kitty/kitty-9999.ebuild b/x11-terms/kitty/kitty-9999.ebuild index fb9de537a83c..e67ade738230 100644 --- a/x11-terms/kitty/kitty-9999.ebuild +++ b/x11-terms/kitty/kitty-9999.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PYTHON_COMPAT=( python3_{7,8} ) +PYTHON_COMPAT=( python3_{7,8,9} ) inherit optfeature python-single-r1 toolchain-funcs xdg @@ -58,7 +58,7 @@ BDEPEND="virtual/pkgconfig" PATCHES=( "${FILESDIR}"/${P}-flags.patch - "${FILESDIR}"/kitty-0.20.1-remove-terminfo.patch + "${FILESDIR}"/${P}-remove-terminfo.patch "${FILESDIR}"/${PN}-0.14.4-svg-icon.patch ) |