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-mathematics/petsc/
Date: Mon, 17 Sep 2018 15:41:16
Message-Id: 1537197258.e9aa00ee0ca860b1047a9d25b83e4d2cc06269f9.tamiko@gentoo
1 commit: e9aa00ee0ca860b1047a9d25b83e4d2cc06269f9
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Mon Sep 17 15:14:18 2018 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Mon Sep 17 15:14:18 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=e9aa00ee
7
8 sci-mathematics/petsc: drop old 3.9*
9
10 Package-Manager: Portage-2.3.49, Repoman-2.3.10
11
12 sci-mathematics/petsc/petsc-3.9.2.ebuild | 196 -------------------------------
13 sci-mathematics/petsc/petsc-3.9.3.ebuild | 196 -------------------------------
14 2 files changed, 392 deletions(-)
15
16 diff --git a/sci-mathematics/petsc/petsc-3.9.2.ebuild b/sci-mathematics/petsc/petsc-3.9.2.ebuild
17 deleted file mode 100644
18 index 1755e242a..000000000
19 --- a/sci-mathematics/petsc/petsc-3.9.2.ebuild
20 +++ /dev/null
21 @@ -1,196 +0,0 @@
22 -# Copyright 1999-2018 Gentoo Foundation
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=6
26 -
27 -PYTHON_COMPAT=( python2_7 )
28 -
29 -inherit eutils flag-o-matic fortran-2 python-any-r1 toolchain-funcs versionator
30 -
31 -MY_P="${PN}-$(replace_version_separator _ -)"
32 -
33 -DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
34 -HOMEPAGE="http://www.mcs.anl.gov/petsc/"
35 -SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${MY_P}.tar.gz"
36 -
37 -LICENSE="BSD-2"
38 -SLOT="0"
39 -KEYWORDS="~x86 ~amd64"
40 -IUSE="afterimage boost complex-scalars cxx debug doc fftw
41 - fortran hdf5 hypre mpi metis mumps scotch sparse superlu threads X"
42 -
43 -# hypre and superlu curretly exclude each other due to missing linking to hypre
44 -# if both are enabled
45 -REQUIRED_USE="
46 - afterimage? ( X )
47 - complex-scalars? ( !hypre !superlu )
48 - hdf5? ( mpi )
49 - hypre? ( cxx mpi !superlu )
50 - mumps? ( mpi scotch )
51 - scotch? ( mpi )
52 - superlu? ( !hypre )
53 -"
54 -
55 -RDEPEND="
56 - virtual/blas
57 - virtual/lapack
58 - afterimage? ( media-libs/libafterimage )
59 - boost? ( dev-libs/boost )
60 - fftw? ( sci-libs/fftw:3.0[mpi?] )
61 - hdf5? ( sci-libs/hdf5[mpi?] )
62 - hypre? ( >=sci-libs/hypre-2.8.0b[mpi?] )
63 - metis? ( >=sci-libs/parmetis-4 )
64 - mpi? ( virtual/mpi[cxx?,fortran?] )
65 - mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
66 - scotch? ( sci-libs/scotch[mpi?] )
67 - sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 )
68 - superlu? ( >=sci-libs/superlu-5 )
69 - X? ( x11-libs/libX11 )
70 -"
71 -
72 -DEPEND="${RDEPEND}
73 - ${PYTHON_DEPS}
74 - virtual/pkgconfig
75 - dev-util/cmake
76 -"
77 -
78 -S="${WORKDIR}/${MY_P}"
79 -
80 -PATCHES=(
81 - "${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch \
82 - "${FILESDIR}"/${PN}-3.9.0-fix_sandbox_violation.patch
83 -)
84 -
85 -src_prepare() {
86 - default
87 -
88 - sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die
89 -}
90 -
91 -# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
92 -petsc_enable() {
93 - use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"
94 -}
95 -# add external library:
96 -# petsc_with use_flag libname libdir
97 -# petsc_with use_flag libname include linking_libs
98 -petsc_with() {
99 - local myuse p=${2:-${1}}
100 - if use ${1}; then
101 - myuse="--with-${p}=1"
102 - if [[ $# -ge 4 ]]; then
103 - myuse="${myuse} --with-${p}-include=${EPREFIX}${3}"
104 - shift 3
105 - myuse="${myuse} --with-${p}-lib=$@"
106 - else
107 - myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
108 - fi
109 - else
110 - myuse="--with-${p}=0"
111 - fi
112 - echo ${myuse}
113 -}
114 -
115 -# select between configure options depending on use flag
116 -petsc_select() {
117 - use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
118 -}
119 -
120 -src_configure() {
121 - # bug 548498
122 - # PETSc runs mpi processes during configure that result in a sandbox
123 - # violation by trying to open /proc/mtrr rw. This is not easy to
124 - # mitigate because it happens in libpciaccess.so called by libhwloc.so,
125 - # which is used by libmpi.so.
126 - addpredict /proc/mtrr
127 - # if mpi is built with knem support it needs /dev/knem too
128 - addpredict /dev/knem
129 -
130 - # configureMPITypes with openmpi-2* insists on accessing the scaling
131 - # governor rw.
132 - addpredict /sys/devices/system/cpu/
133 -
134 - local mylang
135 - local myopt
136 -
137 - use cxx && mylang="cxx" || mylang="c"
138 - use debug && myopt="debug" || myopt="opt"
139 -
140 - # environmental variables expected by petsc during build
141 -
142 - export PETSC_DIR="${S}"
143 - export PETSC_ARCH="linux-gnu-${mylang}-${myopt}"
144 -
145 - if use debug; then
146 - strip-flags
147 - filter-flags -O*
148 - fi
149 -
150 - # C Support on CXX builds is enabled if possible i.e. when not using
151 - # complex scalars (no complex type for both available at the same time)
152 -
153 - econf \
154 - scrollOutput=1 \
155 - FFLAGS="${FFLAGS} -fPIC" \
156 - CFLAGS="${CFLAGS} -fPIC" \
157 - CXXFLAGS="${CXXFLAGS} -fPIC" \
158 - LDFLAGS="${LDFLAGS}" \
159 - --prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \
160 - --with-shared-libraries \
161 - --with-single-library \
162 - --with-clanguage=${mylang} \
163 - $(use cxx && ! use complex-scalars && echo "with-c-support=1") \
164 - --with-petsc-arch=${PETSC_ARCH} \
165 - --with-precision=double \
166 - --with-gnu-compilers \
167 - --with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs lapack)" \
168 - $(petsc_enable debug debugging) \
169 - $(petsc_enable mpi) \
170 - $(petsc_select mpi cc mpicc $(tc-getCC)) \
171 - $(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
172 - $(petsc_enable fortran) \
173 - $(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
174 - $(petsc_enable mpi mpi-compilers) \
175 - $(petsc_select complex-scalars scalar-type complex real) \
176 - --with-windows-graphics=0 \
177 - --with-matlab=0 \
178 - --with-cmake=cmake \
179 - $(petsc_enable threads pthread) \
180 - $(petsc_with afterimage afterimage \
181 - /usr/include/libAfterImage -lAfterImage) \
182 - $(petsc_with hdf5) \
183 - $(petsc_with hypre hypre \
184 - /usr/include/hypre -lHYPRE) \
185 - $(petsc_with sparse suitesparse) \
186 - $(petsc_with superlu superlu \
187 - /usr/include/superlu -lsuperlu) \
188 - $(petsc_with X x) \
189 - $(petsc_with X x11) \
190 - $(petsc_with scotch ptscotch \
191 - /usr/include/scotch \
192 - [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
193 - $(petsc_with mumps scalapack \
194 - /usr/include/scalapack -lscalapack) \
195 - $(petsc_with mumps mumps \
196 - /usr/include \
197 - [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
198 - --with-imagemagick=0 \
199 - --with-python=0 \
200 - $(petsc_with boost) \
201 - $(petsc_with fftw)
202 -}
203 -
204 -src_install() {
205 - emake DESTDIR="${ED}" install
206 -
207 - # add PETSC_DIR to environmental variables
208 - cat >> 99petsc <<- EOF
209 - PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
210 - EOF
211 - doenvd 99petsc
212 -
213 - if use doc ; then
214 - dodoc docs/developers.pdf docs/manual.pdf
215 - dohtml -r docs/*.html docs/changes docs/manualpages
216 - fi
217 -}
218
219 diff --git a/sci-mathematics/petsc/petsc-3.9.3.ebuild b/sci-mathematics/petsc/petsc-3.9.3.ebuild
220 deleted file mode 100644
221 index 1755e242a..000000000
222 --- a/sci-mathematics/petsc/petsc-3.9.3.ebuild
223 +++ /dev/null
224 @@ -1,196 +0,0 @@
225 -# Copyright 1999-2018 Gentoo Foundation
226 -# Distributed under the terms of the GNU General Public License v2
227 -
228 -EAPI=6
229 -
230 -PYTHON_COMPAT=( python2_7 )
231 -
232 -inherit eutils flag-o-matic fortran-2 python-any-r1 toolchain-funcs versionator
233 -
234 -MY_P="${PN}-$(replace_version_separator _ -)"
235 -
236 -DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
237 -HOMEPAGE="http://www.mcs.anl.gov/petsc/"
238 -SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${MY_P}.tar.gz"
239 -
240 -LICENSE="BSD-2"
241 -SLOT="0"
242 -KEYWORDS="~x86 ~amd64"
243 -IUSE="afterimage boost complex-scalars cxx debug doc fftw
244 - fortran hdf5 hypre mpi metis mumps scotch sparse superlu threads X"
245 -
246 -# hypre and superlu curretly exclude each other due to missing linking to hypre
247 -# if both are enabled
248 -REQUIRED_USE="
249 - afterimage? ( X )
250 - complex-scalars? ( !hypre !superlu )
251 - hdf5? ( mpi )
252 - hypre? ( cxx mpi !superlu )
253 - mumps? ( mpi scotch )
254 - scotch? ( mpi )
255 - superlu? ( !hypre )
256 -"
257 -
258 -RDEPEND="
259 - virtual/blas
260 - virtual/lapack
261 - afterimage? ( media-libs/libafterimage )
262 - boost? ( dev-libs/boost )
263 - fftw? ( sci-libs/fftw:3.0[mpi?] )
264 - hdf5? ( sci-libs/hdf5[mpi?] )
265 - hypre? ( >=sci-libs/hypre-2.8.0b[mpi?] )
266 - metis? ( >=sci-libs/parmetis-4 )
267 - mpi? ( virtual/mpi[cxx?,fortran?] )
268 - mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
269 - scotch? ( sci-libs/scotch[mpi?] )
270 - sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 )
271 - superlu? ( >=sci-libs/superlu-5 )
272 - X? ( x11-libs/libX11 )
273 -"
274 -
275 -DEPEND="${RDEPEND}
276 - ${PYTHON_DEPS}
277 - virtual/pkgconfig
278 - dev-util/cmake
279 -"
280 -
281 -S="${WORKDIR}/${MY_P}"
282 -
283 -PATCHES=(
284 - "${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch \
285 - "${FILESDIR}"/${PN}-3.9.0-fix_sandbox_violation.patch
286 -)
287 -
288 -src_prepare() {
289 - default
290 -
291 - sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die
292 -}
293 -
294 -# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
295 -petsc_enable() {
296 - use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"
297 -}
298 -# add external library:
299 -# petsc_with use_flag libname libdir
300 -# petsc_with use_flag libname include linking_libs
301 -petsc_with() {
302 - local myuse p=${2:-${1}}
303 - if use ${1}; then
304 - myuse="--with-${p}=1"
305 - if [[ $# -ge 4 ]]; then
306 - myuse="${myuse} --with-${p}-include=${EPREFIX}${3}"
307 - shift 3
308 - myuse="${myuse} --with-${p}-lib=$@"
309 - else
310 - myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
311 - fi
312 - else
313 - myuse="--with-${p}=0"
314 - fi
315 - echo ${myuse}
316 -}
317 -
318 -# select between configure options depending on use flag
319 -petsc_select() {
320 - use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
321 -}
322 -
323 -src_configure() {
324 - # bug 548498
325 - # PETSc runs mpi processes during configure that result in a sandbox
326 - # violation by trying to open /proc/mtrr rw. This is not easy to
327 - # mitigate because it happens in libpciaccess.so called by libhwloc.so,
328 - # which is used by libmpi.so.
329 - addpredict /proc/mtrr
330 - # if mpi is built with knem support it needs /dev/knem too
331 - addpredict /dev/knem
332 -
333 - # configureMPITypes with openmpi-2* insists on accessing the scaling
334 - # governor rw.
335 - addpredict /sys/devices/system/cpu/
336 -
337 - local mylang
338 - local myopt
339 -
340 - use cxx && mylang="cxx" || mylang="c"
341 - use debug && myopt="debug" || myopt="opt"
342 -
343 - # environmental variables expected by petsc during build
344 -
345 - export PETSC_DIR="${S}"
346 - export PETSC_ARCH="linux-gnu-${mylang}-${myopt}"
347 -
348 - if use debug; then
349 - strip-flags
350 - filter-flags -O*
351 - fi
352 -
353 - # C Support on CXX builds is enabled if possible i.e. when not using
354 - # complex scalars (no complex type for both available at the same time)
355 -
356 - econf \
357 - scrollOutput=1 \
358 - FFLAGS="${FFLAGS} -fPIC" \
359 - CFLAGS="${CFLAGS} -fPIC" \
360 - CXXFLAGS="${CXXFLAGS} -fPIC" \
361 - LDFLAGS="${LDFLAGS}" \
362 - --prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \
363 - --with-shared-libraries \
364 - --with-single-library \
365 - --with-clanguage=${mylang} \
366 - $(use cxx && ! use complex-scalars && echo "with-c-support=1") \
367 - --with-petsc-arch=${PETSC_ARCH} \
368 - --with-precision=double \
369 - --with-gnu-compilers \
370 - --with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs lapack)" \
371 - $(petsc_enable debug debugging) \
372 - $(petsc_enable mpi) \
373 - $(petsc_select mpi cc mpicc $(tc-getCC)) \
374 - $(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
375 - $(petsc_enable fortran) \
376 - $(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
377 - $(petsc_enable mpi mpi-compilers) \
378 - $(petsc_select complex-scalars scalar-type complex real) \
379 - --with-windows-graphics=0 \
380 - --with-matlab=0 \
381 - --with-cmake=cmake \
382 - $(petsc_enable threads pthread) \
383 - $(petsc_with afterimage afterimage \
384 - /usr/include/libAfterImage -lAfterImage) \
385 - $(petsc_with hdf5) \
386 - $(petsc_with hypre hypre \
387 - /usr/include/hypre -lHYPRE) \
388 - $(petsc_with sparse suitesparse) \
389 - $(petsc_with superlu superlu \
390 - /usr/include/superlu -lsuperlu) \
391 - $(petsc_with X x) \
392 - $(petsc_with X x11) \
393 - $(petsc_with scotch ptscotch \
394 - /usr/include/scotch \
395 - [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
396 - $(petsc_with mumps scalapack \
397 - /usr/include/scalapack -lscalapack) \
398 - $(petsc_with mumps mumps \
399 - /usr/include \
400 - [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
401 - --with-imagemagick=0 \
402 - --with-python=0 \
403 - $(petsc_with boost) \
404 - $(petsc_with fftw)
405 -}
406 -
407 -src_install() {
408 - emake DESTDIR="${ED}" install
409 -
410 - # add PETSC_DIR to environmental variables
411 - cat >> 99petsc <<- EOF
412 - PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
413 - EOF
414 - doenvd 99petsc
415 -
416 - if use doc ; then
417 - dodoc docs/developers.pdf docs/manual.pdf
418 - dohtml -r docs/*.html docs/changes docs/manualpages
419 - fi
420 -}