summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-04-18 07:47:23 +0100
committerSam James <sam@gentoo.org>2023-04-18 07:50:49 +0100
commite2cbd05e2822030b3d2d8d23bbce19c8f51f17cd (patch)
tree25207e19146cc75a03470eeef9ccd6bffbcfdb03 /dev-libs/pocl
parentdev-libs/libxls: fix build w/ gcc 13 (diff)
downloadgentoo-e2cbd05e2822030b3d2d8d23bbce19c8f51f17cd.tar.gz
gentoo-e2cbd05e2822030b3d2d8d23bbce19c8f51f17cd.tar.bz2
gentoo-e2cbd05e2822030b3d2d8d23bbce19c8f51f17cd.zip
dev-libs/pocl: fix example build
Closes: https://bugs.gentoo.org/903968 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/pocl')
-rw-r--r--dev-libs/pocl/files/pocl-3.1-c++11.patch23
-rw-r--r--dev-libs/pocl/pocl-3.1.ebuild1
2 files changed, 24 insertions, 0 deletions
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 <topi.leppanen@tuni.fi>
+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_Context>()} {}
++OpenCL_Manager::OpenCL_Manager()
++ : Context{std::unique_ptr<OpenCL_Context>(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() {