From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QC4gM-0004qR-Gq for garchives@archives.gentoo.org; Tue, 19 Apr 2011 06:45:08 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7FBF81C0F4; Tue, 19 Apr 2011 06:44:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 374561C0F3 for ; Tue, 19 Apr 2011 06:44:58 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 85A9A1B4094 for ; Tue, 19 Apr 2011 06:44:57 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id E0706800D0 for ; Tue, 19 Apr 2011 06:44:56 +0000 (UTC) From: "Thomas Kahle" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Kahle" Message-ID: Subject: [gentoo-commits] proj/sci:master commit in: sci-mathematics/petsc/ X-VCS-Repository: proj/sci X-VCS-Files: sci-mathematics/petsc/ChangeLog sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild X-VCS-Directories: sci-mathematics/petsc/ X-VCS-Committer: tom111 X-VCS-Committer-Name: Thomas Kahle X-VCS-Revision: a3df8dd67c5c21c011f04fd29e2064f689bbc492 Date: Tue, 19 Apr 2011 06:44:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: be0e331635be0398843d47b0b2d76b39 commit: a3df8dd67c5c21c011f04fd29e2064f689bbc492 Author: Joshua Rich gmail com> AuthorDate: Tue Apr 19 02:33:27 2011 +0000 Commit: Thomas Kahle gmx de> CommitDate: Tue Apr 19 06:20:33 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/sci.git;a=3Dc= ommit;h=3Da3df8dd6 update for petsc-3.1_p8 from bug 53386 - Adds a new USE flag, complex-scalars that sets the --with-scalar-type=3Dcomplex configure script option (to use complex as o= pposed to real petsc scalars default). - Tweaks the install paths of the header files to a hierarchy under /usr/include/petsc similar to what upstream intends(?) - Installs fortran header files if USE=3Dfortran. - Installs some extra files that allow libraries such as slepc (http://www.grycap.upv.es/slepc/) to be built against petsc. This has al= lowed me to create an ebuild the former. - Installs an environment file that sets PETSC_DIR and PETSC_ARCH for software that needs these set to build/run (i.e. slepc). Signed-off-by: Thomas Kahle gentoo.org> --- sci-mathematics/petsc/ChangeLog | 6 + sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild | 201 ++++++++++++++++++++= ++++++ 2 files changed, 207 insertions(+), 0 deletions(-) diff --git a/sci-mathematics/petsc/ChangeLog b/sci-mathematics/petsc/Chan= geLog index 5a3533b..52f6b1a 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: $ =20 +*petsc-3.1_p8-r1 (19 Apr 2011) + + 19 Apr 2011; Thomas Kahle +petsc-3.1_p8-r1.ebuild: + various improvements to install locations and IUSE=3Dcomplex scalars + patch by Joshua Rich + *petsc-3.1_p8 (19 Mar 2011) =20 19 Mar 2011; Jens-Malte Gottfried diff --git a/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild b/sci-mathemati= cs/petsc/petsc-3.1_p8-r1.ebuild new file mode 100644 index 0000000..5f2eaa7 --- /dev/null +++ b/sci-mathematics/petsc/petsc-3.1_p8-r1.ebuild @@ -0,0 +1,201 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=3D3 + +inherit flag-o-matic toolchain-funcs + +MY_P=3D"${PN}-${PV/_/-}" + +DESCRIPTION=3D"Portable, Extensible Toolkit for Scientific Computation" +HOMEPAGE=3D"http://www.mcs.anl.gov/petsc/petsc-as/" +SRC_URI=3D"http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${MY_P}.ta= r.gz" + +LICENSE=3D"petsc" +SLOT=3D"0" +KEYWORDS=3D"~x86 ~amd64" +IUSE=3D"mpi hypre metis hdf5 X cxx debug static-libs fortran doc complex= -scalars" + +RDEPEND=3D"mpi? ( virtual/mpi[cxx?,fortran?] ) + X? ( x11-libs/libX11 ) + virtual/lapack + virtual/blas + hypre? ( >=3Dsci-mathematics/hypre-2.6.0b[static-libs=3D] ) + metis? ( sci-libs/parmetis ) + hdf5? ( sci-libs/hdf5[!mpi?] ) +" + +DEPEND=3D"${RDEPEND} + sys-devel/gcc[-nocxx,fortran?]" + +S=3D"${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=3D"cxx" || mylang=3D"c" + use debug && myopt=3D"debug" || myopt=3D"opt" + + export PETSC_DIR=3D"${S}" || die + export PETSC_ARCH=3D"linux-gnu-${mylang}-${myopt}" || die + + myconf[10]=3D"--with-blas-lapack-lib=3D$(pkg-config --libs lapack)" + myconf[11]=3D"CFLAGS=3D${CFLAGS}" + myconf[12]=3D"CXXFLAGS=3D${CXXFLAGS}" + myconf[13]=3D"LDFLAGS=3D${LDFLAGS}" + myconf[14]=3D"--with-windows-graphics=3D0" + myconf[15]=3D"--with-matlab=3D0" + myconf[16]=3D"--with-python=3D0" + myconf[17]=3D"--with-clanguage=3D${mylang}" + myconf[18]=3D"--with-single-library=3D1" + myconf[19]=3D"--with-petsc-arch=3D${PETSC_ARCH}" + myconf[20]=3D"--with-precision=3Ddouble" + myconf[21]=3D"--with-gnu-compilers=3D1" + use amd64 \ + && myconf[22]=3D"--with-64-bit-pointers=3D1" \ + || myconf[22]=3D"--with-64-bit-pointers=3D0" + use cxx \ + && myconf[23]=3D"--with-c-support=3D1" + use amd64 \ + && myconf[24]=3D"--with-64-bit-indices=3D1" \ + || myconf[24]=3D"--with-64-bit-indices=3D0" + + if use mpi; then + myconf[30]=3D"--with-cc=3D/usr/bin/mpicc" + myconf[31]=3D"--with-cxx=3D/usr/bin/mpicxx" + use fortran && myconf[32]=3D"--with-fc=3D/usr/bin/mpif77" + myconf[33]=3D"--with-mpi=3D1" + myconf[34]=3D"--with-mpi-compilers=3D1" + else + myconf[30]=3D"--with-cc=3D$(tc-getCC)" + myconf[31]=3D"--with-cxx=3D$(tc-getCXX)" + use fortran && myconf[32]=3D"--with-fc=3D$(tc-getF77)" + myconf[33]=3D"--with-mpi=3D0" + fi + + use X \ + && myconf[40]=3D"--with-X=3D1" \ + || myconf[40]=3D"--with-X=3D0" + use static-libs \ + && myconf[41]=3D"--with-shared=3D0" \ + || myconf[41]=3D"--with-shared=3D1" + use fortran \ + && myconf[43]=3D"--with-fortran=3D1" \ + || myconf[43]=3D"--with-fortran=3D0" + + if use debug; then + strip-flags + filter-flags -O* + myconf[44]=3D"--with-debugging=3D1" + else + myconf[44]=3D"--with-debugging=3D0" + fi + + if use hypre; then + # hypre cannot handle 64 bit indices, therefore disabled + myconf[24]=3D"--with-64-bit-indices=3D0" + myconf[52]=3D"--with-hypre=3D1" + myconf[53]=3D"--with-hypre-include=3D/usr/include/hypre" + use static-libs \ + && myconf[54]=3D"--with-hypre-lib=3D/usr/$(get_libdir)/libHYPRE.a" \ + || myconf[54]=3D"--with-hypre-lib=3D/usr/$(get_libdir)/libHYPRE.so" + else + myconf[52]=3D"--with-hypre=3D0" + fi + + if use metis; then + # parmetis cannot handle 64 bit indices, therefore disabled + myconf[24]=3D"--with-64-bit-indices=3D0" + myconf[61]=3D"--with-parmetis=3D1" + myconf[62]=3D"--with-parmetis-include=3D/usr/include/parmetis" + myconf[63]=3D"--with-parmetis-lib=3D/usr/$(get_libdir)/libparmetis.so" + else + myconf[61]=3D"--with-parmetis=3D0" + fi + + if use hdf5; then + myconf[71]=3D"--with-hdf5=3D1" + myconf[72]=3D"--with-hdf5-include=3D/usr/include" + myconf[73]=3D"--with-hdf5-lib=3D/usr/$(get_libdir)/libhdf5.so" + else + myconf[71]=3D"--with-hdf5=3D0" + fi + + myconf[81]=3D"--with-scotch=3D0" + + if use complex-scalars; then + # cannot enable C support with complex scalars + # (cannot even set configure option to zero!) + myconf[23]=3D"" + myconf[82]=3D"--with-scalar-type=3Dcomplex" + 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/petscc= onf.h + dosed "s:${PETSC_ARCH}/lib:$(get_libdir):g" /usr/include/"${PN}/${PETSC= _ARCH}"/include/petscconf.h + dosed "s:INSTALL_DIR =3D.*:INSTALL_DIR =3D /usr:" /usr/include/"${PN}/$= {PETSC_ARCH}"/conf/petscvariables + + cat > ${T}/99petsc <