summaryrefslogtreecommitdiffstats
path: root/lang/beignet/Makefile
blob: ddd2d84b31d221c61976eaf7a140ea60176ba34c (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
# Created by: Koop Mast <kwm@FreeBSD.org>
# $FreeBSD$

PORTNAME=	beignet
PORTVERSION=	1.3.1
PORTREVISION=	1
DISTVERSIONSUFFIX=	-source
CATEGORIES=	lang
MASTER_SITES=	https://01.org/sites/default/files/

MAINTAINER=	x11@FreeBSD.org
COMMENT=	OpenCL library for Intel GPUs

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

BUILD_DEPENDS=	clang${LLVMVER}:devel/llvm${LLVMVER} \
		opencl>=0:devel/opencl
LIB_DEPENDS=	libOpenCL.so:devel/ocl-icd \
		libdrm.so:graphics/libdrm
RUN_DEPENDS=	opencl>=0:devel/opencl \
		clang${LLVMVER}:devel/llvm${LLVMVER}

WRKSRC=		${WRKDIR}/Beignet-${PORTVERSION}-Source

USES=		cmake gmake ncurses pkgconfig shebangfix
USE_XORG=	sm ice x11 xext xfixes
USE_GL=		gl egl
USE_LDCONFIG=	${LOCALBASE}/lib/${PORTNAME}
SHEBANG_FILES=	src/git_sha1.sh backend/kernels/compile.sh
ALL_TARGET=	all
LLVMVER=	${MESA_LLVM_VER:U39}

CMAKE_ARGS+=	-DLLVM_CONFIG_EXECUTABLE=${LOCALBASE}/bin/llvm-config${LLVMVER}

PLIST_SUB=	OCL20=${"${ARCH:Mamd64}" != "":?"":"@comment "}

ONLY_FOR_ARCHS=	i386 amd64
ONLY_FOR_ARCHS_REASON=	Beignet needs a graphics driver supported by the Intel KMS driver

OPTIONS_DEFINE=	FP64 TEST
FP64_DESC=	Double precision (experimental)

FP64_CMAKE_BOOL=	EXPERIMENTAL_DOUBLE
TEST_ALL_TARGET=	flat_address_space utest_run

post-patch:
	@${REINPLACE_CMD} -e 's|llvm-dis|llvm-dis${LLVMVER}|g; \
		s|clang |clang${LLVMVER} |g' \
		${WRKSRC}/backend/kernels/compile.sh

# XXX bug 213732: compiler_fill_gl_image() [FAILED]
do-test-TEST-on:
	-@(cd ${TEST_WRKSRC}/utests; . ./setenv.sh; \
		./flat_address_space; ./utest_run; )

pre-install-TEST-on: do-test-TEST-on

post-install:
	@${RM} -r ${STAGEDIR}${PREFIX}/include/CL

.include <bsd.port.mk>
OpenPOWER on IntegriCloud