1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-08 12:01:56 +00:00
Mathieu Arnold beb1c1fe19 USES=lua gained flavors.
Ports using USES=lua:module or lua:flavors will be flavored.  A range of
supported lua versions can be set using XX-YY (or XX-, or -YY, or simply ZZ)
for ports not supporting all lua versions.

USES=lua sets LUA_FLAVOR that needs to be used on all dependencies of
flavored lua ports, in a similar way as PHP or Python flavors.

PR:		245038
Submitted by:	andrew tao11 riddles org uk
Reviewed by:	mat, kevans, russ haley gmail com
Approved by:	mat (portmgr)
Differential Revision:	https://reviews.freebsd.org/D16494
2020-04-14 15:49:36 +00:00

52 lines
1.3 KiB
Makefile

# Created by: Adam Saponara <as@php.net>
# $FreeBSD$
PORTNAME= mle
DISTVERSIONPREFIX= v
DISTVERSION= 1.4.3
CATEGORIES= editors
MAINTAINER= as@php.net
COMMENT= Small, flexible, terminal-based text editor
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${LOCALBASE}/include/uthash.h:devel/uthash
LIB_DEPENDS= libpcre.so:devel/pcre \
libtermbox.so:devel/termbox
TEST_DEPENDS= ${LOCALBASE}/bin/gpaste:sysutils/coreutils \
${LOCALBASE}/bin/grep:textproc/gnugrep \
bash:shells/bash \
gfind:misc/findutils
USES= compiler:c11 gmake localbase:ldflags shebangfix lua:53
SHEBANG_FILES= tests/func/*.sh tests/run.sh
USE_GITHUB= yes
GH_ACCOUNT= adsr
PLIST_FILES= bin/mle
TEST_TARGET= test
post-patch:
@${REINPLACE_CMD} -e 's|lua5.3|lua53|g' ${WRKSRC}/mle.h
@${REINPLACE_CMD} -e 's|lua5.3|lua-5.3|g' ${WRKSRC}/Makefile
# Tests.
@${REINPLACE_CMD} -e 's|find|gfind|g' \
-e 's|grep|${LOCALBASE}/bin/grep|g' \
${WRKSRC}/tests/run.sh \
${WRKSRC}/tests/func/*.sh
@${REINPLACE_CMD} -e 's|p a s t e|g p a s t e|g' \
${WRKSRC}/tests/func/test_lua.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>