[gentoo-commits] repo/gentoo:master commit in: sci-libs/ginkgo/, sci-libs/ginkgo/files/
commit: 4408dc6855b61b1849f78825afabf3d853da18d3 Author: Matthias Maier gentoo org> AuthorDate: Tue Jun 20 01:49:09 2023 + Commit: Matthias Maier gentoo org> CommitDate: Tue Jun 20 01:49:09 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4408dc68 sci-libs/ginkgo: fix compilation with clang and libc++, avoid automagic deps Signed-off-by: Matthias Maier gentoo.org> ...nkgo-1.6.0-disable_automagic_dependencies.patch | 24 ++ .../files/ginkgo-1.6.0-fix_type_mismatch.patch | 12 +++ sci-libs/ginkgo/ginkgo-1.6.0.ebuild| 5 + 3 files changed, 41 insertions(+) diff --git a/sci-libs/ginkgo/files/ginkgo-1.6.0-disable_automagic_dependencies.patch b/sci-libs/ginkgo/files/ginkgo-1.6.0-disable_automagic_dependencies.patch new file mode 100644 index ..c910ad92c5a9 --- /dev/null +++ b/sci-libs/ginkgo/files/ginkgo-1.6.0-disable_automagic_dependencies.patch @@ -0,0 +1,24 @@ +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 41ed77d900..9a0c7d5128 100644 +--- a/examples/CMakeLists.txt b/examples/CMakeLists.txt +@@ -40,8 +40,7 @@ if(GINKGO_BUILD_EXTLIB_EXAMPLE) + list(APPEND EXAMPLES_LIST external-lib-interfacing) + endif() + +-find_package(OpenCV QUIET) +-if(OpenCV_FOUND) ++if(FALSE) + list(APPEND EXAMPLES_LIST heat-equation schroedinger-splitting) + else() + message(STATUS "No OpenCV found, disabling examples with video output") +@@ -55,8 +54,7 @@ if(GINKGO_BUILD_MPI) + list(APPEND EXAMPLES_LIST distributed-solver) + endif() + +-find_package(Kokkos QUIET) +-if(Kokkos_FOUND) ++if(FALSE) + if(GINKGO_WITH_CCACHE) + message(WARNING "The CMAKE_CXX_COMPILER_LAUNCHER is set due to " + "GINKGO_WITH_CCACHE=ON which is known to casue issues with CUDA enabled " diff --git a/sci-libs/ginkgo/files/ginkgo-1.6.0-fix_type_mismatch.patch b/sci-libs/ginkgo/files/ginkgo-1.6.0-fix_type_mismatch.patch new file mode 100644 index ..d248fe87f2d7 --- /dev/null +++ b/sci-libs/ginkgo/files/ginkgo-1.6.0-fix_type_mismatch.patch @@ -0,0 +1,12 @@ +diff --git a/core/base/timer.cpp b/core/base/timer.cpp +index bc1c716..0185567 100644 +--- a/core/base/timer.cpp b/core/base/timer.cpp +@@ -124,7 +124,7 @@ void CpuTimer::wait(time_point& time) {} + std::chrono::nanoseconds CpuTimer::difference_async(const time_point& start, + const time_point& stop) + { +-return std::chrono::duration_cast( ++return std::chrono::duration_cast( + stop.data_.chrono - start.data_.chrono); + } diff --git a/sci-libs/ginkgo/ginkgo-1.6.0.ebuild b/sci-libs/ginkgo/ginkgo-1.6.0.ebuild index 00081e5e00a7..4cceeb06c5b6 100644 --- a/sci-libs/ginkgo/ginkgo-1.6.0.ebuild +++ b/sci-libs/ginkgo/ginkgo-1.6.0.ebuild @@ -26,6 +26,11 @@ RDEPEND=" " DEPEND="${RDEPEND}" +PATCHES=( + "${FILESDIR}"/${P}-fix_type_mismatch.patch + "${FILESDIR}"/${P}-disable_automagic_dependencies.patch +) + pkg_pretend() { [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp }
[gentoo-commits] repo/gentoo:master commit in: sci-libs/ginkgo/, sci-libs/ginkgo/files/
commit: be8b6a8f9aa5c220c163e99b37aa1183daf1c5e1 Author: Matthias Maier gentoo org> AuthorDate: Thu Apr 30 21:03:30 2020 + Commit: Matthias Maier gentoo org> CommitDate: Thu Apr 30 22:06:04 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be8b6a8f sci-libs/ginkgo: improve ebuild Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Matthias Maier gentoo.org> .../ginkgo/files/ginkgo-1.1.1-set_soname.patch | 14 + ...{ginkgo-1.1.1.ebuild => ginkgo-1.1.1-r1.ebuild} | 32 +++- sci-libs/ginkgo/ginkgo-.ebuild | 34 +++--- sci-libs/ginkgo/metadata.xml | 1 + 4 files changed, 63 insertions(+), 18 deletions(-) diff --git a/sci-libs/ginkgo/files/ginkgo-1.1.1-set_soname.patch b/sci-libs/ginkgo/files/ginkgo-1.1.1-set_soname.patch new file mode 100644 index 000..9feceee00f7 --- /dev/null +++ b/sci-libs/ginkgo/files/ginkgo-1.1.1-set_soname.patch @@ -0,0 +1,14 @@ +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 diff --git a/sci-libs/ginkgo/ginkgo-1.1.1.ebuild b/sci-libs/ginkgo/ginkgo-1.1.1-r1.ebuild similarity index 51% rename from sci-libs/ginkgo/ginkgo-1.1.1.ebuild rename to sci-libs/ginkgo/ginkgo-1.1.1-r1.ebuild index a3c8615833d..5348b9a51be 100644 --- a/sci-libs/ginkgo/ginkgo-1.1.1.ebuild +++ b/sci-libs/ginkgo/ginkgo-1.1.1-r1.ebuild @@ -8,19 +8,34 @@ inherit cmake-utils 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} = ** ]]; 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 \ @@ -38,7 +53,8 @@ src_configure() { -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 } diff --git a/sci-libs/ginkgo/ginkgo-.ebuild b/sci-libs/ginkgo/ginkgo-.ebuild index 3b9102d2165..5348b9a51be 100644 --- a/sci-libs/ginkgo/ginkgo-.ebuild +++ b/sci-libs/ginkgo/ginkgo-.ebuild @@ -8,21 +8,34 @@ inherit cmake-utils 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} = ** ]]; 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 \ @@ -40,7 +53,8 @@ src_configure() { -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_BENCHMARKS=OFF -DGINKGO_BUILD_REFERENCE=ON -