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/files/, sci-mathematics/petsc/
Date: Fri, 31 Aug 2018 15:39:37
Message-Id: 1535685926.7942c05fe297d82b7f4a1e81282aaa9b3bfb406a.tamiko@gentoo
1 commit: 7942c05fe297d82b7f4a1e81282aaa9b3bfb406a
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 31 03:25:26 2018 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 31 03:25:26 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=7942c05f
7
8 sci-mathematics/petsc: remove obsolete patches
9
10 Package-Manager: Portage-2.3.48, Repoman-2.3.10
11
12 .../petsc/files/petsc-3.5.3-disable-rpath.patch | 18 --
13 .../petsc/files/petsc-3.6.0-disable-rpath.patch | 17 --
14 .../files/petsc-3.6.0-fix_sandbox_violation.patch | 15 --
15 .../files/petsc-3.7.0-fix_sandbox_violation.patch | 17 --
16 sci-mathematics/petsc/petsc-3.7.7-r1.ebuild | 205 ---------------------
17 5 files changed, 272 deletions(-)
18
19 diff --git a/sci-mathematics/petsc/files/petsc-3.5.3-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.5.3-disable-rpath.patch
20 deleted file mode 100644
21 index 7fe3760c9..000000000
22 --- a/sci-mathematics/petsc/files/petsc-3.5.3-disable-rpath.patch
23 +++ /dev/null
24 @@ -1,18 +0,0 @@
25 -diff --git a/config/BuildSystem/config/setCompilers.py b/config/BuildSystem/config/setCompilers.py
26 -index 8e0d2ee..ce53ad0 100644
27 ---- a/config/BuildSystem/config/setCompilers.py
28 -+++ b/config/BuildSystem/config/setCompilers.py
29 -@@ -1326,12 +1326,7 @@ class Configure(config.base.Configure):
30 - for language in languages:
31 - flag = '-L'
32 - self.pushLanguage(language)
33 -- # test '-R' before '-rpath' as sun compilers [c,fortran] don't give proper errors with wrong options.
34 -- if not Configure.isDarwin():
35 -- testFlags = ['-Wl,-rpath,', '-R','-rpath ' , '-Wl,-R,']
36 -- else:
37 -- testFlags = []
38 -- # test '-R' before '-Wl,-rpath' for SUN compilers [as cc on linux accepts -Wl,-rpath, but f90 & CC do not.
39 -+ testFlags = []
40 - if self.isSun(self.framework.getCompiler()):
41 - testFlags.insert(0,'-R')
42 - for testFlag in testFlags:
43
44 diff --git a/sci-mathematics/petsc/files/petsc-3.6.0-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.6.0-disable-rpath.patch
45 deleted file mode 100644
46 index 88a7db565..000000000
47 --- a/sci-mathematics/petsc/files/petsc-3.6.0-disable-rpath.patch
48 +++ /dev/null
49 @@ -1,17 +0,0 @@
50 -diff --git a/config/BuildSystem/config/setCompilers.py b/config/BuildSystem/config/setCompilers.py
51 ---- a/config/BuildSystem/config/setCompilers.py
52 -+++ b/config/BuildSystem/config/setCompilers.py
53 -@@ -1326,12 +1326,7 @@ class Configure(config.base.Configure):
54 - for language in languages:
55 - flag = '-L'
56 - self.pushLanguage(language)
57 -- # test '-R' before '-rpath' as sun compilers [c,fortran] don't give proper errors with wrong options.
58 -- if not Configure.isDarwin():
59 -- testFlags = ['-Wl,-rpath,', '-R','-rpath ' , '-Wl,-R,']
60 -- else:
61 -- testFlags = ['-Wl,-rpath,']
62 -- # test '-R' before '-Wl,-rpath' for SUN compilers [as cc on linux accepts -Wl,-rpath, but f90 & CC do not.
63 -+ testFlags = []
64 - if self.isSun(self.framework.getCompiler()):
65 - testFlags.insert(0,'-R')
66 - for testFlag in testFlags:
67
68 diff --git a/sci-mathematics/petsc/files/petsc-3.6.0-fix_sandbox_violation.patch b/sci-mathematics/petsc/files/petsc-3.6.0-fix_sandbox_violation.patch
69 deleted file mode 100644
70 index 7510631a1..000000000
71 --- a/sci-mathematics/petsc/files/petsc-3.6.0-fix_sandbox_violation.patch
72 +++ /dev/null
73 @@ -1,15 +0,0 @@
74 ---- config/PETSc/options/installDir.py.orig 2015-06-23 18:11:25.054911894 +0200
75 -+++ config/PETSc/options/installDir.py 2015-06-23 18:11:44.100289841 +0200
76 -@@ -38,12 +38,6 @@
77 - self.installSudoMessage = ''
78 - if self.framework.argDB['prefix']:
79 - self.dir = self.framework.argDB['prefix']
80 -- try:
81 -- os.makedirs(os.path.join(self.dir,'PETScTestDirectory'))
82 -- os.rmdir(os.path.join(self.dir,'PETScTestDirectory'))
83 -- except:
84 -- 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'
85 -- self.installSudo = 'sudo '
86 - else:
87 - self.dir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
88 - self.confDir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
89
90 diff --git a/sci-mathematics/petsc/files/petsc-3.7.0-fix_sandbox_violation.patch b/sci-mathematics/petsc/files/petsc-3.7.0-fix_sandbox_violation.patch
91 deleted file mode 100644
92 index 191ca18c4..000000000
93 --- a/sci-mathematics/petsc/files/petsc-3.7.0-fix_sandbox_violation.patch
94 +++ /dev/null
95 @@ -1,17 +0,0 @@
96 -diff --git a/config/PETSc/options/installDir.py b/config/PETSc/options/installDir.py
97 -index 0e2567c..bf782b5 100644
98 ---- a/config/PETSc/options/installDir.py
99 -+++ b/config/PETSc/options/installDir.py
100 -@@ -38,12 +38,6 @@ class Configure(config.base.Configure):
101 - self.installSudoMessage = ''
102 - if self.framework.argDB['prefix']:
103 - self.dir = os.path.abspath(os.path.expanduser(self.framework.argDB['prefix']))
104 -- try:
105 -- os.makedirs(os.path.join(self.dir,'PETScTestDirectory'))
106 -- os.rmdir(os.path.join(self.dir,'PETScTestDirectory'))
107 -- except:
108 -- 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'
109 -- self.installSudo = 'sudo '
110 - else:
111 - self.dir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
112 - self.confDir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
113
114 diff --git a/sci-mathematics/petsc/petsc-3.7.7-r1.ebuild b/sci-mathematics/petsc/petsc-3.7.7-r1.ebuild
115 deleted file mode 100644
116 index ddd6202e0..000000000
117 --- a/sci-mathematics/petsc/petsc-3.7.7-r1.ebuild
118 +++ /dev/null
119 @@ -1,205 +0,0 @@
120 -# Copyright 1999-2018 Gentoo Foundation
121 -# Distributed under the terms of the GNU General Public License v2
122 -
123 -EAPI=6
124 -
125 -PYTHON_COMPAT=( python2_7 )
126 -
127 -inherit eutils flag-o-matic fortran-2 python-any-r1 toolchain-funcs versionator
128 -
129 -MY_P="${PN}-$(replace_version_separator _ -)"
130 -
131 -DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
132 -HOMEPAGE="http://www.mcs.anl.gov/petsc/"
133 -SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${MY_P}.tar.gz"
134 -
135 -LICENSE="BSD-2"
136 -SLOT="0"
137 -KEYWORDS="~x86 ~amd64"
138 -IUSE="afterimage boost complex-scalars cxx debug doc fftw
139 - fortran hdf5 hypre mpi metis mumps scotch sparse superlu threads X"
140 -
141 -# hypre and superlu curretly exclude each other due to missing linking to hypre
142 -# if both are enabled
143 -REQUIRED_USE="
144 - afterimage? ( X )
145 - complex-scalars? ( !hypre !superlu )
146 - hdf5? ( mpi )
147 - hypre? ( cxx mpi !superlu )
148 - mumps? ( mpi scotch )
149 - scotch? ( mpi )
150 - superlu? ( !hypre )
151 -"
152 -
153 -RDEPEND="
154 - virtual/blas
155 - virtual/lapack
156 - afterimage? ( media-libs/libafterimage )
157 - boost? ( dev-libs/boost )
158 - fftw? ( sci-libs/fftw:3.0[mpi?] )
159 - hdf5? ( sci-libs/hdf5[mpi?] )
160 - hypre? ( >=sci-libs/hypre-2.8.0b[mpi?] )
161 - metis? ( >=sci-libs/parmetis-4 )
162 - mpi? ( virtual/mpi[cxx?,fortran?] )
163 - mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
164 - scotch? ( sci-libs/scotch[mpi?] )
165 - sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 )
166 - superlu? ( >=sci-libs/superlu-5 )
167 - X? ( x11-libs/libX11 )
168 -"
169 -
170 -DEPEND="${RDEPEND}
171 - ${PYTHON_DEPS}
172 - virtual/pkgconfig
173 - dev-util/cmake
174 -"
175 -
176 -#
177 -# PETSc does not want its Makefiles to be invoked with anything higher than
178 -# -j1. The underlying build system does automatically invoke a parallel
179 -# build. This might not be what you want, but *hey* not your choice.
180 -#
181 -# V=1 enables verbose output with full compiler and linker invocation
182 -#
183 -MAKEOPTS="${MAKEOPTS} -j1 V=1"
184 -
185 -S="${WORKDIR}/${MY_P}"
186 -
187 -PATCHES=(
188 - "${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch \
189 - "${FILESDIR}"/${PN}-3.7.0-fix_sandbox_violation.patch
190 -)
191 -
192 -src_prepare() {
193 - default
194 -
195 - sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die
196 -}
197 -
198 -# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
199 -petsc_enable() {
200 - use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"
201 -}
202 -# add external library:
203 -# petsc_with use_flag libname libdir
204 -# petsc_with use_flag libname include linking_libs
205 -petsc_with() {
206 - local myuse p=${2:-${1}}
207 - if use ${1}; then
208 - myuse="--with-${p}=1"
209 - if [[ $# -ge 4 ]]; then
210 - myuse="${myuse} --with-${p}-include=${EPREFIX}${3}"
211 - shift 3
212 - myuse="${myuse} --with-${p}-lib=$@"
213 - else
214 - myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
215 - fi
216 - else
217 - myuse="--with-${p}=0"
218 - fi
219 - echo ${myuse}
220 -}
221 -
222 -# select between configure options depending on use flag
223 -petsc_select() {
224 - use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
225 -}
226 -
227 -src_configure() {
228 - # bug 548498
229 - # PETSc runs mpi processes during configure that result in a sandbox
230 - # violation by trying to open /proc/mtrr rw. This is not easy to
231 - # mitigate because it happens in libpciaccess.so called by libhwloc.so,
232 - # which is used by libmpi.so.
233 - addpredict /proc/mtrr
234 - # if mpi is built with knem support it needs /dev/knem too
235 - addpredict /dev/knem
236 -
237 - # configureMPITypes with openmpi-2* insists on accessing the scaling
238 - # governor rw.
239 - addpredict /sys/devices/system/cpu/
240 -
241 - local mylang
242 - local myopt
243 -
244 - use cxx && mylang="cxx" || mylang="c"
245 - use debug && myopt="debug" || myopt="opt"
246 -
247 - # environmental variables expected by petsc during build
248 -
249 - export PETSC_DIR="${S}"
250 - export PETSC_ARCH="linux-gnu-${mylang}-${myopt}"
251 -
252 - if use debug; then
253 - strip-flags
254 - filter-flags -O*
255 - fi
256 -
257 - # C Support on CXX builds is enabled if possible i.e. when not using
258 - # complex scalars (no complex type for both available at the same time)
259 -
260 - econf \
261 - scrollOutput=1 \
262 - FFLAGS="${FFLAGS} -fPIC" \
263 - CFLAGS="${CFLAGS} -fPIC" \
264 - CXXFLAGS="${CXXFLAGS} -fPIC" \
265 - LDFLAGS="${LDFLAGS}" \
266 - --prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \
267 - --with-shared-libraries \
268 - --with-single-library \
269 - --with-clanguage=${mylang} \
270 - $(use cxx && ! use complex-scalars && echo "with-c-support=1") \
271 - --with-petsc-arch=${PETSC_ARCH} \
272 - --with-precision=double \
273 - --with-gnu-compilers \
274 - --with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs lapack)" \
275 - $(petsc_enable debug debugging) \
276 - $(petsc_enable mpi) \
277 - $(petsc_select mpi cc mpicc $(tc-getCC)) \
278 - $(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
279 - $(petsc_enable fortran) \
280 - $(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
281 - $(petsc_enable mpi mpi-compilers) \
282 - $(petsc_select complex-scalars scalar-type complex real) \
283 - --with-windows-graphics=0 \
284 - --with-matlab=0 \
285 - --with-cmake=cmake \
286 - $(petsc_enable threads pthread) \
287 - $(petsc_with afterimage afterimage \
288 - /usr/include/libAfterImage -lAfterImage) \
289 - $(petsc_with hdf5) \
290 - $(petsc_with hypre hypre \
291 - /usr/include/hypre -lHYPRE) \
292 - $(petsc_with sparse suitesparse) \
293 - $(petsc_with superlu superlu \
294 - /usr/include/superlu -lsuperlu) \
295 - $(petsc_with X x) \
296 - $(petsc_with X x11) \
297 - $(petsc_with scotch ptscotch \
298 - /usr/include/scotch \
299 - [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
300 - $(petsc_with mumps scalapack \
301 - /usr/include/scalapack -lscalapack) \
302 - $(petsc_with mumps mumps \
303 - /usr/include \
304 - [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
305 - --with-imagemagick=0 \
306 - --with-python=0 \
307 - $(petsc_with boost) \
308 - $(petsc_with fftw)
309 -}
310 -
311 -src_install() {
312 - emake DESTDIR="${D}/usr/$(get_libdir)/petsc" install
313 -
314 - # add PETSC_DIR to environmental variables
315 - cat >> 99petsc <<- EOF
316 - PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
317 - EOF
318 - doenvd 99petsc
319 -
320 - if use doc ; then
321 - dodoc docs/developers.pdf docs/manual.pdf
322 - dohtml -r docs/*.html docs/changes docs/manualpages
323 - fi
324 -}