1 |
commit: 53490294521a32eb37e6131b1f9931930368e70c |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 29 21:07:13 2020 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 29 21:35:37 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53490294 |
7 |
|
8 |
sci-mathematics/petsc: drop old |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
12 |
|
13 |
sci-mathematics/petsc/Manifest | 2 - |
14 |
.../files/petsc-3.12.1-do_not_run_mpiexec.patch | 32 ---- |
15 |
.../files/petsc-3.12.1-make_hypre_configure.patch | 90 ---------- |
16 |
.../files/petsc-3.9.0-fix_sandbox_violation.patch | 17 -- |
17 |
sci-mathematics/petsc/petsc-3.11.3.ebuild | 193 -------------------- |
18 |
sci-mathematics/petsc/petsc-3.12.1.ebuild | 195 --------------------- |
19 |
6 files changed, 529 deletions(-) |
20 |
|
21 |
diff --git a/sci-mathematics/petsc/Manifest b/sci-mathematics/petsc/Manifest |
22 |
index f7372ecf5e1..c224c776882 100644 |
23 |
--- a/sci-mathematics/petsc/Manifest |
24 |
+++ b/sci-mathematics/petsc/Manifest |
25 |
@@ -1,3 +1 @@ |
26 |
-DIST petsc-3.11.3.tar.gz 33279017 BLAKE2B 870b8245e5e06d8538ea3ee1d01fa2cebade4a0bd79dfcf17d74e6201f41d21ca021e206744ece28847b434ece142a2789851b5514a8a1e3f82a8551288b695b SHA512 e545f69e87bc72950939ff3cec3e0ba225a5b3e7f1cb93b0fb6123194eb7240ac1d97ba397235d8ab872c653caab1427673124e5e1e706b796c0ae46ec1bcffa |
27 |
-DIST petsc-3.12.1.tar.gz 34592587 BLAKE2B b48056a1fe1d507338f7d145f5fceeab2b2f576470d8af90c9d7828de9b775daadf11198fecc46b5e48fcf1eb38addb366e3a908dab5c4ffaf7f9b71ff17b3d8 SHA512 df33170922c0b34136d2fd5bdc3c68a80d3a5873d66bfb03b2cea4a6456393c7181a8da673911b89ea0fcb51d5fd89b5b4c8b76ddb1df573180a92d029fbc1fb |
28 |
DIST petsc-3.13.0.tar.gz 35080264 BLAKE2B 0ac58e53751dbc6e053e3591cdf2363194e0cf7a493f252d879031e0135da16fa24e66974dd7bf07ce18558a75f8dd794e87f96590ad9e550d11edfeb462f727 SHA512 0590bb63d9c6dfd6ac03b1b88e5a8c11d42a0fd014084603d4d085060b126aa4341b4ec3a4d2b12146b971da327ccc7ede370e5633282bf44f269465aea32953 |
29 |
|
30 |
diff --git a/sci-mathematics/petsc/files/petsc-3.12.1-do_not_run_mpiexec.patch b/sci-mathematics/petsc/files/petsc-3.12.1-do_not_run_mpiexec.patch |
31 |
deleted file mode 100644 |
32 |
index 9c3d5047b0a..00000000000 |
33 |
--- a/sci-mathematics/petsc/files/petsc-3.12.1-do_not_run_mpiexec.patch |
34 |
+++ /dev/null |
35 |
@@ -1,32 +0,0 @@ |
36 |
-diff --git a/config/BuildSystem/config/packages/MPI.py b/config/BuildSystem/config/packages/MPI.py |
37 |
-index c85bb504..7720eba9 100644 |
38 |
---- a/config/BuildSystem/config/packages/MPI.py |
39 |
-+++ b/config/BuildSystem/config/packages/MPI.py |
40 |
-@@ -209,26 +209,11 @@ shared libraries and run with --known-mpi-shared-libraries=1') |
41 |
- raise RuntimeError('Could not locate MPIEXEC - please specify --with-mpiexec option') |
42 |
- # Support for spaces and () in executable names; also needs to handle optional arguments at the end |
43 |
- # TODO: This support for spaces and () should be moved to core BuildSystem |
44 |
-- self.mpiexec = self.mpiexec.replace(' ', '\\ ').replace('(', '\\(').replace(')', '\\)').replace('\ -',' -') |
45 |
-- if (hasattr(self, 'ompi_major_version') and int(self.ompi_major_version) >= 3): |
46 |
-- (out, err, ret) = Configure.executeShellCommand(self.mpiexec+' -help all', checkCommand = noCheck, timeout = 10, log = self.log) |
47 |
-- if out.find('--oversubscribe') >=0: |
48 |
-- self.mpiexec = self.mpiexec + ' --oversubscribe' |
49 |
-+ self.mpiexec = self.mpiexec + ' --oversubscribe' |
50 |
- |
51 |
- # using mpiexec environmental variables make sure mpiexec matches the MPI libraries and save the variables for testing in PetscInitialize() |
52 |
- # the variable HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE is not currently used. PetscInitialize() can check the existence of the environmental variable to |
53 |
- # determine if the program has been started with the correct mpiexec (will only be set for parallel runs so not clear how to check appropriately) |
54 |
-- (out, err, ret) = Configure.executeShellCommand(self.mpiexec+' -n 1 printenv', checkCommand = noCheck, timeout = 10, log = self.log) |
55 |
-- if ret: raise RuntimeError('Unable to run '+self.mpiexec+' with option "-n 1"\n'+err) |
56 |
-- if out.find('MPIR_CVAR_CH3') > -1: |
57 |
-- if hasattr(self,'ompi_major_version'): raise RuntimeError("Your libraries are from OpenMPI but it appears your mpiexec is from MPICH"); |
58 |
-- self.addDefine('HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE', 'MPIR_CVAR_CH3') |
59 |
-- elif out.find('MPIR_CVAR_CH3') > -1: |
60 |
-- if hasattr(self,'ompi_major_version'): raise RuntimeError("Your libraries are from OpenMPI but it appears your mpiexec is from MPICH"); |
61 |
-- self.addDefine('HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE', 'MPICH') |
62 |
-- elif out.find('OMPI_COMM_WORLD_SIZE') > -1: |
63 |
-- if hasattr(self,'mpich_numversion'): raise RuntimeError("Your libraries are from MPICH but it appears your mpiexec is from OpenMPI"); |
64 |
-- self.addDefine('HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE', 'OMP') |
65 |
- self.addMakeMacro('MPIEXEC', self.mpiexec) |
66 |
- self.mpiexec = self.mpiexec + ' -n 1' |
67 |
- |
68 |
|
69 |
diff --git a/sci-mathematics/petsc/files/petsc-3.12.1-make_hypre_configure.patch b/sci-mathematics/petsc/files/petsc-3.12.1-make_hypre_configure.patch |
70 |
deleted file mode 100644 |
71 |
index 9460d57e461..00000000000 |
72 |
--- a/sci-mathematics/petsc/files/petsc-3.12.1-make_hypre_configure.patch |
73 |
+++ /dev/null |
74 |
@@ -1,90 +0,0 @@ |
75 |
-diff --git a/config/BuildSystem/config/packages/hypre.py b/config/BuildSystem/config/packages/hypre.py |
76 |
-index 869a1661..76067c8d 100644 |
77 |
---- a/config/BuildSystem/config/packages/hypre.py |
78 |
-+++ b/config/BuildSystem/config/packages/hypre.py |
79 |
-@@ -5,10 +5,6 @@ class Configure(config.package.GNUPackage): |
80 |
- def __init__(self, framework): |
81 |
- config.package.GNUPackage.__init__(self, framework) |
82 |
- self.version = '2.18.1' |
83 |
-- self.minversion = '2.14' |
84 |
-- self.versionname = 'HYPRE_RELEASE_VERSION' |
85 |
-- self.versioninclude = 'HYPRE_config.h' |
86 |
-- self.requiresversion = 1 |
87 |
- self.gitcommit = 'v'+self.version |
88 |
- self.download = ['git://https://github.com/hypre-space/hypre','https://github.com/hypre-space/hypre/archive/'+self.gitcommit+'.tar.gz'] |
89 |
- self.functions = ['HYPRE_IJMatrixCreate'] |
90 |
-diff --git a/include/petsc/private/petschypre.h b/include/petsc/private/petschypre.h |
91 |
-index 81ca7136..b403e70e 100644 |
92 |
---- a/include/petsc/private/petschypre.h |
93 |
-+++ b/include/petsc/private/petschypre.h |
94 |
-@@ -6,12 +6,6 @@ |
95 |
- #include <HYPRE_config.h> |
96 |
- #include <HYPRE_utilities.h> |
97 |
- |
98 |
--/* from version 2.16 on, HYPRE_BigInt is 64 bit for 64bit installations |
99 |
-- and 32 bit for 32bit installations -> not the best name for a variable */ |
100 |
--#if PETSC_PKG_HYPRE_VERSION_LT(2,16,0) |
101 |
--typedef PetscInt HYPRE_BigInt; |
102 |
--#endif |
103 |
-- |
104 |
- /* |
105 |
- With scalar type == real, HYPRE_Complex == PetscScalar; |
106 |
- With scalar type == complex, HYPRE_Complex is double __complex__ while PetscScalar may be std::complex<double> |
107 |
-diff --git a/src/mat/impls/hypre/mhypre.c b/src/mat/impls/hypre/mhypre.c |
108 |
-index 8e8fe678..3533b99a 100644 |
109 |
---- a/src/mat/impls/hypre/mhypre.c |
110 |
-+++ b/src/mat/impls/hypre/mhypre.c |
111 |
-@@ -15,10 +15,6 @@ |
112 |
- #include <_hypre_parcsr_ls.h> |
113 |
- #include <_hypre_sstruct_ls.h> |
114 |
- |
115 |
--#if PETSC_PKG_HYPRE_VERSION_LT(2,18,0) |
116 |
--#define hypre_ParCSRMatrixClone(A,B) hypre_ParCSRMatrixCompleteClone(A) |
117 |
--#endif |
118 |
-- |
119 |
- PETSC_INTERN PetscErrorCode MatPtAP_IS_XAIJ(Mat,Mat,MatReuse,PetscReal,Mat*); |
120 |
- |
121 |
- static PetscErrorCode MatHYPRE_CreateFromMat(Mat,Mat_HYPRE*); |
122 |
-@@ -65,7 +61,6 @@ static PetscErrorCode MatHYPRE_IJMatrixPreallocate(Mat A_d, Mat A_o, HYPRE_IJMat |
123 |
- nnz_o[i] = 0; |
124 |
- } |
125 |
- } |
126 |
--#if PETSC_PKG_HYPRE_VERSION_GE(2,16,0) |
127 |
- { /* If we don't do this, the columns of the matrix will be all zeros! */ |
128 |
- hypre_AuxParCSRMatrix *aux_matrix; |
129 |
- aux_matrix = (hypre_AuxParCSRMatrix*)hypre_IJMatrixTranslator(ij); |
130 |
-@@ -75,9 +70,6 @@ static PetscErrorCode MatHYPRE_IJMatrixPreallocate(Mat A_d, Mat A_o, HYPRE_IJMat |
131 |
- aux_matrix = (hypre_AuxParCSRMatrix*)hypre_IJMatrixTranslator(ij); |
132 |
- hypre_AuxParCSRMatrixNeedAux(aux_matrix) = 1; |
133 |
- } |
134 |
--#else |
135 |
-- PetscStackCallStandard(HYPRE_IJMatrixSetDiagOffdSizes,(ij,nnz_d,nnz_o)); |
136 |
--#endif |
137 |
- ierr = PetscFree(nnz_d);CHKERRQ(ierr); |
138 |
- ierr = PetscFree(nnz_o);CHKERRQ(ierr); |
139 |
- } |
140 |
-@@ -235,11 +227,7 @@ static PetscErrorCode MatHYPRE_IJMatrixFastCopy_MPIAIJ(Mat A, HYPRE_IJMatrix ij) |
141 |
- /* need to shift the diag column indices (hdiag->j) back to global numbering since hypre is expecting this */ |
142 |
- hjj = hdiag->j; |
143 |
- pjj = pdiag->j; |
144 |
--#if PETSC_PKG_HYPRE_VERSION_GE(2,16,0) |
145 |
- for (i=0; i<pdiag->nz; i++) hjj[i] = pjj[i]; |
146 |
--#else |
147 |
-- for (i=0; i<pdiag->nz; i++) hjj[i] = cstart + pjj[i]; |
148 |
--#endif |
149 |
- ierr = PetscArraycpy(hdiag->data,pdiag->a,pdiag->nz);CHKERRQ(ierr); |
150 |
- if (sameint) { |
151 |
- ierr = PetscArraycpy(hoffd->i,poffd->i,pA->A->rmap->n + 1);CHKERRQ(ierr); |
152 |
-@@ -249,12 +237,8 @@ static PetscErrorCode MatHYPRE_IJMatrixFastCopy_MPIAIJ(Mat A, HYPRE_IJMatrix ij) |
153 |
- |
154 |
- /* need to move the offd column indices (hoffd->j) back to global numbering since hypre is expecting this |
155 |
- If we hacked a hypre a bit more we might be able to avoid this step */ |
156 |
--#if PETSC_PKG_HYPRE_VERSION_GE(2,16,0) |
157 |
- PetscStackCallStandard(hypre_CSRMatrixBigInitialize,(hoffd)); |
158 |
- jj = (PetscInt*) hoffd->big_j; |
159 |
--#else |
160 |
-- jj = (PetscInt*) hoffd->j; |
161 |
--#endif |
162 |
- pjj = poffd->j; |
163 |
- for (i=0; i<poffd->nz; i++) jj[i] = garray[pjj[i]]; |
164 |
- |
165 |
|
166 |
diff --git a/sci-mathematics/petsc/files/petsc-3.9.0-fix_sandbox_violation.patch b/sci-mathematics/petsc/files/petsc-3.9.0-fix_sandbox_violation.patch |
167 |
deleted file mode 100644 |
168 |
index 97f8dfed4d7..00000000000 |
169 |
--- a/sci-mathematics/petsc/files/petsc-3.9.0-fix_sandbox_violation.patch |
170 |
+++ /dev/null |
171 |
@@ -1,17 +0,0 @@ |
172 |
-diff --git a/config/PETSc/options/installDir.py b/config/PETSc/options/installDir.py |
173 |
-index 92f190d..047c85b 100644 |
174 |
---- a/config/PETSc/options/installDir.py |
175 |
-+++ b/config/PETSc/options/installDir.py |
176 |
-@@ -41,12 +41,6 @@ class Configure(config.base.Configure): |
177 |
- self.dir = os.path.abspath(os.path.expanduser(self.framework.argDB['prefix'])) |
178 |
- self.petscDir = self.dir |
179 |
- self.petscArch = '' |
180 |
-- try: |
181 |
-- os.makedirs(os.path.join(self.dir,'PETScTestDirectory')) |
182 |
-- os.rmdir(os.path.join(self.dir,'PETScTestDirectory')) |
183 |
-- except: |
184 |
-- self.installSudoMessage = 'You do not have write permissions to the --prefix directory '+self.dir+'\nYou will be prompted for the sudo password for any external package installs' |
185 |
-- self.installSudo = 'sudo ' |
186 |
- else: |
187 |
- self.dir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch)) |
188 |
- self.petscDir = self.petscdir.dir |
189 |
|
190 |
diff --git a/sci-mathematics/petsc/petsc-3.11.3.ebuild b/sci-mathematics/petsc/petsc-3.11.3.ebuild |
191 |
deleted file mode 100644 |
192 |
index 50ce3b7f663..00000000000 |
193 |
--- a/sci-mathematics/petsc/petsc-3.11.3.ebuild |
194 |
+++ /dev/null |
195 |
@@ -1,193 +0,0 @@ |
196 |
-# Copyright 1999-2019 Gentoo Authors |
197 |
-# Distributed under the terms of the GNU General Public License v2 |
198 |
- |
199 |
-EAPI=7 |
200 |
- |
201 |
-PYTHON_COMPAT=( python2_7 ) |
202 |
- |
203 |
-inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs |
204 |
- |
205 |
-DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation" |
206 |
-HOMEPAGE="http://www.mcs.anl.gov/petsc/" |
207 |
-SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz" |
208 |
- |
209 |
-LICENSE="BSD-2" |
210 |
-SLOT="0" |
211 |
-KEYWORDS="~amd64 ~x86" |
212 |
-IUSE="afterimage boost complex-scalars cxx debug doc fftw |
213 |
- fortran hdf5 hypre mpi metis mumps scotch sparse superlu threads X" |
214 |
- |
215 |
-# hypre and superlu curretly exclude each other due to missing linking to hypre |
216 |
-# if both are enabled |
217 |
-REQUIRED_USE=" |
218 |
- afterimage? ( X ) |
219 |
- complex-scalars? ( !hypre !superlu ) |
220 |
- hdf5? ( mpi ) |
221 |
- hypre? ( cxx mpi !superlu ) |
222 |
- mumps? ( mpi scotch ) |
223 |
- scotch? ( mpi ) |
224 |
- superlu? ( !hypre ) |
225 |
-" |
226 |
- |
227 |
-RDEPEND=" |
228 |
- virtual/blas |
229 |
- virtual/lapack |
230 |
- afterimage? ( media-libs/libafterimage ) |
231 |
- boost? ( dev-libs/boost ) |
232 |
- fftw? ( sci-libs/fftw:3.0[mpi?] ) |
233 |
- hdf5? ( sci-libs/hdf5[mpi?] ) |
234 |
- hypre? ( >=sci-libs/hypre-2.8.0b[mpi?] ) |
235 |
- metis? ( >=sci-libs/parmetis-4 ) |
236 |
- mpi? ( virtual/mpi[cxx?,fortran?] ) |
237 |
- mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack ) |
238 |
- scotch? ( sci-libs/scotch[mpi?] ) |
239 |
- sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 ) |
240 |
- superlu? ( >=sci-libs/superlu-5 ) |
241 |
- X? ( x11-libs/libX11 ) |
242 |
-" |
243 |
- |
244 |
-DEPEND="${RDEPEND} |
245 |
- ${PYTHON_DEPS} |
246 |
- virtual/pkgconfig |
247 |
- dev-util/cmake |
248 |
-" |
249 |
- |
250 |
-PATCHES=( |
251 |
- "${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch \ |
252 |
- "${FILESDIR}"/${PN}-3.9.0-fix_sandbox_violation.patch |
253 |
-) |
254 |
- |
255 |
-src_prepare() { |
256 |
- default |
257 |
- |
258 |
- sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die |
259 |
-} |
260 |
- |
261 |
-# petsc uses --with-blah=1 and --with-blah=0 to en/disable options |
262 |
-petsc_enable() { |
263 |
- use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0" |
264 |
-} |
265 |
-# add external library: |
266 |
-# petsc_with use_flag libname libdir |
267 |
-# petsc_with use_flag libname include linking_libs |
268 |
-petsc_with() { |
269 |
- local myuse p=${2:-${1}} |
270 |
- if use ${1}; then |
271 |
- myuse="--with-${p}=1" |
272 |
- if [[ $# -ge 4 ]]; then |
273 |
- myuse="${myuse} --with-${p}-include=${EPREFIX}${3}" |
274 |
- shift 3 |
275 |
- myuse="${myuse} --with-${p}-lib=$@" |
276 |
- else |
277 |
- myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}" |
278 |
- fi |
279 |
- else |
280 |
- myuse="--with-${p}=0" |
281 |
- fi |
282 |
- echo ${myuse} |
283 |
-} |
284 |
- |
285 |
-# select between configure options depending on use flag |
286 |
-petsc_select() { |
287 |
- use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4" |
288 |
-} |
289 |
- |
290 |
-src_configure() { |
291 |
- # bug 548498 |
292 |
- # PETSc runs mpi processes during configure that result in a sandbox |
293 |
- # violation by trying to open /proc/mtrr rw. This is not easy to |
294 |
- # mitigate because it happens in libpciaccess.so called by libhwloc.so, |
295 |
- # which is used by libmpi.so. |
296 |
- addpredict /proc/mtrr |
297 |
- # if mpi is built with knem support it needs /dev/knem too |
298 |
- addpredict /dev/knem |
299 |
- |
300 |
- # configureMPITypes with openmpi-2* insists on accessing the scaling |
301 |
- # governor rw. |
302 |
- addpredict /sys/devices/system/cpu/ |
303 |
- |
304 |
- local mylang |
305 |
- local myopt |
306 |
- |
307 |
- use cxx && mylang="cxx" || mylang="c" |
308 |
- use debug && myopt="debug" || myopt="opt" |
309 |
- |
310 |
- # environmental variables expected by petsc during build |
311 |
- |
312 |
- export PETSC_DIR="${S}" |
313 |
- export PETSC_ARCH="linux-gnu-${mylang}-${myopt}" |
314 |
- |
315 |
- if use debug; then |
316 |
- strip-flags |
317 |
- filter-flags -O* |
318 |
- fi |
319 |
- |
320 |
- # C Support on CXX builds is enabled if possible i.e. when not using |
321 |
- # complex scalars (no complex type for both available at the same time) |
322 |
- |
323 |
- econf \ |
324 |
- scrollOutput=1 \ |
325 |
- FFLAGS="${FFLAGS} -fPIC" \ |
326 |
- CFLAGS="${CFLAGS} -fPIC" \ |
327 |
- CXXFLAGS="${CXXFLAGS} -fPIC" \ |
328 |
- LDFLAGS="${LDFLAGS}" \ |
329 |
- --prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \ |
330 |
- --with-shared-libraries \ |
331 |
- --with-single-library \ |
332 |
- --with-clanguage=${mylang} \ |
333 |
- $(use cxx && ! use complex-scalars && echo "with-c-support=1") \ |
334 |
- --with-petsc-arch=${PETSC_ARCH} \ |
335 |
- --with-precision=double \ |
336 |
- --with-gnu-compilers \ |
337 |
- --with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \ |
338 |
- $(petsc_enable debug debugging) \ |
339 |
- $(petsc_enable mpi) \ |
340 |
- $(petsc_select mpi cc mpicc $(tc-getCC)) \ |
341 |
- $(petsc_select mpi cxx mpicxx $(tc-getCXX)) \ |
342 |
- $(petsc_enable fortran) \ |
343 |
- $(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \ |
344 |
- $(petsc_enable mpi mpi-compilers) \ |
345 |
- $(petsc_select complex-scalars scalar-type complex real) \ |
346 |
- --with-windows-graphics=0 \ |
347 |
- --with-matlab=0 \ |
348 |
- --with-cmake:BOOL=1 \ |
349 |
- $(petsc_enable threads pthread) \ |
350 |
- $(petsc_with afterimage afterimage \ |
351 |
- /usr/include/libAfterImage -lAfterImage) \ |
352 |
- $(use_with hdf5) \ |
353 |
- $(petsc_with hypre hypre \ |
354 |
- /usr/include/hypre -lHYPRE) \ |
355 |
- $(petsc_with sparse suitesparse) \ |
356 |
- $(petsc_with superlu superlu \ |
357 |
- /usr/include/superlu -lsuperlu) \ |
358 |
- $(petsc_with X x) \ |
359 |
- $(petsc_with X x11) \ |
360 |
- $(petsc_with scotch ptscotch \ |
361 |
- /usr/include/scotch \ |
362 |
- [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \ |
363 |
- $(petsc_with mumps scalapack \ |
364 |
- /usr/include/scalapack -lscalapack) \ |
365 |
- $(petsc_with mumps mumps \ |
366 |
- /usr/include \ |
367 |
- [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \ |
368 |
- --with-imagemagick=0 \ |
369 |
- --with-python=0 \ |
370 |
- $(petsc_with boost) \ |
371 |
- $(petsc_with fftw) |
372 |
-} |
373 |
- |
374 |
-src_install() { |
375 |
- emake DESTDIR="${ED}" install |
376 |
- |
377 |
- # add PETSC_DIR to environmental variables |
378 |
- cat >> 99petsc <<- EOF |
379 |
- PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc |
380 |
- LDPATH=${EPREFIX}/usr/$(get_libdir)/petsc/lib |
381 |
- EOF |
382 |
- doenvd 99petsc |
383 |
- |
384 |
- if use doc ; then |
385 |
- docinto html |
386 |
- dodoc -r docs/*.html docs/changes docs/manualpages |
387 |
- fi |
388 |
-} |
389 |
|
390 |
diff --git a/sci-mathematics/petsc/petsc-3.12.1.ebuild b/sci-mathematics/petsc/petsc-3.12.1.ebuild |
391 |
deleted file mode 100644 |
392 |
index 845d7ff75d6..00000000000 |
393 |
--- a/sci-mathematics/petsc/petsc-3.12.1.ebuild |
394 |
+++ /dev/null |
395 |
@@ -1,195 +0,0 @@ |
396 |
-# Copyright 1999-2019 Gentoo Authors |
397 |
-# Distributed under the terms of the GNU General Public License v2 |
398 |
- |
399 |
-EAPI=7 |
400 |
- |
401 |
-PYTHON_COMPAT=( python2_7 ) |
402 |
- |
403 |
-inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs |
404 |
- |
405 |
-DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation" |
406 |
-HOMEPAGE="http://www.mcs.anl.gov/petsc/" |
407 |
-SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz" |
408 |
- |
409 |
-LICENSE="BSD-2" |
410 |
-SLOT="0" |
411 |
-KEYWORDS="~amd64 ~x86" |
412 |
-IUSE="afterimage boost complex-scalars cxx debug doc fftw |
413 |
- fortran hdf5 hypre mpi metis mumps scotch sparse superlu threads X" |
414 |
- |
415 |
-# hypre and superlu curretly exclude each other due to missing linking to hypre |
416 |
-# if both are enabled |
417 |
-REQUIRED_USE=" |
418 |
- afterimage? ( X ) |
419 |
- complex-scalars? ( !hypre !superlu ) |
420 |
- hdf5? ( mpi ) |
421 |
- hypre? ( cxx mpi !superlu ) |
422 |
- mumps? ( mpi scotch ) |
423 |
- scotch? ( mpi ) |
424 |
- superlu? ( !hypre ) |
425 |
-" |
426 |
- |
427 |
-RDEPEND=" |
428 |
- virtual/blas |
429 |
- virtual/lapack |
430 |
- afterimage? ( media-libs/libafterimage ) |
431 |
- boost? ( dev-libs/boost ) |
432 |
- fftw? ( sci-libs/fftw:3.0[mpi?] ) |
433 |
- hdf5? ( sci-libs/hdf5[mpi?] ) |
434 |
- hypre? ( >=sci-libs/hypre-2.18.0[mpi?] ) |
435 |
- metis? ( >=sci-libs/parmetis-4 ) |
436 |
- mpi? ( virtual/mpi[cxx?,fortran?] ) |
437 |
- mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack ) |
438 |
- scotch? ( sci-libs/scotch[mpi?] ) |
439 |
- sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 ) |
440 |
- superlu? ( >=sci-libs/superlu-5 ) |
441 |
- X? ( x11-libs/libX11 ) |
442 |
-" |
443 |
- |
444 |
-DEPEND="${RDEPEND} |
445 |
- ${PYTHON_DEPS} |
446 |
- virtual/pkgconfig |
447 |
- dev-util/cmake |
448 |
-" |
449 |
- |
450 |
-PATCHES=( |
451 |
- "${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch |
452 |
- "${FILESDIR}"/${PN}-3.9.0-fix_sandbox_violation.patch |
453 |
- "${FILESDIR}"/${PN}-3.12.1-make_hypre_configure.patch |
454 |
- "${FILESDIR}"/${PN}-3.12.1-do_not_run_mpiexec.patch |
455 |
-) |
456 |
- |
457 |
-src_prepare() { |
458 |
- default |
459 |
- |
460 |
- sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die |
461 |
-} |
462 |
- |
463 |
-# petsc uses --with-blah=1 and --with-blah=0 to en/disable options |
464 |
-petsc_enable() { |
465 |
- use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0" |
466 |
-} |
467 |
-# add external library: |
468 |
-# petsc_with use_flag libname libdir |
469 |
-# petsc_with use_flag libname include linking_libs |
470 |
-petsc_with() { |
471 |
- local myuse p=${2:-${1}} |
472 |
- if use ${1}; then |
473 |
- myuse="--with-${p}=1" |
474 |
- if [[ $# -ge 4 ]]; then |
475 |
- myuse="${myuse} --with-${p}-include=${EPREFIX}${3}" |
476 |
- shift 3 |
477 |
- myuse="${myuse} --with-${p}-lib=$@" |
478 |
- else |
479 |
- myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}" |
480 |
- fi |
481 |
- else |
482 |
- myuse="--with-${p}=0" |
483 |
- fi |
484 |
- echo ${myuse} |
485 |
-} |
486 |
- |
487 |
-# select between configure options depending on use flag |
488 |
-petsc_select() { |
489 |
- use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4" |
490 |
-} |
491 |
- |
492 |
-src_configure() { |
493 |
- # bug 548498 |
494 |
- # PETSc runs mpi processes during configure that result in a sandbox |
495 |
- # violation by trying to open /proc/mtrr rw. This is not easy to |
496 |
- # mitigate because it happens in libpciaccess.so called by libhwloc.so, |
497 |
- # which is used by libmpi.so. |
498 |
- addpredict /proc/mtrr |
499 |
- # if mpi is built with knem support it needs /dev/knem too |
500 |
- addpredict /dev/knem |
501 |
- |
502 |
- # configureMPITypes with openmpi-2* insists on accessing the scaling |
503 |
- # governor rw. |
504 |
- addpredict /sys/devices/system/cpu/ |
505 |
- |
506 |
- local mylang |
507 |
- local myopt |
508 |
- |
509 |
- use cxx && mylang="cxx" || mylang="c" |
510 |
- use debug && myopt="debug" || myopt="opt" |
511 |
- |
512 |
- # environmental variables expected by petsc during build |
513 |
- |
514 |
- export PETSC_DIR="${S}" |
515 |
- export PETSC_ARCH="linux-gnu-${mylang}-${myopt}" |
516 |
- |
517 |
- if use debug; then |
518 |
- strip-flags |
519 |
- filter-flags -O* |
520 |
- fi |
521 |
- |
522 |
- # C Support on CXX builds is enabled if possible i.e. when not using |
523 |
- # complex scalars (no complex type for both available at the same time) |
524 |
- |
525 |
- econf \ |
526 |
- scrollOutput=1 \ |
527 |
- FFLAGS="${FFLAGS} -fPIC" \ |
528 |
- CFLAGS="${CFLAGS} -fPIC" \ |
529 |
- CXXFLAGS="${CXXFLAGS} -fPIC" \ |
530 |
- LDFLAGS="${LDFLAGS}" \ |
531 |
- --prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \ |
532 |
- --with-shared-libraries \ |
533 |
- --with-single-library \ |
534 |
- --with-clanguage=${mylang} \ |
535 |
- $(use cxx && ! use complex-scalars && echo "with-c-support=1") \ |
536 |
- --with-petsc-arch=${PETSC_ARCH} \ |
537 |
- --with-precision=double \ |
538 |
- --with-gnu-compilers \ |
539 |
- --with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \ |
540 |
- $(petsc_enable debug debugging) \ |
541 |
- $(petsc_enable mpi) \ |
542 |
- $(petsc_select mpi cc mpicc $(tc-getCC)) \ |
543 |
- $(petsc_select mpi cxx mpicxx $(tc-getCXX)) \ |
544 |
- $(petsc_enable fortran) \ |
545 |
- $(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \ |
546 |
- $(petsc_enable mpi mpi-compilers) \ |
547 |
- $(petsc_select complex-scalars scalar-type complex real) \ |
548 |
- --with-windows-graphics=0 \ |
549 |
- --with-matlab=0 \ |
550 |
- --with-cmake:BOOL=1 \ |
551 |
- $(petsc_enable threads pthread) \ |
552 |
- $(petsc_with afterimage afterimage \ |
553 |
- /usr/include/libAfterImage -lAfterImage) \ |
554 |
- $(use_with hdf5) \ |
555 |
- $(petsc_with hypre hypre \ |
556 |
- /usr/include/hypre -lHYPRE) \ |
557 |
- $(use_with sparse suitesparse) \ |
558 |
- $(petsc_with superlu superlu \ |
559 |
- /usr/include/superlu -lsuperlu) \ |
560 |
- $(use_with X x) \ |
561 |
- $(use_with X x11) \ |
562 |
- $(petsc_with scotch ptscotch \ |
563 |
- /usr/include/scotch \ |
564 |
- [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \ |
565 |
- $(petsc_with mumps scalapack \ |
566 |
- /usr/include/scalapack -lscalapack) \ |
567 |
- $(use_with mumps mumps \ |
568 |
- /usr/include \ |
569 |
- [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \ |
570 |
- --with-imagemagick=0 \ |
571 |
- --with-python=0 \ |
572 |
- $(use_with boost) \ |
573 |
- $(use_with fftw) |
574 |
-} |
575 |
- |
576 |
-src_install() { |
577 |
- emake DESTDIR="${ED}" install |
578 |
- |
579 |
- # add PETSC_DIR to environmental variables |
580 |
- cat >> 99petsc <<- EOF |
581 |
- PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc |
582 |
- LDPATH=${EPREFIX}/usr/$(get_libdir)/petsc/lib |
583 |
- EOF |
584 |
- doenvd 99petsc |
585 |
- |
586 |
- if use doc ; then |
587 |
- docinto html |
588 |
- dodoc -r docs/*.html docs/changes docs/manualpages |
589 |
- fi |
590 |
-} |