summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-chemistry/namd')
-rw-r--r--sci-chemistry/namd/Manifest12
-rw-r--r--sci-chemistry/namd/files/digest-namd-2.63
-rw-r--r--sci-chemistry/namd/files/namd-2.6-gentoo.patch107
-rw-r--r--sci-chemistry/namd/namd-2.6.ebuild96
4 files changed, 218 insertions, 0 deletions
diff --git a/sci-chemistry/namd/Manifest b/sci-chemistry/namd/Manifest
new file mode 100644
index 0000000..69e5f28
--- /dev/null
+++ b/sci-chemistry/namd/Manifest
@@ -0,0 +1,12 @@
+AUX namd-2.6-gentoo.patch 3650 RMD160 e7cc7fa0e20b01295d6f7c83211f961720e8beaa SHA1 f5525811cc092c5125be93cdce0e8c4e22fbee38 SHA256 55fad22d757d83d786b279a50a724499fb915767ade827895d686df16fa829d9
+MD5 5d1edba2a5c3fbaa8df6a84cbffe2d8a files/namd-2.6-gentoo.patch 3650
+RMD160 e7cc7fa0e20b01295d6f7c83211f961720e8beaa files/namd-2.6-gentoo.patch 3650
+SHA256 55fad22d757d83d786b279a50a724499fb915767ade827895d686df16fa829d9 files/namd-2.6-gentoo.patch 3650
+DIST NAMD_2.6_Source.tar.gz 8963319 RMD160 186f79322226a20398031618011104a666237298 SHA1 3b3d83fdc54a520cb6c59b34cde03c9f74d2f443 SHA256 bf353ff13eae18b5a8dc33d79d295e9fe73fb87482858309b7695ce3e24f0d0b
+EBUILD namd-2.6.ebuild 2193 RMD160 2e245c094dad8110e06b99d900a109b57f67ea6b SHA1 27122a0c038a86e02b837a170e55e0ac3bd131e3 SHA256 93691566724665f6b46c9a9dda7bb33571e40739f8ad4791725b1ab931f37763
+MD5 eeb976493bdaea80232aebfba4aeb79c namd-2.6.ebuild 2193
+RMD160 2e245c094dad8110e06b99d900a109b57f67ea6b namd-2.6.ebuild 2193
+SHA256 93691566724665f6b46c9a9dda7bb33571e40739f8ad4791725b1ab931f37763 namd-2.6.ebuild 2193
+MD5 f125c37a6c730dd4213cc69fb280de0f files/digest-namd-2.6 250
+RMD160 b71b7ad56f3f23d002ecca0ec623636690c7c895 files/digest-namd-2.6 250
+SHA256 2a4f6569fcce7447d6c81a24a115b4b410ccc4247fb4c4e5a11c63c6708aa4a1 files/digest-namd-2.6 250
diff --git a/sci-chemistry/namd/files/digest-namd-2.6 b/sci-chemistry/namd/files/digest-namd-2.6
new file mode 100644
index 0000000..9726cd1
--- /dev/null
+++ b/sci-chemistry/namd/files/digest-namd-2.6
@@ -0,0 +1,3 @@
+MD5 c7d3b5101d1de0eca045e0d2f0ffffe3 NAMD_2.6_Source.tar.gz 8963319
+RMD160 186f79322226a20398031618011104a666237298 NAMD_2.6_Source.tar.gz 8963319
+SHA256 bf353ff13eae18b5a8dc33d79d295e9fe73fb87482858309b7695ce3e24f0d0b NAMD_2.6_Source.tar.gz 8963319
diff --git a/sci-chemistry/namd/files/namd-2.6-gentoo.patch b/sci-chemistry/namd/files/namd-2.6-gentoo.patch
new file mode 100644
index 0000000..9a71de8
--- /dev/null
+++ b/sci-chemistry/namd/files/namd-2.6-gentoo.patch
@@ -0,0 +1,107 @@
+diff -Naur NAMD_2.6_Source/Makefile NAMD_2.6_Source.new/Makefile
+--- NAMD_2.6_Source/Makefile 2006-08-30 00:19:25.000000000 -0400
++++ NAMD_2.6_Source.new/Makefile 2006-09-19 15:56:17.000000000 -0400
+@@ -232,10 +232,10 @@
+ $(DSTDIR)/stringhash.o
+
+ # definitions for Charm routines
+-CHARMC = $(CHARM)/bin/charmc
+-CHARMXI = $(CHARM)/bin/charmc
+-CHARMINC = $(CHARM)/include $(COPTD)CMK_OPTIMIZE=1
+-CHARMLIB = $(CHARM)/lib
++CHARMC = /usr/bin/charmc
++CHARMXI = /usr/bin/charmc
++CHARMINC = /usr/include/charm-5.9 $(COPTD)CMK_OPTIMIZE=1
++CHARMLIB = /usr/lib
+
+ # Libraries we may have changed
+ LIBS = $(PLUGINLIB) $(DPMTALIBS) $(DPMELIBS) $(TCLDLL)
+@@ -255,7 +255,7 @@
+
+ # Add new executables here.
+
+-BINARIES = namd2 psfgen charmrun flipdcd flipbinpdb
++BINARIES = namd2 psfgen flipdcd flipbinpdb
+
+ # This should be rebuilt at every compile, but not on Win32.
+ BUILDINFO = $(DSTDIR)/buildinfo
+@@ -284,11 +284,6 @@
+ $(CHARMOPTS) \
+ -lm -o namd2
+
+-charmrun: $(CHARM)/bin/charmrun # XXX
+- $(COPY) $(CHARM)/bin/charmrun $@
+-
+-windowsbinaries: namd2.exe psfgen.exe charmd.exe charmd_faceless.exe charmrun.exe
+-
+ namd2.exe: $(INCDIR) $(DSTDIR) $(OBJS) $(LIBS)
+ $(MAKEBUILDINFO)
+ $(CHARMC) -verbose \
+@@ -309,9 +304,6 @@
+ charmd_faceless.exe:
+ $(COPY) $(CHARM)/bin/charmd_faceless.exe charmd_faceless.exe
+
+-charmrun.exe:
+- $(COPY) $(CHARM)/bin/charmrun.exe charmrun.exe
+-
+ psfgen: $(DSTDIR) $(SBOBJS)
+ $(CC) $(SBCFLAGS) -o psfgen $(SBOBJS) $(TCLLIB) $(TCLAPPLIB) -lm
+
+@@ -571,9 +563,7 @@
+
+ DOC_FILES = README.txt announce.txt license.txt notes.txt
+
+-RELEASE_FILES = flipdcd flipbinpdb psfgen charmrun namd2
+-
+-WIN32_RELEASE_FILES = namd2.exe psfgen.exe charmrun.exe charmd.exe charmd_faceless.exe $(TCLDLL)
++RELEASE_FILES = flipdcd flipbinpdb psfgen namd2
+
+ release: all
+ $(ECHO) Creating release $(RELEASE_DIR_NAME)
+@@ -582,17 +572,9 @@
+ for f in $(DOC_FILES); do cp .rootdir/$$f $(RELEASE_DIR_NAME); done
+ cp -r .rootdir/lib $(RELEASE_DIR_NAME)
+ /bin/rm -rf $(RELEASE_DIR_NAME)/lib/CVS $(RELEASE_DIR_NAME)/lib/*/CVS
+- if [ -r $(CHARM)/bin/charmd ]; then \
+- $(COPY) $(CHARM)/bin/charmd $(RELEASE_DIR_NAME); \
+- fi
+- if [ -r $(CHARM)/bin/charmd_faceless ]; then \
+- $(COPY) $(CHARM)/bin/charmd_faceless $(RELEASE_DIR_NAME); \
+- fi
+ chmod -R a+rX $(RELEASE_DIR_NAME)
+ tar cf $(RELEASE_DIR_NAME).tar $(RELEASE_DIR_NAME)
+ gzip $(RELEASE_DIR_NAME).tar
+- echo $(CHARM)
+- ls -l $(CHARM)/lib
+ -for f in $(RELEASE_FILES); do echo $$f; $(LDD) $$f; done
+
+ winrelease: winall
+diff -Naur NAMD_2.6_Source/arch/Linux-i686.fftw NAMD_2.6_Source.new/arch/Linux-i686.fftw
+--- NAMD_2.6_Source/arch/Linux-i686.fftw 2004-02-20 17:38:36.000000000 -0500
++++ NAMD_2.6_Source.new/arch/Linux-i686.fftw 2006-09-19 15:52:32.000000000 -0400
+@@ -1,7 +1,7 @@
+
+-FFTDIR=/Projects/namd2/fftw/linux
+-FFTINCL=-I$(FFTDIR)/include -I$(HOME)/fftw/include
+-FFTLIB=-L$(FFTDIR)/lib -L$(HOME)/fftw/lib -lsrfftw -lsfftw
++#FFTDIR=/Projects/namd2/fftw/linux
++FFTINCL=-I/usr/include
++FFTLIB=-L/usr/lib -lsrfftw -lsfftw
+ FFTFLAGS=-DNAMD_FFTW
+ FFT=$(FFTINCL) $(FFTFLAGS)
+
+diff -Naur NAMD_2.6_Source/arch/Linux-i686.tcl NAMD_2.6_Source.new/arch/Linux-i686.tcl
+--- NAMD_2.6_Source/arch/Linux-i686.tcl 2004-10-27 17:40:55.000000000 -0400
++++ NAMD_2.6_Source.new/arch/Linux-i686.tcl 2006-09-19 15:56:45.000000000 -0400
+@@ -1,8 +1,8 @@
+
+-TCLDIR=/Projects/namd2/tcl/linux
++#TCLDIR=/Projects/namd2/tcl/linux
+ #TCLDIR=$(HOME)/tcl/cray-xt3
+-TCLINCL=-I$(TCLDIR)/include -I$(HOME)/tcl/include
+-TCLLIB=-L$(TCLDIR)/lib -L$(HOME)/tcl/lib -ltcl8.3 -ldl
++TCLINCL=-I/usr/include
++TCLLIB=-L/usr/lib -L$(HOME)/tcl/lib -ltcl -ldl
+ TCLFLAGS=-DNAMD_TCL -DUSE_NON_CONST
+ TCL=$(TCLINCL) $(TCLFLAGS)
+
diff --git a/sci-chemistry/namd/namd-2.6.ebuild b/sci-chemistry/namd/namd-2.6.ebuild
new file mode 100644
index 0000000..c55c829
--- /dev/null
+++ b/sci-chemistry/namd/namd-2.6.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="A powerful and highly parallelized molecular dynamics code"
+LICENSE="namd"
+HOMEPAGE="http://www.ks.uiuc.edu/Research/namd/"
+
+MY_PN="NAMD"
+MY_PV="2.6"
+
+SRC_URI="${MY_PN}_${MY_PV}_Source.tar.gz"
+
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+RESTRICT="fetch"
+
+DEPEND="|| ( app-shells/csh
+ app-shells/tcsh )
+ virtual/libc
+ =sys-cluster/charm-5.9
+ =sci-libs/fftw-2*
+ =dev-lang/tcl-8.4*"
+
+CHARM="charm-5.9"
+NAMD_ARCH="Linux-i686-g++"
+
+NAMD_DOWNLOAD="http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=NAMD"
+
+S="${WORKDIR}/${MY_PN}_${MY_PV}_Source"
+
+pkg_nofetch() {
+ echo
+ einfo "Please download ${MY_PN}_${MY_PV}_Source.tar.gz from"
+ einfo "${NAMD_DOWNLOAD}"
+ einfo "after agreeing to the license and then move it to"
+ einfo "${DISTDIR}"
+ einfo "Be sure to select the ${MY_PV} version!"
+ echo
+}
+
+src_unpack() {
+ unpack ${A}
+
+ # apply a few small fixes to make NAMD compile and
+ # link to the proper libraries
+ epatch "${FILESDIR}"/namd-2.6-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}.arch || \
+ die "Failed to setup ${NAMD_ARCH}.arch"
+
+ # configure
+ ./config tcl fftw ${NAMD_ARCH}
+}
+
+src_compile() {
+ # build namd
+ cd "${S}/${NAMD_ARCH}"
+ emake || die "Failed to build namd"
+}
+
+src_install() {
+ cd "${S}/${NAMD_ARCH}"
+
+ # the binaries
+ dobin ${PN}2 psfgen flipbinpdb flipdcd || \
+ die "Failed to install binaries"
+
+ cd "${S}"
+
+ # some docs
+ dodoc announce.txt license.txt notes.txt || \
+ die "Failed to install docs"
+}
+
+pkg_postinst() {
+ echo
+ einfo "For detailed instructions on how to run and configure"
+ einfo "NAMD please consults the extensive documentation at"
+ einfo "http://www.ks.uiuc.edu/Research/namd/"
+ einfo "and the NAMD tutorials available at"
+ einfo "http://www.ks.uiuc.edu/Training/Tutorials/"
+ einfo "Have fun :)"
+ echo
+}