From e2cbd05e2822030b3d2d8d23bbce19c8f51f17cd Mon Sep 17 00:00:00 2001 From: Sam James Date: Tue, 18 Apr 2023 07:47:23 +0100 Subject: dev-libs/pocl: fix example build Closes: https://bugs.gentoo.org/903968 Signed-off-by: Sam James --- dev-libs/pocl/files/pocl-3.1-c++11.patch | 23 +++++++++++++++++++++++ dev-libs/pocl/pocl-3.1.ebuild | 1 + 2 files changed, 24 insertions(+) create mode 100644 dev-libs/pocl/files/pocl-3.1-c++11.patch (limited to 'dev-libs/pocl') diff --git a/dev-libs/pocl/files/pocl-3.1-c++11.patch b/dev-libs/pocl/files/pocl-3.1-c++11.patch new file mode 100644 index 000000000000..e676979f2e95 --- /dev/null +++ b/dev-libs/pocl/files/pocl-3.1-c++11.patch @@ -0,0 +1,23 @@ +https://bugs.gentoo.org/903968 +https://github.com/pocl/pocl/issues/1200 +https://github.com/pocl/pocl/commit/b5a097e5e55922561f738eedbde050b0fec2e480 + +From b5a097e5e55922561f738eedbde050b0fec2e480 Mon Sep 17 00:00:00 2001 +From: Topi Leppanen +Date: Thu, 13 Apr 2023 11:14:23 +0300 +Subject: [PATCH] Don't use make_unique in countred example + +This is because of C++11 compatibility reasons. +Fixes #1200. +--- a/examples/accel/OpenCLcontext.cpp ++++ b/examples/accel/OpenCLcontext.cpp +@@ -189,7 +189,8 @@ bool OpenCL_Manager::processCameraFrame(unsigned char* input, unsigned long *out + return isValid; + } + +-OpenCL_Manager::OpenCL_Manager() : Context{std::make_unique()} {} ++OpenCL_Manager::OpenCL_Manager() ++ : Context{std::unique_ptr(new OpenCL_Context())} {} + OpenCL_Manager::~OpenCL_Manager() {} + + diff --git a/dev-libs/pocl/pocl-3.1.ebuild b/dev-libs/pocl/pocl-3.1.ebuild index 473aa1f2fa62..ff61446e2a20 100644 --- a/dev-libs/pocl/pocl-3.1.ebuild +++ b/dev-libs/pocl/pocl-3.1.ebuild @@ -52,6 +52,7 @@ llvm_check_deps() { PATCHES=( "${FILESDIR}"/${P}-nodebug.patch + "${FILESDIR}"/${P}-c++11.patch ) pkg_setup() { -- cgit v1.2.3-65-gdbad