PORTNAME=	svt-av1-hdr
DISTVERSIONPREFIX=	v
DISTVERSION=	4.1.0
CATEGORIES=	multimedia

MAINTAINER=	jbeich@FreeBSD.org
COMMENT=	Scalable AV1 encoder focused on perceptual quality
WWW=		https://github.com/juliobbv-p/svt-av1-hdr

LICENSE=	BSD2CLAUSE BSD3CLAUSE MIT
LICENSE_COMB=	multi
LICENSE_FILE_BSD2CLAUSE=	${WRKSRC}/LICENSE-BSD2.md
LICENSE_FILE_BSD3CLAUSE=	${WRKSRC}/LICENSE.md
LICENSE_FILE_MIT=		${WRKSRC}/third_party/safestringlib/LICENSE

BUILD_DEPENDS=	${BUILD_DEPENDS_${ARCH}}
BUILD_DEPENDS_amd64=	nasm:devel/nasm

USES=		cmake compiler:c11
USE_GITHUB=	yes
USE_LDCONFIG=	yes
GH_ACCOUNT=	juliobbv-p
CMAKE_OFF=	NATIVE
PLIST_SUB=	VERSION=${DISTVERSION:C/-.*//}

CONFLICTS_INSTALL=	svt-av1 # bin/SvtAv1EncApp

OPTIONS_DEFINE=	LTO
OPTIONS_DEFAULT=LTO
OPTIONS_EXCLUDE_riscv64=	LTO # bug 262871

LTO_CMAKE_BOOL=		CMAKE_INTERPROCEDURAL_OPTIMIZATION
LTO_CMAKE_ON=		-DCMAKE_POLICY_DEFAULT_CMP0069:STRING=NEW

.include <bsd.port.mk>
