summaryrefslogtreecommitdiff
path: root/lang/pocl/Makefile
blob: d40779b6754e9dd9a7daddfa91a74bc3fb06bffb (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
# $FreeBSD$

PORTNAME=	pocl
PORTVERSION=	0.14
CATEGORIES=	lang
MASTER_SITES=	SF/pocl \
		http://portablecl.org/downloads/

MAINTAINER=	ohartman@zedat.fu-berlin.de
COMMENT=	POrtable Computing Language (POCL)

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

ONLY_FOR_ARCHS=		amd64 i386
ONLY_FOR_ARCHS_REASON=	only tested on x86

BUILD_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION} \
		opencl>=2.1:devel/opencl
LIB_DEPENDS=	libhwloc.so:devel/hwloc \
		libOpenCL.so:devel/ocl-icd \
		libltdl.so:devel/libltdl
RUN_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION}

LLVM_VERSION=	${MESA_LLVM_VER:U40}

USES=		cmake localbase:ldflags ncurses pkgconfig
USE_CXXSTD=	gnu++11
USE_LDCONFIG=	yes

CMAKE_ARGS=	-DWITH_LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \
		-DPOCL_INSTALL_PKGCONFIG_DIR="${PREFIX}/libdata/pkgconfig" \
		-DKERNELLIB_HOST_CPU_VARIANTS="distro"
PLIST_SUB=	OPSYS=${OPSYS:tl} ARCH=${ARCH:S/amd64/x86_64/}

OPTIONS_DEFINE=	TEST

TEST_DESC=	Tests from the OpenCL book
TEST_CMAKE_OFF=	-DENABLE_TESTSUITES=""
TEST_CMAKE_ON=	-DENABLE_TESTSUITES="all"
TEST_TARGET=	test

pre-install-TEST-on: do-test

.include <bsd.port.mk>