diff --git a/x11/kitty/Makefile b/x11/kitty/Makefile index a5812e7129f0..88118c0bbe89 100644 --- a/x11/kitty/Makefile +++ b/x11/kitty/Makefile @@ -1,87 +1,81 @@ PORTNAME= kitty -DISTVERSION= 0.25.2 -PORTREVISION= 1 +DISTVERSION= 0.25.0 CATEGORIES= x11 wayland MASTER_SITES= https://github.com/${GH_ACCOUNT}/${PORTNAME}/releases/download/v${DISTVERSION}/ MAINTAINER= alexis.praga@free.fr COMMENT= Cross-platform, fast, featureful, GPU-based terminal emulator LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}furo>0:textproc/py-furo@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sphinx-copybutton>0:textproc/py-sphinx-copybutton@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sphinx-inline-tabs>0:textproc/py-sphinx-inline-tabs@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sphinxext-opengraph>0:textproc/py-sphinxext-opengraph@${PY_FLAVOR} \ sphinx-build:textproc/py-sphinx@${PY_FLAVOR} \ wayland-protocols>=0:graphics/wayland-protocols LIB_DEPENDS= libdbus-1.so:devel/dbus \ libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ liblcms2.so:graphics/lcms2 \ libpng.so:graphics/png \ librsync.so:net/librsync \ libwayland-client.so:graphics/wayland \ libwayland-cursor.so:graphics/wayland \ libxkbcommon.so:x11/libxkbcommon USES= compiler:c11 cpe gettext-runtime gl gmake pkgconfig \ python:3.5+ shebangfix tar:xz terminfo xorg GH_ACCOUNT= kovidgoyal USE_GL= gl USE_XORG= x11 xcb xcursor xi xinerama xrandr CPE_VENDOR= kitty_project SHEBANG_FILES= build-terminfo count-lines-of-code mypy-editor-integration \ update-on-ox update-on-ubuntu SHEBANG_GLOB= *.py TEST_ENV= PATH="${STAGEDIR}${PREFIX}/bin:${PATH}" TEST_TARGET= test BINARY_ALIAS= python3=${PYTHON_CMD} python=${PYTHON_CMD} INSTALL_WRKSRC= ${WRKSRC}/linux-package _STRIP_TARGETS= lib/kitty/kitty/fast_data_types.so lib/kitty/kitty/glfw-x11.so \ lib/kitty/kittens/diff/diff_speedup.so \ lib/kitty/kittens/unicode_input/unicode_names.so \ lib/kitty/kitty/glfw-wayland.so \ lib/kitty/kittens/choose/subseq_matcher.so bin/kitty \ lib/kitty/kittens/transfer/rsync.so _EMPTY_DIRS= kittens/choose kittens/diff kittens/unicode_input kittens kitty .include .if ${ARCH} == powerpc64 || ${ARCH:Mriscv64*} MAKE_ENV+= KITTY_NO_LTO=1 .endif # ncursesw and tinfo >= 6.1 seem to be neededd .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1400035 USES+=ncurses:port .else USES+=ncurses .endif -# fix clang static_assert on 12.x releases, https://github.com/kovidgoyal/kitty/pull/5398 -.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1300000 -EXTRA_PATCHES= ${PATCHDIR}/extra-patch-kitty_data-types.h -.endif - # For librsync, we need to set header and library path do-build: (cd ${WRKSRC} && \ ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py linux-package --update-check-interval 0 --extra-include-dirs ${LOCALBASE}/include/ --extra-library-dirs ${LOCALBASE}/lib) ${FIND} ${INSTALL_WRKSRC} -name __pycache__ -type d -exec ${RM} -r -- {} + do-install: ${CP} -a ${INSTALL_WRKSRC}/ ${STAGEDIR}${PREFIX} ${STRIP_CMD} ${_STRIP_TARGETS:S|^|${STAGEDIR}${PREFIX}/|} ${INSTALL_DATA} ${WRKSRC}/terminfo/kitty.terminfo \ ${STAGEDIR}${PREFIX}/share/misc/ .include diff --git a/x11/kitty/files/extra-patch-kitty_data-types.h b/x11/kitty/files/extra-patch-kitty_data-types.h deleted file mode 100644 index 3926ab024c92..000000000000 --- a/x11/kitty/files/extra-patch-kitty_data-types.h +++ /dev/null @@ -1,13 +0,0 @@ ---- kitty/data-types.h.orig 2022-08-22 11:08:26 UTC -+++ kitty/data-types.h -@@ -159,6 +159,10 @@ typedef union CellAttrs { - #define NUM_UNDERLINE_STYLES (5u) - #define SGR_MASK (~(((CellAttrs){.width=WIDTH_MASK, .mark=MARK_MASK}).val)) - -+#ifndef static_assert -+#define static_assert _Static_assert -+#endif -+ - typedef struct { - color_type fg, bg, decoration_fg; - sprite_index sprite_x, sprite_y, sprite_z; diff --git a/x11/kitty/files/patch-kitty_child.py b/x11/kitty/files/patch-kitty_child.py new file mode 100644 index 000000000000..dfae47085879 --- /dev/null +++ b/x11/kitty/files/patch-kitty_child.py @@ -0,0 +1,11 @@ +--- kitty/child.py.orig 2021-11-10 21:33:51 UTC ++++ kitty/child.py +@@ -45,7 +45,7 @@ else: + return list(filter(None, f.read().decode('utf-8').split('\0'))) + + def cwd_of_process(pid: int) -> str: +- ans = f'/proc/{pid}/cwd' ++ ans = subprocess.run(["pwdx", pid], capture_output=True).stdout.split()[1].decode("utf-8") + return os.path.realpath(ans) + + def _environ_of_process(pid: int) -> str: