From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 31794138010 for ; Tue, 28 Aug 2012 16:54:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DBA48E032F; Tue, 28 Aug 2012 16:53:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9BFF5E032F for ; Tue, 28 Aug 2012 16:53:52 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9D44533D868 for ; Tue, 28 Aug 2012 16:53:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 5AE8BE543C for ; Tue, 28 Aug 2012 16:53:50 +0000 (UTC) From: "Reinis Danne" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Reinis Danne" Message-ID: <1346172696.7f1c9ec1806f79a26cb7e62a41be34d3c5677b9e.rei4dan@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-chemistry/ambertools/files/, sci-chemistry/ambertools/ X-VCS-Repository: proj/sci X-VCS-Files: sci-chemistry/ambertools/ChangeLog sci-chemistry/ambertools/ambertools-1.5-r4.ebuild sci-chemistry/ambertools/files/ambertools-1.5-bugfix_28.patch X-VCS-Directories: sci-chemistry/ambertools/files/ sci-chemistry/ambertools/ X-VCS-Committer: rei4dan X-VCS-Committer-Name: Reinis Danne X-VCS-Revision: 7f1c9ec1806f79a26cb7e62a41be34d3c5677b9e X-VCS-Branch: master Date: Tue, 28 Aug 2012 16:53:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: b43072da-7bb5-479f-bf3a-4e7aac3d44cc X-Archives-Hash: b1977753dafcae4beec2d8d9490c1847 commit: 7f1c9ec1806f79a26cb7e62a41be34d3c5677b9e Author: Reinis Danne gmail com> AuthorDate: Tue Aug 28 12:13:42 2012 +0000 Commit: Reinis Danne gmail com> CommitDate: Tue Aug 28 16:51:36 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=7f1c9ec1 ambertools: Add bugfix 28 --- sci-chemistry/ambertools/ChangeLog | 6 + sci-chemistry/ambertools/ambertools-1.5-r4.ebuild | 159 ++++++++++++++++++++ .../files/ambertools-1.5-bugfix_28.patch | 23 +++ 3 files changed, 188 insertions(+), 0 deletions(-) diff --git a/sci-chemistry/ambertools/ChangeLog b/sci-chemistry/ambertools/ChangeLog index 09fcfa6..6e9d91d 100644 --- a/sci-chemistry/ambertools/ChangeLog +++ b/sci-chemistry/ambertools/ChangeLog @@ -2,6 +2,12 @@ # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ambertools/ChangeLog,v 1.2 2011/08/02 14:42:37 alexxy Exp $ +*ambertools-1.5-r4 (28 Aug 2012) + + 28 Aug 2012; Reinis Danne +ambertools-1.5-r4.ebuild, + +files/ambertools-1.5-bugfix_28.patch: + Add bugfix 28. + 03 Mar 2012; Reinis Danne ambertools-1.5-r3.ebuild, +files/ambertools-1.5-overflow.patch: Add another buffer overflow patch. diff --git a/sci-chemistry/ambertools/ambertools-1.5-r4.ebuild b/sci-chemistry/ambertools/ambertools-1.5-r4.ebuild new file mode 100644 index 0000000..d689579 --- /dev/null +++ b/sci-chemistry/ambertools/ambertools-1.5-r4.ebuild @@ -0,0 +1,159 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/ambertools/ambertools-1.5-r1.ebuild,v 1.2 2011/08/02 14:42:37 alexxy Exp $ + +EAPI=4 + +inherit eutils fortran-2 toolchain-funcs + +DESCRIPTION="A suite for carrying out complete molecular mechanics investigations" +HOMEPAGE="http://ambermd.org/#AmberTools" +SRC_URI=" + AmberTools-${PV}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux" +IUSE="openmp X" + +RESTRICT="fetch" + +RDEPEND=" + virtual/cblas + virtual/lapack + sci-libs/clapack + sci-libs/arpack + sci-libs/cifparse-obj + sci-chemistry/mopac7 + sci-libs/netcdf + sci-libs/fftw:2.1 + sci-chemistry/reduce + virtual/fortran" +DEPEND="${RDEPEND} + dev-util/byacc + dev-libs/libf2c + sys-devel/ucpp" +S="${WORKDIR}/amber11" + +pkg_nofetch() { + einfo "Go to ${HOMEPAGE} and get ${A}" + einfo "Place it in ${DISTDIR}" +} + +pkg_setup() { + fortran-2_pkg_setup + if use openmp; then + tc-has-openmp || \ + die "Please select an openmp capable compiler like gcc[openmp]" + fi + AMBERHOME="${S}" +} + +src_prepare() { + epatch \ + "${FILESDIR}/${P}-bugfix_1-21.patch" \ + "${FILESDIR}/${P}-bugfix_22-27.patch" \ + "${FILESDIR}/${P}-bugfix_28.patch" \ + "${FILESDIR}/${P}-gentoo2.patch" \ + "${FILESDIR}/${P}-overflow.patch" + cd "${S}"/AmberTools/src + rm -r \ + arpack \ + blas \ + byacc \ + lapack \ + fftw-2.1.5 \ + fftw-3.2.2 \ + c9x-complex \ + cifparse \ + netcdf \ + pnetcdf \ + reduce \ + ucpp-1.3 \ + || die +} + +src_configure() { + cd "${S}"/AmberTools/src + sed -e "s:\\\\\$(LIBDIR)/arpack.a:-larpack:g" \ + -e "s:\\\\\$(LIBDIR)/lapack.a:$(pkg-config lapack --libs) -lclapack:g" \ + -e "s:\\\\\$(LIBDIR)/blas.a:$(pkg-config blas cblas --libs):g" \ + -e "s:\\\\\$(LIBDIR)/libdrfftw.a:${EPREFIX}/usr/$(get_libdir)/libdrfftw.a:g" \ + -e "s:\\\\\$(LIBDIR)/libdfftw.a:${EPREFIX}/usr/$(get_libdir)/libdrfftw.a:g" \ + -e "s:GENTOO_CFLAGS:${CFLAGS} -DBINTRAJ :g" \ + -e "s:GENTOO_CXXFLAGS:${CXXFLAGS}:g" \ + -e "s:GENTOO_FFLAGS:${FFLAGS}:g" \ + -e "s:GENTOO_LDFLAGS:${LDFLAGS}:g" \ + -e "s:fc=g77:fc=$(tc-getFC):g" \ + -e "s:\$netcdflib:$(pkg-config netcdf --libs):g" \ + -e "s:NETCDF=\$netcdf:NETCDF=netcdf.mod:g" \ + -i configure || die + sed -e "s:arsecond_:arscnd_:g" \ + -i sff/time.c \ + -i sff/sff.h \ + -i sff/sff.c || die + sed -e "s:\$(NAB):\$(NAB) -lrfftw:g" \ + -i nss/Makefile || die + + local myconf + + use X || myconf="${myconf} -noX11" + + use openmp && myconf="${myconf} -openmp" + + ./configure \ + ${myconf} \ + -nobintraj \ + -nomdgx \ + -nomtkpp \ + -nopython \ + -nosleap \ + gnu +} + +src_compile() { + cd "${S}"/AmberTools/src + emake || die +} + +src_test() { + cd "${S}"/AmberTools/test + make test || die +} + +src_install() { + rm -r bin/chemistry bin/MMPBSA_mods + rm bin/ante-MMPBSA.py bin/extractFrcmod.py + + for x in bin/* + do dobin ${x} || die + done + + dobin AmberTools/src/antechamber/mopac.sh + sed -e "s:\$AMBERHOME/bin/mopac:mopac7:g" \ + -i "${ED}/usr/bin/mopac.sh" || die + + # Make symlinks untill binpath for amber will be fixed + dodir /usr/share/${PN}/bin + cd "${ED}/usr/bin" + for x in * + do dosym /usr/bin/${x} /usr/share/${PN}/bin/${x} + done + cd "${S}" + + dodoc doc/AmberTools.pdf doc/leap_pg.pdf + dolib.a lib/* + insinto /usr/include/${PN} + doins include/* + insinto /usr/share/${PN} + doins -r dat + cd AmberTools + doins -r benchmarks + doins -r examples + doins -r test + + cat >> "${T}"/99ambertools <<- EOF + AMBERHOME="${EPREFIX}/usr/share/ambertools" + EOF + doenvd "${T}"/99ambertools +} diff --git a/sci-chemistry/ambertools/files/ambertools-1.5-bugfix_28.patch b/sci-chemistry/ambertools/files/ambertools-1.5-bugfix_28.patch new file mode 100644 index 0000000..f186f33 --- /dev/null +++ b/sci-chemistry/ambertools/files/ambertools-1.5-bugfix_28.patch @@ -0,0 +1,23 @@ +diff -urN amber11.orig/AmberTools/src/mmpbsa_py/MMPBSA_mods/amberoutputs.py amber11/AmberTools/src/mmpbsa_py/MMPBSA_mods/amberoutputs.py +--- amber11.orig/AmberTools/src/mmpbsa_py/MMPBSA_mods/amberoutputs.py 2012-08-28 13:38:00.864249769 +0300 ++++ amber11/AmberTools/src/mmpbsa_py/MMPBSA_mods/amberoutputs.py 2012-08-28 13:39:15.141238742 +0300 +@@ -2311,7 +2311,7 @@ + def _tot_stdevs(self): + """ Returns the standard deviations of the total based on whether or not we were able to + calculate all frames or not. Use a sample stdev if we were, sum-of-squares if we weren't """ +- if len(self.com_data) != len(self.rec_data) or len(self.com_data) != len(self.lig_data): ++ if len(self.com_data[0]) != len(self.rec_data[0]) or len(self.com_data[0]) != len(self.lig_data[0]): + return math.sqrt(abs(_stdev(self.com_data[0]) ** 2 + _stdev(self.rec_data[0]) ** 2 + _stdev(self.lig_data[0]) ** 2)) + + sum = sum2 = 0 +@@ -2319,8 +2319,8 @@ + sum += self.com_data[0][i] - self.rec_data[0][i] - self.lig_data[0][i] + sum2 += (self.com_data[0][i] - self.rec_data[0][i] - self.lig_data[0][i]) ** 2 + +- avg = sum / len(self.com_data) +- return math.sqrt(abs(sum2 / len(self.com_data) - avg * avg)) ++ avg = sum / len(self.com_data[0]) ++ return math.sqrt(abs(sum2 / len(self.com_data[0]) - avg * avg)) + + #============================== +