Skip to content

Instantly share code, notes, and snippets.

@lwhsu
Created May 17, 2021 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lwhsu/f699c66c7af3f6a6f84ece74b8e49971 to your computer and use it in GitHub Desktop.
Save lwhsu/f699c66c7af3f6a6f84ece74b8e49971 to your computer and use it in GitHub Desktop.
#
PORTNAME= kitty
DISTVERSIONPREFIX= v
DISTVERSION= 0.20.3
CATEGORIES= x11
MAINTAINER= alexis.praga@free.fr
COMMENT= Cross-platform, fast, featureful, GPU-based terminal emulator
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= 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 \
libwayland-client.so:graphics/wayland \
libxkbcommon.so:x11/libxkbcommon
USES= gettext-runtime gl gmake ncurses:port pkgconfig \
python shebangfix terminfo xorg
USE_GITHUB= yes
GH_ACCOUNT= kovidgoyal
USE_GL= gl
USE_XORG= x11 xcb xcursor xi xinerama xrandr
SHEBANG_GLOB= *.py
SHEBANG_FILES= update-on-ox build-terminfo update-on-ubuntu count-lines-of-code mypy-editor-integration
TEST_ENV= PATH="${STAGEDIR}${PREFIX}/bin:${PATH}"
TEST_TARGET= test
BINARY_ALIAS= python=${PYTHON_CMD} python3=${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
_EMPTY_DIRS= kittens/choose kittens/diff kittens/unicode_input kittens kitty
do-build:
(cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} ${PYTHON_CMD} setup.py linux-package --update-check-interval 0)
${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 <bsd.port.mk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment