commit:     662b1d47f120c864843cb45541ec09d47bf5fd64
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 28 16:58:56 2025 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Mon Jul 28 17:22:39 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=662b1d47

sci-libs/dealii: add 9.7.0

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

 sci-libs/dealii/Manifest            |   2 +
 sci-libs/dealii/dealii-9.7.0.ebuild | 175 ++++++++++++++++++++++++++++++++++++
 2 files changed, 177 insertions(+)

diff --git a/sci-libs/dealii/Manifest b/sci-libs/dealii/Manifest
index 6254565ddb3b..45b5019e4d99 100644
--- a/sci-libs/dealii/Manifest
+++ b/sci-libs/dealii/Manifest
@@ -2,3 +2,5 @@ DIST dealii-9.5.0-offline_documentation.tar.gz 412499027 
BLAKE2B 521aa2488d84d48
 DIST dealii-9.5.0-offline_documentation.tar.gz.asc 246 BLAKE2B 
0a570885e80ad09ff154532b71c07e33894e93c96b3bca48dc8aae0b308883518cbb5eca57658c4e13de47efba47c3cb20bf376482ef7a26c6c0da93ee4dd689
 SHA512 
b63a9a0504fe5266b448ffda74e1d85ad5b6f344535c5b5f11d209546b51bb916ad69504ce5e4f1fd2287407c2d3d98a20b01bd830e8d45f510a85b7a057a8d5
 DIST dealii-9.6.2.tar.gz 40863604 BLAKE2B 
5214b9cfd78e48f2588046b1a3d68837f9d856191c77d179c384ddaa524a464bd2cd9eef6597bdc036e9fa7121843c048ff035fa926aa67a1a15e1c1f85f276e
 SHA512 
79fe3c3baba4bcb479f30ae863e577e64d0a6ea488172a9d6bacecf1e5ec845f47eff9a8bf3cb4651e6803b9b0c38dc32ca745abc64737d66aedf7ec73c2e362
 DIST dealii-9.6.2.tar.gz.asc 246 BLAKE2B 
067b15614652e26a4ec16f8afc8b6842fbb8221b9840c54304611a0dcbedb9073209307bc2248e7b902738b3c120b31688df71b53efd8f603135b033811a8f53
 SHA512 
4845e485cf1f5b24efde38cd0da91a265e5dd73c81b5099e6638ee917e7e43c842688dac5388e0ec3306eae0aba28dac25ccc88f0d1680a9150d88aae4a6d6ee
+DIST dealii-9.7.0-offline_documentation.tar.gz 469694580 BLAKE2B 
e075151d11b1b9ae5e65aaab53e98b61ec4cb9ccccc76964e61427967b3a7704c3ddc47ad96efac0b2e96463fb9f1467ca085a97113ac761eba98106683c3e97
 SHA512 
528c01778ef6e2868f17dbf394583b64aba274e997336b718208cac7b71bfc1e587c5239e5ba798f758423eb843b6fd2a1d50277e117fa103d10f48f65e13f22
+DIST dealii-9.7.0.tar.gz 42313338 BLAKE2B 
160eb200c22fcb083a91306dcbab1d223d145d6aa6f086d8ba1551e62f6bab7738319fd23c93bdff856bc3fbe2c5531515c790d199de875df4beb81d93550b07
 SHA512 
fd640a7b4003627e6c57915bb99b0eac3597e92c9bdbdf2c9a9ca5f1c65aa703c61ad142b0682e67eb9b81f1d0647d1f247a0fd125e93a351b970cc697735c0c

