Gentoo Archives: gentoo-commits

From: "Alexey Shvetsov (alexxy)" <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-chemistry/ambertools: metadata.xml ChangeLog ambertools-1.5-r1.ebuild
Date: Thu, 28 Jul 2011 13:19:16
Message-Id: 20110728131906.D64572004B@flycatcher.gentoo.org
1 alexxy 11/07/28 13:19:06
2
3 Added: metadata.xml ChangeLog ambertools-1.5-r1.ebuild
4 Log:
5 [sci-chemistry/ambertools] Initial import to tree
6
7 (Portage version: 2.2.0_alpha47/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 sci-chemistry/ambertools/metadata.xml
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ambertools/metadata.xml?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ambertools/metadata.xml?rev=1.1&content-type=text/plain
14
15 Index: metadata.xml
16 ===================================================================
17 <?xml version="1.0" encoding="UTF-8"?>
18 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
19 <pkgmetadata>
20 <herd>sci-chemistry</herd>
21 <maintainer>
22 <email>alexxy@g.o</email>
23 <name>Alexey Shvetsov</name>
24 </maintainer>
25 </pkgmetadata>
26
27
28
29
30 1.1 sci-chemistry/ambertools/ChangeLog
31
32 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ambertools/ChangeLog?rev=1.1&view=markup
33 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ambertools/ChangeLog?rev=1.1&content-type=text/plain
34
35 Index: ChangeLog
36 ===================================================================
37 # ChangeLog for sci-chemistry/ambertools
38 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
39 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ambertools/ChangeLog,v 1.1 2011/07/28 13:19:06 alexxy Exp $
40
41 *ambertools-1.5-r1 (28 Jul 2011)
42
43 28 Jul 2011; Alexey Shvetsov <alexxy@g.o> +ambertools-1.5-r1.ebuild,
44 +files/ambertools-1.5-gentoo.patch, +metadata.xml:
45 Initial import to tree
46
47
48
49
50 1.1 sci-chemistry/ambertools/ambertools-1.5-r1.ebuild
51
52 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ambertools/ambertools-1.5-r1.ebuild?rev=1.1&view=markup
53 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-chemistry/ambertools/ambertools-1.5-r1.ebuild?rev=1.1&content-type=text/plain
54
55 Index: ambertools-1.5-r1.ebuild
56 ===================================================================
57 # Copyright 1999-2011 Gentoo Foundation
58 # Distributed under the terms of the GNU General Public License v2
59 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ambertools/ambertools-1.5-r1.ebuild,v 1.1 2011/07/28 13:19:06 alexxy Exp $
60
61 EAPI=4
62
63 inherit eutils fortran-2 toolchain-funcs
64
65 DESCRIPTION="A suite for carrying out complete molecular mechanics investigations"
66 HOMEPAGE="http://ambermd.org/#AmberTools"
67 SRC_URI="
68 AmberTools-${PV}.tar.bz2
69 mirror://gentoo/${P}-bugfix_1-10.patch.xz"
70
71 LICENSE="GPL-2"
72 SLOT="0"
73 KEYWORDS="~amd64 ~x86"
74 IUSE="mpi openmp X"
75
76 RESTRICT="fetch"
77
78 RDEPEND="
79 virtual/cblas
80 virtual/lapack
81 sci-libs/clapack
82 sci-libs/arpack
83 sci-libs/cifparse-obj
84 sci-chemistry/mopac7
85 sci-libs/netcdf
86 sci-libs/fftw:2.1
87 sci-chemistry/reduce
88 virtual/fortran"
89 DEPEND="${RDEPEND}
90 dev-util/byacc
91 dev-libs/libf2c
92 sys-devel/ucpp"
93 S="${WORKDIR}/amber11"
94
95 pkg_nofetch() {
96 einfo "Go to ${HOMEPAGE} and get ${A}"
97 einfo "Place it in ${DISTDIR}"
98 }
99
100 pkg_setup() {
101 fortran-2_pkg_setup
102 if use openmp; then
103 tc-has-openmp || \
104 die "Please select an openmp capable compiler like gcc[openmp]"
105 fi
106 AMBERHOME="${S}"
107 }
108
109 src_prepare() {
110 epatch \
111 "${WORKDIR}/${P}-bugfix_1-10.patch" \
112 "${FILESDIR}/${P}-gentoo.patch"
113 cd AmberTools/src
114 rm -r arpack blas lapack fftw-2.1.5 c9x-complex cifparse netcdf pnetcdf reduce ucpp-1.3 || die
115 }
116
117 src_configure() {
118 cd AmberTools/src
119 sed -e "s:\\\\\$(LIBDIR)/arpack.a:-larpack:g" \
120 -e "s:\\\\\$(LIBDIR)/lapack.a:$(pkg-config lapack --libs) -lclapack:g" \
121 -e "s:\\\\\$(LIBDIR)/blas.a:$(pkg-config blas cblas --libs):g" \
122 -e "s:\\\\\$(LIBDIR)/libdrfftw.a:${EPREFIX}/usr/$(get_libdir)/libdrfftw.a:g" \
123 -e "s:\\\\\$(LIBDIR)/libdfftw.a:${EPREFIX}/usr/$(get_libdir)/libdrfftw.a:g" \
124 -e "s:CFLAGS=:CFLAGS=${CFLAGS} -DBINTRAJ :g" \
125 -e "s:FFLAGS=:FFLAGS=${FFLAGS} :g" \
126 -e "s:LDFLAGS=$ldflags:LDFLAGS=${LDFLAGS}:g" \
127 -e "s:fc=g77:fc=$(tc-getFC):g" \
128 -e "s:\$netcdflib:$(pkg-config netcdf --libs):g" \
129 -e "s:NETCDF=\$netcdf:NETCDF=netcdf.mod:g" \
130 -e "s:-O3::g" \
131 -i configure || die
132 sed -e "s:arsecond_:arscnd_:g" \
133 -i sff/time.c \
134 -i sff/sff.h \
135 -i sff/sff.c || die
136 sed -e "s:\$(NAB):\$(NAB) -lrfftw:g" \
137 -i nss/Makefile || die
138
139 local myconf
140
141 use X || myconf="${myconf} -noX11"
142
143 for x in mpi openmp; do
144 use ${x} && myconf="${myconf} -${x}"
145 done
146
147 ./configure \
148 ${myconf} \
149 -nobintraj \
150 -nomdgx \
151 -nopython \
152 -nomtkpp \
153 gnu
154 # $(expr match "$(tc-getCC)" '.*\([a-z]cc\)')
155 }
156
157 src_compile() {
158 cd AmberTools/src
159 emake || die
160 }
161
162 src_install() {
163 rm -r bin/chemistry bin/MMPBSA_mods
164 rm bin/ante-MMPBSA.py bin/extractFrcmod.py
165 for x in bin/*
166 do dobin ${x} || die
167 done
168 rm "${ED}/usr/bin/yacc"
169 dobin AmberTools/src/antechamber/mopac.sh
170 sed -e "s:\$AMBERHOME/bin/mopac:mopac7:g" \
171 -i "${ED}/usr/bin/mopac.sh" || die
172 # Make symlinks untill binpath for amber will be fixed
173 dodir /usr/share/${PN}/bin
174 cd "${ED}/usr/bin"
175 for x in *
176 do dosym /usr/bin/${x} /usr/share/${PN}/bin/${x}
177 done
178 cd "${S}"
179 # sed -e "s:\$AMBERHOME/dat:\$AMBERHOME/share/ambertools/dat:g" \
180 # -i "${ED}/usr/bin/xleap" \
181 # -i "${ED}/usr/bin/tleap" || die
182 dodoc doc/AmberTools.pdf doc/leap_pg.pdf
183 dolib.a lib/*
184 insinto /usr/include/${PN}
185 doins include/*
186 insinto /usr/share/${PN}
187 doins -r dat
188 cd AmberTools
189 doins -r benchmarks
190 doins -r examples
191 doins -r test
192 cat >> "${T}"/99ambertools <<- EOF
193 AMBERHOME="${EPREFIX}/usr/share/ambertools"
194 EOF
195 doenvd "${T}"/99ambertools
196 }