public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-libs/ginkgo/, sci-libs/ginkgo/files/
@ 2020-04-30 22:07 Matthias Maier
  0 siblings, 0 replies; 3+ messages in thread
From: Matthias Maier @ 2020-04-30 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     be8b6a8f9aa5c220c163e99b37aa1183daf1c5e1
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 30 21:03:30 2020 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Thu Apr 30 22:06:04 2020 +0000
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 <tamiko <AT> 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-9999.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 00000000000..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} = *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 \
@@ -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-9999.ebuild b/sci-libs/ginkgo/ginkgo-9999.ebuild
index 3b9102d2165..5348b9a51be 100644
--- a/sci-libs/ginkgo/ginkgo-9999.ebuild
+++ b/sci-libs/ginkgo/ginkgo-9999.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} = *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 \
@@ -40,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/metadata.xml b/sci-libs/ginkgo/metadata.xml
index e67b3457031..2b6a2c10b33 100644
--- a/sci-libs/ginkgo/metadata.xml
+++ b/sci-libs/ginkgo/metadata.xml
@@ -15,6 +15,7 @@
 		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>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/ginkgo/, sci-libs/ginkgo/files/
@ 2023-06-20  1:50 Matthias Maier
  0 siblings, 0 replies; 3+ messages in thread
From: Matthias Maier @ 2023-06-20  1:50 UTC (permalink / raw
  To: gentoo-commits

commit:     4408dc6855b61b1849f78825afabf3d853da18d3
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 20 01:49:09 2023 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Tue Jun 20 01:49:09 2023 +0000
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 <tamiko <AT> 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 000000000000..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 000000000000..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<std::chrono::nanoseconds, int64>(
++    return std::chrono::duration_cast<std::chrono::nanoseconds>(
+         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
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-libs/ginkgo/, sci-libs/ginkgo/files/
@ 2024-07-03 22:43 Matthias Maier
  0 siblings, 0 replies; 3+ messages in thread
From: Matthias Maier @ 2024-07-03 22:43 UTC (permalink / raw
  To: gentoo-commits

commit:     1bd01e36759108c4b10de66e03718b6360c1b4b9
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Wed Jul  3 22:23:04 2024 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Wed Jul  3 22:43:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bd01e36

sci-libs/ginkgo: add 1.8.0

Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-libs/ginkgo/Manifest                           |  1 +
 ...nkgo-1.8.0-disable_automagic_dependencies.patch | 24 +++++++++
 sci-libs/ginkgo/ginkgo-1.8.0.ebuild                | 61 ++++++++++++++++++++++
 3 files changed, 86 insertions(+)

diff --git a/sci-libs/ginkgo/Manifest b/sci-libs/ginkgo/Manifest
index 85fa14f2e7ef..4dbc70ea0a35 100644
--- a/sci-libs/ginkgo/Manifest
+++ b/sci-libs/ginkgo/Manifest
@@ -1,2 +1,3 @@
 DIST ginkgo-1.4.0.tar.gz 2574052 BLAKE2B 99677d9d75831991cac40312095d32c44bef18cd05b120d80fdb9e64ea6dc15796c09b26f35dc8230db6b55c7be4dd76efd6d1cd8ca13c83e1f3087550db0dca SHA512 9bfcb2c415c7a1a70cf8e49f20adf62d02cab83bb23b6fcecfeaeeb322b2d4e1ad8d8fa6582735073753f9a05eac8688b9bd1ff1d4203957c1a80702d117e807
 DIST ginkgo-1.6.0.tar.gz 12788830 BLAKE2B c452e20eddb3673b5863106d8a8d42aab253cb5a17cf0445194903ebadcffe53ef0df6b5f26e2602e137faaa4a23dddd0b192f3453b4bd440907385fc09d004a SHA512 507a17bc9ad010c235c4ae49ac4bef3f4d5b65b4ea02bfa5cad5ea578fa65d28f564d1faf0a1f5618a6e72d744217f58bdff68c5f1fffc9cfb484800f7f84c50
+DIST ginkgo-1.8.0.tar.gz 13140660 BLAKE2B 4b1800566ec2852b3dd7e58b01ec58e2cab45b55134fdf3d478832435c40b45320dc066d281a07127d1fc42e57c6f3d99440209d2286adc1294e44a1f660ad36 SHA512 9d121a5eec9f5d17d1bd4b8924ebb32985a68e8087addc7385b619e365ed260a40ab73eb7a8a16f46a590d3162a78c9311ff41dd3dc74a9117a61e0445d96c52

diff --git a/sci-libs/ginkgo/files/ginkgo-1.8.0-disable_automagic_dependencies.patch b/sci-libs/ginkgo/files/ginkgo-1.8.0-disable_automagic_dependencies.patch
new file mode 100644
index 000000000000..c37259e3294a
--- /dev/null
+++ b/sci-libs/ginkgo/files/ginkgo-1.8.0-disable_automagic_dependencies.patch
@@ -0,0 +1,24 @@
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index 653d52a..c56af59 100644
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -41,8 +41,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")
+@@ -56,8 +55,7 @@ if(GINKGO_BUILD_MPI)
+     list(APPEND EXAMPLES_LIST distributed-solver)
+ endif()
+ 
+-find_package(Kokkos 4.1.00 QUIET)
+-if(Kokkos_FOUND)
++if(FALSE)
+     list(APPEND EXAMPLES_LIST kokkos-assembly)
+ else()
+     message(STATUS "No Kokkos found, disabling examples with Kokkos assembly.")

diff --git a/sci-libs/ginkgo/ginkgo-1.8.0.ebuild b/sci-libs/ginkgo/ginkgo-1.8.0.ebuild
new file mode 100644
index 000000000000..5b507b79f030
--- /dev/null
+++ b/sci-libs/ginkgo/ginkgo-1.8.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake toolchain-funcs
+
+DESCRIPTION="Numerical linear algebra software package"
+HOMEPAGE="https://ginkgo-project.github.io/"
+
+if [[ ${PV} = *9999* ]]; then
+	EGIT_REPO_URI="https://github.com/ginkgo-project/ginkgo"
+	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="cuda hwloc +openmp"
+
+RDEPEND="
+	cuda? ( dev-util/nvidia-cuda-toolkit )
+	hwloc? ( sys-apps/hwloc:= )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-disable_automagic_dependencies.patch
+)
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+src_prepare() {
+	sed -i \
+		-e "s#\"lib\"#\"$(get_libdir)\"#g" \
+		-e "s#\"lib/#\"$(get_libdir)/#g" \
+		cmake/install_helpers.cmake || die "sed failed"
+
+	cmake_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DGINKGO_DEVEL_TOOLS=OFF
+		-DGINKGO_BUILD_TESTS=OFF
+		-DGINKGO_BUILD_BENCHMARKS=OFF
+		-DGINKGO_BUILD_REFERENCE=ON
+		-DGINKGO_BUILD_CUDA=$(usex cuda)
+		-DGINKGO_BUILD_HWLOC=$(usex hwloc)
+		-DGINKGO_BUILD_OMP=$(usex openmp)
+	)
+	cmake_src_configure
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-03 22:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-20  1:50 [gentoo-commits] repo/gentoo:master commit in: sci-libs/ginkgo/, sci-libs/ginkgo/files/ Matthias Maier
  -- strict thread matches above, loose matches on Subject: below --
2024-07-03 22:43 Matthias Maier
2020-04-30 22:07 Matthias Maier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox