diff options
author | Koop Mast <kwm@FreeBSD.org> | 2015-09-17 17:45:21 +0000 |
---|---|---|
committer | Koop Mast <kwm@FreeBSD.org> | 2015-09-17 17:45:21 +0000 |
commit | 7bc4660db0fb55cc34f11c9263904d676fc7445b (patch) | |
tree | 360ab53d179eca844a10a3aec07b9d59820f413d | |
parent | - Modernize empty dir handling (diff) |
Add ocl-icd - OpenCL Installable Client Driver.
This library provides a way that OpenCL programs can open several
ICD's. The Intel (beignet) and AMD/ATI (Clover for Mesa) OpenCL
implimentations will be build as ICD's. This has as benefit
that programs will not link directly against the OpenCL
implimentation but against ocl-icd. The user needs to manualy
install the OpenCL implimentation they want to use.
PR: 181244
Submitted by: ohartman@zedat.fu-berlin.de
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/ocl-icd/Makefile | 41 | ||||
-rw-r--r-- | devel/ocl-icd/distinfo | 2 | ||||
-rw-r--r-- | devel/ocl-icd/files/patch-ocl__icd__debug.h | 15 | ||||
-rw-r--r-- | devel/ocl-icd/files/patch-ocl__icd__loader.c | 18 | ||||
-rw-r--r-- | devel/ocl-icd/pkg-descr | 6 | ||||
-rw-r--r-- | devel/ocl-icd/pkg-plist | 10 |
7 files changed, 93 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 207f26eb485f..93ea84e22324 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -1536,6 +1536,7 @@ SUBDIR += ocaml-xstr SUBDIR += ocaml-xstrp4 SUBDIR += ocfpcsc + SUBDIR += ocl-icd SUBDIR += ode SUBDIR += ois SUBDIR += okteta diff --git a/devel/ocl-icd/Makefile b/devel/ocl-icd/Makefile new file mode 100644 index 000000000000..2393328f9aba --- /dev/null +++ b/devel/ocl-icd/Makefile @@ -0,0 +1,41 @@ +# Created by: Koop Mast <kwm@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= ocl-icd +PORTVERSION= 2.2.7 +CATEGORIES= devel +MASTER_SITES= https://forge.imag.fr/frs/download.php/667/ + +MAINTAINER= ohartman@zedat.fu-berlin.de +COMMENT= OpenCL Installable Client Driver + +LICENSE= BSD2CLAUSE + +BUILD_DEPENDS= opencl>=0:${PORTSDIR}/devel/opencl + +CONFLICTS= freeocl-[0-9]* opencl-icd-[0-9]* + +USE_RUBY= yes +USE_LDCONFIG= yes +GNU_CONFIGURE= yes +RUBY_NO_RUN_DEPENDS=yes +USES= gmake libtool pathfix +INSTALL_TARGET= install-strip + +CONFIGURE_ARGS+=--disable-official-khronos-headers + +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib + +OPTIONS_DEFINE= MANPAGES +OPTIONS_DEFAULT=MANPAGES +OPTIONS_SUB= yes + +MANPAGES_BUILD_DEPENDS= xmlto:${PORTSDIR}/textproc/xmlto \ + asciidoc:${PORTSDIR}/textproc/asciidoc + +post-patch: + @${REINPLACE_CMD} -e 's|/etc/|${LOCALBASE}/etc/|g' \ + ${WRKSRC}/doc/libOpenCL.7.txt + +.include <bsd.port.mk> diff --git a/devel/ocl-icd/distinfo b/devel/ocl-icd/distinfo new file mode 100644 index 000000000000..1d1b86de62c8 --- /dev/null +++ b/devel/ocl-icd/distinfo @@ -0,0 +1,2 @@ +SHA256 (ocl-icd-2.2.7.tar.gz) = be78886c83b903dd5861f35d62d473e4228b3c13e25535a8665c87cb8a51390b +SIZE (ocl-icd-2.2.7.tar.gz) = 450053 diff --git a/devel/ocl-icd/files/patch-ocl__icd__debug.h b/devel/ocl-icd/files/patch-ocl__icd__debug.h new file mode 100644 index 000000000000..80d4eaa16547 --- /dev/null +++ b/devel/ocl-icd/files/patch-ocl__icd__debug.h @@ -0,0 +1,15 @@ +--- ocl_icd_debug.h.orig 2015-08-06 20:54:47 UTC ++++ ocl_icd_debug.h +@@ -61,9 +61,9 @@ extern int debug_ocl_icd_mask; + return ret; \ + } while(0) + # define RETURN_STR(val) do { \ +- char* ret=(char*)(val); \ +- debug(D_TRACE, "return: %s", ret); \ +- return ret; \ ++ char* _return_str=(char*)(val); \ ++ debug(D_TRACE, "return: %s", _return_str); \ ++ return _return_str; \ + } while(0) + # ifdef DEBUG_OCL_ICD_PROVIDE_DUMP_FIELD + # pragma GCC diagnostic push diff --git a/devel/ocl-icd/files/patch-ocl__icd__loader.c b/devel/ocl-icd/files/patch-ocl__icd__loader.c new file mode 100644 index 000000000000..7eb625afce2b --- /dev/null +++ b/devel/ocl-icd/files/patch-ocl__icd__loader.c @@ -0,0 +1,18 @@ +--- ocl_icd_loader.c.orig 2015-06-08 18:29:52 UTC ++++ ocl_icd_loader.c +@@ -49,13 +49,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI + #define DEBUG_OCL_ICD_PROVIDE_DUMP_FIELD + #include "ocl_icd_debug.h" + +-#define ETC_OPENCL_VENDORS "/etc/OpenCL/vendors" ++#define ETC_OPENCL_VENDORS "/usr/local/etc/OpenCL/vendors" + + int debug_ocl_icd_mask=0; + + typedef __typeof__(clGetPlatformInfo) *clGetPlatformInfo_fn; + +-inline void dump_vendor_icd(const char* info, const struct vendor_icd *v) { ++static inline void dump_vendor_icd(const char* info, const struct vendor_icd *v) { + debug(D_DUMP, "%s %p={ num=%i, handle=%p, f=%p}\n", info, + v, v->num_platforms, v->dl_handle, v->ext_fn_ptr); + } diff --git a/devel/ocl-icd/pkg-descr b/devel/ocl-icd/pkg-descr new file mode 100644 index 000000000000..b443fcc0717f --- /dev/null +++ b/devel/ocl-icd/pkg-descr @@ -0,0 +1,6 @@ +OpenCL implementations are provided as ICD (Installable Client Driver). An +OpenCL program can use several ICD thanks to the use of an ICD Loader as +provided by this project. This free ICD Loader can load any (free or non +free) ICD. + +WWW: https://forge.imag.fr/projects/ocl-icd/ diff --git a/devel/ocl-icd/pkg-plist b/devel/ocl-icd/pkg-plist new file mode 100644 index 000000000000..3074fd9fccc7 --- /dev/null +++ b/devel/ocl-icd/pkg-plist @@ -0,0 +1,10 @@ +include/ocl_icd.h +lib/libOpenCL.so +lib/libOpenCL.so.1 +lib/libOpenCL.so.1.0.0 +libdata/pkgconfig/OpenCL.pc +libdata/pkgconfig/ocl-icd.pc +%%MANPAGES%%man/man7/libOpenCL.7.gz +%%MANPAGES%%man/man7/libOpenCL.so.7.gz +%%PORTDOCS%%%%DOCSDIR%%/examples/ocl_icd_bindings.c +%%MANPAGES%%%%PORTDOCS%%%%DOCSDIR%%/html/libOpenCL.html |