From bed46c7a36472857155c24a008ffd667f8e81742 Mon Sep 17 00:00:00 2001 From: nia Date: Wed, 9 Jun 2021 15:11:46 +0000 Subject: add parallel/opencl-clang opencl-clang is a thin wrapper library around clang. The library has a OpenCL-oriented API and is capable to compile OpenCL C kernels to SPIR-V modules. --- parallel/opencl-clang/DESCR | 4 ++++ parallel/opencl-clang/Makefile | 37 +++++++++++++++++++++++++++++++++++++ parallel/opencl-clang/PLIST | 4 ++++ parallel/opencl-clang/buildlink3.mk | 15 +++++++++++++++ parallel/opencl-clang/distinfo | 6 ++++++ 5 files changed, 66 insertions(+) create mode 100644 parallel/opencl-clang/DESCR create mode 100644 parallel/opencl-clang/Makefile create mode 100644 parallel/opencl-clang/PLIST create mode 100644 parallel/opencl-clang/buildlink3.mk create mode 100644 parallel/opencl-clang/distinfo (limited to 'parallel/opencl-clang') diff --git a/parallel/opencl-clang/DESCR b/parallel/opencl-clang/DESCR new file mode 100644 index 00000000000..38a52f29e2c --- /dev/null +++ b/parallel/opencl-clang/DESCR @@ -0,0 +1,4 @@ +opencl-clang is a thin wrapper library around clang. + +The library has a OpenCL-oriented API and is capable to compile OpenCL C +kernels to SPIR-V modules. diff --git a/parallel/opencl-clang/Makefile b/parallel/opencl-clang/Makefile new file mode 100644 index 00000000000..1c08caf0d09 --- /dev/null +++ b/parallel/opencl-clang/Makefile @@ -0,0 +1,37 @@ +# $NetBSD: Makefile,v 1.1 2021/06/09 15:11:46 nia Exp $ + +DISTNAME= opencl-clang-v10.0.0-1 +PKGNAME= ${DISTNAME:S/-v/-/1:S/-1$/.1/g} +CATEGORIES= parallel +MASTER_SITES= ${MASTER_SITE_GITHUB:=intel/} +GITHUB_PROJECT= opencl-clang +GITHUB_TAG= ${DISTNAME:S/opencl-clang-//1} + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://github.com/intel/opencl-clang +COMMENT= OpenCL-oriented wrapper library around clang +LICENSE= modified-bsd + +USE_CMAKE= yes +# there is a bug somewhere.. +# make[2]: Graph cycles through `cl_headers/module.modulemap' +USE_TOOLS+= gmake +USE_LANGUAGES= c c++ + +# C++14 +GCC_REQD+= 5 + +.include "../../mk/bsd.prefs.mk" + +pre-configure: +.if empty(PKGSRC_COMPILER:M*clang*) +# XXX: When using GCC, pkgsrc provides 'clang' wrappers that are actually gcc. +# XXX: This is copied from Firefox, which also needs this hack... + ${LN} -sf ${PREFIX}/bin/clang ${WRKDIR}/.cwrapper/bin/clang + ${LN} -sf ${PREFIX}/bin/clang++ ${WRKDIR}/.cwrapper/bin/clang++ + ${LN} -sf ${PREFIX}/bin/clang-cpp ${WRKDIR}/.cwrapper/bin/clang-cpp +.endif + +.include "../../parallel/spirv-llvm-translator/buildlink3.mk" +.include "../../lang/clang/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/parallel/opencl-clang/PLIST b/parallel/opencl-clang/PLIST new file mode 100644 index 00000000000..2bbb45fc5a4 --- /dev/null +++ b/parallel/opencl-clang/PLIST @@ -0,0 +1,4 @@ +@comment $NetBSD: PLIST,v 1.1 2021/06/09 15:11:46 nia Exp $ +include/cclang/common_clang.h +lib/libopencl-clang.so +lib/libopencl-clang.so.10 diff --git a/parallel/opencl-clang/buildlink3.mk b/parallel/opencl-clang/buildlink3.mk new file mode 100644 index 00000000000..138ec85d0ac --- /dev/null +++ b/parallel/opencl-clang/buildlink3.mk @@ -0,0 +1,15 @@ +# $NetBSD: buildlink3.mk,v 1.1 2021/06/09 15:11:46 nia Exp $ + +BUILDLINK_TREE+= opencl-clang + +.if !defined(OPENCL_CLANG_BUILDLINK3_MK) +OPENCL_CLANG_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.opencl-clang+= opencl-clang>=10.0.0.1 +BUILDLINK_PKGSRCDIR.opencl-clang?= ../../parallel/opencl-clang + +.include "../../parallel/spirv-llvm-translator/buildlink3.mk" +.include "../../lang/clang/buildlink3.mk" +.endif # OPENCL_CLANG_BUILDLINK3_MK + +BUILDLINK_TREE+= -opencl-clang diff --git a/parallel/opencl-clang/distinfo b/parallel/opencl-clang/distinfo new file mode 100644 index 00000000000..590805fa98b --- /dev/null +++ b/parallel/opencl-clang/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2021/06/09 15:11:46 nia Exp $ + +SHA1 (opencl-clang-v10.0.0-1.tar.gz) = 7571470bd2248cf038cddec14c4e787066ac3254 +RMD160 (opencl-clang-v10.0.0-1.tar.gz) = 39f02ad0a788167e4ecd1f17d6588f08fb6b2927 +SHA512 (opencl-clang-v10.0.0-1.tar.gz) = 406e27d90ae26a2f8ade04172bf680f8786011c7e8357a40b15c8bbfd933d0f1c5e0c114e371036318439fcab999ec5f141dab2df4b498eb9d2548bf175f8502 +Size (opencl-clang-v10.0.0-1.tar.gz) = 23549 bytes -- cgit v1.2.3