summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-chemistry/namd/namd-2.7.ebuild')
-rw-r--r--sci-chemistry/namd/namd-2.7.ebuild36
1 files changed, 22 insertions, 14 deletions
diff --git a/sci-chemistry/namd/namd-2.7.ebuild b/sci-chemistry/namd/namd-2.7.ebuild
index d8de799..07a0ec8 100644
--- a/sci-chemistry/namd/namd-2.7.ebuild
+++ b/sci-chemistry/namd/namd-2.7.ebuild
@@ -2,8 +2,6 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-# This is broken and needs work.
-
inherit eutils toolchain-funcs flag-o-matic
DESCRIPTION="A powerful and highly parallelized molecular dynamics code"
@@ -28,7 +26,7 @@ DEPEND="|| ( app-shells/csh
=sci-libs/fftw-2*
=dev-lang/tcl-8.4*"
-CHARM="charm-9999"
+# CHARM="charm-9999"
# NAMD_ARCH="Linux-amd64-g++"
NAMD_ARCH="Linux-x86_64-g++"
@@ -46,21 +44,31 @@ pkg_nofetch() {
echo
}
-src_prepare() {
- # apply a few small fixes to make NAMD compile and
+src_unpack() {
+ unpack ${A}
+ cd "${WORKDIR}"
+# apply a few small fixes to make NAMD compile and
# link to the proper libraries
-# epatch "${FILESDIR}"/namd-2.6-gentoo-amd64.patch
-
+ epatch "${FILESDIR}"/namd-2.7-gentoo.patch
+ cd "${S}"
# proper compiler and cflags
-# sed -e "s/g++/$(tc-getCXX)/" \
-# -e "s/CXXOPTS = -O3 -march=pentiumpro -ffast-math -static/CXXOPTS = ${CXXFLAGS}/" \
-# -e "s/gcc/$(tc-getCC)/" \
-# -e "s/COPTS = -O3 -march=pentiumpro -ffast-math -static/COPTS = ${CFLAGS}/" \
-# -i arch/${NAMD_ARCH}-g++.arch || \
-# die "Failed to setup ${NAMD_ARCH}.arch"
+ sed -e "s/g++/$(tc-getCXX)/" \
+ -e "s/CXXOPTS = -O3 -m64 -fexpensive-optimizations -ffast-math/CXXOPTS = ${CXXFLAGS}/" \
+ -e "s/gcc/$(tc-getCC)/" \
+ -e "s/COPTS = -O3 -m64 -fexpensive-optimizations -ffast-math/COPTS = ${CFLAGS}/" \
+ -i arch/${NAMD_ARCH}.arch || \
+ die "Failed to setup ${NAMD_ARCH}.arch"
+
+ sed -e "s/gentoo-libdir/$(get_libdir)/g" \
+ -e "s/gentoo-charm/charm-6.1.2/g" \
+ -i Makefile || die "Failed gentooizing Makefile."
+ sed -e "s/gentoo-libdir/$(get_libdir)/g" -i arch/Linux-x86_64.fftw || \
+ die "Failed gentooizing Linux-x86_64.fftw."
+ sed -e "s/gentoo-libdir/$(get_libdir)/g" -i arch/Linux-x86_64.tcl || \
+ die "Failed gentooizing Linux-x86_64.tcl."
# configure
- ./config tcl fftw ${NAMD_ARCH}
+ ./config ${NAMD_ARCH}
}
src_compile() {