PORTNAME=	fmt
PORTVERSION=	10.2.1
CATEGORIES=	devel
MASTER_SITES=	https://github.com/fmtlib/fmt/releases/download/${PORTVERSION}/
PKGNAMEPREFIX=	lib

MAINTAINER=	sunpoet@FreeBSD.org
COMMENT=	Formatting library for C++
WWW=		https://fmt.dev/ \
		https://github.com/fmtlib/fmt

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

USES=		cmake:testing compiler:c++11-lang cpe pathfix zip

CMAKE_OFF=	FMT_CUDA_TEST \
		FMT_DOC \
		FMT_FUZZ \
		FMT_MODULE \
		FMT_PEDANTIC \
		FMT_SYSTEM_HEADERS \
		FMT_TEST \
		FMT_WERROR
CMAKE_ON=	BUILD_SHARED_LIBS \
		FMT_OS
CMAKE_TESTING_ON=	FMT_TEST
USE_LDCONFIG=	yes

PLIST_SUB=	PORTVERSION=${PORTVERSION}

OPTIONS_DEFINE=	FULL_CACHE_DRAGONBOX
OPTIONS_DEFAULT=FULL_CACHE_DRAGONBOX
FULL_CACHE_DRAGONBOX_DESC=	Use larger binary size for better performance

FULL_CACHE_DRAGONBOX_CXXFLAGS=	-DFMT_USE_FULL_CACHE_DRAGONBOX=1

.include <bsd.port.mk>
