Date: Tue, 4 Sep 2018 21:28:27 +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: r478991 - in head/science: . cp2k cp2k/files Message-ID: <201809042128.w84LSROA039950@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yuri Date: Tue Sep 4 21:28:27 2018 New Revision: 478991 URL: https://svnweb.freebsd.org/changeset/ports/478991 Log: New port: science/cp2k: Quantum chemistry and solid state physics software package Added: head/science/cp2k/ head/science/cp2k/Makefile (contents, props changed) head/science/cp2k/distinfo (contents, props changed) head/science/cp2k/files/ head/science/cp2k/files/patch-makefiles_Makefile (contents, props changed) head/science/cp2k/pkg-descr (contents, props changed) Modified: head/science/Makefile Modified: head/science/Makefile ============================================================================== --- head/science/Makefile Tue Sep 4 21:26:14 2018 (r478990) +++ head/science/Makefile Tue Sep 4 21:28:27 2018 (r478991) @@ -49,6 +49,7 @@ SUBDIR += clipper SUBDIR += colt SUBDIR += coot + SUBDIR += cp2k SUBDIR += crf++ SUBDIR += dalton SUBDIR += datawarrior Added: head/science/cp2k/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/cp2k/Makefile Tue Sep 4 21:28:27 2018 (r478991) @@ -0,0 +1,55 @@ +# $FreeBSD$ + +PORTNAME= cp2k +DISTVERSION= 6.1 +CATEGORIES= science +MASTER_SITES= SF/${PORTNAME}/ + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Quantum chemistry and solid state physics software package + +LICENSE= GPLv2+ + +LIB_DEPENDS= libblas.so:math/blas \ + libfftw3.so:math/fftw3 \ + liblapack.so:math/lapack + +USES= fortran gmake python:build tar:bz2 + +MAKEFILE= ${WRKSRC}/makefiles/Makefile +MAKE_ARGS= XARCH=FreeBSD-${NOLIBINT}libint-gfortran VERSION=${VERSION} FC=gfortran${GCC_DEFAULT} CC=${CC} LD=gfortran${GCC_DEFAULT} + +BUILD_WRKSRC= ${WRKSRC}/.build +INSTALL_WRKSRC= ${BUILD_WRKSRC} + +BINARY_ALIAS= python=${PYTHON_CMD} + +OPTIONS_DEFINE= LIBINT +OPTIONS_SINGLE= MULTIPROCESSING +OPTIONS_SINGLE_MULTIPROCESSING= SERIAL OPENMP # for the complete list see "3a. ARCH files" in https://www.cp2k.org/howto:compile +OPTIONS_DEFAULT= LIBINT SERIAL +MULTIPROCESSING_DESC= Multiprocessing + +LIBINT_DESC= Use libint to evaluate integrals +LIBINT_VARS_OFF= NOLIBINT=no +LIBINT_LIB_DEPENDS= libint.so:science/libint + +SERIAL_DESC= Single core (no multiprocessing) +SERIAL_VARS= VERSION=sopt + +OPENMP_VARS= VERSION=ssmp +OPENMP_LIB_DEPENDS= libomp.so:devel/openmp +OPENMP_BROKEN= undefined reference to `dfftw_plan_with_nthreads_': https://github.com/cp2k/cp2k/issues/12 (need OPENMP=on in math/fftw3 ?) + +PLIST_FILES= bin/${PORTNAME} + +post-patch: + @${REINPLACE_CMD} 's|^LIBS.*=.*|& ${LDFLAGS}|' ${WRKSRC}/arch/FreeBSD-* + +pre-build: + @${MKDIR} ${BUILD_WRKSRC} + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/exe/*/${PORTNAME}.* ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + +.include <bsd.port.mk> Added: head/science/cp2k/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/cp2k/distinfo Tue Sep 4 21:28:27 2018 (r478991) @@ -0,0 +1,3 @@ +TIMESTAMP = 1536086561 +SHA256 (cp2k-6.1.tar.bz2) = af803558e0a6b9e9d9ce8a3ab955ba32bacd179922455424e061c82c9fefa34b +SIZE (cp2k-6.1.tar.bz2) = 55139278 Added: head/science/cp2k/files/patch-makefiles_Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/cp2k/files/patch-makefiles_Makefile Tue Sep 4 21:28:27 2018 (r478991) @@ -0,0 +1,96 @@ +--- makefiles/Makefile.orig 2018-09-04 19:11:12 UTC ++++ makefiles/Makefile +@@ -11,7 +11,7 @@ SHELL = /bin/sh + # also works fine + # + CP2KHOME := $(abspath $(PWD)/..) +-ARCH := local ++XARCH := local + export VERSION=sopt + + MAKEFILE := $(CP2KHOME)/makefiles/Makefile +@@ -25,7 +25,7 @@ PRETTYOBJDIR := $(CP2KHOME)/obj/prettifi + DOXIFYOBJDIR := $(CP2KHOME)/obj/doxified + TOOLSRC := $(CP2KHOME)/tools + SRCDIR := $(CP2KHOME)/src +-EXEDIR := $(MAINEXEDIR)/$(ARCH) ++EXEDIR := $(MAINEXEDIR)/$(XARCH) + REVISION := $(shell $(CP2KHOME)/tools/build_utils/get_revision_number $(SRCDIR)) + + +@@ -39,10 +39,10 @@ EXE_NAMES := $(basename $(notdir $(ALL_E + # this only happens on stage 3 and 4 + ifneq ($(ONEVERSION),) + MODDEPS = "lower" +-include $(CP2KHOME)/arch/$(ARCH).$(ONEVERSION) +-LIBDIR := $(MAINLIBDIR)/$(ARCH)/$(ONEVERSION) +-OBJDIR := $(MAINOBJDIR)/$(ARCH)/$(ONEVERSION) +-TSTDIR := $(MAINTSTDIR)/$(ARCH)/$(ONEVERSION) ++include $(CP2KHOME)/arch/$(XARCH).$(ONEVERSION) ++LIBDIR := $(MAINLIBDIR)/$(XARCH)/$(ONEVERSION) ++OBJDIR := $(MAINOBJDIR)/$(XARCH)/$(ONEVERSION) ++TSTDIR := $(MAINTSTDIR)/$(XARCH)/$(ONEVERSION) + ifeq ($(NVCC),) + EXE_NAMES := $(basename $(notdir $(filter-out %.cu, $(ALL_EXE_FILES)))) + endif +@@ -130,7 +130,7 @@ all: dirs makedep + + # foreground testing, compilation happens in do_regtest + test: dirs +- cd $(TSTDIR); $(TOOLSRC)/regtesting/do_regtest -nosvn -quick -arch $(ARCH) -version $(ONEVERSION) -cp2kdir ../../../ $(TESTOPTS) ++ cd $(TSTDIR); $(TOOLSRC)/regtesting/do_regtest -nosvn -quick -arch $(XARCH) -version $(ONEVERSION) -cp2kdir ../../../ $(TESTOPTS) + + # background testing, compilation happens here + testbg: dirs makedep all +@@ -191,7 +191,7 @@ $(LIBDIR)/libcp2k$(ARCHIVE_EXT) : $(ALL_ + + testbg: + @echo "testing: $(ONEVERSION) : full log in $(TSTDIR)/regtest.log " +- @$(TOOLSRC)/regtesting/do_regtest -nobuild -nosvn -arch $(ARCH) -version $(ONEVERSION) -cp2kdir ../../../ $(TESTOPTS) >& $(TSTDIR)/regtest.log ++ @$(TOOLSRC)/regtesting/do_regtest -nobuild -nosvn -arch $(XARCH) -version $(ONEVERSION) -cp2kdir ../../../ $(TESTOPTS) >& $(TSTDIR)/regtest.log + @cat `grep 'regtesting location error_summary file:' $(TSTDIR)/regtest.log | awk '{print $$NF}'` + @cat `grep 'regtesting location summary file:' $(TSTDIR)/regtest.log | awk '{print $$NF}'` + @grep "Number of FAILED tests 0" $(TSTDIR)/regtest.log >& /dev/null +@@ -244,9 +244,9 @@ define get_extensions + endef + clean: + rm -rf $(LIBCUSMM_ABS_DIR)/libcusmm.cu $(LIBCUSMM_ABS_DIR)/libcusmm_part*.cu +- @echo rm -rf $(foreach v, $(VERSION), $(MAINOBJDIR)/$(ARCH)/$(v)) +- @$(foreach v, $(VERSION), $(foreach ext, $(call get_extensions, $(MAINOBJDIR)/$(ARCH)/$(v)/), $(shell rm -rf $(MAINOBJDIR)/$(ARCH)/$(v)/*.$(ext)))) +- rm -rf $(foreach v, $(VERSION), $(MAINLIBDIR)/$(ARCH)/$(v)) ++ @echo rm -rf $(foreach v, $(VERSION), $(MAINOBJDIR)/$(XARCH)/$(v)) ++ @$(foreach v, $(VERSION), $(foreach ext, $(call get_extensions, $(MAINOBJDIR)/$(XARCH)/$(v)/), $(shell rm -rf $(MAINOBJDIR)/$(XARCH)/$(v)/*.$(ext)))) ++ rm -rf $(foreach v, $(VERSION), $(MAINLIBDIR)/$(XARCH)/$(v)) + OTHER_HELP += "clean : Remove intermediate object and mod files, but not the libraries and executables, for given ARCH and VERSION" + + execlean: +@@ -258,16 +258,16 @@ OTHER_HELP += "execlean : Remove the exe + # Use this if you want to fully rebuild an executable (for a given compiler and or VERSION) + # + realclean: clean execlean +- rm -rf $(foreach v, $(VERSION), $(MAINOBJDIR)/$(ARCH)/$(v)) +- rm -rf $(foreach v, $(VERSION), $(MAINLIBDIR)/$(ARCH)/$(v)) ++ rm -rf $(foreach v, $(VERSION), $(MAINOBJDIR)/$(XARCH)/$(v)) ++ rm -rf $(foreach v, $(VERSION), $(MAINLIBDIR)/$(XARCH)/$(v)) + OTHER_HELP += "realclean : Remove all files for given ARCH and VERSION" + + testclean: +- rm -rf $(foreach v, $(VERSION), $(MAINTSTDIR)/$(ARCH)/$(v)/TEST-*) ++ rm -rf $(foreach v, $(VERSION), $(MAINTSTDIR)/$(XARCH)/$(v)/TEST-*) + OTHER_HELP += "testclean : Remove all TEST-* files for given ARCH and VERSION" + + testrealclean: testclean +- rm -rf $(foreach v, $(VERSION), $(MAINTSTDIR)/$(ARCH)/$(v)/LAST-*) ++ rm -rf $(foreach v, $(VERSION), $(MAINTSTDIR)/$(XARCH)/$(v)/LAST-*) + OTHER_HELP += "testrealclean : Remove all LAST-* and TEST-* files for given ARCH and VERSION" + + # +@@ -426,7 +426,7 @@ endif + + # some practical variables for the build + ifeq ($(CPPSHELL),) +-CPPSHELL := -D__COMPILE_ARCH="\"$(ARCH)\""\ ++CPPSHELL := -D__COMPILE_ARCH="\"$(XARCH)\""\ + -D__COMPILE_DATE="\"$(shell date)\""\ + -D__COMPILE_HOST="\"$(shell hostname)\""\ + -D__COMPILE_REVISION="\"$(strip $(REVISION))\""\ Added: head/science/cp2k/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/science/cp2k/pkg-descr Tue Sep 4 21:28:27 2018 (r478991) @@ -0,0 +1,12 @@ +CP2K is a quantum chemistry and solid state physics software package that can +perform atomistic simulations of solid state, liquid, molecular, periodic, +material, crystal, and biological systems. CP2K provides a general framework for +different modeling methods such as DFT using the mixed Gaussian and plane waves +approaches GPW and GAPW. Supported theory levels include DFTB, LDA, GGA, MP2, +RPA, semi-empirical methods (AM1, PM3, PM6, RM1, MNDO, ...), and classical force +fields (AMBER, CHARMM, ...). CP2K can do simulations of molecular dynamics, +metadynamics, Monte Carlo, Ehrenfest dynamics, vibrational analysis, core level +spectroscopy, energy minimization, and transition state optimization using NEB +or dimer method. + +WWW: https://www.cp2k.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809042128.w84LSROA039950>