PORTNAME=	lexbor
DISTVERSIONPREFIX=	v
DISTVERSION=	2.4.0
PORTREVISION=	1
CATEGORIES=	www

MAINTAINER=	alster@vinterdalen.se
COMMENT=	Modular web engine (HTML/CSS parser, renderer, ...)
WWW=		https://lexbor.com/ \
		https://github.com/lexbor/lexbor/

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		cmake:testing
USE_GITHUB=	yes
USE_LDCONFIG=	yes

PLIST_SUB=	SOVERSION=${DISTVERSION}

CMAKE_TESTING_ON=	LEXBOR_BUILD_TESTS

PLIST_SUB=	SOVERSION=${DISTVERSION}

OPTIONS_DEFINE=		ASAN EXAMPLES STATIC
OPTIONS_SUB=	yes

ASAN_DESC=	Enable Address Sanitizer if possible

ASAN_CMAKE_BOOL=	LEXBOR_BUILD_WITH_ASAN
EXAMPLES_CMAKE_BOOL=	LEXBOR_BUILD_EXAMPLES
STATIC_CMAKE_BOOL=	LEXBOR_BUILD_STATIC

post-install-EXAMPLES-on:
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
	(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})

.include <bsd.port.mk>
