Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Sep 2018 23:28:21 +0000 (UTC)
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r479263 - in head/science: . namd namd/files
Message-ID:  <201809082328.w88NSLVF073775@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yuri
Date: Sat Sep  8 23:28:21 2018
New Revision: 479263
URL: https://svnweb.freebsd.org/changeset/ports/479263

Log:
  New port: science/namd: Computer software for molecular dynamics simulation

Added:
  head/science/namd/
  head/science/namd/Makefile   (contents, props changed)
  head/science/namd/distinfo   (contents, props changed)
  head/science/namd/files/
  head/science/namd/files/patch-Makefile   (contents, props changed)
  head/science/namd/files/patch-config   (contents, props changed)
  head/science/namd/pkg-descr   (contents, props changed)
Modified:
  head/science/Makefile

Modified: head/science/Makefile
==============================================================================
--- head/science/Makefile	Sat Sep  8 23:26:03 2018	(r479262)
+++ head/science/Makefile	Sat Sep  8 23:28:21 2018	(r479263)
@@ -137,6 +137,7 @@
     SUBDIR += mpb
     SUBDIR += mpqc
     SUBDIR += multiwfn
+    SUBDIR += namd
     SUBDIR += ncs
     SUBDIR += netcdf
     SUBDIR += netcdf-cxx

Added: head/science/namd/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/namd/Makefile	Sat Sep  8 23:28:21 2018	(r479263)
@@ -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>

Added: head/science/namd/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/namd/distinfo	Sat Sep  8 23:28:21 2018	(r479263)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1536445358
+SHA256 (namd-2-12-211-gfdf7ea56.tar.gz) = 2ab3a98f7cc9fa997088502aa87ad8cfe9218b35d4b783b7370a5d5d49f7fe15
+SIZE (namd-2-12-211-gfdf7ea56.tar.gz) = 8278948

Added: head/science/namd/files/patch-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/namd/files/patch-Makefile	Sat Sep  8 23:28:21 2018	(r479263)
@@ -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)

Added: head/science/namd/files/patch-config
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/namd/files/patch-config	Sat Sep  8 23:28:21 2018	(r479263)
@@ -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

Added: head/science/namd/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/science/namd/pkg-descr	Sat Sep  8 23:28:21 2018	(r479263)
@@ -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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809082328.w88NSLVF073775>