View | Details | Raw Unified | Return to bug 171914 | Differences between
and this patch

Collapse All | Expand All

(-)devel/pocl/Makefile (+76 lines)
Line 0 Link Here
1
# $FreeBSD$
2
3
PORTNAME=	pocl
4
PORTVERSION=	0.13
5
CATEGORIES=	devel
6
MASTER_SITES=	SF/pocl \
7
		http://portablecl.org/downloads/
8
9
MAINTAINER=	ohartman@zedat.fu-berlin.de
10
COMMENT=	POrtable Computing Language (POCL)
11
12
LICENSE=	GPLv3
13
LICENSE_FILE=	${WRKSRC}/LICENSE
14
15
BUILD_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION}
16
LIB_DEPENDS=	libhwloc.so:devel/hwloc \
17
		libltdl.so:devel/libltdl
18
RUN_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION}
19
20
CONFLICTS=		freeocl[0-9]*
21
22
NOT_FOR_ARCHS= 	i386
23
24
LLVM_VERSION=	37
25
26
GNU_CONFIGURE=	yes
27
USE_LDCONFIG=	yes
28
USE_GL=		yes
29
#USES=		autoreconf gmake localbase pathfix pkgconfig libtool
30
USES=		gmake localbase ncurses pathfix pkgconfig libtool:keepla
31
32
INSTALL_TARGET= install-strip
33
34
MAKE_ARGS+=	PKGCONFIGDIR=${PREFIX}/libdata/pkgconfig
35
36
CONFIGURE_ENV=	LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \
37
		CLANGXX_FLAGS=-std=gnu++11
38
CONFIGURE_ENABLE=	pedantic
39
40
ALL_TARGET=	all
41
42
OCL_ICD_VENDORS?=	${PREFIX}/etc/OpenCL/vendors
43
44
OPTIONS_DEFINE=		HEADER DEBUG
45
46
OPTIONS_GROUP=		TEST
47
OPTIONS_GROUP_TEST= OCLBOOK
48
49
OPTIONS_SINGLE=		ICD
50
OPTIONS_SINGLE_ICD=	OCL_ICD NO_ICD
51
OPTIONS_DEFAULT=	OCL_ICD
52
53
OCLBOOK_DESC=	Tests from the OpenCL book
54
DEBUG_DESC=	Debug build of pocl 
55
VIENNACL_DESC=	ViennaCL Test
56
OCL_ICD_DESC=	ICD loader: ocl-icd
57
NO_ICD_DESC=	No ICD loader (direct linkage against pocl lib)
58
HEADER_DESC=	Install CL headers from this port
59
60
HEADER_CONFLICTS=	opencl
61
62
HEADER_BUILD_DEPENDS_OFF=	opencl>=2.1:devel/opencl
63
64
OCL_ICD_LIB_DEPENDS=	libOpenCL.so:devel/ocl-icd
65
ICD_CONFIGURE_ENABLE= 	tests-with-icd
66
NO_ICD_CONFIGURE_ENABLE= direct-linkage
67
68
OCLBOOK_CONFIGURE_ENABLE= enable_testsuites="opencl-book-samples,cloverleaf,opencl_book_samples,halide,vexcl"
69
OCLBOOK_ALL_TARGET=	check
70
71
DEBUG_CONFIGURE_ENABLE=	debug
72
73
do-test:
74
	cd ${WRKSRC} && ${GMAKE} check
75
76
.include <bsd.port.mk>
(-)devel/pocl/distinfo (+2 lines)
Line 0 Link Here
1
SHA256 (pocl-0.13.tar.gz) = a17f37d8f26819c0c8efc6de2b57f67a0c8a81514fc9cd5005434e49d67499f9
2
SIZE (pocl-0.13.tar.gz) = 1901208
(-)devel/pocl/files/patch-Makefile.in (+25 lines)
Line 0 Link Here
1
First part: this is false, this was due to a libtool bug, which is fixed now
2
Second part: cmp --quiet is long for the -s option, use that since FreeBSD
3
cmp doesn't have the long option.
4
5
--- Makefile.in.orig	2016-09-13 22:57:13.327123000 +0200
6
+++ Makefile.in	2016-09-13 23:01:18.738696000 +0200
7
@@ -116,8 +116,7 @@
8
 @POCL_ANDROID_FALSE@am__append_1 = scripts examples tests
9
 
10
 #TODO: this naming scheme is used on other platforms (primarly BSDs?) too
11
-@BUILD_ICD_TRUE@@FREEBSD_HOST_OS_TRUE@am__append_2 = -e 's,so.VER,so.$(LIB_CURRENT_VERSION),g'
12
-@BUILD_ICD_TRUE@@FREEBSD_HOST_OS_FALSE@am__append_3 = -e 's,so.VER,so.$(LIB_FIRST_VERSION).$(LIB_AGE_VERSION).$(LIB_REVISION_VERSION),g'
13
+@BUILD_ICD_TRUE@am__append_3 = -e 's,so.VER,so.$(LIB_FIRST_VERSION).$(LIB_AGE_VERSION).$(LIB_REVISION_VERSION),g'
14
 @BUILD_ICD_TRUE@am__append_4 = pocl.icd
15
 @BUILD_ICD_TRUE@am__append_5 = pocl.icd
16
 subdir = .
