From d0cde2c3c36349bd11864cea13bc811aae86479f Mon Sep 17 00:00:00 2001 From: Pablo Date: Thu, 2 Apr 2020 10:44:08 +0200 Subject: x11-terms/kitty: bump to 0.17.2 Signed-off-by: Pablo Orduna Closes: https://bugs.gentoo.org/715592 Closes: https://github.com/gentoo/gentoo/pull/15206 Signed-off-by: Joonas Niilola --- x11-terms/kitty/Manifest | 1 + x11-terms/kitty/files/kitty-0.17.2-flags.patch | 50 ++++++++++++ x11-terms/kitty/files/kitty-9999-flags.patch | 50 ------------ x11-terms/kitty/kitty-0.17.2.ebuild | 103 +++++++++++++++++++++++++ x11-terms/kitty/kitty-9999.ebuild | 2 +- 5 files changed, 155 insertions(+), 51 deletions(-) create mode 100644 x11-terms/kitty/files/kitty-0.17.2-flags.patch delete mode 100644 x11-terms/kitty/files/kitty-9999-flags.patch create mode 100644 x11-terms/kitty/kitty-0.17.2.ebuild (limited to 'x11-terms') diff --git a/x11-terms/kitty/Manifest b/x11-terms/kitty/Manifest index 0c97c3d2d296..e01a8731b947 100644 --- a/x11-terms/kitty/Manifest +++ b/x11-terms/kitty/Manifest @@ -1,2 +1,3 @@ DIST kitty-0.15.1.tar.xz 2974348 BLAKE2B 63f7f6f6083df34420733e33e00e8483f476c1f191942075160d14f87c4052e08d4c9e1d1872d41dd1af6c0c23f3fc444efb22124e3fe1611fe01be593bc64b5 SHA512 e32fe719b4fc7c45b324e4372e0dca3e482f81b245b8bf4eb2b643dccc8541a8d1f93b0f73d5777a7b51cd62a720468036bcb848797e0cba2dad71bba005f9e1 DIST kitty-0.16.0.tar.xz 2974592 BLAKE2B 971e279cd24369a454495fc7a236356e6a4ee69a0953563a9283a16e21bd67ddea5ab8f795c75be6cd31d05c5f1b39b1525e957b9bcd59d12ea3e701b21aa59c SHA512 24dedfc58c5d33aa18da85f904952129f39cd54afb70282c7572b57514b1deebfb532414913e0efc3a5c0352a81406cd7ddef99490dbd9186dc61eab7af3975b +DIST kitty-0.17.2.tar.xz 3044140 BLAKE2B 12dcb8ddb7d90a22904f575301e8c2b1672c3212ee29a035fa5e8eec553dafb0e2c8c1cc3a491c8ac6854d619e979e518d83c5218f36647a032a4f847d068ef3 SHA512 bccf1c1d60d1149bc5f849b82db1af80a2d9a7a11c5f2df853daae5700550eef98da389a30f015d67be796f39deacb31f3ee245eb37ba1a41ba377c70cd26d61 diff --git a/x11-terms/kitty/files/kitty-0.17.2-flags.patch b/x11-terms/kitty/files/kitty-0.17.2-flags.patch new file mode 100644 index 000000000000..5a247679dc82 --- /dev/null +++ b/x11-terms/kitty/files/kitty-0.17.2-flags.patch @@ -0,0 +1,50 @@ +Respect user CFLAGS. + +--- a/setup.py ++++ b/setup.py +@@ -236,7 +236,7 @@ + if ccver >= (5, 0): + df += ' -Og' + float_conversion = '-Wfloat-conversion' + fortify_source = '-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'), +@@ -217,7 +217,7 @@ + cflags = os.environ.get( + 'OVERRIDE_CFLAGS', ( + '-Wextra {} -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11' +- ' -pedantic-errors -Werror {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden' ++ ' -pedantic-errors {} {} -fwrapv {} {} {} -fvisibility=hidden' + ).format( + float_conversion, std, + optimize, +@@ -232,7 +232,7 @@ + ) + 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') +@@ -614,7 +614,7 @@ + + + def build_launcher(args, launcher_dir='.', bundle_type='source'): +- cflags = '-Wall -Werror -fpie'.split() ++ cflags = '-Wall -fpie'.split() + cppflags = [] + libs = [] + if args.profile or args.sanitize: +@@ -626,8 +626,6 @@ + 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 deleted file mode 100644 index 5a247679dc82..000000000000 --- a/x11-terms/kitty/files/kitty-9999-flags.patch +++ /dev/null @@ -1,50 +0,0 @@ -Respect user CFLAGS. - ---- a/setup.py -+++ b/setup.py -@@ -236,7 +236,7 @@ - if ccver >= (5, 0): - df += ' -Og' - float_conversion = '-Wfloat-conversion' - fortify_source = '-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'), -@@ -217,7 +217,7 @@ - cflags = os.environ.get( - 'OVERRIDE_CFLAGS', ( - '-Wextra {} -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11' -- ' -pedantic-errors -Werror {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden' -+ ' -pedantic-errors {} {} -fwrapv {} {} {} -fvisibility=hidden' - ).format( - float_conversion, std, - optimize, -@@ -232,7 +232,7 @@ - ) - 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') -@@ -614,7 +614,7 @@ - - - def build_launcher(args, launcher_dir='.', bundle_type='source'): -- cflags = '-Wall -Werror -fpie'.split() -+ cflags = '-Wall -fpie'.split() - cppflags = [] - libs = [] - if args.profile or args.sanitize: -@@ -626,8 +626,6 @@ - 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/kitty-0.17.2.ebuild b/x11-terms/kitty/kitty-0.17.2.ebuild new file mode 100644 index 000000000000..3331f1a93703 --- /dev/null +++ b/x11-terms/kitty/kitty-0.17.2.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit eutils 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/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.17.2-flags.patch + "${FILESDIR}"/${PN}-0.14.4-svg-icon.patch + "${FILESDIR}"/${PN}-0.16.0-remove-terminfo.patch +) + +src_prepare() { + default + + # disable wayland as required + if ! use wayland; then + sed -i "/'x11 wayland'/s/ wayland//" setup.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) \ + 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 684d939bff85..96dbc6f15d64 100644 --- a/x11-terms/kitty/kitty-9999.ebuild +++ b/x11-terms/kitty/kitty-9999.ebuild @@ -54,7 +54,7 @@ BDEPEND="virtual/pkgconfig" [[ ${PV} == *9999 ]] && BDEPEND+=" >=dev-python/sphinx-1.7" PATCHES=( - "${FILESDIR}"/kitty-9999-flags.patch + "${FILESDIR}"/kitty-0.17.2-flags.patch "${FILESDIR}"/${PN}-0.14.4-svg-icon.patch ) -- cgit v1.2.3-65-gdbad