-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
16,265 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST AmberTools-1.5.tar.bz2 121062582 SHA256 0c7d397d2e91603bb9123ae68e91af3525269e60800ced360f68c13350651d7c SHA512 3366bfe6d0ee1f9b5b99b1d6aad4111093919fe43ab5e9753c62ae815dca958bfc660a3af9db83de71690624869ee5e47af51a6c8412c6bdcb32aecbefb01677 WHIRLPOOL 192f027f5480807cd36693c6c7d8e3b809f4032ecb1a1bf97df888bd02974fbd2bc8da4ea0e9d52062dce10e969bb72cc2f1ba9c4d627f6097492175ab025120 | ||
DIST AmberTools12.tar.bz2 89175545 SHA256 aff5dbc29b5b5b29a85ae465d3e250e225cd85deb2bce828833c2dc769e81009 SHA512 4c34d460fdedf00ade847040856d4bf7df65e7370d4a696dd858fdd3612c192ddc13dabde559bc1a7ae4068ba8040ee159479e247b2c1e59ed976a5aa6344970 WHIRLPOOL 3bc134875482d00d0d1861e9d87f4fef9fdebd1f6860b2c4623f48c23f6f8673df4b23069f3e9374ef9814d500f23f986250a1bcae093597c9e0a0c9d40d6c86 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
# Copyright 1999-2012 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Header: $ | ||
|
||
EAPI=5 | ||
|
||
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:3.0 | ||
sci-chemistry/reduce" | ||
DEPEND="${RDEPEND} | ||
app-shells/tcsh | ||
dev-util/byacc | ||
dev-libs/libf2c | ||
sys-devel/ucpp" | ||
|
||
S="${WORKDIR}/amber12" | ||
|
||
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_14-26.patch" \ | ||
"${FILESDIR}/${P}-gentoo.patch" | ||
cd "${S}"/AmberTools/src | ||
rm -r \ | ||
arpack \ | ||
blas \ | ||
byacc \ | ||
lapack \ | ||
fftw-3.3 \ | ||
c9x-complex \ | ||
cifparse \ | ||
netcdf \ | ||
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: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:GENTOO_INCLUDE:${EPREFIX}/usr/include:g" \ | ||
-e "s:GENTOO_FFTW3_LIBS:$(pkg-config fftw3 --libs):" \ | ||
-e "s:fc=g77:fc=$(tc-getFC):g" \ | ||
-e "s:\$netcdfflag:$(pkg-config netcdf --libs):g" \ | ||
-e "s:NETCDF=\$netcdf:NETCDF=netcdf.mod:g" \ | ||
-i configure2 || die | ||
sed -e "s:arsecond_:arscnd_:g" \ | ||
-i sff/time.c \ | ||
-i sff/sff.h \ | ||
-i sff/sff.c || die | ||
|
||
local myconf="--no-updates" | ||
|
||
use X || myconf="${myconf} -noX11" | ||
|
||
use openmp && myconf="${myconf} -openmp" | ||
|
||
cd "${S}" | ||
./configure \ | ||
${myconf} \ | ||
-nobintraj \ | ||
-nomtkpp \ | ||
gnu | ||
} | ||
|
||
src_compile() { | ||
cd "${S}"/AmberTools/src | ||
emake | ||
} | ||
|
||
src_test() { | ||
cd "${S}"/AmberTools/test | ||
emake test | ||
} | ||
|
||
src_install() { | ||
rm bin/*.py | ||
|
||
for x in bin/* | ||
do | ||
[ ! -d ${x} ] && dobin ${x} | ||
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/AmberTools12.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 | ||
} |
Oops, something went wrong.