summaryrefslogtreecommitdiff
blob: 2111417a608b0b5b82c8a33ff8c6c57edb68073e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/apbs/apbs-0.3.2.ebuild,v 1.1 2005/10/20 01:22:57 ribosome Exp $

inherit eutils fortran

DESCRIPTION=" Software for evaluating the electrostatic properties of nanoscale biomolecular systems"
LICENSE="GPL-2"
HOMEPAGE="http://agave.wustl.edu/apbs/"
SRC_URI="http://agave.wustl.edu/apbs/download/dist/${P}.tar.gz"

SLOT="0"
IUSE="blas"
KEYWORDS="~x86"

DEPEND="blas? ( virtual/blas )
		sys-libs/readline
		dev-libs/maloc"

pkg_setup() {
	need_fortran g77
}

src_compile() {
	# use blas
	use blas && local myconf="--with-blas=-lblas"

	# configure 
	econf ${myconf} || die "configure failed"

	# build
	make || die "make failed"
}

src_install() {

	# install apbs binary
	dobin bin/apbs || die "failed to install apbs binary"

	# fix up and install examples
	sed -e "s|\${bindir}|/usr/bin|" \
		-i examples/ion-pmf/runme || \
		die "failed fixing ion-pmf/runme file"

	sed -e "s|bindir=''|bindir=/usr/bin|" \
		-i examples/point-pmf/runme.sh || \
		die "failed fixing point-pmf/runme.sh"

	insinto /usr/share/doc/${PF}/examples
	doins -r examples/* || die "failed to install examples"

	# install docs
	insinto /usr/share/doc/${PF}/html/programmer
	doins doc/html/programmer/* || die "failed to install html docs"

	insinto /usr/share/doc/${PF}/html/tutorial
	doins doc/html/tutorial/* || die "failed to install html docs"

	insinto /usr/share/doc/${PF}/html/user-guide
	doins doc/html/user-guide/* || die "failed to install html docs"
}