summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Junghans <ottxor@gentoo.org>2013-10-18 16:25:04 +0000
committerChristoph Junghans <ottxor@gentoo.org>2013-10-18 16:25:04 +0000
commit05fd3f2943403663b15302a36b2cd9c779bb01e2 (patch)
tree2ffb01cd1a85459987f0d205f1d01c678f1cf21f /sci-chemistry
parenttest deps shifted to DEPEND, test_keystoneclient set to exclude in test phase... (diff)
downloadgentoo-2-05fd3f2943403663b15302a36b2cd9c779bb01e2.tar.gz
gentoo-2-05fd3f2943403663b15302a36b2cd9c779bb01e2.tar.bz2
gentoo-2-05fd3f2943403663b15302a36b2cd9c779bb01e2.zip
version bump
(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key C2000586)
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/namd/ChangeLog9
-rw-r--r--sci-chemistry/namd/files/namd-2.9-gentoo.patch151
-rw-r--r--sci-chemistry/namd/metadata.xml5
-rw-r--r--sci-chemistry/namd/namd-2.9.ebuild105
4 files changed, 267 insertions, 3 deletions
diff --git a/sci-chemistry/namd/ChangeLog b/sci-chemistry/namd/ChangeLog
index 94d3ef8d53d9..1d33e588c347 100644
--- a/sci-chemistry/namd/ChangeLog
+++ b/sci-chemistry/namd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sci-chemistry/namd
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/namd/ChangeLog,v 1.16 2013/01/11 08:11:06 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/namd/ChangeLog,v 1.17 2013/10/18 16:25:04 ottxor Exp $
+
+*namd-2.9 (18 Oct 2013)
+
+ 18 Oct 2013; Christoph Junghans <ottxor@gentoo.org>
+ +files/namd-2.9-gentoo.patch, +namd-2.9.ebuild, metadata.xml:
+ version bump
11 Jan 2013; Justin Lecher <jlec@gentoo.org> files/namd-2.7-gentoo.patch,
metadata.xml:
@@ -80,4 +86,3 @@
+metadata.xml, +namd-2.6_beta1.ebuild:
Initial import. Ebuild contributed by Markus Dittrich <markusle@gmail.com>
(bug #108033).
-
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 000000000000..583cc52645df
--- /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
index 51fdedab1b38..34d4431685e4 100644
--- a/sci-chemistry/namd/metadata.xml
+++ b/sci-chemistry/namd/metadata.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>sci-chemistry</herd>
+ <herd>sci-chemistry</herd>
+ <maintainer>
+ <email>nicolasbock@gmail.com</email>
+ </maintainer>
</pkgmetadata>
diff --git a/sci-chemistry/namd/namd-2.9.ebuild b/sci-chemistry/namd/namd-2.9.ebuild
new file mode 100644
index 000000000000..962f6db662c6
--- /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: /var/cvsroot/gentoo-x86/sci-chemistry/namd/namd-2.9.ebuild,v 1.1 2013/10/18 16:25:04 ottxor Exp $
+
+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"
+
+SRC_URI="${MY_PN}_${PV}_Source.tar.gz"
+
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+RESTRICT="fetch"
+
+DEPEND="
+ app-shells/tcsh
+ || ( >=sys-cluster/charm-6.5.1-r2 <=sys-cluster/charm-6.5.1-r1[static-libs] )
+ 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}_${PV}_Source"
+
+pkg_nofetch() {
+ echo
+ einfo "Please download ${MY_PN}_${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 ${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
+
+ # Remove charm distribution. We don't need it.
+ 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} --charm-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
+}