Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/dealii/
Date: Fri, 11 May 2018 22:16:19
Message-Id: 1526076719.7508ba371a633fc9e06c10557a8a022d1d052378.tamiko@gentoo
1 commit: 7508ba371a633fc9e06c10557a8a022d1d052378
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Fri May 11 22:11:59 2018 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Fri May 11 22:11:59 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=7508ba37
7
8 sci-libs/dealii: version bump to 9.0.0
9
10 Package-Manager: Portage-2.3.36, Repoman-2.3.9
11
12 sci-libs/dealii/dealii-9.0.0.ebuild | 144 ++++++++++++++++++++++++++++++++++++
13 1 file changed, 144 insertions(+)
14
15 diff --git a/sci-libs/dealii/dealii-9.0.0.ebuild b/sci-libs/dealii/dealii-9.0.0.ebuild
16 new file mode 100644
17 index 000000000..6992d107a
18 --- /dev/null
19 +++ b/sci-libs/dealii/dealii-9.0.0.ebuild
20 @@ -0,0 +1,144 @@
21 +# Copyright 1999-2018 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=6
25 +
26 +inherit cmake-utils eutils multilib
27 +
28 +# deal.II uses its own FindLAPACK.cmake file that calls into the system
29 +# FindLAPACK.cmake module and does additional internal setup. Do not remove
30 +# any of these modules:
31 +CMAKE_REMOVE_MODULES_LIST=""
32 +
33 +DESCRIPTION="Solving partial differential equations with the finite element method"
34 +HOMEPAGE="http://www.dealii.org/"
35 +
36 +if [[ ${PV} = *9999* ]]; then
37 + inherit git-r3
38 + EGIT_REPO_URI="https://github.com/dealii/dealii.git"
39 + SRC_URI=""
40 + KEYWORDS=""
41 +else
42 + MY_PV="${PV//0_rc/rc}"
43 + MY_P="${PN}-${MY_PV}"
44 + SRC_URI="https://github.com/dealii/dealii/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz
45 + doc? (
46 + https://github.com/${PN}/${PN}/releases/download/v${MY_PV}/${MY_P}-offline_documentation.tar.gz
47 + -> ${P}-offline_documentation.tar.gz
48 + )"
49 + KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
50 + S="${WORKDIR}/${PN}-${MY_PV}"
51 +fi
52 +
53 +LICENSE="LGPL-2.1+"
54 +SLOT="0"
55 +IUSE="
56 + adolc assimp arpack cpu_flags_x86_avx cpu_flags_x86_sse2 cuda +debug
57 + doc +examples gmsh +gsl hdf5 +lapack metis mpi muparser nanoflann
58 + opencascade netcdf p4est petsc scalapack slepc +sparse static-libs
59 + sundials +tbb trilinos
60 +"
61 +
62 +# TODO: add slepc use flag once slepc is packaged for gentoo-science
63 +REQUIRED_USE="
64 + p4est? ( mpi )
65 + slepc? ( petsc )
66 + trilinos? ( mpi )"
67 +
68 +RDEPEND="dev-libs/boost
69 + app-arch/bzip2
70 + sys-libs/zlib
71 + adolc? ( sci-libs/adolc )
72 + arpack? ( sci-libs/arpack[mpi=] )
73 + assimp? ( media-libs/assimp )
74 + cuda? ( dev-util/nvidia-cuda-sdk )
75 + gmsh? ( sci-libs/gmsh )
76 + gsl? ( sci-libs/gsl )
77 + hdf5? ( sci-libs/hdf5[mpi=] )
78 + lapack? ( virtual/lapack )
79 + metis? ( >=sci-libs/parmetis-4 )
80 + mpi? ( virtual/mpi )
81 + muparser? ( dev-cpp/muParser )
82 + nanoflann? ( sci-libs/nanoflann )
83 + netcdf? ( sci-libs/netcdf-cxx:0 )
84 + opencascade? ( sci-libs/opencascade:* )
85 + p4est? ( sci-libs/p4est[mpi] )
86 + petsc? ( sci-mathematics/petsc[mpi=] )
87 + scalapack? ( sci-libs/scalapack )
88 + slepc? ( sci-mathematics/slepc[mpi=] )
89 + sparse? ( sci-libs/umfpack )
90 + sundials? ( sci-libs/sundials )
91 + tbb? ( dev-cpp/tbb )
92 + trilinos? ( sci-libs/trilinos )"
93 +
94 +DEPEND="${RDEPEND}
95 + virtual/pkgconfig
96 + doc? ( app-doc/doxygen[dot] dev-lang/perl )"
97 +
98 +src_configure() {
99 + # deal.II needs a custom build type:
100 + local CMAKE_BUILD_TYPE=$(usex debug DebugRelease Release)
101 +
102 + local mycmakeargs=(
103 + -DDEAL_II_PACKAGE_VERSION=9999
104 + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF
105 + -DDEAL_II_ALLOW_AUTODETECTION=OFF
106 + -DDEAL_II_ALLOW_BUNDLED=OFF
107 + -DDEAL_II_ALLOW_PLATFORM_INTROSPECTION=OFF
108 + -DDEAL_II_COMPILE_EXAMPLES=OFF
109 + -DDEAL_II_DOCHTML_RELDIR="share/doc/${P}/html"
110 + -DDEAL_II_DOCREADME_RELDIR="share/doc/${P}"
111 + -DDEAL_II_COMPILE_EXAMPLES=OFF
112 + -DDEAL_II_EXAMPLES_RELDIR="share/doc/${P}/examples"
113 + -DDEAL_II_LIBRARY_RELDIR="$(get_libdir)"
114 + -DDEAL_II_SHARE_RELDIR="share/${PN}"
115 + -DDEAL_II_WITH_BZIP2=ON
116 + -DDEAL_II_WITH_ZLIB=ON
117 + -DDEAL_II_WITH_ADOLC="$(usex adolc)"
118 + -DDEAL_II_WITH_ASSIMP="$(usex assimp)"
119 + -DDEAL_II_WITH_ARPACK="$(usex arpack)"
120 + -DDEAL_II_HAVE_AVX="$(usex cpu_flags_x86_avx)"
121 + -DDEAL_II_WITH_CUDA="$(usex cuda)"
122 + -DDEAL_II_HAVE_SSE2="$(usex cpu_flags_x86_sse2)"
123 + -DDEAL_II_COMPONENT_DOCUMENTATION="$(usex doc)"
124 + -DDEAL_II_COMPONENT_EXAMPLES="$(usex examples)"
125 + -DDEAL_II_WITH_GMSH="$(usex gmsh)"
126 + -DDEAL_II_WITH_GSL="$(usex gsl)"
127 + -DDEAL_II_WITH_HDF5="$(usex hdf5)"
128 + -DDEAL_II_WITH_LAPACK="$(usex lapack)"
129 + -DDEAL_II_WITH_METIS="$(usex metis)"
130 + -DDEAL_II_WITH_MPI="$(usex mpi)"
131 + -DDEAL_II_WITH_MUPARSER="$(usex muparser)"
132 + -DDEAL_II_WITH_NANOFLANN="$(usex nanoflann)"
133 + -DDEAL_II_WITH_NETCDF="$(usex netcdf)"
134 + -DOPENCASCADE_DIR="${CASROOT}"
135 + -DDEAL_II_WITH_OPENCASCADE="$(usex opencascade)"
136 + -DDEAL_II_WITH_P4EST="$(usex p4est)"
137 + -DDEAL_II_WITH_PETSC="$(usex petsc)"
138 + -DDEAL_II_WITH_SCALAPACK="$(usex scalapack)"
139 + -DDEAL_II_WITH_SLEPC="$(usex slepc)"
140 + -DDEAL_II_WITH_SUNDIALS="$(usex sundials)"
141 + -DDEAL_II_WITH_UMFPACK="$(usex sparse)"
142 + -DBUILD_SHARED_LIBS="$(usex !static-libs)"
143 + -DDEAL_II_PREFER_STATIC_LIBS="$(usex static-libs)"
144 + -DDEAL_II_WITH_THREADS="$(usex tbb)"
145 + -DDEAL_II_WITH_TRILINOS="$(usex trilinos)"
146 + )
147 + cmake-utils_src_configure
148 +}
149 +
150 +src_install() {
151 + if use doc && [[ ${PV} != *9999* ]]; then
152 + # copy missing images to the build directory:
153 + cp -r "${WORKDIR}"/doc/doxygen/deal.II/images \
154 + "${BUILD_DIR}"/doc/doxygen/deal.II || die
155 + # replace links:
156 + sed -i \
157 + 's#"http://www.dealii.org/images/steps/developer/\(step-.*\)"#"images/\1"#g' \
158 + "${BUILD_DIR}"/doc/doxygen/deal.II/step_*.html || die "sed failed"
159 + fi
160 + cmake-utils_src_install
161 +
162 + # decompress the installed example sources:
163 + use examples && docompress -x /usr/share/doc/${PF}/examples
164 +}