aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sci-mathematics/petsc/ChangeLog8
-rw-r--r--sci-mathematics/petsc/Manifest2
-rw-r--r--sci-mathematics/petsc/petsc-3.1_p5.ebuild122
3 files changed, 132 insertions, 0 deletions
diff --git a/sci-mathematics/petsc/ChangeLog b/sci-mathematics/petsc/ChangeLog
index e5d2bae3e..f167e76ef 100644
--- a/sci-mathematics/petsc/ChangeLog
+++ b/sci-mathematics/petsc/ChangeLog
@@ -2,6 +2,14 @@
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*petsc-3.1_p5 (06 Oct 2010)
+
+ 06 Oct 2010; Jens-Malte Gottfried <jmgottfried@web.de>
+ +petsc-3.1_p5.ebuild:
+ added new ebuild for recent upstream patchset p5
+ cleaned up the ebuild
+ (removed comments about failed tries, see petsc-3.1_p4.ebuild)
+
14 Sep 2010; Thomas Kahle <tom111@gmx.de> petsc-3.1_p4.ebuild:
Fixing "${myconf}"
diff --git a/sci-mathematics/petsc/Manifest b/sci-mathematics/petsc/Manifest
index 6ce1df974..95e6d8a6a 100644
--- a/sci-mathematics/petsc/Manifest
+++ b/sci-mathematics/petsc/Manifest
@@ -1,6 +1,8 @@
AUX fix-configure-pic.patch 533 RMD160 f24a17f653d67f42cb13701b0798704bcae95ec0 SHA1 3508bdce47619f3b29d86da4792e63c152a8314c SHA256 cfe886eb1343841e6f1b47a8a7c9ad7be66616af48eff6fce9efab64ecfb2589
AUX fix-mpiuni.patch 456 RMD160 2e69463821de6c3279a3b04b3b4b149ee354fffe SHA1 6c754380ac2b737b3f57f8ee252916c27aaa63ea SHA256 df0765040477b6dddb5f0db595477a983fa7ad3bb431747ad4c812853cd77a75
DIST petsc-3.1-p4.tar.gz 15455558 RMD160 42d1c587ab1a2676f62de866afe8c43365a1b236 SHA1 4516e74e7ea349fed58b26963cfa3747ef07c62e SHA256 4e9abb2d6a07e49ba77459398871c3f91c50669979f7e9d5017009615d2a24af
+DIST petsc-3.1-p5.tar.gz 15456384 RMD160 c97e6cf9e000c6eb635a5c76d006b7f8b84b3320 SHA1 e884e3f670093fff66fe1a3964b2f6bfc58543ce SHA256 193c7f8a5826a2bfd47a915f74e87d31a67339f89129aadb16e7b4b9e9dbf7e1
EBUILD petsc-3.1_p4.ebuild 4138 RMD160 32626757ecff1e6a512bb33fbededbb7bbf9326a SHA1 af5aeed15c6cfc12dbc3eb579fb244304a50e786 SHA256 413b705b42b9db6059176b21dd18089babab1f919b184d8195a841f3557034d1
+EBUILD petsc-3.1_p5.ebuild 3367 RMD160 ff1f32f8156a4e3202394b7adbda362b45b6f36c SHA1 19f4b1cabb55a758e85fb3720ee11da9371ecf60 SHA256 639469e91fb84f3dea4e478ecf35968de7126539c80ccbd6f4030bbb73e3a961
MISC ChangeLog 449 RMD160 017713027bd837e0aea936d871198fd02621bba1 SHA1 81e098c9f5db4491f422a1de48480ff8596be9c5 SHA256 79d0808891f9f2f2f2779bf135dea97ad3ba37843ee04993e097b9daca024744
MISC metadata.xml 270 RMD160 095cc24d79cf505fb399f4efe83c1fbd669a4777 SHA1 d694ac481815815d35bc28c0653b02b3c4bbcd08 SHA256 34185c01f89f4dac0de8133ad0d6f6e36f0e2c83f958a6cb03d0ae0f30fda007
diff --git a/sci-mathematics/petsc/petsc-3.1_p5.ebuild b/sci-mathematics/petsc/petsc-3.1_p5.ebuild
new file mode 100644
index 000000000..7c5c64f92
--- /dev/null
+++ b/sci-mathematics/petsc/petsc-3.1_p5.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2010 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="~amd64 ~x86"
+IUSE="mpi X cxx debug static-libs fortran doc"
+
+RDEPEND="mpi? ( virtual/mpi[cxx?,fortran?] )
+ X? ( x11-libs/libX11 )
+ virtual/lapack
+ virtual/blas"
+
+DEPEND="${RDEPEND}
+ sys-devel/gcc[-nocxx,fortran?]"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare(){
+ epatch "${FILESDIR}/fix-configure-pic.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
+
+ if use mpi; then
+ myconf="${myconf} --with-cc=/usr/bin/mpicc"
+ myconf="${myconf} --with-cxx=/usr/bin/mpicxx"
+ myconf="${myconf} --with-fc=/usr/bin/mpif77"
+ myconf="${myconf} --with-mpi=1 --with-mpi-compilers=1"
+ else
+ myconf="${myconf} --with-cc=$(tc-getCC)"
+ myconf="${myconf} --with-cxx=$(tc-getCXX)"
+ myconf="${myconf} --with-fc=$(tc-getF77)"
+ myconf="${myconf} --with-mpi=0"
+ fi
+
+ use X \
+ && myconf="${myconf} --with-X=1" \
+ || myconf="${myconf} --with-X=0"
+ use static-libs \
+ && myconf="${myconf} --with-shared=0" \
+ || myconf="${myconf} --with-shared=1"
+ use amd64 \
+ && myconf="${myconf} --with-64-bit-indices=1" \
+ || myconf="${myconf} --with-64-bit-indices=0"
+ use fortran \
+ && myconf="${myconf} --with-fortran=1" \
+ || myconf="${myconf} --with-fortran=0"
+
+ if use debug; then
+ strip-flags
+ filter-flags -O*
+ myconf="${myconf} --with-debugging=1"
+ else
+ myconf="${myconf} --with-debugging=0"
+ fi
+
+ python "${S}"/config/configure.py ${myconf} \
+ CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" \
+ --with-windows-graphics=0 --with-matlab=0 --with-python=0 \
+ --with-clanguage="${mylang}" --with-single-library=1 \
+ --with-petsc-arch="${PETSC_ARCH}" --with-precision=double \
+ --with-blas-lapack-lib="$(pkg-config --libs lapack)" \
+ || 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."
+}