public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2019-11-14  6:13 Matthias Maier
  0 siblings, 0 replies; 25+ messages in thread
From: Matthias Maier @ 2019-11-14  6:13 UTC (permalink / raw
  To: gentoo-commits

commit:     c2c778c07dd1a8a631c2d1e4d959512db8675062
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 14 05:00:41 2019 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Thu Nov 14 06:01:48 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2c778c0

sci-mathematics/petsc: version bump to 3.12.1

Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-mathematics/petsc/Manifest                                     | 1 +
 sci-mathematics/petsc/petsc-3.11.3.ebuild                          | 2 +-
 sci-mathematics/petsc/{petsc-3.11.3.ebuild => petsc-3.12.1.ebuild} | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sci-mathematics/petsc/Manifest b/sci-mathematics/petsc/Manifest
index 3be30d7421f..35342d214c5 100644
--- a/sci-mathematics/petsc/Manifest
+++ b/sci-mathematics/petsc/Manifest
@@ -1 +1,2 @@
 DIST petsc-3.11.3.tar.gz 33279017 BLAKE2B 870b8245e5e06d8538ea3ee1d01fa2cebade4a0bd79dfcf17d74e6201f41d21ca021e206744ece28847b434ece142a2789851b5514a8a1e3f82a8551288b695b SHA512 e545f69e87bc72950939ff3cec3e0ba225a5b3e7f1cb93b0fb6123194eb7240ac1d97ba397235d8ab872c653caab1427673124e5e1e706b796c0ae46ec1bcffa
+DIST petsc-3.12.1.tar.gz 34592587 BLAKE2B b48056a1fe1d507338f7d145f5fceeab2b2f576470d8af90c9d7828de9b775daadf11198fecc46b5e48fcf1eb38addb366e3a908dab5c4ffaf7f9b71ff17b3d8 SHA512 df33170922c0b34136d2fd5bdc3c68a80d3a5873d66bfb03b2cea4a6456393c7181a8da673911b89ea0fcb51d5fd89b5b4c8b76ddb1df573180a92d029fbc1fb

diff --git a/sci-mathematics/petsc/petsc-3.11.3.ebuild b/sci-mathematics/petsc/petsc-3.11.3.ebuild
index 88fb1f58da1..50ce3b7f663 100644
--- a/sci-mathematics/petsc/petsc-3.11.3.ebuild
+++ b/sci-mathematics/petsc/petsc-3.11.3.ebuild
@@ -154,7 +154,7 @@ src_configure() {
 		$(petsc_enable threads pthread) \
 		$(petsc_with afterimage afterimage \
 			/usr/include/libAfterImage -lAfterImage) \
-		$(petsc_with hdf5) \
+		$(use_with hdf5) \
 		$(petsc_with hypre hypre \
 			/usr/include/hypre -lHYPRE) \
 		$(petsc_with sparse suitesparse) \

diff --git a/sci-mathematics/petsc/petsc-3.11.3.ebuild b/sci-mathematics/petsc/petsc-3.12.1.ebuild
similarity index 99%
copy from sci-mathematics/petsc/petsc-3.11.3.ebuild
copy to sci-mathematics/petsc/petsc-3.12.1.ebuild
index 88fb1f58da1..50ce3b7f663 100644
--- a/sci-mathematics/petsc/petsc-3.11.3.ebuild
+++ b/sci-mathematics/petsc/petsc-3.12.1.ebuild
@@ -154,7 +154,7 @@ src_configure() {
 		$(petsc_enable threads pthread) \
 		$(petsc_with afterimage afterimage \
 			/usr/include/libAfterImage -lAfterImage) \
-		$(petsc_with hdf5) \
+		$(use_with hdf5) \
 		$(petsc_with hypre hypre \
 			/usr/include/hypre -lHYPRE) \
 		$(petsc_with sparse suitesparse) \


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2019-11-14 23:26 Matthias Maier
  0 siblings, 0 replies; 25+ messages in thread
From: Matthias Maier @ 2019-11-14 23:26 UTC (permalink / raw
  To: gentoo-commits

commit:     3fae04d5214f2296674ad463bb8ebdc83d2245fa
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 14 23:25:42 2019 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Thu Nov 14 23:26:40 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fae04d5

sci-mathematics/petsc: more configuration fixes

Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-mathematics/petsc/petsc-3.12.1.ebuild | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sci-mathematics/petsc/petsc-3.12.1.ebuild b/sci-mathematics/petsc/petsc-3.12.1.ebuild
index 2e5365823ea..845d7ff75d6 100644
--- a/sci-mathematics/petsc/petsc-3.12.1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.12.1.ebuild
@@ -159,23 +159,23 @@ src_configure() {
 		$(use_with hdf5) \
 		$(petsc_with hypre hypre \
 			/usr/include/hypre -lHYPRE) \
-		$(petsc_with sparse suitesparse) \
+		$(use_with sparse suitesparse) \
 		$(petsc_with superlu superlu \
 			/usr/include/superlu -lsuperlu) \
-		$(petsc_with X x) \
-		$(petsc_with X x11) \
+		$(use_with X x) \
+		$(use_with X x11) \
 		$(petsc_with scotch ptscotch \
 			/usr/include/scotch \
 		[-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
 		$(petsc_with mumps scalapack \
 			/usr/include/scalapack -lscalapack) \
-		$(petsc_with mumps mumps \
+		$(use_with mumps mumps \
 			/usr/include \
 			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
 		--with-imagemagick=0 \
 		--with-python=0 \
-		$(petsc_with boost) \
-		$(petsc_with fftw)
+		$(use_with boost) \
+		$(use_with fftw)
 }
 
 src_install() {


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2020-05-10 22:02 Matthias Maier
  0 siblings, 0 replies; 25+ messages in thread
From: Matthias Maier @ 2020-05-10 22:02 UTC (permalink / raw
  To: gentoo-commits

commit:     c17765980c6ee166378997cd0c0bd9fc35561f68
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Sun May 10 22:00:01 2020 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Sun May 10 22:00:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1776598

sci-mathematics/petsc: version bump to 3.13.1

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-mathematics/petsc/Manifest            |   1 +
 sci-mathematics/petsc/petsc-3.13.1.ebuild | 189 ++++++++++++++++++++++++++++++
 2 files changed, 190 insertions(+)

diff --git a/sci-mathematics/petsc/Manifest b/sci-mathematics/petsc/Manifest
index c224c776882..08d519f80c2 100644
--- a/sci-mathematics/petsc/Manifest
+++ b/sci-mathematics/petsc/Manifest
@@ -1 +1,2 @@
 DIST petsc-3.13.0.tar.gz 35080264 BLAKE2B 0ac58e53751dbc6e053e3591cdf2363194e0cf7a493f252d879031e0135da16fa24e66974dd7bf07ce18558a75f8dd794e87f96590ad9e550d11edfeb462f727 SHA512 0590bb63d9c6dfd6ac03b1b88e5a8c11d42a0fd014084603d4d085060b126aa4341b4ec3a4d2b12146b971da327ccc7ede370e5633282bf44f269465aea32953
+DIST petsc-3.13.1.tar.gz 35097687 BLAKE2B fccf64fd3694deffdd0dc561069ffa7e9342fe279b5c9123edeb011df931874083839d27b7b9a0c63faea6487b104b54fd4ce68a88a074c82de91e8baaf270b0 SHA512 41c3138a6ae6c1f2d9077b464c6aeda96287e5a76849582b8f432e2ee93d2594a78ba2181eac0054a77b6165692be5f1a057049313f2be9743d4246383dfdc77

diff --git a/sci-mathematics/petsc/petsc-3.13.1.ebuild b/sci-mathematics/petsc/petsc-3.13.1.ebuild
new file mode 100644
index 00000000000..961ff927f72
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.13.1.ebuild
@@ -0,0 +1,189 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+
+inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs
+
+DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
+HOMEPAGE="http://www.mcs.anl.gov/petsc/"
+SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="afterimage boost complex-scalars cxx debug doc fftw
+	fortran hdf5 hypre mpi metis mumps scotch sparse superlu threads X"
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	complex-scalars? ( !hypre !superlu )
+	hdf5? ( mpi )
+	hypre? ( cxx mpi !superlu )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	superlu? ( !hypre )
+"
+
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+	afterimage? ( media-libs/libafterimage )
+	boost? ( dev-libs/boost )
+	fftw? ( sci-libs/fftw:3.0[mpi?] )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.18.0[mpi?] )
+	metis? ( >=sci-libs/parmetis-4 )
+	mpi? ( virtual/mpi[cxx?,fortran?] )
+	mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
+	scotch? ( sci-libs/scotch[mpi?] )
+	sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 )
+	superlu? ( >=sci-libs/superlu-5 )
+	X? ( x11-libs/libX11 )
+"
+
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	virtual/pkgconfig
+	dev-util/cmake
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch
+	"${FILESDIR}"/${PN}-3.13.0-fix_sandbox_violation.patch
+	"${FILESDIR}"/${PN}-3.13.0-make_hypre_configure.patch
+	"${FILESDIR}"/${PN}-3.13.0-do_not_run_mpiexec.patch
+)
+
+# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
+petsc_enable() {
+	use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"
+}
+# add external library:
+# petsc_with use_flag libname libdir
+# petsc_with use_flag libname include linking_libs
+petsc_with() {
+	local myuse p=${2:-${1}}
+	if use ${1}; then
+		myuse="--with-${p}=1"
+		if [[ $# -ge 4 ]]; then
+			myuse="${myuse} --with-${p}-include=${EPREFIX}${3}"
+			shift 3
+			myuse="${myuse} --with-${p}-lib=$@"
+		else
+			myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
+		fi
+	else
+		myuse="--with-${p}=0"
+	fi
+	echo ${myuse}
+}
+
+# select between configure options depending on use flag
+petsc_select() {
+	use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
+}
+
+src_configure() {
+	# bug 548498
+	# PETSc runs mpi processes during configure that result in a sandbox
+	# violation by trying to open /proc/mtrr rw. This is not easy to
+	# mitigate because it happens in libpciaccess.so called by libhwloc.so,
+	# which is used by libmpi.so.
+	addpredict /proc/mtrr
+	# if mpi is built with knem support it needs /dev/knem too
+	addpredict /dev/knem
+
+	# configureMPITypes with openmpi-2* insists on accessing the scaling
+	# governor rw.
+	addpredict /sys/devices/system/cpu/
+
+	local mylang
+	local myopt
+
+	use cxx && mylang="cxx" || mylang="c"
+	use debug && myopt="debug" || myopt="opt"
+
+	# environmental variables expected by petsc during build
+
+	export PETSC_DIR="${S}"
+	export PETSC_ARCH="linux-gnu-${mylang}-${myopt}"
+
+	if use debug; then
+		strip-flags
+		filter-flags -O*
+	fi
+
+	# C Support on CXX builds is enabled if possible i.e. when not using
+	# complex scalars (no complex type for both available at the same time)
+
+	econf \
+		scrollOutput=1 \
+		FFLAGS="${FFLAGS} -fPIC" \
+		CFLAGS="${CFLAGS} -fPIC" \
+		CXXFLAGS="${CXXFLAGS} -fPIC" \
+		LDFLAGS="${LDFLAGS}" \
+		--prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \
+		--with-shared-libraries \
+		--with-single-library \
+		--with-clanguage=${mylang} \
+		$(use cxx && ! use complex-scalars && echo "with-c-support=1") \
+		--with-petsc-arch=${PETSC_ARCH} \
+		--with-precision=double \
+		--with-gnu-compilers \
+		--with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \
+		$(petsc_enable debug debugging) \
+		$(petsc_enable mpi) \
+		$(petsc_select mpi cc mpicc $(tc-getCC)) \
+		$(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
+		$(petsc_enable fortran) \
+		$(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
+		$(petsc_enable mpi mpi-compilers) \
+		$(petsc_select complex-scalars scalar-type complex real) \
+		--with-windows-graphics=0 \
+		--with-matlab=0 \
+		--with-cmake:BOOL=1 \
+		$(petsc_enable threads pthread) \
+		$(petsc_with afterimage afterimage \
+			/usr/include/libAfterImage -lAfterImage) \
+		$(use_with hdf5) \
+		$(petsc_with hypre hypre \
+			/usr/include/hypre -lHYPRE) \
+		$(use_with sparse suitesparse) \
+		$(petsc_with superlu superlu \
+			/usr/include/superlu -lsuperlu) \
+		$(use_with X x) \
+		$(use_with X x11) \
+		$(petsc_with scotch ptscotch \
+			/usr/include/scotch \
+		[-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
+		$(petsc_with mumps scalapack \
+			/usr/include/scalapack -lscalapack) \
+		$(use_with mumps mumps \
+			/usr/include \
+			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		--with-imagemagick=0 \
+		--with-python=0 \
+		$(use_with boost) \
+		$(use_with fftw)
+}
+
+src_install() {
+	emake DESTDIR="${ED}" install
+
+	# add PETSC_DIR to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
+		LDPATH=${EPREFIX}/usr/$(get_libdir)/petsc/lib
+	EOF
+	doenvd 99petsc
+
+	if use doc ; then
+		docinto html
+		dodoc -r docs/*.html docs/changes docs/manualpages
+	fi
+}


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2020-06-27 20:45 Andreas K. Hüttel
  0 siblings, 0 replies; 25+ messages in thread
From: Andreas K. Hüttel @ 2020-06-27 20:45 UTC (permalink / raw
  To: gentoo-commits

commit:     ec3d1d9f0c5f2a853f483302a24d29d532ceda77
Author:     Alexey Sokolov <sokolov <AT> google <DOT> com>
AuthorDate: Sat Jun 20 15:59:49 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Jun 27 20:44:42 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec3d1d9f

sci-mathematics/petsc: update homepage

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sci-mathematics/petsc/petsc-3.13.0.ebuild | 2 +-
 sci-mathematics/petsc/petsc-3.13.1.ebuild | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sci-mathematics/petsc/petsc-3.13.0.ebuild b/sci-mathematics/petsc/petsc-3.13.0.ebuild
index 961ff927f72..6823bc87776 100644
--- a/sci-mathematics/petsc/petsc-3.13.0.ebuild
+++ b/sci-mathematics/petsc/petsc-3.13.0.ebuild
@@ -8,7 +8,7 @@ PYTHON_COMPAT=( python3_{6,7,8} )
 inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs
 
 DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
-HOMEPAGE="http://www.mcs.anl.gov/petsc/"
+HOMEPAGE="https://www.mcs.anl.gov/petsc/"
 SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz"
 
 LICENSE="BSD-2"

diff --git a/sci-mathematics/petsc/petsc-3.13.1.ebuild b/sci-mathematics/petsc/petsc-3.13.1.ebuild
index 961ff927f72..6823bc87776 100644
--- a/sci-mathematics/petsc/petsc-3.13.1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.13.1.ebuild
@@ -8,7 +8,7 @@ PYTHON_COMPAT=( python3_{6,7,8} )
 inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs
 
 DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
-HOMEPAGE="http://www.mcs.anl.gov/petsc/"
+HOMEPAGE="https://www.mcs.anl.gov/petsc/"
 SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz"
 
 LICENSE="BSD-2"


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2021-04-09 18:26 Matthias Maier
  0 siblings, 0 replies; 25+ messages in thread
From: Matthias Maier @ 2021-04-09 18:26 UTC (permalink / raw
  To: gentoo-commits

commit:     fa29878090f4d35e013f39c3314d4643e7460af2
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  9 16:32:31 2021 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Fri Apr  9 18:26:31 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa298780

sci-mathematics/petsc: version bumps to 3.14.6 and 3.15.0

TODO:
 - reintroduce USE=doc use flag

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-mathematics/petsc/Manifest            |   2 +
 sci-mathematics/petsc/petsc-3.14.6.ebuild | 191 ++++++++++++++++++++++++++++++
 sci-mathematics/petsc/petsc-3.15.0.ebuild | 186 +++++++++++++++++++++++++++++
 3 files changed, 379 insertions(+)

diff --git a/sci-mathematics/petsc/Manifest b/sci-mathematics/petsc/Manifest
index d7824fbe49b..b8a099ec30d 100644
--- a/sci-mathematics/petsc/Manifest
+++ b/sci-mathematics/petsc/Manifest
@@ -1 +1,3 @@
 DIST petsc-3.13.1.tar.gz 35097687 BLAKE2B fccf64fd3694deffdd0dc561069ffa7e9342fe279b5c9123edeb011df931874083839d27b7b9a0c63faea6487b104b54fd4ce68a88a074c82de91e8baaf270b0 SHA512 41c3138a6ae6c1f2d9077b464c6aeda96287e5a76849582b8f432e2ee93d2594a78ba2181eac0054a77b6165692be5f1a057049313f2be9743d4246383dfdc77
+DIST petsc-3.14.6.tar.gz 39719179 BLAKE2B d3047baf87c67eb64ef02c0c54d6313ea06f091b377b3cdf6dcf6d96c7d68cec5958a007ddd84b52a3ab39bfc0adf146307fa1785a10f39386393371186a3fba SHA512 9766e164446ac5a69b8bf761a0e8a235b1a2b85ed9c96a7fd59e668ae4cceb9d9559a38b175b4aa9747e78d7b44d0018a3c02748dcd3d783d28f861f8382d44c
+DIST petsc-3.15.0.tar.gz 15976488 BLAKE2B babfbeb05321c9cb2f7d70ef8ffca974a016eae73ca1a3359d9a8d38aa5aa90ff34571169a5711627d738b93f89fdee3d0a0ff1bd0e51cb7300bbb9b0a8675cb SHA512 d1565823d8a5ce5e1c2c576bbe1b4ebf467cef20bbd8e0cf6c303c6c2af2bf902b66c79468f4e125496f9242be4bd6ac162535ee30252cfb902c0d906a6f27c0

diff --git a/sci-mathematics/petsc/petsc-3.14.6.ebuild b/sci-mathematics/petsc/petsc-3.14.6.ebuild
new file mode 100644
index 00000000000..f9221853d5d
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.14.6.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8} )
+
+inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs
+
+DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
+HOMEPAGE="https://www.mcs.anl.gov/petsc/"
+SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="afterimage boost complex-scalars cxx debug doc fftw
+	fortran hdf5 hypre mpi metis mumps scotch sparse superlu threads X"
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	complex-scalars? ( !hypre !superlu )
+	hdf5? ( mpi )
+	hypre? ( cxx mpi !superlu )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	superlu? ( !hypre )
+"
+
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+	afterimage? ( media-libs/libafterimage )
+	boost? ( dev-libs/boost )
+	fftw? ( sci-libs/fftw:3.0[mpi?] )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.18.0[mpi?] )
+	metis? ( >=sci-libs/parmetis-4 )
+	mpi? ( virtual/mpi[cxx?,fortran?] )
+	mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
+	scotch? ( sci-libs/scotch[mpi?] )
+	sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 )
+	superlu? ( >=sci-libs/superlu-5 )
+	X? ( x11-libs/libX11 )
+"
+
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	virtual/pkgconfig
+	dev-util/cmake
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch
+	"${FILESDIR}"/${PN}-3.13.0-fix_sandbox_violation.patch
+)
+
+# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
+petsc_enable() {
+	use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"
+}
+# add external library:
+# petsc_with use_flag libname libdir
+# petsc_with use_flag libname include linking_libs
+petsc_with() {
+	local myuse p=${2:-${1}}
+	if use ${1}; then
+		myuse="--with-${p}=1"
+		if [[ $# -ge 4 ]]; then
+			myuse="${myuse} --with-${p}-include=${EPREFIX}${3}"
+			shift 3
+			myuse="${myuse} --with-${p}-lib=$@"
+		else
+			myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
+		fi
+	else
+		myuse="--with-${p}=0"
+	fi
+	echo ${myuse}
+}
+
+# select between configure options depending on use flag
+petsc_select() {
+	use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
+}
+
+src_configure() {
+	# bug 548498
+	# PETSc runs mpi processes during configure that result in a sandbox
+	# violation by trying to open /proc/mtrr rw. This is not easy to
+	# mitigate because it happens in libpciaccess.so called by libhwloc.so,
+	# which is used by libmpi.so.
+	addpredict /proc/mtrr
+	# if mpi is built with knem support it needs /dev/knem too
+	addpredict /dev/knem
+
+	# configureMPITypes with openmpi-2* insists on accessing the scaling
+	# governor rw.
+	addpredict /sys/devices/system/cpu/
+
+	# bug 771711
+	# configureMPIEXEC and  configureMPITypes access /dev/nvidiactl
+	addpredict /dev/nvidiactl
+
+	local mylang
+	local myopt
+
+	use cxx && mylang="cxx" || mylang="c"
+	use debug && myopt="debug" || myopt="opt"
+
+	# environmental variables expected by petsc during build
+
+	export PETSC_DIR="${S}"
+	export PETSC_ARCH="linux-gnu-${mylang}-${myopt}"
+
+	if use debug; then
+		strip-flags
+		filter-flags -O*
+	fi
+
+	# C Support on CXX builds is enabled if possible i.e. when not using
+	# complex scalars (no complex type for both available at the same time)
+
+	econf \
+		scrollOutput=1 \
+		FFLAGS="${FFLAGS} -fPIC" \
+		CFLAGS="${CFLAGS} -fPIC" \
+		CXXFLAGS="${CXXFLAGS} -fPIC" \
+		LDFLAGS="${LDFLAGS}" \
+		--prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \
+		--with-shared-libraries \
+		--with-single-library \
+		--with-clanguage=${mylang} \
+		$(use cxx && ! use complex-scalars && echo "with-c-support=1") \
+		--with-petsc-arch=${PETSC_ARCH} \
+		--with-precision=double \
+		--with-gnu-compilers \
+		--with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \
+		$(petsc_enable debug debugging) \
+		$(petsc_enable mpi) \
+		$(petsc_select mpi cc mpicc $(tc-getCC)) \
+		$(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
+		$(petsc_enable fortran) \
+		$(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
+		$(petsc_enable mpi mpi-compilers) \
+		$(petsc_select complex-scalars scalar-type complex real) \
+		--with-windows-graphics=0 \
+		--with-matlab=0 \
+		--with-cmake:BOOL=1 \
+		$(petsc_enable threads pthread) \
+		$(petsc_with afterimage afterimage \
+			/usr/include/libAfterImage -lAfterImage) \
+		$(use_with hdf5) \
+		$(petsc_with hypre hypre \
+			/usr/include/hypre -lHYPRE) \
+		$(use_with sparse suitesparse) \
+		$(petsc_with superlu superlu \
+			/usr/include/superlu -lsuperlu) \
+		$(use_with X x) \
+		$(use_with X x11) \
+		$(petsc_with scotch ptscotch \
+			/usr/include/scotch \
+		[-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
+		$(petsc_with mumps scalapack \
+			/usr/include/scalapack -lscalapack) \
+		$(use_with mumps mumps \
+			/usr/include \
+			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		--with-imagemagick=0 \
+		--with-python=0 \
+		$(use_with boost) \
+		$(use_with fftw)
+}
+
+src_install() {
+	emake DESTDIR="${ED}" install
+
+	# add PETSC_DIR to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
+		LDPATH=${EPREFIX}/usr/$(get_libdir)/petsc/lib
+	EOF
+	doenvd 99petsc
+
+	if use doc ; then
+		docinto html
+		dodoc -r docs/*.html docs/changes docs/manualpages
+	fi
+}

diff --git a/sci-mathematics/petsc/petsc-3.15.0.ebuild b/sci-mathematics/petsc/petsc-3.15.0.ebuild
new file mode 100644
index 00000000000..8e236505d12
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.15.0.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8} )
+
+inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs
+
+DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
+HOMEPAGE="https://www.mcs.anl.gov/petsc/"
+SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="afterimage boost complex-scalars cxx debug fftw
+	fortran hdf5 hypre mpi metis mumps scotch sparse superlu threads X"
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	complex-scalars? ( !hypre !superlu )
+	hdf5? ( mpi )
+	hypre? ( cxx mpi !superlu )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	superlu? ( !hypre )
+"
+
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+	afterimage? ( media-libs/libafterimage )
+	boost? ( dev-libs/boost )
+	fftw? ( sci-libs/fftw:3.0[mpi?] )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.18.0[mpi?] )
+	metis? ( >=sci-libs/parmetis-4 )
+	mpi? ( virtual/mpi[cxx?,fortran?] )
+	mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
+	scotch? ( sci-libs/scotch[mpi?] )
+	sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 )
+	superlu? ( >=sci-libs/superlu-5 )
+	X? ( x11-libs/libX11 )
+"
+
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	virtual/pkgconfig
+	dev-util/cmake
+"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch
+	"${FILESDIR}"/${PN}-3.13.0-fix_sandbox_violation.patch
+)
+
+# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
+petsc_enable() {
+	use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"
+}
+# add external library:
+# petsc_with use_flag libname libdir
+# petsc_with use_flag libname include linking_libs
+petsc_with() {
+	local myuse p=${2:-${1}}
+	if use ${1}; then
+		myuse="--with-${p}=1"
+		if [[ $# -ge 4 ]]; then
+			myuse="${myuse} --with-${p}-include=${EPREFIX}${3}"
+			shift 3
+			myuse="${myuse} --with-${p}-lib=$@"
+		else
+			myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
+		fi
+	else
+		myuse="--with-${p}=0"
+	fi
+	echo ${myuse}
+}
+
+# select between configure options depending on use flag
+petsc_select() {
+	use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
+}
+
+src_configure() {
+	# bug 548498
+	# PETSc runs mpi processes during configure that result in a sandbox
+	# violation by trying to open /proc/mtrr rw. This is not easy to
+	# mitigate because it happens in libpciaccess.so called by libhwloc.so,
+	# which is used by libmpi.so.
+	addpredict /proc/mtrr
+	# if mpi is built with knem support it needs /dev/knem too
+	addpredict /dev/knem
+
+	# configureMPITypes with openmpi-2* insists on accessing the scaling
+	# governor rw.
+	addpredict /sys/devices/system/cpu/
+
+	# bug 771711
+	# configureMPIEXEC and  configureMPITypes access /dev/nvidiactl
+	addpredict /dev/nvidiactl
+
+	local mylang
+	local myopt
+
+	use cxx && mylang="cxx" || mylang="c"
+	use debug && myopt="debug" || myopt="opt"
+
+	# environmental variables expected by petsc during build
+
+	export PETSC_DIR="${S}"
+	export PETSC_ARCH="linux-gnu-${mylang}-${myopt}"
+
+	if use debug; then
+		strip-flags
+		filter-flags -O*
+	fi
+
+	# C Support on CXX builds is enabled if possible i.e. when not using
+	# complex scalars (no complex type for both available at the same time)
+
+	econf \
+		scrollOutput=1 \
+		FFLAGS="${FFLAGS} -fPIC" \
+		CFLAGS="${CFLAGS} -fPIC" \
+		CXXFLAGS="${CXXFLAGS} -fPIC" \
+		LDFLAGS="${LDFLAGS}" \
+		--prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \
+		--with-shared-libraries \
+		--with-single-library \
+		--with-clanguage=${mylang} \
+		$(use cxx && ! use complex-scalars && echo "with-c-support=1") \
+		--with-petsc-arch=${PETSC_ARCH} \
+		--with-precision=double \
+		--with-gnu-compilers \
+		--with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \
+		$(petsc_enable debug debugging) \
+		$(petsc_enable mpi) \
+		$(petsc_select mpi cc mpicc $(tc-getCC)) \
+		$(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
+		$(petsc_enable fortran) \
+		$(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
+		$(petsc_enable mpi mpi-compilers) \
+		$(petsc_select complex-scalars scalar-type complex real) \
+		--with-windows-graphics=0 \
+		--with-matlab=0 \
+		--with-cmake:BOOL=1 \
+		$(petsc_enable threads pthread) \
+		$(petsc_with afterimage afterimage \
+			/usr/include/libAfterImage -lAfterImage) \
+		$(use_with hdf5) \
+		$(petsc_with hypre hypre \
+			/usr/include/hypre -lHYPRE) \
+		$(use_with sparse suitesparse) \
+		$(petsc_with superlu superlu \
+			/usr/include/superlu -lsuperlu) \
+		$(use_with X x) \
+		$(use_with X x11) \
+		$(petsc_with scotch ptscotch \
+			/usr/include/scotch \
+		[-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
+		$(petsc_with mumps scalapack \
+			/usr/include/scalapack -lscalapack) \
+		$(use_with mumps mumps \
+			/usr/include \
+			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		--with-imagemagick=0 \
+		--with-python=0 \
+		$(use_with boost) \
+		$(use_with fftw)
+}
+
+src_install() {
+	emake DESTDIR="${ED}" install
+
+	# add PETSC_DIR to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
+		LDPATH=${EPREFIX}/usr/$(get_libdir)/petsc/lib
+	EOF
+	doenvd 99petsc
+}


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2021-04-09 18:26 Matthias Maier
  0 siblings, 0 replies; 25+ messages in thread
From: Matthias Maier @ 2021-04-09 18:26 UTC (permalink / raw
  To: gentoo-commits

commit:     22b0aca66e91fa237da5a093082046fb952bebbc
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  9 16:29:09 2021 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Fri Apr  9 18:26:15 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22b0aca6

sci-mathematics/petsc: add addpredict statement

Closes: https://bugs.gentoo.org/771711
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-mathematics/petsc/petsc-3.13.1.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sci-mathematics/petsc/petsc-3.13.1.ebuild b/sci-mathematics/petsc/petsc-3.13.1.ebuild
index 11693456cfb..dce92fc6e36 100644
--- a/sci-mathematics/petsc/petsc-3.13.1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.13.1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -102,6 +102,10 @@ src_configure() {
 	# governor rw.
 	addpredict /sys/devices/system/cpu/
 
+	# bug 771711
+	# configureMPIEXEC and  configureMPITypes access /dev/nvidiactl
+	addpredict /dev/nvidiactl
+
 	local mylang
 	local myopt
 


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2021-04-17  0:15 Matthias Maier
  0 siblings, 0 replies; 25+ messages in thread
From: Matthias Maier @ 2021-04-17  0:15 UTC (permalink / raw
  To: gentoo-commits

commit:     d1bd9e5720adbd2d42441228afeb7ade596afda5
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 17 00:14:23 2021 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Sat Apr 17 00:14:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1bd9e57

sci-mathematics/petsc: fix missing build dependency

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-mathematics/petsc/petsc-3.15.0.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sci-mathematics/petsc/petsc-3.15.0.ebuild b/sci-mathematics/petsc/petsc-3.15.0.ebuild
index 8e236505d12..f1f095b8b2c 100644
--- a/sci-mathematics/petsc/petsc-3.15.0.ebuild
+++ b/sci-mathematics/petsc/petsc-3.15.0.ebuild
@@ -50,6 +50,7 @@ DEPEND="${RDEPEND}
 	${PYTHON_DEPS}
 	virtual/pkgconfig
 	dev-util/cmake
+	sys-apps/which
 "
 
 PATCHES=(


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2021-10-17 19:25 Arthur Zamarin
  0 siblings, 0 replies; 25+ messages in thread
From: Arthur Zamarin @ 2021-10-17 19:25 UTC (permalink / raw
  To: gentoo-commits

commit:     3e4bda0b5cfdcceba56b9a4fae00df45df34567f
Author:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 17 19:17:37 2021 +0000
Commit:     Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 17 19:24:28 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e4bda0b

sci-mathematics/petsc: enable py3.10, py3.9

Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>

 sci-mathematics/petsc/petsc-3.15.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sci-mathematics/petsc/petsc-3.15.0.ebuild b/sci-mathematics/petsc/petsc-3.15.0.ebuild
index f1f095b8b2c..b728a017801 100644
--- a/sci-mathematics/petsc/petsc-3.15.0.ebuild
+++ b/sci-mathematics/petsc/petsc-3.15.0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-PYTHON_COMPAT=( python3_{7,8} )
+PYTHON_COMPAT=( python3_{8..10} )
 
 inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs
 


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2021-11-08 12:31 Andrew Ammerlaan
  0 siblings, 0 replies; 25+ messages in thread
From: Andrew Ammerlaan @ 2021-11-08 12:31 UTC (permalink / raw
  To: gentoo-commits

commit:     57df15db2d32f2337b4022ae8fb9c2bf7b134765
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sun Oct 31 02:39:34 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Mon Nov  8 12:30:58 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=57df15db

sci-mathematics/petsc: addpredict /dev/kfd

Closes: https://bugs.gentoo.org/810841
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/22769
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-mathematics/petsc/petsc-3.13.1.ebuild | 3 +++
 sci-mathematics/petsc/petsc-3.14.6.ebuild | 3 +++
 sci-mathematics/petsc/petsc-3.15.0.ebuild | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/sci-mathematics/petsc/petsc-3.13.1.ebuild b/sci-mathematics/petsc/petsc-3.13.1.ebuild
index dce92fc6e36..23e1117a52c 100644
--- a/sci-mathematics/petsc/petsc-3.13.1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.13.1.ebuild
@@ -106,6 +106,9 @@ src_configure() {
 	# configureMPIEXEC and  configureMPITypes access /dev/nvidiactl
 	addpredict /dev/nvidiactl
 
+	# bug 810841
+	addpredict /dev/kfd
+
 	local mylang
 	local myopt
 

diff --git a/sci-mathematics/petsc/petsc-3.14.6.ebuild b/sci-mathematics/petsc/petsc-3.14.6.ebuild
index f9221853d5d..5bd50a9d32f 100644
--- a/sci-mathematics/petsc/petsc-3.14.6.ebuild
+++ b/sci-mathematics/petsc/petsc-3.14.6.ebuild
@@ -104,6 +104,9 @@ src_configure() {
 	# configureMPIEXEC and  configureMPITypes access /dev/nvidiactl
 	addpredict /dev/nvidiactl
 
+	# bug 810841
+	addpredict /dev/kfd
+
 	local mylang
 	local myopt
 

diff --git a/sci-mathematics/petsc/petsc-3.15.0.ebuild b/sci-mathematics/petsc/petsc-3.15.0.ebuild
index b728a017801..8286baab980 100644
--- a/sci-mathematics/petsc/petsc-3.15.0.ebuild
+++ b/sci-mathematics/petsc/petsc-3.15.0.ebuild
@@ -105,6 +105,9 @@ src_configure() {
 	# configureMPIEXEC and  configureMPITypes access /dev/nvidiactl
 	addpredict /dev/nvidiactl
 
+	# bug 810841
+	addpredict /dev/kfd
+
 	local mylang
 	local myopt
 


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2022-01-04 15:17 Andrew Ammerlaan
  0 siblings, 0 replies; 25+ messages in thread
From: Andrew Ammerlaan @ 2022-01-04 15:17 UTC (permalink / raw
  To: gentoo-commits

commit:     bceaf1c4863043585716dd8c293bd9047b49a9cb
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Mon Nov  8 16:57:36 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Tue Jan  4 15:16:58 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bceaf1c4

sci-mathematics/petsc: EAPI 8

Closes: https://bugs.gentoo.org/820899
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/22866
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 sci-mathematics/petsc/metadata.xml           |   7 +-
 sci-mathematics/petsc/petsc-3.15.0-r1.ebuild | 194 +++++++++++++++++++++++++++
 2 files changed, 198 insertions(+), 3 deletions(-)

diff --git a/sci-mathematics/petsc/metadata.xml b/sci-mathematics/petsc/metadata.xml
index 0e7b7486eb3a..f6072e8edac1 100644
--- a/sci-mathematics/petsc/metadata.xml
+++ b/sci-mathematics/petsc/metadata.xml
@@ -12,12 +12,13 @@
 	<use>
 		<flag name="afterimage">Use Afterstep image library (media-libs/libafterimage)</flag>
 		<flag name="boost">Use boost (dev-libs/boost)</flag>
-		<flag name="hypre">Use HYPRE (sci-mathematics/hypre) and for preconditioning</flag>
 		<flag name="complex-scalars">Make scalars complex</flag>
+		<flag name="hypre">Use HYPRE (sci-mathematics/hypre) and for preconditioning</flag>
+		<flag name="int64">Use 64 bit indexes</flag>
 		<flag name="metis">Add support for metis (<pkg>sci-libs/parmetis</pkg>)</flag>
-		<flag name="sparse">Use suitesparse (sci-libs/suitesparse) including cholmod (sci-libs/cholmod) for sparse factorization</flag>
-		<flag name="superlu">Use superlu (sci-libs/superlu) for preconditioning</flag>
 		<flag name="mumps">Add support for mumps (<pkg>sci-libs/mumps</pkg>)</flag>
 		<flag name="scotch">Add support for scotch (<pkg>sci-libs/scotch</pkg>)</flag>
+		<flag name="sparse">Use suitesparse (sci-libs/suitesparse) including cholmod (sci-libs/cholmod) for sparse factorization</flag>
+		<flag name="superlu">Use superlu (sci-libs/superlu) for preconditioning</flag>
 	</use>
 </pkgmetadata>

diff --git a/sci-mathematics/petsc/petsc-3.15.0-r1.ebuild b/sci-mathematics/petsc/petsc-3.15.0-r1.ebuild
new file mode 100644
index 000000000000..5da94f15ff16
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.15.0-r1.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} pypy3 )
+
+inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs
+
+DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
+HOMEPAGE="https://www.mcs.anl.gov/petsc"
+SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="afterimage boost complex-scalars cxx debug fftw
+fortran hdf5 hypre int64 mpi metis mumps scotch superlu threads X"
+
+# readd sparse when suitesparse-5.6.0 is in tree
+# sparse? ( >=sci-libs/suitesparse-5.6.0 >=sci-libs/cholmod-1.7.0 )
+# $(use_with sparse suitesparse) \
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+
+	afterimage? ( media-libs/libafterimage )
+	boost? ( dev-libs/boost )
+	fftw? ( sci-libs/fftw:3.0[mpi?] )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
+	metis? ( >=sci-libs/parmetis-4 )
+	mpi? ( virtual/mpi[cxx?,fortran?] )
+	mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
+	scotch? ( sci-libs/scotch[int64?,mpi?] )
+	superlu? ( >=sci-libs/superlu-5 )
+	X? ( x11-libs/libX11 )
+"
+DEPEND="
+	${RDEPEND}
+	${PYTHON_DEPS}
+"
+BDEPEND="
+	dev-util/cmake
+	sys-apps/which
+	virtual/pkgconfig
+"
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	complex-scalars? ( !hypre !superlu )
+	hdf5? ( mpi )
+	hypre? ( cxx mpi !superlu )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	superlu? ( !hypre )
+"
+PATCHES=(
+	"${FILESDIR}/${PN}-3.7.0-disable-rpath.patch"
+	"${FILESDIR}/${PN}-3.13.0-fix_sandbox_violation.patch"
+)
+
+# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
+petsc_enable() {
+	use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"
+}
+# add external library:
+# petsc_with use_flag libname libdir
+# petsc_with use_flag libname include linking_libs
+petsc_with() {
+	local myuse p=${2:-${1}}
+	if use ${1}; then
+		myuse="--with-${p}=1"
+		if [[ $# -ge 4 ]]; then
+			myuse="${myuse} --with-${p}-include=${EPREFIX}${3}"
+			shift 3
+			myuse="${myuse} --with-${p}-lib=$@"
+		else
+			myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
+		fi
+	else
+		myuse="--with-${p}=0"
+	fi
+	echo ${myuse}
+}
+
+# select between configure options depending on use flag
+petsc_select() {
+	use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
+}
+
+src_configure() {
+	# bug 548498
+	# PETSc runs mpi processes during configure that result in a sandbox
+	# violation by trying to open /proc/mtrr rw. This is not easy to
+	# mitigate because it happens in libpciaccess.so called by libhwloc.so,
+	# which is used by libmpi.so.
+	addpredict /proc/mtrr
+	# if mpi is built with knem support it needs /dev/knem too
+	addpredict /dev/knem
+
+	# configureMPITypes with openmpi-2* insists on accessing the scaling
+	# governor rw.
+	addpredict /sys/devices/system/cpu/
+
+	# bug 771711
+	# configureMPIEXEC and  configureMPITypes access /dev/nvidiactl
+	addpredict /dev/nvidiactl
+
+	# bug 810841
+	addpredict /dev/kfd
+
+	local mylang
+	local myopt
+
+	use cxx && mylang="cxx" || mylang="c"
+	use debug && myopt="debug" || myopt="opt"
+
+	# environmental variables expected by petsc during build
+
+	export PETSC_DIR="${S}"
+	export PETSC_ARCH="linux-gnu-${mylang}-${myopt}"
+
+	if use debug; then
+		strip-flags
+		filter-flags -O*
+	fi
+
+	tc-export AR RANLIB
+
+	# C Support on CXX builds is enabled if possible i.e. when not using
+	# complex scalars (no complex type for both available at the same time)
+
+	econf \
+		scrollOutput=1 \
+		AR="${AR}" \
+		CFLAGS="${CFLAGS} -fPIC" \
+		CPPFLAGS="${CPPFLAGS}" \
+		CXXFLAGS="${CXXFLAGS} -fPIC" \
+		CXXOPTFLAGS="${CXXFLAGS} -fPIC" \
+		FCFLAGS="${FCFLAGS} -fPIC" \
+		FFLAGS="${FFLAGS} -fPIC" \
+		LDFLAGS="${LDFLAGS}" \
+		MAKEFLAGS="${MAKEFLAGS}" \
+		RANLIB="${RANLIB}" \
+		--prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \
+		--with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \
+		--with-clanguage="${mylang}" \
+		--with-cmake:BOOL=1 \
+		--with-gnu-compilers \
+		--with-imagemagick=0 \
+		--with-matlab=0 \
+		--with-petsc-arch="${PETSC_ARCH}" \
+		--with-precision=double \
+		--with-python=0 \
+		--with-shared-libraries \
+		--with-single-library \
+		--with-windows-graphics=0 \
+		$(petsc_enable debug debugging) \
+		$(petsc_enable fortran) \
+		$(petsc_enable mpi) \
+		$(petsc_enable mpi mpi-compilers) \
+		$(petsc_enable threads pthread) \
+		$(petsc_select complex-scalars scalar-type complex real) \
+		$(petsc_select mpi cc mpicc $(tc-getCC)) \
+		$(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
+		$(petsc_with afterimage afterimage /usr/include/libAfterImage -lAfterImage) \
+		$(petsc_with hypre hypre /usr/include/hypre -lHYPRE) \
+		$(petsc_with superlu superlu /usr/include/superlu -lsuperlu) \
+		$(petsc_with scotch ptscotch /usr/include/scotch [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
+		$(petsc_with mumps scalapack /usr/include/scalapack -lscalapack) \
+		$(use cxx && ! use complex-scalars && echo "--with-c-support=1") \
+		$(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
+		$(use int64 && echo "--with-index-size=64") \
+		$(use_with boost) \
+		$(use_with fftw) \
+		$(use_with hdf5) \
+		$(use_with mumps mumps /usr/include [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		$(use_with X x) \
+		$(use_with X x11)
+}
+
+src_install() {
+	emake DESTDIR="${ED}" install
+
+	# add PETSC_DIR to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
+		LDPATH=${EPREFIX}/usr/$(get_libdir)/petsc/lib
+	EOF
+	doenvd 99petsc
+}


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2022-05-26  1:27 Matthias Maier
  0 siblings, 0 replies; 25+ messages in thread
From: Matthias Maier @ 2022-05-26  1:27 UTC (permalink / raw
  To: gentoo-commits

commit:     04a3311771e0ce7d6337a0de2371d6ce5f3c9b56
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Thu May 26 00:04:18 2022 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Thu May 26 01:26:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04a33117

sci-mathematics/petsc: add 3.17.1

Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-mathematics/petsc/Manifest            |   1 +
 sci-mathematics/petsc/petsc-3.17.1.ebuild | 194 ++++++++++++++++++++++++++++++
 2 files changed, 195 insertions(+)

diff --git a/sci-mathematics/petsc/Manifest b/sci-mathematics/petsc/Manifest
index 66543b456f86..a53a6158e9b6 100644
--- a/sci-mathematics/petsc/Manifest
+++ b/sci-mathematics/petsc/Manifest
@@ -3,3 +3,4 @@ DIST petsc-3.14.6.tar.gz 39719179 BLAKE2B d3047baf87c67eb64ef02c0c54d6313ea06f09
 DIST petsc-3.15.0.tar.gz 15976488 BLAKE2B babfbeb05321c9cb2f7d70ef8ffca974a016eae73ca1a3359d9a8d38aa5aa90ff34571169a5711627d738b93f89fdee3d0a0ff1bd0e51cb7300bbb9b0a8675cb SHA512 d1565823d8a5ce5e1c2c576bbe1b4ebf467cef20bbd8e0cf6c303c6c2af2bf902b66c79468f4e125496f9242be4bd6ac162535ee30252cfb902c0d906a6f27c0
 DIST petsc-3.16.0-fftw-without-mpi.patch.bz2 5824 BLAKE2B 59615b1bbaf8ca1da92d7d193a45a2dd434f762cd741d711d4f408183a201a276ac3c968a3e7d740d19212120271701bce52bb7b0f4e311268f40915c81f9dcb SHA512 8e07dfe56a9150ce9a3a5ab8012657875ef84e6e7daa60560bbdd9062078c876a826057f3f3eaf1697ce046a82756ee6eb6a8b819eb51245367c9d5c8a72ee8e
 DIST petsc-3.16.0.tar.gz 16748960 BLAKE2B 87f9fdb79a9c44e5f476fa4746ad0cbe72f3eda9f6039f2e4743105626701d7c8d6c010fdb9d89becf8619288d0b7a60c8bc4e2fc0793eac5b39030b02c04fd9 SHA512 5280032fb4ec4d058733788bb0ae674e7400565e204133bd10ed88a2965230ec7adeaca2d498267ce661377ca7e6f9d948992206b1d679587606cb422c004655
+DIST petsc-3.17.1.tar.gz 17082265 BLAKE2B de1bfe45f93e18e32181499e59912df9225c8e24d75f52e641e552fd43e4d5be48d549d284365b173aa93e51603f5b7740eaac0557ff8c7c96b370f4683257f6 SHA512 8c81cc148b1a899a55e54a013d61519ec7b44f98f7ae30c3f8d0e83ba285b23f4b4d9e2cd483c531d337bc41887e4079b727ba73676b1b653910140291e93575

diff --git a/sci-mathematics/petsc/petsc-3.17.1.ebuild b/sci-mathematics/petsc/petsc-3.17.1.ebuild
new file mode 100644
index 000000000000..d75bccaa9f8f
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.17.1.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} pypy3 )
+
+inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs
+
+DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
+HOMEPAGE="https://www.mcs.anl.gov/petsc"
+SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="afterimage boost complex-scalars cxx debug fftw
+fortran hdf5 hypre int64 mpi metis mumps scotch superlu threads X"
+
+# readd sparse when suitesparse-5.6.0 is in tree
+# sparse? ( >=sci-libs/suitesparse-5.6.0 >=sci-libs/cholmod-1.7.0 )
+# $(use_with sparse suitesparse) \
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+
+	afterimage? ( media-libs/libafterimage )
+	boost? ( dev-libs/boost )
+	fftw? ( sci-libs/fftw:3.0[mpi?] )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
+	metis? ( >=sci-libs/parmetis-4 )
+	mpi? ( virtual/mpi[cxx?,fortran?] )
+	mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
+	scotch? ( sci-libs/scotch[int64?,mpi?] )
+	superlu? ( >=sci-libs/superlu-5 )
+	X? ( x11-libs/libX11 )
+"
+DEPEND="
+	${RDEPEND}
+	${PYTHON_DEPS}
+"
+BDEPEND="
+	dev-util/cmake
+	sys-apps/which
+	virtual/pkgconfig
+"
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	complex-scalars? ( !hypre !superlu )
+	hdf5? ( mpi )
+	hypre? ( cxx mpi !superlu )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	superlu? ( !hypre )
+"
+PATCHES=(
+	"${FILESDIR}/${PN}-3.7.0-disable-rpath.patch"
+	"${FILESDIR}"/${PN}-3.16.0-fix_sandbox_violation.patch
+)
+
+# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
+petsc_enable() {
+	use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"
+}
+# add external library:
+# petsc_with use_flag libname libdir
+# petsc_with use_flag libname include linking_libs
+petsc_with() {
+	local myuse p=${2:-${1}}
+	if use ${1}; then
+		myuse="--with-${p}=1"
+		if [[ $# -ge 4 ]]; then
+			myuse="${myuse} --with-${p}-include=${EPREFIX}${3}"
+			shift 3
+			myuse="${myuse} --with-${p}-lib=$@"
+		else
+			myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
+		fi
+	else
+		myuse="--with-${p}=0"
+	fi
+	echo ${myuse}
+}
+
+# select between configure options depending on use flag
+petsc_select() {
+	use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
+}
+
+src_configure() {
+	# bug 548498
+	# PETSc runs mpi processes during configure that result in a sandbox
+	# violation by trying to open /proc/mtrr rw. This is not easy to
+	# mitigate because it happens in libpciaccess.so called by libhwloc.so,
+	# which is used by libmpi.so.
+	addpredict /proc/mtrr
+	# if mpi is built with knem support it needs /dev/knem too
+	addpredict /dev/knem
+
+	# configureMPITypes with openmpi-2* insists on accessing the scaling
+	# governor rw.
+	addpredict /sys/devices/system/cpu/
+
+	# bug 771711
+	# configureMPIEXEC and  configureMPITypes access /dev/nvidiactl
+	addpredict /dev/nvidiactl
+
+	# bug 810841
+	addpredict /dev/kfd
+
+	local mylang
+	local myopt
+
+	use cxx && mylang="cxx" || mylang="c"
+	use debug && myopt="debug" || myopt="opt"
+
+	# environmental variables expected by petsc during build
+
+	export PETSC_DIR="${S}"
+	export PETSC_ARCH="linux-gnu-${mylang}-${myopt}"
+
+	if use debug; then
+		strip-flags
+		filter-flags -O*
+	fi
+
+	tc-export AR RANLIB
+
+	# C Support on CXX builds is enabled if possible i.e. when not using
+	# complex scalars (no complex type for both available at the same time)
+
+	econf \
+		scrollOutput=1 \
+		AR="${AR}" \
+		CFLAGS="${CFLAGS} -fPIC" \
+		CPPFLAGS="${CPPFLAGS}" \
+		CXXFLAGS="${CXXFLAGS} -fPIC" \
+		CXXOPTFLAGS="${CXXFLAGS} -fPIC" \
+		FCFLAGS="${FCFLAGS} -fPIC" \
+		FFLAGS="${FFLAGS} -fPIC" \
+		LDFLAGS="${LDFLAGS}" \
+		MAKEFLAGS="${MAKEFLAGS}" \
+		RANLIB="${RANLIB}" \
+		--prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \
+		--with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \
+		--with-clanguage="${mylang}" \
+		--with-cmake:BOOL=1 \
+		--with-gnu-compilers \
+		--with-imagemagick=0 \
+		--with-matlab=0 \
+		--with-petsc-arch="${PETSC_ARCH}" \
+		--with-precision=double \
+		--with-python=0 \
+		--with-shared-libraries \
+		--with-single-library \
+		--with-windows-graphics=0 \
+		$(petsc_enable debug debugging) \
+		$(petsc_enable fortran) \
+		$(petsc_enable mpi) \
+		$(petsc_enable mpi mpi-compilers) \
+		$(petsc_enable threads pthread) \
+		$(petsc_select complex-scalars scalar-type complex real) \
+		$(petsc_select mpi cc mpicc $(tc-getCC)) \
+		$(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
+		$(petsc_with afterimage afterimage /usr/include/libAfterImage -lAfterImage) \
+		$(petsc_with hypre hypre /usr/include/hypre -lHYPRE) \
+		$(petsc_with superlu superlu /usr/include/superlu -lsuperlu) \
+		$(petsc_with scotch ptscotch /usr/include/scotch [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
+		$(petsc_with mumps scalapack /usr/include/scalapack -lscalapack) \
+		$(use cxx && ! use complex-scalars && echo "--with-c-support=1") \
+		$(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
+		$(use int64 && echo "--with-index-size=64") \
+		$(use_with boost) \
+		$(use_with fftw) \
+		$(use_with hdf5) \
+		$(use_with mumps mumps /usr/include [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		$(use_with X x) \
+		$(use_with X x11)
+}
+
+src_install() {
+	emake DESTDIR="${ED}" install
+
+	# add PETSC_DIR to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
+		LDPATH=${EPREFIX}/usr/$(get_libdir)/petsc/lib
+	EOF
+	doenvd 99petsc
+}


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2022-05-26  1:27 Matthias Maier
  0 siblings, 0 replies; 25+ messages in thread
From: Matthias Maier @ 2022-05-26  1:27 UTC (permalink / raw
  To: gentoo-commits

commit:     52f8f0e9c07b4122b5dbdfeb068ed79b0b9ca2f5
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Thu May 26 00:52:50 2022 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Thu May 26 01:26:54 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=52f8f0e9

sci-mathematics/petsc: drop superfluous USE=cxx

Closes: https://bugs.gentoo.org/846434
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-mathematics/petsc/petsc-3.17.1.ebuild | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/sci-mathematics/petsc/petsc-3.17.1.ebuild b/sci-mathematics/petsc/petsc-3.17.1.ebuild
index d75bccaa9f8f..241199f5fa1c 100644
--- a/sci-mathematics/petsc/petsc-3.17.1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.17.1.ebuild
@@ -14,7 +14,7 @@ SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz"
 LICENSE="BSD-2"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
-IUSE="afterimage boost complex-scalars cxx debug fftw
+IUSE="afterimage boost complex-scalars debug fftw
 fortran hdf5 hypre int64 mpi metis mumps scotch superlu threads X"
 
 # readd sparse when suitesparse-5.6.0 is in tree
@@ -30,7 +30,7 @@ RDEPEND="
 	hdf5? ( sci-libs/hdf5[mpi?] )
 	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
 	metis? ( >=sci-libs/parmetis-4 )
-	mpi? ( virtual/mpi[cxx?,fortran?] )
+	mpi? ( virtual/mpi[fortran?] )
 	mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
 	scotch? ( sci-libs/scotch[int64?,mpi?] )
 	superlu? ( >=sci-libs/superlu-5 )
@@ -52,7 +52,7 @@ REQUIRED_USE="
 	afterimage? ( X )
 	complex-scalars? ( !hypre !superlu )
 	hdf5? ( mpi )
-	hypre? ( cxx mpi !superlu )
+	hypre? ( mpi !superlu )
 	mumps? ( mpi scotch )
 	scotch? ( mpi )
 	superlu? ( !hypre )
@@ -112,16 +112,14 @@ src_configure() {
 	# bug 810841
 	addpredict /dev/kfd
 
-	local mylang
 	local myopt
 
-	use cxx && mylang="cxx" || mylang="c"
 	use debug && myopt="debug" || myopt="opt"
 
 	# environmental variables expected by petsc during build
 
 	export PETSC_DIR="${S}"
-	export PETSC_ARCH="linux-gnu-${mylang}-${myopt}"
+	export PETSC_ARCH="linux-gnu-c-${myopt}"
 
 	if use debug; then
 		strip-flags
@@ -147,7 +145,6 @@ src_configure() {
 		RANLIB="${RANLIB}" \
 		--prefix="${EPREFIX}/usr/$(get_libdir)/petsc" \
 		--with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \
-		--with-clanguage="${mylang}" \
 		--with-cmake:BOOL=1 \
 		--with-gnu-compilers \
 		--with-imagemagick=0 \
@@ -171,7 +168,6 @@ src_configure() {
 		$(petsc_with superlu superlu /usr/include/superlu -lsuperlu) \
 		$(petsc_with scotch ptscotch /usr/include/scotch [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
 		$(petsc_with mumps scalapack /usr/include/scalapack -lscalapack) \
-		$(use cxx && ! use complex-scalars && echo "--with-c-support=1") \
 		$(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
 		$(use int64 && echo "--with-index-size=64") \
 		$(use_with boost) \


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2022-06-03  3:15 Sam James
  0 siblings, 0 replies; 25+ messages in thread
From: Sam James @ 2022-06-03  3:15 UTC (permalink / raw
  To: gentoo-commits

commit:     27ba48650af3037fa8adf06220d4e5f1373f5885
Author:     Fabio Rossi <rossi.f <AT> inwind <DOT> it>
AuthorDate: Tue May 31 13:12:48 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun  3 03:15:25 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27ba4865

sci-mathematics/petsc: fix configuration with USE=mumps

Bug: https://bugs.gentoo.org/848789
Signed-off-by: Fabio Rossi <rossi.f <AT> inwind.it>
Closes: https://github.com/gentoo/gentoo/pull/25701
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-mathematics/petsc/petsc-3.16.0.ebuild | 4 ++--
 sci-mathematics/petsc/petsc-3.17.1.ebuild | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sci-mathematics/petsc/petsc-3.16.0.ebuild b/sci-mathematics/petsc/petsc-3.16.0.ebuild
index f39f87d8c281..efe8f2be01e6 100644
--- a/sci-mathematics/petsc/petsc-3.16.0.ebuild
+++ b/sci-mathematics/petsc/petsc-3.16.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -171,7 +171,7 @@ src_configure() {
 		[-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
 		$(petsc_with mumps scalapack \
 			/usr/include/scalapack -lscalapack) \
-		$(use_with mumps mumps \
+		$(petsc_with mumps mumps \
 			/usr/include \
 			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
 		--with-imagemagick=0 \

diff --git a/sci-mathematics/petsc/petsc-3.17.1.ebuild b/sci-mathematics/petsc/petsc-3.17.1.ebuild
index 241199f5fa1c..5b316ba60986 100644
--- a/sci-mathematics/petsc/petsc-3.17.1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.17.1.ebuild
@@ -168,12 +168,12 @@ src_configure() {
 		$(petsc_with superlu superlu /usr/include/superlu -lsuperlu) \
 		$(petsc_with scotch ptscotch /usr/include/scotch [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
 		$(petsc_with mumps scalapack /usr/include/scalapack -lscalapack) \
+		$(petsc_with mumps mumps /usr/include [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
 		$(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
 		$(use int64 && echo "--with-index-size=64") \
 		$(use_with boost) \
 		$(use_with fftw) \
 		$(use_with hdf5) \
-		$(use_with mumps mumps /usr/include [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
 		$(use_with X x) \
 		$(use_with X x11)
 }


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2022-06-03  3:57 Sam James
  0 siblings, 0 replies; 25+ messages in thread
From: Sam James @ 2022-06-03  3:57 UTC (permalink / raw
  To: gentoo-commits

commit:     b338bf48c70d6e8ef9afb4cd39ca673dde80e3b9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  3 03:56:33 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jun  3 03:56:33 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b338bf48

sci-mathematics/petsc: revbump for configure fix

So that binaries are built with the expected flags (it just gave
a warning, not an error like I'd thought.)

Bug: https://bugs.gentoo.org/848789
See: 27ba48650af3037fa8adf06220d4e5f1373f5885
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-mathematics/petsc/{petsc-3.16.0.ebuild => petsc-3.16.0-r1.ebuild} | 0
 sci-mathematics/petsc/{petsc-3.17.1.ebuild => petsc-3.17.1-r1.ebuild} | 0
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/sci-mathematics/petsc/petsc-3.16.0.ebuild b/sci-mathematics/petsc/petsc-3.16.0-r1.ebuild
similarity index 100%
rename from sci-mathematics/petsc/petsc-3.16.0.ebuild
rename to sci-mathematics/petsc/petsc-3.16.0-r1.ebuild

diff --git a/sci-mathematics/petsc/petsc-3.17.1.ebuild b/sci-mathematics/petsc/petsc-3.17.1-r1.ebuild
similarity index 100%
rename from sci-mathematics/petsc/petsc-3.17.1.ebuild
rename to sci-mathematics/petsc/petsc-3.17.1-r1.ebuild


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2022-08-26 10:46 Sam James
  0 siblings, 0 replies; 25+ messages in thread
From: Sam James @ 2022-08-26 10:46 UTC (permalink / raw
  To: gentoo-commits

commit:     47243fe61e032fce689e91e10cbcec6c797905b8
Author:     Petr Vaněk <arkamar <AT> atlas <DOT> cz>
AuthorDate: Thu Aug 25 21:41:02 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug 26 10:46:28 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47243fe6

sci-mathematics/petsc: use <pkg> tags in metadata.xml

Signed-off-by: Petr Vaněk <arkamar <AT> atlas.cz>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-mathematics/petsc/metadata.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sci-mathematics/petsc/metadata.xml b/sci-mathematics/petsc/metadata.xml
index f6072e8edac1..987028fd7636 100644
--- a/sci-mathematics/petsc/metadata.xml
+++ b/sci-mathematics/petsc/metadata.xml
@@ -10,15 +10,15 @@
 		<name>Gentoo Mathematics Project</name>
 	</maintainer>
 	<use>
-		<flag name="afterimage">Use Afterstep image library (media-libs/libafterimage)</flag>
-		<flag name="boost">Use boost (dev-libs/boost)</flag>
+		<flag name="afterimage">Use Afterstep image library (<pkg>media-libs/libafterimage</pkg>)</flag>
+		<flag name="boost">Use boost (<pkg>dev-libs/boost</pkg>)</flag>
 		<flag name="complex-scalars">Make scalars complex</flag>
 		<flag name="hypre">Use HYPRE (sci-mathematics/hypre) and for preconditioning</flag>
 		<flag name="int64">Use 64 bit indexes</flag>
 		<flag name="metis">Add support for metis (<pkg>sci-libs/parmetis</pkg>)</flag>
 		<flag name="mumps">Add support for mumps (<pkg>sci-libs/mumps</pkg>)</flag>
 		<flag name="scotch">Add support for scotch (<pkg>sci-libs/scotch</pkg>)</flag>
-		<flag name="sparse">Use suitesparse (sci-libs/suitesparse) including cholmod (sci-libs/cholmod) for sparse factorization</flag>
-		<flag name="superlu">Use superlu (sci-libs/superlu) for preconditioning</flag>
+		<flag name="sparse">Use suitesparse (<pkg>sci-libs/suitesparse</pkg>) including cholmod (<pkg>sci-libs/cholmod</pkg>) for sparse factorization</flag>
+		<flag name="superlu">Use superlu (<pkg>sci-libs/superlu</pkg>) for preconditioning</flag>
 	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2022-12-28  6:48 Matthias Maier
  0 siblings, 0 replies; 25+ messages in thread
From: Matthias Maier @ 2022-12-28  6:48 UTC (permalink / raw
  To: gentoo-commits

commit:     a6f36a0ce2d4741e60807bf6ff9d0858dbc96585
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 28 05:11:20 2022 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Wed Dec 28 06:24:50 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6f36a0c

sci-mathematics/petsc: add 3.18.2

Closes: https://bugs.gentoo.org/722612
Closes: https://bugs.gentoo.org/846428
Closes: https://bugs.gentoo.org/846425
Closes: https://bugs.gentoo.org/846422
Closes: https://bugs.gentoo.org/846431
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-mathematics/petsc/Manifest            |   1 +
 sci-mathematics/petsc/petsc-3.18.2.ebuild | 236 ++++++++++++++++++++++++++++++
 2 files changed, 237 insertions(+)

diff --git a/sci-mathematics/petsc/Manifest b/sci-mathematics/petsc/Manifest
index 8a1dcafa8362..1d6310cc9c0a 100644
--- a/sci-mathematics/petsc/Manifest
+++ b/sci-mathematics/petsc/Manifest
@@ -1,3 +1,4 @@
 DIST petsc-3.16.0-fftw-without-mpi.patch.bz2 5824 BLAKE2B 59615b1bbaf8ca1da92d7d193a45a2dd434f762cd741d711d4f408183a201a276ac3c968a3e7d740d19212120271701bce52bb7b0f4e311268f40915c81f9dcb SHA512 8e07dfe56a9150ce9a3a5ab8012657875ef84e6e7daa60560bbdd9062078c876a826057f3f3eaf1697ce046a82756ee6eb6a8b819eb51245367c9d5c8a72ee8e
 DIST petsc-3.16.0.tar.gz 16748960 BLAKE2B 87f9fdb79a9c44e5f476fa4746ad0cbe72f3eda9f6039f2e4743105626701d7c8d6c010fdb9d89becf8619288d0b7a60c8bc4e2fc0793eac5b39030b02c04fd9 SHA512 5280032fb4ec4d058733788bb0ae674e7400565e204133bd10ed88a2965230ec7adeaca2d498267ce661377ca7e6f9d948992206b1d679587606cb422c004655
 DIST petsc-3.17.1.tar.gz 17082265 BLAKE2B de1bfe45f93e18e32181499e59912df9225c8e24d75f52e641e552fd43e4d5be48d549d284365b173aa93e51603f5b7740eaac0557ff8c7c96b370f4683257f6 SHA512 8c81cc148b1a899a55e54a013d61519ec7b44f98f7ae30c3f8d0e83ba285b23f4b4d9e2cd483c531d337bc41887e4079b727ba73676b1b653910140291e93575
+DIST petsc-3.18.2.tar.gz 18409507 BLAKE2B 999d4fc80dedb5f9ce58333b6052b15ff499e3d5e4fee3e37639f5e3d2c5e86b514290d01e75b71795467436254d2cb8b05dac3d6252c80db898010bbed95544 SHA512 a8e9757144a20d61c004f54615821df7f9dbd920af71fea4674eb0fd1bf9f0b50dbc5c89aae285fef35a23daf67ba9647e479a6e92dbcd26e53fd8302735a47b

diff --git a/sci-mathematics/petsc/petsc-3.18.2.ebuild b/sci-mathematics/petsc/petsc-3.18.2.ebuild
new file mode 100644
index 000000000000..b011f88b5043
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.18.2.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..11} pypy3 )
+
+inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs
+
+DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
+HOMEPAGE="https://www.mcs.anl.gov/petsc"
+SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="afterimage boost complex-scalars debug +examples fftw
+fortran hdf5 hypre int64 mpi metis mumps scotch superlu threads X"
+
+# readd sparse when suitesparse-5.6.0 is in tree
+# sparse? ( >=sci-libs/suitesparse-5.6.0 >=sci-libs/cholmod-1.7.0 )
+# $(use_with sparse suitesparse) \
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+
+	afterimage? ( media-libs/libafterimage )
+	boost? ( dev-libs/boost )
+	fftw? ( sci-libs/fftw:3.0[mpi?] )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
+	metis? ( >=sci-libs/parmetis-4 )
+	mpi? ( virtual/mpi[fortran?] )
+	mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
+	scotch? ( sci-libs/scotch[int64?,mpi?] )
+	superlu? ( >=sci-libs/superlu-5 )
+	X? ( x11-libs/libX11 )
+"
+DEPEND="
+	${RDEPEND}
+	${PYTHON_DEPS}
+"
+BDEPEND="
+	dev-util/cmake
+	sys-apps/which
+	virtual/pkgconfig
+"
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	complex-scalars? ( !hypre !superlu )
+	fftw? ( mpi )
+	hdf5? ( mpi )
+	hypre? ( mpi !superlu )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	superlu? ( !hypre )
+"
+PATCHES=(
+	"${FILESDIR}/${PN}-3.7.0-disable-rpath.patch"
+	"${FILESDIR}"/${PN}-3.16.0-fix_sandbox_violation.patch
+)
+
+# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
+petsc_enable() {
+	use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"
+}
+# add external library:
+# petsc_with use_flag libname libdir
+# petsc_with use_flag libname include linking_libs
+petsc_with() {
+	local myuse p=${2:-${1}}
+	if use ${1}; then
+		myuse="--with-${p}=1"
+		if [[ $# -ge 4 ]]; then
+			myuse="${myuse} --with-${p}-include=${EPREFIX}${3}"
+			shift 3
+			myuse="${myuse} --with-${p}-lib=$@"
+		else
+			myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
+		fi
+	else
+		myuse="--with-${p}=0"
+	fi
+	echo ${myuse}
+}
+
+# select between configure options depending on use flag
+petsc_select() {
+	use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
+}
+
+src_configure() {
+	# bug 548498
+	# PETSc runs mpi processes during configure that result in a sandbox
+	# violation by trying to open /proc/mtrr rw. This is not easy to
+	# mitigate because it happens in libpciaccess.so called by libhwloc.so,
+	# which is used by libmpi.so.
+	addpredict /proc/mtrr
+	# if mpi is built with knem support it needs /dev/knem too
+	addpredict /dev/knem
+
+	# configureMPITypes with openmpi-2* insists on accessing the scaling
+	# governor rw.
+	addpredict /sys/devices/system/cpu/
+
+	# bug 771711
+	# configureMPIEXEC and  configureMPITypes access /dev/nvidiactl
+	addpredict /dev/nvidiactl
+
+	# bug 810841
+	addpredict /dev/kfd
+
+	local myopt
+
+	use debug && myopt="debug" || myopt="opt"
+
+	# environmental variables expected by petsc during build
+
+	export PETSC_DIR="${S}"
+	export PETSC_ARCH="linux-gnu-c-${myopt}"
+
+	if use debug; then
+		strip-flags
+		filter-flags -O*
+	fi
+
+	tc-export AR RANLIB
+
+	# C Support on CXX builds is enabled if possible i.e. when not using
+	# complex scalars (no complex type for both available at the same time)
+
+	econf \
+		scrollOutput=1 \
+		AR="${AR}" \
+		CFLAGS="${CFLAGS} -fPIC" \
+		CPPFLAGS="${CPPFLAGS}" \
+		CXXFLAGS="${CXXFLAGS} -fPIC" \
+		CXXOPTFLAGS="${CXXFLAGS} -fPIC" \
+		FCFLAGS="${FCFLAGS} -fPIC" \
+		FFLAGS="${FFLAGS} -fPIC" \
+		LDFLAGS="${LDFLAGS}" \
+		MAKEFLAGS="${MAKEFLAGS}" \
+		RANLIB="${RANLIB}" \
+		--prefix="${EPREFIX}/usr/$(get_libdir)/petscdir/" \
+		--with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \
+		--with-cmake:BOOL=1 \
+		--with-gnu-compilers \
+		--with-imagemagick=0 \
+		--with-petsc-arch="${PETSC_ARCH}" \
+		--with-precision=double \
+		--with-python=0 \
+		--with-shared-libraries \
+		--with-single-library \
+		--with-windows-graphics=0 \
+		$(petsc_enable debug debugging) \
+		$(petsc_enable fortran) \
+		$(petsc_enable mpi) \
+		$(petsc_enable mpi mpi-compilers) \
+		$(petsc_enable threads pthread) \
+		$(petsc_select complex-scalars scalar-type complex real) \
+		$(petsc_select mpi cc mpicc $(tc-getCC)) \
+		$(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
+		$(petsc_with afterimage afterimage /usr/include/libAfterImage -lAfterImage) \
+		$(petsc_with hypre hypre /usr/include/hypre -lHYPRE) \
+		$(petsc_with superlu superlu /usr/include/superlu -lsuperlu) \
+		$(petsc_with scotch ptscotch /usr/include/scotch [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
+		$(petsc_with mumps scalapack /usr/include/scalapack -lscalapack) \
+		$(petsc_with mumps mumps /usr/include [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		$(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
+		$(use int64 && echo "--with-index-size=64") \
+		$(use_with boost) \
+		$(use_with fftw) \
+		$(use_with hdf5) \
+		$(use_with X x) \
+		$(use_with X x11)
+}
+
+src_install() {
+	emake DESTDIR="${ED}" install
+
+	#
+	# Clean up the mess:
+	#
+
+	# put all include directories under a proper subdirectory
+	mkdir "${ED}"/usr/include || die "mkdir failed (include)"
+	mv "${ED}"/usr/{$(get_libdir)/petscdir/include,include/petsc} || die "mv failed (include)"
+
+	# put libraries and pkconfig file into proper place
+	mv "${ED}"/usr/$(get_libdir)/petscdir/lib/{libpetsc*,pkgconfig} \
+		"${ED}/usr/$(get_libdir)" || die "mv failed (lib)"
+
+	# move share to proper location
+	mv "${ED}"/usr/{$(get_libdir)/petscdir/share,share} || die "mv failed (share)"
+
+	# fix pc files:
+	sed -i \
+		-e 's#include$#include/petsc#' \
+		-e "s#lib\$#$(get_libdir)#" \
+		-e "s#^prefix=.*petscdir\$#prefix=${EPREFIX}/usr#" \
+		"${ED}"/usr/$(get_libdir)/pkgconfig/*.pc || die "sed failed (pkgconfig)"
+
+	# recreate a "valid" petscdir:
+	for i in "${ED}"/usr/$(get_libdir)/*; do
+		[ $(basename $i) = petscdir ] && continue
+		ln -s "${EPREFIX}/usr/$(get_libdir)/$(basename $i)" \
+			"${ED}/usr/$(get_libdir)/petscdir/lib/$(basename $i)" || die "ln failed (petscdir)"
+	done
+	ln -s "${EPREFIX}"/usr/include/petsc/ \
+		"${ED}/usr/$(get_libdir)/petscdir/include" || die "ln failed (petscdir)"
+	mkdir "${ED}/usr/$(get_libdir)/petscdir/share" || die "mkdir fialed (petscdir)"
+	ln -s "${EPREFIX}"/usr/share/petsc/ \
+		"${ED}/usr/$(get_libdir)/petscdir/share/petsc" || die "ln failed (petscdir)"
+
+	# automatically symlink petsc matlab modules:
+	mkdir -p "${ED}"/usr/share/octave/site/m/
+	ln -s "${EPREFIX}"/usr/share/petsc/matlab "${ED}"/usr/share/octave/site/m/petsc || die "ln failed (matlab)"
+
+	if use examples; then
+		mkdir -p "${ED}"/usr/share/doc/${PF} || die "mkdir failed (examples)"
+		mv "${ED}"/usr/share/petsc/examples "${ED}"/usr/share/doc/${PF} || die "mv failed (examples)"
+		ln -s "${EPREFIX}"/usr/share/doc/${PF}/examples "${ED}"/usr/share/petsc/examples || die "ln failed (examples)"
+		docompress -x /usr/share/doc/${PF}/examples
+	else
+		rm -r "${ED}"/usr/share/petsc/examples || die "rm failed (examples)"
+	fi
+
+	# add PETSC_DIR to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petscdir
+	EOF
+	doenvd 99petsc
+}


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2023-05-07 18:59 Matthias Maier
  0 siblings, 0 replies; 25+ messages in thread
From: Matthias Maier @ 2023-05-07 18:59 UTC (permalink / raw
  To: gentoo-commits

commit:     45e47514fb0ed5328b1c27c8de1cfeb757977e24
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Sun May  7 16:15:40 2023 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Sun May  7 18:59:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45e47514

sci-mathematics/petsc: add 3.19.1

Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-mathematics/petsc/Manifest            |   1 +
 sci-mathematics/petsc/petsc-3.19.1.ebuild | 236 ++++++++++++++++++++++++++++++
 2 files changed, 237 insertions(+)

diff --git a/sci-mathematics/petsc/Manifest b/sci-mathematics/petsc/Manifest
index 1d6310cc9c0a..c091688e3fb8 100644
--- a/sci-mathematics/petsc/Manifest
+++ b/sci-mathematics/petsc/Manifest
@@ -2,3 +2,4 @@ DIST petsc-3.16.0-fftw-without-mpi.patch.bz2 5824 BLAKE2B 59615b1bbaf8ca1da92d7d
 DIST petsc-3.16.0.tar.gz 16748960 BLAKE2B 87f9fdb79a9c44e5f476fa4746ad0cbe72f3eda9f6039f2e4743105626701d7c8d6c010fdb9d89becf8619288d0b7a60c8bc4e2fc0793eac5b39030b02c04fd9 SHA512 5280032fb4ec4d058733788bb0ae674e7400565e204133bd10ed88a2965230ec7adeaca2d498267ce661377ca7e6f9d948992206b1d679587606cb422c004655
 DIST petsc-3.17.1.tar.gz 17082265 BLAKE2B de1bfe45f93e18e32181499e59912df9225c8e24d75f52e641e552fd43e4d5be48d549d284365b173aa93e51603f5b7740eaac0557ff8c7c96b370f4683257f6 SHA512 8c81cc148b1a899a55e54a013d61519ec7b44f98f7ae30c3f8d0e83ba285b23f4b4d9e2cd483c531d337bc41887e4079b727ba73676b1b653910140291e93575
 DIST petsc-3.18.2.tar.gz 18409507 BLAKE2B 999d4fc80dedb5f9ce58333b6052b15ff499e3d5e4fee3e37639f5e3d2c5e86b514290d01e75b71795467436254d2cb8b05dac3d6252c80db898010bbed95544 SHA512 a8e9757144a20d61c004f54615821df7f9dbd920af71fea4674eb0fd1bf9f0b50dbc5c89aae285fef35a23daf67ba9647e479a6e92dbcd26e53fd8302735a47b
+DIST petsc-3.19.1.tar.gz 16659061 BLAKE2B 8c7b22e5f97756261a5d0e8b707670d55db53e209fd1e116a2adb517d42f5e8bd5ecc911c9e967b88a8dc60a2d872c1d7a279539c65064884b4cfbe856434ad3 SHA512 5b9b71599a95e2d82d18d5313c424a08eead0c10f27f40c82159839ef0fa8aeda88ddea693a12d58b8ac29a41c4138e8188a3c91d6af540196ee3a977cf9539d

diff --git a/sci-mathematics/petsc/petsc-3.19.1.ebuild b/sci-mathematics/petsc/petsc-3.19.1.ebuild
new file mode 100644
index 000000000000..f57281175844
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.19.1.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} pypy3 )
+
+inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs
+
+DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
+HOMEPAGE="https://www.mcs.anl.gov/petsc"
+SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="afterimage boost complex-scalars debug +examples fftw
+fortran hdf5 hypre int64 mpi metis mumps scotch superlu threads X"
+
+# readd sparse when suitesparse-5.6.0 is in tree
+# sparse? ( >=sci-libs/suitesparse-5.6.0 >=sci-libs/cholmod-1.7.0 )
+# $(use_with sparse suitesparse) \
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+
+	afterimage? ( media-libs/libafterimage )
+	boost? ( dev-libs/boost )
+	fftw? ( sci-libs/fftw:3.0[mpi?] )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
+	metis? ( >=sci-libs/parmetis-4 )
+	mpi? ( virtual/mpi[fortran?] )
+	mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
+	scotch? ( sci-libs/scotch[int64?,mpi?] )
+	superlu? ( >=sci-libs/superlu-5 )
+	X? ( x11-libs/libX11 )
+"
+DEPEND="
+	${RDEPEND}
+	${PYTHON_DEPS}
+"
+BDEPEND="
+	dev-util/cmake
+	sys-apps/which
+	virtual/pkgconfig
+"
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	complex-scalars? ( !hypre !superlu )
+	fftw? ( mpi )
+	hdf5? ( mpi )
+	hypre? ( mpi !superlu )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	superlu? ( !hypre )
+"
+PATCHES=(
+	"${FILESDIR}/${PN}-3.7.0-disable-rpath.patch"
+	"${FILESDIR}"/${PN}-3.16.0-fix_sandbox_violation.patch
+)
+
+# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
+petsc_enable() {
+	use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"
+}
+# add external library:
+# petsc_with use_flag libname libdir
+# petsc_with use_flag libname include linking_libs
+petsc_with() {
+	local myuse p=${2:-${1}}
+	if use ${1}; then
+		myuse="--with-${p}=1"
+		if [[ $# -ge 4 ]]; then
+			myuse="${myuse} --with-${p}-include=${EPREFIX}${3}"
+			shift 3
+			myuse="${myuse} --with-${p}-lib=$@"
+		else
+			myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
+		fi
+	else
+		myuse="--with-${p}=0"
+	fi
+	echo ${myuse}
+}
+
+# select between configure options depending on use flag
+petsc_select() {
+	use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
+}
+
+src_configure() {
+	# bug 548498
+	# PETSc runs mpi processes during configure that result in a sandbox
+	# violation by trying to open /proc/mtrr rw. This is not easy to
+	# mitigate because it happens in libpciaccess.so called by libhwloc.so,
+	# which is used by libmpi.so.
+	addpredict /proc/mtrr
+	# if mpi is built with knem support it needs /dev/knem too
+	addpredict /dev/knem
+
+	# configureMPITypes with openmpi-2* insists on accessing the scaling
+	# governor rw.
+	addpredict /sys/devices/system/cpu/
+
+	# bug 771711
+	# configureMPIEXEC and  configureMPITypes access /dev/nvidiactl
+	addpredict /dev/nvidiactl
+
+	# bug 810841
+	addpredict /dev/kfd
+
+	local myopt
+
+	use debug && myopt="debug" || myopt="opt"
+
+	# environmental variables expected by petsc during build
+
+	export PETSC_DIR="${S}"
+	export PETSC_ARCH="linux-gnu-c-${myopt}"
+
+	if use debug; then
+		strip-flags
+		filter-flags -O*
+	fi
+
+	tc-export AR RANLIB
+
+	# C Support on CXX builds is enabled if possible i.e. when not using
+	# complex scalars (no complex type for both available at the same time)
+
+	econf \
+		scrollOutput=1 \
+		AR="${AR}" \
+		CFLAGS="${CFLAGS} -fPIC" \
+		CPPFLAGS="${CPPFLAGS}" \
+		CXXFLAGS="${CXXFLAGS} -fPIC" \
+		CXXOPTFLAGS="${CXXFLAGS} -fPIC" \
+		FCFLAGS="${FCFLAGS} -fPIC" \
+		FFLAGS="${FFLAGS} -fPIC" \
+		LDFLAGS="${LDFLAGS}" \
+		MAKEFLAGS="${MAKEFLAGS}" \
+		RANLIB="${RANLIB}" \
+		--prefix="${EPREFIX}/usr/$(get_libdir)/petscdir/" \
+		--with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \
+		--with-cmake:BOOL=1 \
+		--with-gnu-compilers \
+		--with-imagemagick=0 \
+		--with-petsc-arch="${PETSC_ARCH}" \
+		--with-precision=double \
+		--with-python=0 \
+		--with-shared-libraries \
+		--with-single-library \
+		--with-windows-graphics=0 \
+		$(petsc_enable debug debugging) \
+		$(petsc_enable fortran) \
+		$(petsc_enable mpi) \
+		$(petsc_enable mpi mpi-compilers) \
+		$(petsc_enable threads pthread) \
+		$(petsc_select complex-scalars scalar-type complex real) \
+		$(petsc_select mpi cc mpicc $(tc-getCC)) \
+		$(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
+		$(petsc_with afterimage afterimage /usr/include/libAfterImage -lAfterImage) \
+		$(petsc_with hypre hypre /usr/include/hypre -lHYPRE) \
+		$(petsc_with superlu superlu /usr/include/superlu -lsuperlu) \
+		$(petsc_with scotch ptscotch /usr/include/scotch [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
+		$(petsc_with mumps scalapack /usr/include/scalapack -lscalapack) \
+		$(petsc_with mumps mumps /usr/include [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		$(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
+		$(use int64 && echo "--with-index-size=64") \
+		$(use_with boost) \
+		$(use_with fftw) \
+		$(use_with hdf5) \
+		$(use_with X x) \
+		$(use_with X x11)
+}
+
+src_install() {
+	emake DESTDIR="${ED}" install
+
+	#
+	# Clean up the mess:
+	#
+
+	# put all include directories under a proper subdirectory
+	mkdir "${ED}"/usr/include || die "mkdir failed (include)"
+	mv "${ED}"/usr/{$(get_libdir)/petscdir/include,include/petsc} || die "mv failed (include)"
+
+	# put libraries and pkconfig file into proper place
+	mv "${ED}"/usr/$(get_libdir)/petscdir/lib/{libpetsc*,pkgconfig} \
+		"${ED}/usr/$(get_libdir)" || die "mv failed (lib)"
+
+	# move share to proper location
+	mv "${ED}"/usr/{$(get_libdir)/petscdir/share,share} || die "mv failed (share)"
+
+	# fix pc files:
+	sed -i \
+		-e 's#include$#include/petsc#' \
+		-e "s#lib\$#$(get_libdir)#" \
+		-e "s#^prefix=.*petscdir\$#prefix=${EPREFIX}/usr#" \
+		"${ED}"/usr/$(get_libdir)/pkgconfig/*.pc || die "sed failed (pkgconfig)"
+
+	# recreate a "valid" petscdir:
+	for i in "${ED}"/usr/$(get_libdir)/*; do
+		[ $(basename $i) = petscdir ] && continue
+		ln -s "${EPREFIX}/usr/$(get_libdir)/$(basename $i)" \
+			"${ED}/usr/$(get_libdir)/petscdir/lib/$(basename $i)" || die "ln failed (petscdir)"
+	done
+	ln -s "${EPREFIX}"/usr/include/petsc/ \
+		"${ED}/usr/$(get_libdir)/petscdir/include" || die "ln failed (petscdir)"
+	mkdir "${ED}/usr/$(get_libdir)/petscdir/share" || die "mkdir fialed (petscdir)"
+	ln -s "${EPREFIX}"/usr/share/petsc/ \
+		"${ED}/usr/$(get_libdir)/petscdir/share/petsc" || die "ln failed (petscdir)"
+
+	# automatically symlink petsc matlab modules:
+	mkdir -p "${ED}"/usr/share/octave/site/m/
+	ln -s "${EPREFIX}"/usr/share/petsc/matlab "${ED}"/usr/share/octave/site/m/petsc || die "ln failed (matlab)"
+
+	if use examples; then
+		mkdir -p "${ED}"/usr/share/doc/${PF} || die "mkdir failed (examples)"
+		mv "${ED}"/usr/share/petsc/examples "${ED}"/usr/share/doc/${PF} || die "mv failed (examples)"
+		ln -s "${EPREFIX}"/usr/share/doc/${PF}/examples "${ED}"/usr/share/petsc/examples || die "ln failed (examples)"
+		docompress -x /usr/share/doc/${PF}/examples
+	else
+		rm -r "${ED}"/usr/share/petsc/examples || die "rm failed (examples)"
+	fi
+
+	# add PETSC_DIR to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petscdir
+	EOF
+	doenvd 99petsc
+}


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2023-06-19 18:37 Matthias Maier
  0 siblings, 0 replies; 25+ messages in thread
From: Matthias Maier @ 2023-06-19 18:37 UTC (permalink / raw
  To: gentoo-commits

commit:     98c1b3779f2858afe843a654420e1aa8170a449a
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 19 18:28:09 2023 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Mon Jun 19 18:37:53 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98c1b377

sci-mathematics/petsc: add 3.19.2

Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-mathematics/petsc/Manifest            |   1 +
 sci-mathematics/petsc/petsc-3.19.2.ebuild | 236 ++++++++++++++++++++++++++++++
 2 files changed, 237 insertions(+)

diff --git a/sci-mathematics/petsc/Manifest b/sci-mathematics/petsc/Manifest
index c091688e3fb8..47472501cfd8 100644
--- a/sci-mathematics/petsc/Manifest
+++ b/sci-mathematics/petsc/Manifest
@@ -3,3 +3,4 @@ DIST petsc-3.16.0.tar.gz 16748960 BLAKE2B 87f9fdb79a9c44e5f476fa4746ad0cbe72f3ed
 DIST petsc-3.17.1.tar.gz 17082265 BLAKE2B de1bfe45f93e18e32181499e59912df9225c8e24d75f52e641e552fd43e4d5be48d549d284365b173aa93e51603f5b7740eaac0557ff8c7c96b370f4683257f6 SHA512 8c81cc148b1a899a55e54a013d61519ec7b44f98f7ae30c3f8d0e83ba285b23f4b4d9e2cd483c531d337bc41887e4079b727ba73676b1b653910140291e93575
 DIST petsc-3.18.2.tar.gz 18409507 BLAKE2B 999d4fc80dedb5f9ce58333b6052b15ff499e3d5e4fee3e37639f5e3d2c5e86b514290d01e75b71795467436254d2cb8b05dac3d6252c80db898010bbed95544 SHA512 a8e9757144a20d61c004f54615821df7f9dbd920af71fea4674eb0fd1bf9f0b50dbc5c89aae285fef35a23daf67ba9647e479a6e92dbcd26e53fd8302735a47b
 DIST petsc-3.19.1.tar.gz 16659061 BLAKE2B 8c7b22e5f97756261a5d0e8b707670d55db53e209fd1e116a2adb517d42f5e8bd5ecc911c9e967b88a8dc60a2d872c1d7a279539c65064884b4cfbe856434ad3 SHA512 5b9b71599a95e2d82d18d5313c424a08eead0c10f27f40c82159839ef0fa8aeda88ddea693a12d58b8ac29a41c4138e8188a3c91d6af540196ee3a977cf9539d
+DIST petsc-3.19.2.tar.gz 16627765 BLAKE2B 1267db717989c3819f32ac6a62642054af2ac49d9e9276ffd4f0846d73e31ae4a5dcca4ad794b91cdb29463b7ec68040baa4e1cad99aaef8ab910ff7b64d7478 SHA512 f8feeb66fa8bd2406227be0e2cc2946485238362270d40e3f07dc89491177751f6bf680f51b70696bc30b677624c0e525c3fa9784eabdeb2337697ec56f63fc1

diff --git a/sci-mathematics/petsc/petsc-3.19.2.ebuild b/sci-mathematics/petsc/petsc-3.19.2.ebuild
new file mode 100644
index 000000000000..f57281175844
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.19.2.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} pypy3 )
+
+inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs
+
+DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
+HOMEPAGE="https://www.mcs.anl.gov/petsc"
+SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="afterimage boost complex-scalars debug +examples fftw
+fortran hdf5 hypre int64 mpi metis mumps scotch superlu threads X"
+
+# readd sparse when suitesparse-5.6.0 is in tree
+# sparse? ( >=sci-libs/suitesparse-5.6.0 >=sci-libs/cholmod-1.7.0 )
+# $(use_with sparse suitesparse) \
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+
+	afterimage? ( media-libs/libafterimage )
+	boost? ( dev-libs/boost )
+	fftw? ( sci-libs/fftw:3.0[mpi?] )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
+	metis? ( >=sci-libs/parmetis-4 )
+	mpi? ( virtual/mpi[fortran?] )
+	mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
+	scotch? ( sci-libs/scotch[int64?,mpi?] )
+	superlu? ( >=sci-libs/superlu-5 )
+	X? ( x11-libs/libX11 )
+"
+DEPEND="
+	${RDEPEND}
+	${PYTHON_DEPS}
+"
+BDEPEND="
+	dev-util/cmake
+	sys-apps/which
+	virtual/pkgconfig
+"
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	complex-scalars? ( !hypre !superlu )
+	fftw? ( mpi )
+	hdf5? ( mpi )
+	hypre? ( mpi !superlu )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	superlu? ( !hypre )
+"
+PATCHES=(
+	"${FILESDIR}/${PN}-3.7.0-disable-rpath.patch"
+	"${FILESDIR}"/${PN}-3.16.0-fix_sandbox_violation.patch
+)
+
+# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
+petsc_enable() {
+	use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"
+}
+# add external library:
+# petsc_with use_flag libname libdir
+# petsc_with use_flag libname include linking_libs
+petsc_with() {
+	local myuse p=${2:-${1}}
+	if use ${1}; then
+		myuse="--with-${p}=1"
+		if [[ $# -ge 4 ]]; then
+			myuse="${myuse} --with-${p}-include=${EPREFIX}${3}"
+			shift 3
+			myuse="${myuse} --with-${p}-lib=$@"
+		else
+			myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
+		fi
+	else
+		myuse="--with-${p}=0"
+	fi
+	echo ${myuse}
+}
+
+# select between configure options depending on use flag
+petsc_select() {
+	use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
+}
+
+src_configure() {
+	# bug 548498
+	# PETSc runs mpi processes during configure that result in a sandbox
+	# violation by trying to open /proc/mtrr rw. This is not easy to
+	# mitigate because it happens in libpciaccess.so called by libhwloc.so,
+	# which is used by libmpi.so.
+	addpredict /proc/mtrr
+	# if mpi is built with knem support it needs /dev/knem too
+	addpredict /dev/knem
+
+	# configureMPITypes with openmpi-2* insists on accessing the scaling
+	# governor rw.
+	addpredict /sys/devices/system/cpu/
+
+	# bug 771711
+	# configureMPIEXEC and  configureMPITypes access /dev/nvidiactl
+	addpredict /dev/nvidiactl
+
+	# bug 810841
+	addpredict /dev/kfd
+
+	local myopt
+
+	use debug && myopt="debug" || myopt="opt"
+
+	# environmental variables expected by petsc during build
+
+	export PETSC_DIR="${S}"
+	export PETSC_ARCH="linux-gnu-c-${myopt}"
+
+	if use debug; then
+		strip-flags
+		filter-flags -O*
+	fi
+
+	tc-export AR RANLIB
+
+	# C Support on CXX builds is enabled if possible i.e. when not using
+	# complex scalars (no complex type for both available at the same time)
+
+	econf \
+		scrollOutput=1 \
+		AR="${AR}" \
+		CFLAGS="${CFLAGS} -fPIC" \
+		CPPFLAGS="${CPPFLAGS}" \
+		CXXFLAGS="${CXXFLAGS} -fPIC" \
+		CXXOPTFLAGS="${CXXFLAGS} -fPIC" \
+		FCFLAGS="${FCFLAGS} -fPIC" \
+		FFLAGS="${FFLAGS} -fPIC" \
+		LDFLAGS="${LDFLAGS}" \
+		MAKEFLAGS="${MAKEFLAGS}" \
+		RANLIB="${RANLIB}" \
+		--prefix="${EPREFIX}/usr/$(get_libdir)/petscdir/" \
+		--with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \
+		--with-cmake:BOOL=1 \
+		--with-gnu-compilers \
+		--with-imagemagick=0 \
+		--with-petsc-arch="${PETSC_ARCH}" \
+		--with-precision=double \
+		--with-python=0 \
+		--with-shared-libraries \
+		--with-single-library \
+		--with-windows-graphics=0 \
+		$(petsc_enable debug debugging) \
+		$(petsc_enable fortran) \
+		$(petsc_enable mpi) \
+		$(petsc_enable mpi mpi-compilers) \
+		$(petsc_enable threads pthread) \
+		$(petsc_select complex-scalars scalar-type complex real) \
+		$(petsc_select mpi cc mpicc $(tc-getCC)) \
+		$(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
+		$(petsc_with afterimage afterimage /usr/include/libAfterImage -lAfterImage) \
+		$(petsc_with hypre hypre /usr/include/hypre -lHYPRE) \
+		$(petsc_with superlu superlu /usr/include/superlu -lsuperlu) \
+		$(petsc_with scotch ptscotch /usr/include/scotch [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
+		$(petsc_with mumps scalapack /usr/include/scalapack -lscalapack) \
+		$(petsc_with mumps mumps /usr/include [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		$(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
+		$(use int64 && echo "--with-index-size=64") \
+		$(use_with boost) \
+		$(use_with fftw) \
+		$(use_with hdf5) \
+		$(use_with X x) \
+		$(use_with X x11)
+}
+
+src_install() {
+	emake DESTDIR="${ED}" install
+
+	#
+	# Clean up the mess:
+	#
+
+	# put all include directories under a proper subdirectory
+	mkdir "${ED}"/usr/include || die "mkdir failed (include)"
+	mv "${ED}"/usr/{$(get_libdir)/petscdir/include,include/petsc} || die "mv failed (include)"
+
+	# put libraries and pkconfig file into proper place
+	mv "${ED}"/usr/$(get_libdir)/petscdir/lib/{libpetsc*,pkgconfig} \
+		"${ED}/usr/$(get_libdir)" || die "mv failed (lib)"
+
+	# move share to proper location
+	mv "${ED}"/usr/{$(get_libdir)/petscdir/share,share} || die "mv failed (share)"
+
+	# fix pc files:
+	sed -i \
+		-e 's#include$#include/petsc#' \
+		-e "s#lib\$#$(get_libdir)#" \
+		-e "s#^prefix=.*petscdir\$#prefix=${EPREFIX}/usr#" \
+		"${ED}"/usr/$(get_libdir)/pkgconfig/*.pc || die "sed failed (pkgconfig)"
+
+	# recreate a "valid" petscdir:
+	for i in "${ED}"/usr/$(get_libdir)/*; do
+		[ $(basename $i) = petscdir ] && continue
+		ln -s "${EPREFIX}/usr/$(get_libdir)/$(basename $i)" \
+			"${ED}/usr/$(get_libdir)/petscdir/lib/$(basename $i)" || die "ln failed (petscdir)"
+	done
+	ln -s "${EPREFIX}"/usr/include/petsc/ \
+		"${ED}/usr/$(get_libdir)/petscdir/include" || die "ln failed (petscdir)"
+	mkdir "${ED}/usr/$(get_libdir)/petscdir/share" || die "mkdir fialed (petscdir)"
+	ln -s "${EPREFIX}"/usr/share/petsc/ \
+		"${ED}/usr/$(get_libdir)/petscdir/share/petsc" || die "ln failed (petscdir)"
+
+	# automatically symlink petsc matlab modules:
+	mkdir -p "${ED}"/usr/share/octave/site/m/
+	ln -s "${EPREFIX}"/usr/share/petsc/matlab "${ED}"/usr/share/octave/site/m/petsc || die "ln failed (matlab)"
+
+	if use examples; then
+		mkdir -p "${ED}"/usr/share/doc/${PF} || die "mkdir failed (examples)"
+		mv "${ED}"/usr/share/petsc/examples "${ED}"/usr/share/doc/${PF} || die "mv failed (examples)"
+		ln -s "${EPREFIX}"/usr/share/doc/${PF}/examples "${ED}"/usr/share/petsc/examples || die "ln failed (examples)"
+		docompress -x /usr/share/doc/${PF}/examples
+	else
+		rm -r "${ED}"/usr/share/petsc/examples || die "rm failed (examples)"
+	fi
+
+	# add PETSC_DIR to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petscdir
+	EOF
+	doenvd 99petsc
+}


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2023-08-06 12:13 Matthias Maier
  0 siblings, 0 replies; 25+ messages in thread
From: Matthias Maier @ 2023-08-06 12:13 UTC (permalink / raw
  To: gentoo-commits

commit:     8a62c6e12c2dbad772ab6f76c0097649e6b6ad48
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Sun Aug  6 12:05:11 2023 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Sun Aug  6 12:06:43 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a62c6e1

sci-mathematics/petsc: add 3.19.4

Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>

 sci-mathematics/petsc/Manifest            |   1 +
 sci-mathematics/petsc/petsc-3.19.4.ebuild | 236 ++++++++++++++++++++++++++++++
 2 files changed, 237 insertions(+)

diff --git a/sci-mathematics/petsc/Manifest b/sci-mathematics/petsc/Manifest
index 47472501cfd8..7cdcf15e1f67 100644
--- a/sci-mathematics/petsc/Manifest
+++ b/sci-mathematics/petsc/Manifest
@@ -4,3 +4,4 @@ DIST petsc-3.17.1.tar.gz 17082265 BLAKE2B de1bfe45f93e18e32181499e59912df9225c8e
 DIST petsc-3.18.2.tar.gz 18409507 BLAKE2B 999d4fc80dedb5f9ce58333b6052b15ff499e3d5e4fee3e37639f5e3d2c5e86b514290d01e75b71795467436254d2cb8b05dac3d6252c80db898010bbed95544 SHA512 a8e9757144a20d61c004f54615821df7f9dbd920af71fea4674eb0fd1bf9f0b50dbc5c89aae285fef35a23daf67ba9647e479a6e92dbcd26e53fd8302735a47b
 DIST petsc-3.19.1.tar.gz 16659061 BLAKE2B 8c7b22e5f97756261a5d0e8b707670d55db53e209fd1e116a2adb517d42f5e8bd5ecc911c9e967b88a8dc60a2d872c1d7a279539c65064884b4cfbe856434ad3 SHA512 5b9b71599a95e2d82d18d5313c424a08eead0c10f27f40c82159839ef0fa8aeda88ddea693a12d58b8ac29a41c4138e8188a3c91d6af540196ee3a977cf9539d
 DIST petsc-3.19.2.tar.gz 16627765 BLAKE2B 1267db717989c3819f32ac6a62642054af2ac49d9e9276ffd4f0846d73e31ae4a5dcca4ad794b91cdb29463b7ec68040baa4e1cad99aaef8ab910ff7b64d7478 SHA512 f8feeb66fa8bd2406227be0e2cc2946485238362270d40e3f07dc89491177751f6bf680f51b70696bc30b677624c0e525c3fa9784eabdeb2337697ec56f63fc1
+DIST petsc-3.19.4.tar.gz 16630006 BLAKE2B 577655fff12f9f54570393b2023d3386e66c7d4351ef20922f4b8100cbc54eeec0fb6ce249774cb54d2d06062a610c7d755e3b44994a3e053c0c02889810adc8 SHA512 b32b8cf72ea6bf3d976067ce0b722a6fb2ede525bc2293b72daf5693de48c6256e50f3968c0464a5e0d3bb067b936e1d78b66b51626fd27bbef2f57322509564

diff --git a/sci-mathematics/petsc/petsc-3.19.4.ebuild b/sci-mathematics/petsc/petsc-3.19.4.ebuild
new file mode 100644
index 000000000000..f57281175844
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.19.4.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} pypy3 )
+
+inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs
+
+DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
+HOMEPAGE="https://www.mcs.anl.gov/petsc"
+SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="afterimage boost complex-scalars debug +examples fftw
+fortran hdf5 hypre int64 mpi metis mumps scotch superlu threads X"
+
+# readd sparse when suitesparse-5.6.0 is in tree
+# sparse? ( >=sci-libs/suitesparse-5.6.0 >=sci-libs/cholmod-1.7.0 )
+# $(use_with sparse suitesparse) \
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+
+	afterimage? ( media-libs/libafterimage )
+	boost? ( dev-libs/boost )
+	fftw? ( sci-libs/fftw:3.0[mpi?] )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
+	metis? ( >=sci-libs/parmetis-4 )
+	mpi? ( virtual/mpi[fortran?] )
+	mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
+	scotch? ( sci-libs/scotch[int64?,mpi?] )
+	superlu? ( >=sci-libs/superlu-5 )
+	X? ( x11-libs/libX11 )
+"
+DEPEND="
+	${RDEPEND}
+	${PYTHON_DEPS}
+"
+BDEPEND="
+	dev-util/cmake
+	sys-apps/which
+	virtual/pkgconfig
+"
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	complex-scalars? ( !hypre !superlu )
+	fftw? ( mpi )
+	hdf5? ( mpi )
+	hypre? ( mpi !superlu )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	superlu? ( !hypre )
+"
+PATCHES=(
+	"${FILESDIR}/${PN}-3.7.0-disable-rpath.patch"
+	"${FILESDIR}"/${PN}-3.16.0-fix_sandbox_violation.patch
+)
+
+# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
+petsc_enable() {
+	use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"
+}
+# add external library:
+# petsc_with use_flag libname libdir
+# petsc_with use_flag libname include linking_libs
+petsc_with() {
+	local myuse p=${2:-${1}}
+	if use ${1}; then
+		myuse="--with-${p}=1"
+		if [[ $# -ge 4 ]]; then
+			myuse="${myuse} --with-${p}-include=${EPREFIX}${3}"
+			shift 3
+			myuse="${myuse} --with-${p}-lib=$@"
+		else
+			myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
+		fi
+	else
+		myuse="--with-${p}=0"
+	fi
+	echo ${myuse}
+}
+
+# select between configure options depending on use flag
+petsc_select() {
+	use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
+}
+
+src_configure() {
+	# bug 548498
+	# PETSc runs mpi processes during configure that result in a sandbox
+	# violation by trying to open /proc/mtrr rw. This is not easy to
+	# mitigate because it happens in libpciaccess.so called by libhwloc.so,
+	# which is used by libmpi.so.
+	addpredict /proc/mtrr
+	# if mpi is built with knem support it needs /dev/knem too
+	addpredict /dev/knem
+
+	# configureMPITypes with openmpi-2* insists on accessing the scaling
+	# governor rw.
+	addpredict /sys/devices/system/cpu/
+
+	# bug 771711
+	# configureMPIEXEC and  configureMPITypes access /dev/nvidiactl
+	addpredict /dev/nvidiactl
+
+	# bug 810841
+	addpredict /dev/kfd
+
+	local myopt
+
+	use debug && myopt="debug" || myopt="opt"
+
+	# environmental variables expected by petsc during build
+
+	export PETSC_DIR="${S}"
+	export PETSC_ARCH="linux-gnu-c-${myopt}"
+
+	if use debug; then
+		strip-flags
+		filter-flags -O*
+	fi
+
+	tc-export AR RANLIB
+
+	# C Support on CXX builds is enabled if possible i.e. when not using
+	# complex scalars (no complex type for both available at the same time)
+
+	econf \
+		scrollOutput=1 \
+		AR="${AR}" \
+		CFLAGS="${CFLAGS} -fPIC" \
+		CPPFLAGS="${CPPFLAGS}" \
+		CXXFLAGS="${CXXFLAGS} -fPIC" \
+		CXXOPTFLAGS="${CXXFLAGS} -fPIC" \
+		FCFLAGS="${FCFLAGS} -fPIC" \
+		FFLAGS="${FFLAGS} -fPIC" \
+		LDFLAGS="${LDFLAGS}" \
+		MAKEFLAGS="${MAKEFLAGS}" \
+		RANLIB="${RANLIB}" \
+		--prefix="${EPREFIX}/usr/$(get_libdir)/petscdir/" \
+		--with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \
+		--with-cmake:BOOL=1 \
+		--with-gnu-compilers \
+		--with-imagemagick=0 \
+		--with-petsc-arch="${PETSC_ARCH}" \
+		--with-precision=double \
+		--with-python=0 \
+		--with-shared-libraries \
+		--with-single-library \
+		--with-windows-graphics=0 \
+		$(petsc_enable debug debugging) \
+		$(petsc_enable fortran) \
+		$(petsc_enable mpi) \
+		$(petsc_enable mpi mpi-compilers) \
+		$(petsc_enable threads pthread) \
+		$(petsc_select complex-scalars scalar-type complex real) \
+		$(petsc_select mpi cc mpicc $(tc-getCC)) \
+		$(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
+		$(petsc_with afterimage afterimage /usr/include/libAfterImage -lAfterImage) \
+		$(petsc_with hypre hypre /usr/include/hypre -lHYPRE) \
+		$(petsc_with superlu superlu /usr/include/superlu -lsuperlu) \
+		$(petsc_with scotch ptscotch /usr/include/scotch [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
+		$(petsc_with mumps scalapack /usr/include/scalapack -lscalapack) \
+		$(petsc_with mumps mumps /usr/include [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		$(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
+		$(use int64 && echo "--with-index-size=64") \
+		$(use_with boost) \
+		$(use_with fftw) \
+		$(use_with hdf5) \
+		$(use_with X x) \
+		$(use_with X x11)
+}
+
+src_install() {
+	emake DESTDIR="${ED}" install
+
+	#
+	# Clean up the mess:
+	#
+
+	# put all include directories under a proper subdirectory
+	mkdir "${ED}"/usr/include || die "mkdir failed (include)"
+	mv "${ED}"/usr/{$(get_libdir)/petscdir/include,include/petsc} || die "mv failed (include)"
+
+	# put libraries and pkconfig file into proper place
+	mv "${ED}"/usr/$(get_libdir)/petscdir/lib/{libpetsc*,pkgconfig} \
+		"${ED}/usr/$(get_libdir)" || die "mv failed (lib)"
+
+	# move share to proper location
+	mv "${ED}"/usr/{$(get_libdir)/petscdir/share,share} || die "mv failed (share)"
+
+	# fix pc files:
+	sed -i \
+		-e 's#include$#include/petsc#' \
+		-e "s#lib\$#$(get_libdir)#" \
+		-e "s#^prefix=.*petscdir\$#prefix=${EPREFIX}/usr#" \
+		"${ED}"/usr/$(get_libdir)/pkgconfig/*.pc || die "sed failed (pkgconfig)"
+
+	# recreate a "valid" petscdir:
+	for i in "${ED}"/usr/$(get_libdir)/*; do
+		[ $(basename $i) = petscdir ] && continue
+		ln -s "${EPREFIX}/usr/$(get_libdir)/$(basename $i)" \
+			"${ED}/usr/$(get_libdir)/petscdir/lib/$(basename $i)" || die "ln failed (petscdir)"
+	done
+	ln -s "${EPREFIX}"/usr/include/petsc/ \
+		"${ED}/usr/$(get_libdir)/petscdir/include" || die "ln failed (petscdir)"
+	mkdir "${ED}/usr/$(get_libdir)/petscdir/share" || die "mkdir fialed (petscdir)"
+	ln -s "${EPREFIX}"/usr/share/petsc/ \
+		"${ED}/usr/$(get_libdir)/petscdir/share/petsc" || die "ln failed (petscdir)"
+
+	# automatically symlink petsc matlab modules:
+	mkdir -p "${ED}"/usr/share/octave/site/m/
+	ln -s "${EPREFIX}"/usr/share/petsc/matlab "${ED}"/usr/share/octave/site/m/petsc || die "ln failed (matlab)"
+
+	if use examples; then
+		mkdir -p "${ED}"/usr/share/doc/${PF} || die "mkdir failed (examples)"
+		mv "${ED}"/usr/share/petsc/examples "${ED}"/usr/share/doc/${PF} || die "mv failed (examples)"
+		ln -s "${EPREFIX}"/usr/share/doc/${PF}/examples "${ED}"/usr/share/petsc/examples || die "ln failed (examples)"
+		docompress -x /usr/share/doc/${PF}/examples
+	else
+		rm -r "${ED}"/usr/share/petsc/examples || die "rm failed (examples)"
+	fi
+
+	# add PETSC_DIR to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petscdir
+	EOF
+	doenvd 99petsc
+}


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2024-03-20  6:26 Sam James
  0 siblings, 0 replies; 25+ messages in thread
From: Sam James @ 2024-03-20  6:26 UTC (permalink / raw
  To: gentoo-commits

commit:     da874d5b89d64f6e4d66117d6709212da1c39377
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Wed Mar 20 04:26:27 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 20 06:17:04 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da874d5b

sci-mathematics/petsc: add gitlab upstream metadata

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-mathematics/petsc/metadata.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sci-mathematics/petsc/metadata.xml b/sci-mathematics/petsc/metadata.xml
index 987028fd7636..5d587548e725 100644
--- a/sci-mathematics/petsc/metadata.xml
+++ b/sci-mathematics/petsc/metadata.xml
@@ -21,4 +21,7 @@
 		<flag name="sparse">Use suitesparse (<pkg>sci-libs/suitesparse</pkg>) including cholmod (<pkg>sci-libs/cholmod</pkg>) for sparse factorization</flag>
 		<flag name="superlu">Use superlu (<pkg>sci-libs/superlu</pkg>) for preconditioning</flag>
 	</use>
+	<upstream>
+		<remote-id type="gitlab">petsc/petsc</remote-id>
+	</upstream>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2024-03-20  6:26 Sam James
  0 siblings, 0 replies; 25+ messages in thread
From: Sam James @ 2024-03-20  6:26 UTC (permalink / raw
  To: gentoo-commits

commit:     106998aeb2c2b4cfc0d77ef914fc369945cf698e
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Wed Mar 20 04:40:57 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 20 06:17:05 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=106998ae

sci-mathematics/petsc: drop outdated build time dep on which

Dropped upstream when configure was rewritten from shell to python:
https://gitlab.com/petsc/petsc/-/commit/df3bd252dbc574245cbbb4edf6b407438c525c05

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-mathematics/petsc/petsc-3.18.2.ebuild | 1 -
 sci-mathematics/petsc/petsc-3.19.1.ebuild | 1 -
 sci-mathematics/petsc/petsc-3.19.2.ebuild | 1 -
 sci-mathematics/petsc/petsc-3.19.4.ebuild | 1 -
 4 files changed, 4 deletions(-)

diff --git a/sci-mathematics/petsc/petsc-3.18.2.ebuild b/sci-mathematics/petsc/petsc-3.18.2.ebuild
index 27e8a71e87ea..30f4763b16a3 100644
--- a/sci-mathematics/petsc/petsc-3.18.2.ebuild
+++ b/sci-mathematics/petsc/petsc-3.18.2.ebuild
@@ -42,7 +42,6 @@ DEPEND="
 "
 BDEPEND="
 	dev-build/cmake
-	sys-apps/which
 	virtual/pkgconfig
 "
 

diff --git a/sci-mathematics/petsc/petsc-3.19.1.ebuild b/sci-mathematics/petsc/petsc-3.19.1.ebuild
index 27e8a71e87ea..30f4763b16a3 100644
--- a/sci-mathematics/petsc/petsc-3.19.1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.19.1.ebuild
@@ -42,7 +42,6 @@ DEPEND="
 "
 BDEPEND="
 	dev-build/cmake
-	sys-apps/which
 	virtual/pkgconfig
 "
 

diff --git a/sci-mathematics/petsc/petsc-3.19.2.ebuild b/sci-mathematics/petsc/petsc-3.19.2.ebuild
index 27e8a71e87ea..30f4763b16a3 100644
--- a/sci-mathematics/petsc/petsc-3.19.2.ebuild
+++ b/sci-mathematics/petsc/petsc-3.19.2.ebuild
@@ -42,7 +42,6 @@ DEPEND="
 "
 BDEPEND="
 	dev-build/cmake
-	sys-apps/which
 	virtual/pkgconfig
 "
 

diff --git a/sci-mathematics/petsc/petsc-3.19.4.ebuild b/sci-mathematics/petsc/petsc-3.19.4.ebuild
index 27e8a71e87ea..30f4763b16a3 100644
--- a/sci-mathematics/petsc/petsc-3.19.4.ebuild
+++ b/sci-mathematics/petsc/petsc-3.19.4.ebuild
@@ -42,7 +42,6 @@ DEPEND="
 "
 BDEPEND="
 	dev-build/cmake
-	sys-apps/which
 	virtual/pkgconfig
 "
 


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2024-03-20  6:26 Sam James
  0 siblings, 0 replies; 25+ messages in thread
From: Sam James @ 2024-03-20  6:26 UTC (permalink / raw
  To: gentoo-commits

commit:     910e8c105f7baa719597ea9610e3d66ed2a0d0fb
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Wed Mar 20 05:12:54 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 20 06:17:06 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=910e8c10

sci-mathematics/petsc: add 3.20.5

Homepage is now a redirect. Resolve it in the ebuild.

Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-mathematics/petsc/Manifest            |   1 +
 sci-mathematics/petsc/petsc-3.20.5.ebuild | 240 ++++++++++++++++++++++++++++++
 2 files changed, 241 insertions(+)

diff --git a/sci-mathematics/petsc/Manifest b/sci-mathematics/petsc/Manifest
index 7cdcf15e1f67..d2cf6223e721 100644
--- a/sci-mathematics/petsc/Manifest
+++ b/sci-mathematics/petsc/Manifest
@@ -5,3 +5,4 @@ DIST petsc-3.18.2.tar.gz 18409507 BLAKE2B 999d4fc80dedb5f9ce58333b6052b15ff499e3
 DIST petsc-3.19.1.tar.gz 16659061 BLAKE2B 8c7b22e5f97756261a5d0e8b707670d55db53e209fd1e116a2adb517d42f5e8bd5ecc911c9e967b88a8dc60a2d872c1d7a279539c65064884b4cfbe856434ad3 SHA512 5b9b71599a95e2d82d18d5313c424a08eead0c10f27f40c82159839ef0fa8aeda88ddea693a12d58b8ac29a41c4138e8188a3c91d6af540196ee3a977cf9539d
 DIST petsc-3.19.2.tar.gz 16627765 BLAKE2B 1267db717989c3819f32ac6a62642054af2ac49d9e9276ffd4f0846d73e31ae4a5dcca4ad794b91cdb29463b7ec68040baa4e1cad99aaef8ab910ff7b64d7478 SHA512 f8feeb66fa8bd2406227be0e2cc2946485238362270d40e3f07dc89491177751f6bf680f51b70696bc30b677624c0e525c3fa9784eabdeb2337697ec56f63fc1
 DIST petsc-3.19.4.tar.gz 16630006 BLAKE2B 577655fff12f9f54570393b2023d3386e66c7d4351ef20922f4b8100cbc54eeec0fb6ce249774cb54d2d06062a610c7d755e3b44994a3e053c0c02889810adc8 SHA512 b32b8cf72ea6bf3d976067ce0b722a6fb2ede525bc2293b72daf5693de48c6256e50f3968c0464a5e0d3bb067b936e1d78b66b51626fd27bbef2f57322509564
+DIST petsc-3.20.5.tar.gz 17077395 BLAKE2B e76ff83572f7f0fcfa85b80f36301e0378d240e60726f07ab78a66b87591434bda6a96758037580370965f91c03341d95f60cfb961c2ab6707eeaafd5a7b1e1d SHA512 1e0ebdacbcc9db22dbe3803cbc13f5e0138d0412c328ff49cab024c839527c73b28983717104daf0858d482a8804b931c5c2bf20363c6b801d2be7d27219692f

diff --git a/sci-mathematics/petsc/petsc-3.20.5.ebuild b/sci-mathematics/petsc/petsc-3.20.5.ebuild
new file mode 100644
index 000000000000..ccf9449db9cb
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.20.5.ebuild
@@ -0,0 +1,240 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..11} pypy3 )
+
+inherit flag-o-matic fortran-2 python-any-r1 toolchain-funcs
+
+DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
+HOMEPAGE="https://petsc.org/release/"
+SRC_URI="https://web.cels.anl.gov/projects/petsc/download/release-snapshots/${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="afterimage boost complex-scalars debug +examples fftw
+fortran hdf5 hypre int64 mpi metis mumps scotch superlu threads X"
+
+# readd sparse when suitesparse-5.6.0 is in tree
+# sparse? ( >=sci-libs/suitesparse-5.6.0 >=sci-libs/cholmod-1.7.0 )
+# $(use_with sparse suitesparse) \
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+
+	afterimage? ( media-libs/libafterimage )
+	boost? ( dev-libs/boost )
+	fftw? ( sci-libs/fftw:3.0[mpi?] )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
+	metis? ( >=sci-libs/parmetis-4 )
+	mpi? ( virtual/mpi[fortran?] )
+	mumps? ( sci-libs/mumps[mpi?] sci-libs/scalapack )
+	scotch? ( sci-libs/scotch[int64?,mpi?] )
+	superlu? ( >=sci-libs/superlu-5 )
+	X? ( x11-libs/libX11 )
+"
+DEPEND="
+	${RDEPEND}
+	${PYTHON_DEPS}
+"
+BDEPEND="
+	dev-build/cmake
+	virtual/pkgconfig
+"
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	complex-scalars? ( !hypre !superlu )
+	fftw? ( mpi )
+	hdf5? ( mpi )
+	hypre? ( mpi !superlu )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	superlu? ( !hypre )
+"
+PATCHES=(
+	"${FILESDIR}/${PN}-3.7.0-disable-rpath.patch"
+	"${FILESDIR}"/${PN}-3.16.0-fix_sandbox_violation.patch
+)
+
+# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
+petsc_enable() {
+	use "$1" && echo "--with-${2:-$1}=1" || echo "--with-${2:-$1}=0"
+}
+# add external library:
+# petsc_with use_flag libname libdir
+# petsc_with use_flag libname include linking_libs
+petsc_with() {
+	local myuse p=${2:-${1}}
+	if use ${1}; then
+		myuse="--with-${p}=1"
+		if [[ $# -ge 4 ]]; then
+			myuse="${myuse} --with-${p}-include=${EPREFIX}${3}"
+			shift 3
+			myuse="${myuse} --with-${p}-lib=$@"
+		else
+			myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
+		fi
+	else
+		myuse="--with-${p}=0"
+	fi
+	echo ${myuse}
+}
+
+# select between configure options depending on use flag
+petsc_select() {
+	use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
+}
+
+src_configure() {
+	# -Werror=lto-type-mismatch
+	# https://bugs.gentoo.org/863260
+	# https://gitlab.com/petsc/petsc/-/issues/1560
+	filter-lto
+
+	# bug 548498
+	# PETSc runs mpi processes during configure that result in a sandbox
+	# violation by trying to open /proc/mtrr rw. This is not easy to
+	# mitigate because it happens in libpciaccess.so called by libhwloc.so,
+	# which is used by libmpi.so.
+	addpredict /proc/mtrr
+	# if mpi is built with knem support it needs /dev/knem too
+	addpredict /dev/knem
+
+	# configureMPITypes with openmpi-2* insists on accessing the scaling
+	# governor rw.
+	addpredict /sys/devices/system/cpu/
+
+	# bug 771711
+	# configureMPIEXEC and  configureMPITypes access /dev/nvidiactl
+	addpredict /dev/nvidiactl
+
+	# bug 810841
+	addpredict /dev/kfd
+
+	local myopt
+
+	use debug && myopt="debug" || myopt="opt"
+
+	# environmental variables expected by petsc during build
+
+	export PETSC_DIR="${S}"
+	export PETSC_ARCH="linux-gnu-c-${myopt}"
+
+	if use debug; then
+		strip-flags
+		filter-flags -O*
+	fi
+
+	tc-export AR RANLIB
+
+	# C Support on CXX builds is enabled if possible i.e. when not using
+	# complex scalars (no complex type for both available at the same time)
+
+	econf \
+		scrollOutput=1 \
+		AR="${AR}" \
+		CFLAGS="${CFLAGS} -fPIC" \
+		CPPFLAGS="${CPPFLAGS}" \
+		CXXFLAGS="${CXXFLAGS} -fPIC" \
+		CXXOPTFLAGS="${CXXFLAGS} -fPIC" \
+		FCFLAGS="${FCFLAGS} -fPIC" \
+		FFLAGS="${FFLAGS} -fPIC" \
+		LDFLAGS="${LDFLAGS}" \
+		MAKEFLAGS="${MAKEFLAGS}" \
+		RANLIB="${RANLIB}" \
+		--prefix="${EPREFIX}/usr/$(get_libdir)/petscdir/" \
+		--with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs blas lapack)" \
+		--with-cmake:BOOL=1 \
+		--with-gnu-compilers \
+		--with-imagemagick=0 \
+		--with-petsc-arch="${PETSC_ARCH}" \
+		--with-precision=double \
+		--with-python=0 \
+		--with-shared-libraries \
+		--with-single-library \
+		--with-windows-graphics=0 \
+		$(petsc_enable debug debugging) \
+		$(petsc_enable fortran) \
+		$(petsc_enable mpi) \
+		$(petsc_enable mpi mpi-compilers) \
+		$(petsc_enable threads pthread) \
+		$(petsc_select complex-scalars scalar-type complex real) \
+		$(petsc_select mpi cc mpicc $(tc-getCC)) \
+		$(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
+		$(petsc_with afterimage afterimage /usr/include/libAfterImage -lAfterImage) \
+		$(petsc_with hypre hypre /usr/include/hypre -lHYPRE) \
+		$(petsc_with superlu superlu /usr/include/superlu -lsuperlu) \
+		$(petsc_with scotch ptscotch /usr/include/scotch [-lptesmumps,-lptscotch,-lptscotcherr,-lscotch,-lscotcherr]) \
+		$(petsc_with mumps scalapack /usr/include/scalapack -lscalapack) \
+		$(petsc_with mumps mumps /usr/include [-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		$(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
+		$(use int64 && echo "--with-index-size=64") \
+		$(use_with boost) \
+		$(use_with fftw) \
+		$(use_with hdf5) \
+		$(use_with X x) \
+		$(use_with X x11)
+}
+
+src_install() {
+	emake DESTDIR="${ED}" install
+
+	#
+	# Clean up the mess:
+	#
+
+	# put all include directories under a proper subdirectory
+	mkdir "${ED}"/usr/include || die "mkdir failed (include)"
+	mv "${ED}"/usr/{$(get_libdir)/petscdir/include,include/petsc} || die "mv failed (include)"
+
+	# put libraries and pkconfig file into proper place
+	mv "${ED}"/usr/$(get_libdir)/petscdir/lib/{libpetsc*,pkgconfig} \
+		"${ED}/usr/$(get_libdir)" || die "mv failed (lib)"
+
+	# move share to proper location
+	mv "${ED}"/usr/{$(get_libdir)/petscdir/share,share} || die "mv failed (share)"
+
+	# fix pc files:
+	sed -i \
+		-e 's#include$#include/petsc#' \
+		-e "s#lib\$#$(get_libdir)#" \
+		-e "s#^prefix=.*petscdir\$#prefix=${EPREFIX}/usr#" \
+		"${ED}"/usr/$(get_libdir)/pkgconfig/*.pc || die "sed failed (pkgconfig)"
+
+	# recreate a "valid" petscdir:
+	for i in "${ED}"/usr/$(get_libdir)/*; do
+		[ $(basename $i) = petscdir ] && continue
+		ln -s "${EPREFIX}/usr/$(get_libdir)/$(basename $i)" \
+			"${ED}/usr/$(get_libdir)/petscdir/lib/$(basename $i)" || die "ln failed (petscdir)"
+	done
+	ln -s "${EPREFIX}"/usr/include/petsc/ \
+		"${ED}/usr/$(get_libdir)/petscdir/include" || die "ln failed (petscdir)"
+	mkdir "${ED}/usr/$(get_libdir)/petscdir/share" || die "mkdir fialed (petscdir)"
+	ln -s "${EPREFIX}"/usr/share/petsc/ \
+		"${ED}/usr/$(get_libdir)/petscdir/share/petsc" || die "ln failed (petscdir)"
+
+	# automatically symlink petsc matlab modules:
+	mkdir -p "${ED}"/usr/share/octave/site/m/
+	ln -s "${EPREFIX}"/usr/share/petsc/matlab "${ED}"/usr/share/octave/site/m/petsc || die "ln failed (matlab)"
+
+	if use examples; then
+		mkdir -p "${ED}"/usr/share/doc/${PF} || die "mkdir failed (examples)"
+		mv "${ED}"/usr/share/petsc/examples "${ED}"/usr/share/doc/${PF} || die "mv failed (examples)"
+		ln -s "${EPREFIX}"/usr/share/doc/${PF}/examples "${ED}"/usr/share/petsc/examples || die "ln failed (examples)"
+		docompress -x /usr/share/doc/${PF}/examples
+	else
+		rm -r "${ED}"/usr/share/petsc/examples || die "rm failed (examples)"
+	fi
+
+	# add PETSC_DIR to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petscdir
+	EOF
+	doenvd 99petsc
+}


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2024-03-20  6:26 Sam James
  0 siblings, 0 replies; 25+ messages in thread
From: Sam James @ 2024-03-20  6:26 UTC (permalink / raw
  To: gentoo-commits

commit:     acd8fdb9c2b373a613ad72eaf8dcc21136b5035d
Author:     Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Wed Mar 20 05:03:48 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Mar 20 06:17:06 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acd8fdb9

sci-mathematics/petsc: mark as LTO-unsafe

Closes: https://bugs.gentoo.org/863260
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-mathematics/petsc/petsc-3.19.4.ebuild | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sci-mathematics/petsc/petsc-3.19.4.ebuild b/sci-mathematics/petsc/petsc-3.19.4.ebuild
index 30f4763b16a3..fcd1c43750f1 100644
--- a/sci-mathematics/petsc/petsc-3.19.4.ebuild
+++ b/sci-mathematics/petsc/petsc-3.19.4.ebuild
@@ -92,6 +92,11 @@ petsc_select() {
 }
 
 src_configure() {
+	# -Werror=lto-type-mismatch
+	# https://bugs.gentoo.org/863260
+	# https://gitlab.com/petsc/petsc/-/issues/1560
+	filter-lto
+
 	# bug 548498
 	# PETSc runs mpi processes during configure that result in a sandbox
 	# violation by trying to open /proc/mtrr rw. This is not easy to


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2024-04-23 20:37 Sam James
  0 siblings, 0 replies; 25+ messages in thread
From: Sam James @ 2024-04-23 20:37 UTC (permalink / raw
  To: gentoo-commits

commit:     d8d1c87a72df05f8ef8f5a320259bcf6e680813a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 23 20:34:39 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 23 20:34:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8d1c87a

sci-mathematics/petsc: add subslot dep on sci-libs/hdf5

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../petsc/{petsc-3.16.0-r1.ebuild => petsc-3.16.0-r2.ebuild}            | 2 +-
 .../petsc/{petsc-3.17.1-r1.ebuild => petsc-3.17.1-r2.ebuild}            | 2 +-
 sci-mathematics/petsc/{petsc-3.19.2.ebuild => petsc-3.18.2-r1.ebuild}   | 2 +-
 sci-mathematics/petsc/{petsc-3.18.2.ebuild => petsc-3.19.1-r1.ebuild}   | 2 +-
 sci-mathematics/petsc/{petsc-3.19.1.ebuild => petsc-3.19.2-r1.ebuild}   | 2 +-
 sci-mathematics/petsc/{petsc-3.19.4.ebuild => petsc-3.19.4-r1.ebuild}   | 2 +-
 sci-mathematics/petsc/{petsc-3.20.5.ebuild => petsc-3.20.5-r1.ebuild}   | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/sci-mathematics/petsc/petsc-3.16.0-r1.ebuild b/sci-mathematics/petsc/petsc-3.16.0-r2.ebuild
similarity index 99%
rename from sci-mathematics/petsc/petsc-3.16.0-r1.ebuild
rename to sci-mathematics/petsc/petsc-3.16.0-r2.ebuild
index 743b36c54912..03c4e3d5a062 100644
--- a/sci-mathematics/petsc/petsc-3.16.0-r1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.16.0-r2.ebuild
@@ -36,7 +36,7 @@ RDEPEND="
 	afterimage? ( media-libs/libafterimage )
 	boost? ( dev-libs/boost )
 	fftw? ( sci-libs/fftw:3.0[mpi?] )
-	hdf5? ( sci-libs/hdf5[mpi?] )
+	hdf5? ( sci-libs/hdf5:=[mpi?] )
 	hypre? ( >=sci-libs/hypre-2.18.0[mpi?] )
 	metis? ( >=sci-libs/parmetis-4 )
 	mpi? ( virtual/mpi[cxx?,fortran?] )

diff --git a/sci-mathematics/petsc/petsc-3.17.1-r1.ebuild b/sci-mathematics/petsc/petsc-3.17.1-r2.ebuild
similarity index 99%
rename from sci-mathematics/petsc/petsc-3.17.1-r1.ebuild
rename to sci-mathematics/petsc/petsc-3.17.1-r2.ebuild
index 5caa2d8578da..df212d111e62 100644
--- a/sci-mathematics/petsc/petsc-3.17.1-r1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.17.1-r2.ebuild
@@ -27,7 +27,7 @@ RDEPEND="
 	afterimage? ( media-libs/libafterimage )
 	boost? ( dev-libs/boost )
 	fftw? ( sci-libs/fftw:3.0[mpi?] )
-	hdf5? ( sci-libs/hdf5[mpi?] )
+	hdf5? ( sci-libs/hdf5:=[mpi?] )
 	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
 	metis? ( >=sci-libs/parmetis-4 )
 	mpi? ( virtual/mpi[fortran?] )

diff --git a/sci-mathematics/petsc/petsc-3.19.2.ebuild b/sci-mathematics/petsc/petsc-3.18.2-r1.ebuild
similarity index 99%
rename from sci-mathematics/petsc/petsc-3.19.2.ebuild
rename to sci-mathematics/petsc/petsc-3.18.2-r1.ebuild
index 30f4763b16a3..00ca06c193f2 100644
--- a/sci-mathematics/petsc/petsc-3.19.2.ebuild
+++ b/sci-mathematics/petsc/petsc-3.18.2-r1.ebuild
@@ -27,7 +27,7 @@ RDEPEND="
 	afterimage? ( media-libs/libafterimage )
 	boost? ( dev-libs/boost )
 	fftw? ( sci-libs/fftw:3.0[mpi?] )
-	hdf5? ( sci-libs/hdf5[mpi?] )
+	hdf5? ( sci-libs/hdf5:=[mpi?] )
 	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
 	metis? ( >=sci-libs/parmetis-4 )
 	mpi? ( virtual/mpi[fortran?] )

diff --git a/sci-mathematics/petsc/petsc-3.18.2.ebuild b/sci-mathematics/petsc/petsc-3.19.1-r1.ebuild
similarity index 99%
rename from sci-mathematics/petsc/petsc-3.18.2.ebuild
rename to sci-mathematics/petsc/petsc-3.19.1-r1.ebuild
index 30f4763b16a3..00ca06c193f2 100644
--- a/sci-mathematics/petsc/petsc-3.18.2.ebuild
+++ b/sci-mathematics/petsc/petsc-3.19.1-r1.ebuild
@@ -27,7 +27,7 @@ RDEPEND="
 	afterimage? ( media-libs/libafterimage )
 	boost? ( dev-libs/boost )
 	fftw? ( sci-libs/fftw:3.0[mpi?] )
-	hdf5? ( sci-libs/hdf5[mpi?] )
+	hdf5? ( sci-libs/hdf5:=[mpi?] )
 	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
 	metis? ( >=sci-libs/parmetis-4 )
 	mpi? ( virtual/mpi[fortran?] )

diff --git a/sci-mathematics/petsc/petsc-3.19.1.ebuild b/sci-mathematics/petsc/petsc-3.19.2-r1.ebuild
similarity index 99%
rename from sci-mathematics/petsc/petsc-3.19.1.ebuild
rename to sci-mathematics/petsc/petsc-3.19.2-r1.ebuild
index 30f4763b16a3..00ca06c193f2 100644
--- a/sci-mathematics/petsc/petsc-3.19.1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.19.2-r1.ebuild
@@ -27,7 +27,7 @@ RDEPEND="
 	afterimage? ( media-libs/libafterimage )
 	boost? ( dev-libs/boost )
 	fftw? ( sci-libs/fftw:3.0[mpi?] )
-	hdf5? ( sci-libs/hdf5[mpi?] )
+	hdf5? ( sci-libs/hdf5:=[mpi?] )
 	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
 	metis? ( >=sci-libs/parmetis-4 )
 	mpi? ( virtual/mpi[fortran?] )

diff --git a/sci-mathematics/petsc/petsc-3.19.4.ebuild b/sci-mathematics/petsc/petsc-3.19.4-r1.ebuild
similarity index 99%
rename from sci-mathematics/petsc/petsc-3.19.4.ebuild
rename to sci-mathematics/petsc/petsc-3.19.4-r1.ebuild
index fcd1c43750f1..e24eda87a3af 100644
--- a/sci-mathematics/petsc/petsc-3.19.4.ebuild
+++ b/sci-mathematics/petsc/petsc-3.19.4-r1.ebuild
@@ -27,7 +27,7 @@ RDEPEND="
 	afterimage? ( media-libs/libafterimage )
 	boost? ( dev-libs/boost )
 	fftw? ( sci-libs/fftw:3.0[mpi?] )
-	hdf5? ( sci-libs/hdf5[mpi?] )
+	hdf5? ( sci-libs/hdf5:=[mpi?] )
 	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
 	metis? ( >=sci-libs/parmetis-4 )
 	mpi? ( virtual/mpi[fortran?] )

diff --git a/sci-mathematics/petsc/petsc-3.20.5.ebuild b/sci-mathematics/petsc/petsc-3.20.5-r1.ebuild
similarity index 99%
rename from sci-mathematics/petsc/petsc-3.20.5.ebuild
rename to sci-mathematics/petsc/petsc-3.20.5-r1.ebuild
index ccf9449db9cb..98e1795c95fc 100644
--- a/sci-mathematics/petsc/petsc-3.20.5.ebuild
+++ b/sci-mathematics/petsc/petsc-3.20.5-r1.ebuild
@@ -27,7 +27,7 @@ RDEPEND="
 	afterimage? ( media-libs/libafterimage )
 	boost? ( dev-libs/boost )
 	fftw? ( sci-libs/fftw:3.0[mpi?] )
-	hdf5? ( sci-libs/hdf5[mpi?] )
+	hdf5? ( sci-libs/hdf5:=[mpi?] )
 	hypre? ( >=sci-libs/hypre-2.18.0[int64?,mpi?] )
 	metis? ( >=sci-libs/parmetis-4 )
 	mpi? ( virtual/mpi[fortran?] )


^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/
@ 2024-07-23  3:40 Eli Schwartz
  0 siblings, 0 replies; 25+ messages in thread
From: Eli Schwartz @ 2024-07-23  3:40 UTC (permalink / raw
  To: gentoo-commits

commit:     194c51ef21d9f08768557166e3f0597f84c3ea94
Author:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 23 03:22:26 2024 +0000
Commit:     Eli Schwartz <eschwartz <AT> gentoo <DOT> org>
CommitDate: Tue Jul 23 03:32:33 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=194c51ef

sci-mathematics/petsc: remove outdated LTO workaround

Fix is tagged in 3.20.6

Signed-off-by: Eli Schwartz <eschwartz <AT> gentoo.org>

 sci-mathematics/petsc/petsc-3.21.3.ebuild | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/sci-mathematics/petsc/petsc-3.21.3.ebuild b/sci-mathematics/petsc/petsc-3.21.3.ebuild
index 34622426cdb2..10be74f1f7e2 100644
--- a/sci-mathematics/petsc/petsc-3.21.3.ebuild
+++ b/sci-mathematics/petsc/petsc-3.21.3.ebuild
@@ -92,11 +92,6 @@ petsc_select() {
 }
 
 src_configure() {
-	# -Werror=lto-type-mismatch
-	# https://bugs.gentoo.org/863260
-	# https://gitlab.com/petsc/petsc/-/issues/1560
-	filter-lto
-
 	# bug 548498
 	# PETSc runs mpi processes during configure that result in a sandbox
 	# violation by trying to open /proc/mtrr rw. This is not easy to


^ permalink raw reply related	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2024-07-23  3:40 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-28  6:48 [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/petsc/ Matthias Maier
  -- strict thread matches above, loose matches on Subject: below --
2024-07-23  3:40 Eli Schwartz
2024-04-23 20:37 Sam James
2024-03-20  6:26 Sam James
2024-03-20  6:26 Sam James
2024-03-20  6:26 Sam James
2024-03-20  6:26 Sam James
2023-08-06 12:13 Matthias Maier
2023-06-19 18:37 Matthias Maier
2023-05-07 18:59 Matthias Maier
2022-08-26 10:46 Sam James
2022-06-03  3:57 Sam James
2022-06-03  3:15 Sam James
2022-05-26  1:27 Matthias Maier
2022-05-26  1:27 Matthias Maier
2022-01-04 15:17 Andrew Ammerlaan
2021-11-08 12:31 Andrew Ammerlaan
2021-10-17 19:25 Arthur Zamarin
2021-04-17  0:15 Matthias Maier
2021-04-09 18:26 Matthias Maier
2021-04-09 18:26 Matthias Maier
2020-06-27 20:45 Andreas K. Hüttel
2020-05-10 22:02 Matthias Maier
2019-11-14 23:26 Matthias Maier
2019-11-14  6:13 Matthias Maier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox