summaryrefslogtreecommitdiff
blob: 265c0e911604240648c2a673716d65c7b61f1c0a (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mead/mead-2.2.7.ebuild,v 1.1 2009/02/15 22:57:07 dirtyepic Exp $

inherit eutils python

DESCRIPTION="Macroscopic Electrostatics with Atomic Detail"
HOMEPAGE="http://www.scripps.edu/mb/bashford/"
SRC_URI="ftp://ftp.scripps.edu/pub/bashford/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"

IUSE="python"

RESTRICT="fetch"

RDEPEND="python? ( dev-python/numeric )"
DEPEND="${RDEPEND}
	python? ( dev-lang/swig )"

pkg_nofetch() {
	elog "Download ${SRC_URI}"
	elog "and place it in ${DISTDIR}."
	elog
	elog "Use \"anonymous\" as a login, and an email address as a password."
}

src_unpack() {
	unpack ${A}
	cd "${S}"

	epatch "${FILESDIR}"/${P}-respect-cflags.patch
	epatch "${FILESDIR}"/${P}-gcc43.patch
}

src_compile() {
	if use python; then
		python_version
		conf_opts="${conf_opts} --with-py-site-packages-dir=${D}/usr/$(get_libdir)/python${PYVER}/site-packages"
	fi

	econf \
		$(use_with python) \
		${conf_opts} \
		|| die "configure failed"
	emake || die "make failed"
}

src_install() {
	# package hates emake DESTDIR="${D}" install
	einstall || die "install failed"
}