cwen 799d1206dd kitty: build only on hardware accelerated, OpenGL>=3.3, archs
Since kitty offloads the rendering to the GPU, it doesn't make much sense
to run it without hardware acceleration.

Spotted while fixing the build on macppc. Thanks to Brad for proposing
to use ONLY_FOR_ARCHS instead of not building the port on macppc only.
Aarch64 has been added since it supports amdgpu(4) and radeondrm(4).

OK thfr@ (maintainer, on my first proposal)
2020-10-08 00:12:29 +00:00

63 lines
1.8 KiB
Makefile

# $OpenBSD: Makefile,v 1.3 2020/10/08 00:12:29 cwen Exp $
# Requires OpenGL>=3.3
ONLY_FOR_ARCHS = aarch64 amd64 i386
COMMENT = fast, feature full, GPU-based terminal emulator
MODPY_EGG_VERSION = 0.18.3
DISTNAME = kitty-${MODPY_EGG_VERSION}
CATEGORIES = x11
HOMEPAGE = https://sw.kovidgoyal.net/kitty/
MAINTAINER = Thomas Frohwein <thfr@openbsd.org>
# GPLv3+
PERMIT_PACKAGE = Yes
WANTLIB += GL X11 X11-xcb Xcursor Xinerama Xrandr c canberra dbus-1
WANTLIB += fontconfig freetype harfbuzz intl m png pthread ${MODPY_WANTLIB}
WANTLIB += util xcb xkbcommon xkbcommon-x11 z
MASTER_SITES = https://github.com/kovidgoyal/kitty/releases/download/v${MODPY_EGG_VERSION}/
EXTRACT_SUFX = .tar.xz
# C11
COMPILER = base-clang ports-gcc
MODULES = lang/python
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_3}
MODPY_DISTUTILS_BUILD = linux-package
MODPY_SETUP_ARGS += --verbose
# this disables checking upstream for updates
MODPY_SETUP_ARGS += --update-check-interval=0
# optional dependencies:
# graphics/ImageMagick (to use the kitty icat tool to display images in
# the terminal)
# textproc/py-pygments (for syntax highlighting in kitty +kitten diff)
RUN_DEPENDS = devel/desktop-file-utils \
x11/gtk+3,-guic
LIB_DEPENDS = audio/libcanberra \
devel/harfbuzz \
graphics/png \
x11/dbus \
x11/xkbcommon
# needed for 'make test'
USE_GMAKE = Yes
do-gen:
${SUBST_CMD} ${WRKSRC}/kitty/child.py
${SUBST_CMD} ${WRKSRC}/launcher.c
do-install:
${INSTALL_PROGRAM} \
${WRKSRC}/linux-package/bin/kitty ${PREFIX}/bin/
${INSTALL_DATA_DIR} ${PREFIX}/lib/kitty
${INSTALL_MAN} ${WRKSRC}/linux-package/man/man1/kitty.1 \
${PREFIX}/man/man1/
@cp -R ${WRKSRC}/linux-package/lib/kitty/* ${PREFIX}/lib/kitty/
@cp -R ${WRKSRC}/linux-package/share/* ${PREFIX}/share/
.include <bsd.port.mk>