summaryrefslogtreecommitdiff
path: root/lang/pocl/Makefile
blob: 8e01da317f1f59d439086107a8952b9a7e8f3202 (plain) (blame)
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
63
# $FreeBSD$

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

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

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/LICENSE

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}

CONFLICTS=		freeocl[0-9]*

BROKEN_FreeBSD_10=	pocl is not supported on 10.x
ONLY_FOR_ARCHS=	amd64
ONLY_FOR_ARCHS_REASON_amd64=	only tested on amd64

LLVM_VERSION=	37

GNU_CONFIGURE=	yes
USE_LDCONFIG=	yes
USE_GL=		yes
USES=		gmake localbase ncurses pathfix pkgconfig libtool:keepla

INSTALL_TARGET= install-strip

MAKE_ARGS+=	PKGCONFIGDIR=${PREFIX}/libdata/pkgconfig

CONFIGURE_ENV=	LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \
		CLANGXX_FLAGS=-std=gnu++11
# needed for the libltdl configure check
LDFLAGS+=	-L${LOCALBASE}/lib

ALL_TARGET=	all

OCL_ICD_VENDORS?=	${PREFIX}/etc/OpenCL/vendors

OPTIONS_DEFINE=		DEBUG

OPTIONS_GROUP=		TEST
OPTIONS_GROUP_TEST=	OCLBOOK

OCLBOOK_DESC=	Tests from the OpenCL book
DEBUG_DESC=	Debug build of pocl 

OCLBOOK_CONFIGURE_ENABLE= enable_testsuites="opencl-book-samples,cloverleaf,opencl_book_samples,halide,vexcl"
OCLBOOK_ALL_TARGET=	check

DEBUG_CONFIGURE_ENABLE=	debug

TEST_TARGET=	check

.include <bsd.port.mk>