summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKacper Kowalik <xarthisius@gentoo.org>2010-06-15 18:02:51 +0000
committerKacper Kowalik <xarthisius@gentoo.org>2010-06-15 18:02:51 +0000
commited51f20bbb73985671dce18b8bb5a712783399cb (patch)
tree98d6921ced58168e166531348a54529bbe056008 /sci-chemistry/apbs/apbs-1.2.1b-r4.ebuild
parentDrop ~amd64-linux kws, legacy cruft (diff)
downloadgentoo-2-ed51f20bbb73985671dce18b8bb5a712783399cb.tar.gz
gentoo-2-ed51f20bbb73985671dce18b8bb5a712783399cb.tar.bz2
gentoo-2-ed51f20bbb73985671dce18b8bb5a712783399cb.zip
Adding shared libs, fix parallel build, fix install paths on multilib
(Portage version: 2.1.8.3/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry/apbs/apbs-1.2.1b-r4.ebuild')
-rw-r--r--sci-chemistry/apbs/apbs-1.2.1b-r4.ebuild142
1 files changed, 142 insertions, 0 deletions
diff --git a/sci-chemistry/apbs/apbs-1.2.1b-r4.ebuild b/sci-chemistry/apbs/apbs-1.2.1b-r4.ebuild
new file mode 100644
index 000000000000..a223b2adcb92
--- /dev/null
+++ b/sci-chemistry/apbs/apbs-1.2.1b-r4.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/apbs/apbs-1.2.1b-r4.ebuild,v 1.1 2010/06/15 18:02:51 xarthisius Exp $
+
+EAPI="3"
+
+PYTHON_DEPEND="python? 2"
+FORTRAN="g77 gfortran ifc"
+
+inherit autotools eutils flag-o-matic fortran python versionator
+
+MY_PV=$(get_version_component_range 1-3)
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Software for evaluating the electrostatic properties of nanoscale biomolecular systems"
+HOMEPAGE="http://apbs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-source.tar.gz"
+
+SLOT="0"
+LICENSE="BSD"
+IUSE="arpack doc mpi openmp python tinker tools"
+KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+DEPEND="dev-libs/maloc[mpi=]
+ virtual/blas
+ sys-libs/readline
+ arpack? ( sci-libs/arpack )
+ mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/"${MY_P}-source"
+
+pkg_setup() {
+ use python && python_set_active_version 2
+ fortran_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-openmp.patch \
+ "${FILESDIR}"/${P}-install-fix.patch \
+ "${FILESDIR}"/${PN}-1.2.0-contrib.patch \
+ "${FILESDIR}"/${PN}-1.2.0-link.patch \
+ "${FILESDIR}"/${P}-autoconf-2.64.patch \
+ "${FILESDIR}"/${P}-shared.patch \
+ "${FILESDIR}"/${P}-multilib.patch \
+ "${FILESDIR}"/${P}-parallelbuild.patch
+ sed "s:GENTOO_PKG_NAME:${PN}:g" \
+ -i Makefile.am || die "Cannot correct package name"
+ eautoreconf
+ find . -name "._*" -exec rm -f '{}' \;
+}
+
+src_configure() {
+ local myconf="--docdir=${EPREFIX}/usr/share/doc/${PF}"
+ use arpack && myconf="${myconf} --with-arpack=${EPREFIX}/usr/$(get_libdir)"
+
+ # check which mpi version is installed and tell configure
+ if use mpi; then
+ export CC="${EPREFIX}/usr/bin/mpicc"
+ export F77="${EPREFIX}/usr/bin/mpif77"
+
+ if has_version sys-cluster/mpich; then
+ myconf="${myconf} --with-mpich=${EPREFIX}/usr"
+ elif has_version sys-cluster/mpich2; then
+ myconf="${myconf} --with-mpich2=${EPREFIX}/usr"
+ elif has_version sys-cluster/lam-mpi; then
+ myconf="${myconf} --with-lam=${EPREFIX}/usr"
+ elif has_version sys-cluster/openmpi; then
+ myconf="${myconf} --with-openmpi=${EPREFIX}/usr"
+ fi
+ fi || die "Failed to select proper mpi implementation"
+
+ # we need the tools target for python
+ if use python && ! use tools; then
+ myconf="${myconf} --enable-tools"
+ fi
+
+ econf \
+ --disable-maloc-rebuild \
+ --enable-shared \
+ --with-blas=-lblas \
+ $(use_enable openmp) \
+ $(use_enable python) \
+ $(use_enable tinker) \
+ $(use_enable tools) \
+ ${myconf}
+}
+
+src_compile() {
+ emake || die "make failed"
+}
+
+src_test() {
+ cd examples && make test \
+ || die "Tests failed"
+}
+
+src_install() {
+ emake -j1 DESTDIR="${D}" install \
+ || die "make install failed"
+
+ if use tools; then
+ mv tools/mesh/{,mesh-}analysis || die
+ dobin tools/mesh/* || die
+
+ if use arpack; then
+ dobin tools/arpack/* || die
+ fi
+
+ insinto /usr/share/${PN}
+ doins -r tools/conversion || die
+ doins -r tools/visualization/opendx || die
+
+ dobin tools/manip/{born,coulomb} || die
+
+ doins -r tools/matlab || die
+ fi
+
+ insinto $(python_get_sitedir)/${PN}
+ doins tools/manip/*.py || die
+
+ if use python && ! use mpi; then
+ insinto $(python_get_sitedir)/${PN}
+ doins tools/python/{*.py,*.pqr,*.so} || die
+ doins tools/python/*/{*.py,*.so} || die
+ fi
+
+ dodoc AUTHORS INSTALL README NEWS ChangeLog \
+ || die "Failed to install docs"
+
+ if use doc; then
+ dohtml -r doc/* || die "Failed to install html docs"
+ fi
+}
+
+pkg_postinst() {
+ python_mod_optimize ${PN}
+}
+
+pkg_postrm() {
+ python_mod_cleanup ${PN}
+}