/[gentoo-x86]/sci-chemistry/tinker/tinker-5.1.09.ebuild
Gentoo

Contents of /sci-chemistry/tinker/tinker-5.1.09.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Fri Oct 19 10:30:49 2012 UTC (22 months, 1 week ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +2 -3 lines
sci-chemistry/tinker: Remove virtual/fortran and always call fortran-2_pkg_setup as intend by the updated fortran-2.eclass

(Portage version: 2.2.0_alpha141/cvs/Linux x86_64, signed Manifest commit with key 70EB7916)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/tinker/tinker-5.1.09.ebuild,v 1.6 2011/06/21 15:55:41 jlec Exp $
4
5 EAPI="2"
6
7 inherit eutils fortran-2 java-pkg-opt-2 toolchain-funcs
8
9 DESCRIPTION="Molecular modeling package that includes force fields, such as AMBER and CHARMM"
10 HOMEPAGE="http://dasher.wustl.edu/tinker/"
11 SRC_URI="http://dasher.wustl.edu/${PN}/downloads/${P}.tar.gz"
12
13 SLOT="0"
14 LICENSE="Tinker"
15 KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
16 IUSE="examples"
17
18 DEPEND="
19 >=virtual/jdk-1.6"
20 RDEPEND="
21 dev-libs/maloc
22 !dev-util/diffuse
23 >=virtual/jre-1.6"
24
25 RESTRICT="mirror"
26
27 S="${WORKDIR}"/tinker/source
28
29 pkg_setup() {
30 fortran-2_pkg_setup
31 java-pkg-opt-2_pkg_setup
32 }
33
34 src_prepare() {
35 cd ..
36 epatch "${FILESDIR}"/${PV}-Makefile.patch
37 }
38
39 src_compile() {
40 local javalib=
41 for i in $(java-config -g LDPATH | sed 's|:| |g'); do
42 [[ -f ${i}/libjvm.so ]] && javalib=${i}
43 done
44 emake -e \
45 -f ../make/Makefile \
46 F77="$(tc-getFC)" \
47 CC="$(tc-getCC) -c" \
48 F77FLAGS=-c \
49 OPTFLAGS="${FFLAGS}" \
50 LINKFLAGS="${LDFLAGS} -Wl,-rpath ${javalib}" \
51 INCLUDEDIR="$(java-pkg_get-jni-cflags) -I${EPREFIX}/usr/include" \
52 LIBS=" -lmaloc -L${javalib} -ljvm" \
53 all || die
54 mkdir "${S}"/../bin || die
55
56 emake \
57 -f ../make/Makefile \
58 BINDIR="${S}"/../bin \
59 rename || die
60 }
61
62 src_test() {
63 cd "${WORKDIR}"/tinker/test/
64 for test in *.run; do
65 einfo "Testing ${test} ..."
66 bash ${test} || die
67 done
68 }
69
70 src_install() {
71 dobin "${WORKDIR}"/${PN}/perl/mdavg "${WORKDIR}"/${PN}/bin/* || die
72
73 insinto /usr/share/${PN}/
74 doins -r "${WORKDIR}"/${PN}/params || die
75
76 dodoc \
77 "${WORKDIR}"/${PN}/doc/{*.txt,announce/release-*,*.pdf,0README} || die
78
79 if use examples; then
80 insinto /usr/share/${P}
81 doins -r "${WORKDIR}"/${PN}/example || die
82
83 doins -r "${WORKDIR}"/${PN}/test || die
84 fi
85
86 }

  ViewVC Help
Powered by ViewVC 1.1.20