From 2ae78f1c794c145486baf5c39703443207fead4c Mon Sep 17 00:00:00 2001 From: Gilles Talis Date: Sun, 16 Jan 2022 18:53:19 +0100 Subject: [PATCH] package/opencl-clhpp: new package opencl-clhpp are the OpenCL API C++ bindings Signed-off-by: Gilles Talis Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 1 + package/Config.in | 1 + package/opencl-clhpp/Config.in | 14 +++++++++++++ package/opencl-clhpp/opencl-clhpp.hash | 3 +++ package/opencl-clhpp/opencl-clhpp.mk | 28 ++++++++++++++++++++++++++ 5 files changed, 47 insertions(+) create mode 100644 package/opencl-clhpp/Config.in create mode 100644 package/opencl-clhpp/opencl-clhpp.hash create mode 100644 package/opencl-clhpp/opencl-clhpp.mk diff --git a/DEVELOPERS b/DEVELOPERS index 70dd167d91..e2feb1d957 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -1104,6 +1104,7 @@ F: package/libeXosip2/ F: package/libolm/ F: package/libosip2/ F: package/ocrad/ +F: package/opencl-clhpp/ F: package/opusfile/ F: package/restclient-cpp/ F: package/tesseract-ocr/ diff --git a/package/Config.in b/package/Config.in index 3e6d763cd9..b0837d254a 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1569,6 +1569,7 @@ menu "Graphics" source "package/libvips/Config.in" source "package/libwpe/Config.in" source "package/menu-cache/Config.in" + source "package/opencl-clhpp/Config.in" source "package/opencv3/Config.in" source "package/opencv4/Config.in" source "package/opengl/Config.in" diff --git a/package/opencl-clhpp/Config.in b/package/opencl-clhpp/Config.in new file mode 100644 index 0000000000..59110ec262 --- /dev/null +++ b/package/opencl-clhpp/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_OPENCL_CLHPP + bool "opencl-clhpp" + # header only library, so there is no build per-se, but + # packages depending on us will need C++ support + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_HAS_LIBOPENCL + help + opencl-clhpp are the OpenCL API C++ bindings + + http://github.khronos.org/OpenCL-CLHPP/ + +comment "opencl-clhpp needs a toolchain w/ C++" + depends on BR2_PACKAGE_HAS_LIBOPENCL + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/opencl-clhpp/opencl-clhpp.hash b/package/opencl-clhpp/opencl-clhpp.hash new file mode 100644 index 0000000000..27b27cd80c --- /dev/null +++ b/package/opencl-clhpp/opencl-clhpp.hash @@ -0,0 +1,3 @@ +# Locally Computed +sha256 869456032e60787eed9fceaeaf6c6cb4452bc0ff97e0f5a271510145a1c8f4d4 opencl-clhpp-2.0.16.tar.gz +sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE.txt diff --git a/package/opencl-clhpp/opencl-clhpp.mk b/package/opencl-clhpp/opencl-clhpp.mk new file mode 100644 index 0000000000..ab52d80547 --- /dev/null +++ b/package/opencl-clhpp/opencl-clhpp.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# opencl-clhpp +# +################################################################################ + +OPENCL_CLHPP_VERSION = 2.0.16 +OPENCL_CLHPP_SITE = $(call github,KhronosGroup,OpenCL-CLHPP,v$(OPENCL_CLHPP_VERSION)) +OPENCL_CLHPP_LICENSE = Apache-2.0 +OPENCL_CLHPP_LICENSE_FILES = LICENSE.txt +OPENCL_CLHPP_INSTALL_STAGING = YES + +# OpenCL_CLHPP is a header-only library +OPENCL_CLHPP_INSTALL_TARGET = NO + +# This package has a CMake build system, and it checks for C++11 +# compliant compiler, but all we need to do is install two headers, so +# let's do it manually. +OPENCL_CLHPP_HEADERS = cl2.hpp opencl.hpp + +define OPENCL_CLHPP_INSTALL_STAGING_CMDS + $(foreach header,$(OPENCL_CLHPP_HEADERS), \ + $(INSTALL) -D -m 0644 $(@D)/include/CL/$(header) \ + $(STAGING_DIR)/usr/include/CL/$(header) + ) +endef + +$(eval $(generic-package))