1 |
commit: 7f1c9ec1806f79a26cb7e62a41be34d3c5677b9e |
2 |
Author: Reinis Danne <rei4dan <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Aug 28 12:13:42 2012 +0000 |
4 |
Commit: Reinis Danne <rei4dan <AT> gmail <DOT> com> |
5 |
CommitDate: Tue Aug 28 16:51:36 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=7f1c9ec1 |
7 |
|
8 |
ambertools: Add bugfix 28 |
9 |
|
10 |
--- |
11 |
sci-chemistry/ambertools/ChangeLog | 6 + |
12 |
sci-chemistry/ambertools/ambertools-1.5-r4.ebuild | 159 ++++++++++++++++++++ |
13 |
.../files/ambertools-1.5-bugfix_28.patch | 23 +++ |
14 |
3 files changed, 188 insertions(+), 0 deletions(-) |
15 |
|
16 |
diff --git a/sci-chemistry/ambertools/ChangeLog b/sci-chemistry/ambertools/ChangeLog |
17 |
index 09fcfa6..6e9d91d 100644 |
18 |
--- a/sci-chemistry/ambertools/ChangeLog |
19 |
+++ b/sci-chemistry/ambertools/ChangeLog |
20 |
@@ -2,6 +2,12 @@ |
21 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
22 |
# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ambertools/ChangeLog,v 1.2 2011/08/02 14:42:37 alexxy Exp $ |
23 |
|
24 |
+*ambertools-1.5-r4 (28 Aug 2012) |
25 |
+ |
26 |
+ 28 Aug 2012; Reinis Danne <rei4dan@×××××.com> +ambertools-1.5-r4.ebuild, |
27 |
+ +files/ambertools-1.5-bugfix_28.patch: |
28 |
+ Add bugfix 28. |
29 |
+ |
30 |
03 Mar 2012; Reinis Danne <rei4dan@×××××.com> ambertools-1.5-r3.ebuild, |
31 |
+files/ambertools-1.5-overflow.patch: |
32 |
Add another buffer overflow patch. |
33 |
|
34 |
diff --git a/sci-chemistry/ambertools/ambertools-1.5-r4.ebuild b/sci-chemistry/ambertools/ambertools-1.5-r4.ebuild |
35 |
new file mode 100644 |
36 |
index 0000000..d689579 |
37 |
--- /dev/null |
38 |
+++ b/sci-chemistry/ambertools/ambertools-1.5-r4.ebuild |
39 |
@@ -0,0 +1,159 @@ |
40 |
+# Copyright 1999-2012 Gentoo Foundation |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ambertools/ambertools-1.5-r1.ebuild,v 1.2 2011/08/02 14:42:37 alexxy Exp $ |
43 |
+ |
44 |
+EAPI=4 |
45 |
+ |
46 |
+inherit eutils fortran-2 toolchain-funcs |
47 |
+ |
48 |
+DESCRIPTION="A suite for carrying out complete molecular mechanics investigations" |
49 |
+HOMEPAGE="http://ambermd.org/#AmberTools" |
50 |
+SRC_URI=" |
51 |
+ AmberTools-${PV}.tar.bz2" |
52 |
+ |
53 |
+LICENSE="GPL-2" |
54 |
+SLOT="0" |
55 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux" |
56 |
+IUSE="openmp X" |
57 |
+ |
58 |
+RESTRICT="fetch" |
59 |
+ |
60 |
+RDEPEND=" |
61 |
+ virtual/cblas |
62 |
+ virtual/lapack |
63 |
+ sci-libs/clapack |
64 |
+ sci-libs/arpack |
65 |
+ sci-libs/cifparse-obj |
66 |
+ sci-chemistry/mopac7 |
67 |
+ sci-libs/netcdf |
68 |
+ sci-libs/fftw:2.1 |
69 |
+ sci-chemistry/reduce |
70 |
+ virtual/fortran" |
71 |
+DEPEND="${RDEPEND} |
72 |
+ dev-util/byacc |
73 |
+ dev-libs/libf2c |
74 |
+ sys-devel/ucpp" |
75 |
+S="${WORKDIR}/amber11" |
76 |
+ |
77 |
+pkg_nofetch() { |
78 |
+ einfo "Go to ${HOMEPAGE} and get ${A}" |
79 |
+ einfo "Place it in ${DISTDIR}" |
80 |
+} |
81 |
+ |
82 |
+pkg_setup() { |
83 |
+ fortran-2_pkg_setup |
84 |
+ if use openmp; then |
85 |
+ tc-has-openmp || \ |
86 |
+ die "Please select an openmp capable compiler like gcc[openmp]" |
87 |
+ fi |
88 |
+ AMBERHOME="${S}" |
89 |
+} |
90 |
+ |
91 |
+src_prepare() { |
92 |
+ epatch \ |
93 |
+ "${FILESDIR}/${P}-bugfix_1-21.patch" \ |
94 |
+ "${FILESDIR}/${P}-bugfix_22-27.patch" \ |
95 |
+ "${FILESDIR}/${P}-bugfix_28.patch" \ |
96 |
+ "${FILESDIR}/${P}-gentoo2.patch" \ |
97 |
+ "${FILESDIR}/${P}-overflow.patch" |
98 |
+ cd "${S}"/AmberTools/src |
99 |
+ rm -r \ |
100 |
+ arpack \ |
101 |
+ blas \ |
102 |
+ byacc \ |
103 |
+ lapack \ |
104 |
+ fftw-2.1.5 \ |
105 |
+ fftw-3.2.2 \ |
106 |
+ c9x-complex \ |
107 |
+ cifparse \ |
108 |
+ netcdf \ |
109 |
+ pnetcdf \ |
110 |
+ reduce \ |
111 |
+ ucpp-1.3 \ |
112 |
+ || die |
113 |
+} |
114 |
+ |
115 |
+src_configure() { |
116 |
+ cd "${S}"/AmberTools/src |
117 |
+ sed -e "s:\\\\\$(LIBDIR)/arpack.a:-larpack:g" \ |
118 |
+ -e "s:\\\\\$(LIBDIR)/lapack.a:$(pkg-config lapack --libs) -lclapack:g" \ |
119 |
+ -e "s:\\\\\$(LIBDIR)/blas.a:$(pkg-config blas cblas --libs):g" \ |
120 |
+ -e "s:\\\\\$(LIBDIR)/libdrfftw.a:${EPREFIX}/usr/$(get_libdir)/libdrfftw.a:g" \ |
121 |
+ -e "s:\\\\\$(LIBDIR)/libdfftw.a:${EPREFIX}/usr/$(get_libdir)/libdrfftw.a:g" \ |
122 |
+ -e "s:GENTOO_CFLAGS:${CFLAGS} -DBINTRAJ :g" \ |
123 |
+ -e "s:GENTOO_CXXFLAGS:${CXXFLAGS}:g" \ |
124 |
+ -e "s:GENTOO_FFLAGS:${FFLAGS}:g" \ |
125 |
+ -e "s:GENTOO_LDFLAGS:${LDFLAGS}:g" \ |
126 |
+ -e "s:fc=g77:fc=$(tc-getFC):g" \ |
127 |
+ -e "s:\$netcdflib:$(pkg-config netcdf --libs):g" \ |
128 |
+ -e "s:NETCDF=\$netcdf:NETCDF=netcdf.mod:g" \ |
129 |
+ -i configure || die |
130 |
+ sed -e "s:arsecond_:arscnd_:g" \ |
131 |
+ -i sff/time.c \ |
132 |
+ -i sff/sff.h \ |
133 |
+ -i sff/sff.c || die |
134 |
+ sed -e "s:\$(NAB):\$(NAB) -lrfftw:g" \ |
135 |
+ -i nss/Makefile || die |
136 |
+ |
137 |
+ local myconf |
138 |
+ |
139 |
+ use X || myconf="${myconf} -noX11" |
140 |
+ |
141 |
+ use openmp && myconf="${myconf} -openmp" |
142 |
+ |
143 |
+ ./configure \ |
144 |
+ ${myconf} \ |
145 |
+ -nobintraj \ |
146 |
+ -nomdgx \ |
147 |
+ -nomtkpp \ |
148 |
+ -nopython \ |
149 |
+ -nosleap \ |
150 |
+ gnu |
151 |
+} |
152 |
+ |
153 |
+src_compile() { |
154 |
+ cd "${S}"/AmberTools/src |
155 |
+ emake || die |
156 |
+} |
157 |
+ |
158 |
+src_test() { |
159 |
+ cd "${S}"/AmberTools/test |
160 |
+ make test || die |
161 |
+} |
162 |
+ |
163 |
+src_install() { |
164 |
+ rm -r bin/chemistry bin/MMPBSA_mods |
165 |
+ rm bin/ante-MMPBSA.py bin/extractFrcmod.py |
166 |
+ |
167 |
+ for x in bin/* |
168 |
+ do dobin ${x} || die |
169 |
+ done |
170 |
+ |
171 |
+ dobin AmberTools/src/antechamber/mopac.sh |
172 |
+ sed -e "s:\$AMBERHOME/bin/mopac:mopac7:g" \ |
173 |
+ -i "${ED}/usr/bin/mopac.sh" || die |
174 |
+ |
175 |
+ # Make symlinks untill binpath for amber will be fixed |
176 |
+ dodir /usr/share/${PN}/bin |
177 |
+ cd "${ED}/usr/bin" |
178 |
+ for x in * |
179 |
+ do dosym /usr/bin/${x} /usr/share/${PN}/bin/${x} |
180 |
+ done |
181 |
+ cd "${S}" |
182 |
+ |
183 |
+ dodoc doc/AmberTools.pdf doc/leap_pg.pdf |
184 |
+ dolib.a lib/* |
185 |
+ insinto /usr/include/${PN} |
186 |
+ doins include/* |
187 |
+ insinto /usr/share/${PN} |
188 |
+ doins -r dat |
189 |
+ cd AmberTools |
190 |
+ doins -r benchmarks |
191 |
+ doins -r examples |
192 |
+ doins -r test |
193 |
+ |
194 |
+ cat >> "${T}"/99ambertools <<- EOF |
195 |
+ AMBERHOME="${EPREFIX}/usr/share/ambertools" |
196 |
+ EOF |
197 |
+ doenvd "${T}"/99ambertools |
198 |
+} |
199 |
|
200 |
diff --git a/sci-chemistry/ambertools/files/ambertools-1.5-bugfix_28.patch b/sci-chemistry/ambertools/files/ambertools-1.5-bugfix_28.patch |
201 |
new file mode 100644 |
202 |
index 0000000..f186f33 |
203 |
--- /dev/null |
204 |
+++ b/sci-chemistry/ambertools/files/ambertools-1.5-bugfix_28.patch |
205 |
@@ -0,0 +1,23 @@ |
206 |
+diff -urN amber11.orig/AmberTools/src/mmpbsa_py/MMPBSA_mods/amberoutputs.py amber11/AmberTools/src/mmpbsa_py/MMPBSA_mods/amberoutputs.py |
207 |
+--- amber11.orig/AmberTools/src/mmpbsa_py/MMPBSA_mods/amberoutputs.py 2012-08-28 13:38:00.864249769 +0300 |
208 |
++++ amber11/AmberTools/src/mmpbsa_py/MMPBSA_mods/amberoutputs.py 2012-08-28 13:39:15.141238742 +0300 |
209 |
+@@ -2311,7 +2311,7 @@ |
210 |
+ def _tot_stdevs(self): |
211 |
+ """ Returns the standard deviations of the total based on whether or not we were able to |
212 |
+ calculate all frames or not. Use a sample stdev if we were, sum-of-squares if we weren't """ |
213 |
+- if len(self.com_data) != len(self.rec_data) or len(self.com_data) != len(self.lig_data): |
214 |
++ if len(self.com_data[0]) != len(self.rec_data[0]) or len(self.com_data[0]) != len(self.lig_data[0]): |
215 |
+ return math.sqrt(abs(_stdev(self.com_data[0]) ** 2 + _stdev(self.rec_data[0]) ** 2 + _stdev(self.lig_data[0]) ** 2)) |
216 |
+ |
217 |
+ sum = sum2 = 0 |
218 |
+@@ -2319,8 +2319,8 @@ |
219 |
+ sum += self.com_data[0][i] - self.rec_data[0][i] - self.lig_data[0][i] |
220 |
+ sum2 += (self.com_data[0][i] - self.rec_data[0][i] - self.lig_data[0][i]) ** 2 |
221 |
+ |
222 |
+- avg = sum / len(self.com_data) |
223 |
+- return math.sqrt(abs(sum2 / len(self.com_data) - avg * avg)) |
224 |
++ avg = sum / len(self.com_data[0]) |
225 |
++ return math.sqrt(abs(sum2 / len(self.com_data[0]) - avg * avg)) |
226 |
+ |
227 |
+ #============================== |
228 |
+ |