PORTNAME=	libopenshot-audio
DISTVERSIONPREFIX=	v
DISTVERSION=	0.3.3
CATEGORIES=	audio multimedia

MAINTAINER=	tatsuki_makino@hotmail.com
COMMENT=	OpenShot Audio Library
WWW=		https://www.openshot.org/

LICENSE=	GPLv3+
LICENSE_FILE=	${WRKSRC}/COPYING

LIB_DEPENDS=	libasound.so:audio/alsa-lib \
		libsysinfo.so:devel/libsysinfo
RUN_DEPENDS=	${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins

USES=		cmake compiler:c++14-lang
USE_GITHUB=	yes
GH_ACCOUNT=	OpenShot
USE_LDCONFIG=	yes
CMAKE_ON=	AUTO_INSTALL_DOCS
DEBUG_FLAGS?=	-g
DEBUG_FLAGS+=	-D_DEBUG -DJUCE_FORCE_DEBUG=1
PLIST_SUB=	VERSION=${DISTVERSION}

OPTIONS_DEFINE=		DOCS DOXYGEN JACK
DOCS_CMAKE_ON=		-DCMAKE_INSTALL_DOCDIR:PATH=${DOCSDIR_REL:Q}
DOCS_PORTDOCS=		*
DOXYGEN_IMPLIES=	DOCS
DOXYGEN_BUILD_DEPENDS=	doxygen:devel/doxygen
DOXYGEN_CMAKE_BOOL=	ENABLE_AUDIO_DOCS
DOXYGEN_CMAKE_BOOL_OFF=	CMAKE_DISABLE_FIND_PACKAGE_Doxygen
JACK_BUILD_DEPENDS=	${LOCALBASE}/include/jack/jack.h:audio/jack
JACK_RUN_DEPENDS=	${LOCALBASE}/lib/libjack.so:audio/jack
JACK_USES=		pkgconfig
JACK_CMAKE_BOOL=	ENABLE_JACK
JACK_CMAKE_ON=		-DJUCE_JACK_CLIENT_NAME:STRING=

.include <bsd.port.mk>
