diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2018-09-08 23:28:21 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2018-09-08 23:28:21 +0000 |
commit | 6baa641f2fff511128c3caa2aebf1edf8bf521e4 (patch) | |
tree | cc4d111d67370aac848d1a0ab65a76ceda6633d5 | |
parent | eb86befbd5340240ce41899cd5f9afd426d2c7a9 (diff) | |
download | ports-6baa641f2fff511128c3caa2aebf1edf8bf521e4.tar.gz ports-6baa641f2fff511128c3caa2aebf1edf8bf521e4.zip |
Notes
-rw-r--r-- | science/Makefile | 1 | ||||
-rw-r--r-- | science/namd/Makefile | 81 | ||||
-rw-r--r-- | science/namd/distinfo | 3 | ||||
-rw-r--r-- | science/namd/files/patch-Makefile | 11 | ||||
-rw-r--r-- | science/namd/files/patch-config | 11 | ||||
-rw-r--r-- | science/namd/pkg-descr | 8 |
6 files changed, 115 insertions, 0 deletions
diff --git a/science/Makefile b/science/Makefile index 5cce108730ca..6a63245bfdf5 100644 --- a/science/Makefile +++ b/science/Makefile @@ -137,6 +137,7 @@ SUBDIR += mpb SUBDIR += mpqc SUBDIR += multiwfn + SUBDIR += namd SUBDIR += ncs SUBDIR += netcdf SUBDIR += netcdf-cxx diff --git a/science/namd/Makefile b/science/namd/Makefile new file mode 100644 index 000000000000..4ecb8bb3dd4c --- /dev/null +++ b/science/namd/Makefile @@ -0,0 +1,81 @@ +# $FreeBSD$ + +PORTNAME= namd +DISTVERSION= 2-12-211 +DISTVERSIONSUFFIX= -gfdf7ea56 +CATEGORIES= science + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Computer software for molecular dynamics simulation + +LICENSE= NAMD_MOLECULAR_DYNAMICS_LICENSE +LICENSE_NAME= NAMD Molecular Dynamics Software +LICENSE_FILE= ${WRKSRC}/license.txt +LICENSE_PERMS= auto-accept dist-mirror pkg-mirror + +ONLY_FOR_ARCHS= amd64 i386 +ONLY_FOR_ARCHS_REASON= Not clear if it can be built on other architectures +BROKEN_i386= need to fix the fft library handling + +FETCH_DEPENDS= git:devel/git +BUILD_DEPENDS= bash:shells/bash \ + ${LOCALBASE}/include/fftw3.h:math/fftw3 +LIB_DEPENDS= libck.so:net/charm \ + libfftw3f.so:math/fftw3-float + +USES= fortran gmake localbase:ldflags python:build shebangfix tcl +SHEBANG_FILES= config + +GIT_URL= https://charm.cs.illinois.edu/gerrit/namd.git + +ARCH_STR= Linux-${ARCH:S/amd64/x86_64/:S/i386/x86/}-g++ +ARCH_STR_CHARM= linux${ARCH:S/amd64/64/:S/i386/32/} + +PATCH_WRKSRC= ${WRKSRC} +BUILD_WRKSRC= ${WRKSRC}/${ARCH_STR} + +CFLAGS+= -D_NO_MALLOC_H -D_NO_ALLOCA_H +CXXFLAGS+= -D_NO_MALLOC_H -D_NO_ALLOCA_H + +BINARY_ALIAS= gcc=${CC} g++=${CXX} + +PLIST_FILES= bin/flipbinpdb \ + bin/flipdcd \ + bin/namd2 \ + bin/psfgen \ + bin/sortreplicas + +local-makesum: # Workaround: the generic 'make makesum' is broken when custom do-fetch is defined: it calls ${SCRIPTSDIR}/do-fetch.sh. + @${MAKE} distclean fetch makesum + +do-fetch: + @if [ "${FORCE_FETCH_ALL}" = "true" ] || ! [ -f "${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}${EXTRACT_SUFX}" ]; then \ + ${MKDIR} ${DISTDIR}/${DIST_SUBDIR} && \ + cd ${DISTDIR}/${DIST_SUBDIR} && \ + git clone -q ${GIT_URL} ${PORTNAME}-${DISTVERSIONFULL} && \ + (cd ${PORTNAME}-${DISTVERSIONFULL} && git reset -q --hard ${DISTVERSIONFULL} && ${RM} -r .git) && \ + ${FIND} ${PORTNAME}-${DISTVERSIONFULL} -and -exec ${TOUCH} -h -d 1970-01-01T00:00:00Z {} \; && \ + ${FIND} ${PORTNAME}-${DISTVERSIONFULL} -print0 | LC_ALL=C ${SORT} -z | \ + ${TAR} czf ${PORTNAME}-${DISTVERSIONFULL}${EXTRACT_SUFX} --format=bsdtar --uid 0 --gid 0 --options gzip:!timestamp --no-recursion --null -T - && \ + ${RM} -r ${PORTNAME}-${DISTVERSIONFULL}; \ + fi + +do-configure: + @cd ${WRKSRC} && ${ECHO} "CHARMBASE=${LOCALBASE}" > Make.config + @cd ${WRKSRC} && ./config ${ARCH_STR} --charm-arch multicore-${ARCH_STR_CHARM} ${ARCH:S/amd64/--with-fftw3/:S/${ARCH}//} + @${REINPLACE_CMD} 's|CHARMBASE = .*|CHARMBASE = ${LOCALBASE}|' ${WRKSRC}/Make.charm + @${REINPLACE_CMD} '\ + s|FFTDIR=.*|FFTDIR=${LOCALBASE}|; \ + s|-lsfftw|-lfft3f|; \ + s|-lsrfftw|-lrfft3f|; \ + s|TCLDIR=.*|TCLDIR=${LOCALBASE}/include/tcl8.6|; \ + s|TCLINCL=.*|TCLINCL=-I${LOCALBASE}/include/tcl8.6|; \ + s|TCLLIB=.*|TCLLIB=-L${LOCALBASE}/lib -ltcl86 -lpthread|' \ + ${WRKSRC}/arch/Linux* + +do-install: +.for e in namd2 flipbinpdb flipdcd psfgen sortreplicas + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/${e} ${STAGEDIR}${PREFIX}/bin +.endfor + +.include <bsd.port.mk> diff --git a/science/namd/distinfo b/science/namd/distinfo new file mode 100644 index 000000000000..58151ffbc17b --- /dev/null +++ b/science/namd/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1536445358 +SHA256 (namd-2-12-211-gfdf7ea56.tar.gz) = 2ab3a98f7cc9fa997088502aa87ad8cfe9218b35d4b783b7370a5d5d49f7fe15 +SIZE (namd-2-12-211-gfdf7ea56.tar.gz) = 8278948 diff --git a/science/namd/files/patch-Makefile b/science/namd/files/patch-Makefile new file mode 100644 index 000000000000..b498d03cb1ff --- /dev/null +++ b/science/namd/files/patch-Makefile @@ -0,0 +1,11 @@ +--- Makefile.orig 1970-01-01 00:00:00 UTC ++++ Makefile +@@ -435,7 +435,7 @@ LIBS = $(CUDAOBJS) $(PLUGINLIB) $(SBLIB) + + # CXX is platform dependent + CXXBASEFLAGS = $(COPTI)$(CHARMINC) $(COPTI)$(SRCDIR) $(COPTI)$(INCDIR) $(DPMTA) $(DPME) $(FMM) $(COPTI)$(PLUGININCDIR) $(COPTI)$(COLVARSINCDIR) $(COPTD)STATIC_PLUGIN $(TCL) $(PYTHON) $(FFT) $(CUDA) $(MIC) $(MEMOPT) $(CCS) $(RELEASE) $(EXTRADEFINES) $(TRACEOBJDEF) $(EXTRAINCS) $(MSA) $(CKLOOP) +-CXXFLAGS = $(CXXBASEFLAGS) $(CXXOPTS) ++CXXFLAGS += $(CXXBASEFLAGS) $(CXXOPTS) + CXXMICFLAGS = $(CXXBASEFLAGS) $(CXXOPTS) $(CXXMICOPTS) + CXXTHREADFLAGS = $(CXXBASEFLAGS) $(CXXTHREADOPTS) + CXXSIMPARAMFLAGS = $(CXXBASEFLAGS) $(CXXSIMPARAMOPTS) diff --git a/science/namd/files/patch-config b/science/namd/files/patch-config new file mode 100644 index 000000000000..c7e990283d46 --- /dev/null +++ b/science/namd/files/patch-config @@ -0,0 +1,11 @@ +--- config.orig 2018-09-07 20:23:43 UTC ++++ config +@@ -582,7 +582,7 @@ function error_exists { + if [ -n "$CHARM_OPTS" ]; then + echo "CHARMOPTS = $CHARM_OPTS" >> Make.config + fi +- echo 'CHARM = $(CHARMBASE)/$(CHARMARCH)' >> Make.config ++ echo 'CHARM = $(CHARMBASE)' >> Make.config + ARCH_SUFFIX="" + [[ "$CHARM_ARCH" == *-scyld* ]] && ARCH_SUFFIX=${ARCH_SUFFIX}-Scyld + if [[ "$CHARM_ARCH" == *-clustermatic* ]]; then diff --git a/science/namd/pkg-descr b/science/namd/pkg-descr new file mode 100644 index 000000000000..47db1bfd1a3e --- /dev/null +++ b/science/namd/pkg-descr @@ -0,0 +1,8 @@ +NAMD is computer software for molecular dynamics simulation, written using the +Charm++ parallel programming model. It is noted for its parallel efficiency and +is often used to simulate large systems (millions of atoms). It has been +developed by the collaboration of the Theoretical and Computational Biophysics +Group (TCB) and the Parallel Programming Laboratory (PPL) at the University of +Illinois at Urbana-Champaign. + +WWW: https://www.ks.uiuc.edu/Research/namd/ |