diff --git a/sci-libs/dealii/dealii-9.7.0.ebuild 
b/sci-libs/dealii/dealii-9.7.0.ebuild
new file mode 100644
index 000000000000..1a601a25d1de
--- /dev/null
+++ b/sci-libs/dealii/dealii-9.7.0.ebuild
@@ -0,0 +1,175 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# deal.II uses its own FindLAPACK.cmake file that calls into the system
+# FindLAPACK.cmake module and does additional internal setup. Do not remove
+# any of these modules:
+CMAKE_REMOVE_MODULES_LIST=""
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="Solving partial differential equations with the finite element 
method"
+HOMEPAGE="https://www.dealii.org/";
+
+if [[ ${PV} = *9999* ]]; then
+       inherit git-r3
+       EGIT_REPO_URI="https://github.com/dealii/dealii.git";
+else
+       
SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz
+               doc? (
+                       
https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}-offline_documentation.tar.gz
+                       )"
+       KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+fi
+
+LICENSE="LGPL-2.1+"
+SLOT="0"
+IUSE="
+       adolc arborx assimp arpack cgal cpu_flags_x86_avx cpu_flags_x86_avx512f
+       cpu_flags_x86_sse2 +debug doc +examples ginkgo gmsh +gsl hdf5 int64
+       +lapack metis mpi mumps muparser opencascade p4est petsc scalapack slepc
+       +sparse sundials symengine trilinos vtk
+"
+
+# TODO: add slepc use flag once slepc is packaged for gentoo-science
+REQUIRED_USE="
+       arborx? ( trilinos )
+       p4est? ( mpi )
+       slepc? ( petsc )
+       trilinos? ( mpi )"
+
+RDEPEND="dev-libs/boost:=
+       app-arch/bzip2
+       sys-libs/zlib
+       dev-cpp/magic_enum:=
+       dev-cpp/taskflow:=
+       arborx? ( sci-libs/arborx[mpi=] )
+       adolc? ( sci-libs/adolc )
+       arpack? ( sci-libs/arpack[mpi=] )
+       assimp? ( media-libs/assimp:= )
+       cgal? ( sci-mathematics/cgal )
+       ginkgo? ( sci-libs/ginkgo )
+       gmsh? ( sci-libs/gmsh )
+       gsl? ( sci-libs/gsl:= )
+       hdf5? ( sci-libs/hdf5:=[mpi=] )
+       lapack? ( virtual/lapack )
+       metis? (
+               >=sci-libs/metis-5
+               mpi? ( >=sci-libs/parmetis-4 )
+       )
+       mpi? ( virtual/mpi[cxx] )
+       mumps? ( sci-libs/mumps[mpi] )
+       muparser? ( dev-cpp/muParser )
+       opencascade? ( sci-libs/opencascade:= )
+       p4est? ( sci-libs/p4est[mpi] )
+       petsc? ( sci-mathematics/petsc[mpi=,int64?] )
+       scalapack? ( sci-libs/scalapack )
+       slepc? ( sci-mathematics/slepc[mpi=] )
+       sparse? ( sci-libs/umfpack )
+       sundials? ( sci-libs/sundials:= )
+       symengine? ( >=sci-libs/symengine-0.4:= )
+       trilinos? ( sci-libs/trilinos )
+       vtk? ( sci-libs/vtk )
+       || (
+               dev-cpp/kokkos
+               sci-libs/trilinos
+       )
+       "
+
+DEPEND="${RDEPEND}
+       virtual/pkgconfig
+       doc? ( app-text/doxygen[dot] dev-lang/perl )"
+
+PATCHES=(
+)
+
+src_configure() {
+       # deal.II needs a custom build type:
+       local CMAKE_BUILD_TYPE=$(usex debug DebugRelease Release)
+
+       local mycmakeargs=(
+               -DDEAL_II_PACKAGE_VERSION="${PV}"
+               -DCMAKE_CXX_STANDARD="20"
+               -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF
+               -DDEAL_II_ALLOW_AUTODETECTION=OFF
+               -DDEAL_II_ALLOW_BUNDLED=OFF
+               -DDEAL_II_ALLOW_PLATFORM_INTROSPECTION=OFF
+               -DDEAL_II_COMPILE_EXAMPLES=OFF
+               -DDEAL_II_DOCHTML_RELDIR="share/doc/${PF}/html"
+               -DDEAL_II_DOCREADME_RELDIR="share/doc/${PF}"
+               -DDEAL_II_COMPILE_EXAMPLES=OFF
+               -DDEAL_II_EXAMPLES_RELDIR="share/doc/${PF}/examples"
+               -DDEAL_II_LIBRARY_RELDIR="$(get_libdir)"
+               -DDEAL_II_SHARE_RELDIR="share/${PN}"
+               -DDEAL_II_COMPONENT_DOCUMENTATION="$(usex doc)"
+               -DDEAL_II_COMPONENT_EXAMPLES="$(usex examples)"
+               -DDEAL_II_WITH_64BIT_INDICES="$(usex int64)"
+               -DDEAL_II_WITH_ADOLC="$(usex adolc)"
+               -DDEAL_II_WITH_ARBORX="$(usex arborx)"
+               -DDEAL_II_WITH_ARPACK="$(usex arpack)"
+               -DDEAL_II_WITH_ASSIMP="$(usex assimp)"
+               -DDEAL_II_WITH_CGAL="$(usex cgal)"
+               -DDEAL_II_WITH_COMPLEX_VALUES=ON
+               -DDEAL_II_WITH_GINKGO="$(usex ginkgo)"
+               -DDEAL_II_WITH_GMSH="$(usex gmsh)"
+               -DDEAL_II_WITH_GSL="$(usex gsl)"
+               -DDEAL_II_WITH_HDF5="$(usex hdf5)"
+               -DDEAL_II_WITH_LAPACK="$(usex lapack)"
+               -DDEAL_II_WITH_MAGIC_ENUM=ON
+               -DDEAL_II_WITH_METIS="$(usex metis)"
+               -DDEAL_II_WITH_MPI="$(usex mpi)"
+               -DDEAL_II_WITH_MUMPS="$(usex mumps)"
+               -DDEAL_II_WITH_MUPARSER="$(usex muparser)"
+               -DDEAL_II_WITH_OPENCASCADE="$(usex opencascade)"
+               -DDEAL_II_WITH_P4EST="$(usex p4est)"
+               -DDEAL_II_WITH_PETSC="$(usex petsc)"
+               -DDEAL_II_WITH_SCALAPACK="$(usex scalapack)"
+               -DDEAL_II_WITH_SLEPC="$(usex slepc)"
+               -DDEAL_II_WITH_SUNDIALS="$(usex sundials)"
+               -DDEAL_II_WITH_SYMENGINE="$(usex symengine)"
+               -DDEAL_II_WITH_TASKFLOW=ON
+               -DDEAL_II_WITH_TBB=OFF
+               -DDEAL_II_WITH_TRILINOS="$(usex trilinos)"
+               -DDEAL_II_WITH_UMFPACK="$(usex sparse)"
+               -DDEAL_II_WITH_VTK="$(usex vtk)"
+               -DDEAL_II_WITH_ZLIB=ON
+       )
+
+       use opencascade && mycmakeargs+=(
+               -DCMAKE_PREFIX_PATH="/usr/$(get_libdir)/opencascade"
+       )
+
+       # Do a little dance for purely cosmetic QA reasons. The build system
+       # does query for the highest instruction set first and skips the other
+       # variables if a "higher" variant is set
+       if use cpu_flags_x86_avx512f; then
+               mycmakeargs+=( -DDEAL_II_HAVE_AVX512=yes )
+               append-cxxflags "-mavx512f"
+       elif use cpu_flags_x86_avx; then
+               mycmakeargs+=( -DDEAL_II_HAVE_AVX=yes )
+               append-cxxflags "-mavx2"
+       elif use cpu_flags_x86_avx; then
+               mycmakeargs+=( -DDEAL_II_HAVE_SSE2=yes )
+               append-cxxflags "-msse2"
+       fi
+
+       cmake_src_configure
+}
+
+src_install() {
+       if use doc && [[ ${PV} != *9999* ]]; then
+               # copy missing images to the build directory:
+               cp -r "${WORKDIR}"/doc/doxygen/deal.II/images \
+                       "${BUILD_DIR}"/doc/doxygen/deal.II || die
+               # replace links:
+               sed -i \
+                       
's#"http://www.dealii.org/images/steps/developer/\(step-.*\)"#"images/\1"#g' \
+                       "${BUILD_DIR}"/doc/doxygen/deal.II/step_*.html || die 
"sed failed"
+       fi
+       cmake_src_install
+
+       # decompress the installed example sources:
+       use examples && docompress -x /usr/share/doc/${PF}/examples
+}

Reply via email to