summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Gardner <je_fro@gentoo.org>2009-06-08 01:31:45 +0000
committerJeffrey Gardner <je_fro@gentoo.org>2009-06-08 01:31:45 +0000
commit903184ee8f826ebd8b87fdcf8fe1ea4db45ae2d5 (patch)
treec989631bcce7018e1db3ae9b3b0caa2a3c3db0e8
parentremoving (diff)
downloadje_fro-903184ee8f826ebd8b87fdcf8fe1ea4db45ae2d5.tar.gz
je_fro-903184ee8f826ebd8b87fdcf8fe1ea4db45ae2d5.tar.bz2
je_fro-903184ee8f826ebd8b87fdcf8fe1ea4db45ae2d5.zip
latest for testing
svn path=/; revision=286
-rw-r--r--sci-chemistry/namd/Manifest3
-rw-r--r--sci-chemistry/namd/files/namd-2.7-gentoo.patch117
-rw-r--r--sci-chemistry/namd/namd-2.7.ebuild36
3 files changed, 141 insertions, 15 deletions
diff --git a/sci-chemistry/namd/Manifest b/sci-chemistry/namd/Manifest
index 440f6f0..011f671 100644
--- a/sci-chemistry/namd/Manifest
+++ b/sci-chemistry/namd/Manifest
@@ -1,3 +1,4 @@
AUX namd-2.6-gentoo-amd64.patch 3603 RMD160 c73b9a273716c430004d87d36551a5474e6d3288 SHA1 a815851f7ebc8bb2533f38bb24b529765f2e6c54 SHA256 17f60d6add2b777726507c5badaf4dc5e0eb947d2c49c2562eda242aa8384435
+AUX namd-2.7-gentoo.patch 4046 RMD160 a7d087c47088d9a8df8f804e023d1a882e281e74 SHA1 333fe98dcfb54736f192f3baa82280dcab1fbd21 SHA256 9416859fa9f065f3f269441cbbb44d4f627b71c8cba29ba9e6765c08dae3611f
DIST NAMD_2.7b1_Source.tar.gz 26302404 RMD160 ccb73606d3f0724c55ce022aa130656444825f5e SHA1 955e096a6c70e1e7786d10334bec3cae1eb4fff6 SHA256 cf48b659667fe9e03af27c8d434567525e924ebd08c801321c71361a8f166b2e
-EBUILD namd-2.7.ebuild 2244 RMD160 f02c25aae72ea2165d923f58d4e7c1da13e01a48 SHA1 782d153320df1a6634a3962a6868b5ea9c5305e8 SHA256 747a19d3373be9efcbdf47f8a287c1c629415eccf00ff923555e4d187adaefc0
+EBUILD namd-2.7.ebuild 2605 RMD160 c61db970aafe40781d793f9d082ec3f9d9918374 SHA1 5563379a8bc6a2ce9fc3fe595154492c64fac67b SHA256 3f1e26645d52bcffbca96d17668af948905833cd10d414dfafd73e90efef0be1
diff --git a/sci-chemistry/namd/files/namd-2.7-gentoo.patch b/sci-chemistry/namd/files/namd-2.7-gentoo.patch
new file mode 100644
index 0000000..733ee8e
--- /dev/null
+++ b/sci-chemistry/namd/files/namd-2.7-gentoo.patch
@@ -0,0 +1,117 @@
+diff -aurN NAMD_2.7b1_Source.orig/Make.charm NAMD_2.7b1_Source/Make.charm
+--- NAMD_2.7b1_Source.orig/Make.charm 2009-06-07 15:15:11.000000000 -0500
++++ NAMD_2.7b1_Source/Make.charm 2009-06-07 15:15:11.000000000 -0500
+@@ -2,5 +2,5 @@
+ # The config script will override this setting if there is a directory
+ # called charm-6.1 or charm in the NAMD base directory.
+
+-CHARMBASE = /Projects/namd2/charm-6.1
++CHARMBASE = /usr/include/charm-6.1.2
+
+diff -aurN NAMD_2.7b1_Source.orig/Makefile NAMD_2.7b1_Source/Makefile
+--- NAMD_2.7b1_Source.orig/Makefile 2009-06-07 15:15:11.000000000 -0500
++++ NAMD_2.7b1_Source/Makefile 2009-06-07 15:15:11.000000000 -0500
+@@ -297,10 +297,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
+
+ # Libraries we may have changed
+ LIBS = $(CUDAOBJS) $(PLUGINLIB) $(DPMTALIBS) $(DPMELIBS) $(TCLDLL)
+@@ -320,7 +320,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
+@@ -351,14 +351,6 @@
+ $(CHARMOPTS) \
+ -lm -o namd2
+
+-charmrun: $(CHARM)/bin/charmrun # XXX
+- $(COPY) $(CHARM)/bin/charmrun $@
+-
+-WINDOWSBINARIES = namd2.exe psfgen.exe
+-# WINDOWSBINARIES = namd2.exe psfgen.exe charmd.exe charmd_faceless.exe charmrun.exe
+-
+-windowsbinaries: $(WINDOWSBINARIES)
+-
+ namd2.exe: $(INCDIR) $(DSTDIR) $(OBJS) $(LIBS) $(TCLDLL)
+ $(MAKEBUILDINFO)
+ $(CHARMC) -verbose \
+@@ -381,9 +373,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) $(PLUGINOBJS)
+ $(CC) $(SBCFLAGS) -o psfgen $(SBOBJS) $(PLUGINOBJS) $(TCLLIB) $(TCLAPPLIB) -lm
+
+@@ -700,9 +689,7 @@
+
+ DOC_FILES = README.txt announce.txt license.txt notes.txt
+
+-RELEASE_FILES = flipdcd flipbinpdb psfgen charmrun namd2
+-
+-WINDOWS_RELEASE_FILES = $(WINDOWSBINARIES) $(TCLDLL)
++RELEASE_FILES = flipdcd flipbinpdb psfgen namd2
+
+ release: all
+ $(ECHO) Creating release $(RELEASE_DIR_NAME)
+@@ -711,17 +698,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 -aurN NAMD_2.7b1_Source.orig/arch/Linux-x86_64.fftw NAMD_2.7b1_Source/arch/Linux-x86_64.fftw
+--- NAMD_2.7b1_Source.orig/arch/Linux-x86_64.fftw 2009-06-07 15:15:11.000000000 -0500
++++ NAMD_2.7b1_Source/arch/Linux-x86_64.fftw 2009-06-07 15:15:11.000000000 -0500
+@@ -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 -aurN NAMD_2.7b1_Source.orig/arch/Linux-x86_64.tcl NAMD_2.7b1_Source/arch/Linux-x86_64.tcl
+--- NAMD_2.7b1_Source.orig/arch/Linux-x86_64.tcl 2009-06-07 15:15:11.000000000 -0500
++++ NAMD_2.7b1_Source/arch/Linux-x86_64.tcl 2009-06-07 18:25:07.000000000 -0500
+@@ -1,7 +1,7 @@
+
+-TCLDIR=/Projects/namd2/tcl/linux-x86_64
++TCLDIR=/usr
+ TCLINCL=-I$(TCLDIR)/include
+-TCLLIB=-L$(TCLDIR)/lib -ltcl8.3 -ldl
++TCLLIB=-L$(TCLDIR)/gentoo-libdir -ltcl8.5 -ldl
+ TCLFLAGS=-DNAMD_TCL
+ TCL=$(TCLINCL) $(TCLFLAGS)
+
diff --git a/sci-chemistry/namd/namd-2.7.ebuild b/sci-chemistry/namd/namd-2.7.ebuild
index d8de799..07a0ec8 100644
--- a/sci-chemistry/namd/namd-2.7.ebuild
+++ b/sci-chemistry/namd/namd-2.7.ebuild
@@ -2,8 +2,6 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-# This is broken and needs work.
-
inherit eutils toolchain-funcs flag-o-matic
DESCRIPTION="A powerful and highly parallelized molecular dynamics code"
@@ -28,7 +26,7 @@ DEPEND="|| ( app-shells/csh
=sci-libs/fftw-2*
=dev-lang/tcl-8.4*"
-CHARM="charm-9999"
+# CHARM="charm-9999"
# NAMD_ARCH="Linux-amd64-g++"
NAMD_ARCH="Linux-x86_64-g++"
@@ -46,21 +44,31 @@ pkg_nofetch() {
echo
}
-src_prepare() {
- # apply a few small fixes to make NAMD compile and
+src_unpack() {
+ unpack ${A}
+ cd "${WORKDIR}"
+# apply a few small fixes to make NAMD compile and
# link to the proper libraries
-# epatch "${FILESDIR}"/namd-2.6-gentoo-amd64.patch
-
+ epatch "${FILESDIR}"/namd-2.7-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}-g++.arch || \
-# die "Failed to setup ${NAMD_ARCH}.arch"
+ sed -e "s/g++/$(tc-getCXX)/" \
+ -e "s/CXXOPTS = -O3 -m64 -fexpensive-optimizations -ffast-math/CXXOPTS = ${CXXFLAGS}/" \
+ -e "s/gcc/$(tc-getCC)/" \
+ -e "s/COPTS = -O3 -m64 -fexpensive-optimizations -ffast-math/COPTS = ${CFLAGS}/" \
+ -i arch/${NAMD_ARCH}.arch || \
+ die "Failed to setup ${NAMD_ARCH}.arch"
+
+ sed -e "s/gentoo-libdir/$(get_libdir)/g" \
+ -e "s/gentoo-charm/charm-6.1.2/g" \
+ -i Makefile || die "Failed gentooizing Makefile."
+ sed -e "s/gentoo-libdir/$(get_libdir)/g" -i arch/Linux-x86_64.fftw || \
+ die "Failed gentooizing Linux-x86_64.fftw."
+ sed -e "s/gentoo-libdir/$(get_libdir)/g" -i arch/Linux-x86_64.tcl || \
+ die "Failed gentooizing Linux-x86_64.tcl."
# configure
- ./config tcl fftw ${NAMD_ARCH}
+ ./config ${NAMD_ARCH}
}
src_compile() {