summaryrefslogtreecommitdiff
path: root/lang/intel-compute-runtime/Makefile
blob: 9be4ddc1b71c7f726361e2db99cb7072c0705c30 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
PORTNAME=	compute-runtime
DISTVERSION=	22.24.23453
CATEGORIES=	lang
PKGNAMEPREFIX=	intel-
PKGNAMESUFFIX=	-${FLAVOR}

MAINTAINER=	jbeich@FreeBSD.org
COMMENT=	OpenCL implementation for Intel HD 5000 (Gen8) or newer
WWW=		https://01.org/compute-runtime

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE.md

ONLY_FOR_ARCHS=	amd64
ONLY_FOR_ARCHS_REASON=	only Intel GPUs on x86 are supported

LIB_DEPENDS=	libigc.so:devel/intel-graphics-compiler@${FLAVOR} \
		libigdgmm.so:multimedia/gmmlib

FLAVORS=	${14 13 12 11:L:S/^/llvm/}

CONFLICTS_INSTALL=	${PORTNAME}-*

USES=		cmake compiler:c++17-lang localbase:ldflags pkgconfig
USE_GITHUB=	yes
USE_LDCONFIG=	yes
GH_ACCOUNT=	intel
CMAKE_ON=	RELEASE_WITH_REGKEYS SKIP_UNIT_TESTS SUPPORT_DG1
CMAKE_ARGS=	-DNEO_OCL_DRIVER_VERSION:STRING="${DISTVERSIONFULL}"
PLIST_FILES=	bin/ocloc \
		etc/OpenCL/vendors/intel.icd \
		include/ocloc_api.h \
		lib/intel-opencl/libigdrcl.so \
		lib/libocloc.so \
		${NULL}

OPTIONS_DEFINE=	L0 VAAPI
OPTIONS_DEFAULT=L0 VAAPI

L0_DESC=		oneAPI Level Zero support
L0_BUILD_DEPENDS=	level-zero>=1.0:devel/level-zero
L0_CMAKE_BOOL=		BUILD_WITH_L0
L0_CMAKE_ON=		-DNEO_VERSION_BUILD:STRING="0"
L0_PLIST_FILES=		lib/libze_intel_gpu.so.1 \
			lib/libze_intel_gpu.so.1.3.0

VAAPI_BUILD_DEPENDS=	${LOCALBASE}/include/va/va.h:multimedia/libva
VAAPI_CMAKE_BOOL_OFF=	DISABLE_LIBVA

post-patch:
	@${REINPLACE_CMD} -e '/-Werror/d' \
		-e '/FORCE_RESPONSE_FILE/d' \
		${WRKSRC}/CMakeLists.txt
	@${REINPLACE_CMD} -e '/OCL_ICD_VENDORDIR/s,/etc,${PREFIX}&,' \
		${WRKSRC}/package.cmake

post-install:
# install/strip has no effect on install(FILES), so strip manually
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/*
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/intel-opencl/*.so

.include <bsd.port.mk>