17
@@ -1076,7 +1075,7 @@
18
 	echo "#define PKGDATADIR \"${pkgdatadir}\"" > $@.new
19
 	echo "#define PKGLIBEXECDIR \"${pkglibexecdir}\"" >> $@.new
20
 	echo "#define PKGINCLUDEDIR \"${pkgincludedir}\"" >> $@.new
21
-	@if cmp --quiet $@.new $@ ; then \
22
+	@if cmp -s $@.new $@ ; then \
23
 		: "Paths not changed" ;\
24
 		$(RM) $@.new ;\
25
 	else \
(-)devel/pocl/files/patch-scripts_Makefile.in (+21 lines)
Line 0 Link Here
1
dirty hack, pocl-standalone will be installed into stage with
2
r-xr-xr-x permissions. So writing to it is problemetic. give the file write
3
permission and take it away after.
4
5
Upstream (pre 0.14) will be a lot different
6
7
--- scripts/Makefile.in.orig	2016-09-13 22:10:48.091956000 +0200
8
+++ scripts/Makefile.in	2016-09-13 22:13:33.388168000 +0200
9
@@ -651,10 +651,11 @@
10
 
11
 install-exec-hook: $(bin_SCRIPTS) 
12
 	for f in $(bin_SCRIPTS) ; do \
13
+		chmod +w "$(DESTDIR)$(bindir)/$$f" ; \
14
 		sed -e '/^# BEGIN REMOVE ONCE INSTALLED$$/,/^# END REMOVE ONCE INSTALLED$$/d' \
15
 			> "$(DESTDIR)$(bindir)/$$f" \
16
 			< "$$f" && \
17
-		chmod +x "$(DESTDIR)$(bindir)/$$f" ; \
18
+		chmod +x-w "$(DESTDIR)$(bindir)/$$f" ; \
19
 	done
20
 
21
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
(-)devel/pocl/pkg-descr (+22 lines)
Line 0 Link Here
1
Portable OpenCL (pocl)
2
----------------------
3
4
Portable OpenCL aims to be an efficient open source (MIT-licensed) 
5
implementation of the OpenCL 1.2 standard. 
6
7
In addition to producing an easily portable open source OpenCL
8
implementation, another major goal of the project is improving 
9
performance portability of OpenCL programs with compiler 
10
optimizations, reducing the need for target-dependent manual 
11
optimizations. At the core of pocl is a set of LLVM passes 
12
used to statically parallelize multiple work-items with the kernel
13
compiler, even in the presence of work-group barriers. This enables 
14
parallelization of the fine-grained static concurrency in the work 
15
groups in multiple ways (SIMD, VLIW, superscalar,...).
16
17
The code base is modularized to allow easy adding of new "device drivers"
18
in the host-device layer. A generic multithreaded "target driver" is 
19
included. It allows running OpenCL applications on a host that supports 
20
the pthread library with multithreading at the work group granularity.
21
22
WWW: http://portablecl.org/
(-)devel/pocl/pkg-message (+24 lines)
Line 0 Link Here
1
2
When using ICD, make sure you have set the environment variable
3
4
OCL_ICD_VENDORS=${PREFIX}/etc/OpenCL/vendors/
5
6
properly. Usually, this should point to 
7
${PREFIX}/etc/OpenCL/vendors/
8
with ${PREFIX} set to /usr/local in the standard environment.
9
10
Deadlocks (freezes) on FreeBSD:
11
12
OpenCL applications using pocl on FreeBSD must be compiled with 
13
options CFLAGS+=-pthread or CXXFLAGS+=-pthread, otherwise someone risk
14
that a library may not initialize the threading on BSD independently, 
15
even if an ICD loader is used.
16
17
See: 
18
	http://www.freebsd.org/cgi/query-pr.cgi?pr=163512
19
20
(Source: http://portablecl.org/docs/html/faq.html?highlight=freebsd)
21
22
For documentation, please consult
23
24
	http://portablecl.org/docs/html/
(-)devel/pocl/pkg-plist (+27 lines)
Line 0 Link Here
1
bin/pocl-standalone
2
etc/OpenCL/vendors/pocl.icd
3
include/poclu.h
4
lib/libpocl.a
5
lib/libpocl.la
6
lib/libpocl.so
7
lib/libpocl.so.1
8
lib/libpocl.so.1.6.0
9
lib/libpoclu.a
10
lib/libpoclu.la
11
lib/libpoclu.so
12
lib/libpoclu.so.1
13
lib/libpoclu.so.1.6.0
14
lib/pocl/llvmopencl.a
15
lib/pocl/llvmopencl.la
16
lib/pocl/llvmopencl.so
17
lib/pocl/llvmopencl.so.7
18
lib/pocl/llvmopencl.so.7.0.0
19
libdata/pkgconfig/pocl.pc
20
%%DATADIR%%/include/_kernel.h
21
%%DATADIR%%/include/_kernel_c.h
22
%%DATADIR%%/include/_kernel_constants.h
23
%%DATADIR%%/include/pocl.h
24
%%DATADIR%%/include/pocl_device.h
25
%%DATADIR%%/include/pocl_tests.h
26
%%DATADIR%%/include/pocl_types.h
27
%%DATADIR%%/kernel-amd64-portbld-freebsd%%OSREL%%.bc

Return to bug 171914