summaryrefslogtreecommitdiff
path: root/misc/ncnn/Makefile
blob: dcfc371b2e3acfc63484da150b2bb0c176f0eba4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

PORTNAME=	ncnn
DISTVERSION=	20210322
CATEGORIES=	misc # machine-learning

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	High-performance neural network inference framework

LICENSE=	BSD3CLAUSE
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

USES=		cmake compiler:c11
USE_GITHUB=	yes
GH_ACCOUNT=	Tencent

OPTIONS_DEFINE=		VULKAN
OPTIONS_DEFAULT=	VULKAN

VULKAN_DESC=		Vulkan compute support
VULKAN_BUILD_DEPENDS=	glslang>0:graphics/glslang \
			${LOCALBASE}/include/vulkan/vulkan.h:graphics/vulkan-headers \
			${LOCALBASE}/lib/libvulkan.so:graphics/vulkan-loader
VULKAN_CMAKE_BOOL=	NCNN_VULKAN NCNN_SYSTEM_GLSLANG
VULKAN_CMAKE_ON=	-DGLSLANG_TARGET_DIR:PATH="${LOCALBASE}/lib/cmake"

post-patch-VULKAN-on:
	@${REINPLACE_CMD} 's,/glslang,,' ${WRKSRC}/src/gpu.cpp

.include <bsd.port.mk>