From 052f2c8bff49e935e7850ba112742cc9cdf4a9b4 Mon Sep 17 00:00:00 2001 From: Alessandro Barbieri Date: Wed, 12 May 2021 16:58:24 +0200 Subject: [PATCH] dev-cpp/vexcl: improvements someone practical with docs eclass should review Signed-off-by: Alessandro Barbieri --- dev-cpp/vexcl/metadata.xml | 9 ++++ dev-cpp/vexcl/vexcl-1.4.2-r1.ebuild | 74 +++++++++++++++++++++++++++++ dev-cpp/vexcl/vexcl-1.4.2.ebuild | 30 ------------ 3 files changed, 83 insertions(+), 30 deletions(-) create mode 100644 dev-cpp/vexcl/vexcl-1.4.2-r1.ebuild delete mode 100644 dev-cpp/vexcl/vexcl-1.4.2.ebuild diff --git a/dev-cpp/vexcl/metadata.xml b/dev-cpp/vexcl/metadata.xml index 7f91bd111f..f9645efc36 100644 --- a/dev-cpp/vexcl/metadata.xml +++ b/dev-cpp/vexcl/metadata.xml @@ -14,4 +14,13 @@ ddemidov/vexcl + + Implement workaround for AMD SI GPUs + Install the OpenCL C++ header provided by VexCL + + Use Boost.Compute algorithms + + Use the JIT backend + Use OpenCL as backend + 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 0000000000..4385b24d4f --- /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 8190e38bb0..0000000000 --- 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 -}