summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fisette <ribosome@gentoo.org>2005-10-05 00:33:48 +0000
committerOlivier Fisette <ribosome@gentoo.org>2005-10-05 00:33:48 +0000
commitbcdb90338687cff6153200c13bfd305be3d392ed (patch)
tree1279c5a4d658e4f154ac01a5d77419bcbae44e50 /sci-chemistry/namd
parentManual Manifest commit. (diff)
downloadgentoo-2-bcdb90338687cff6153200c13bfd305be3d392ed.tar.gz
gentoo-2-bcdb90338687cff6153200c13bfd305be3d392ed.tar.bz2
gentoo-2-bcdb90338687cff6153200c13bfd305be3d392ed.zip
Initial import (bug #108033)
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'sci-chemistry/namd')
-rw-r--r--sci-chemistry/namd/ChangeLog13
-rw-r--r--sci-chemistry/namd/Manifest6
-rw-r--r--sci-chemistry/namd/files/digest-namd-2.6_beta11
-rw-r--r--sci-chemistry/namd/files/namd-barrier-fix-gentoo.patch61
-rw-r--r--sci-chemistry/namd/files/namd-fftw-lib-gentoo.patch15
-rw-r--r--sci-chemistry/namd/files/namd-makefile-gentoo.patch88
-rw-r--r--sci-chemistry/namd/files/namd-tcl-lib-gentoo.patch16
-rw-r--r--sci-chemistry/namd/metadata.xml5
-rw-r--r--sci-chemistry/namd/namd-2.6_beta1.ebuild110
9 files changed, 315 insertions, 0 deletions
diff --git a/sci-chemistry/namd/ChangeLog b/sci-chemistry/namd/ChangeLog
new file mode 100644
index 000000000000..f0c05b052772
--- /dev/null
+++ b/sci-chemistry/namd/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for sci-chemistry/namd
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/namd/ChangeLog,v 1.1 2005/10/05 00:33:48 ribosome Exp $
+
+*namd-2.6_beta1 (05 Oct 2005)
+
+ 05 Oct 2005; Olivier Fisette <ribosome@gentoo.org>
+ +files/namd-barrier-fix-gentoo.patch, +files/namd-fftw-lib-gentoo.patch,
+ +files/namd-makefile-gentoo.patch, +files/namd-tcl-lib-gentoo.patch,
+ +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/Manifest b/sci-chemistry/namd/Manifest
new file mode 100644
index 000000000000..9b32b1098955
--- /dev/null
+++ b/sci-chemistry/namd/Manifest
@@ -0,0 +1,6 @@
+MD5 555dc8c66a67227ce8f3b13f173aead5 namd-2.6_beta1.ebuild 2597
+MD5 df60c46a295673222f31348cee4dda67 files/namd-fftw-lib-gentoo.patch 528
+MD5 657770d1760ff431fb8f8972c1c11ccc files/digest-namd-2.6_beta1 70
+MD5 c1bfcdb371a5b74c577aa14d32f88d4b files/namd-barrier-fix-gentoo.patch 2362
+MD5 11475a5133058462e1e7a1fd33052974 files/namd-tcl-lib-gentoo.patch 576
+MD5 099224935074d14aa720ab88f4e36b0b files/namd-makefile-gentoo.patch 2804
diff --git a/sci-chemistry/namd/files/digest-namd-2.6_beta1 b/sci-chemistry/namd/files/digest-namd-2.6_beta1
new file mode 100644
index 000000000000..53ebf08ed8e8
--- /dev/null
+++ b/sci-chemistry/namd/files/digest-namd-2.6_beta1
@@ -0,0 +1 @@
+MD5 71fd3eb8717b27ab5af80edc5a01b5a5 NAMD_2.6b1_Source.tar.gz 8805263
diff --git a/sci-chemistry/namd/files/namd-barrier-fix-gentoo.patch b/sci-chemistry/namd/files/namd-barrier-fix-gentoo.patch
new file mode 100644
index 000000000000..40e8e68b5ba3
--- /dev/null
+++ b/sci-chemistry/namd/files/namd-barrier-fix-gentoo.patch
@@ -0,0 +1,61 @@
+# patch to fix compile error on gcc-3.x
+
+diff -Naur NAMD_2.6b1_Source/src/BackEnd.C NAMD_2.6b1_Source_patched/src/BackEnd.C
+--- NAMD_2.6b1_Source/src/BackEnd.C 2003-12-31 06:37:15.000000000 +0000
++++ NAMD_2.6b1_Source_patched/src/BackEnd.C 2005-08-22 18:59:59.000000000 +0000
+@@ -162,7 +162,7 @@
+ }
+
+ // start QD and scheduler
+-void BackEnd::barrier(void) {
++void BackEnd::namd_barrier(void) {
+ awaken();
+ suspend();
+ }
+diff -Naur NAMD_2.6b1_Source/src/BackEnd.h NAMD_2.6b1_Source_patched/src/BackEnd.h
+--- NAMD_2.6b1_Source/src/BackEnd.h 2000-01-29 00:20:05.000000000 +0000
++++ NAMD_2.6b1_Source_patched/src/BackEnd.h 2005-08-22 18:59:47.000000000 +0000
+@@ -17,7 +17,7 @@
+
+ static void suspend(void); // Let message code run...
+ static void awaken(void); // ...then return
+- static void barrier(void); // Let message code run, then return
++ static void namd_barrier(void); // Let message code run, then return
+ static void ExitSchedOn(int pe); // Tell a remote processor to stop
+ // his scheduler
+
+diff -Naur NAMD_2.6b1_Source/src/ScriptTcl.C NAMD_2.6b1_Source_patched/src/ScriptTcl.C
+--- NAMD_2.6b1_Source/src/ScriptTcl.C 2005-06-23 18:47:00.000000000 +0000
++++ NAMD_2.6b1_Source_patched/src/ScriptTcl.C 2005-08-22 19:00:21.000000000 +0000
+@@ -56,7 +56,7 @@
+ }
+
+ void ScriptTcl::barrier() {
+- BackEnd::barrier();
++ BackEnd::namd_barrier();
+ }
+
+ void ScriptTcl::initcheck() {
+diff -Naur NAMD_2.6b1_Source/src/main.C NAMD_2.6b1_Source_patched/src/main.C
+--- NAMD_2.6b1_Source/src/main.C 2005-05-27 22:56:49.000000000 +0000
++++ NAMD_2.6b1_Source_patched/src/main.C 2005-08-22 19:17:34.000000000 +0000
+@@ -67,7 +67,9 @@
+
+ #ifndef NOHOSTNAME
+ iout << iINFO <<
+- "Sending usage information to NAMD developers via UDP. Sent data is:\n"
++ "Markus says: I don't want to send usage information \n"
++ << endi;
++ iout << iINFO << "to NAMD developers :) Data not sent is:\n"
+ << endi;
+
+ char sendbuf[TBSOFT_TRACK_MAXLEN];
+@@ -88,7 +90,7 @@
+ sprintf(sendbuf, "1 %s %s %s %s %s %s %s",
+ program, versionnum, platform, numcpus, miscinfo, host, user);
+ iout << iINFO << sendbuf << "\n" << endi;
+- send_dgram(TBSOFT_TRACK_HOST, TBSOFT_TRACK_PORT, sendbuf, strlen(sendbuf));
++ //send_dgram(TBSOFT_TRACK_HOST, TBSOFT_TRACK_PORT, sendbuf, strlen(sendbuf));
+
+ #endif
+ return 0;
diff --git a/sci-chemistry/namd/files/namd-fftw-lib-gentoo.patch b/sci-chemistry/namd/files/namd-fftw-lib-gentoo.patch
new file mode 100644
index 000000000000..731ea2337e91
--- /dev/null
+++ b/sci-chemistry/namd/files/namd-fftw-lib-gentoo.patch
@@ -0,0 +1,15 @@
+# adjust paths for proper linking to fftw libs
+
+--- NAMD_2.6b1_Source/arch/Linux-i686.fftw 2004-02-20 22:38:36.000000000 +0000
++++ NAMD_2.6b1_Source_patched/arch/Linux-i686.fftw 2005-08-22 18:50:38.000000000 +0000
+@@ -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 --git a/sci-chemistry/namd/files/namd-makefile-gentoo.patch b/sci-chemistry/namd/files/namd-makefile-gentoo.patch
new file mode 100644
index 000000000000..4ee5822ccb8f
--- /dev/null
+++ b/sci-chemistry/namd/files/namd-makefile-gentoo.patch
@@ -0,0 +1,88 @@
+# provide paths for charm++ provided includes/libraries/binaries
+
+--- NAMD_2.6b1_Source-patched/Makefile 2005-07-22 18:50:58.000000000 +0000
++++ NAMD_2.6b1_Source/Makefile 2005-09-30 02:28:35.000000000 +0000
+@@ -227,10 +227,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)
+@@ -250,7 +250,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
+@@ -279,10 +279,7 @@
+ $(CHARMOPTS) \
+ -lm -o namd2
+
+-charmrun: $(CHARM)/bin/charmrun # XXX
+- $(COPY) $(CHARM)/bin/charmrun $@
+-
+-win32binaries: namd2.exe psfgen.exe charmd.exe charmd_faceless.exe charmrun.exe
++win32binaries: namd2.exe psfgen.exe charmd.exe charmd_faceless.exe
+
+ namd2.exe: $(INCDIR) $(DSTDIR) $(OBJS) $(LIBS)
+ $(MAKEBUILDINFO)
+@@ -304,9 +301,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
+
+@@ -565,9 +559,9 @@
+
+ DOC_FILES = README.txt announce.txt license.txt notes.txt
+
+-RELEASE_FILES = namd2 psfgen charmrun flipdcd flipbinpdb
++RELEASE_FILES = namd2 psfgen flipdcd flipbinpdb
+
+-WIN32_RELEASE_FILES = namd2.exe psfgen.exe charmrun.exe charmd.exe charmd_faceless.exe $(TCLDLL)
++WIN32_RELEASE_FILES = namd2.exe psfgen.exe charmd.exe charmd_faceless.exe $(TCLDLL)
+
+ release: all
+ $(ECHO) Creating release $(RELEASE_DIR_NAME)
+@@ -575,18 +569,18 @@
+ cp $(RELEASE_FILES) $(RELEASE_DIR_NAME)
+ for f in $(DOC_FILES); do cp .rootdir/$$f $(RELEASE_DIR_NAME); done
+ cp -r .rootdir/lib $(RELEASE_DIR_NAME)
+- if [ -r $(CHARM)/bin/charmd ]; then \
+- $(COPY) $(CHARM)/bin/charmd $(RELEASE_DIR_NAME); \
++ if [ -r /usr/bin/charmd ]; then \
++ $(COPY) /usr/bin/charmd $(RELEASE_DIR_NAME); \
+ fi
+- if [ -r $(CHARM)/bin/charmd_faceless ]; then \
+- $(COPY) $(CHARM)/bin/charmd_faceless $(RELEASE_DIR_NAME); \
++ if [ -r /usr/bin/charmd_faceless ]; then \
++ $(COPY) /usr/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
+- echo $(CHARM)
++ echo /usr
++ ls -l /usr/lib
++ echo /usr
+ file $(RELEASE_FILES)
+
+ winrelease: winall
diff --git a/sci-chemistry/namd/files/namd-tcl-lib-gentoo.patch b/sci-chemistry/namd/files/namd-tcl-lib-gentoo.patch
new file mode 100644
index 000000000000..0e6f0dd337e5
--- /dev/null
+++ b/sci-chemistry/namd/files/namd-tcl-lib-gentoo.patch
@@ -0,0 +1,16 @@
+# adjust paths for proper linking to tcl libs
+
+--- NAMD_2.6b1_Source/arch/Linux-i686.tcl 2004-10-27 21:40:55.000000000 +0000
++++ NAMD_2.6b1_Source_patched/arch/Linux-i686.tcl 2005-09-14 20:50:14.000000000 +0000
+@@ -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/metadata.xml b/sci-chemistry/namd/metadata.xml
new file mode 100644
index 000000000000..d369d068ffb8
--- /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</herd>
+</pkgmetadata>
diff --git a/sci-chemistry/namd/namd-2.6_beta1.ebuild b/sci-chemistry/namd/namd-2.6_beta1.ebuild
new file mode 100644
index 000000000000..f94b33ffd50e
--- /dev/null
+++ b/sci-chemistry/namd/namd-2.6_beta1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/namd/namd-2.6_beta1.ebuild,v 1.1 2005/10/05 00:33:48 ribosome Exp $
+
+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.6b1"
+
+SRC_URI="${MY_PN}_${MY_PV}_Source.tar.gz"
+
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="hardened"
+
+RESTRICT="fetch"
+
+DEPEND="app-shells/csh
+ virtual/libc
+ =sci-libs/charm-5.9
+ =sci-libs/fftw-2*
+ =dev-lang/tcl-8.4*
+ hardened? ( sys-apps/paxctl )"
+
+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-barrier-fix-gentoo.patch
+ epatch "${FILESDIR}"/namd-tcl-lib-gentoo.patch
+ epatch "${FILESDIR}"/namd-fftw-lib-gentoo.patch
+ epatch "${FILESDIR}"/namd-makefile-gentoo.patch
+
+ cd "${S}"
+
+ # for hardened turn ssp off
+ if use hardened; then
+ append-flags -fno-stack-protector-all
+ fi
+
+ # 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"
+
+ # for hardened disable MPROTECT on namd2 binary
+ if use hardened; then
+ /sbin/paxctl -PemRxS ./namd2 || \
+ die "paxctl failed on namd2"
+ fi
+}
+
+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
+}