blob: 62835dfefe64bd98c8f31db3b455de7d535c662c (
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
inherit autotools bash-completion mercurial
DESCRIPTION="Votca coarse-graining engine"
HOMEPAGE="http://www.votca.org"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~x86 ~amd64"
IUSE="-boost doc static +single-precision double-precision"
RDEPEND="dev-libs/expat
boost? ( >=dev-libs/boost-1.33.1
=sci-libs/votca-tools-${PV}[boost] )
!boost? ( =sci-libs/votca-tools-${PV}[-boost] )
single-precision? ( >sci-chemistry/gromacs-4.0.5[single-precision] )
double-precision? ( >sci-chemistry/gromacs-4.0.5[double-precision] )
dev-lang/perl
app-shells/bash
doc? ( >=app-text/txt2tags-2.5 )"
DEPEND="${RDEPEND}
dev-util/pkgconfig"
EHG_REPO_URI="https://csg.votca.googlecode.com/hg/"
S="${WORKDIR}/hg"
src_prepare() {
local dir
for dir in share/scripts/inverse; do
emake -C "$dir" -f Makefile.am.in Makefile.am || \
die "make -f Makefile.am.in Makefile.am in $dir failed"
done
eautoreconf || die "eautoreconf failed"
}
src_configure() {
local myconf="--disable-la-files"
if use single-precision && use double-precision; then
ewarn "${PN} has only support for single-precision OR double-precision"
ewarn "using double-precision"
myconf="${myconf} --with-libgmx=libgmx_d"
elif use single-precision; then
myconf="${myconf} --with-libgmx=libgmx"
elif use double-precision; then
myconf="${myconf} --with-libgmx=libgmx_d"
else
die "Nothing to compile, enable single-precision and/or double-precision"
fi
myconf="${myconf} $(use_with boost)"
myconf="${myconf} $(use_enable static all-static)"
econf ${myconf} || die "econf failed"
}
src_compile() {
emake || die "emake failed"
}
src_install() {
emake install DESTDIR="${D}" || die "emake install failed"
dodoc README NOTICE
if use doc; then
emake CHANGELOG || die "emake CHANGELOG failed"
dodoc CHANGELOG
fi
sed -n -e '/^CSGSHARE/p' \
"${D}"/usr/share/votca/rc/csg.rc.bash >> "${T}/80${PN}"
doenvd "${T}/80${PN}"
#from votca-tools
if [ -f /usr/share/votca/completion.bash ]; then
cat /usr/share/votca/completion.bash > "${T}/completion.bash"
cat "${D}"/usr/share/votca/rc/csg-completion.bash >> "${T}/completion.bash"
dobashcompletion "${T}"/completion.bash ${PN}
fi
rm -f "${D}"/usr/share/votca/rc/*
}
pkg_postinst() {
elog
elog "Please read and cite:"
elog "VOTCA, J. Chem. Theory Comput. 5, 3211 (2009). "
elog "http://dx.doi.org/10.1021/ct900369w"
elog
}
|