Index: x11/kitty/Makefile =================================================================== --- /dev/null +++ x11/kitty/Makefile @@ -0,0 +1,64 @@ +# $FreeBSD$ + +PORTNAME= kitty +DISTVERSION= 0.19.2 +CATEGORIES= x11 +MASTER_SITES= https://github.com/kovidgoyal/${PORTNAME}/releases/download/v${DISTVERSION}/ + +MAINTAINER= ports@FreeBSD.org +COMMENT= Cross-platform, fast, featureful, GPU-based terminal emulator + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= evdev-proto>0:devel/evdev-proto \ + wayland-protocols>=0:graphics/wayland-protocols +LIB_DEPENDS= libdbus-1.so:devel/dbus \ + libepoll-shim.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 \ + libwayland-client.so:graphics/wayland \ + libxkbcommon.so:x11/libxkbcommon \ + libglfw.so:graphics/glfw +# USES=ncurses:port is needed for tic(1). +USES= compiler:c11 gettext-runtime gl gmake ncurses:port pkgconfig \ + python:3.5+ shebangfix tar:xz terminfo xorg +USE_GL= gl +USE_XORG= x11 xcb xcursor xi xinerama xrandr +SHEBANG_GLOB= *.py + +# Tests require a display to pass. They seem to fail with USES=display:test, +# however. +TEST_ENV= PATH="${STAGEDIR}${PREFIX}/bin:${PATH}" +TEST_TARGET= test + +BINARY_ALIAS= python=${PYTHON_CMD} python3=${PYTHON_CMD} + +INSTALL_WRKSRC= ${WRKSRC}/linux-package + +OPTIONS_DEFINE= DOCS + +_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 +_EMPTY_DIRS= kittens/choose kittens/diff kittens/unicode_input kittens kitty + +do-build: + (cd ${WRKSRC} && \ + ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py --update-check-interval=0 linux-package) + + ${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 Index: x11/kitty/distinfo =================================================================== --- /dev/null +++ x11/kitty/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1605449330 +SHA256 (kitty-0.19.2.tar.xz) = 152b551619e4747b72b636d1c5dd42356b11999e147dae01f1e47bca02280c46 +SIZE (kitty-0.19.2.tar.xz) = 3259928 Index: x11/kitty/files/patch-setup.py =================================================================== --- /dev/null +++ x11/kitty/files/patch-setup.py @@ -0,0 +1,22 @@ +--- setup.py.orig 2020-11-16 09:11:08 UTC ++++ setup.py +@@ -1005,11 +1005,14 @@ def package(args: Options, bundle_type: str) -> None: + safe_makedirs(launcher_dir) + 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) ++ # ++ # Let's handle terminfo with the ports framework. ++ # ++ # 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.rgba', os.path.join(libdir, 'logo')) + shutil.copy2('logo/kitty.png', os.path.join(libdir, 'logo')) Index: x11/kitty/files/patch-terminfo_kitty.terminfo =================================================================== --- /dev/null +++ x11/kitty/files/patch-terminfo_kitty.terminfo @@ -0,0 +1,100 @@ +--- terminfo/kitty.terminfo.orig 2020-11-16 13:23:34 UTC ++++ terminfo/kitty.terminfo +@@ -1,9 +1,6 @@ + xterm-kitty|KovIdTTY, +- Su, +- Tc, + am, + ccc, +- fullkbd, + hs, + km, + mc5i, +@@ -58,65 +55,13 @@ xterm-kitty|KovIdTTY, + indn=\E[%p1%dS, + initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\, + kDC=\E[3;2~, +- kDC3=\E[3;3~, +- kDC4=\E[3;4~, +- kDC5=\E[3;5~, +- kDC6=\E[3;6~, +- kDC7=\E[3;7~, +- kDN=\E[1;2B, +- kDN3=\E[1;3B, +- kDN4=\E[1;4B, +- kDN5=\E[1;5B, +- kDN6=\E[1;6B, +- kDN7=\E[1;7B, + kEND=\E[1;2F, +- kEND3=\E[1;3F, +- kEND4=\E[1;4F, +- kEND5=\E[1;5F, +- kEND6=\E[1;6F, +- kEND7=\E[1;7F, + kHOM=\E[1;2H, +- kHOM3=\E[1;3H, +- kHOM4=\E[1;4H, +- kHOM5=\E[1;5H, +- kHOM6=\E[1;6H, +- kHOM7=\E[1;7H, + kIC=\E[2;2~, +- kIC3=\E[2;3~, +- kIC4=\E[2;4~, +- kIC5=\E[2;5~, +- kIC6=\E[2;6~, +- kIC7=\E[2;7~, + kLFT=\E[1;2D, +- kLFT3=\E[1;3D, +- kLFT4=\E[1;4D, +- kLFT5=\E[1;5D, +- kLFT6=\E[1;6D, +- kLFT7=\E[1;7D, + kNXT=\E[6;2~, +- kNXT3=\E[6;3~, +- kNXT4=\E[6;4~, +- kNXT5=\E[6;5~, +- kNXT6=\E[6;6~, +- kNXT7=\E[6;7~, + kPRV=\E[5;2~, +- kPRV3=\E[5;3~, +- kPRV4=\E[5;4~, +- kPRV5=\E[5;5~, +- kPRV6=\E[5;6~, +- kPRV7=\E[5;7~, + kRIT=\E[1;2C, +- kRIT3=\E[1;3C, +- kRIT4=\E[1;4C, +- kRIT5=\E[1;5C, +- kRIT6=\E[1;6C, +- kRIT7=\E[1;7C, +- kUP=\E[1;2A, +- kUP3=\E[1;3A, +- kUP4=\E[1;4A, +- kUP5=\E[1;5A, +- kUP6=\E[1;6A, +- kUP7=\E[1;7A, + ka1=, + ka3=, + kbs=\177, +@@ -216,13 +161,10 @@ xterm-kitty|KovIdTTY, + rmkx=\E[?1l, + rmso=\E[27m, + rmul=\E[24m, +- rmxx=\E[29m, + rs1=\E]\E\\\Ec, + sc=\E7, + setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m, + setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m, +- setrgbb=\E[48:2:%p1%d:%p2%d:%p3%dm, +- setrgbf=\E[38:2:%p1%d:%p2%d:%p3%dm, + sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, + sgr0=\E(B\E[m, + sitm=\E[3m, +@@ -233,7 +175,6 @@ xterm-kitty|KovIdTTY, + smkx=\E[?1h, + smso=\E[7m, + smul=\E[4m, +- smxx=\E[9m, + tbc=\E[3g, + tsl=\E]2;, + vpa=\E[%i%p1%dd, Index: x11/kitty/pkg-descr =================================================================== --- /dev/null +++ x11/kitty/pkg-descr @@ -0,0 +1,20 @@ +Kitty is the fast, featureful, GPU based terminal emulator + : +kitty is designed for power keyboard users. To that end all its controls work +with the keyboard (although it fully supports mouse interactions as well). Its +configuration is a simple, human editable, single file for easy reproducibility +(I like to store configuration in source control). + +The code in kitty is designed to be simple, modular and hackable. It is written +in a mix of C (for performance sensitive parts) and Python (for easy hackability +of the UI). It does not depend on any large and complex UI toolkit, using only +OpenGL for rendering everything. + +Finally, kitty is designed from the ground up to support all modern terminal +features, such as unicode, true color, bold/italic fonts, text formatting, etc. +It even extends existing text formatting escape codes, to add support for +features not available elsewhere, such as colored and styled (curly) underlines. +One of the design goals of kitty is to be easily extensible so that new features +can be added in the future with relatively less effort. + +WWW: https://sw.kovidgoyal.net/kitty/ Index: x11/kitty/pkg-message =================================================================== --- /dev/null +++ x11/kitty/pkg-message @@ -0,0 +1,10 @@ +[ +{ type: install + message: <