1 |
commit: e0a89fd9e8bf7f3939ffc6eefaf7ce059a3ab13a |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 26 00:05:35 2022 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 26 01:26:54 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0a89fd9 |
7 |
|
8 |
sci-mathematics/petsc: drop 3.13.1, 3.14.6, 3.15.0, 3.15.0-r1 |
9 |
|
10 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
11 |
|
12 |
sci-mathematics/petsc/Manifest | 3 - |
13 |
.../files/petsc-3.13.0-do_not_run_mpiexec.patch | 34 ---- |
14 |
.../files/petsc-3.13.0-fix_sandbox_violation.patch | 18 -- |
15 |
.../files/petsc-3.13.0-make_hypre_configure.patch | 90 ---------- |
16 |
sci-mathematics/petsc/petsc-3.13.1.ebuild | 196 --------------------- |
17 |
sci-mathematics/petsc/petsc-3.14.6.ebuild | 194 -------------------- |
18 |
sci-mathematics/petsc/petsc-3.15.0-r1.ebuild | 194 -------------------- |
19 |
sci-mathematics/petsc/petsc-3.15.0.ebuild | 190 -------------------- |
20 |
8 files changed, 919 deletions(-) |
21 |
|
22 |
diff --git a/sci-mathematics/petsc/Manifest b/sci-mathematics/petsc/Manifest |
23 |
index a53a6158e9b6..8a1dcafa8362 100644 |
24 |
--- a/sci-mathematics/petsc/Manifest |
25 |
+++ b/sci-mathematics/petsc/Manifest |
26 |
@@ -1,6 +1,3 @@ |
27 |
-DIST petsc-3.13.1.tar.gz 35097687 BLAKE2B fccf64fd3694deffdd0dc561069ffa7e9342fe279b5c9123edeb011df931874083839d27b7b9a0c63faea6487b104b54fd4ce68a88a074c82de91e8baaf270b0 SHA512 41c3138a6ae6c1f2d9077b464c6aeda96287e5a76849582b8f432e2ee93d2594a78ba2181eac0054a77b6165692be5f1a057049313f2be9743d4246383dfdc77 |
28 |
-DIST petsc-3.14.6.tar.gz 39719179 BLAKE2B d3047baf87c67eb64ef02c0c54d6313ea06f091b377b3cdf6dcf6d96c7d68cec5958a007ddd84b52a3ab39bfc0adf146307fa1785a10f39386393371186a3fba SHA512 9766e164446ac5a69b8bf761a0e8a235b1a2b85ed9c96a7fd59e668ae4cceb9d9559a38b175b4aa9747e78d7b44d0018a3c02748dcd3d783d28f861f8382d44c |
29 |
-DIST petsc-3.15.0.tar.gz 15976488 BLAKE2B babfbeb05321c9cb2f7d70ef8ffca974a016eae73ca1a3359d9a8d38aa5aa90ff34571169a5711627d738b93f89fdee3d0a0ff1bd0e51cb7300bbb9b0a8675cb SHA512 d1565823d8a5ce5e1c2c576bbe1b4ebf467cef20bbd8e0cf6c303c6c2af2bf902b66c79468f4e125496f9242be4bd6ac162535ee30252cfb902c0d906a6f27c0 |
30 |
DIST petsc-3.16.0-fftw-without-mpi.patch.bz2 5824 BLAKE2B 59615b1bbaf8ca1da92d7d193a45a2dd434f762cd741d711d4f408183a201a276ac3c968a3e7d740d19212120271701bce52bb7b0f4e311268f40915c81f9dcb SHA512 8e07dfe56a9150ce9a3a5ab8012657875ef84e6e7daa60560bbdd9062078c876a826057f3f3eaf1697ce046a82756ee6eb6a8b819eb51245367c9d5c8a72ee8e |
31 |
DIST petsc-3.16.0.tar.gz 16748960 BLAKE2B 87f9fdb79a9c44e5f476fa4746ad0cbe72f3eda9f6039f2e4743105626701d7c8d6c010fdb9d89becf8619288d0b7a60c8bc4e2fc0793eac5b39030b02c04fd9 SHA512 5280032fb4ec4d058733788bb0ae674e7400565e204133bd10ed88a2965230ec7adeaca2d498267ce661377ca7e6f9d948992206b1d679587606cb422c004655 |
32 |
DIST petsc-3.17.1.tar.gz 17082265 BLAKE2B de1bfe45f93e18e32181499e59912df9225c8e24d75f52e641e552fd43e4d5be48d549d284365b173aa93e51603f5b7740eaac0557ff8c7c96b370f4683257f6 SHA512 8c81cc148b1a899a55e54a013d61519ec7b44f98f7ae30c3f8d0e83ba285b23f4b4d9e2cd483c531d337bc41887e4079b727ba73676b1b653910140291e93575 |
33 |
|
34 |
diff --git a/sci-mathematics/petsc/files/petsc-3.13.0-do_not_run_mpiexec.patch b/sci-mathematics/petsc/files/petsc-3.13.0-do_not_run_mpiexec.patch |
35 |
deleted file mode 100644 |
36 |
index 4c46658dec71..000000000000 |
37 |
--- a/sci-mathematics/petsc/files/petsc-3.13.0-do_not_run_mpiexec.patch |
38 |
+++ /dev/null |
39 |
@@ -1,34 +0,0 @@ |
40 |
-diff --git a/config/BuildSystem/config/packages/MPI.py b/config/BuildSystem/config/packages/MPI.py |
41 |
-index 7e424e71..ee502bd2 100644 |
42 |
---- a/config/BuildSystem/config/packages/MPI.py |
43 |
-+++ b/config/BuildSystem/config/packages/MPI.py |
44 |
-@@ -210,28 +210,11 @@ shared libraries and run with --known-mpi-shared-libraries=1') |
45 |
- raise RuntimeError('Could not locate MPIEXEC - please specify --with-mpiexec option') |
46 |
- # Support for spaces and () in executable names; also needs to handle optional arguments at the end |
47 |
- # TODO: This support for spaces and () should be moved to core BuildSystem |
48 |
-- self.mpiexec = self.mpiexec.replace(' ', '\\ ').replace('(', '\\(').replace(')', '\\)').replace('\ -',' -') |
49 |
-- if (hasattr(self, 'ompi_major_version') and int(self.ompi_major_version) >= 3): |
50 |
-- (out, err, ret) = Configure.executeShellCommand(self.mpiexec+' -help all', checkCommand = noCheck, timeout = 60, log = self.log, threads = 1) |
51 |
-- if out.find('--oversubscribe') >=0: |
52 |
-- self.mpiexec = self.mpiexec + ' --oversubscribe' |
53 |
-+ self.mpiexec = self.mpiexec + ' --oversubscribe' |
54 |
- |
55 |
- # using mpiexec environmental variables make sure mpiexec matches the MPI libraries and save the variables for testing in PetscInitialize() |
56 |
- # the variable HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE is not currently used. PetscInitialize() can check the existence of the environmental variable to |
57 |
- # 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) |
58 |
-- (out, err, ret) = Configure.executeShellCommand(self.mpiexec+' -n 1 printenv', checkCommand = noCheck, timeout = 60, threads = 1, log = self.log) |
59 |
-- if ret: |
60 |
-- self.logWrite('Unable to run '+self.mpiexec+' with option "-n 1 printenv"\nThis could be ok, some MPI implementations such as SGI produce a non-zero status with non-MPI programs\n'+out+err) |
61 |
-- else: |
62 |
-- if out.find('MPIR_CVAR_CH3') > -1: |
63 |
-- if hasattr(self,'ompi_major_version'): raise RuntimeError("Your libraries are from OpenMPI but it appears your mpiexec is from MPICH"); |
64 |
-- self.addDefine('HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE', 'MPIR_CVAR_CH3') |
65 |
-- elif out.find('MPIR_CVAR_CH3') > -1: |
66 |
-- if hasattr(self,'ompi_major_version'): raise RuntimeError("Your libraries are from OpenMPI but it appears your mpiexec is from MPICH"); |
67 |
-- self.addDefine('HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE', 'MPICH') |
68 |
-- elif out.find('OMPI_COMM_WORLD_SIZE') > -1: |
69 |
-- if hasattr(self,'mpich_numversion'): raise RuntimeError("Your libraries are from MPICH but it appears your mpiexec is from OpenMPI"); |
70 |
-- self.addDefine('HAVE_MPIEXEC_ENVIRONMENTAL_VARIABLE', 'OMP') |
71 |
- |
72 |
- self.addMakeMacro('MPIEXEC', self.mpiexec) |
73 |
- self.mpiexec = self.mpiexec + ' -n 1' |
74 |
|
75 |
diff --git a/sci-mathematics/petsc/files/petsc-3.13.0-fix_sandbox_violation.patch b/sci-mathematics/petsc/files/petsc-3.13.0-fix_sandbox_violation.patch |
76 |
deleted file mode 100644 |
77 |
index c0dfd53a0112..000000000000 |
78 |
--- a/sci-mathematics/petsc/files/petsc-3.13.0-fix_sandbox_violation.patch |
79 |
+++ /dev/null |
80 |
@@ -1,18 +0,0 @@ |
81 |
-diff --git a/config/PETSc/options/installDir.py b/config/PETSc/options/installDir.py |
82 |
-index 860faf0f..87898811 100755 |
83 |
---- a/config/PETSc/options/installDir.py |
84 |
-+++ b/config/PETSc/options/installDir.py |
85 |
-@@ -40,13 +40,6 @@ class Configure(config.base.Configure): |
86 |
- self.dir = os.path.abspath(os.path.expanduser(self.framework.argDB['prefix'])) |
87 |
- self.petscDir = self.dir |
88 |
- self.petscArch = '' |
89 |
-- try: |
90 |
-- os.makedirs(os.path.join(self.dir,'PETScTestDirectory')) |
91 |
-- os.rmdir(os.path.join(self.dir,'PETScTestDirectory')) |
92 |
-- except Exception as e: |
93 |
-- self.logPrint('Error trying to to test write permissions on directory '+str(e)) |
94 |
-- 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' |
95 |
-- self.installSudo = 'sudo ' |
96 |
- else: |
97 |
- self.dir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch)) |
98 |
- self.petscDir = self.petscdir.dir |
99 |
|
100 |
diff --git a/sci-mathematics/petsc/files/petsc-3.13.0-make_hypre_configure.patch b/sci-mathematics/petsc/files/petsc-3.13.0-make_hypre_configure.patch |
101 |
deleted file mode 100644 |
102 |
index 1453fd519e81..000000000000 |
103 |
--- a/sci-mathematics/petsc/files/petsc-3.13.0-make_hypre_configure.patch |
104 |
+++ /dev/null |
105 |
@@ -1,90 +0,0 @@ |
106 |
-diff --git a/config/BuildSystem/config/packages/hypre.py b/config/BuildSystem/config/packages/hypre.py |
107 |
-index 4d915c31..1b05a1ee 100644 |
108 |
---- a/config/BuildSystem/config/packages/hypre.py |
109 |
-+++ b/config/BuildSystem/config/packages/hypre.py |
110 |
-@@ -5,10 +5,6 @@ class Configure(config.package.GNUPackage): |
111 |
- def __init__(self, framework): |
112 |
- config.package.GNUPackage.__init__(self, framework) |
113 |
- #self.version = '2.18.2' |
114 |
-- self.minversion = '2.14' |
115 |
-- self.versionname = 'HYPRE_RELEASE_VERSION' |
116 |
-- self.versioninclude = 'HYPRE_config.h' |
117 |
-- self.requiresversion = 1 |
118 |
- #self.gitcommit = 'v'+self.version |
119 |
- self.gitcommit = '93baaa8c9' # v2.18.2+valgrind-fix |
120 |
- self.download = ['git://https://github.com/hypre-space/hypre','https://github.com/hypre-space/hypre/archive/'+self.gitcommit+'.tar.gz'] |
121 |
-diff --git a/include/petsc/private/petschypre.h b/include/petsc/private/petschypre.h |
122 |
-index 81ca7136..b403e70e 100644 |
123 |
---- a/include/petsc/private/petschypre.h |
124 |
-+++ b/include/petsc/private/petschypre.h |
125 |
-@@ -6,12 +6,6 @@ |
126 |
- #include <HYPRE_config.h> |
127 |
- #include <HYPRE_utilities.h> |
128 |
- |
129 |
--/* from version 2.16 on, HYPRE_BigInt is 64 bit for 64bit installations |
130 |
-- and 32 bit for 32bit installations -> not the best name for a variable */ |
131 |
--#if PETSC_PKG_HYPRE_VERSION_LT(2,16,0) |
132 |
--typedef PetscInt HYPRE_BigInt; |
133 |
--#endif |
134 |
-- |
135 |
- /* |
136 |
- With scalar type == real, HYPRE_Complex == PetscScalar; |
137 |
- With scalar type == complex, HYPRE_Complex is double __complex__ while PetscScalar may be std::complex<double> |
138 |
-diff --git a/src/mat/impls/hypre/mhypre.c b/src/mat/impls/hypre/mhypre.c |
139 |
-index 0f7470e6..cce3e2b0 100644 |
140 |
---- a/src/mat/impls/hypre/mhypre.c |
141 |
-+++ b/src/mat/impls/hypre/mhypre.c |
142 |
-@@ -15,10 +15,6 @@ |
143 |
- #include <_hypre_parcsr_ls.h> |
144 |
- #include <_hypre_sstruct_ls.h> |
145 |
- |
146 |
--#if PETSC_PKG_HYPRE_VERSION_LT(2,18,0) |
147 |
--#define hypre_ParCSRMatrixClone(A,B) hypre_ParCSRMatrixCompleteClone(A) |
148 |
--#endif |
149 |
-- |
150 |
- static PetscErrorCode MatHYPRE_CreateFromMat(Mat,Mat_HYPRE*); |
151 |
- static PetscErrorCode MatHYPRE_IJMatrixPreallocate(Mat,Mat,HYPRE_IJMatrix); |
152 |
- static PetscErrorCode MatHYPRE_IJMatrixFastCopy_MPIAIJ(Mat,HYPRE_IJMatrix); |
153 |
-@@ -63,7 +59,6 @@ static PetscErrorCode MatHYPRE_IJMatrixPreallocate(Mat A_d, Mat A_o, HYPRE_IJMat |
154 |
- nnz_o[i] = 0; |
155 |
- } |
156 |
- } |
157 |
--#if PETSC_PKG_HYPRE_VERSION_GE(2,16,0) |
158 |
- { /* If we don't do this, the columns of the matrix will be all zeros! */ |
159 |
- hypre_AuxParCSRMatrix *aux_matrix; |
160 |
- aux_matrix = (hypre_AuxParCSRMatrix*)hypre_IJMatrixTranslator(ij); |
161 |
-@@ -73,9 +68,6 @@ static PetscErrorCode MatHYPRE_IJMatrixPreallocate(Mat A_d, Mat A_o, HYPRE_IJMat |
162 |
- aux_matrix = (hypre_AuxParCSRMatrix*)hypre_IJMatrixTranslator(ij); |
163 |
- hypre_AuxParCSRMatrixNeedAux(aux_matrix) = 1; |
164 |
- } |
165 |
--#else |
166 |
-- PetscStackCallStandard(HYPRE_IJMatrixSetDiagOffdSizes,(ij,nnz_d,nnz_o)); |
167 |
--#endif |
168 |
- ierr = PetscFree(nnz_d);CHKERRQ(ierr); |
169 |
- ierr = PetscFree(nnz_o);CHKERRQ(ierr); |
170 |
- } |
171 |
-@@ -233,11 +225,7 @@ static PetscErrorCode MatHYPRE_IJMatrixFastCopy_MPIAIJ(Mat A, HYPRE_IJMatrix ij) |
172 |
- /* need to shift the diag column indices (hdiag->j) back to global numbering since hypre is expecting this */ |
173 |
- hjj = hdiag->j; |
174 |
- pjj = pdiag->j; |
175 |
--#if PETSC_PKG_HYPRE_VERSION_GE(2,16,0) |
176 |
- for (i=0; i<pdiag->nz; i++) hjj[i] = pjj[i]; |
177 |
--#else |
178 |
-- for (i=0; i<pdiag->nz; i++) hjj[i] = cstart + pjj[i]; |
179 |
--#endif |
180 |
- ierr = PetscArraycpy(hdiag->data,pdiag->a,pdiag->nz);CHKERRQ(ierr); |
181 |
- if (sameint) { |
182 |
- ierr = PetscArraycpy(hoffd->i,poffd->i,pA->A->rmap->n + 1);CHKERRQ(ierr); |
183 |
-@@ -247,12 +235,8 @@ static PetscErrorCode MatHYPRE_IJMatrixFastCopy_MPIAIJ(Mat A, HYPRE_IJMatrix ij) |
184 |
- |
185 |
- /* need to move the offd column indices (hoffd->j) back to global numbering since hypre is expecting this |
186 |
- If we hacked a hypre a bit more we might be able to avoid this step */ |
187 |
--#if PETSC_PKG_HYPRE_VERSION_GE(2,16,0) |
188 |
- PetscStackCallStandard(hypre_CSRMatrixBigInitialize,(hoffd)); |
189 |
- jj = (PetscInt*) hoffd->big_j; |
190 |
--#else |
191 |
-- jj = (PetscInt*) hoffd->j; |
192 |
--#endif |
193 |
- pjj = poffd->j; |
194 |
- for (i=0; i<poffd->nz; i++) jj[i] = garray[pjj[i]]; |
195 |
- |
196 |
|
197 |
diff --git a/sci-mathematics/petsc/petsc-3.13.1.ebuild b/sci-mathematics/petsc/petsc-3.13.1.ebuild |
198 |
deleted file mode 100644 |
199 |
index 23e1117a52c6..000000000000 |
200 |
--- a/sci-mathematics/petsc/petsc-3.13.1.ebuild |
201 |
+++ /dev/null |
202 |
@@ -1,196 +0,0 @@ |
203 |
-# Copyright 1999-2021 Gentoo Authors |
204 |
-# Distributed under the terms of the GNU General Public License v2 |
205 |
- |
206 |
-EAPI=7 |
207 |
- |
208 |
-PYTHON_COMPAT=( python3_{7,8} ) |
209 |
- |
210 |
-inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs |
211 |
- |
212 |
-DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation" |
213 |
-HOMEPAGE="https://www.mcs.anl.gov/petsc/" |
214 |
-SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz" |
215 |
- |
216 |
-LICENSE="BSD-2" |
217 |
-SLOT="0" |
218 |
-KEYWORDS="~amd64 ~x86" |
219 |
-IUSE="afterimage boost complex-scalars cxx debug doc fftw |
220 |
- fortran hdf5 hypre mpi metis mumps scotch sparse superlu threads X" |
221 |
- |
222 |
-# hypre and superlu curretly exclude each other due to missing linking to hypre |
223 |
-# if both are enabled |
224 |
-REQUIRED_USE=" |
225 |
- afterimage? ( X ) |
226 |
- complex-scalars? ( !hypre !superlu ) |
227 |
- hdf5? ( mpi ) |
228 |
- hypre? ( cxx mpi !superlu ) |
229 |
- mumps? ( mpi scotch ) |
230 |
- scotch? ( mpi ) |
231 |
- superlu? ( !hypre ) |
232 |
-" |
233 |
- |
234 |
-RDEPEND=" |
235 |
- virtual/blas |
236 |
- virtual/lapack |
237 |
- afterimage? ( media-libs/libafterimage ) |
238 |
- boost? ( dev-libs/boost ) |
239 |
- fftw? ( sci-libs/fftw:3.0[mpi?] ) |
240 |
- hdf5? ( sci-libs/hdf5[mpi?] ) |
241 |
- hypre? ( >=sci-libs/hypre-2.18.0[mpi?] ) |
242 |
- metis? ( >=sci-libs/parmetis-4 ) |
243 |
- mpi? ( virtual/mpi[cxx?,fortran?] ) |
244 |
- mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack ) |
245 |
- scotch? ( sci-libs/scotch[mpi?] ) |
246 |
- sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 ) |
247 |
- superlu? ( >=sci-libs/superlu-5 ) |
248 |
- X? ( x11-libs/libX11 ) |
249 |
-" |
250 |
- |
251 |
-DEPEND="${RDEPEND} |
252 |
- ${PYTHON_DEPS} |
253 |
- virtual/pkgconfig |
254 |
- dev-util/cmake |
255 |
-" |
256 |
- |
257 |
-PATCHES=( |
258 |
- "${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch |
259 |
- "${FILESDIR}"/${PN}-3.13.0-fix_sandbox_violation.patch |
260 |
- "${FILESDIR}"/${PN}-3.13.0-make_hypre_configure.patch |
261 |
- "${FILESDIR}"/${PN}-3.13.0-do_not_run_mpiexec.patch |
262 |
-) |
263 |
- |
264 |
-# petsc uses --with-blah=1 and --with-blah=0 to en/disable options |
265 |
-petsc_enable() { |
266 |
- use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0" |
267 |
-} |
268 |
-# add external library: |
269 |
-# petsc_with use_flag libname libdir |
270 |
-# petsc_with use_flag libname include linking_libs |
271 |
-petsc_with() { |
272 |
- local myuse p=${2:-${1}} |
273 |
- if use ${1}; then |
274 |
- myuse="--with-${p}=1" |
275 |
- if [[ $# -ge 4 ]]; then |
276 |
- myuse="${myuse} --with-${p}-include=${EPREFIX}${3}" |
277 |
- shift 3 |
278 |
- myuse="${myuse} --with-${p}-lib=$@" |
279 |
- else |
280 |
- myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}" |
281 |
- fi |
282 |
- else |
283 |
- myuse="--with-${p}=0" |
284 |
- fi |
285 |
- echo ${myuse} |
286 |
-} |
287 |
- |
288 |
-# select between configure options depending on use flag |
289 |
-petsc_select() { |
290 |
- use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4" |
291 |
-} |
292 |
- |
293 |
-src_configure() { |
294 |
- # bug 548498 |
295 |
- # PETSc runs mpi processes during configure that result in a sandbox |
296 |
- # violation by trying to open /proc/mtrr rw. This is not easy to |
297 |
- # mitigate because it happens in libpciaccess.so called by libhwloc.so, |
298 |
- # which is used by libmpi.so. |
299 |
- addpredict /proc/mtrr |
300 |
- # if mpi is built with knem support it needs /dev/knem too |
301 |
- addpredict /dev/knem |
302 |
- |
303 |
- # configureMPITypes with openmpi-2* insists on accessing the scaling |
304 |
- # governor rw. |
305 |
- addpredict /sys/devices/system/cpu/ |
306 |
- |
307 |
- # bug 771711 |
308 |
- # configureMPIEXEC and configureMPITypes access /dev/nvidiactl |
309 |
- addpredict /dev/nvidiactl |
310 |
- |
311 |
- # bug 810841 |
312 |
- addpredict /dev/kfd |
313 |
- |
314 |
- local mylang |
315 |
- local myopt |
316 |
- |
317 |
- use cxx && mylang="cxx" || mylang="c" |
318 |
- use debug && myopt="debug" || myopt="opt" |
319 |
- |
320 |
- # environmental variables expected by petsc during build |
321 |
- |
322 |
- export PETSC_DIR="${S}" |
323 |
- export PETSC_ARCH="linux-gnu-${mylang}-${myopt}" |
324 |
- |
325 |
- if use debug; then |
326 |
- strip-flags |
327 |
- filter-flags -O* |
328 |
- fi |
329 |
- |
330 |
- # C Support on CXX builds is enabled if possible i.e. when not using |
331 |
- # complex scalars (no complex type for both available at the same time) |
332 |
- |
333 |
- econf \ |
334 |
- scrollOutput=1 \ |
335 |
- FFLAGS="${FFLAGS} -fPIC" \ |
336 |
- CFLAGS="${CFLAGS} -fPIC" \ |
337 |
- CXXFLAGS="${CXXFLAGS} -fPIC" \ |
338 |
- LDFLAGS="${LDFLAGS}" \ |
339 |
- --prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \ |
340 |
- --with-shared-libraries \ |
341 |
- --with-single-library \ |
342 |
- --with-clanguage=${mylang} \ |
343 |
- $(use cxx && ! use complex-scalars && echo "with-c-support=1") \ |
344 |
- --with-petsc-arch=${PETSC_ARCH} \ |
345 |
- --with-precision=double \ |
346 |
- --with-gnu-compilers \ |
347 |
- --with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \ |
348 |
- $(petsc_enable debug debugging) \ |
349 |
- $(petsc_enable mpi) \ |
350 |
- $(petsc_select mpi cc mpicc $(tc-getCC)) \ |
351 |
- $(petsc_select mpi cxx mpicxx $(tc-getCXX)) \ |
352 |
- $(petsc_enable fortran) \ |
353 |
- $(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \ |
354 |
- $(petsc_enable mpi mpi-compilers) \ |
355 |
- $(petsc_select complex-scalars scalar-type complex real) \ |
356 |
- --with-windows-graphics=0 \ |
357 |
- --with-matlab=0 \ |
358 |
- --with-cmake:BOOL=1 \ |
359 |
- $(petsc_enable threads pthread) \ |
360 |
- $(petsc_with afterimage afterimage \ |
361 |
- /usr/include/libAfterImage -lAfterImage) \ |
362 |
- $(use_with hdf5) \ |
363 |
- $(petsc_with hypre hypre \ |
364 |
- /usr/include/hypre -lHYPRE) \ |
365 |
- $(use_with sparse suitesparse) \ |
366 |
- $(petsc_with superlu superlu \ |
367 |
- /usr/include/superlu -lsuperlu) \ |
368 |
- $(use_with X x) \ |
369 |
- $(use_with X x11) \ |
370 |
- $(petsc_with scotch ptscotch \ |
371 |
- /usr/include/scotch \ |
372 |
- [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \ |
373 |
- $(petsc_with mumps scalapack \ |
374 |
- /usr/include/scalapack -lscalapack) \ |
375 |
- $(use_with mumps mumps \ |
376 |
- /usr/include \ |
377 |
- [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \ |
378 |
- --with-imagemagick=0 \ |
379 |
- --with-python=0 \ |
380 |
- $(use_with boost) \ |
381 |
- $(use_with fftw) |
382 |
-} |
383 |
- |
384 |
-src_install() { |
385 |
- emake DESTDIR="${ED}" install |
386 |
- |
387 |
- # add PETSC_DIR to environmental variables |
388 |
- cat >> 99petsc <<- EOF |
389 |
- PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc |
390 |
- LDPATH=${EPREFIX}/usr/$(get_libdir)/petsc/lib |
391 |
- EOF |
392 |
- doenvd 99petsc |
393 |
- |
394 |
- if use doc ; then |
395 |
- docinto html |
396 |
- dodoc -r docs/*.html docs/changes docs/manualpages |
397 |
- fi |
398 |
-} |
399 |
|
400 |
diff --git a/sci-mathematics/petsc/petsc-3.14.6.ebuild b/sci-mathematics/petsc/petsc-3.14.6.ebuild |
401 |
deleted file mode 100644 |
402 |
index 5bd50a9d32fe..000000000000 |
403 |
--- a/sci-mathematics/petsc/petsc-3.14.6.ebuild |
404 |
+++ /dev/null |
405 |
@@ -1,194 +0,0 @@ |
406 |
-# Copyright 1999-2021 Gentoo Authors |
407 |
-# Distributed under the terms of the GNU General Public License v2 |
408 |
- |
409 |
-EAPI=7 |
410 |
- |
411 |
-PYTHON_COMPAT=( python3_{7,8} ) |
412 |
- |
413 |
-inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs |
414 |
- |
415 |
-DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation" |
416 |
-HOMEPAGE="https://www.mcs.anl.gov/petsc/" |
417 |
-SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz" |
418 |
- |
419 |
-LICENSE="BSD-2" |
420 |
-SLOT="0" |
421 |
-KEYWORDS="~amd64 ~x86" |
422 |
-IUSE="afterimage boost complex-scalars cxx debug doc fftw |
423 |
- fortran hdf5 hypre mpi metis mumps scotch sparse superlu threads X" |
424 |
- |
425 |
-# hypre and superlu curretly exclude each other due to missing linking to hypre |
426 |
-# if both are enabled |
427 |
-REQUIRED_USE=" |
428 |
- afterimage? ( X ) |
429 |
- complex-scalars? ( !hypre !superlu ) |
430 |
- hdf5? ( mpi ) |
431 |
- hypre? ( cxx mpi !superlu ) |
432 |
- mumps? ( mpi scotch ) |
433 |
- scotch? ( mpi ) |
434 |
- superlu? ( !hypre ) |
435 |
-" |
436 |
- |
437 |
-RDEPEND=" |
438 |
- virtual/blas |
439 |
- virtual/lapack |
440 |
- afterimage? ( media-libs/libafterimage ) |
441 |
- boost? ( dev-libs/boost ) |
442 |
- fftw? ( sci-libs/fftw:3.0[mpi?] ) |
443 |
- hdf5? ( sci-libs/hdf5[mpi?] ) |
444 |
- hypre? ( >=sci-libs/hypre-2.18.0[mpi?] ) |
445 |
- metis? ( >=sci-libs/parmetis-4 ) |
446 |
- mpi? ( virtual/mpi[cxx?,fortran?] ) |
447 |
- mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack ) |
448 |
- scotch? ( sci-libs/scotch[mpi?] ) |
449 |
- sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 ) |
450 |
- superlu? ( >=sci-libs/superlu-5 ) |
451 |
- X? ( x11-libs/libX11 ) |
452 |
-" |
453 |
- |
454 |
-DEPEND="${RDEPEND} |
455 |
- ${PYTHON_DEPS} |
456 |
- virtual/pkgconfig |
457 |
- dev-util/cmake |
458 |
-" |
459 |
- |
460 |
-PATCHES=( |
461 |
- "${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch |
462 |
- "${FILESDIR}"/${PN}-3.13.0-fix_sandbox_violation.patch |
463 |
-) |
464 |
- |
465 |
-# petsc uses --with-blah=1 and --with-blah=0 to en/disable options |
466 |
-petsc_enable() { |
467 |
- use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0" |
468 |
-} |
469 |
-# add external library: |
470 |
-# petsc_with use_flag libname libdir |
471 |
-# petsc_with use_flag libname include linking_libs |
472 |
-petsc_with() { |
473 |
- local myuse p=${2:-${1}} |
474 |
- if use ${1}; then |
475 |
- myuse="--with-${p}=1" |
476 |
- if [[ $# -ge 4 ]]; then |
477 |
- myuse="${myuse} --with-${p}-include=${EPREFIX}${3}" |
478 |
- shift 3 |
479 |
- myuse="${myuse} --with-${p}-lib=$@" |
480 |
- else |
481 |
- myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}" |
482 |
- fi |
483 |
- else |
484 |
- myuse="--with-${p}=0" |
485 |
- fi |
486 |
- echo ${myuse} |
487 |
-} |
488 |
- |
489 |
-# select between configure options depending on use flag |
490 |
-petsc_select() { |
491 |
- use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4" |
492 |
-} |
493 |
- |
494 |
-src_configure() { |
495 |
- # bug 548498 |
496 |
- # PETSc runs mpi processes during configure that result in a sandbox |
497 |
- # violation by trying to open /proc/mtrr rw. This is not easy to |
498 |
- # mitigate because it happens in libpciaccess.so called by libhwloc.so, |
499 |
- # which is used by libmpi.so. |
500 |
- addpredict /proc/mtrr |
501 |
- # if mpi is built with knem support it needs /dev/knem too |
502 |
- addpredict /dev/knem |
503 |
- |
504 |
- # configureMPITypes with openmpi-2* insists on accessing the scaling |
505 |
- # governor rw. |
506 |
- addpredict /sys/devices/system/cpu/ |
507 |
- |
508 |
- # bug 771711 |
509 |
- # configureMPIEXEC and configureMPITypes access /dev/nvidiactl |
510 |
- addpredict /dev/nvidiactl |
511 |
- |
512 |
- # bug 810841 |
513 |
- addpredict /dev/kfd |
514 |
- |
515 |
- local mylang |
516 |
- local myopt |
517 |
- |
518 |
- use cxx && mylang="cxx" || mylang="c" |
519 |
- use debug && myopt="debug" || myopt="opt" |
520 |
- |
521 |
- # environmental variables expected by petsc during build |
522 |
- |
523 |
- export PETSC_DIR="${S}" |
524 |
- export PETSC_ARCH="linux-gnu-${mylang}-${myopt}" |
525 |
- |
526 |
- if use debug; then |
527 |
- strip-flags |
528 |
- filter-flags -O* |
529 |
- fi |
530 |
- |
531 |
- # C Support on CXX builds is enabled if possible i.e. when not using |
532 |
- # complex scalars (no complex type for both available at the same time) |
533 |
- |
534 |
- econf \ |
535 |
- scrollOutput=1 \ |
536 |
- FFLAGS="${FFLAGS} -fPIC" \ |
537 |
- CFLAGS="${CFLAGS} -fPIC" \ |
538 |
- CXXFLAGS="${CXXFLAGS} -fPIC" \ |
539 |
- LDFLAGS="${LDFLAGS}" \ |
540 |
- --prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \ |
541 |
- --with-shared-libraries \ |
542 |
- --with-single-library \ |
543 |
- --with-clanguage=${mylang} \ |
544 |
- $(use cxx && ! use complex-scalars && echo "with-c-support=1") \ |
545 |
- --with-petsc-arch=${PETSC_ARCH} \ |
546 |
- --with-precision=double \ |
547 |
- --with-gnu-compilers \ |
548 |
- --with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \ |
549 |
- $(petsc_enable debug debugging) \ |
550 |
- $(petsc_enable mpi) \ |
551 |
- $(petsc_select mpi cc mpicc $(tc-getCC)) \ |
552 |
- $(petsc_select mpi cxx mpicxx $(tc-getCXX)) \ |
553 |
- $(petsc_enable fortran) \ |
554 |
- $(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \ |
555 |
- $(petsc_enable mpi mpi-compilers) \ |
556 |
- $(petsc_select complex-scalars scalar-type complex real) \ |
557 |
- --with-windows-graphics=0 \ |
558 |
- --with-matlab=0 \ |
559 |
- --with-cmake:BOOL=1 \ |
560 |
- $(petsc_enable threads pthread) \ |
561 |
- $(petsc_with afterimage afterimage \ |
562 |
- /usr/include/libAfterImage -lAfterImage) \ |
563 |
- $(use_with hdf5) \ |
564 |
- $(petsc_with hypre hypre \ |
565 |
- /usr/include/hypre -lHYPRE) \ |
566 |
- $(use_with sparse suitesparse) \ |
567 |
- $(petsc_with superlu superlu \ |
568 |
- /usr/include/superlu -lsuperlu) \ |
569 |
- $(use_with X x) \ |
570 |
- $(use_with X x11) \ |
571 |
- $(petsc_with scotch ptscotch \ |
572 |
- /usr/include/scotch \ |
573 |
- [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \ |
574 |
- $(petsc_with mumps scalapack \ |
575 |
- /usr/include/scalapack -lscalapack) \ |
576 |
- $(use_with mumps mumps \ |
577 |
- /usr/include \ |
578 |
- [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \ |
579 |
- --with-imagemagick=0 \ |
580 |
- --with-python=0 \ |
581 |
- $(use_with boost) \ |
582 |
- $(use_with fftw) |
583 |
-} |
584 |
- |
585 |
-src_install() { |
586 |
- emake DESTDIR="${ED}" install |
587 |
- |
588 |
- # add PETSC_DIR to environmental variables |
589 |
- cat >> 99petsc <<- EOF |
590 |
- PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc |
591 |
- LDPATH=${EPREFIX}/usr/$(get_libdir)/petsc/lib |
592 |
- EOF |
593 |
- doenvd 99petsc |
594 |
- |
595 |
- if use doc ; then |
596 |
- docinto html |
597 |
- dodoc -r docs/*.html docs/changes docs/manualpages |
598 |
- fi |
599 |
-} |
600 |
|
601 |
diff --git a/sci-mathematics/petsc/petsc-3.15.0-r1.ebuild b/sci-mathematics/petsc/petsc-3.15.0-r1.ebuild |
602 |
deleted file mode 100644 |
603 |
index 5da94f15ff16..000000000000 |
604 |
--- a/sci-mathematics/petsc/petsc-3.15.0-r1.ebuild |
605 |
+++ /dev/null |
606 |
@@ -1,194 +0,0 @@ |
607 |
-# Copyright 1999-2021 Gentoo Authors |
608 |
-# Distributed under the terms of the GNU General Public License v2 |
609 |
- |
610 |
-EAPI=8 |
611 |
- |
612 |
-PYTHON_COMPAT=( python3_{8..10} pypy3 ) |
613 |
- |
614 |
-inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs |
615 |
- |
616 |
-DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation" |
617 |
-HOMEPAGE="https://www.mcs.anl.gov/petsc" |
618 |
-SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz" |
619 |
- |
620 |
-LICENSE="BSD-2" |
621 |
-SLOT="0" |
622 |
-KEYWORDS="~amd64 ~x86" |
623 |
-IUSE="afterimage boost complex-scalars cxx debug fftw |
624 |
-fortran hdf5 hypre int64 mpi metis mumps scotch superlu threads X" |
625 |
- |
626 |
-# readd sparse when suitesparse-5.6.0 is in tree |
627 |
-# sparse? ( >=sci-libs/suitesparse-5.6.0 >=sci-libs/cholmod-1.7.0 ) |
628 |
-# $(use_with sparse suitesparse) \ |
629 |
-RDEPEND=" |
630 |
- virtual/blas |
631 |
- virtual/lapack |
632 |
- |
633 |
- afterimage? ( media-libs/libafterimage ) |
634 |
- boost? ( dev-libs/boost ) |
635 |
- fftw? ( sci-libs/fftw:3.0[mpi?] ) |
636 |
- hdf5? ( sci-libs/hdf5[mpi?] ) |
637 |
- hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] ) |
638 |
- metis? ( >=sci-libs/parmetis-4 ) |
639 |
- mpi? ( virtual/mpi[cxx?,fortran?] ) |
640 |
- mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack ) |
641 |
- scotch? ( sci-libs/scotch[int64?,mpi?] ) |
642 |
- superlu? ( >=sci-libs/superlu-5 ) |
643 |
- X? ( x11-libs/libX11 ) |
644 |
-" |
645 |
-DEPEND=" |
646 |
- ${RDEPEND} |
647 |
- ${PYTHON_DEPS} |
648 |
-" |
649 |
-BDEPEND=" |
650 |
- dev-util/cmake |
651 |
- sys-apps/which |
652 |
- virtual/pkgconfig |
653 |
-" |
654 |
- |
655 |
-# hypre and superlu curretly exclude each other due to missing linking to hypre |
656 |
-# if both are enabled |
657 |
-REQUIRED_USE=" |
658 |
- afterimage? ( X ) |
659 |
- complex-scalars? ( !hypre !superlu ) |
660 |
- hdf5? ( mpi ) |
661 |
- hypre? ( cxx mpi !superlu ) |
662 |
- mumps? ( mpi scotch ) |
663 |
- scotch? ( mpi ) |
664 |
- superlu? ( !hypre ) |
665 |
-" |
666 |
-PATCHES=( |
667 |
- "${FILESDIR}/${PN}-3.7.0-disable-rpath.patch" |
668 |
- "${FILESDIR}/${PN}-3.13.0-fix_sandbox_violation.patch" |
669 |
-) |
670 |
- |
671 |
-# petsc uses --with-blah=1 and --with-blah=0 to en/disable options |
672 |
-petsc_enable() { |
673 |
- use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0" |
674 |
-} |
675 |
-# add external library: |
676 |
-# petsc_with use_flag libname libdir |
677 |
-# petsc_with use_flag libname include linking_libs |
678 |
-petsc_with() { |
679 |
- local myuse p=${2:-${1}} |
680 |
- if use ${1}; then |
681 |
- myuse="--with-${p}=1" |
682 |
- if [[ $# -ge 4 ]]; then |
683 |
- myuse="${myuse} --with-${p}-include=${EPREFIX}${3}" |
684 |
- shift 3 |
685 |
- myuse="${myuse} --with-${p}-lib=$@" |
686 |
- else |
687 |
- myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}" |
688 |
- fi |
689 |
- else |
690 |
- myuse="--with-${p}=0" |
691 |
- fi |
692 |
- echo ${myuse} |
693 |
-} |
694 |
- |
695 |
-# select between configure options depending on use flag |
696 |
-petsc_select() { |
697 |
- use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4" |
698 |
-} |
699 |
- |
700 |
-src_configure() { |
701 |
- # bug 548498 |
702 |
- # PETSc runs mpi processes during configure that result in a sandbox |
703 |
- # violation by trying to open /proc/mtrr rw. This is not easy to |
704 |
- # mitigate because it happens in libpciaccess.so called by libhwloc.so, |
705 |
- # which is used by libmpi.so. |
706 |
- addpredict /proc/mtrr |
707 |
- # if mpi is built with knem support it needs /dev/knem too |
708 |
- addpredict /dev/knem |
709 |
- |
710 |
- # configureMPITypes with openmpi-2* insists on accessing the scaling |
711 |
- # governor rw. |
712 |
- addpredict /sys/devices/system/cpu/ |
713 |
- |
714 |
- # bug 771711 |
715 |
- # configureMPIEXEC and configureMPITypes access /dev/nvidiactl |
716 |
- addpredict /dev/nvidiactl |
717 |
- |
718 |
- # bug 810841 |
719 |
- addpredict /dev/kfd |
720 |
- |
721 |
- local mylang |
722 |
- local myopt |
723 |
- |
724 |
- use cxx && mylang="cxx" || mylang="c" |
725 |
- use debug && myopt="debug" || myopt="opt" |
726 |
- |
727 |
- # environmental variables expected by petsc during build |
728 |
- |
729 |
- export PETSC_DIR="${S}" |
730 |
- export PETSC_ARCH="linux-gnu-${mylang}-${myopt}" |
731 |
- |
732 |
- if use debug; then |
733 |
- strip-flags |
734 |
- filter-flags -O* |
735 |
- fi |
736 |
- |
737 |
- tc-export AR RANLIB |
738 |
- |
739 |
- # C Support on CXX builds is enabled if possible i.e. when not using |
740 |
- # complex scalars (no complex type for both available at the same time) |
741 |
- |
742 |
- econf \ |
743 |
- scrollOutput=1 \ |
744 |
- AR="${AR}" \ |
745 |
- CFLAGS="${CFLAGS} -fPIC" \ |
746 |
- CPPFLAGS="${CPPFLAGS}" \ |
747 |
- CXXFLAGS="${CXXFLAGS} -fPIC" \ |
748 |
- CXXOPTFLAGS="${CXXFLAGS} -fPIC" \ |
749 |
- FCFLAGS="${FCFLAGS} -fPIC" \ |
750 |
- FFLAGS="${FFLAGS} -fPIC" \ |
751 |
- LDFLAGS="${LDFLAGS}" \ |
752 |
- MAKEFLAGS="${MAKEFLAGS}" \ |
753 |
- RANLIB="${RANLIB}" \ |
754 |
- --prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \ |
755 |
- --with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \ |
756 |
- --with-clanguage="${mylang}" \ |
757 |
- --with-cmake:BOOL=1 \ |
758 |
- --with-gnu-compilers \ |
759 |
- --with-imagemagick=0 \ |
760 |
- --with-matlab=0 \ |
761 |
- --with-petsc-arch="${PETSC_ARCH}" \ |
762 |
- --with-precision=double \ |
763 |
- --with-python=0 \ |
764 |
- --with-shared-libraries \ |
765 |
- --with-single-library \ |
766 |
- --with-windows-graphics=0 \ |
767 |
- $(petsc_enable debug debugging) \ |
768 |
- $(petsc_enable fortran) \ |
769 |
- $(petsc_enable mpi) \ |
770 |
- $(petsc_enable mpi mpi-compilers) \ |
771 |
- $(petsc_enable threads pthread) \ |
772 |
- $(petsc_select complex-scalars scalar-type complex real) \ |
773 |
- $(petsc_select mpi cc mpicc $(tc-getCC)) \ |
774 |
- $(petsc_select mpi cxx mpicxx $(tc-getCXX)) \ |
775 |
- $(petsc_with afterimage afterimage /usr/include/libAfterImage -lAfterImage) \ |
776 |
- $(petsc_with hypre hypre /usr/include/hypre -lHYPRE) \ |
777 |
- $(petsc_with superlu superlu /usr/include/superlu -lsuperlu) \ |
778 |
- $(petsc_with scotch ptscotch /usr/include/scotch [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \ |
779 |
- $(petsc_with mumps scalapack /usr/include/scalapack -lscalapack) \ |
780 |
- $(use cxx && ! use complex-scalars && echo "--with-c-support=1") \ |
781 |
- $(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \ |
782 |
- $(use int64 && echo "--with-index-size=64") \ |
783 |
- $(use_with boost) \ |
784 |
- $(use_with fftw) \ |
785 |
- $(use_with hdf5) \ |
786 |
- $(use_with mumps mumps /usr/include [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \ |
787 |
- $(use_with X x) \ |
788 |
- $(use_with X x11) |
789 |
-} |
790 |
- |
791 |
-src_install() { |
792 |
- emake DESTDIR="${ED}" install |
793 |
- |
794 |
- # add PETSC_DIR to environmental variables |
795 |
- cat >> 99petsc <<- EOF |
796 |
- PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc |
797 |
- LDPATH=${EPREFIX}/usr/$(get_libdir)/petsc/lib |
798 |
- EOF |
799 |
- doenvd 99petsc |
800 |
-} |
801 |
|
802 |
diff --git a/sci-mathematics/petsc/petsc-3.15.0.ebuild b/sci-mathematics/petsc/petsc-3.15.0.ebuild |
803 |
deleted file mode 100644 |
804 |
index 8286baab9803..000000000000 |
805 |
--- a/sci-mathematics/petsc/petsc-3.15.0.ebuild |
806 |
+++ /dev/null |
807 |
@@ -1,190 +0,0 @@ |
808 |
-# Copyright 1999-2021 Gentoo Authors |
809 |
-# Distributed under the terms of the GNU General Public License v2 |
810 |
- |
811 |
-EAPI=7 |
812 |
- |
813 |
-PYTHON_COMPAT=( python3_{8..10} ) |
814 |
- |
815 |
-inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs |
816 |
- |
817 |
-DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation" |
818 |
-HOMEPAGE="https://www.mcs.anl.gov/petsc/" |
819 |
-SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz" |
820 |
- |
821 |
-LICENSE="BSD-2" |
822 |
-SLOT="0" |
823 |
-KEYWORDS="~amd64 ~x86" |
824 |
-IUSE="afterimage boost complex-scalars cxx debug fftw |
825 |
- fortran hdf5 hypre mpi metis mumps scotch sparse superlu threads X" |
826 |
- |
827 |
-# hypre and superlu curretly exclude each other due to missing linking to hypre |
828 |
-# if both are enabled |
829 |
-REQUIRED_USE=" |
830 |
- afterimage? ( X ) |
831 |
- complex-scalars? ( !hypre !superlu ) |
832 |
- hdf5? ( mpi ) |
833 |
- hypre? ( cxx mpi !superlu ) |
834 |
- mumps? ( mpi scotch ) |
835 |
- scotch? ( mpi ) |
836 |
- superlu? ( !hypre ) |
837 |
-" |
838 |
- |
839 |
-RDEPEND=" |
840 |
- virtual/blas |
841 |
- virtual/lapack |
842 |
- afterimage? ( media-libs/libafterimage ) |
843 |
- boost? ( dev-libs/boost ) |
844 |
- fftw? ( sci-libs/fftw:3.0[mpi?] ) |
845 |
- hdf5? ( sci-libs/hdf5[mpi?] ) |
846 |
- hypre? ( >=sci-libs/hypre-2.18.0[mpi?] ) |
847 |
- metis? ( >=sci-libs/parmetis-4 ) |
848 |
- mpi? ( virtual/mpi[cxx?,fortran?] ) |
849 |
- mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack ) |
850 |
- scotch? ( sci-libs/scotch[mpi?] ) |
851 |
- sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 ) |
852 |
- superlu? ( >=sci-libs/superlu-5 ) |
853 |
- X? ( x11-libs/libX11 ) |
854 |
-" |
855 |
- |
856 |
-DEPEND="${RDEPEND} |
857 |
- ${PYTHON_DEPS} |
858 |
- virtual/pkgconfig |
859 |
- dev-util/cmake |
860 |
- sys-apps/which |
861 |
-" |
862 |
- |
863 |
-PATCHES=( |
864 |
- "${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch |
865 |
- "${FILESDIR}"/${PN}-3.13.0-fix_sandbox_violation.patch |
866 |
-) |
867 |
- |
868 |
-# petsc uses --with-blah=1 and --with-blah=0 to en/disable options |
869 |
-petsc_enable() { |
870 |
- use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0" |
871 |
-} |
872 |
-# add external library: |
873 |
-# petsc_with use_flag libname libdir |
874 |
-# petsc_with use_flag libname include linking_libs |
875 |
-petsc_with() { |
876 |
- local myuse p=${2:-${1}} |
877 |
- if use ${1}; then |
878 |
- myuse="--with-${p}=1" |
879 |
- if [[ $# -ge 4 ]]; then |
880 |
- myuse="${myuse} --with-${p}-include=${EPREFIX}${3}" |
881 |
- shift 3 |
882 |
- myuse="${myuse} --with-${p}-lib=$@" |
883 |
- else |
884 |
- myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}" |
885 |
- fi |
886 |
- else |
887 |
- myuse="--with-${p}=0" |
888 |
- fi |
889 |
- echo ${myuse} |
890 |
-} |
891 |
- |
892 |
-# select between configure options depending on use flag |
893 |
-petsc_select() { |
894 |
- use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4" |
895 |
-} |
896 |
- |
897 |
-src_configure() { |
898 |
- # bug 548498 |
899 |
- # PETSc runs mpi processes during configure that result in a sandbox |
900 |
- # violation by trying to open /proc/mtrr rw. This is not easy to |
901 |
- # mitigate because it happens in libpciaccess.so called by libhwloc.so, |
902 |
- # which is used by libmpi.so. |
903 |
- addpredict /proc/mtrr |
904 |
- # if mpi is built with knem support it needs /dev/knem too |
905 |
- addpredict /dev/knem |
906 |
- |
907 |
- # configureMPITypes with openmpi-2* insists on accessing the scaling |
908 |
- # governor rw. |
909 |
- addpredict /sys/devices/system/cpu/ |
910 |
- |
911 |
- # bug 771711 |
912 |
- # configureMPIEXEC and configureMPITypes access /dev/nvidiactl |
913 |
- addpredict /dev/nvidiactl |
914 |
- |
915 |
- # bug 810841 |
916 |
- addpredict /dev/kfd |
917 |
- |
918 |
- local mylang |
919 |
- local myopt |
920 |
- |
921 |
- use cxx && mylang="cxx" || mylang="c" |
922 |
- use debug && myopt="debug" || myopt="opt" |
923 |
- |
924 |
- # environmental variables expected by petsc during build |
925 |
- |
926 |
- export PETSC_DIR="${S}" |
927 |
- export PETSC_ARCH="linux-gnu-${mylang}-${myopt}" |
928 |
- |
929 |
- if use debug; then |
930 |
- strip-flags |
931 |
- filter-flags -O* |
932 |
- fi |
933 |
- |
934 |
- # C Support on CXX builds is enabled if possible i.e. when not using |
935 |
- # complex scalars (no complex type for both available at the same time) |
936 |
- |
937 |
- econf \ |
938 |
- scrollOutput=1 \ |
939 |
- FFLAGS="${FFLAGS} -fPIC" \ |
940 |
- CFLAGS="${CFLAGS} -fPIC" \ |
941 |
- CXXFLAGS="${CXXFLAGS} -fPIC" \ |
942 |
- LDFLAGS="${LDFLAGS}" \ |
943 |
- --prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \ |
944 |
- --with-shared-libraries \ |
945 |
- --with-single-library \ |
946 |
- --with-clanguage=${mylang} \ |
947 |
- $(use cxx && ! use complex-scalars && echo "with-c-support=1") \ |
948 |
- --with-petsc-arch=${PETSC_ARCH} \ |
949 |
- --with-precision=double \ |
950 |
- --with-gnu-compilers \ |
951 |
- --with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \ |
952 |
- $(petsc_enable debug debugging) \ |
953 |
- $(petsc_enable mpi) \ |
954 |
- $(petsc_select mpi cc mpicc $(tc-getCC)) \ |
955 |
- $(petsc_select mpi cxx mpicxx $(tc-getCXX)) \ |
956 |
- $(petsc_enable fortran) \ |
957 |
- $(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \ |
958 |
- $(petsc_enable mpi mpi-compilers) \ |
959 |
- $(petsc_select complex-scalars scalar-type complex real) \ |
960 |
- --with-windows-graphics=0 \ |
961 |
- --with-matlab=0 \ |
962 |
- --with-cmake:BOOL=1 \ |
963 |
- $(petsc_enable threads pthread) \ |
964 |
- $(petsc_with afterimage afterimage \ |
965 |
- /usr/include/libAfterImage -lAfterImage) \ |
966 |
- $(use_with hdf5) \ |
967 |
- $(petsc_with hypre hypre \ |
968 |
- /usr/include/hypre -lHYPRE) \ |
969 |
- $(use_with sparse suitesparse) \ |
970 |
- $(petsc_with superlu superlu \ |
971 |
- /usr/include/superlu -lsuperlu) \ |
972 |
- $(use_with X x) \ |
973 |
- $(use_with X x11) \ |
974 |
- $(petsc_with scotch ptscotch \ |
975 |
- /usr/include/scotch \ |
976 |
- [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \ |
977 |
- $(petsc_with mumps scalapack \ |
978 |
- /usr/include/scalapack -lscalapack) \ |
979 |
- $(use_with mumps mumps \ |
980 |
- /usr/include \ |
981 |
- [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \ |
982 |
- --with-imagemagick=0 \ |
983 |
- --with-python=0 \ |
984 |
- $(use_with boost) \ |
985 |
- $(use_with fftw) |
986 |
-} |
987 |
- |
988 |
-src_install() { |
989 |
- emake DESTDIR="${ED}" install |
990 |
- |
991 |
- # add PETSC_DIR to environmental variables |
992 |
- cat >> 99petsc <<- EOF |
993 |
- PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc |
994 |
- LDPATH=${EPREFIX}/usr/$(get_libdir)/petsc/lib |
995 |
- EOF |
996 |
- doenvd 99petsc |
997 |
-} |