diff options
-rw-r--r-- | sci-chemistry/namd/ChangeLog | 11 | ||||
-rw-r--r-- | sci-chemistry/namd/Manifest | 1 | ||||
-rw-r--r-- | sci-chemistry/namd/files/namd-2.7-iml-dec.patch | 24 | ||||
-rw-r--r-- | sci-chemistry/namd/files/namd-2.9-gentoo.patch | 151 | ||||
-rw-r--r-- | sci-chemistry/namd/metadata.xml | 5 | ||||
-rw-r--r-- | sci-chemistry/namd/namd-2.9.ebuild | 105 | ||||
-rw-r--r-- | sys-cluster/charm/ChangeLog | 4 | ||||
-rw-r--r-- | sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch | 1 |
8 files changed, 301 insertions, 1 deletions
diff --git a/sci-chemistry/namd/ChangeLog b/sci-chemistry/namd/ChangeLog new file mode 100644 index 000000000..495468268 --- /dev/null +++ b/sci-chemistry/namd/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for sci-chemistry/namd +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + +*namd-2.9 (14 Sep 2013) + + 14 Sep 2013; Nicolas Bock <nicolasbock@gmail.com> + +files/namd-2.7-iml-dec.patch, +files/namd-2.9-gentoo.patch, +metadata.xml, + +namd-2.9.ebuild: + sci-chemistry/namd-2.9: Version bump; ported patches from namd-2.7_beta2-r1 + and bumped EAPI to 5. diff --git a/sci-chemistry/namd/Manifest b/sci-chemistry/namd/Manifest new file mode 100644 index 000000000..738c167a3 --- /dev/null +++ b/sci-chemistry/namd/Manifest @@ -0,0 +1 @@ +DIST NAMD_2.9_Source.tar.gz 8814042 SHA256 9ba6a1f87d4600a62847728d7c223295be214f9a72b5bb62552f74d644108424 SHA512 0644814a2799b560d9dcf807ba0047325bc9f0a26e3831b0465d95180784f038d69595e036daac85d59cd919c92d11a0343031975d99deb1fa3052c8a649bdd6 WHIRLPOOL 5494ccb2ee2f2792fe52ad7dcfe6da9d11453f0a9b0859d30698dea56b00d92fae73465967f82bd708abee5cd4ff50b0a6ffde86451e859e2f515af203e09286 diff --git a/sci-chemistry/namd/files/namd-2.7-iml-dec.patch b/sci-chemistry/namd/files/namd-2.7-iml-dec.patch new file mode 100644 index 000000000..e5ee3bd6c --- /dev/null +++ b/sci-chemistry/namd/files/namd-2.7-iml-dec.patch @@ -0,0 +1,24 @@ +diff --git a/src/flipbinpdb.c b/src/flipbinpdb.c +index 94b71ba..01a2529 100644 +--- a/src/flipbinpdb.c ++++ b/src/flipbinpdb.c +@@ -9,6 +9,7 @@ + #include <sys/mman.h> + #include <fcntl.h> + #include <stdio.h> ++#include <stdlib.h> + + #ifndef MAP_FILE + #define MAP_FILE 0 +diff --git a/src/flipdcd.c b/src/flipdcd.c +index 8ec85b7..1c23433 100644 +--- a/src/flipdcd.c ++++ b/src/flipdcd.c +@@ -13,6 +13,7 @@ + #include <sys/mman.h> + #include <fcntl.h> + #include <stdio.h> ++#include <stdlib.h> + + #ifndef MAP_FILE + #define MAP_FILE 0 diff --git a/sci-chemistry/namd/files/namd-2.9-gentoo.patch b/sci-chemistry/namd/files/namd-2.9-gentoo.patch new file mode 100644 index 000000000..583cc5264 --- /dev/null +++ b/sci-chemistry/namd/files/namd-2.9-gentoo.patch @@ -0,0 +1,151 @@ +diff -Naur NAMD_2.9_Source.original/Make.charm NAMD_2.9_Source/Make.charm +--- NAMD_2.9_Source.original/Make.charm 2012-02-29 19:12:11.000000000 -0700 ++++ NAMD_2.9_Source/Make.charm 2013-09-13 21:23:26.000000000 -0600 +@@ -2,5 +2,5 @@ + # The config script will override this setting if there is a directory + # called charm-6.4.0 or charm in the NAMD base directory. + +-CHARMBASE = /Projects/namd2/charm-6.4.0 ++CHARMBASE = /usr/include/charm-6.4.0 + +diff -Naur NAMD_2.9_Source.original/Makefile NAMD_2.9_Source/Makefile +--- NAMD_2.9_Source.original/Makefile 2012-04-27 09:53:24.000000000 -0600 ++++ NAMD_2.9_Source/Makefile 2013-09-13 21:30:15.000000000 -0600 +@@ -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 +@@ -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 \ +@@ -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,11 +427,8 @@ + 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 ++ $(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,7 +446,7 @@ + $(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 $@ + +@@ -466,7 +456,7 @@ + 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 +@@ -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 sortreplicas 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 +diff -Naur NAMD_2.9_Source.original/arch/Linux-x86_64.fftw NAMD_2.9_Source/arch/Linux-x86_64.fftw +--- NAMD_2.9_Source.original/arch/Linux-x86_64.fftw 2009-02-21 21:16:04.000000000 -0700 ++++ NAMD_2.9_Source/arch/Linux-x86_64.fftw 2013-09-13 20:55:02.000000000 -0600 +@@ -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.original/arch/Linux-x86_64.tcl NAMD_2.9_Source/arch/Linux-x86_64.tcl +--- NAMD_2.9_Source.original/arch/Linux-x86_64.tcl 2011-06-17 14:38:43.000000000 -0600 ++++ NAMD_2.9_Source/arch/Linux-x86_64.tcl 2013-09-13 20:56:30.000000000 -0600 +@@ -1,9 +1,9 @@ + + #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 --git a/sci-chemistry/namd/metadata.xml b/sci-chemistry/namd/metadata.xml new file mode 100644 index 000000000..e42d0af60 --- /dev/null +++ b/sci-chemistry/namd/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sci-chemistry</herd> +</pkgmetadata> diff --git a/sci-chemistry/namd/namd-2.9.ebuild b/sci-chemistry/namd/namd-2.9.ebuild new file mode 100644 index 000000000..85114c26c --- /dev/null +++ b/sci-chemistry/namd/namd-2.9.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils multilib 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.9" + +SRC_URI="${MY_PN}_${MY_PV}_Source.tar.gz" + +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RESTRICT="fetch" + +DEPEND=" + app-shells/tcsh + sys-cluster/charm + sci-libs/fftw:2.1 + dev-lang/tcl" + +RDEPEND=${DEPEND} + +NAMD_ARCH="Linux-x86_64-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_prepare() { + CHARM_VERSION=$(best_version sys-cluster/charm | cut -d- -f3) + + # apply a few small fixes to make NAMD compile and + # link to the proper libraries + epatch "${FILESDIR}"/namd-2.9-gentoo.patch + epatch "${FILESDIR}"/namd-2.7-iml-dec.patch + sed \ + -e "s:charm-.\+:charm-${CHARM_VERSION}:" \ + -i Make.charm || die + + rm -f charm-6.4.0.tar || die + + # 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}/" \ + -i arch/${NAMD_ARCH}.arch || die + + sed \ + -e "s/gentoo-libdir/$(get_libdir)/g" \ + -e "s/gentoo-charm/charm-${CHARM_VERSION}/g" \ + -i Makefile || die "Failed gentooizing Makefile." + sed -e "s/gentoo-libdir/$(get_libdir)/g" -i arch/Linux-x86_64.fftw || die + sed -e "s/gentoo-libdir/$(get_libdir)/g" -i arch/Linux-x86_64.tcl || die +} + +src_configure() { + # configure + ./config ${NAMD_ARCH} || die +} + +src_compile() { + # build namd + cd "${S}/${NAMD_ARCH}" + emake +} + +src_install() { + dodoc announce.txt license.txt notes.txt + cd "${S}/${NAMD_ARCH}" + + # the binaries + dobin ${PN}2 psfgen flipbinpdb flipdcd +} + +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 +} diff --git a/sys-cluster/charm/ChangeLog b/sys-cluster/charm/ChangeLog index 3eaa44597..618de1d01 100644 --- a/sys-cluster/charm/ChangeLog +++ b/sys-cluster/charm/ChangeLog @@ -2,6 +2,10 @@ # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 14 Sep 2013; Nicolas Bock <nicolasbock@gmail.com> + files/charm-6.5.1-fix-string-parsing.patch: + sys-cluster/charm-6.5.1: Small fix in patch to make printing less verbose. + 11 Sep 2013; Nicolas Bock <nicolasbock@gmail.com> files/charm-6.5.1-fix-string-parsing.patch: sys-cluster/charm-6.5.1: Fix patch for the last time. diff --git a/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch b/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch index cfb81aafe..06bdf0df1 100644 --- a/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch +++ b/sys-cluster/charm/files/charm-6.5.1-fix-string-parsing.patch @@ -29,7 +29,6 @@ index 6837712..bf370c1 100644 + int j = 0; + for(i = 0; i < strlen(value); i++) + { -+ fprintf(stderr, "i = %d, j = %d, value[i] = \n", i, j); + if(i+1 < strlen(value)) + { + if(value[i] == '\\' && value[i+1] == 'n') |