PORTNAME=	lace
DISTVERSIONPREFIX=	v
DISTVERSION=	2.4.0
CATEGORIES=	devel
PKGNAMESUFFIX=	-work-stealing

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Implementation of work-stealing in C
WWW=		https://github.com/trolando/lace

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		cmake:testing

USE_GITHUB=	yes
GH_ACCOUNT=	trolando

CMAKE_ON=		BUILD_SHARED_LIBS
CMAKE_OFF=		LACE_BUILD_TESTS \
			LACE_NATIVE_OPT
CMAKE_TESTING_ON=	LACE_BUILD_TESTS

CFLAGS+=	-fPIC

PORTSCOUT=	limit:^.*[0-9]+\.[0-9]+\.[0-9]+$$ # prevent tags like mucocos_2014_ri

pre-configure: # see discussion in https://github.com/trolando/lace/issues/16
	@${REINPLACE_CMD} -e 's,memory_order_[[:alnum:]_]*,memory_order_seq_cst,g' \
		${WRKSRC}/src/*.[ch] ${WRKSRC}/src/lace.sh

# tests as of 2.4.0: 100% tests passed, 0 tests failed out of 5

.include <bsd.port.mk>
