Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

NAMD v2.9 now works. Main changes to ebuild:

-EAPI=4
-Split ebuild functions into finer grained ones.
-Updated patches
-Creat "obj" folder
-No need to die in EAPI=4
  • Loading branch information...
commit c750b9132051dd231e111d90672c34b4877ad985 1 parent 40bfa49
@nbigaouette authored
View
15 sci-chemistry/namd/Manifest
@@ -1,15 +1,8 @@
-AUX namd-2.6-gentoo.patch 3650 RMD160 e7cc7fa0e20b01295d6f7c83211f961720e8beaa SHA1 f5525811cc092c5125be93cdce0e8c4e22fbee38 SHA256 55fad22d757d83d786b279a50a724499fb915767ade827895d686df16fa829d9
-AUX namd-2.7-gentoo.patch 4046 RMD160 a7d087c47088d9a8df8f804e023d1a882e281e74 SHA1 333fe98dcfb54736f192f3baa82280dcab1fbd21 SHA256 9416859fa9f065f3f269441cbbb44d4f627b71c8cba29ba9e6765c08dae3611f
-AUX namd-2.7-iml-dec.patch 520 RMD160 f8f33d8e10a7c6933369c3a6b857d44243bb1c74 SHA1 2edd740e3b6cb5514bde0c4742d0ca4bf6b98126 SHA256 6be7d0a3b4dff7fa39246e7ce49afb82ff508456ebbe3983e2def1202ebb3024
-AUX namd-2.7-ldflags.patch 1547 RMD160 bfaf2ca893168e1a652e75a186817d8149af94d8 SHA1 a0ce28bcc65e1cb7ff5c61723e602c26f5eef16b SHA256 ce2fd68cf2bf0c459c65caef4e71010b2ae5bf3c2c16770d44ca461291b9b924
-AUX namd-2.7_beta2-gentoo.patch 4409 RMD160 301bc17156f10a552eae4c2b3ed91ed2ea9fae6a SHA1 3cb0deb35e690156cf1a41e35482fab42480e3af SHA256 c56728dbf426540f9558db31f7e45cacc654112022f42917e715dbaa6c05373d
-AUX namd-2.8-gentoo.patch 4083 RMD160 736e9aed3da973b58f01bf57907bf307980b5354 SHA1 3916a0f8dce506e9dfcdf56c34e279eb1c578827 SHA256 c8e5c6b27d32098203709aa898f024b93de590b3a337682252a66cff5b100be5
-AUX namd-2.8-ldflags.patch 1735 RMD160 130707ed9c3b91ab069af350d7a5e703515287f6 SHA1 b07e95a2efe999102384da7e99ede609eac3ee14 SHA256 48ea2c9195001c537e013238950a53910c19705f8d4d9e5db9988e5f3fb73ae5
-AUX namd-barrier-fix-gentoo.patch 2362 RMD160 c6b045a0f2ec9f29bf7f98db7a71c1533f2a20d3 SHA1 5d42ef58f08914ecdf4afe735345ff1264389544 SHA256 f0186fada88b387c0681095174be336d61b2968197d223c15c840c1ca96e4992
-AUX namd-fftw-lib-gentoo.patch 528 RMD160 bb776e58497f0ec672bf5fc9ef22d0717d8c27ad SHA1 b8ca7a0521900bd9dbf725d9ce7ed809ff2d1aa0 SHA256 04528fd52f70cccbba1ccf844b97b256a35f9b1b85ca3ef8a56b4c9308b22696
-AUX namd-makefile-gentoo.patch 2804 RMD160 e52934e5a1aa7ed34e270dc11e780b1bdef3011d SHA1 22d5bd779a280c1287c936dd855f8359fa7b1b4e SHA256 f3945ae8fff113286847d61a00d5a749b1c3a00b65394085e56ff47a0a209250
-AUX namd-tcl-lib-gentoo.patch 576 RMD160 0992dd4103b97baed85e66a8d4fc04c3991bedd1 SHA1 f1cc944b14f7f77785f1a914d3d50f44d9929aec SHA256 7a57497410f5791b1b9fa0535e66137bd1b4c5008e0253c7467bc40af7b6ac01
+AUX namd-2.9-gentoo.patch 3900 RMD160 242982c14a3fd8aa1a9547c69ab1373774320abd SHA1 58dffc8dfc2507b6d6058711768e3e99089d2b4e SHA256 6ad6020f4d145316b1314d7ce526b7cfe11df5830f5b32f7ca1eaebd88e26322
+AUX namd-2.9-ldflags.patch 1614 RMD160 00e3d7fc373d6e5603c374d1ea3fdeb7168e5d0f SHA1 d0a502c92c481a7f2f30e7f00634f24716bd97fe SHA256 7bdae6bdcdccd6e7ea8e84c6c158990ff3bf93f85a4a5d6a7c928e828ede2dea
DIST NAMD_2.8_Source.tar.gz 8451502 RMD160 9a3e4122b29fecc273f56feb714681743d494674 SHA1 dcc7124665c44bfce7c4460415c854be97098233 SHA256 729e69c2a60866bc3c9e91c0266238dd8e6fad135693913e06853289be90a4cb
+DIST NAMD_2.9_Source.tar.gz 8814042 RMD160 8aa90101cfaeaa36fc7afdf5c09001fdc155e5cb SHA1 6abbe3d5d7fd07d16a3b056dbba4ca6cd880f78b SHA256 9ba6a1f87d4600a62847728d7c223295be214f9a72b5bb62552f74d644108424
EBUILD namd-2.8.ebuild 2988 RMD160 7104c858037aea16e52e51b4545d4029c81b7d4b SHA1 9f5b6723bdde5ef634c996fde5cdcc05f130ffeb SHA256 ab65d05d8b60431e8187204aeb3970293588a3f8b8c7ba92b71f2271372113c6
+EBUILD namd-2.9.ebuild 3147 RMD160 524d01ac0aa8beea64dc465ea9f0fcb112daa38d SHA1 a64cb63156df79db6cb85700ec42d6cb2e56cd1b SHA256 7c8a77c0646e6a2ae103867fa24d28a2e5c21fc88211a727d8de7f75f1189e79
MISC ChangeLog 2797 RMD160 050da7ba2120061612df6321b0ffd2e49c1ae9e6 SHA1 06d5dc422168a91e935ebd7d5596f4a474ce0c53 SHA256 05c0e8e730d8ba7cebcd8bb0435aa8980e686b908713cc340c222d0455ad8421
MISC metadata.xml 282 RMD160 539a53475b01291eadb86c8c53a0fbc02b4a34d4 SHA1 7f42dcea44641b8a77ab9644791344ec6ed6c327 SHA256 3c1785eb4ab63774ed3a6b1bddd602ef24cd6795f690bb3289d5a980bca06349
View
111 sci-chemistry/namd/files/namd-2.9-gentoo.patch
@@ -0,0 +1,111 @@
+diff -Naur NAMD_2.9_Source.orig//arch/Linux-x86_64.fftw NAMD_2.9_Source/arch/Linux-x86_64.fftw
+--- NAMD_2.9_Source.orig//arch/Linux-x86_64.fftw 2012-06-22 13:23:12.851258241 -0400
++++ NAMD_2.9_Source/arch/Linux-x86_64.fftw 2012-06-22 13:25:13.406292131 -0400
+@@ -1,7 +1,7 @@
+
+-FFTDIR=/Projects/namd2/fftw/linux-x86_64
++FFTDIR=/usr
+ FFTINCL=-I$(FFTDIR)/include
+-FFTLIB=-L$(FFTDIR)/lib -lsrfftw -lsfftw
++FFTLIB=-L$(FFTDIR)/gentoo-libdir -lsrfftw -lsfftw
+ FFTFLAGS=-DNAMD_FFTW
+ FFT=$(FFTINCL) $(FFTFLAGS)
+
+diff -Naur NAMD_2.9_Source.orig//arch/Linux-x86_64.tcl NAMD_2.9_Source/arch/Linux-x86_64.tcl
+--- NAMD_2.9_Source.orig//arch/Linux-x86_64.tcl 2012-06-22 13:23:12.854258097 -0400
++++ NAMD_2.9_Source/arch/Linux-x86_64.tcl 2012-06-22 13:25:38.195270984 -0400
+@@ -1,9 +1,7 @@
+
+-#TCLDIR=/Projects/namd2/tcl/tcl8.5.9-linux-x86_64
+-TCLDIR=/Projects/namd2/tcl/tcl8.5.9-linux-x86_64-threaded
++TCLDIR=/usr
+ TCLINCL=-I$(TCLDIR)/include
+-#TCLLIB=-L$(TCLDIR)/lib -ltcl8.5 -ldl
+-TCLLIB=-L$(TCLDIR)/lib -ltcl8.5 -ldl -lpthread
++TCLLIB=-L$(TCLDIR)/gentoo-libdir -ltcl8.5 -ldl -lpthread
+ TCLFLAGS=-DNAMD_TCL
+ TCL=$(TCLINCL) $(TCLFLAGS)
+
+diff -Naur NAMD_2.9_Source.orig//Makefile NAMD_2.9_Source/Makefile
+--- NAMD_2.9_Source.orig//Makefile 2012-06-22 13:23:12.859257893 -0400
++++ NAMD_2.9_Source/Makefile 2012-06-22 13:24:43.197536535 -0400
+@@ -344,10 +344,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/gentoo-charm $(COPTD)CMK_OPTIMIZE=1
++CHARMLIB = /usr/gentoo-libdir
+ CHARM_MODULES = -module NeighborLB -module HybridLB -module RefineLB -module GreedyLB
+ #CHARM_MODULES = -module msa -module NeighborLB -module HybridLB -module RefineLB -module GreedyLB
+ #MSA = -DCHARM_HAS_MSA
+@@ -370,7 +370,7 @@
+
+ # Add new executables here.
+
+-BINARIES = namd2 psfgen sortreplicas charmrun flipdcd flipbinpdb
++BINARIES = namd2 psfgen sortreplicas flipdcd flipbinpdb
+
+ # This should be rebuilt at every compile, but not on Win32.
+ BUILDINFO = $(DSTDIR)/buildinfo
+@@ -402,16 +402,9 @@
+ $(EXTRALINKLIBS) \
+ -lm -o namd2
+
+-charmrun: $(CHARM)/bin/charmrun # XXX
+- $(COPY) $(CHARM)/bin/charmrun $@
+-
+ $(LIBCUDARTSO):
+ $(COPY) $(CUDASODIR)/$(LIBCUDARTSO) $@;
+
+-WINDOWSBINARIES = namd2.exe psfgen.exe sortreplicas.exe
+-# WINDOWSBINARIES = namd2.exe psfgen.exe charmd.exe charmd_faceless.exe charmrun.exe
+-windowsbinaries: $(WINDOWSBINARIES)
+-
+ namd2.exe: $(MKINCDIR) $(MKDSTDIR) $(OBJS) $(LIBS) $(TCLDLL)
+ $(MAKEBUILDINFO)
+ $(CHARMC) -verbose \
+@@ -434,9 +427,6 @@
+ charmd_faceless.exe:
+ $(COPY) $(CHARM)/bin/charmd_faceless.exe charmd_faceless.exe
+
+-charmrun.exe:
+- $(COPY) $(CHARM)/bin/charmrun.exe charmrun.exe
+-
+ psfgen: $(MKDSTDIR) $(SBOBJS) $(PLUGINOBJS)
+ $(CC) $(SBCFLAGS) -o psfgen $(SBOBJS) $(PLUGINOBJS) $(TCLLIB) $(TCLAPPLIB) -lm
+
+@@ -665,9 +655,7 @@
+
+ DOC_FILES = README.txt announce.txt license.txt notes.txt
+
+-RELEASE_FILES = $(LIBCUDARTSO) flipdcd flipbinpdb sortreplicas psfgen charmrun namd2
+-
+-WINDOWS_RELEASE_FILES = $(LIBCUDARTSO) $(WINDOWSBINARIES) $(TCLDLL)
++RELEASE_FILES = $(LIBCUDARTSO) flipdcd flipbinpdb psfgen namd2
+
+ release: all
+ $(ECHO) Creating release $(RELEASE_DIR_NAME)
+@@ -678,17 +666,9 @@
+ for f in `find $(RELEASE_DIR_NAME)/lib -name CVS`; do \
+ /bin/rm -rf $$f; \
+ done
+- 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) $(RELEASE_DIR_NAME)/$$f; done
+
+ winrelease: winall
View
41 sci-chemistry/namd/files/namd-2.9-ldflags.patch
@@ -0,0 +1,41 @@
+--- NAMD_2.9_Source.orig/Makefile 2012-06-22 13:35:29.926895454 -0400
++++ NAMD_2.9_Source/Makefile 2012-06-22 13:36:49.415621031 -0400
+@@ -386,7 +386,7 @@
+
+ namd2: $(MKINCDIR) $(MKDSTDIR) $(OBJS) $(LIBS)
+ $(MAKEBUILDINFO)
+- $(CHARMC) -verbose -ld++-option \
++ $(CHARMC) $(LDFLAGS) -verbose -ld++-option \
+ "$(COPTI)$(CHARMINC) $(COPTI)$(INCDIR) $(COPTI)$(SRCDIR) $(CXXOPTS)" \
+ "$(CHARM_MODULES)" -language charm++ \
+ $(BUILDINFO).o \
+@@ -438,7 +438,7 @@
+ $(COPY) $(CHARM)/bin/charmrun.exe charmrun.exe
+
+ psfgen: $(MKDSTDIR) $(SBOBJS) $(PLUGINOBJS)
+- $(CC) $(SBCFLAGS) -o psfgen $(SBOBJS) $(PLUGINOBJS) $(TCLLIB) $(TCLAPPLIB) -lm
++ $(CC) $(SBCFLAGS) $(LDFLAGS) -o psfgen $(SBOBJS) $(PLUGINOBJS) $(TCLLIB) $(TCLAPPLIB) -lm
+
+ psfgen.exe: $(MKDSTDIR) $(SBOBJS) $(PLUGINOBJS) $(TCLDLL)
+ $(CC) $(SBCFLAGS) -o psfgen $(SBOBJS) $(PLUGINOBJS) $(TCLLIB) $(TCLAPPLIB) -lm
+@@ -456,17 +456,17 @@
+ $(CC) $(CFLAGS) -o diffbinpdb $(SRCDIR)/diffbinpdb.c -lm
+
+ flipdcd: $(SRCDIR)/flipdcd.c
+- $(CC) $(CFLAGS) -o $@ $(SRCDIR)/flipdcd.c || \
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRCDIR)/flipdcd.c || \
+ echo "#!/bin/sh\necho unavailable on this platform" > $@; \
+ chmod +x $@
+
+ flipbinpdb: $(SRCDIR)/flipbinpdb.c
+- $(CC) $(CFLAGS) -o $@ $(SRCDIR)/flipbinpdb.c || \
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRCDIR)/flipbinpdb.c || \
+ echo "#!/bin/sh\necho unavailable on this platform" > $@; \
+ chmod +x $@
+
+ fixdcd: $(SRCDIR)/fixdcd.c
+- $(CC) $(CFLAGS) -o fixdcd $(SRCDIR)/fixdcd.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o fixdcd $(SRCDIR)/fixdcd.c
+
+ dumpdcd: $(SRCDIR)/dumpdcd.c
+ $(CC) $(CFLAGS) -o dumpdcd $(SRCDIR)/dumpdcd.c
View
35 sci-chemistry/namd/namd-2.9.ebuild
@@ -2,6 +2,8 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
+EAPI=4
+
inherit eutils toolchain-funcs flag-o-matic
DESCRIPTION="A powerful and highly parallelized molecular dynamics code"
@@ -23,6 +25,7 @@ DEPEND="
sys-cluster/charm
=sci-libs/fftw-2*
dev-lang/tcl
+ app-shells/tcsh
cuda? (
>=x11-drivers/nvidia-drivers-270.41.19
>=dev-util/nvidia-cuda-toolkit-4.0
@@ -46,30 +49,29 @@ pkg_nofetch() {
echo
}
-src_unpack() {
- unpack ${A}
- cd "${S}"
+src_prepare() {
CHARM_VERSION=$(best_version sys-cluster/charm | cut -d- -f3)
+ elog "Using CHARM_VERSION=$CHARM_VERSION"
+ rm -f charm-*.tar || die
+
+ sed -e "s|CHARMBASE = .*|CHARMBASE = /usr/include/charm-$CHARM_VERSION|g" -i Make.charm
# apply a few small fixes to make NAMD compile and
# link to the proper libraries
- epatch "${FILESDIR}"/namd-2.8-gentoo.patch
- epatch "${FILESDIR}"/namd-2.8-ldflags.patch
- epatch "${FILESDIR}"/namd-2.7-iml-dec.patch
- sed -e "s:charm-6.2.1:charm-${CHARM_VERSION}:" \
- Make.charm || \
- die
-
- rm -f charm-6.1.3.tar || die
+ epatch "${FILESDIR}"/namd-2.9-gentoo.patch
+ epatch "${FILESDIR}"/namd-2.9-ldflags.patch
+ #epatch "${FILESDIR}"/namd-2.7-iml-dec.patch
# proper compiler and cflags
sed -e "s/g++/$(tc-getCXX)/" \
-e "s/gcc/$(tc-getCC)/" \
- -e "s/CXXOPTS = -O3 -m64 -fexpensive-optimizations -ffast-math/CXXOPTS = ${CXXFLAGS}/" \
- -e "s/COPTS = -O3 -m64 -fexpensive-optimizations -ffast-math/COPTS = ${CFLAGS}/" \
+ -e "s/CXXOPTS = .*/CXXOPTS = ${CXXFLAGS}/" \
+ -e "s/COPTS = .*/COPTS = ${CFLAGS}/" \
-i arch/${NAMD_ARCH}.arch || \
die "Failed to setup ${NAMD_ARCH}.arch"
+ #-e "s/CXXOPTS = -O3 -m64 -fexpensive-optimizations -ffast-math/CXXOPTS = ${CXXFLAGS}/" \
+ #-e "s/COPTS = -O3 -m64 -fexpensive-optimizations -ffast-math/COPTS = ${CFLAGS}/" \
sed -e "s/gentoo-libdir/$(get_libdir)/g" \
-e "s/gentoo-charm/charm-${CHARM_VERSION}/g" \
@@ -79,6 +81,11 @@ src_unpack() {
sed -e "s/gentoo-libdir/$(get_libdir)/g" -i arch/Linux-x86_64.tcl || \
die "Failed gentooizing Linux-x86_64.tcl."
+ # Make sure "obj" directory exists
+ mkdir obj
+}
+
+src_configure() {
if use cuda; then
CONFIG_OPTIONS="--with-cuda --cuda-prefix /opt/cuda"
fi
@@ -90,7 +97,7 @@ src_unpack() {
src_compile() {
# build namd
cd "${S}/${NAMD_ARCH}"
- emake || die "Failed to build namd"
+ emake -j 1
}
src_install() {
Please sign in to comment.
Something went wrong with that request. Please try again.