--- /dev/null
+diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake
+index 8a8ad04..03c6db6 100644
+--- a/cmake/build_helpers.cmake
++++ b/cmake/build_helpers.cmake
+@@ -17,6 +17,9 @@ function(ginkgo_compile_features name)
+ if(GINKGO_WITH_IWYU AND GINKGO_IWYU_PATH)
+ set_property(TARGET "${name}" PROPERTY CXX_INCLUDE_WHAT_YOU_USE ${GINKGO_IWYU_PATH})
+ endif()
++ # Set an appropriate SONAME
++ set_property(TARGET "${name}" PROPERTY
++ SOVERSION "${Ginkgo_VERSION}")
+ if(GINKGO_CHANGED_SHARED_LIBRARY)
+ # Put all shared libraries and corresponding imported libraries into the specified path
+ set_property(TARGET "${name}" PROPERTY
DESCRIPTION="Numerical linear algebra software package"
HOMEPAGE="https://ginkgo-project.github.io/"
-SRC_URI="https://github.com/${PN}-project/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-KEYWORDS="~amd64 ~x86"
+if [[ ${PV} = *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/ginkgo-project/ginkgo"
+ SRC_URI=""
+ KEYWORDS=""
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}-project/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
LICENSE="BSD-with-attribution"
SLOT="0"
-IUSE=""
+IUSE="+openmp cuda"
-# TODO: add slepc use flag once slepc is packaged for gentoo-science
-REQUIRED_USE=""
+RDEPEND="
+ cuda? ( dev-util/nvidia-cuda-sdk )"
+DEPEND="${RDEPEND}"
-RDEPEND=""
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.1-set_soname.patch
+)
-DEPEND=""
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] && \
+ use openmp && ! tc-has-openmp ; then
+ die "Need an OpenMP capable compiler"
+ fi
+}
src_prepare() {
sed -i \
-DGINKGO_BUILD_TESTS=OFF
-DGINKGO_BUILD_BENCHMARKS=OFF
-DGINKGO_BUILD_REFERENCE=ON
- -DGINKGO_BUILD_OMP=ON
+ -DGINKGO_BUILD_OMP="$(usex openmp)"
+ -DGINKGO_BUILD_CUDA="$(usex cuda)"
)
cmake-utils_src_configure
}
DESCRIPTION="Numerical linear algebra software package"
HOMEPAGE="https://ginkgo-project.github.io/"
-inherit git-r3
-EGIT_REPO_URI="https://github.com/ginkgo-project/ginkgo"
-SRC_URI=""
-KEYWORDS=""
+if [[ ${PV} = *9999* ]]; then
+ EGIT_REPO_URI="https://github.com/ginkgo-project/ginkgo"
+ SRC_URI=""
+ KEYWORDS=""
+ inherit git-r3
+else
+ SRC_URI="https://github.com/${PN}-project/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
LICENSE="BSD-with-attribution"
SLOT="0"
-IUSE=""
+IUSE="+openmp cuda"
-# TODO: add slepc use flag once slepc is packaged for gentoo-science
-REQUIRED_USE=""
+RDEPEND="
+ cuda? ( dev-util/nvidia-cuda-sdk )"
+DEPEND="${RDEPEND}"
-RDEPEND=""
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.1.1-set_soname.patch
+)
-DEPEND=""
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] && \
+ use openmp && ! tc-has-openmp ; then
+ die "Need an OpenMP capable compiler"
+ fi
+}
src_prepare() {
sed -i \
-DGINKGO_BUILD_TESTS=OFF
-DGINKGO_BUILD_BENCHMARKS=OFF
-DGINKGO_BUILD_REFERENCE=ON
- -DGINKGO_BUILD_OMP=ON
+ -DGINKGO_BUILD_OMP="$(usex openmp)"
+ -DGINKGO_BUILD_CUDA="$(usex cuda)"
)
cmake-utils_src_configure
}
implemented using modern C++, with GPU kernels implemented in CUDA.
</longdescription>
<use>
+ <flag name="cuda">Add support for cuda assimp (<pkg>dev-util/nvidia-cuda-sdk</pkg>)</flag>
</use>
<upstream>
<remote-id type="github">ginkgo-project/ginkgo</remote-id>