diff --git a/x11/kitty/Makefile b/x11/kitty/Makefile index 1fbe8ffb4a5b..13b8eb83bcc7 100644 --- a/x11/kitty/Makefile +++ b/x11/kitty/Makefile @@ -1,84 +1,90 @@ PORTNAME= kitty DISTVERSION= 0.25.2 +PORTREVISION= 1 CATEGORIES= x11 wayland MASTER_SITES= https://github.com/kovidgoyal/${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 \ libepoll-shim-interpose.so:devel/libepoll-shim \ 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 desktop-file-utils gettext-runtime gl gmake \ pkgconfig python:3.5+ shebangfix tar:xz terminfo xorg CPE_VENDOR= kitty_project USE_GL= gl USE_XORG= x11 xcb xcursor xi xinerama xrandr 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 CPPFLAGS+= `pkg-config --cflags epoll-shim-interpose` LDFLAGS+= `pkg-config --libs epoll-shim-interpose` 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 new file mode 100644 index 000000000000..3926ab024c92 --- /dev/null +++ b/x11/kitty/files/extra-patch-kitty_data-types.h @@ -0,0 +1,13 @@ +--- 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_data-types.h b/x11/kitty/files/patch-kitty_data-types.h deleted file mode 100644 index fecb5ab2d450..000000000000 --- a/x11/kitty/files/patch-kitty_data-types.h +++ /dev/null @@ -1,19 +0,0 @@ ---- kitty/data-types.h.orig 2022-08-13 20:17:56 UTC -+++ kitty/data-types.h -@@ -164,14 +164,14 @@ typedef struct { - sprite_index sprite_x, sprite_y, sprite_z; - CellAttrs attrs; - } GPUCell; --static_assert(sizeof(GPUCell) == 20, "Fix the ordering of GPUCell"); -+_Static_assert(sizeof(GPUCell) == 20, "Fix the ordering of GPUCell"); - - typedef struct { - char_type ch; - hyperlink_id_type hyperlink_id; - combining_type cc_idx[3]; - } CPUCell; --static_assert(sizeof(CPUCell) == 12, "Fix the ordering of CPUCell"); -+_Static_assert(sizeof(CPUCell) == 12, "Fix the ordering of CPUCell"); - - typedef enum { UNKNOWN_PROMPT_KIND = 0, PROMPT_START = 1, SECONDARY_PROMPT = 2, OUTPUT_START = 3 } PromptKind; - typedef union LineAttrs {