PORTNAME=	lutok
DISTVERSION=	0.6.1
CATEGORIES=	devel
MASTER_SITES=	https://github.com/freebsd/${PORTNAME}/releases/download/${DISTNAME}/

MAINTAINER=	bofh@FreeBSD.org
COMMENT=	Lightweight C++ API for Lua
WWW=		https://github.com/freebsd/lutok/

LICENSE=	BSD3CLAUSE

USES=		autoreconf libtool lua pathfix pkgconfig
USE_CXXSTD=	gnu++14
USE_LDCONFIG=	yes

GNU_CONFIGURE=	yes
CONFIGURE_ARGS+=	LUA_CFLAGS="-I${LUA_INCDIR}"
CONFIGURE_ARGS+=	LUA_LIBS="-L${LUA_LIBDIR} -llua-${LUA_VER} -lm"
CONFIGURE_ARGS+=	--without-doxygen

MAKE_FLAGS+=	examplesdir=${EXAMPLESDIR}
INSTALL_TARGET=	install-strip

OPTIONS_DEFAULT= EXAMPLES TEST
OPTIONS_DEFINE=	EXAMPLES TEST
OPTIONS_SUB=		yes

EXAMPLES_MAKE_ARGS_OFF=	dist_examples_DATA=
TEST_CONFIGURE_ENABLE=	atf
TEST_BUILD_DEPENDS=	atf>=0.21:devel/atf
TEST_RUN_DEPENDS=	atf>=0.21:devel/atf

pre-install:
	@${RM} -r ${WRKSRC}/api-docs

.include <bsd.port.mk>
