openbsd-ports/editors/helix/Makefile
solene 8af2e483b4 import helix-22.08.1
A Kakoune / Neovim inspired text editor.

Features:
  - Vim-like modal editing
  - Multiple selections
  - Built-in language server support
  - Smart, incremental syntax highlighting
    and code editing via tree-sitter

ok semarie@
port sent by Laurent Cheylus who takes maintainership
2022-11-11 15:54:50 +00:00

60 lines
1.5 KiB
Makefile

COMMENT = modal text editor
VER = 22.08.1
DISTNAME = helix-${VER}
CATEGORIES = editors
HOMEPAGE = https://helix-editor.com
MAINTAINER = Laurent Cheylus <foxy@free.fr>
# MPL-2.0
PERMIT_PACKAGE = Yes
WANTLIB += ${MODCARGO_WANTLIB} m
MASTER_SITES = https://github.com/helix-editor/helix/releases/download/${VER}/
EXTRACT_SUFX = .tar.xz
DISTFILES += ${DISTNAME}-source${EXTRACT_SUFX}
# avoid WRKDIST = ${WRKDIR}
EXTRACT_CASES= *.tar.xz) \
xz -dc ${FULLDISTDIR}/$$archive | ${TAR} xf - -C ${WRKDIST};;
MODULES = devel/cargo
CONFIGURE_STYLE = cargo
SEPARATE_BUILD = Yes
pre-extract:
@mkdir -p ${WRKDIST}
post-patch:
grep -F -Rl '%%DATADIR%%' ${WRKSRC} | xargs sed -i \
's,%%DATADIR%%,${PREFIX}/share/helix,'
do-install:
${INSTALL_PROGRAM} ${MODCARGO_TARGET_DIR}/release/hx ${PREFIX}/bin/
${INSTALL_DATA_DIR} ${PREFIX}/share/helix/runtime/themes
${INSTALL_DATA} ${WRKSRC}/runtime/themes/* \
${PREFIX}/share/helix/runtime/themes
${INSTALL_DATA_DIR} ${PREFIX}/share/helix/runtime/queries
find ${WRKSRC}/runtime/queries/ -type d -exec \
cp -a {} ${PREFIX}/share/helix/runtime/queries \;
${INSTALL_DATA_DIR} ${PREFIX}/share/helix/runtime/grammars
find ${WRKSRC}/runtime/grammars/ -type f -name '*.so' -exec \
cp -a {} ${PREFIX}/share/helix/runtime/grammars \;
${INSTALL_DATA} ${WRKSRC}/runtime/tutor.txt \
${PREFIX}/share/helix/runtime
${INSTALL_DATA} ${WRKSRC}/languages.toml ${PREFIX}/share/helix
.include "crates.inc"
.include <bsd.port.mk>