45 lines
1.2 KiB
Makefile
45 lines
1.2 KiB
Makefile
PORTNAME= mle
|
|
DISTVERSIONPREFIX= v
|
|
DISTVERSION= 1.8.1
|
|
CATEGORIES= editors
|
|
|
|
MAINTAINER= as@php.net
|
|
COMMENT= Small, flexible, terminal-based text editor
|
|
WWW= https://github.com/adsr/mle
|
|
|
|
LICENSE= APACHE20
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE
|
|
|
|
BUILD_DEPENDS= ${LOCALBASE}/include/uthash.h:devel/uthash
|
|
LIB_DEPENDS= libpcre2-8.so:devel/pcre2
|
|
TEST_DEPENDS= bash:shells/bash
|
|
|
|
USES= compiler:c11 gmake localbase:ldflags lua:54 shebangfix
|
|
SHEBANG_FILES= tests/func/*.sh tests/run.sh
|
|
USE_GITHUB= yes
|
|
GH_ACCOUNT= adsr
|
|
|
|
TEST_TARGET= test
|
|
PLIST_FILES= bin/mle
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e 's|lua5.4|lua54|g' ${WRKSRC}/mle.h
|
|
@${REINPLACE_CMD} -e 's|lua5.4|lua-5.4|g' ${WRKSRC}/Makefile
|
|
@${REINPLACE_CMD} -e 's|-O0|-O2|g' ${WRKSRC}/Makefile
|
|
|
|
# Remove assertions that rely on GNU tooling output
|
|
@${REINPLACE_CMD} -e '/shell_line/d' \
|
|
${WRKSRC}/tests/func/test_multi_cursor.sh
|
|
@${REINPLACE_CMD} -e '/byte_count/d' \
|
|
${WRKSRC}/tests/func/test_coarse_undo.sh
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${WRKSRC}/mle ${STAGEDIR}${PREFIX}/bin
|
|
|
|
pre-test:
|
|
# Remove backup files generated by REINPLACE_CMD. Those must not exist
|
|
# for the tests to run properly.
|
|
@${FIND} ${WRKSRC}/tests -name '*.sh.bak' -delete
|
|
|
|
.include <bsd.port.mk>
|