public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2011-03-19 12:05 Jens-Malte Gottfried
  0 siblings, 0 replies; 19+ messages in thread
From: Jens-Malte Gottfried @ 2011-03-19 12:05 UTC (permalink / raw
  To: gentoo-commits

commit:     b45bc396733e374a19e2d6f623bf2ce0730b11a1
Author:     Jens-Malte Gottfried <jmgottfried <AT> web <DOT> de>
AuthorDate: Sat Mar 19 12:02:35 2011 +0000
Commit:     Jens-Malte Gottfried <jmg <AT> godefridus <DOT> de>
CommitDate: Sat Mar 19 12:02:35 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=b45bc396

added petsc-3.1_p8 ebuild

---
 sci-mathematics/petsc/ChangeLog                    |    6 +
 .../petsc/files/petsc-3.1_p8-configure-pic.patch   |   11 ++
 sci-mathematics/petsc/petsc-3.1_p8.ebuild          |  177 ++++++++++++++++++++
 3 files changed, 194 insertions(+), 0 deletions(-)

diff --git a/sci-mathematics/petsc/ChangeLog b/sci-mathematics/petsc/ChangeLog
index 005db5e..5a3533b 100644
--- a/sci-mathematics/petsc/ChangeLog
+++ b/sci-mathematics/petsc/ChangeLog
@@ -2,6 +2,12 @@
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*petsc-3.1_p8 (19 Mar 2011)
+
+  19 Mar 2011; Jens-Malte Gottfried <jmgottfried@web.de>
+  +petsc-3.1_p8.ebuild, +files/petsc-3.1_p8-configure-pic.patch:
+  added petsc 3.1-p8 release, fixed configure-pic patch
+
 *petsc-3.1_p7 (06 Jan 2011)
 
   06 Jan 2011; Jens-Malte Gottfried <jmgottfried@web.de>

diff --git a/sci-mathematics/petsc/files/petsc-3.1_p8-configure-pic.patch b/sci-mathematics/petsc/files/petsc-3.1_p8-configure-pic.patch
new file mode 100644
index 0000000..bbfdae1
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-3.1_p8-configure-pic.patch
@@ -0,0 +1,11 @@
+--- config/BuildSystem/config/setCompilers.py.old	2010-09-07 21:41:32.693103846 +0200
++++ config/BuildSystem/config/setCompilers.py	2010-09-07 21:41:45.322093881 +0200
+@@ -875,7 +875,7 @@
+       languages.append('FC')
+     for language in languages:
+       self.pushLanguage(language)
+-      for testFlag in ['-PIC', '-fPIC', '-KPIC','-qpic']:
++      for testFlag in ['-fPIC', '-PIC', '-KPIC', '-qpic']:
+         try:
+           self.framework.logPrint('Trying '+language+' compiler flag '+testFlag)
+           if not self.checkLinkerFlag(testFlag):

diff --git a/sci-mathematics/petsc/petsc-3.1_p8.ebuild b/sci-mathematics/petsc/petsc-3.1_p8.ebuild
new file mode 100644
index 0000000..a7566db
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.1_p8.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+inherit flag-o-matic toolchain-funcs
+
+MY_P="${PN}-${PV/_/-}"
+
+DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
+HOMEPAGE="http://www.mcs.anl.gov/petsc/petsc-as/"
+SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${MY_P}.tar.gz"
+
+LICENSE="petsc"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="mpi hypre metis hdf5 X cxx debug static-libs fortran doc"
+
+RDEPEND="mpi? ( virtual/mpi[cxx?,fortran?] )
+	X? ( x11-libs/libX11 )
+	virtual/lapack
+	virtual/blas
+	hypre? ( >=sci-mathematics/hypre-2.6.0b[static-libs=] )
+	metis? ( sci-libs/parmetis )
+	hdf5? ( sci-libs/hdf5[!mpi?] )
+"
+
+DEPEND="${RDEPEND}
+	sys-devel/gcc[-nocxx,fortran?]"
+
+S="${WORKDIR}/${MY_P}"
+
+if use hypre; then
+	use cxx || die "hypre needs cxx, please enable cxx or disable hypre use flag"
+	use mpi || die "hypre needs mpi, please enable mpi or disable hypre use flag"
+fi
+
+src_prepare(){
+	epatch "${FILESDIR}/${P}-configure-pic.patch"
+	epatch "${FILESDIR}/${PN}-disable-rpath.patch"
+}
+
+src_configure(){
+	local mylang
+	local myopt
+	local myconf
+
+	use cxx && mylang="cxx" || mylang="c"
+	use debug && myopt="debug" || myopt="opt"
+
+	export PETSC_DIR="${S}" || die
+	export PETSC_ARCH="linux-gnu-${mylang}-${myopt}" || die
+
+	myconf[10]="--with-blas-lapack-lib=$(pkg-config --libs lapack)"
+	myconf[11]="CFLAGS=${CFLAGS}"
+	myconf[12]="CXXFLAGS=${CXXFLAGS}"
+	myconf[13]="LDFLAGS=${LDFLAGS}"
+	myconf[14]="--with-windows-graphics=0"
+	myconf[15]="--with-matlab=0"
+	myconf[16]="--with-python=0"
+	myconf[17]="--with-clanguage=${mylang}"
+	myconf[18]="--with-single-library=1"
+	myconf[19]="--with-petsc-arch=${PETSC_ARCH}"
+	myconf[20]="--with-precision=double"
+	myconf[21]="--with-gnu-compilers=1"
+	use amd64 \
+		&& myconf[22]="--with-64-bit-pointers=1" \
+		|| myconf[22]="--with-64-bit-pointers=0"
+	use cxx \
+		&& myconf[23]="--with-c-support=1"
+	use amd64 \
+		&& myconf[24]="--with-64-bit-indices=1" \
+		|| myconf[24]="--with-64-bit-indices=0"
+
+	if use mpi; then
+		myconf[30]="--with-cc=/usr/bin/mpicc"
+		myconf[31]="--with-cxx=/usr/bin/mpicxx"
+		use fortran && myconf[32]="--with-fc=/usr/bin/mpif77"
+		myconf[33]="--with-mpi=1"
+		myconf[34]="--with-mpi-compilers=1"
+	else
+		myconf[30]="--with-cc=$(tc-getCC)"
+		myconf[31]="--with-cxx=$(tc-getCXX)"
+		use fortran && myconf[32]="--with-fc=$(tc-getF77)"
+		myconf[33]="--with-mpi=0"
+	fi
+
+	use X \
+		&& myconf[40]="--with-X=1" \
+		|| myconf[40]="--with-X=0"
+	use static-libs \
+		&& myconf[41]="--with-shared=0" \
+		|| myconf[41]="--with-shared=1"
+	use fortran \
+		&& myconf[43]="--with-fortran=1" \
+		|| myconf[43]="--with-fortran=0"
+
+	if use debug; then
+		strip-flags
+		filter-flags -O*
+		myconf[44]="--with-debugging=1"
+	else
+		myconf[44]="--with-debugging=0"
+	fi
+
+	if use hypre; then
+		# hypre cannot handle 64 bit indices, therefore disabled
+		myconf[24]="--with-64-bit-indices=0"
+		myconf[52]="--with-hypre=1"
+		myconf[53]="--with-hypre-include=/usr/include/hypre"
+		use static-libs \
+			&& myconf[54]="--with-hypre-lib=/usr/$(get_libdir)/libHYPRE.a" \
+			|| myconf[54]="--with-hypre-lib=/usr/$(get_libdir)/libHYPRE.so"
+	else
+		myconf[52]="--with-hypre=0"
+	fi
+
+	if use metis; then
+		myconf[61]="--with-parmetis=1"
+		myconf[62]="--with-parmetis-include=/usr/include/parmetis"
+		myconf[63]="--with-parmetis-lib=/usr/$(get_libdir)/libparmetis.so"
+	else
+		myconf[61]="--with-parmetis=0"
+	fi
+
+	if use hdf5; then
+		myconf[71]="--with-hdf5=1"
+		myconf[72]="--with-hdf5-include=/usr/include"
+		myconf[73]="--with-hdf5-lib=/usr/$(get_libdir)/libhdf5.so"
+	else
+		myconf[71]="--with-hdf5=0"
+	fi
+
+	myconf[81]="--with-scotch=0"
+
+	einfo "Configure options: ${myconf[@]}"
+	python "${S}/config/configure.py" "${myconf[@]}" \
+		|| die "PETSc configuration failed"
+}
+
+src_install(){
+	insinto /usr/include/"${PN}"
+	doins "${S}"/include/*.h "${S}"/include/*.hh
+	doins "${S}/${PETSC_ARCH}"/include/*.h
+
+	insinto /usr/include/"${PN}"/private
+	doins "${S}"/include/private/*.h
+
+	# fix paths stored in petscconf.h
+	dosed "s:${S}:/usr:g" /usr/include/"${PN}"/petscconf.h
+	dosed "s:${PETSC_ARCH}/lib:$(get_libdir):g" /usr/include/"${PN}"/petscconf.h \
+
+	if ! use mpi ; then
+		insinto /usr/include/"${PN}"/mpiuni
+		doins "${S}"/include/mpiuni/*.h
+	fi
+
+	if use doc ; then
+		dodoc docs/manual.pdf
+		dohtml -r docs/*.html docs/changes docs/manualpages
+	fi
+
+	use static-libs \
+		&& dolib.a  "${S}/${PETSC_ARCH}"/lib/*.a  \
+		|| dolib.so "${S}/${PETSC_ARCH}"/lib/*.so
+}
+
+pkg_postinst() {
+	elog "The petsc ebuild is still under development."
+	elog "Help us improve the ebuild in:"
+	elog "http://bugs.gentoo.org/show_bug.cgi?id=53386"
+	elog "This ebuild is known to have parallel build issues, "
+	elog "hopefully resolved by upstream soon."
+	elog "Another problem is that you can break this package by"
+	elog "switching your mpi implementation without rebuild petsc."
+}



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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2012-03-01 17:54 Jens-Malte Gottfried
  0 siblings, 0 replies; 19+ messages in thread
From: Jens-Malte Gottfried @ 2012-03-01 17:54 UTC (permalink / raw
  To: gentoo-commits

commit:     43c2b626dd412374d7cf5d9c0bffe4b438d1139d
Author:     Jens-Malte Gottfried <jmgottfried <AT> web <DOT> de>
AuthorDate: Thu Mar  1 17:07:58 2012 +0000
Commit:     Jens-Malte Gottfried <jmg <AT> godefridus <DOT> de>
CommitDate: Thu Mar  1 17:07:58 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=43c2b626

added new petsc 3.2-p6 ebuild

---
 sci-mathematics/petsc/ChangeLog                    |    7 +++++
 .../petsc/files/petsc-3.1_p8-configure-pic.patch   |   11 -------
 .../petsc/files/petsc-configure-pic.patch          |    4 +-
 sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild       |    2 +-
 ...{petsc-3.1_p8-r1.ebuild => petsc-3.2_p6.ebuild} |   29 +++++++++----------
 5 files changed, 24 insertions(+), 29 deletions(-)

diff --git a/sci-mathematics/petsc/ChangeLog b/sci-mathematics/petsc/ChangeLog
index 7826fc6..3a12aab 100644
--- a/sci-mathematics/petsc/ChangeLog
+++ b/sci-mathematics/petsc/ChangeLog
@@ -2,6 +2,13 @@
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*petsc-3.2_p6 (01 Mar 2012)
+
+  01 Mar 2012; Jens-Malte Gottfried <jmgottfried@web.de>
+  petsc-3.1_p8-r1.ebuild, -files/petsc-3.1_p8-configure-pic.patch,
+  +petsc-3.2_p6.ebuild, files/petsc-configure-pic.patch:
+  added new petsc 3.2-p6 ebuild
+
   23 Jan 2012; Sébastien Fabbro <bicatali@gentoo.org> -petsc-3.1_p4.ebuild,
   -petsc-3.1_p5-r2.ebuild, -petsc-3.1_p7.ebuild, -petsc-3.1_p8.ebuild,
   petsc-3.1_p8-r1.ebuild:

diff --git a/sci-mathematics/petsc/files/petsc-3.1_p8-configure-pic.patch b/sci-mathematics/petsc/files/petsc-3.1_p8-configure-pic.patch
deleted file mode 100644
index bbfdae1..0000000
--- a/sci-mathematics/petsc/files/petsc-3.1_p8-configure-pic.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- config/BuildSystem/config/setCompilers.py.old	2010-09-07 21:41:32.693103846 +0200
-+++ config/BuildSystem/config/setCompilers.py	2010-09-07 21:41:45.322093881 +0200
-@@ -875,7 +875,7 @@
-       languages.append('FC')
-     for language in languages:
-       self.pushLanguage(language)
--      for testFlag in ['-PIC', '-fPIC', '-KPIC','-qpic']:
-+      for testFlag in ['-fPIC', '-PIC', '-KPIC', '-qpic']:
-         try:
-           self.framework.logPrint('Trying '+language+' compiler flag '+testFlag)
-           if not self.checkLinkerFlag(testFlag):

diff --git a/sci-mathematics/petsc/files/petsc-configure-pic.patch b/sci-mathematics/petsc/files/petsc-configure-pic.patch
index 51e1132..bbfdae1 100644
--- a/sci-mathematics/petsc/files/petsc-configure-pic.patch
+++ b/sci-mathematics/petsc/files/petsc-configure-pic.patch
@@ -4,8 +4,8 @@
        languages.append('FC')
      for language in languages:
        self.pushLanguage(language)
--      for testFlag in ['-PIC', '-fPIC', '-KPIC']:
-+      for testFlag in ['-fPIC', '-PIC', '-KPIC']:
+-      for testFlag in ['-PIC', '-fPIC', '-KPIC','-qpic']:
++      for testFlag in ['-fPIC', '-PIC', '-KPIC', '-qpic']:
          try:
            self.framework.logPrint('Trying '+language+' compiler flag '+testFlag)
            if not self.checkLinkerFlag(testFlag):

diff --git a/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild b/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild
index ddd7a4c..5de7a82 100644
--- a/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild
@@ -37,7 +37,7 @@ if use hypre; then
 fi
 
 src_prepare(){
-	epatch "${FILESDIR}/${P}-configure-pic.patch"
+	epatch "${FILESDIR}/${PN}-configure-pic.patch"
 	epatch "${FILESDIR}/${PN}-disable-rpath.patch"
 }
 

diff --git a/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild b/sci-mathematics/petsc/petsc-3.2_p6.ebuild
similarity index 88%
copy from sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild
copy to sci-mathematics/petsc/petsc-3.2_p6.ebuild
index ddd7a4c..178b6bc 100644
--- a/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.2_p6.ebuild
@@ -27,7 +27,9 @@ RDEPEND="mpi? ( virtual/mpi[cxx?,fortran?] )
 "
 
 DEPEND="${RDEPEND}
-	sys-devel/gcc[-nocxx,fortran?]"
+	sys-devel/gcc[-nocxx,fortran?]
+	dev-util/cmake
+"
 
 S="${WORKDIR}/${MY_P}"
 
@@ -37,7 +39,7 @@ if use hypre; then
 fi
 
 src_prepare(){
-	epatch "${FILESDIR}/${P}-configure-pic.patch"
+	epatch "${FILESDIR}/${PN}-configure-pic.patch"
 	epatch "${FILESDIR}/${PN}-disable-rpath.patch"
 }
 
@@ -64,14 +66,15 @@ src_configure(){
 	myconf[19]="--with-petsc-arch=${PETSC_ARCH}"
 	myconf[20]="--with-precision=double"
 	myconf[21]="--with-gnu-compilers=1"
+	myconf[22]="--with-cmake=/usr/bin/cmake"
 	use amd64 \
-		&& myconf[22]="--with-64-bit-pointers=1" \
-		|| myconf[22]="--with-64-bit-pointers=0"
+		&& myconf[23]="--with-64-bit-pointers=1" \
+		|| myconf[23]="--with-64-bit-pointers=0"
 	use cxx \
-		&& myconf[23]="--with-c-support=1"
+		&& myconf[24]="--with-c-support=1"
 	use amd64 \
-		&& myconf[24]="--with-64-bit-indices=1" \
-		|| myconf[24]="--with-64-bit-indices=0"
+		&& myconf[25]="--with-64-bit-indices=1" \
+		|| myconf[25]="--with-64-bit-indices=0"
 
 	if use mpi; then
 		myconf[30]="--with-cc=/usr/bin/mpicc"
@@ -90,8 +93,8 @@ src_configure(){
 		&& myconf[40]="--with-X=1" \
 		|| myconf[40]="--with-X=0"
 	use static-libs \
-		&& myconf[41]="--with-shared=0" \
-		|| myconf[41]="--with-shared=1"
+		&& myconf[41]="--with-shared-libraries=0" \
+		|| myconf[41]="--with-shared-libraries=1"
 	use fortran \
 		&& myconf[43]="--with-fortran=1" \
 		|| myconf[43]="--with-fortran=0"
@@ -106,7 +109,7 @@ src_configure(){
 
 	if use hypre; then
 		# hypre cannot handle 64 bit indices, therefore disabled
-		myconf[24]="--with-64-bit-indices=0"
+		myconf[25]="--with-64-bit-indices=0"
 		myconf[52]="--with-hypre=1"
 		myconf[53]="--with-hypre-include=/usr/include/hypre"
 		use static-libs \
@@ -118,7 +121,7 @@ src_configure(){
 
 	if use metis; then
 		# parmetis cannot handle 64 bit indices, therefore disabled
-		myconf[24]="--with-64-bit-indices=0"
+		myconf[25]="--with-64-bit-indices=0"
 		myconf[61]="--with-parmetis=1"
 		myconf[62]="--with-parmetis-include=/usr/include/parmetis"
 		myconf[63]="--with-parmetis-lib=/usr/$(get_libdir)/libparmetis.so"
@@ -194,8 +197,4 @@ pkg_postinst() {
 	elog "The petsc ebuild is still under development."
 	elog "Help us improve the ebuild in:"
 	elog "http://bugs.gentoo.org/show_bug.cgi?id=53386"
-	elog "This ebuild is known to have parallel build issues, "
-	elog "hopefully resolved by upstream soon."
-	elog "Another problem is that you can break this package by"
-	elog "switching your mpi implementation without rebuild petsc."
 }



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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2012-03-04 12:38 Jens-Malte Gottfried
  0 siblings, 0 replies; 19+ messages in thread
From: Jens-Malte Gottfried @ 2012-03-04 12:38 UTC (permalink / raw
  To: gentoo-commits

commit:     b1a67c63567b4cfa7aa8680bcfda77125ecb0de8
Author:     Jens-Malte Gottfried <jmgottfried <AT> web <DOT> de>
AuthorDate: Sun Mar  4 12:35:34 2012 +0000
Commit:     Jens-Malte Gottfried <jmg <AT> godefridus <DOT> de>
CommitDate: Sun Mar  4 12:35:34 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=b1a67c63

fixed undefined reference when using afterimage

Still broken (waiting for upstream):
- imagemagick
- boost
- sparse

---
 .../petsc/files/petsc-fix-afterimage.patch         |   71 ++++++++++++++++++++
 sci-mathematics/petsc/files/petsc-fix-xops.patch   |   21 ++++++
 sci-mathematics/petsc/petsc-3.2_p6.ebuild          |    7 ++-
 3 files changed, 98 insertions(+), 1 deletions(-)

diff --git a/sci-mathematics/petsc/files/petsc-fix-afterimage.patch b/sci-mathematics/petsc/files/petsc-fix-afterimage.patch
new file mode 100644
index 0000000..27f4d3b
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-fix-afterimage.patch
@@ -0,0 +1,71 @@
+
+# HG changeset patch
+# User Jed Brown <jed@59A2.org>
+# Date 1330818004 21600
+# Node ID fb79e104b74267c74aa64f125e7eb6a64bce4b14
+# Parent  8242202a123dd2cbfea7a4a2a9a1797951306f8d
+Fixes for libAfterImage compilation, ImageMagick is still just a stub
+
+diff -r 8242202a123d -r fb79e104b742 config/PETSc/packages/afterimage.py
+--- a/config/PETSc/packages/afterimage.py	Sat Mar 03 16:05:00 2012 -0600
++++ b/config/PETSc/packages/afterimage.py	Sat Mar 03 17:40:04 2012 -0600
+@@ -9,6 +9,7 @@
+     self.includedir    = ''
+     self.libdir        = '../../lib'
+     self.double        = 0
++    self.complex       = 1
+ 
+   def setupDependencies(self, framework):
+     PETSc.package.NewPackage.setupDependencies(self, framework)
+diff -r 8242202a123d -r fb79e104b742 config/PETSc/packages/imagemagick.py
+--- a/config/PETSc/packages/imagemagick.py	Sat Mar 03 16:05:00 2012 -0600
++++ b/config/PETSc/packages/imagemagick.py	Sat Mar 03 17:40:04 2012 -0600
+@@ -4,8 +4,8 @@
+   def __init__(self, framework):
+     PETSc.package.NewPackage.__init__(self, framework)
+     self.functions     = ['IsMagickInstantiated']
+-    self.includes      = ['MagicCore/MagickCore.h']
+-    self.liblist       = [['libMagicCore.a']]
++    self.includes      = ['magick/MagickCore.h']
++    self.liblist       = [['libMagickCore.a']]
+ 
+ 
+ 
+diff -r 8242202a123d -r fb79e104b742 src/sys/draw/impls/x/xinit.c
+--- a/src/sys/draw/impls/x/xinit.c	Sat Mar 03 16:05:00 2012 -0600
++++ b/src/sys/draw/impls/x/xinit.c	Sat Mar 03 17:40:04 2012 -0600
+@@ -291,7 +291,7 @@
+ #include <afterimage.h>
+ #undef __FUNCT__  
+ #define __FUNCT__ "PetscDrawSave_X" 
+-PetscErrorCode PetscDrawSave_X(PetscDraw draw,PetscViewer viewer)
++PetscErrorCode PetscDrawSave_X(PetscDraw draw)
+ {
+   PetscDraw_X              *drawx = (PetscDraw_X*)draw->data;
+   XImage                   *image;
+@@ -328,10 +328,10 @@
+ void deflateEnd(void) {;}
+ 
+ #elif defined(PETSC_HAVE_IMAGEMAGICK)
+-#include <MagicCore/MagickCore.h>
++#include <magick/MagickCore.h>
+ #undef __FUNCT__  
+ #define __FUNCT__ "PetscDrawSave_X" 
+-PetscErrorCode PetscDrawSave_X(PetscDraw draw,PetscViewer viewer)
++PetscErrorCode PetscDrawSave_X(PetscDraw draw)
+ {
+   PetscDraw_X  *drawx = (PetscDraw_X*)draw->data;
+   Image        *image;
+diff -r 8242202a123d -r fb79e104b742 src/sys/draw/impls/x/xops.c
+--- a/src/sys/draw/impls/x/xops.c	Sat Mar 03 16:05:00 2012 -0600
++++ b/src/sys/draw/impls/x/xops.c	Sat Mar 03 17:40:04 2012 -0600
+@@ -551,7 +551,7 @@
+   PetscFunctionReturn(0);
+ }
+ 
+-PetscErrorCode PetscDrawSave_X(PetscDraw,PetscViewer);
++PetscErrorCode PetscDrawSave_X(PetscDraw);
+ PetscErrorCode PetscDrawSetSave_X(PetscDraw,const char*);
+ 
+ static struct _PetscDrawOps DvOps = { PetscDrawSetDoubleBuffer_X,
+

diff --git a/sci-mathematics/petsc/files/petsc-fix-xops.patch b/sci-mathematics/petsc/files/petsc-fix-xops.patch
new file mode 100644
index 0000000..cd2edeb
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-fix-xops.patch
@@ -0,0 +1,21 @@
+
+# HG changeset patch
+# User Jed Brown <jed@59A2.org>
+# Date 1330812300 21600
+# Node ID 8242202a123dd2cbfea7a4a2a9a1797951306f8d
+# Parent  759927945bb3cdd30ff4265c043264db5286d263
+Fix declaration of PetscDrawSave_X()
+
+diff -r 759927945bb3 -r 8242202a123d src/sys/draw/impls/x/xops.c
+--- a/src/sys/draw/impls/x/xops.c	Fri Mar 02 11:10:34 2012 -0600
++++ b/src/sys/draw/impls/x/xops.c	Sat Mar 03 16:05:00 2012 -0600
+@@ -551,7 +551,7 @@
+   PetscFunctionReturn(0);
+ }
+ 
+-PetscErrorCode PetscDrawSave_X(PetscDraw);
++PetscErrorCode PetscDrawSave_X(PetscDraw,PetscViewer);
+ PetscErrorCode PetscDrawSetSave_X(PetscDraw,const char*);
+ 
+ static struct _PetscDrawOps DvOps = { PetscDrawSetDoubleBuffer_X,
+

diff --git a/sci-mathematics/petsc/petsc-3.2_p6.ebuild b/sci-mathematics/petsc/petsc-3.2_p6.ebuild
index d3aecb0..0d972ed 100644
--- a/sci-mathematics/petsc/petsc-3.2_p6.ebuild
+++ b/sci-mathematics/petsc/petsc-3.2_p6.ebuild
@@ -16,11 +16,12 @@ LICENSE="petsc"
 SLOT="0"
 KEYWORDS="~x86 ~amd64"
 IUSE="afterimage boost complex-scalars cxx debug doc \
-	fortran hdf5 hypre metis mpi sparse threads X"
+	imagemagick fortran hdf5 hypre metis mpi sparse threads X"
 
 REQUIRED_USE="
 	hypre? ( cxx mpi )
 	hdf5? ( mpi )
+	imagemagick? ( X )
 	afterimage? ( X )
 "
 
@@ -33,6 +34,7 @@ RDEPEND="mpi? ( virtual/mpi[cxx?,fortran?] )
 	hdf5? ( sci-libs/hdf5 )
 	boost? ( dev-libs/boost )
 	afterimage? ( media-libs/libafterimage )
+	imagemagick? ( media-gfx/imagemagick )
 	sparse? ( sci-libs/cholmod )
 "
 
@@ -47,6 +49,8 @@ src_prepare(){
 	epatch "${FILESDIR}/${PN}-configure-pic.patch"
 	epatch "${FILESDIR}/${PN}-disable-env-warnings.patch"
 	epatch "${FILESDIR}/${PN}-disable-rpath.patch"
+	epatch "${FILESDIR}/${PN}-fix-xops.patch"
+	epatch "${FILESDIR}/${PN}-fix-afterimage.patch"
 }
 
 src_configure(){
@@ -126,6 +130,7 @@ src_configure(){
 		$(petsc_with boost) \
 		$(petsc_with hdf5) \
 		$(petsc_with hypre hypre /usr/$(get_libdir)/libHYPRE.so /usr/include/hypre) \
+		$(petsc_with imagemagick imagemagick /usr/$(get_libdir)/libMagickCore.so /usr/include/ImageMagick) \
 		$(petsc_with metis parmetis) \
 		$(petsc_with X x) \
 		$(petsc_with X x11) \



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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2012-03-05 23:09 Sebastien Fabbro
  0 siblings, 0 replies; 19+ messages in thread
From: Sebastien Fabbro @ 2012-03-05 23:09 UTC (permalink / raw
  To: gentoo-commits

commit:     89b7dd283efdef57df57685a6482a77551c65333
Author:     Sébastien Fabbro <sebfabbro <AT> gmail <DOT> com>
AuthorDate: Mon Mar  5 23:09:44 2012 +0000
Commit:     Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
CommitDate: Mon Mar  5 23:09:44 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=89b7dd28

sci-mathematics/petsc: more cleaning

---
 sci-mathematics/petsc/ChangeLog                    |   12 ++
 ...-pic.patch => petsc-3.2_p6-configure-pic.patch} |    0
 ...tch => petsc-3.2_p6-disable-env-warnings.patch} |    0
 ...path.patch => petsc-3.2_p6-disable-rpath.patch} |    0
 ...age.patch => petsc-3.2_p6-fix-afterimage.patch} |    0
 .../petsc/files/petsc-3.2_p6-fix-imagemagick.patch |   24 ++++
 ...-fix-xops.patch => petsc-3.2_p6-fix-xops.patch} |    0
 sci-mathematics/petsc/petsc-3.2_p6.ebuild          |  133 +++++++++++---------
 8 files changed, 107 insertions(+), 62 deletions(-)

diff --git a/sci-mathematics/petsc/ChangeLog b/sci-mathematics/petsc/ChangeLog
index 3a12aab..5d1f4a9 100644
--- a/sci-mathematics/petsc/ChangeLog
+++ b/sci-mathematics/petsc/ChangeLog
@@ -2,6 +2,18 @@
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  05 Mar 2012; Sébastien Fabbro <bicatali@gentoo.org> petsc-3.2_p6.ebuild,
+  +files/petsc-3.2_p6-configure-pic.patch,
+  +files/petsc-3.2_p6-disable-env-warnings.patch,
+  +files/petsc-3.2_p6-disable-rpath.patch,
+  +files/petsc-3.2_p6-fix-afterimage.patch,
+  +files/petsc-3.2_p6-fix-imagemagick.patch,
+  +files/petsc-3.2_p6-fix-xops.patch, -files/petsc-configure-pic.patch,
+  -files/petsc-disable-env-warnings.patch, -files/petsc-disable-rpath.patch,
+  -files/petsc-fix-afterimage.patch, -files/petsc-fix-xops.patch:
+  Added EPREFIX love, remove extra quotes, added imagemagick use flag, more
+  cleaning
+
 *petsc-3.2_p6 (01 Mar 2012)
 
   01 Mar 2012; Jens-Malte Gottfried <jmgottfried@web.de>

diff --git a/sci-mathematics/petsc/files/petsc-configure-pic.patch b/sci-mathematics/petsc/files/petsc-3.2_p6-configure-pic.patch
similarity index 100%
rename from sci-mathematics/petsc/files/petsc-configure-pic.patch
rename to sci-mathematics/petsc/files/petsc-3.2_p6-configure-pic.patch

diff --git a/sci-mathematics/petsc/files/petsc-disable-env-warnings.patch b/sci-mathematics/petsc/files/petsc-3.2_p6-disable-env-warnings.patch
similarity index 100%
rename from sci-mathematics/petsc/files/petsc-disable-env-warnings.patch
rename to sci-mathematics/petsc/files/petsc-3.2_p6-disable-env-warnings.patch

diff --git a/sci-mathematics/petsc/files/petsc-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.2_p6-disable-rpath.patch
similarity index 100%
rename from sci-mathematics/petsc/files/petsc-disable-rpath.patch
rename to sci-mathematics/petsc/files/petsc-3.2_p6-disable-rpath.patch

diff --git a/sci-mathematics/petsc/files/petsc-fix-afterimage.patch b/sci-mathematics/petsc/files/petsc-3.2_p6-fix-afterimage.patch
similarity index 100%
rename from sci-mathematics/petsc/files/petsc-fix-afterimage.patch
rename to sci-mathematics/petsc/files/petsc-3.2_p6-fix-afterimage.patch

diff --git a/sci-mathematics/petsc/files/petsc-3.2_p6-fix-imagemagick.patch b/sci-mathematics/petsc/files/petsc-3.2_p6-fix-imagemagick.patch
new file mode 100644
index 0000000..0e17f89
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-3.2_p6-fix-imagemagick.patch
@@ -0,0 +1,24 @@
+--- config/PETSc/packages/imagemagick.py.orig	2012-01-22 17:25:36.440142627 +0000
++++ config/PETSc/packages/imagemagick.py	2012-01-22 17:26:26.091417306 +0000
+@@ -4,8 +4,8 @@
+   def __init__(self, framework):
+     PETSc.package.NewPackage.__init__(self, framework)
+     self.functions     = ['IsMagickInstantiated']
+-    self.includes      = ['MagicCore/MagickCore.h']
+-    self.liblist       = [['libMagicCore.a']]
++    self.includes      = ['MagickCore/MagickCore.h']
++    self.liblist       = [['libMagickCore.a']]
+ 
+ 
+ 
+--- src/sys/draw/impls/x/xinit.c.orig	2012-01-22 17:25:46.230393969 +0000
++++ src/sys/draw/impls/x/xinit.c	2012-01-22 17:26:26.091417306 +0000
+@@ -328,7 +328,7 @@
+ void deflateEnd(void) {;}
+ 
+ #elif defined(PETSC_HAVE_IMAGEMAGICK)
+-#include <MagicCore/MagickCore.h>
++#include <MagickCore/MagickCore.h>
+ #undef __FUNCT__  
+ #define __FUNCT__ "PetscDrawSave_X" 
+ PetscErrorCode PetscDrawSave_X(PetscDraw draw,PetscViewer viewer)

diff --git a/sci-mathematics/petsc/files/petsc-fix-xops.patch b/sci-mathematics/petsc/files/petsc-3.2_p6-fix-xops.patch
similarity index 100%
rename from sci-mathematics/petsc/files/petsc-fix-xops.patch
rename to sci-mathematics/petsc/files/petsc-3.2_p6-fix-xops.patch

diff --git a/sci-mathematics/petsc/petsc-3.2_p6.ebuild b/sci-mathematics/petsc/petsc-3.2_p6.ebuild
index 5426f69..51a3559 100644
--- a/sci-mathematics/petsc/petsc-3.2_p6.ebuild
+++ b/sci-mathematics/petsc/petsc-3.2_p6.ebuild
@@ -4,20 +4,20 @@
 
 EAPI=4
 
-inherit flag-o-matic fortran-2 toolchain-funcs
+inherit eutils flag-o-matic fortran-2 toolchain-funcs versionator
 
-MY_P="${PN}-${PV/_/-}"
+MY_P="${PN}-$(replace_version_separator _ -)"
 
 DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
-HOMEPAGE="http://www.mcs.anl.gov/petsc/petsc-as/"
+HOMEPAGE="http://www.mcs.anl.gov/petsc/"
 SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${MY_P}.tar.gz"
 
 LICENSE="petsc"
 SLOT="0"
 KEYWORDS="~x86 ~amd64"
-IUSE="afterimage complex-scalars cxx debug doc \
-	fortran hdf5 hypre metis mpi sparse superlu threads X"
-# Failed: boost imagemagick
+IUSE="afterimage complex-scalars cxx debug doc
+	fortran hdf5 hypre imagemagick metis mpi sparse superlu threads X"
+# Failed: boost
 
 # hypre and superlu curretly exclude each other due to missing linking to hypre
 # if both are enabled
@@ -25,54 +25,58 @@ REQUIRED_USE="
 	hypre? ( cxx mpi )
 	hdf5? ( mpi )
 	afterimage? ( X )
+	imagemagick? ( X )
 	^^ ( hypre superlu )
 "
-#	imagemagick? ( X )
 
-RDEPEND="mpi? ( virtual/mpi[cxx?,fortran?] )
-	X? ( x11-libs/libX11 )
-	virtual/lapack
+RDEPEND="
 	virtual/blas
-	hypre? ( sci-libs/hypre )
-	metis? ( sci-libs/parmetis )
-	hdf5? ( sci-libs/hdf5 )
+	virtual/lapack
 	afterimage? ( media-libs/libafterimage )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( sci-libs/hypre[mpi?] )
+	imagemagick? ( media-gfx/imagemagick )
+	metis? ( sci-libs/parmetis )
+	mpi? ( virtual/mpi[cxx?,fortran?] )
 	sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 )
 	superlu? ( sci-libs/superlu )
+	X? ( x11-libs/libX11 )
 "
 #	boost? ( dev-libs/boost )
-#	imagemagick? ( media-gfx/imagemagick )
 
 DEPEND="${RDEPEND}
-	sys-devel/gcc[-nocxx,fortran?]
-	dev-util/cmake
+	virtual/fortran
+	dev-lang/python
+	dev-util/pkgconfig
 "
 
 S="${WORKDIR}/${MY_P}"
 
-src_prepare(){
-	epatch "${FILESDIR}/${PN}-configure-pic.patch"
-	epatch "${FILESDIR}/${PN}-disable-env-warnings.patch"
-	epatch "${FILESDIR}/${PN}-disable-rpath.patch"
-	epatch "${FILESDIR}/${PN}-fix-xops.patch"
-	epatch "${FILESDIR}/${PN}-fix-afterimage.patch"
+src_prepare() {
+	epatch \
+		"${FILESDIR}"/${P}-configure-pic.patch \
+		"${FILESDIR}"/${P}-disable-env-warnings.patch \
+		"${FILESDIR}"/${P}-disable-rpath.patch \
+		"${FILESDIR}"/${P}-fix-xops.patch \
+		"${FILESDIR}"/${P}-fix-afterimage.patch
 }
 
-src_configure(){
+src_configure() {
 	# petsc uses --with-blah=1 and --with-blah=0 to en/disable options
-	petsc_enable(){
+	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 lib include
+	# petsc_with use_flag libname include linking_libs
 	petsc_with() {
 		local myuse p=${2:-${1}}
 		if use ${1}; then
 			myuse="--with-${p}=1"
-			if [[ $# == 4 ]]; then
-				myuse="${myuse} --with-${p}-lib=\"${3}\""
-				myuse="${myuse} --with-${p}-include=${4}"
+			if [[ $# -ge 4 ]]; then
+				myuse="${myuse} --with-${p}-include=${3}"
+				shift 3
+				myuse="${myuse} --with-${p}-lib=\"$@\""
 			else
 				myuse="${myuse} --with-${p}-dir=${EPREFIX}${3:-/usr}"
 			fi
@@ -81,6 +85,7 @@ src_configure(){
 		fi
 		echo ${myuse}
 	}
+
 	# select between configure options depending on use flag
 	petsc_select() {
 		use "$1" && echo "--with-$2=$3" || echo "--with-$2=$4"
@@ -115,71 +120,75 @@ src_configure(){
 		--with-gnu-compilers \
 		--with-blas-lapack-lib="$(pkg-config --libs lapack)" \
 		$(petsc_enable debug debugging) \
+		$(petsc_with imagemagick imagemagick /usr/include/ImageMagick $(pkg-config --libs MagickCore)) \
 		$(petsc_enable mpi) \
-		$(petsc_select mpi cc /usr/bin/mpicc $(tc-getCC)) \
-		$(petsc_select mpi cxx /usr/bin/mpicxx $(tc-getCXX)) \
+		$(petsc_select mpi cc mpicc $(tc-getCC)) \
+		$(petsc_select mpi cxx mpicxx $(tc-getCXX)) \
 		$(petsc_enable fortran) \
-		$(use fortran && echo "$(petsc_select mpi fc /usr/bin/mpif77 $(tc-getF77))") \
+		$(use fortran && echo "$(petsc_select mpi fc mpif77 $(tc-getF77))") \
 		$(petsc_enable mpi mpi-compilers) \
 		$(petsc_enable threads pthread) \
 		$(petsc_enable threads pthreadclasses) \
 		$(petsc_select complex-scalars scalar-type complex real) \
 		--with-windows-graphics=0 \
 		--with-matlab=0 \
-		--with-python=0 \
-		--with-cmake=/usr/bin/cmake \
-		$(petsc_with afterimage afterimage \
-			/usr/$(get_libdir)/libAfterImage.so /usr/include/libAfterImage) \
+		--with-python=0 \ # why not?
+		--with-cmake=cmake \ # what for?
+		$(petsc_with afterimage afterimage /usr/include/libAfterImage -lAfterImage) \
 		$(petsc_with hdf5) \
-		$(petsc_with hypre hypre /usr/$(get_libdir)/libHYPRE.so /usr/include/hypre) \
+		$(petsc_with hypre hypre /usr/include/hypre -lHYPRE) \
 		$(petsc_with metis parmetis) \
 		$(petsc_with sparse cholmod) \
-		$(petsc_with superlu superlu /usr/$(get_libdir)/libsuperlu.so /usr/include/superlu) \
+		$(petsc_with superlu superlu  /usr/include/superlu -lsuperlu) \
 		$(petsc_with X x) \
 		$(petsc_with X x11) \
-		--with-scotch=0
+		--with-scotch=0 # why not?
 
 # failed dependencies, perhaps fixed in upstream soon:
 #		$(petsc_with boost) \
-#		$(petsc_with imagemagick imagemagick /usr/$(get_libdir)/libMagickCore.so /usr/include/ImageMagick) \
 }
 
-src_install(){
+src_install() {
 	# petsc install structure is very different from
 	# installing headers to /usr/include/petsc and lib to /usr/lib
 	# it also installs many unneeded executables and scripts
 	# so manual install is easier than cleanup after "emake install"
-	insinto /usr/include/"${PN}"
-	doins "${S}"/include/*.h "${S}"/include/*.hh
-	insinto /usr/include/"${PN}/${PETSC_ARCH}"/include
-	doins "${S}/${PETSC_ARCH}"/include/*
+	insinto /usr/include/${PN}
+	doins include/*.h*
+	insinto /usr/include/${PN}/${PETSC_ARCH}/include
+	doins ${PETSC_ARCH}/include/*
 	if use fortran; then
-		insinto /usr/include/"${PN}"/finclude
-		doins "${S}"/include/finclude/*.h
+		insinto /usr/include/${PN}/finclude
+		doins include/finclude/*.h
 	fi
-	insinto /usr/include/"${PN}"/conf
-	doins "${S}"/conf/{variables,rules,test}
-	insinto /usr/include/"${PN}/${PETSC_ARCH}"/conf
-	doins "${S}/${PETSC_ARCH}"/conf/{petscrules,petscvariables,RDict.db}
-	insinto /usr/include/"${PN}"/private
-	doins "${S}"/include/private/*.h
+	insinto /usr/include/${PN}/conf
+	doins conf/{variables,rules,test}
+	insinto /usr/include/${PN}/${PETSC_ARCH}/conf
+	doins ${PETSC_ARCH}/conf/{petscrules,petscvariables,RDict.db}
+	insinto /usr/include/${PN}/private
+	doins include/private/*.h
 
 	# fix configuration files: replace ${S} by installed location
-	sed -i "s:${S}:/usr:g" ${D}/usr/include/"${PN}/${PETSC_ARCH}"/include/petscconf.h
-	sed -i "s:${PETSC_ARCH}/lib:$(get_libdir):g" ${D}/usr/include/"${PN}/${PETSC_ARCH}"/include/petscconf.h
-	sed -i "s:INSTALL_DIR =.*:INSTALL_DIR = /usr:" ${D}/usr/include/"${PN}/${PETSC_ARCH}"/conf/petscvariables
+	sed -i \
+		-e "s:${S}::g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/conf/petscvariables || die
+	sed -i \
+		-e "s:usr/lib:usr/$(get_libdir):g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h || die
+
 
 	# add information about installation directory and
 	# PETSC_ARCH to environmental variables
-	cat >> "${T}"/99petsc <<- EOF
-	PETSC_ARCH=${PETSC_ARCH}
-	PETSC_DIR=/usr/include/${PN}
+	cat >> 99petsc <<- EOF
+		PETSC_ARCH=${PETSC_ARCH}
+		PETSC_DIR=${EPREFIX}/usr/include/${PN}
 	EOF
-	doenvd "${T}"/99petsc
+	doenvd 99petsc
 
 	if ! use mpi ; then
-		insinto /usr/include/"${PN}"/mpiuni
-		doins "${S}"/include/mpiuni/*.h
+		insinto /usr/include/${PN}/mpiuni
+		doins include/mpiuni/*.h
 	fi
 
 	if use doc ; then
@@ -187,7 +196,7 @@ src_install(){
 		dohtml -r docs/*.html docs/changes docs/manualpages
 	fi
 
-	dolib.so "${S}/${PETSC_ARCH}"/lib/*.so
+	dolib.so ${PETSC_ARCH}/lib/*.so
 }
 
 pkg_postinst() {



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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2012-03-06 23:09 Jens-Malte Gottfried
  0 siblings, 0 replies; 19+ messages in thread
From: Jens-Malte Gottfried @ 2012-03-06 23:09 UTC (permalink / raw
  To: gentoo-commits

commit:     2b3b883f45078a95cc0fc07f3cd9b2104575e6b5
Author:     Jens-Malte Gottfried <jmgottfried <AT> web <DOT> de>
AuthorDate: Tue Mar  6 23:08:49 2012 +0000
Commit:     Jens-Malte Gottfried <jmg <AT> godefridus <DOT> de>
CommitDate: Tue Mar  6 23:08:49 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=2b3b883f

fixed petsc 3.1 ebuild (missing patch files)

---
 sci-mathematics/petsc/ChangeLog                    |    5 +++++
 .../petsc/files/petsc-3.1_p8-configure-pic.patch   |   11 +++++++++++
 .../petsc/files/petsc-3.1_p8-disable-rpath.patch   |   16 ++++++++++++++++
 sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild       |    5 +++--
 4 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/sci-mathematics/petsc/ChangeLog b/sci-mathematics/petsc/ChangeLog
index 5d1f4a9..4bc96b9 100644
--- a/sci-mathematics/petsc/ChangeLog
+++ b/sci-mathematics/petsc/ChangeLog
@@ -2,6 +2,11 @@
 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  06 Mar 2012; Jens-Malte Gottfried <jmgottfried@web.de>
+  petsc-3.1_p8-r1.ebuild, +files/petsc-3.1_p8-configure-pic.patch,
+  +files/petsc-3.1_p8-disable-rpath.patch:
+  fixed legacy ebuild of petsc 3.1
+
   05 Mar 2012; Sébastien Fabbro <bicatali@gentoo.org> petsc-3.2_p6.ebuild,
   +files/petsc-3.2_p6-configure-pic.patch,
   +files/petsc-3.2_p6-disable-env-warnings.patch,

diff --git a/sci-mathematics/petsc/files/petsc-3.1_p8-configure-pic.patch b/sci-mathematics/petsc/files/petsc-3.1_p8-configure-pic.patch
new file mode 100644
index 0000000..bbfdae1
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-3.1_p8-configure-pic.patch
@@ -0,0 +1,11 @@
+--- config/BuildSystem/config/setCompilers.py.old	2010-09-07 21:41:32.693103846 +0200
++++ config/BuildSystem/config/setCompilers.py	2010-09-07 21:41:45.322093881 +0200
+@@ -875,7 +875,7 @@
+       languages.append('FC')
+     for language in languages:
+       self.pushLanguage(language)
+-      for testFlag in ['-PIC', '-fPIC', '-KPIC','-qpic']:
++      for testFlag in ['-fPIC', '-PIC', '-KPIC', '-qpic']:
+         try:
+           self.framework.logPrint('Trying '+language+' compiler flag '+testFlag)
+           if not self.checkLinkerFlag(testFlag):

diff --git a/sci-mathematics/petsc/files/petsc-3.1_p8-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.1_p8-disable-rpath.patch
new file mode 100644
index 0000000..3c443b2
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-3.1_p8-disable-rpath.patch
@@ -0,0 +1,16 @@
+--- config/BuildSystem/config/setCompilers.py	2010-11-24 18:01:17.110124425 +0100
++++ config/BuildSystem/config/setCompilers.py	2010-11-24 18:02:28.710104226 +0100
+@@ -1186,12 +1186,7 @@
+     for language in languages:
+       flag = '-L'
+       self.pushLanguage(language)
+-      # test '-R' before '-rpath' as sun compilers [c,fortran] don't give proper errors with wrong options.
+-      if not Configure.isDarwin():      
+-        testFlags = ['-Wl,-rpath,', '-R','-rpath ' , '-Wl,-R,']
+-      else:
+-        testFlags = []
+-      # test '-R' before '-Wl,-rpath' for SUN compilers [as cc on linux accepts -Wl,-rpath, but  f90 & CC do not.
++      testFlags = []
+       if self.isSun(self.framework.getCompiler()):
+         testFlags.insert(0,'-R')
+       for testFlag in testFlags:

diff --git a/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild b/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild
index 5de7a82..818cff1 100644
--- a/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild
@@ -37,8 +37,9 @@ if use hypre; then
 fi
 
 src_prepare(){
-	epatch "${FILESDIR}/${PN}-configure-pic.patch"
-	epatch "${FILESDIR}/${PN}-disable-rpath.patch"
+	epatch \
+		"${FILESDIR}"/${P}-configure-pic.patch \
+		"${FILESDIR}"/${P}-disable-rpath.patch
 }
 
 src_configure(){



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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2012-06-09  6:16 Jens-Malte Gottfried
  0 siblings, 0 replies; 19+ messages in thread
From: Jens-Malte Gottfried @ 2012-06-09  6:16 UTC (permalink / raw
  To: gentoo-commits

commit:     1371aba9c0fb3b2e47fe3f91d06c4c92cb5b026a
Author:     Jens-Malte Gottfried <jmgottfried <AT> web <DOT> de>
AuthorDate: Sat Jun  9 06:15:51 2012 +0000
Commit:     Jens-Malte Gottfried <jmg <AT> godefridus <DOT> de>
CommitDate: Sat Jun  9 06:15:51 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=1371aba9

added petsc-3.3-p0 ebuild

still needs testing

---
 .../petsc/files/petsc-3.3_p0-configure-pic.patch   |   11 +
 .../files/petsc-3.3_p0-disable-env-warnings.patch  |   13 ++
 .../petsc/files/petsc-3.3_p0-disable-rpath.patch   |   16 ++
 sci-mathematics/petsc/petsc-3.3_p0.ebuild          |  213 ++++++++++++++++++++
 4 files changed, 253 insertions(+), 0 deletions(-)

diff --git a/sci-mathematics/petsc/files/petsc-3.3_p0-configure-pic.patch b/sci-mathematics/petsc/files/petsc-3.3_p0-configure-pic.patch
new file mode 100644
index 0000000..bbfdae1
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-3.3_p0-configure-pic.patch
@@ -0,0 +1,11 @@
+--- config/BuildSystem/config/setCompilers.py.old	2010-09-07 21:41:32.693103846 +0200
++++ config/BuildSystem/config/setCompilers.py	2010-09-07 21:41:45.322093881 +0200
+@@ -875,7 +875,7 @@
+       languages.append('FC')
+     for language in languages:
+       self.pushLanguage(language)
+-      for testFlag in ['-PIC', '-fPIC', '-KPIC','-qpic']:
++      for testFlag in ['-fPIC', '-PIC', '-KPIC', '-qpic']:
+         try:
+           self.framework.logPrint('Trying '+language+' compiler flag '+testFlag)
+           if not self.checkLinkerFlag(testFlag):

diff --git a/sci-mathematics/petsc/files/petsc-3.3_p0-disable-env-warnings.patch b/sci-mathematics/petsc/files/petsc-3.3_p0-disable-env-warnings.patch
new file mode 100644
index 0000000..d2ee44e
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-3.3_p0-disable-env-warnings.patch
@@ -0,0 +1,13 @@
+Index: petsc-3.2-p6/config/BuildSystem/config/setCompilers.py
+===================================================================
+--- petsc-3.2-p6.orig/config/BuildSystem/config/setCompilers.py
++++ petsc-3.2-p6/config/BuildSystem/config/setCompilers.py
+@@ -1463,7 +1463,7 @@ This way - mpi compilers from '''+self.a
+                  'LDFLAGS','LIBS','MPI_DIR']
+     for envVal in ignoreEnv:
+       if envVal in os.environ:
+-        self.logPrintBox('***** WARNING: '+envVal+' found in enviornment variables - ignoring ******')
++        #self.logPrintBox('***** WARNING: '+envVal+' found in enviornment variables - ignoring ******')
+         del os.environ[envVal]
+     return
+ 

diff --git a/sci-mathematics/petsc/files/petsc-3.3_p0-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.3_p0-disable-rpath.patch
new file mode 100644
index 0000000..3c443b2
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-3.3_p0-disable-rpath.patch
@@ -0,0 +1,16 @@
+--- config/BuildSystem/config/setCompilers.py	2010-11-24 18:01:17.110124425 +0100
++++ config/BuildSystem/config/setCompilers.py	2010-11-24 18:02:28.710104226 +0100
+@@ -1186,12 +1186,7 @@
+     for language in languages:
+       flag = '-L'
+       self.pushLanguage(language)
+-      # test '-R' before '-rpath' as sun compilers [c,fortran] don't give proper errors with wrong options.
+-      if not Configure.isDarwin():      
+-        testFlags = ['-Wl,-rpath,', '-R','-rpath ' , '-Wl,-R,']
+-      else:
+-        testFlags = []
+-      # test '-R' before '-Wl,-rpath' for SUN compilers [as cc on linux accepts -Wl,-rpath, but  f90 & CC do not.
++      testFlags = []
+       if self.isSun(self.framework.getCompiler()):
+         testFlags.insert(0,'-R')
+       for testFlag in testFlags:

diff --git a/sci-mathematics/petsc/petsc-3.3_p0.ebuild b/sci-mathematics/petsc/petsc-3.3_p0.ebuild
new file mode 100644
index 0000000..285fe6b
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.3_p0.ebuild
@@ -0,0 +1,213 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit base flag-o-matic fortran-2 toolchain-funcs versionator
+
+MY_P="${PN}-$(replace_version_separator _ -)"
+
+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/${MY_P}.tar.gz"
+
+LICENSE="petsc"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="afterimage complex-scalars cxx debug doc
+	fortran hdf5 hypre mpi sparse superlu threads X"
+# Failed: boost imagemagick metis
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	hypre? ( cxx mpi )
+	hdf5? ( mpi )
+	afterimage? ( X )
+	^^ ( hypre superlu )
+"
+#	imagemagick? ( X )
+
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+	afterimage? ( media-libs/libafterimage )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.8.0b[mpi?] )
+	mpi? ( virtual/mpi[cxx?,fortran?] )
+	sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 )
+	superlu? ( sci-libs/superlu )
+	X? ( x11-libs/libX11 )
+"
+#	boost? ( dev-libs/boost )
+#	metis? ( sci-libs/parmetis )
+#	imagemagick? ( media-gfx/imagemagick )
+
+DEPEND="${RDEPEND}
+	virtual/fortran
+	dev-lang/python
+	dev-util/pkgconfig
+	dev-util/cmake
+"
+# cmake is used for parralel building
+# in some configuration setups, legacy build is used (slow)
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-configure-pic.patch
+	"${FILESDIR}"/${P}-disable-env-warnings.patch
+	"${FILESDIR}"/${P}-disable-rpath.patch
+)
+
+src_configure() {
+	# 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=${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"
+	}
+
+	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
+
+	# run petsc configure script
+	econf \
+		CFLAGS="${CFLAGS}" \
+		CXXFLAGS="${CXXFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		--with-shared-libraries \
+		--with-single-library \
+		--with-clanguage=${mylang} \
+		$(petsc_enable cxx c-support) \
+		--with-petsc-arch=${PETSC_ARCH} \
+		--with-precision=double \
+		--with-gnu-compilers \
+		--with-blas-lapack-lib="$(pkg-config --libs 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_enable threads pthread) \
+		$(petsc_enable threads pthreadclasses) \
+		$(petsc_select complex-scalars scalar-type complex real) \
+		--with-windows-graphics=0 \
+		--with-matlab=0 \
+		--with-cmake=cmake \
+		$(petsc_with afterimage afterimage \
+			/usr/include/libAfterImage -lAfterImage) \
+		$(petsc_with hdf5) \
+		$(petsc_with hypre hypre \
+			/usr/include/hypre -lHYPRE) \
+		$(petsc_with sparse cholmod) \
+		$(petsc_with superlu superlu \
+			/usr/include/superlu -lsuperlu) \
+		$(petsc_with X x) \
+		$(petsc_with X x11) \
+		--with-imagemagick=0 \
+		--with-python=0 \
+		--with-scotch=0
+
+# not yet tested:
+#		python bindings, sctotch, netcdf, scalapack
+# non-working:
+#		fftw: no mpi-implementaion available in gentoo
+
+# failed dependencies, perhaps fixed in upstream soon:
+#		$(petsc_with metis parmetis) \ # needs metis too (>=5.0.2)
+#		$(petsc_with boost) \
+#		$(petsc_with imagemagick imagemagick \
+#			/usr/include/ImageMagick $(pkg-config --libs MagickCore)) \
+}
+
+src_install() {
+	# petsc install structure is very different from
+	# installing headers to /usr/include/petsc and lib to /usr/lib
+	# it also installs many unneeded executables and scripts
+	# so manual install is easier than cleanup after "emake install"
+	insinto /usr/include/${PN}
+	doins include/*.h*
+	insinto /usr/include/${PN}/${PETSC_ARCH}/include
+	doins ${PETSC_ARCH}/include/*
+	if use fortran; then
+		insinto /usr/include/${PN}/finclude
+		doins include/finclude/*.h
+	fi
+	if ! use mpi ; then
+		insinto /usr/include/${PN}/mpiuni
+		doins include/mpiuni/*.h
+	fi
+	insinto /usr/include/${PN}/conf
+	doins conf/{variables,rules,test}
+	insinto /usr/include/${PN}/${PETSC_ARCH}/conf
+	doins ${PETSC_ARCH}/conf/{petscrules,petscvariables,RDict.db}
+
+	# fix configuration files: replace ${S} by installed location
+	sed -i \
+		-e "s:${S}::g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/conf/petscvariables || die
+	sed -i \
+		-e "s:usr/lib:usr/$(get_libdir):g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h || die
+
+	# add information about installation directory and
+	# PETSC_ARCH to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_ARCH=${PETSC_ARCH}
+		PETSC_DIR=${EPREFIX}/usr/include/${PN}
+	EOF
+	doenvd 99petsc
+
+	dolib.so ${PETSC_ARCH}/lib/*.so
+
+	if use doc ; then
+		einfo "installing documentation (this could take a while)"
+		dodoc docs/manual.pdf
+		dohtml -r docs/*.html docs/changes docs/manualpages
+	fi
+}
+
+pkg_postinst() {
+	elog "The petsc ebuild is still under development."
+	elog "Help us improve the ebuild in:"
+	elog "http://bugs.gentoo.org/show_bug.cgi?id=53386"
+}



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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2012-06-28  8:25 Jens-Malte Gottfried
  0 siblings, 0 replies; 19+ messages in thread
From: Jens-Malte Gottfried @ 2012-06-28  8:25 UTC (permalink / raw
  To: gentoo-commits

commit:     139254cb7db9768fd2ecde18ec6ff464f8c10ab6
Author:     Jens-Malte Gottfried <jmgottfried <AT> web <DOT> de>
AuthorDate: Thu Jun 28 08:25:17 2012 +0000
Commit:     Jens-Malte Gottfried <jmg <AT> godefridus <DOT> de>
CommitDate: Thu Jun 28 08:25:17 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=139254cb

updated to petsc-3.3_p1

---
 ...ure-pic.patch => petsc-3.3-configure-pic.patch} |    0
 ....patch => petsc-3.3-disable-env-warnings.patch} |    0
 ...e-rpath.patch => petsc-3.3-disable-rpath.patch} |    0
 .../{petsc-3.3_p0.ebuild => petsc-3.3_p1.ebuild}   |    6 +++---
 4 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sci-mathematics/petsc/files/petsc-3.3_p0-configure-pic.patch b/sci-mathematics/petsc/files/petsc-3.3-configure-pic.patch
similarity index 100%
rename from sci-mathematics/petsc/files/petsc-3.3_p0-configure-pic.patch
rename to sci-mathematics/petsc/files/petsc-3.3-configure-pic.patch

diff --git a/sci-mathematics/petsc/files/petsc-3.3_p0-disable-env-warnings.patch b/sci-mathematics/petsc/files/petsc-3.3-disable-env-warnings.patch
similarity index 100%
rename from sci-mathematics/petsc/files/petsc-3.3_p0-disable-env-warnings.patch
rename to sci-mathematics/petsc/files/petsc-3.3-disable-env-warnings.patch

diff --git a/sci-mathematics/petsc/files/petsc-3.3_p0-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.3-disable-rpath.patch
similarity index 100%
rename from sci-mathematics/petsc/files/petsc-3.3_p0-disable-rpath.patch
rename to sci-mathematics/petsc/files/petsc-3.3-disable-rpath.patch

diff --git a/sci-mathematics/petsc/petsc-3.3_p0.ebuild b/sci-mathematics/petsc/petsc-3.3_p1.ebuild
similarity index 97%
rename from sci-mathematics/petsc/petsc-3.3_p0.ebuild
rename to sci-mathematics/petsc/petsc-3.3_p1.ebuild
index defd77c..36e2d7a 100644
--- a/sci-mathematics/petsc/petsc-3.3_p0.ebuild
+++ b/sci-mathematics/petsc/petsc-3.3_p1.ebuild
@@ -56,9 +56,9 @@ DEPEND="${RDEPEND}
 S="${WORKDIR}/${MY_P}"
 
 PATCHES=(
-	"${FILESDIR}"/${P}-configure-pic.patch
-	"${FILESDIR}"/${P}-disable-env-warnings.patch
-	"${FILESDIR}"/${P}-disable-rpath.patch
+	"${FILESDIR}"/${P%_*}-configure-pic.patch
+	"${FILESDIR}"/${P%_*}-disable-env-warnings.patch
+	"${FILESDIR}"/${P%_*}-disable-rpath.patch
 )
 
 src_configure() {



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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2013-01-07 21:58 Jens-Malte Gottfried
  0 siblings, 0 replies; 19+ messages in thread
From: Jens-Malte Gottfried @ 2013-01-07 21:58 UTC (permalink / raw
  To: gentoo-commits

commit:     f58075816ea2ebed8674666d655f46a3f2bb23b3
Author:     Jens-Malte Gottfried <jmgottfried <AT> web <DOT> de>
AuthorDate: Mon Jan  7 21:57:54 2013 +0000
Commit:     Jens-Malte Gottfried <jmg <AT> godefridus <DOT> de>
CommitDate: Mon Jan  7 21:57:54 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=f5807581

updated to latest petsc 3.2 release

---
 .../petsc/files/petsc-3.2_p6-fix-afterimage.patch  |   71 --------------------
 .../petsc/files/petsc-3.2_p6-fix-imagemagick.patch |   24 -------
 .../petsc/files/petsc-3.2_p6-fix-xops.patch        |   21 ------
 ...-pic.patch => petsc-3.2_p7-configure-pic.patch} |    0
 ...tch => petsc-3.2_p7-disable-env-warnings.patch} |    0
 ...path.patch => petsc-3.2_p7-disable-rpath.patch} |    0
 .../{petsc-3.2_p6.ebuild => petsc-3.2_p7.ebuild}   |    2 -
 7 files changed, 0 insertions(+), 118 deletions(-)

diff --git a/sci-mathematics/petsc/files/petsc-3.2_p6-fix-afterimage.patch b/sci-mathematics/petsc/files/petsc-3.2_p6-fix-afterimage.patch
deleted file mode 100644
index 27f4d3b..0000000
--- a/sci-mathematics/petsc/files/petsc-3.2_p6-fix-afterimage.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-
-# HG changeset patch
-# User Jed Brown <jed@59A2.org>
-# Date 1330818004 21600
-# Node ID fb79e104b74267c74aa64f125e7eb6a64bce4b14
-# Parent  8242202a123dd2cbfea7a4a2a9a1797951306f8d
-Fixes for libAfterImage compilation, ImageMagick is still just a stub
-
-diff -r 8242202a123d -r fb79e104b742 config/PETSc/packages/afterimage.py
---- a/config/PETSc/packages/afterimage.py	Sat Mar 03 16:05:00 2012 -0600
-+++ b/config/PETSc/packages/afterimage.py	Sat Mar 03 17:40:04 2012 -0600
-@@ -9,6 +9,7 @@
-     self.includedir    = ''
-     self.libdir        = '../../lib'
-     self.double        = 0
-+    self.complex       = 1
- 
-   def setupDependencies(self, framework):
-     PETSc.package.NewPackage.setupDependencies(self, framework)
-diff -r 8242202a123d -r fb79e104b742 config/PETSc/packages/imagemagick.py
---- a/config/PETSc/packages/imagemagick.py	Sat Mar 03 16:05:00 2012 -0600
-+++ b/config/PETSc/packages/imagemagick.py	Sat Mar 03 17:40:04 2012 -0600
-@@ -4,8 +4,8 @@
-   def __init__(self, framework):
-     PETSc.package.NewPackage.__init__(self, framework)
-     self.functions     = ['IsMagickInstantiated']
--    self.includes      = ['MagicCore/MagickCore.h']
--    self.liblist       = [['libMagicCore.a']]
-+    self.includes      = ['magick/MagickCore.h']
-+    self.liblist       = [['libMagickCore.a']]
- 
- 
- 
-diff -r 8242202a123d -r fb79e104b742 src/sys/draw/impls/x/xinit.c
---- a/src/sys/draw/impls/x/xinit.c	Sat Mar 03 16:05:00 2012 -0600
-+++ b/src/sys/draw/impls/x/xinit.c	Sat Mar 03 17:40:04 2012 -0600
-@@ -291,7 +291,7 @@
- #include <afterimage.h>
- #undef __FUNCT__  
- #define __FUNCT__ "PetscDrawSave_X" 
--PetscErrorCode PetscDrawSave_X(PetscDraw draw,PetscViewer viewer)
-+PetscErrorCode PetscDrawSave_X(PetscDraw draw)
- {
-   PetscDraw_X              *drawx = (PetscDraw_X*)draw->data;
-   XImage                   *image;
-@@ -328,10 +328,10 @@
- void deflateEnd(void) {;}
- 
- #elif defined(PETSC_HAVE_IMAGEMAGICK)
--#include <MagicCore/MagickCore.h>
-+#include <magick/MagickCore.h>
- #undef __FUNCT__  
- #define __FUNCT__ "PetscDrawSave_X" 
--PetscErrorCode PetscDrawSave_X(PetscDraw draw,PetscViewer viewer)
-+PetscErrorCode PetscDrawSave_X(PetscDraw draw)
- {
-   PetscDraw_X  *drawx = (PetscDraw_X*)draw->data;
-   Image        *image;
-diff -r 8242202a123d -r fb79e104b742 src/sys/draw/impls/x/xops.c
---- a/src/sys/draw/impls/x/xops.c	Sat Mar 03 16:05:00 2012 -0600
-+++ b/src/sys/draw/impls/x/xops.c	Sat Mar 03 17:40:04 2012 -0600
-@@ -551,7 +551,7 @@
-   PetscFunctionReturn(0);
- }
- 
--PetscErrorCode PetscDrawSave_X(PetscDraw,PetscViewer);
-+PetscErrorCode PetscDrawSave_X(PetscDraw);
- PetscErrorCode PetscDrawSetSave_X(PetscDraw,const char*);
- 
- static struct _PetscDrawOps DvOps = { PetscDrawSetDoubleBuffer_X,
-

diff --git a/sci-mathematics/petsc/files/petsc-3.2_p6-fix-imagemagick.patch b/sci-mathematics/petsc/files/petsc-3.2_p6-fix-imagemagick.patch
deleted file mode 100644
index 0e17f89..0000000
--- a/sci-mathematics/petsc/files/petsc-3.2_p6-fix-imagemagick.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- config/PETSc/packages/imagemagick.py.orig	2012-01-22 17:25:36.440142627 +0000
-+++ config/PETSc/packages/imagemagick.py	2012-01-22 17:26:26.091417306 +0000
-@@ -4,8 +4,8 @@
-   def __init__(self, framework):
-     PETSc.package.NewPackage.__init__(self, framework)
-     self.functions     = ['IsMagickInstantiated']
--    self.includes      = ['MagicCore/MagickCore.h']
--    self.liblist       = [['libMagicCore.a']]
-+    self.includes      = ['MagickCore/MagickCore.h']
-+    self.liblist       = [['libMagickCore.a']]
- 
- 
- 
---- src/sys/draw/impls/x/xinit.c.orig	2012-01-22 17:25:46.230393969 +0000
-+++ src/sys/draw/impls/x/xinit.c	2012-01-22 17:26:26.091417306 +0000
-@@ -328,7 +328,7 @@
- void deflateEnd(void) {;}
- 
- #elif defined(PETSC_HAVE_IMAGEMAGICK)
--#include <MagicCore/MagickCore.h>
-+#include <MagickCore/MagickCore.h>
- #undef __FUNCT__  
- #define __FUNCT__ "PetscDrawSave_X" 
- PetscErrorCode PetscDrawSave_X(PetscDraw draw,PetscViewer viewer)

diff --git a/sci-mathematics/petsc/files/petsc-3.2_p6-fix-xops.patch b/sci-mathematics/petsc/files/petsc-3.2_p6-fix-xops.patch
deleted file mode 100644
index cd2edeb..0000000
--- a/sci-mathematics/petsc/files/petsc-3.2_p6-fix-xops.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-
-# HG changeset patch
-# User Jed Brown <jed@59A2.org>
-# Date 1330812300 21600
-# Node ID 8242202a123dd2cbfea7a4a2a9a1797951306f8d
-# Parent  759927945bb3cdd30ff4265c043264db5286d263
-Fix declaration of PetscDrawSave_X()
-
-diff -r 759927945bb3 -r 8242202a123d src/sys/draw/impls/x/xops.c
---- a/src/sys/draw/impls/x/xops.c	Fri Mar 02 11:10:34 2012 -0600
-+++ b/src/sys/draw/impls/x/xops.c	Sat Mar 03 16:05:00 2012 -0600
-@@ -551,7 +551,7 @@
-   PetscFunctionReturn(0);
- }
- 
--PetscErrorCode PetscDrawSave_X(PetscDraw);
-+PetscErrorCode PetscDrawSave_X(PetscDraw,PetscViewer);
- PetscErrorCode PetscDrawSetSave_X(PetscDraw,const char*);
- 
- static struct _PetscDrawOps DvOps = { PetscDrawSetDoubleBuffer_X,
-

diff --git a/sci-mathematics/petsc/files/petsc-3.2_p6-configure-pic.patch b/sci-mathematics/petsc/files/petsc-3.2_p7-configure-pic.patch
similarity index 100%
rename from sci-mathematics/petsc/files/petsc-3.2_p6-configure-pic.patch
rename to sci-mathematics/petsc/files/petsc-3.2_p7-configure-pic.patch

diff --git a/sci-mathematics/petsc/files/petsc-3.2_p6-disable-env-warnings.patch b/sci-mathematics/petsc/files/petsc-3.2_p7-disable-env-warnings.patch
similarity index 100%
rename from sci-mathematics/petsc/files/petsc-3.2_p6-disable-env-warnings.patch
rename to sci-mathematics/petsc/files/petsc-3.2_p7-disable-env-warnings.patch

diff --git a/sci-mathematics/petsc/files/petsc-3.2_p6-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.2_p7-disable-rpath.patch
similarity index 100%
rename from sci-mathematics/petsc/files/petsc-3.2_p6-disable-rpath.patch
rename to sci-mathematics/petsc/files/petsc-3.2_p7-disable-rpath.patch

diff --git a/sci-mathematics/petsc/petsc-3.2_p6.ebuild b/sci-mathematics/petsc/petsc-3.2_p7.ebuild
similarity index 98%
rename from sci-mathematics/petsc/petsc-3.2_p6.ebuild
rename to sci-mathematics/petsc/petsc-3.2_p7.ebuild
index a0b84e0..5c8f5b5 100644
--- a/sci-mathematics/petsc/petsc-3.2_p6.ebuild
+++ b/sci-mathematics/petsc/petsc-3.2_p7.ebuild
@@ -59,8 +59,6 @@ PATCHES=(
 	"${FILESDIR}"/${P}-configure-pic.patch
 	"${FILESDIR}"/${P}-disable-env-warnings.patch
 	"${FILESDIR}"/${P}-disable-rpath.patch
-	"${FILESDIR}"/${P}-fix-xops.patch
-	"${FILESDIR}"/${P}-fix-afterimage.patch
 )
 
 src_configure() {


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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2013-01-07 22:06 Jens-Malte Gottfried
  0 siblings, 0 replies; 19+ messages in thread
From: Jens-Malte Gottfried @ 2013-01-07 22:06 UTC (permalink / raw
  To: gentoo-commits

commit:     d5769ccb66c8c5e8f7f0ba923dcb8247756e8f74
Author:     Jens-Malte Gottfried <jmgottfried <AT> web <DOT> de>
AuthorDate: Mon Jan  7 22:05:22 2013 +0000
Commit:     Jens-Malte Gottfried <jmg <AT> godefridus <DOT> de>
CommitDate: Mon Jan  7 22:05:22 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=d5769ccb

upated to latest petsc 3.3 release

env warnings no longer present, removing patch

---
 .../files/petsc-3.3-disable-env-warnings.patch     |   13 -------------
 .../{petsc-3.3_p1.ebuild => petsc-3.3_p5.ebuild}   |    1 -
 2 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/sci-mathematics/petsc/files/petsc-3.3-disable-env-warnings.patch b/sci-mathematics/petsc/files/petsc-3.3-disable-env-warnings.patch
deleted file mode 100644
index d2ee44e..0000000
--- a/sci-mathematics/petsc/files/petsc-3.3-disable-env-warnings.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: petsc-3.2-p6/config/BuildSystem/config/setCompilers.py
-===================================================================
---- petsc-3.2-p6.orig/config/BuildSystem/config/setCompilers.py
-+++ petsc-3.2-p6/config/BuildSystem/config/setCompilers.py
-@@ -1463,7 +1463,7 @@ This way - mpi compilers from '''+self.a
-                  'LDFLAGS','LIBS','MPI_DIR']
-     for envVal in ignoreEnv:
-       if envVal in os.environ:
--        self.logPrintBox('***** WARNING: '+envVal+' found in enviornment variables - ignoring ******')
-+        #self.logPrintBox('***** WARNING: '+envVal+' found in enviornment variables - ignoring ******')
-         del os.environ[envVal]
-     return
- 

diff --git a/sci-mathematics/petsc/petsc-3.3_p1.ebuild b/sci-mathematics/petsc/petsc-3.3_p5.ebuild
similarity index 99%
rename from sci-mathematics/petsc/petsc-3.3_p1.ebuild
rename to sci-mathematics/petsc/petsc-3.3_p5.ebuild
index 0490a56..de5dd8f 100644
--- a/sci-mathematics/petsc/petsc-3.3_p1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.3_p5.ebuild
@@ -57,7 +57,6 @@ S="${WORKDIR}/${MY_P}"
 
 PATCHES=(
 	"${FILESDIR}"/${P%_*}-configure-pic.patch
-	"${FILESDIR}"/${P%_*}-disable-env-warnings.patch
 	"${FILESDIR}"/${P%_*}-disable-rpath.patch
 )
 


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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2013-02-09 18:30 Jens-Malte Gottfried
  0 siblings, 0 replies; 19+ messages in thread
From: Jens-Malte Gottfried @ 2013-02-09 18:30 UTC (permalink / raw
  To: gentoo-commits

commit:     31219f323374fc447f697e497e654982bf66e791
Author:     Jens-Malte Gottfried <jmgottfried <AT> web <DOT> de>
AuthorDate: Sat Feb  9 18:28:15 2013 +0000
Commit:     Jens-Malte Gottfried <jmg <AT> godefridus <DOT> de>
CommitDate: Sat Feb  9 18:28:15 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=31219f32

fixed petsc compile issue reported by disperato

reported at github:
https://github.com/gentoo-science/sci/issues/47

for more info, see patch comments
issue also reported to upstream maintainers

---
 .../files/petsc-3.3-fix-complex-threads.patch      |   62 ++++++++++++++++++++
 sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild       |    4 +-
 sci-mathematics/petsc/petsc-3.3_p5.ebuild          |    9 +++-
 3 files changed, 72 insertions(+), 3 deletions(-)

diff --git a/sci-mathematics/petsc/files/petsc-3.3-fix-complex-threads.patch b/sci-mathematics/petsc/files/petsc-3.3-fix-complex-threads.patch
new file mode 100644
index 0000000..ae41bab
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-3.3-fix-complex-threads.patch
@@ -0,0 +1,62 @@
+As reported by disperato
+at https://github.com/gentoo-science/sci/issues/47
+compilation fails if complex scalars are used together with
+threads support.
+This fix to VecNorm_SeqPThread(...) was inspired by the
+implementation of VecNorm_Seq(...) in src/vec/vec/impls/seq/bvec2.c
+
+Index: petsc-3.3-p5/src/vec/vec/impls/seq/seqpthread/vecpthread.c
+===================================================================
+--- a/src/vec/vec/impls/seq/seqpthread/vecpthread.c
++++ b/src/vec/vec/impls/seq/seqpthread/vecpthread.c
+@@ -589,17 +589,33 @@ PetscErrorCode VecNorm_SeqPThread(...)
+     }
+     ierr = PetscThreadsRunKernel(VecNorm_Kernel,(void**)vec_pdata,tmap->nthreads,tmap->affinity);
+     /* collect results */
+-    *z = (PetscReal)vec_kerneldatap[0].result;
++#if defined(PETSC_USE_COMPLEX)
++    *z = PetscRealPart(vec_kerneldatap[0].result);
++#else
++    *z = (PetscReal)vec_kerneldatap[0].result;
++#endif
+     if(type == NORM_1) {
+       for(i=1; i<tmap->nthreads; i++) {
+-        *z += (PetscReal)vec_kerneldatap[i].result;
++#if defined(PETSC_USE_COMPLEX)
++        *z += PetscRealPart(vec_kerneldatap[i].result);
++#else
++        *z += (PetscReal)vec_kerneldatap[i].result;
++#endif
+       }
+       ierr = PetscLogFlops(PetscMax(xin->map->n-1.0+tmap->nthreads-1,0.0));CHKERRQ(ierr);
+     }
+     else if(type == NORM_2 || type == NORM_FROBENIUS) {
+-      *z = (PetscReal)vec_kerneldatap[0].result;
++#if defined(PETSC_USE_COMPLEX)
++      *z = PetscRealPart(vec_kerneldatap[0].result);
++#else
++      *z = (PetscReal)vec_kerneldatap[0].result;
++#endif
+       for(i=1; i<tmap->nthreads; i++) {
+-        *z += (PetscReal)vec_kerneldatap[i].result;
++#if defined(PETSC_USE_COMPLEX)
++        *z += PetscRealPart(vec_kerneldatap[i].result);
++#else
++        *z += (PetscReal)vec_kerneldatap[i].result;
++#endif
+       }
+       *z = PetscSqrtReal(*z);
+       ierr = PetscLogFlops(PetscMax(2.0*xin->map->n-1+tmap->nthreads-1,0.0));CHKERRQ(ierr);
+@@ -607,7 +623,11 @@
+     else {
+       PetscReal    maxv = 0.0,tmp;
+       for(i=0; i<tmap->nthreads; i++) {
+-        tmp = (PetscReal)vec_kerneldatap[i].result;
++#if defined(PETSC_USE_COMPLEX)
++        tmp = PetscRealPart(vec_kerneldatap[i].result);
++#else
++        tmp = (PetscReal)vec_kerneldatap[i].result;
++#endif
+         if(tmp>maxv) {
+           maxv = tmp;
+         }

diff --git a/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild b/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild
index b5cc3ce..4185075 100644
--- a/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild
+++ b/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
@@ -27,7 +27,7 @@ RDEPEND="mpi? ( virtual/mpi[cxx?,fortran?] )
 "
 
 DEPEND="${RDEPEND}
-	sys-devel/gcc[-nocxx,fortran?]"
+	sys-devel/gcc[fortran?]"
 
 S="${WORKDIR}/${MY_P}"
 

diff --git a/sci-mathematics/petsc/petsc-3.3_p5.ebuild b/sci-mathematics/petsc/petsc-3.3_p5.ebuild
index 42ed2a2..6f0acd7 100644
--- a/sci-mathematics/petsc/petsc-3.3_p5.ebuild
+++ b/sci-mathematics/petsc/petsc-3.3_p5.ebuild
@@ -58,6 +58,7 @@ S="${WORKDIR}/${MY_P}"
 PATCHES=(
 	"${FILESDIR}"/${P%_*}-configure-pic.patch
 	"${FILESDIR}"/${P%_*}-disable-rpath.patch
+	"${FILESDIR}"/${P%_*}-fix-complex-threads.patch
 )
 
 src_configure() {
@@ -105,6 +106,12 @@ src_configure() {
 		filter-flags -O*
 	fi
 
+	# enable C Support on Cxx build if possible
+	local petscCSupp
+	if use cxx && ! use complex-scalars; then
+		petscCSupp="--with-c-support=1"
+	fi
+
 	# run petsc configure script
 	econf \
 		CFLAGS="${CFLAGS}" \
@@ -113,7 +120,7 @@ src_configure() {
 		--with-shared-libraries \
 		--with-single-library \
 		--with-clanguage=${mylang} \
-		$(petsc_enable cxx c-support) \
+		$petscCSupp \
 		--with-petsc-arch=${PETSC_ARCH} \
 		--with-precision=double \
 		--with-gnu-compilers \


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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2013-02-22 10:15 Justin Lecher
  0 siblings, 0 replies; 19+ messages in thread
From: Justin Lecher @ 2013-02-22 10:15 UTC (permalink / raw
  To: gentoo-commits

commit:     5cc1b725f0d81b13573c72be6d1414f0337b0205
Author:     Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 22 09:31:07 2013 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Feb 22 09:31:07 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=5cc1b725

sci-mathematics/petsc: Use tc-getPKG_CONFIG from toolchain-funcs.eclass instead of plain pkg-config; drop old

Package-Manager: portage-2.2.0_alpha163

---
 sci-mathematics/petsc/ChangeLog                    |   11 +-
 .../petsc/files/petsc-3.1_p8-configure-pic.patch   |   11 -
 .../petsc/files/petsc-3.1_p8-disable-rpath.patch   |   16 --
 .../petsc/files/petsc-3.2_p7-configure-pic.patch   |   11 -
 .../files/petsc-3.2_p7-disable-env-warnings.patch  |   13 --
 .../petsc/files/petsc-3.2_p7-disable-rpath.patch   |   16 --
 sci-mathematics/petsc/metadata.xml                 |   20 +-
 sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild       |  202 ------------------
 sci-mathematics/petsc/petsc-3.2_p7.ebuild          |  215 --------------------
 sci-mathematics/petsc/petsc-3.3_p5.ebuild          |    6 +-
 10 files changed, 22 insertions(+), 499 deletions(-)

diff --git a/sci-mathematics/petsc/ChangeLog b/sci-mathematics/petsc/ChangeLog
index 4bc96b9..fc4e7d4 100644
--- a/sci-mathematics/petsc/ChangeLog
+++ b/sci-mathematics/petsc/ChangeLog
@@ -1,7 +1,16 @@
 # ChangeLog for sci-mathematics/petsc
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+  22 Feb 2013; Justin Lecher <jlec@gentoo.org> -petsc-3.1_p8-r1.ebuild,
+  -files/petsc-3.1_p8-configure-pic.patch,
+  -files/petsc-3.1_p8-disable-rpath.patch, -petsc-3.2_p7.ebuild,
+  -files/petsc-3.2_p7-configure-pic.patch,
+  -files/petsc-3.2_p7-disable-env-warnings.patch,
+  -files/petsc-3.2_p7-disable-rpath.patch, petsc-3.3_p5.ebuild, metadata.xml:
+  Use tc-getPKG_CONFIG from toolchain-funcs.eclass instead of plain pkg-config;
+  drop old
+
   06 Mar 2012; Jens-Malte Gottfried <jmgottfried@web.de>
   petsc-3.1_p8-r1.ebuild, +files/petsc-3.1_p8-configure-pic.patch,
   +files/petsc-3.1_p8-disable-rpath.patch:

diff --git a/sci-mathematics/petsc/files/petsc-3.1_p8-configure-pic.patch b/sci-mathematics/petsc/files/petsc-3.1_p8-configure-pic.patch
deleted file mode 100644
index bbfdae1..0000000
--- a/sci-mathematics/petsc/files/petsc-3.1_p8-configure-pic.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- config/BuildSystem/config/setCompilers.py.old	2010-09-07 21:41:32.693103846 +0200
-+++ config/BuildSystem/config/setCompilers.py	2010-09-07 21:41:45.322093881 +0200
-@@ -875,7 +875,7 @@
-       languages.append('FC')
-     for language in languages:
-       self.pushLanguage(language)
--      for testFlag in ['-PIC', '-fPIC', '-KPIC','-qpic']:
-+      for testFlag in ['-fPIC', '-PIC', '-KPIC', '-qpic']:
-         try:
-           self.framework.logPrint('Trying '+language+' compiler flag '+testFlag)
-           if not self.checkLinkerFlag(testFlag):

diff --git a/sci-mathematics/petsc/files/petsc-3.1_p8-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.1_p8-disable-rpath.patch
deleted file mode 100644
index 3c443b2..0000000
--- a/sci-mathematics/petsc/files/petsc-3.1_p8-disable-rpath.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- config/BuildSystem/config/setCompilers.py	2010-11-24 18:01:17.110124425 +0100
-+++ config/BuildSystem/config/setCompilers.py	2010-11-24 18:02:28.710104226 +0100
-@@ -1186,12 +1186,7 @@
-     for language in languages:
-       flag = '-L'
-       self.pushLanguage(language)
--      # test '-R' before '-rpath' as sun compilers [c,fortran] don't give proper errors with wrong options.
--      if not Configure.isDarwin():      
--        testFlags = ['-Wl,-rpath,', '-R','-rpath ' , '-Wl,-R,']
--      else:
--        testFlags = []
--      # test '-R' before '-Wl,-rpath' for SUN compilers [as cc on linux accepts -Wl,-rpath, but  f90 & CC do not.
-+      testFlags = []
-       if self.isSun(self.framework.getCompiler()):
-         testFlags.insert(0,'-R')
-       for testFlag in testFlags:

diff --git a/sci-mathematics/petsc/files/petsc-3.2_p7-configure-pic.patch b/sci-mathematics/petsc/files/petsc-3.2_p7-configure-pic.patch
deleted file mode 100644
index bbfdae1..0000000
--- a/sci-mathematics/petsc/files/petsc-3.2_p7-configure-pic.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- config/BuildSystem/config/setCompilers.py.old	2010-09-07 21:41:32.693103846 +0200
-+++ config/BuildSystem/config/setCompilers.py	2010-09-07 21:41:45.322093881 +0200
-@@ -875,7 +875,7 @@
-       languages.append('FC')
-     for language in languages:
-       self.pushLanguage(language)
--      for testFlag in ['-PIC', '-fPIC', '-KPIC','-qpic']:
-+      for testFlag in ['-fPIC', '-PIC', '-KPIC', '-qpic']:
-         try:
-           self.framework.logPrint('Trying '+language+' compiler flag '+testFlag)
-           if not self.checkLinkerFlag(testFlag):

diff --git a/sci-mathematics/petsc/files/petsc-3.2_p7-disable-env-warnings.patch b/sci-mathematics/petsc/files/petsc-3.2_p7-disable-env-warnings.patch
deleted file mode 100644
index d2ee44e..0000000
--- a/sci-mathematics/petsc/files/petsc-3.2_p7-disable-env-warnings.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: petsc-3.2-p6/config/BuildSystem/config/setCompilers.py
-===================================================================
---- petsc-3.2-p6.orig/config/BuildSystem/config/setCompilers.py
-+++ petsc-3.2-p6/config/BuildSystem/config/setCompilers.py
-@@ -1463,7 +1463,7 @@ This way - mpi compilers from '''+self.a
-                  'LDFLAGS','LIBS','MPI_DIR']
-     for envVal in ignoreEnv:
-       if envVal in os.environ:
--        self.logPrintBox('***** WARNING: '+envVal+' found in enviornment variables - ignoring ******')
-+        #self.logPrintBox('***** WARNING: '+envVal+' found in enviornment variables - ignoring ******')
-         del os.environ[envVal]
-     return
- 

diff --git a/sci-mathematics/petsc/files/petsc-3.2_p7-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.2_p7-disable-rpath.patch
deleted file mode 100644
index 3c443b2..0000000
--- a/sci-mathematics/petsc/files/petsc-3.2_p7-disable-rpath.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- config/BuildSystem/config/setCompilers.py	2010-11-24 18:01:17.110124425 +0100
-+++ config/BuildSystem/config/setCompilers.py	2010-11-24 18:02:28.710104226 +0100
-@@ -1186,12 +1186,7 @@
-     for language in languages:
-       flag = '-L'
-       self.pushLanguage(language)
--      # test '-R' before '-rpath' as sun compilers [c,fortran] don't give proper errors with wrong options.
--      if not Configure.isDarwin():      
--        testFlags = ['-Wl,-rpath,', '-R','-rpath ' , '-Wl,-R,']
--      else:
--        testFlags = []
--      # test '-R' before '-Wl,-rpath' for SUN compilers [as cc on linux accepts -Wl,-rpath, but  f90 & CC do not.
-+      testFlags = []
-       if self.isSun(self.framework.getCompiler()):
-         testFlags.insert(0,'-R')
-       for testFlag in testFlags:

diff --git a/sci-mathematics/petsc/metadata.xml b/sci-mathematics/petsc/metadata.xml
index f0f9f18..2e5b489 100644
--- a/sci-mathematics/petsc/metadata.xml
+++ b/sci-mathematics/petsc/metadata.xml
@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<herd>sci-mathematics</herd>
-<use>
-  <flag name="afterimage">Use Afterstep image library (media-libs/libafterimage)</flag>
-  <flag name="hypre">Use HYPRE (sci-mathematics/hypre) and for preconditioning</flag>
-  <flag name="metis">Use METIS (sci-libs/parmetis) for partitioning</flag>
-  <flag name="complex-scalars">Make scalars complex</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>
-  <!-- Disabled:
+  <herd>sci-mathematics</herd>
+  <use>
+    <flag name="afterimage">Use Afterstep image library (media-libs/libafterimage)</flag>
+    <flag name="hypre">Use HYPRE (sci-mathematics/hypre) and for preconditioning</flag>
+    <flag name="metis">Use METIS (sci-libs/parmetis) for partitioning</flag>
+    <flag name="complex-scalars">Make scalars complex</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>
+    <!-- Disabled:
   <flag name="boost">Use boost (dev-libs/boost)</flag>
 	-->
-</use>
+  </use>
 </pkgmetadata>

diff --git a/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild b/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild
deleted file mode 100644
index 4185075..0000000
--- a/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild
+++ /dev/null
@@ -1,202 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=3
-
-inherit flag-o-matic fortran-2 toolchain-funcs eutils
-
-MY_P="${PN}-${PV/_/-}"
-
-DESCRIPTION="Portable, Extensible Toolkit for Scientific Computation"
-HOMEPAGE="http://www.mcs.anl.gov/petsc/petsc-as/"
-SRC_URI="http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${MY_P}.tar.gz"
-
-LICENSE="petsc"
-SLOT="0"
-KEYWORDS="~x86 ~amd64"
-IUSE="complex-scalars cxx debug doc fortran hdf5 hypre metis mpi static-libs X"
-
-RDEPEND="mpi? ( virtual/mpi[cxx?,fortran?] )
-	X? ( x11-libs/libX11 )
-	virtual/lapack
-	virtual/blas
-	hypre? ( sci-libs/hypre )
-	metis? ( sci-libs/parmetis )
-	hdf5? ( sci-libs/hdf5[!mpi?] )
-"
-
-DEPEND="${RDEPEND}
-	sys-devel/gcc[fortran?]"
-
-S="${WORKDIR}/${MY_P}"
-
-if use hypre; then
-	use cxx || die "hypre needs cxx, please enable cxx or disable hypre use flag"
-	use mpi || die "hypre needs mpi, please enable mpi or disable hypre use flag"
-fi
-
-src_prepare(){
-	epatch \
-		"${FILESDIR}"/${P}-configure-pic.patch \
-		"${FILESDIR}"/${P}-disable-rpath.patch
-}
-
-src_configure(){
-	local mylang
-	local myopt
-	local myconf
-
-	use cxx && mylang="cxx" || mylang="c"
-	use debug && myopt="debug" || myopt="opt"
-
-	export PETSC_DIR="${S}" || die
-	export PETSC_ARCH="linux-gnu-${mylang}-${myopt}" || die
-
-	myconf[10]="--with-blas-lapack-lib=$(pkg-config --libs lapack)"
-	myconf[11]="CFLAGS=${CFLAGS}"
-	myconf[12]="CXXFLAGS=${CXXFLAGS}"
-	myconf[13]="LDFLAGS=${LDFLAGS}"
-	myconf[14]="--with-windows-graphics=0"
-	myconf[15]="--with-matlab=0"
-	myconf[16]="--with-python=0"
-	myconf[17]="--with-clanguage=${mylang}"
-	myconf[18]="--with-single-library=1"
-	myconf[19]="--with-petsc-arch=${PETSC_ARCH}"
-	myconf[20]="--with-precision=double"
-	myconf[21]="--with-gnu-compilers=1"
-	use amd64 \
-		&& myconf[22]="--with-64-bit-pointers=1" \
-		|| myconf[22]="--with-64-bit-pointers=0"
-	use cxx \
-		&& myconf[23]="--with-c-support=1"
-	use amd64 \
-		&& myconf[24]="--with-64-bit-indices=1" \
-		|| myconf[24]="--with-64-bit-indices=0"
-
-	if use mpi; then
-		myconf[30]="--with-cc=/usr/bin/mpicc"
-		myconf[31]="--with-cxx=/usr/bin/mpicxx"
-		use fortran && myconf[32]="--with-fc=/usr/bin/mpif77"
-		myconf[33]="--with-mpi=1"
-		myconf[34]="--with-mpi-compilers=1"
-	else
-		myconf[30]="--with-cc=$(tc-getCC)"
-		myconf[31]="--with-cxx=$(tc-getCXX)"
-		use fortran && myconf[32]="--with-fc=$(tc-getF77)"
-		myconf[33]="--with-mpi=0"
-	fi
-
-	use X \
-		&& myconf[40]="--with-X=1" \
-		|| myconf[40]="--with-X=0"
-	use static-libs \
-		&& myconf[41]="--with-shared=0" \
-		|| myconf[41]="--with-shared=1"
-	use fortran \
-		&& myconf[43]="--with-fortran=1" \
-		|| myconf[43]="--with-fortran=0"
-
-	if use debug; then
-		strip-flags
-		filter-flags -O*
-		myconf[44]="--with-debugging=1"
-	else
-		myconf[44]="--with-debugging=0"
-	fi
-
-	if use hypre; then
-		# hypre cannot handle 64 bit indices, therefore disabled
-		myconf[24]="--with-64-bit-indices=0"
-		myconf[52]="--with-hypre=1"
-		myconf[53]="--with-hypre-include=/usr/include/hypre"
-		use static-libs \
-			&& myconf[54]="--with-hypre-lib=/usr/$(get_libdir)/libHYPRE.a" \
-			|| myconf[54]="--with-hypre-lib=/usr/$(get_libdir)/libHYPRE.so"
-	else
-		myconf[52]="--with-hypre=0"
-	fi
-
-	if use metis; then
-		# parmetis cannot handle 64 bit indices, therefore disabled
-		myconf[24]="--with-64-bit-indices=0"
-		myconf[61]="--with-parmetis=1"
-		myconf[62]="--with-parmetis-include=/usr/include/parmetis"
-		myconf[63]="--with-parmetis-lib=/usr/$(get_libdir)/libparmetis.so"
-	else
-		myconf[61]="--with-parmetis=0"
-	fi
-
-	if use hdf5; then
-		myconf[71]="--with-hdf5=1"
-		myconf[72]="--with-hdf5-include=/usr/include"
-		myconf[73]="--with-hdf5-lib=/usr/$(get_libdir)/libhdf5.so"
-	else
-		myconf[71]="--with-hdf5=0"
-	fi
-
-	myconf[81]="--with-scotch=0"
-
-	if use complex-scalars; then
-		# cannot enable C support with complex scalars
-		# (cannot even set configure option to zero!)
-		myconf[23]=""
-		myconf[82]="--with-scalar-type=complex"
-	fi
-
-	einfo "Configure options: ${myconf[@]}"
-	python "${S}/config/configure.py" "${myconf[@]}" \
-		|| die "PETSc configuration failed"
-}
-
-src_install(){
-	insinto /usr/include/"${PN}"
-	doins "${S}"/include/*.h "${S}"/include/*.hh
-	insinto /usr/include/"${PN}/${PETSC_ARCH}"/include
-	doins "${S}/${PETSC_ARCH}"/include/*
-	if use fortran; then
-		insinto /usr/include/"${PN}"/finclude
-		doins "${S}"/include/finclude/*.h
-	fi
-	insinto /usr/include/"${PN}"/conf
-	doins "${S}"/conf/{variables,rules,test}
-	insinto /usr/include/"${PN}/${PETSC_ARCH}"/conf
-	doins "${S}/${PETSC_ARCH}"/conf/{petscrules,petscvariables,RDict.db}
-
-	insinto /usr/include/"${PN}"/private
-	doins "${S}"/include/private/*.h
-
-	dosed "s:${S}:/usr:g" /usr/include/"${PN}/${PETSC_ARCH}"/include/petscconf.h
-	dosed "s:${PETSC_ARCH}/lib:$(get_libdir):g" /usr/include/"${PN}/${PETSC_ARCH}"/include/petscconf.h
-	dosed "s:INSTALL_DIR =.*:INSTALL_DIR = /usr:" /usr/include/"${PN}/${PETSC_ARCH}"/conf/petscvariables
-
-	cat >> "${T}"/99petsc <<- EOF
-	PETSC_ARCH=${PETSC_ARCH}
-	PETSC_DIR=/usr/include/${PN}
-	EOF
-	doenvd "${T}"/99petsc
-
-	if ! use mpi ; then
-		insinto /usr/include/"${PN}"/mpiuni
-		doins "${S}"/include/mpiuni/*.h
-	fi
-
-	if use doc ; then
-		dodoc docs/manual.pdf
-		dohtml -r docs/*.html docs/changes docs/manualpages
-	fi
-
-	use static-libs \
-		&& dolib.a  "${S}/${PETSC_ARCH}"/lib/*.a  \
-		|| dolib.so "${S}/${PETSC_ARCH}"/lib/*.so
-}
-
-pkg_postinst() {
-	elog "The petsc ebuild is still under development."
-	elog "Help us improve the ebuild in:"
-	elog "http://bugs.gentoo.org/show_bug.cgi?id=53386"
-	elog "This ebuild is known to have parallel build issues, "
-	elog "hopefully resolved by upstream soon."
-	elog "Another problem is that you can break this package by"
-	elog "switching your mpi implementation without rebuild petsc."
-}

diff --git a/sci-mathematics/petsc/petsc-3.2_p7.ebuild b/sci-mathematics/petsc/petsc-3.2_p7.ebuild
deleted file mode 100644
index 6bd5bc4..0000000
--- a/sci-mathematics/petsc/petsc-3.2_p7.ebuild
+++ /dev/null
@@ -1,215 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-EAPI=4
-
-inherit base flag-o-matic fortran-2 toolchain-funcs versionator
-
-MY_P="${PN}-$(replace_version_separator _ -)"
-
-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/${MY_P}.tar.gz"
-
-LICENSE="petsc"
-SLOT="0"
-KEYWORDS="~x86 ~amd64"
-IUSE="afterimage complex-scalars cxx debug doc
-	fortran hdf5 hypre metis mpi sparse superlu threads X"
-# Failed: boost imagemagick
-
-# hypre and superlu curretly exclude each other due to missing linking to hypre
-# if both are enabled
-REQUIRED_USE="
-	hypre? ( cxx mpi )
-	hdf5? ( mpi )
-	afterimage? ( X )
-	^^ ( hypre superlu )
-"
-#	imagemagick? ( X )
-
-RDEPEND="
-	virtual/blas
-	virtual/lapack
-	afterimage? ( media-libs/libafterimage )
-	hdf5? ( sci-libs/hdf5[mpi?] )
-	hypre? ( sci-libs/hypre[mpi?] )
-	metis? ( sci-libs/parmetis )
-	mpi? ( virtual/mpi[cxx?,fortran?] )
-	sparse? ( sci-libs/suitesparse >=sci-libs/cholmod-1.7.0 )
-	superlu? ( sci-libs/superlu )
-	X? ( x11-libs/libX11 )
-"
-#	boost? ( dev-libs/boost )
-#	imagemagick? ( media-gfx/imagemagick )
-
-DEPEND="${RDEPEND}
-	virtual/fortran
-	virtual/pkgconfig
-	dev-lang/python
-	dev-util/cmake
-"
-# cmake is used for parralel building
-# in some configuration setups, legacy build is used (slow)
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-configure-pic.patch
-	"${FILESDIR}"/${P}-disable-env-warnings.patch
-	"${FILESDIR}"/${P}-disable-rpath.patch
-)
-
-src_configure() {
-	# 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=${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"
-	}
-
-	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
-
-	# run petsc configure script
-	econf \
-		CFLAGS="${CFLAGS}" \
-		CXXFLAGS="${CXXFLAGS}" \
-		LDFLAGS="${LDFLAGS}" \
-		--with-shared-libraries \
-		--with-single-library \
-		--with-clanguage=${mylang} \
-		$(petsc_enable cxx c-support) \
-		--with-petsc-arch=${PETSC_ARCH} \
-		--with-precision=double \
-		--with-gnu-compilers \
-		--with-blas-lapack-lib="$(pkg-config --libs 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_enable threads pthread) \
-		$(petsc_enable threads pthreadclasses) \
-		$(petsc_select complex-scalars scalar-type complex real) \
-		--with-windows-graphics=0 \
-		--with-matlab=0 \
-		--with-cmake=cmake \
-		$(petsc_with afterimage afterimage \
-			/usr/include/libAfterImage -lAfterImage) \
-		$(petsc_with hdf5) \
-		$(petsc_with hypre hypre \
-			/usr/include/hypre -lHYPRE) \
-		$(petsc_with metis parmetis) \
-		$(petsc_with sparse cholmod) \
-		$(petsc_with superlu superlu \
-			/usr/include/superlu -lsuperlu) \
-		$(petsc_with X x) \
-		$(petsc_with X x11) \
-		--with-imagemagick=0 \
-		--with-python=0 \
-		--with-scotch=0
-
-# not yet tested:
-#		python bindings, sctotch, netcdf, scalapack
-# non-working:
-#		fftw: no mpi-implementaion available in gentoo
-
-# failed dependencies, perhaps fixed in upstream soon:
-#		$(petsc_with boost) \
-#		$(petsc_with imagemagick imagemagick \
-#			/usr/include/ImageMagick $(pkg-config --libs MagickCore)) \
-}
-
-src_install() {
-	# petsc install structure is very different from
-	# installing headers to /usr/include/petsc and lib to /usr/lib
-	# it also installs many unneeded executables and scripts
-	# so manual install is easier than cleanup after "emake install"
-	insinto /usr/include/${PN}
-	doins include/*.h*
-	insinto /usr/include/${PN}/${PETSC_ARCH}/include
-	doins ${PETSC_ARCH}/include/*
-	if use fortran; then
-		insinto /usr/include/${PN}/finclude
-		doins include/finclude/*.h
-	fi
-	insinto /usr/include/${PN}/conf
-	doins conf/{variables,rules,test}
-	insinto /usr/include/${PN}/${PETSC_ARCH}/conf
-	doins ${PETSC_ARCH}/conf/{petscrules,petscvariables,RDict.db}
-	insinto /usr/include/${PN}/private
-	doins include/private/*.h
-
-	# fix configuration files: replace ${S} by installed location
-	sed -i \
-		-e "s:${S}::g" \
-		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h \
-		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/conf/petscvariables || die
-	sed -i \
-		-e "s:usr/lib:usr/$(get_libdir):g" \
-		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h || die
-
-	# add information about installation directory and
-	# PETSC_ARCH to environmental variables
-	cat >> 99petsc <<- EOF
-		PETSC_ARCH=${PETSC_ARCH}
-		PETSC_DIR=${EPREFIX}/usr/include/${PN}
-	EOF
-	doenvd 99petsc
-
-	if ! use mpi ; then
-		insinto /usr/include/${PN}/mpiuni
-		doins include/mpiuni/*.h
-	fi
-
-	if use doc ; then
-		dodoc docs/manual.pdf
-		dohtml -r docs/*.html docs/changes docs/manualpages
-	fi
-
-	dolib.so ${PETSC_ARCH}/lib/*.so
-}
-
-pkg_postinst() {
-	elog "The petsc ebuild is still under development."
-	elog "Help us improve the ebuild in:"
-	elog "http://bugs.gentoo.org/show_bug.cgi?id=53386"
-}

diff --git a/sci-mathematics/petsc/petsc-3.3_p5.ebuild b/sci-mathematics/petsc/petsc-3.3_p5.ebuild
index 81de267..e0a1340 100644
--- a/sci-mathematics/petsc/petsc-3.3_p5.ebuild
+++ b/sci-mathematics/petsc/petsc-3.3_p5.ebuild
@@ -45,9 +45,7 @@ RDEPEND="
 #	imagemagick? ( media-gfx/imagemagick )
 
 DEPEND="${RDEPEND}
-	virtual/fortran
 	virtual/pkgconfig
-	dev-lang/python
 	dev-util/cmake
 "
 # cmake is used for parralel building
@@ -128,7 +126,7 @@ src_configure() {
 		--with-petsc-arch=${PETSC_ARCH} \
 		--with-precision=double \
 		--with-gnu-compilers \
-		--with-blas-lapack-lib="$(pkg-config --libs lapack)" \
+		--with-blas-lapack-lib="$($(tc-getPKG_CONFIG) --libs lapack)" \
 		$(petsc_enable debug debugging) \
 		$(petsc_enable mpi) \
 		$(petsc_select mpi cc mpicc $(tc-getCC)) \
@@ -165,7 +163,7 @@ src_configure() {
 #		$(petsc_with metis parmetis) \ # needs metis too (>=5.0.2)
 #		$(petsc_with boost) \
 #		$(petsc_with imagemagick imagemagick \
-#			/usr/include/ImageMagick $(pkg-config --libs MagickCore)) \
+#			/usr/include/ImageMagick $($(tc-getPKG_CONFIG) --libs MagickCore)) \
 }
 
 src_install() {


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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2013-10-18 16:19 Christoph Junghans
  0 siblings, 0 replies; 19+ messages in thread
From: Christoph Junghans @ 2013-10-18 16:19 UTC (permalink / raw
  To: gentoo-commits

commit:     5e56502a0222f00f69f25fb41855a7e33d3aeac3
Author:     layman <layman <AT> localhost>
AuthorDate: Tue Oct  8 19:04:48 2013 +0000
Commit:     Christoph Junghans <ottxor <AT> gentoo <DOT> org>
CommitDate: Tue Oct  8 19:18:43 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=5e56502a

Bump petsc to 3.4.2, include support for scotch and mumps

Bump PETSc to version 3.4.2. This commit also includes use flags for scotch
and mumps support

---
 .../petsc/files/petsc-3.4.2-disable-rpath.patch    |  16 ++
 sci-mathematics/petsc/petsc-3.4.2.ebuild           | 239 +++++++++++++++++++++
 2 files changed, 255 insertions(+)

diff --git a/sci-mathematics/petsc/files/petsc-3.4.2-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.4.2-disable-rpath.patch
new file mode 100644
index 0000000..0ccf45d
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-3.4.2-disable-rpath.patch
@@ -0,0 +1,16 @@
+--- config/BuildSystem/config/setCompilers.py	2013-10-08 19:45:00.581513389 +0200
++++ config/BuildSystem/config/setCompilers.py	2013-05-13 23:35:20.000000000 +0200
+@@ -1303,12 +1303,7 @@
+     for language in languages:
+       flag = '-L'
+       self.pushLanguage(language)
+-      # test '-R' before '-rpath' as sun compilers [c,fortran] don't give proper errors with wrong options.
+-      if not Configure.isDarwin():
+-        testFlags = ['-Wl,-rpath,', '-R','-rpath ' , '-Wl,-R,']
+-      else:
+-        testFlags = []
+-      # test '-R' before '-Wl,-rpath' for SUN compilers [as cc on linux accepts -Wl,-rpath, but  f90 & CC do not.
++      testFlags = []
+       if self.isSun(self.framework.getCompiler()):
+         testFlags.insert(0,'-R')
+       for testFlag in testFlags:

diff --git a/sci-mathematics/petsc/petsc-3.4.2.ebuild b/sci-mathematics/petsc/petsc-3.4.2.ebuild
new file mode 100644
index 0000000..1d8462f
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.4.2.ebuild
@@ -0,0 +1,239 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit base flag-o-matic fortran-2 toolchain-funcs versionator
+
+MY_P="${PN}-$(replace_version_separator _ -)"
+
+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/${MY_P}.tar.gz"
+
+LICENSE="petsc"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="afterimage complex-scalars cxx debug doc
+	fortran hdf5 hypre mpi mumps scotch sparse superlu threads X"
+# Failed: boost imagemagick metis
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	hdf5? ( mpi )
+	hypre? ( cxx mpi )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	^^ ( hypre superlu )
+"
+#	imagemagick? ( X )
+
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+	afterimage? ( media-libs/libafterimage )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.8.0b[mpi?] )
+	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 )
+	X? ( x11-libs/libX11 )
+"
+#	boost? ( dev-libs/boost )
+#	metis? ( sci-libs/parmetis )
+#	imagemagick? ( media-gfx/imagemagick )
+
+DEPEND="${RDEPEND}
+	virtual/pkgconfig
+	dev-util/cmake
+"
+# cmake is used for parallel building
+# in some configuration setups, legacy build is used (slow)
+
+#
+# PETSc does not want its Makefiles to be invoked with anything higher than
+# -j1. The underlying build system does automatically invoke a parallel
+# build. This might not be what you want, but *hey* not your choice.
+#
+MAKEOPTS="${MAKEOPTS} -j1"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+	"${FILESDIR}"/${P%_*}-disable-rpath.patch
+)
+
+src_configure() {
+	# 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"
+	}
+
+	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)
+
+	if use threads; then
+		ewarn "Threads support may be incomplete on $PN-3.3 release and is not officially supported."
+		ewarn "Upstream recommends not to enable threads support for production runs."
+	fi
+
+	# run petsc configure script
+	econf \
+		scrollOutput=1 \
+		CFLAGS="${CFLAGS}" \
+		CXXFLAGS="${CXXFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		--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 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_enable threads pthread) \
+		$(petsc_enable threads pthreadclasses) \
+		$(petsc_select complex-scalars scalar-type complex real) \
+		--with-windows-graphics=0 \
+		--with-matlab=0 \
+		--with-cmake=cmake \
+		$(petsc_with afterimage afterimage \
+			/usr/include/libAfterImage -lAfterImage) \
+		$(petsc_with hdf5) \
+		$(petsc_with hypre hypre \
+			/usr/include/hypre -lHYPRE) \
+		$(petsc_with sparse cholmod) \
+		$(petsc_with superlu superlu \
+			/usr/include/superlu -lsuperlu) \
+		$(petsc_with X x) \
+		$(petsc_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 \
+		    /usr/include \
+			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		--with-imagemagick=0 \
+		--with-python=0 \
+
+# not yet tested:
+#		python bindings, netcdf
+# non-working:
+#		fftw: no mpi-implementaion available in gentoo
+
+# failed dependencies, perhaps fixed in upstream soon:
+#		$(petsc_with metis parmetis) \ # needs metis too (>=5.0.2)
+#		$(petsc_with boost) \
+#		$(petsc_with imagemagick imagemagick \
+#			/usr/include/ImageMagick $($(tc-getPKG_CONFIG) --libs MagickCore)) \
+}
+
+src_install() {
+	# petsc install structure is very different from
+	# installing headers to /usr/include/petsc and lib to /usr/lib
+	# it also installs many unneeded executables and scripts
+	# so manual install is easier than cleanup after "emake install"
+	insinto /usr/include/${PN}
+	doins include/*.h*
+	insinto /usr/include/${PN}/${PETSC_ARCH}/include
+	doins ${PETSC_ARCH}/include/*
+	if use fortran; then
+		insinto /usr/include/${PN}/finclude
+		doins include/finclude/*.h
+	fi
+	if ! use mpi ; then
+		insinto /usr/include/${PN}/mpiuni
+		doins include/mpiuni/*.h
+	fi
+	insinto /usr/include/${PN}/conf
+	doins conf/{variables,rules,test}
+	insinto /usr/include/${PN}/${PETSC_ARCH}/conf
+	doins ${PETSC_ARCH}/conf/{petscrules,petscvariables,RDict.db}
+	insinto /usr/include/${PN}/petsc-private
+	doins include/petsc-private/*.h
+
+	# fix configuration files: replace ${S} by installed location
+	sed -i \
+		-e "s:${S}::g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/conf/petscvariables || die
+	sed -i \
+		-e "s:usr/lib:usr/$(get_libdir):g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h || die
+
+	# add information about installation directory and
+	# PETSC_ARCH to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_ARCH=${PETSC_ARCH}
+		PETSC_DIR=${EPREFIX}/usr/include/${PN}
+	EOF
+	doenvd 99petsc
+
+	dolib.so ${PETSC_ARCH}/lib/*.so
+
+	if use doc ; then
+		einfo "installing documentation (this could take a while)"
+		dodoc docs/manual.pdf
+		dohtml -r docs/*.html docs/changes docs/manualpages
+	fi
+}
+
+pkg_postinst() {
+	elog "The petsc ebuild is still under development."
+	elog "Help us improve the ebuild in:"
+	elog "http://bugs.gentoo.org/show_bug.cgi?id=53386"
+}


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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2014-07-24 21:50 Jens-Malte Gottfried
  0 siblings, 0 replies; 19+ messages in thread
From: Jens-Malte Gottfried @ 2014-07-24 21:50 UTC (permalink / raw
  To: gentoo-commits

commit:     eaa505b7fe3ae5a00cc9d99e1d8f4ab960e66610
Author:     Jens Malte Gottfried <jmgottfried <AT> web <DOT> de>
AuthorDate: Thu Jul 24 21:49:32 2014 +0000
Commit:     Jens-Malte Gottfried <jmg <AT> godefridus <DOT> de>
CommitDate: Thu Jul 24 21:49:32 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=eaa505b7

petc-3.5.1 version bump

---
 .../petsc/files/petsc-3.5.1-disable-rpath.patch    |  16 ++
 sci-mathematics/petsc/metadata.xml                 |   4 +-
 sci-mathematics/petsc/petsc-3.5.1.ebuild           | 234 +++++++++++++++++++++
 3 files changed, 251 insertions(+), 3 deletions(-)

diff --git a/sci-mathematics/petsc/files/petsc-3.5.1-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.5.1-disable-rpath.patch
new file mode 100644
index 0000000..0ccf45d
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-3.5.1-disable-rpath.patch
@@ -0,0 +1,16 @@
+--- config/BuildSystem/config/setCompilers.py	2013-10-08 19:45:00.581513389 +0200
++++ config/BuildSystem/config/setCompilers.py	2013-05-13 23:35:20.000000000 +0200
+@@ -1303,12 +1303,7 @@
+     for language in languages:
+       flag = '-L'
+       self.pushLanguage(language)
+-      # test '-R' before '-rpath' as sun compilers [c,fortran] don't give proper errors with wrong options.
+-      if not Configure.isDarwin():
+-        testFlags = ['-Wl,-rpath,', '-R','-rpath ' , '-Wl,-R,']
+-      else:
+-        testFlags = []
+-      # test '-R' before '-Wl,-rpath' for SUN compilers [as cc on linux accepts -Wl,-rpath, but  f90 & CC do not.
++      testFlags = []
+       if self.isSun(self.framework.getCompiler()):
+         testFlags.insert(0,'-R')
+       for testFlag in testFlags:

diff --git a/sci-mathematics/petsc/metadata.xml b/sci-mathematics/petsc/metadata.xml
index a22c6dc..fc9f3e8 100644
--- a/sci-mathematics/petsc/metadata.xml
+++ b/sci-mathematics/petsc/metadata.xml
@@ -4,14 +4,12 @@
   <herd>sci-mathematics</herd>
   <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="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">PLEASE FIX MY DESCRIPTION</flag>
     <flag name="scotch">PLEASE FIX MY DESCRIPTION</flag>
-    <!-- Disabled:
-  <flag name="boost">Use boost (dev-libs/boost)</flag>
-	-->
   </use>
 </pkgmetadata>

diff --git a/sci-mathematics/petsc/petsc-3.5.1.ebuild b/sci-mathematics/petsc/petsc-3.5.1.ebuild
new file mode 100644
index 0000000..e4ea76a
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.5.1.ebuild
@@ -0,0 +1,234 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit eutils flag-o-matic fortran-2 toolchain-funcs versionator
+
+MY_P="${PN}-$(replace_version_separator _ -)"
+
+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/${MY_P}.tar.gz"
+
+LICENSE="petsc"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="afterimage boost complex-scalars cxx debug doc fftw
+	fortran hdf5 hypre mpi mumps scotch sparse superlu threads X"
+# Failed: imagemagick metis
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	hdf5? ( mpi )
+	hypre? ( cxx mpi )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	^^ ( hypre superlu )
+"
+#	imagemagick? ( X )
+
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+	afterimage? ( media-libs/libafterimage )
+	boost? ( dev-libs/boost )
+	fftw? ( sci-libs/fftw[mpi?] )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.8.0b[mpi?] )
+	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 )
+	X? ( x11-libs/libX11 )
+"
+#	metis? ( sci-libs/parmetis )
+#	imagemagick? ( media-gfx/imagemagick )
+
+DEPEND="${RDEPEND}
+	virtual/pkgconfig
+	dev-util/cmake
+"
+# cmake is used for parallel building
+# in some configuration setups, legacy build is used (slow)
+
+#
+# PETSc does not want its Makefiles to be invoked with anything higher than
+# -j1. The underlying build system does automatically invoke a parallel
+# build. This might not be what you want, but *hey* not your choice.
+#
+MAKEOPTS="${MAKEOPTS} -j1"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${P%_*}-disable-rpath.patch
+}
+
+src_configure() {
+	# 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"
+	}
+
+	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)
+
+	# run petsc configure script
+	econf \
+		scrollOutput=1 \
+		CFLAGS="${CFLAGS}" \
+		CXXFLAGS="${CXXFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		--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 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=cmake \
+		$(petsc_enable threads pthread) \
+		$(petsc_with afterimage afterimage \
+			/usr/include/libAfterImage -lAfterImage) \
+		$(petsc_with hdf5) \
+		$(petsc_with hypre hypre \
+			/usr/include/hypre -lHYPRE) \
+		$(petsc_with sparse suitesparse) \
+		$(petsc_with superlu superlu \
+			/usr/include/superlu -lsuperlu) \
+		$(petsc_with X x) \
+		$(petsc_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 \
+			/usr/include \
+			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		--with-imagemagick=0 \
+		--with-python=0 \
+		$(petsc_with boost) \
+		$(petsc_with fftw) \
+
+# not yet tested:
+#		python bindings, netcdf, fftw
+
+# failed dependencies, perhaps fixed in upstream soon:
+#		$(petsc_with metis parmetis) \ # needs metis too (>=5.0.2)
+#		$(petsc_with imagemagick imagemagick \
+#			/usr/include/ImageMagick $($(tc-getPKG_CONFIG) --libs MagickCore)) \
+#		$(petsc_enable threads pthreadclasses) \
+}
+
+src_install() {
+	# petsc install structure is very different from
+	# installing headers to /usr/include/petsc and lib to /usr/lib
+	# it also installs many unneeded executables and scripts
+	# so manual install is easier than cleanup after "emake install"
+	insinto /usr/include/${PN}
+	doins include/*.h*
+	insinto /usr/include/${PN}/${PETSC_ARCH}/include
+	doins ${PETSC_ARCH}/include/*
+	if use fortran; then
+		insinto /usr/include/${PN}/finclude
+		doins include/finclude/*.h
+	fi
+	if ! use mpi ; then
+		insinto /usr/include/${PN}/mpiuni
+		doins include/mpiuni/*.h
+	fi
+	insinto /usr/include/${PN}/conf
+	doins conf/{variables,rules,test}
+	insinto /usr/include/${PN}/${PETSC_ARCH}/conf
+	doins ${PETSC_ARCH}/conf/{petscrules,petscvariables,RDict.db}
+	insinto /usr/include/${PN}/petsc-private
+	doins include/petsc-private/*.h
+
+	# fix configuration files: replace "${S}" by installed location
+	sed -i \
+		-e "s:"${S}"::g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/conf/petscvariables || die
+	sed -i \
+		-e "s:usr/lib:usr/$(get_libdir):g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h || die
+
+	# add information about installation directory and
+	# PETSC_ARCH to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_ARCH=${PETSC_ARCH}
+		PETSC_DIR=${EPREFIX}/usr/include/${PN}
+	EOF
+	doenvd 99petsc
+
+	dolib.so ${PETSC_ARCH}/lib/*.so
+
+	if use doc ; then
+		einfo "installing documentation (this could take a while)"
+		dodoc docs/manual.pdf
+		dohtml -r docs/*.html docs/changes docs/manualpages
+	fi
+}
+
+pkg_postinst() {
+	elog "The petsc ebuild is still under development."
+	elog "Help us improve the ebuild in:"
+	elog "http://bugs.gentoo.org/show_bug.cgi?id=53386"
+}


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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2015-03-14  8:21 Justin Lecher
  0 siblings, 0 replies; 19+ messages in thread
From: Justin Lecher @ 2015-03-14  8:21 UTC (permalink / raw
  To: gentoo-commits

commit:     e5b32727b4eb32e49f03c780c8c6005ee42a2843
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 13 13:19:23 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sat Mar 14 08:21:00 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=e5b32727

version bump

Package-Manager: portage-2.2.15

 sci-mathematics/petsc/ChangeLog                    |   8 +-
 .../petsc/files/petsc-3.5.3-disable-rpath.patch    |  18 ++
 sci-mathematics/petsc/petsc-3.5.3.ebuild           | 243 +++++++++++++++++++++
 3 files changed, 268 insertions(+), 1 deletion(-)

diff --git a/sci-mathematics/petsc/ChangeLog b/sci-mathematics/petsc/ChangeLog
index a3aabff..a29efad 100644
--- a/sci-mathematics/petsc/ChangeLog
+++ b/sci-mathematics/petsc/ChangeLog
@@ -1,7 +1,13 @@
 # ChangeLog for sci-mathematics/petsc
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*petsc-3.5.3 (13 Mar 2015)
+
+  13 Mar 2015; Matthias Maier <tamiko@gentoo.org>
+  +files/petsc-3.5.3-disable-rpath.patch, +petsc-3.5.3.ebuild:
+  version bump
+
   16 Sep 2014; Christoph Junghans <ottxor@gentoo.org> petsc-3.4.2.ebuild:
   remove whitespace
 

diff --git a/sci-mathematics/petsc/files/petsc-3.5.3-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.5.3-disable-rpath.patch
new file mode 100644
index 0000000..7fe3760
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-3.5.3-disable-rpath.patch
@@ -0,0 +1,18 @@
+diff --git a/config/BuildSystem/config/setCompilers.py b/config/BuildSystem/config/setCompilers.py
+index 8e0d2ee..ce53ad0 100644
+--- a/config/BuildSystem/config/setCompilers.py
++++ b/config/BuildSystem/config/setCompilers.py
+@@ -1326,12 +1326,7 @@ class Configure(config.base.Configure):
+     for language in languages:
+       flag = '-L'
+       self.pushLanguage(language)
+-      # test '-R' before '-rpath' as sun compilers [c,fortran] don't give proper errors with wrong options.
+-      if not Configure.isDarwin():
+-        testFlags = ['-Wl,-rpath,', '-R','-rpath ' , '-Wl,-R,']
+-      else:
+-        testFlags = []
+-      # test '-R' before '-Wl,-rpath' for SUN compilers [as cc on linux accepts -Wl,-rpath, but  f90 & CC do not.
++      testFlags = []
+       if self.isSun(self.framework.getCompiler()):
+         testFlags.insert(0,'-R')
+       for testFlag in testFlags:

diff --git a/sci-mathematics/petsc/petsc-3.5.3.ebuild b/sci-mathematics/petsc/petsc-3.5.3.ebuild
new file mode 100644
index 0000000..09e5bfb
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.5.3.ebuild
@@ -0,0 +1,243 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic fortran-2 python-any-r1 toolchain-funcs versionator
+
+MY_P="${PN}-$(replace_version_separator _ -)"
+
+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/${MY_P}.tar.gz"
+
+LICENSE="petsc"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="afterimage boost complex-scalars cxx debug doc fftw
+	fortran hdf5 hypre mpi mumps scotch sparse superlu threads X"
+# Failed: imagemagick metis
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	hdf5? ( mpi )
+	hypre? ( cxx mpi )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	^^ ( hypre superlu )
+"
+#	imagemagick? ( X )
+
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+	afterimage? ( media-libs/libafterimage )
+	boost? ( dev-libs/boost )
+	fftw? ( sci-libs/fftw[mpi?] )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.8.0b[mpi?] )
+	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 )
+	X? ( x11-libs/libX11 )
+"
+#	metis? ( sci-libs/parmetis )
+#	imagemagick? ( media-gfx/imagemagick )
+
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	virtual/pkgconfig
+	dev-util/cmake
+"
+# cmake is used for parallel building
+# in some configuration setups, legacy build is used (slow)
+
+#
+# PETSc does not want its Makefiles to be invoked with anything higher than
+# -j1. The underlying build system does automatically invoke a parallel
+# build. This might not be what you want, but *hey* not your choice.
+#
+MAKEOPTS="${MAKEOPTS} -j1"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${P%_*}-disable-rpath.patch
+	sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die
+}
+
+src_configure() {
+	# 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"
+	}
+
+	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)
+
+	# run petsc configure script
+	econf \
+		scrollOutput=1 \
+		CFLAGS="${CFLAGS}" \
+		CXXFLAGS="${CXXFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		--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 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=cmake \
+		$(petsc_enable threads pthread) \
+		$(petsc_with afterimage afterimage \
+			/usr/include/libAfterImage -lAfterImage) \
+		$(petsc_with hdf5) \
+		$(petsc_with hypre hypre \
+			/usr/include/hypre -lHYPRE) \
+		$(petsc_with sparse suitesparse) \
+		$(petsc_with superlu superlu \
+			/usr/include/superlu -lsuperlu) \
+		$(petsc_with X x) \
+		$(petsc_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 \
+			/usr/include \
+			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		--with-imagemagick=0 \
+		--with-python=0 \
+		$(petsc_with boost) \
+		$(petsc_with fftw)
+
+# not yet tested:
+#		python bindings, netcdf, fftw
+
+# failed dependencies, perhaps fixed in upstream soon:
+#		$(petsc_with metis parmetis) \ # needs metis too (>=5.0.2)
+#		$(petsc_with imagemagick imagemagick \
+#			/usr/include/ImageMagick $($(tc-getPKG_CONFIG) --libs MagickCore)) \
+#		$(petsc_enable threads pthreadclasses) \
+}
+
+src_install() {
+	# petsc install structure is very different from
+	# installing headers to /usr/include/petsc and lib to /usr/lib
+	# it also installs many unneeded executables and scripts
+	# so manual install is easier than cleanup after "emake install"
+	insinto /usr/include/${PN}
+	doins include/*.h*
+	insinto /usr/include/${PN}/${PETSC_ARCH}/include
+	doins ${PETSC_ARCH}/include/*
+	if use fortran; then
+		insinto /usr/include/${PN}/finclude
+		doins -r include/finclude/*
+	fi
+	if ! use mpi ; then
+		insinto /usr/include/${PN}/mpiuni
+		doins include/mpiuni/*.h
+	fi
+	insinto /usr/include/${PN}/conf
+	doins conf/{variables,rules,test}
+	insinto /usr/include/${PN}/${PETSC_ARCH}/conf
+	doins ${PETSC_ARCH}/conf/{petscrules,petscvariables,RDict.db}
+	insinto /usr/include/${PN}/petsc-private
+	doins include/petsc-private/*.h
+
+	# fix configuration files: replace "${S}" by installed location
+	sed -i \
+		-e "s:"${S}"::g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/conf/petscvariables || die
+	sed -i \
+		-e "s:-I/include:-I${EPREFIX}/usr/include/${PN}:g" \
+		-e "s:-I/linux-gnu-cxx-opt/include:-I${EPREFIX}/usr/include/${PN}/${PETSC_ARCH}/include/:g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/conf/petscvariables || die
+	sed -i \
+		-e "s:usr/lib:usr/$(get_libdir):g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h || die
+
+	# add information about installation directory and
+	# PETSC_ARCH to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_ARCH=${PETSC_ARCH}
+		PETSC_DIR=${EPREFIX}/usr/include/${PN}
+	EOF
+	doenvd 99petsc
+
+	dolib.so ${PETSC_ARCH}/lib/*.so
+	dolib.so ${PETSC_ARCH}/lib/*.so.*
+
+	if use doc ; then
+		einfo "installing documentation (this could take a while)"
+		dodoc docs/manual.pdf
+		dohtml -r docs/*.html docs/changes docs/manualpages
+	fi
+}
+
+pkg_postinst() {
+	elog "The petsc ebuild is still under development."
+	elog "Help us improve the ebuild in:"
+	elog "http://bugs.gentoo.org/show_bug.cgi?id=53386"
+}


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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2015-03-14  8:21 Justin Lecher
  0 siblings, 0 replies; 19+ messages in thread
From: Justin Lecher @ 2015-03-14  8:21 UTC (permalink / raw
  To: gentoo-commits

commit:     ccf847720716a390cbe79d4b06b60113d9748774
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 13 13:19:23 2015 +0000
Commit:     Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Fri Mar 13 13:19:23 2015 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=ccf84772

version bump

Package-Manager: portage-2.2.15

 sci-mathematics/petsc/ChangeLog                    |   8 +-
 .../petsc/files/petsc-3.5.3-disable-rpath.patch    |  18 ++
 sci-mathematics/petsc/petsc-3.5.3.ebuild           | 243 +++++++++++++++++++++
 3 files changed, 268 insertions(+), 1 deletion(-)

diff --git a/sci-mathematics/petsc/ChangeLog b/sci-mathematics/petsc/ChangeLog
index a3aabff..a29efad 100644
--- a/sci-mathematics/petsc/ChangeLog
+++ b/sci-mathematics/petsc/ChangeLog
@@ -1,7 +1,13 @@
 # ChangeLog for sci-mathematics/petsc
-# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
 # $Header: $
 
+*petsc-3.5.3 (13 Mar 2015)
+
+  13 Mar 2015; Matthias Maier <tamiko@gentoo.org>
+  +files/petsc-3.5.3-disable-rpath.patch, +petsc-3.5.3.ebuild:
+  version bump
+
   16 Sep 2014; Christoph Junghans <ottxor@gentoo.org> petsc-3.4.2.ebuild:
   remove whitespace
 

diff --git a/sci-mathematics/petsc/files/petsc-3.5.3-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.5.3-disable-rpath.patch
new file mode 100644
index 0000000..7fe3760
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-3.5.3-disable-rpath.patch
@@ -0,0 +1,18 @@
+diff --git a/config/BuildSystem/config/setCompilers.py b/config/BuildSystem/config/setCompilers.py
+index 8e0d2ee..ce53ad0 100644
+--- a/config/BuildSystem/config/setCompilers.py
++++ b/config/BuildSystem/config/setCompilers.py
+@@ -1326,12 +1326,7 @@ class Configure(config.base.Configure):
+     for language in languages:
+       flag = '-L'
+       self.pushLanguage(language)
+-      # test '-R' before '-rpath' as sun compilers [c,fortran] don't give proper errors with wrong options.
+-      if not Configure.isDarwin():
+-        testFlags = ['-Wl,-rpath,', '-R','-rpath ' , '-Wl,-R,']
+-      else:
+-        testFlags = []
+-      # test '-R' before '-Wl,-rpath' for SUN compilers [as cc on linux accepts -Wl,-rpath, but  f90 & CC do not.
++      testFlags = []
+       if self.isSun(self.framework.getCompiler()):
+         testFlags.insert(0,'-R')
+       for testFlag in testFlags:

diff --git a/sci-mathematics/petsc/petsc-3.5.3.ebuild b/sci-mathematics/petsc/petsc-3.5.3.ebuild
new file mode 100644
index 0000000..09e5bfb
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.5.3.ebuild
@@ -0,0 +1,243 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic fortran-2 python-any-r1 toolchain-funcs versionator
+
+MY_P="${PN}-$(replace_version_separator _ -)"
+
+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/${MY_P}.tar.gz"
+
+LICENSE="petsc"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="afterimage boost complex-scalars cxx debug doc fftw
+	fortran hdf5 hypre mpi mumps scotch sparse superlu threads X"
+# Failed: imagemagick metis
+
+# hypre and superlu curretly exclude each other due to missing linking to hypre
+# if both are enabled
+REQUIRED_USE="
+	afterimage? ( X )
+	hdf5? ( mpi )
+	hypre? ( cxx mpi )
+	mumps? ( mpi scotch )
+	scotch? ( mpi )
+	^^ ( hypre superlu )
+"
+#	imagemagick? ( X )
+
+RDEPEND="
+	virtual/blas
+	virtual/lapack
+	afterimage? ( media-libs/libafterimage )
+	boost? ( dev-libs/boost )
+	fftw? ( sci-libs/fftw[mpi?] )
+	hdf5? ( sci-libs/hdf5[mpi?] )
+	hypre? ( >=sci-libs/hypre-2.8.0b[mpi?] )
+	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 )
+	X? ( x11-libs/libX11 )
+"
+#	metis? ( sci-libs/parmetis )
+#	imagemagick? ( media-gfx/imagemagick )
+
+DEPEND="${RDEPEND}
+	${PYTHON_DEPS}
+	virtual/pkgconfig
+	dev-util/cmake
+"
+# cmake is used for parallel building
+# in some configuration setups, legacy build is used (slow)
+
+#
+# PETSc does not want its Makefiles to be invoked with anything higher than
+# -j1. The underlying build system does automatically invoke a parallel
+# build. This might not be what you want, but *hey* not your choice.
+#
+MAKEOPTS="${MAKEOPTS} -j1"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${P%_*}-disable-rpath.patch
+	sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die
+}
+
+src_configure() {
+	# 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"
+	}
+
+	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)
+
+	# run petsc configure script
+	econf \
+		scrollOutput=1 \
+		CFLAGS="${CFLAGS}" \
+		CXXFLAGS="${CXXFLAGS}" \
+		LDFLAGS="${LDFLAGS}" \
+		--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 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=cmake \
+		$(petsc_enable threads pthread) \
+		$(petsc_with afterimage afterimage \
+			/usr/include/libAfterImage -lAfterImage) \
+		$(petsc_with hdf5) \
+		$(petsc_with hypre hypre \
+			/usr/include/hypre -lHYPRE) \
+		$(petsc_with sparse suitesparse) \
+		$(petsc_with superlu superlu \
+			/usr/include/superlu -lsuperlu) \
+		$(petsc_with X x) \
+		$(petsc_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 \
+			/usr/include \
+			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		--with-imagemagick=0 \
+		--with-python=0 \
+		$(petsc_with boost) \
+		$(petsc_with fftw)
+
+# not yet tested:
+#		python bindings, netcdf, fftw
+
+# failed dependencies, perhaps fixed in upstream soon:
+#		$(petsc_with metis parmetis) \ # needs metis too (>=5.0.2)
+#		$(petsc_with imagemagick imagemagick \
+#			/usr/include/ImageMagick $($(tc-getPKG_CONFIG) --libs MagickCore)) \
+#		$(petsc_enable threads pthreadclasses) \
+}
+
+src_install() {
+	# petsc install structure is very different from
+	# installing headers to /usr/include/petsc and lib to /usr/lib
+	# it also installs many unneeded executables and scripts
+	# so manual install is easier than cleanup after "emake install"
+	insinto /usr/include/${PN}
+	doins include/*.h*
+	insinto /usr/include/${PN}/${PETSC_ARCH}/include
+	doins ${PETSC_ARCH}/include/*
+	if use fortran; then
+		insinto /usr/include/${PN}/finclude
+		doins -r include/finclude/*
+	fi
+	if ! use mpi ; then
+		insinto /usr/include/${PN}/mpiuni
+		doins include/mpiuni/*.h
+	fi
+	insinto /usr/include/${PN}/conf
+	doins conf/{variables,rules,test}
+	insinto /usr/include/${PN}/${PETSC_ARCH}/conf
+	doins ${PETSC_ARCH}/conf/{petscrules,petscvariables,RDict.db}
+	insinto /usr/include/${PN}/petsc-private
+	doins include/petsc-private/*.h
+
+	# fix configuration files: replace "${S}" by installed location
+	sed -i \
+		-e "s:"${S}"::g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/conf/petscvariables || die
+	sed -i \
+		-e "s:-I/include:-I${EPREFIX}/usr/include/${PN}:g" \
+		-e "s:-I/linux-gnu-cxx-opt/include:-I${EPREFIX}/usr/include/${PN}/${PETSC_ARCH}/include/:g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/conf/petscvariables || die
+	sed -i \
+		-e "s:usr/lib:usr/$(get_libdir):g" \
+		"${ED}"/usr/include/${PN}/${PETSC_ARCH}/include/petscconf.h || die
+
+	# add information about installation directory and
+	# PETSC_ARCH to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_ARCH=${PETSC_ARCH}
+		PETSC_DIR=${EPREFIX}/usr/include/${PN}
+	EOF
+	doenvd 99petsc
+
+	dolib.so ${PETSC_ARCH}/lib/*.so
+	dolib.so ${PETSC_ARCH}/lib/*.so.*
+
+	if use doc ; then
+		einfo "installing documentation (this could take a while)"
+		dodoc docs/manual.pdf
+		dohtml -r docs/*.html docs/changes docs/manualpages
+	fi
+}
+
+pkg_postinst() {
+	elog "The petsc ebuild is still under development."
+	elog "Help us improve the ebuild in:"
+	elog "http://bugs.gentoo.org/show_bug.cgi?id=53386"
+}


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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2018-04-23  1:21 Matthias Maier
  0 siblings, 0 replies; 19+ messages in thread
From: Matthias Maier @ 2018-04-23  1:21 UTC (permalink / raw
  To: gentoo-commits

commit:     5cef376ca642f43faa2462e0553b0d6e0384de9e
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 23 00:30:26 2018 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Mon Apr 23 00:30:26 2018 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=5cef376c

sci-mathematics/petsc: vesrion bump to 3.9.0

Package-Manager: Portage-2.3.31, Repoman-2.3.9

 .../files/petsc-3.9.0-fix_sandbox_violation.patch  |  17 ++
 sci-mathematics/petsc/petsc-3.9.0.ebuild           | 205 +++++++++++++++++++++
 2 files changed, 222 insertions(+)

diff --git a/sci-mathematics/petsc/files/petsc-3.9.0-fix_sandbox_violation.patch b/sci-mathematics/petsc/files/petsc-3.9.0-fix_sandbox_violation.patch
new file mode 100644
index 000000000..97f8dfed4
--- /dev/null
+++ b/sci-mathematics/petsc/files/petsc-3.9.0-fix_sandbox_violation.patch
@@ -0,0 +1,17 @@
+diff --git a/config/PETSc/options/installDir.py b/config/PETSc/options/installDir.py
+index 92f190d..047c85b 100644
+--- a/config/PETSc/options/installDir.py
++++ b/config/PETSc/options/installDir.py
+@@ -41,12 +41,6 @@ class Configure(config.base.Configure):
+       self.dir = os.path.abspath(os.path.expanduser(self.framework.argDB['prefix']))
+       self.petscDir = self.dir
+       self.petscArch = ''
+-      try:
+-        os.makedirs(os.path.join(self.dir,'PETScTestDirectory'))
+-        os.rmdir(os.path.join(self.dir,'PETScTestDirectory'))
+-      except:
+-        self.installSudoMessage = 'You do not have write permissions to the --prefix directory '+self.dir+'\nYou will be prompted for the sudo password for any external package installs'
+-        self.installSudo = 'sudo '
+     else:
+       self.dir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
+       self.petscDir = self.petscdir.dir

diff --git a/sci-mathematics/petsc/petsc-3.9.0.ebuild b/sci-mathematics/petsc/petsc-3.9.0.ebuild
new file mode 100644
index 000000000..37def4450
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.9.0.ebuild
@@ -0,0 +1,205 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils flag-o-matic fortran-2 python-any-r1 toolchain-funcs versionator
+
+MY_P="${PN}-$(replace_version_separator _ -)"
+
+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/${MY_P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+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.8.0b[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
+"
+
+#
+# PETSc does not want its Makefiles to be invoked with anything higher than
+# -j1. The underlying build system does automatically invoke a parallel
+# build. This might not be what you want, but *hey* not your choice.
+#
+# V=1 enables verbose output with full compiler and linker invocation
+#
+MAKEOPTS="${MAKEOPTS} -j1 V=1"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch \
+	"${FILESDIR}"/${PN}-3.9.0-fix_sandbox_violation.patch
+)
+
+src_prepare() {
+	default
+
+	sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die
+}
+
+# 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 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=cmake \
+		$(petsc_enable threads pthread) \
+		$(petsc_with afterimage afterimage \
+			/usr/include/libAfterImage -lAfterImage) \
+		$(petsc_with hdf5) \
+		$(petsc_with hypre hypre \
+			/usr/include/hypre -lHYPRE) \
+		$(petsc_with sparse suitesparse) \
+		$(petsc_with superlu superlu \
+			/usr/include/superlu -lsuperlu) \
+		$(petsc_with X x) \
+		$(petsc_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 \
+			/usr/include \
+			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
+		--with-imagemagick=0 \
+		--with-python=0 \
+		$(petsc_with boost) \
+		$(petsc_with fftw)
+}
+
+src_install() {
+	emake DESTDIR="${D}/usr/$(get_libdir)/petsc" install
+
+	# add PETSC_DIR to environmental variables
+	cat >> 99petsc <<- EOF
+		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
+	EOF
+	doenvd 99petsc
+
+	if use doc ; then
+		dodoc docs/developers.pdf docs/manual.pdf
+		dohtml -r docs/*.html docs/changes docs/manualpages
+	fi
+}


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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2018-08-31 15:39 Matthias Maier
  0 siblings, 0 replies; 19+ messages in thread
From: Matthias Maier @ 2018-08-31 15:39 UTC (permalink / raw
  To: gentoo-commits

commit:     7942c05fe297d82b7f4a1e81282aaa9b3bfb406a
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 31 03:25:26 2018 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Fri Aug 31 03:25:26 2018 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=7942c05f

sci-mathematics/petsc: remove obsolete patches

Package-Manager: Portage-2.3.48, Repoman-2.3.10

 .../petsc/files/petsc-3.5.3-disable-rpath.patch    |  18 --
 .../petsc/files/petsc-3.6.0-disable-rpath.patch    |  17 --
 .../files/petsc-3.6.0-fix_sandbox_violation.patch  |  15 --
 .../files/petsc-3.7.0-fix_sandbox_violation.patch  |  17 --
 sci-mathematics/petsc/petsc-3.7.7-r1.ebuild        | 205 ---------------------
 5 files changed, 272 deletions(-)

diff --git a/sci-mathematics/petsc/files/petsc-3.5.3-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.5.3-disable-rpath.patch
deleted file mode 100644
index 7fe3760c9..000000000
--- a/sci-mathematics/petsc/files/petsc-3.5.3-disable-rpath.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/config/BuildSystem/config/setCompilers.py b/config/BuildSystem/config/setCompilers.py
-index 8e0d2ee..ce53ad0 100644
---- a/config/BuildSystem/config/setCompilers.py
-+++ b/config/BuildSystem/config/setCompilers.py
-@@ -1326,12 +1326,7 @@ class Configure(config.base.Configure):
-     for language in languages:
-       flag = '-L'
-       self.pushLanguage(language)
--      # test '-R' before '-rpath' as sun compilers [c,fortran] don't give proper errors with wrong options.
--      if not Configure.isDarwin():
--        testFlags = ['-Wl,-rpath,', '-R','-rpath ' , '-Wl,-R,']
--      else:
--        testFlags = []
--      # test '-R' before '-Wl,-rpath' for SUN compilers [as cc on linux accepts -Wl,-rpath, but  f90 & CC do not.
-+      testFlags = []
-       if self.isSun(self.framework.getCompiler()):
-         testFlags.insert(0,'-R')
-       for testFlag in testFlags:

diff --git a/sci-mathematics/petsc/files/petsc-3.6.0-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.6.0-disable-rpath.patch
deleted file mode 100644
index 88a7db565..000000000
--- a/sci-mathematics/petsc/files/petsc-3.6.0-disable-rpath.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/config/BuildSystem/config/setCompilers.py b/config/BuildSystem/config/setCompilers.py
---- a/config/BuildSystem/config/setCompilers.py
-+++ b/config/BuildSystem/config/setCompilers.py
-@@ -1326,12 +1326,7 @@ class Configure(config.base.Configure):
-     for language in languages:
-       flag = '-L'
-       self.pushLanguage(language)
--      # test '-R' before '-rpath' as sun compilers [c,fortran] don't give proper errors with wrong options.
--      if not Configure.isDarwin():
--        testFlags = ['-Wl,-rpath,', '-R','-rpath ' , '-Wl,-R,']
--      else:
--        testFlags = ['-Wl,-rpath,']
--      # test '-R' before '-Wl,-rpath' for SUN compilers [as cc on linux accepts -Wl,-rpath, but  f90 & CC do not.
-+      testFlags = []
-       if self.isSun(self.framework.getCompiler()):
-         testFlags.insert(0,'-R')
-       for testFlag in testFlags:

diff --git a/sci-mathematics/petsc/files/petsc-3.6.0-fix_sandbox_violation.patch b/sci-mathematics/petsc/files/petsc-3.6.0-fix_sandbox_violation.patch
deleted file mode 100644
index 7510631a1..000000000
--- a/sci-mathematics/petsc/files/petsc-3.6.0-fix_sandbox_violation.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- config/PETSc/options/installDir.py.orig	2015-06-23 18:11:25.054911894 +0200
-+++ config/PETSc/options/installDir.py	2015-06-23 18:11:44.100289841 +0200
-@@ -38,12 +38,6 @@
-     self.installSudoMessage = ''
-     if self.framework.argDB['prefix']:
-       self.dir = self.framework.argDB['prefix']
--      try:
--        os.makedirs(os.path.join(self.dir,'PETScTestDirectory'))
--        os.rmdir(os.path.join(self.dir,'PETScTestDirectory'))
--      except:
--        self.installSudoMessage = 'You do not have write permissions to the --prefix directory '+self.dir+'\nYou will be prompted for the sudo password for any external package installs'
--        self.installSudo = 'sudo '
-     else:
-       self.dir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
-     self.confDir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))

diff --git a/sci-mathematics/petsc/files/petsc-3.7.0-fix_sandbox_violation.patch b/sci-mathematics/petsc/files/petsc-3.7.0-fix_sandbox_violation.patch
deleted file mode 100644
index 191ca18c4..000000000
--- a/sci-mathematics/petsc/files/petsc-3.7.0-fix_sandbox_violation.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/config/PETSc/options/installDir.py b/config/PETSc/options/installDir.py
-index 0e2567c..bf782b5 100644
---- a/config/PETSc/options/installDir.py
-+++ b/config/PETSc/options/installDir.py
-@@ -38,12 +38,6 @@ class Configure(config.base.Configure):
-     self.installSudoMessage = ''
-     if self.framework.argDB['prefix']:
-       self.dir = os.path.abspath(os.path.expanduser(self.framework.argDB['prefix']))
--      try:
--        os.makedirs(os.path.join(self.dir,'PETScTestDirectory'))
--        os.rmdir(os.path.join(self.dir,'PETScTestDirectory'))
--      except:
--        self.installSudoMessage = 'You do not have write permissions to the --prefix directory '+self.dir+'\nYou will be prompted for the sudo password for any external package installs'
--        self.installSudo = 'sudo '
-     else:
-       self.dir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
-     self.confDir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))

diff --git a/sci-mathematics/petsc/petsc-3.7.7-r1.ebuild b/sci-mathematics/petsc/petsc-3.7.7-r1.ebuild
deleted file mode 100644
index ddd6202e0..000000000
--- a/sci-mathematics/petsc/petsc-3.7.7-r1.ebuild
+++ /dev/null
@@ -1,205 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils flag-o-matic fortran-2 python-any-r1 toolchain-funcs versionator
-
-MY_P="${PN}-$(replace_version_separator _ -)"
-
-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/${MY_P}.tar.gz"
-
-LICENSE="BSD-2"
-SLOT="0"
-KEYWORDS="~x86 ~amd64"
-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.8.0b[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
-"
-
-#
-# PETSc does not want its Makefiles to be invoked with anything higher than
-# -j1. The underlying build system does automatically invoke a parallel
-# build. This might not be what you want, but *hey* not your choice.
-#
-# V=1 enables verbose output with full compiler and linker invocation
-#
-MAKEOPTS="${MAKEOPTS} -j1 V=1"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch \
-	"${FILESDIR}"/${PN}-3.7.0-fix_sandbox_violation.patch
-)
-
-src_prepare() {
-	default
-
-	sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die
-}
-
-# 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 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=cmake \
-		$(petsc_enable threads pthread) \
-		$(petsc_with afterimage afterimage \
-			/usr/include/libAfterImage -lAfterImage) \
-		$(petsc_with hdf5) \
-		$(petsc_with hypre hypre \
-			/usr/include/hypre -lHYPRE) \
-		$(petsc_with sparse suitesparse) \
-		$(petsc_with superlu superlu \
-			/usr/include/superlu -lsuperlu) \
-		$(petsc_with X x) \
-		$(petsc_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 \
-			/usr/include \
-			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
-		--with-imagemagick=0 \
-		--with-python=0 \
-		$(petsc_with boost) \
-		$(petsc_with fftw)
-}
-
-src_install() {
-	emake DESTDIR="${D}/usr/$(get_libdir)/petsc" install
-
-	# add PETSC_DIR to environmental variables
-	cat >> 99petsc <<- EOF
-		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
-	EOF
-	doenvd 99petsc
-
-	if use doc ; then
-		dodoc docs/developers.pdf docs/manual.pdf
-		dohtml -r docs/*.html docs/changes docs/manualpages
-	fi
-}


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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2019-07-12 11:19 Matthias Maier
  0 siblings, 0 replies; 19+ messages in thread
From: Matthias Maier @ 2019-07-12 11:19 UTC (permalink / raw
  To: gentoo-commits

commit:     fd85a467bb08d7e711568fd09cc890755878ba62
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Fri Jul 12 10:56:29 2019 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Fri Jul 12 10:56:29 2019 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=fd85a467

sci-mathematics/petsc: drop old

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

 .../files/petsc-3.8.3-fix_sandbox_violation.patch  |  17 --
 sci-mathematics/petsc/petsc-3.8.4.ebuild           | 205 ---------------------
 sci-mathematics/petsc/petsc-3.9.4.ebuild           | 196 --------------------
 3 files changed, 418 deletions(-)

diff --git a/sci-mathematics/petsc/files/petsc-3.8.3-fix_sandbox_violation.patch b/sci-mathematics/petsc/files/petsc-3.8.3-fix_sandbox_violation.patch
deleted file mode 100644
index 4f51aee81..000000000
--- a/sci-mathematics/petsc/files/petsc-3.8.3-fix_sandbox_violation.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/config/PETSc/options/installDir.py b/config/PETSc/options/installDir.py
-index 975dc8a..c216941 100644
---- a/config/PETSc/options/installDir.py
-+++ b/config/PETSc/options/installDir.py
-@@ -39,12 +39,6 @@ class Configure(config.base.Configure):
-     if self.framework.argDB['prefix']:
-       self.dir = os.path.abspath(os.path.expanduser(self.framework.argDB['prefix']))
-       self.addMakeMacro('PREFIXDIR',self.dir)
--      try:
--        os.makedirs(os.path.join(self.dir,'PETScTestDirectory'))
--        os.rmdir(os.path.join(self.dir,'PETScTestDirectory'))
--      except:
--        self.installSudoMessage = 'You do not have write permissions to the --prefix directory '+self.dir+'\nYou will be prompted for the sudo password for any external package installs'
--        self.installSudo = 'sudo '
-     else:
-       self.dir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
-     self.confDir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))

diff --git a/sci-mathematics/petsc/petsc-3.8.4.ebuild b/sci-mathematics/petsc/petsc-3.8.4.ebuild
deleted file mode 100644
index c47619aaf..000000000
--- a/sci-mathematics/petsc/petsc-3.8.4.ebuild
+++ /dev/null
@@ -1,205 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils flag-o-matic fortran-2 python-any-r1 toolchain-funcs versionator
-
-MY_P="${PN}-$(replace_version_separator _ -)"
-
-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/${MY_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.8.0b[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
-"
-
-#
-# PETSc does not want its Makefiles to be invoked with anything higher than
-# -j1. The underlying build system does automatically invoke a parallel
-# build. This might not be what you want, but *hey* not your choice.
-#
-# V=1 enables verbose output with full compiler and linker invocation
-#
-MAKEOPTS="${MAKEOPTS} -j1 V=1"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch \
-	"${FILESDIR}"/${PN}-3.8.3-fix_sandbox_violation.patch
-)
-
-src_prepare() {
-	default
-
-	sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die
-}
-
-# 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 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=cmake \
-		$(petsc_enable threads pthread) \
-		$(petsc_with afterimage afterimage \
-			/usr/include/libAfterImage -lAfterImage) \
-		$(petsc_with hdf5) \
-		$(petsc_with hypre hypre \
-			/usr/include/hypre -lHYPRE) \
-		$(petsc_with sparse suitesparse) \
-		$(petsc_with superlu superlu \
-			/usr/include/superlu -lsuperlu) \
-		$(petsc_with X x) \
-		$(petsc_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 \
-			/usr/include \
-			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
-		--with-imagemagick=0 \
-		--with-python=0 \
-		$(petsc_with boost) \
-		$(petsc_with fftw)
-}
-
-src_install() {
-	emake DESTDIR="${D}/usr/$(get_libdir)/petsc" install
-
-	# add PETSC_DIR to environmental variables
-	cat >> 99petsc <<- EOF
-		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
-	EOF
-	doenvd 99petsc
-
-	if use doc ; then
-		dodoc docs/developers.pdf docs/manual.pdf
-		dohtml -r docs/*.html docs/changes docs/manualpages
-	fi
-}

diff --git a/sci-mathematics/petsc/petsc-3.9.4.ebuild b/sci-mathematics/petsc/petsc-3.9.4.ebuild
deleted file mode 100644
index b67536ef6..000000000
--- a/sci-mathematics/petsc/petsc-3.9.4.ebuild
+++ /dev/null
@@ -1,196 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils flag-o-matic fortran-2 python-any-r1 toolchain-funcs versionator
-
-MY_P="${PN}-$(replace_version_separator _ -)"
-
-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/${MY_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.8.0b[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
-"
-
-S="${WORKDIR}/${MY_P}"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-3.7.0-disable-rpath.patch \
-	"${FILESDIR}"/${PN}-3.9.0-fix_sandbox_violation.patch
-)
-
-src_prepare() {
-	default
-
-	sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die
-}
-
-# 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 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=cmake \
-		$(petsc_enable threads pthread) \
-		$(petsc_with afterimage afterimage \
-			/usr/include/libAfterImage -lAfterImage) \
-		$(petsc_with hdf5) \
-		$(petsc_with hypre hypre \
-			/usr/include/hypre -lHYPRE) \
-		$(petsc_with sparse suitesparse) \
-		$(petsc_with superlu superlu \
-			/usr/include/superlu -lsuperlu) \
-		$(petsc_with X x) \
-		$(petsc_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 \
-			/usr/include \
-			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
-		--with-imagemagick=0 \
-		--with-python=0 \
-		$(petsc_with boost) \
-		$(petsc_with fftw)
-}
-
-src_install() {
-	emake DESTDIR="${ED}" install
-
-	# add PETSC_DIR to environmental variables
-	cat >> 99petsc <<- EOF
-		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
-	EOF
-	doenvd 99petsc
-
-	if use doc ; then
-		dodoc docs/developers.pdf docs/manual.pdf
-		dohtml -r docs/*.html docs/changes docs/manualpages
-	fi
-}


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

* [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/
@ 2019-08-05  6:52 Matthias Maier
  0 siblings, 0 replies; 19+ messages in thread
From: Matthias Maier @ 2019-08-05  6:52 UTC (permalink / raw
  To: gentoo-commits

commit:     56534d2726843525afa4f90024a8ba51c5c66383
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Mon Aug  5 06:46:08 2019 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Mon Aug  5 06:46:08 2019 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=56534d27

sci-mathematics/petsc: merge into ::gentoo and remove from overlay.

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

 .../petsc/files/petsc-3.7.0-disable-rpath.patch    |  18 --
 .../files/petsc-3.9.0-fix_sandbox_violation.patch  |  17 --
 sci-mathematics/petsc/metadata.xml                 |  23 ---
 sci-mathematics/petsc/petsc-3.10.0.ebuild          | 192 ---------------------
 sci-mathematics/petsc/petsc-3.10.4.ebuild          | 192 ---------------------
 sci-mathematics/petsc/petsc-3.11.1.ebuild          | 191 --------------------
 sci-mathematics/petsc/petsc-3.11.3.ebuild          | 191 --------------------
 7 files changed, 824 deletions(-)

diff --git a/sci-mathematics/petsc/files/petsc-3.7.0-disable-rpath.patch b/sci-mathematics/petsc/files/petsc-3.7.0-disable-rpath.patch
deleted file mode 100644
index 8d0d99330..000000000
--- a/sci-mathematics/petsc/files/petsc-3.7.0-disable-rpath.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/config/BuildSystem/config/setCompilers.py b/config/BuildSystem/config/setCompilers.py
-index 219a35b..ad2ed8c 100644
---- a/config/BuildSystem/config/setCompilers.py
-+++ b/config/BuildSystem/config/setCompilers.py
-@@ -1385,12 +1385,7 @@ class Configure(config.base.Configure):
-     for language in languages:
-       flag = '-L'
-       self.pushLanguage(language)
--      # test '-R' before '-rpath' as sun compilers [c,fortran] don't give proper errors with wrong options.
--      if not Configure.isDarwin(self.log):
--        testFlags = ['-Wl,-rpath,', '-R','-rpath ' , '-Wl,-R,']
--      else:
--        testFlags = ['-Wl,-rpath,']
--      # test '-R' before '-Wl,-rpath' for SUN compilers [as cc on linux accepts -Wl,-rpath, but  f90 & CC do not.
-+      testFlags = []
-       if self.isSun(self.framework.getCompiler(), self.log):
-         testFlags.insert(0,'-R')
-       for testFlag in testFlags:

diff --git a/sci-mathematics/petsc/files/petsc-3.9.0-fix_sandbox_violation.patch b/sci-mathematics/petsc/files/petsc-3.9.0-fix_sandbox_violation.patch
deleted file mode 100644
index 97f8dfed4..000000000
--- a/sci-mathematics/petsc/files/petsc-3.9.0-fix_sandbox_violation.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/config/PETSc/options/installDir.py b/config/PETSc/options/installDir.py
-index 92f190d..047c85b 100644
---- a/config/PETSc/options/installDir.py
-+++ b/config/PETSc/options/installDir.py
-@@ -41,12 +41,6 @@ class Configure(config.base.Configure):
-       self.dir = os.path.abspath(os.path.expanduser(self.framework.argDB['prefix']))
-       self.petscDir = self.dir
-       self.petscArch = ''
--      try:
--        os.makedirs(os.path.join(self.dir,'PETScTestDirectory'))
--        os.rmdir(os.path.join(self.dir,'PETScTestDirectory'))
--      except:
--        self.installSudoMessage = 'You do not have write permissions to the --prefix directory '+self.dir+'\nYou will be prompted for the sudo password for any external package installs'
--        self.installSudo = 'sudo '
-     else:
-       self.dir = os.path.abspath(os.path.join(self.petscdir.dir, self.arch.arch))
-       self.petscDir = self.petscdir.dir

diff --git a/sci-mathematics/petsc/metadata.xml b/sci-mathematics/petsc/metadata.xml
deleted file mode 100644
index 8c9c01d83..000000000
--- a/sci-mathematics/petsc/metadata.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
-	<maintainer type="person">
-		<email>tamiko@gentoo.org</email>
-		<name>Matthias Maier</name>
-	</maintainer>
-	<maintainer type="project">
-		<email>sci-mathematics@gentoo.org</email>
-		<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="hypre">Use HYPRE (sci-mathematics/hypre) and for preconditioning</flag>
-		<flag name="complex-scalars">Make scalars complex</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>
-	</use>
-</pkgmetadata>

diff --git a/sci-mathematics/petsc/petsc-3.10.0.ebuild b/sci-mathematics/petsc/petsc-3.10.0.ebuild
deleted file mode 100644
index 80dfd5255..000000000
--- a/sci-mathematics/petsc/petsc-3.10.0.ebuild
+++ /dev/null
@@ -1,192 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-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.8.0b[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.9.0-fix_sandbox_violation.patch
-)
-
-src_prepare() {
-	default
-
-	sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die
-}
-
-# 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) \
-		$(petsc_with hdf5) \
-		$(petsc_with hypre hypre \
-			/usr/include/hypre -lHYPRE) \
-		$(petsc_with sparse suitesparse) \
-		$(petsc_with superlu superlu \
-			/usr/include/superlu -lsuperlu) \
-		$(petsc_with X x) \
-		$(petsc_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 \
-			/usr/include \
-			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
-		--with-imagemagick=0 \
-		--with-python=0 \
-		$(petsc_with boost) \
-		$(petsc_with fftw)
-}
-
-src_install() {
-	emake DESTDIR="${ED}" install
-
-	# add PETSC_DIR to environmental variables
-	cat >> 99petsc <<- EOF
-		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
-	EOF
-	doenvd 99petsc
-
-	if use doc ; then
-		dodoc docs/developers.pdf docs/manual.pdf
-		dohtml -r docs/*.html docs/changes docs/manualpages
-	fi
-}

diff --git a/sci-mathematics/petsc/petsc-3.10.4.ebuild b/sci-mathematics/petsc/petsc-3.10.4.ebuild
deleted file mode 100644
index 418196a8d..000000000
--- a/sci-mathematics/petsc/petsc-3.10.4.ebuild
+++ /dev/null
@@ -1,192 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-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.8.0b[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.9.0-fix_sandbox_violation.patch
-)
-
-src_prepare() {
-	default
-
-	sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die
-}
-
-# 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) \
-		$(petsc_with hdf5) \
-		$(petsc_with hypre hypre \
-			/usr/include/hypre -lHYPRE) \
-		$(petsc_with sparse suitesparse) \
-		$(petsc_with superlu superlu \
-			/usr/include/superlu -lsuperlu) \
-		$(petsc_with X x) \
-		$(petsc_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 \
-			/usr/include \
-			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
-		--with-imagemagick=0 \
-		--with-python=0 \
-		$(petsc_with boost) \
-		$(petsc_with fftw)
-}
-
-src_install() {
-	emake DESTDIR="${ED}" install
-
-	# add PETSC_DIR to environmental variables
-	cat >> 99petsc <<- EOF
-		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
-	EOF
-	doenvd 99petsc
-
-	if use doc ; then
-		dodoc docs/developers.pdf docs/manual.pdf
-		dohtml -r docs/*.html docs/changes docs/manualpages
-	fi
-}

diff --git a/sci-mathematics/petsc/petsc-3.11.1.ebuild b/sci-mathematics/petsc/petsc-3.11.1.ebuild
deleted file mode 100644
index 99676386d..000000000
--- a/sci-mathematics/petsc/petsc-3.11.1.ebuild
+++ /dev/null
@@ -1,191 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-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.8.0b[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.9.0-fix_sandbox_violation.patch
-)
-
-src_prepare() {
-	default
-
-	sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die
-}
-
-# 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) \
-		$(petsc_with hdf5) \
-		$(petsc_with hypre hypre \
-			/usr/include/hypre -lHYPRE) \
-		$(petsc_with sparse suitesparse) \
-		$(petsc_with superlu superlu \
-			/usr/include/superlu -lsuperlu) \
-		$(petsc_with X x) \
-		$(petsc_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 \
-			/usr/include \
-			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
-		--with-imagemagick=0 \
-		--with-python=0 \
-		$(petsc_with boost) \
-		$(petsc_with fftw)
-}
-
-src_install() {
-	emake DESTDIR="${ED}" install
-
-	# add PETSC_DIR to environmental variables
-	cat >> 99petsc <<- EOF
-		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
-	EOF
-	doenvd 99petsc
-
-	if use doc ; then
-		dohtml -r docs/*.html docs/changes docs/manualpages
-	fi
-}

diff --git a/sci-mathematics/petsc/petsc-3.11.3.ebuild b/sci-mathematics/petsc/petsc-3.11.3.ebuild
deleted file mode 100644
index 99676386d..000000000
--- a/sci-mathematics/petsc/petsc-3.11.3.ebuild
+++ /dev/null
@@ -1,191 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-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.8.0b[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.9.0-fix_sandbox_violation.patch
-)
-
-src_prepare() {
-	default
-
-	sed -i -e 's%/usr/bin/env python%/usr/bin/env python2%' configure || die
-}
-
-# 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) \
-		$(petsc_with hdf5) \
-		$(petsc_with hypre hypre \
-			/usr/include/hypre -lHYPRE) \
-		$(petsc_with sparse suitesparse) \
-		$(petsc_with superlu superlu \
-			/usr/include/superlu -lsuperlu) \
-		$(petsc_with X x) \
-		$(petsc_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 \
-			/usr/include \
-			[-lcmumps,-ldmumps,-lsmumps,-lzmumps,-lmumps_common,-lpord]) \
-		--with-imagemagick=0 \
-		--with-python=0 \
-		$(petsc_with boost) \
-		$(petsc_with fftw)
-}
-
-src_install() {
-	emake DESTDIR="${ED}" install
-
-	# add PETSC_DIR to environmental variables
-	cat >> 99petsc <<- EOF
-		PETSC_DIR=${EPREFIX}/usr/$(get_libdir)/petsc
-	EOF
-	doenvd 99petsc
-
-	if use doc ; then
-		dohtml -r docs/*.html docs/changes docs/manualpages
-	fi
-}


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

end of thread, other threads:[~2019-08-05  6:53 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07 21:58 [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/files/, sci-mathematics/petsc/ Jens-Malte Gottfried
  -- strict thread matches above, loose matches on Subject: below --
2019-08-05  6:52 Matthias Maier
2019-07-12 11:19 Matthias Maier
2018-08-31 15:39 Matthias Maier
2018-04-23  1:21 Matthias Maier
2015-03-14  8:21 Justin Lecher
2015-03-14  8:21 Justin Lecher
2014-07-24 21:50 Jens-Malte Gottfried
2013-10-18 16:19 Christoph Junghans
2013-02-22 10:15 Justin Lecher
2013-02-09 18:30 Jens-Malte Gottfried
2013-01-07 22:06 Jens-Malte Gottfried
2012-06-28  8:25 Jens-Malte Gottfried
2012-06-09  6:16 Jens-Malte Gottfried
2012-03-06 23:09 Jens-Malte Gottfried
2012-03-05 23:09 Sebastien Fabbro
2012-03-04 12:38 Jens-Malte Gottfried
2012-03-01 17:54 Jens-Malte Gottfried
2011-03-19 12:05 Jens-Malte Gottfried

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