summaryrefslogtreecommitdiff
path: root/dev-cpp/vexcl
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp/vexcl')
-rw-r--r--dev-cpp/vexcl/Manifest1
-rw-r--r--dev-cpp/vexcl/files/add-sphinx-ext-autodoc-to-conf-py.patch11
-rw-r--r--dev-cpp/vexcl/files/vexcl-1.4.2-include-map.patch26
-rw-r--r--dev-cpp/vexcl/metadata.xml26
-rw-r--r--dev-cpp/vexcl/vexcl-1.4.2-r2.ebuild88
5 files changed, 152 insertions, 0 deletions
diff --git a/dev-cpp/vexcl/Manifest b/dev-cpp/vexcl/Manifest
new file mode 100644
index 000000000000..4d66981379cd
--- /dev/null
+++ b/dev-cpp/vexcl/Manifest
@@ -0,0 +1 @@
+DIST vexcl-1.4.2.tar.gz 412861 BLAKE2B 145948d2c2e6712a30542eca6690fe9f260cc9fe2064ffd01aaa89c3ddae1e0826206ffedfc362a6fb128f2909fc22948957f40cb45dc963d703abdff2ddd386 SHA512 b8bc759269025be21865178485015eb8489596be80c505d4699efdb517cb610a2d5fed10545ec7888f4cb4c7b3e2db5e3c2dd879c0d2fd95d2d0e59d1d3b790f
diff --git a/dev-cpp/vexcl/files/add-sphinx-ext-autodoc-to-conf-py.patch b/dev-cpp/vexcl/files/add-sphinx-ext-autodoc-to-conf-py.patch
new file mode 100644
index 000000000000..405376cf95d2
--- /dev/null
+++ b/dev-cpp/vexcl/files/add-sphinx-ext-autodoc-to-conf-py.patch
@@ -0,0 +1,11 @@
+--- a/docs/conf.py
++++ b/docs/conf.py
+@@ -45,7 +45,7 @@
+ # Add any Sphinx extension module names here, as strings. They can be
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+ # ones.
+-extensions = ['breathe', 'sphinx.ext.mathjax',
++extensions = ['breathe', 'sphinx.ext.mathjax', 'sphinx.ext.autodoc',
+ 'matplotlib.sphinxext.plot_directive']
+
+ breathe_projects = {'VEXCL' : 'xml'}
diff --git a/dev-cpp/vexcl/files/vexcl-1.4.2-include-map.patch b/dev-cpp/vexcl/files/vexcl-1.4.2-include-map.patch
new file mode 100644
index 000000000000..e3fd08a16b3d
--- /dev/null
+++ b/dev-cpp/vexcl/files/vexcl-1.4.2-include-map.patch
@@ -0,0 +1,26 @@
+From 555a838850c96ab838a299255157fbe4fd4df2ee Mon Sep 17 00:00:00 2001
+From: Denis Demidov <dennis.demidov@gmail.com>
+Date: Mon, 4 Oct 2021 10:46:03 +0300
+Subject: [PATCH] Missing <map> include in backend/{opencl/compute}/filter.hpp
+
+Fixes #290
+--- a/vexcl/backend/compute/filter.hpp
++++ b/vexcl/backend/compute/filter.hpp
+@@ -35,6 +35,7 @@ THE SOFTWARE.
+ #include <fstream>
+ #include <string>
+ #include <vector>
++#include <map>
+ #include <functional>
+ #include <cstdlib>
+
+--- a/vexcl/backend/opencl/filter.hpp
++++ b/vexcl/backend/opencl/filter.hpp
+@@ -35,6 +35,7 @@ THE SOFTWARE.
+ #include <fstream>
+ #include <string>
+ #include <vector>
++#include <map>
+ #include <functional>
+ #include <cstdlib>
+
diff --git a/dev-cpp/vexcl/metadata.xml b/dev-cpp/vexcl/metadata.xml
new file mode 100644
index 000000000000..eba4a282bc97
--- /dev/null
+++ b/dev-cpp/vexcl/metadata.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription lang="en">VexCL is a vector expression template library for OpenCL/CUDA. It has been created for ease of GPGPU development with C++. VexCL strives to reduce amount of boilerplate code needed to develop GPGPU applications. The library provides convenient and intuitive notation for vector arithmetic, reduction, sparse matrix-vector products, etc. Multi-device and even multi-platform computations are supported. The source code of the library is distributed under very permissive MIT license.</longdescription>
+ <maintainer type="person">
+ <description>co-maintainers welcome</description>
+ <email>lssndrbarbieri@gmail.com</email>
+ <name>Alessandro Barbieri</name>
+ </maintainer>
+ <upstream>
+ <maintainer>
+ <email>dennis.demidov@gmail.com</email>
+ <name>Denis Demidov</name>
+ </maintainer>
+ <remote-id type="github">ddemidov/vexcl</remote-id>
+ </upstream>
+ <use>
+ <flag name="amdsi">Implement workaround for AMD SI GPUs</flag>
+ <flag name="clhpp">Install the OpenCL C++ header provided by VexCL</flag>
+ <!--<flag name="clogs">Use clogs algorithms</flag>-->
+ <flag name="backend-compute">Use Boost.Compute algorithms</flag>
+ <!--<flag name="backend-cuda">Use CUDA as backend</flag>-->
+ <flag name="backend-jit">Use the JIT backend</flag>
+ <flag name="backend-opencl">Use OpenCL as backend</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-cpp/vexcl/vexcl-1.4.2-r2.ebuild b/dev-cpp/vexcl/vexcl-1.4.2-r2.ebuild
new file mode 100644
index 000000000000..cae5336e3a68
--- /dev/null
+++ b/dev-cpp/vexcl/vexcl-1.4.2-r2.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DOCS_BUILDER="sphinx"
+DOCS_DEPEND="
+ dev-python/breathe
+ dev-python/sphinx-bootstrap-theme
+"
+DOCS_DIR="docs"
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+
+inherit cmake python-any-r1 docs
+
+DESCRIPTION="VexCL - Vector expression template library for OpenCL"
+HOMEPAGE="https://github.com/ddemidov/vexcl"
+SRC_URI="https://github.com/ddemidov/vexcl/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE_BACKEND="
+ backend-compute
+ backend-jit
+ +backend-opencl
+"
+# backend-cuda
+IUSE="${IUSE_BACKEND} amdsi clhpp examples test" #clogs
+
+RDEPEND="
+ dev-libs/boost:=
+ backend-jit? ( virtual/opencl )
+ backend-opencl? ( virtual/opencl )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/add-sphinx-ext-autodoc-to-conf-py.patch"
+ "${FILESDIR}/${P}-include-map.patch"
+)
+REQUIRED_USE="
+ ^^ ( ${IUSE_BACKEND//+/} )
+"
+RESTRICT="!test? ( test )"
+
+src_prepare() {
+ sed -e "s|git_version()|\'${PV}\'|g" -i docs/conf.py || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ local backend
+# use && backend="All"
+ use backend-compute && backend="Compute"
+# use backend-cuda && backend="CUDA"
+ use backend-jit && backend="JIT"
+ use backend-opencl && backend="OpenCL"
+
+ local mycmakeargs=(
+ -DVEXCL_BUILD_EXAMPLES=OFF
+
+ -DVEXCL_AMD_SI_WORKAROUND=$(usex amdsi)
+ -DVEXCL_BACKEND="${backend}"
+ -DVEXCL_BUILD_TESTS=$(usex test)
+ -DVEXCL_INSTALL_CL_HPP=$(usex clhpp)
+ )
+# -DVEXCL_CLOGS=$(usex clogs)
+
+ cmake_src_configure
+}
+
+src_compile() {
+ cmake_src_compile
+ docs_compile
+}
+
+src_install() {
+ cmake_src_install
+ if use doc; then
+ dodoc -r docs/html
+ docompress -x "/usr/share/doc/${P}/html"
+ fi
+ if use examples; then
+ dodoc -r examples
+ docompress -x "/usr/share/doc/${P}/examples"
+ fi
+}