aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Barbieri <lssndrbarbieri@gmail.com>2021-05-12 16:58:24 +0200
committerAlessandro Barbieri <lssndrbarbieri@gmail.com>2021-05-12 16:58:24 +0200
commit052f2c8bff49e935e7850ba112742cc9cdf4a9b4 (patch)
tree6c655c67cfe1234a5f2470e7c167e29549fe6584 /dev-cpp/vexcl
parentdev-cpp/vexcl: new package WIP (diff)
downloadguru-052f2c8bff49e935e7850ba112742cc9cdf4a9b4.tar.gz
guru-052f2c8bff49e935e7850ba112742cc9cdf4a9b4.tar.bz2
guru-052f2c8bff49e935e7850ba112742cc9cdf4a9b4.zip
dev-cpp/vexcl: improvements
someone practical with docs eclass should review Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'dev-cpp/vexcl')
-rw-r--r--dev-cpp/vexcl/metadata.xml9
-rw-r--r--dev-cpp/vexcl/vexcl-1.4.2-r1.ebuild74
-rw-r--r--dev-cpp/vexcl/vexcl-1.4.2.ebuild30
3 files changed, 83 insertions, 30 deletions
diff --git a/dev-cpp/vexcl/metadata.xml b/dev-cpp/vexcl/metadata.xml
index 7f91bd111..f9645efc3 100644
--- a/dev-cpp/vexcl/metadata.xml
+++ b/dev-cpp/vexcl/metadata.xml
@@ -14,4 +14,13 @@
</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="compute">Use Boost.Compute algorithms</flag>
+ <!--<flag name="cuda">Use CUDA as backend</flag>-->
+ <flag name="jit">Use the JIT backend</flag>
+ <flag name="opencl">Use OpenCL as backend</flag>
+ </use>
</pkgmetadata>
diff --git a/dev-cpp/vexcl/vexcl-1.4.2-r1.ebuild b/dev-cpp/vexcl/vexcl-1.4.2-r1.ebuild
new file mode 100644
index 000000000..4385b24d4
--- /dev/null
+++ b/dev-cpp/vexcl/vexcl-1.4.2-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+#DOCS_AUTODOC=0
+DOCS_BUILDER="sphinx"
+DOCS_DEPEND="dev-python/sphinx-bootstrap-theme"
+DOCS_DIR="docs"
+PYTHON_COMPAT=( python3_{7..9} )
+
+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="amdsi clhpp compute examples jit +opencl test" #cuda clogs
+REQUIRED_USE="^^ ( compute jit opencl )" #cuda
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ compute? ( dev-libs/boost:= )
+ jit? ( virtual/opencl )
+ opencl? ( virtual/opencl )
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ default
+ sed -e "s|git_version()|${PV}|g" -i docs/conf.py || die
+ cmake_src_prepare
+}
+
+src_configure() {
+ local backend
+# use && backend="All"
+ use compute && backend="Compute"
+# use cuda && backend="CUDA"
+ use jit && backend="JIT"
+ use 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
+}
diff --git a/dev-cpp/vexcl/vexcl-1.4.2.ebuild b/dev-cpp/vexcl/vexcl-1.4.2.ebuild
deleted file mode 100644
index 8190e38bb..000000000
--- a/dev-cpp/vexcl/vexcl-1.4.2.ebuild
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake
-
-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"
-#TODO: cuda doc test
-IUSE="examples"
-
-RDEPEND="
- dev-libs/boost:=
- virtual/opencl
-"
-DEPEND="${RDEPEND}"
-
-src_install() {
- cmake_src_install
- if use examples; then
- dodoc -r examples
- docompress -x "/usr/share/doc/${P}/examples"
- fi
-}