diff --git a/science/Makefile b/science/Makefile index 9f3aa92ef9e2..2644cad29972 100644 --- a/science/Makefile +++ b/science/Makefile @@ -62,6 +62,7 @@ SUBDIR += dlpoly-classic SUBDIR += eccodes SUBDIR += ecs + SUBDIR += elk SUBDIR += epte SUBDIR += erd SUBDIR += fastcap diff --git a/science/elk/Makefile b/science/elk/Makefile new file mode 100644 index 000000000000..c47330d411a1 --- /dev/null +++ b/science/elk/Makefile @@ -0,0 +1,57 @@ +# $FreeBSD$ + +PORTNAME= elk +DISTVERSION= 5.2.14 +CATEGORIES= science +MASTER_SITES= SF/${PORTNAME}/ +PKGNAMESUFFIX= -chemistry +DIST_SUBDIR= ${PORTNAME}${PKGNAMESUFFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= All-electron full-potential linearised augmented-planewave code + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/COPYING + +USES= fortran gmake tar:tgz + +BINARY_ALIAS= make=${GMAKE} + +LDFLAGS+= ${LOCALBASE}/lib/gcc${GCC_DEFAULT}/libgcc_s.so + +OPTIONS_GROUP= PARALLEL +OPTIONS_GROUP_PARALLEL= OPENMP MPI +OPTIONS_DEFINE= DOCS EXAMPLES +OPTIONS_DEFAULT= ${OPTIONS_GROUP_PARALLEL} +PARALLEL_DESC= Enable parallelizations: + +OPENMP_VARS= OPENMP_FLAGS=-fopenmp +MPI_RUN_DEPENDS= mpirun:net/mpich + +PORTDOCS= * +PORTEXAMPLES= * + +MAKE_JOBS_UNSAFE= yes + +PLIST_FILES= bin/${PORTNAME} + +post-patch: + @${SED} 's|%%GMAKE%%|${GMAKE}|; s|%%FC%%|${FC}|; s|%%OPENMP_FLAGS%%|${OPENMP_FLAGS}|' \ + < ${FILESDIR}/make.inc.in \ + > ${WRKSRC}/make.inc + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${STAGEDIR}${PREFIX}/bin + +do-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/*.pdf ${STAGEDIR}${DOCSDIR} + +do-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} + +do-test: + @cd ${WRKSRC}/tests && ./tests.sh + +.include diff --git a/science/elk/distinfo b/science/elk/distinfo new file mode 100644 index 000000000000..0f141b7405c4 --- /dev/null +++ b/science/elk/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1537690777 +SHA256 (elk-chemistry/elk-5.2.14.tgz) = fc74362c2f0899ea8c26a023e3fd6d8a37ac2092405c03244366a81ae7d9fe2d +SIZE (elk-chemistry/elk-5.2.14.tgz) = 3910868 diff --git a/science/elk/files/make.inc.in b/science/elk/files/make.inc.in new file mode 100644 index 000000000000..b42f0c443ce2 --- /dev/null +++ b/science/elk/files/make.inc.in @@ -0,0 +1,14 @@ + +MAKE = %%GMAKE%% +F90 = %%FC%% +F90_OPTS = -O3 -ffast-math -funroll-loops %%OPENMP_FLAGS%% +F77 = %%FC%% +F77_OPTS = -O3 -ffast-math -funroll-loops %%OPENMP_FLAGS%% +AR = ar +LIB_SYS = +LIB_LPK = lapack.a blas.a +LIB_FFT = fftlib.a +SRC_OMP = +SRC_MPI = mpi_stub.f90 +SRC_libxc = libxcifc_stub.f90 +SRC_FFT = zfftifc.f90 diff --git a/science/elk/files/patch-src_Makefile b/science/elk/files/patch-src_Makefile new file mode 100644 index 000000000000..ccf3a5288c6a --- /dev/null +++ b/science/elk/files/patch-src_Makefile @@ -0,0 +1,11 @@ +--- src/Makefile.orig 2018-09-23 04:08:15 UTC ++++ src/Makefile +@@ -175,7 +175,7 @@ EXE = elk + # Targets + #------------------------------------------------------------------------------- + elk: $(OBJ) +- $(F90) $(F90_OPTS) -o $(EXE) $(OBJ) $(LIB_LPK) $(LIB_FFT) $(LIB_libxc) \ ++ $(F90) $(F90_OPTS) -o $(EXE) $(LDFLAGS) $(OBJ) $(LIB_LPK) $(LIB_FFT) $(LIB_libxc) \ + $(LIB_SYS) + + blas: diff --git a/science/elk/patch-Makefile b/science/elk/patch-Makefile new file mode 100644 index 000000000000..72b2221f7b6b --- /dev/null +++ b/science/elk/patch-Makefile @@ -0,0 +1,9 @@ +--- Makefile.orig 2018-09-23 03:56:50 UTC ++++ Makefile +@@ -1,5 +1,5 @@ + +-MAKE = make ++xMAKE = make + + include make.inc + diff --git a/science/elk/pkg-descr b/science/elk/pkg-descr new file mode 100644 index 000000000000..2c1c176e5dbe --- /dev/null +++ b/science/elk/pkg-descr @@ -0,0 +1,7 @@ +An all-electron full-potential linearised augmented-plane wave (LAPW) code with +many advanced features. Written originally at Karl-Franzens-Universitat Graz as +a milestone of the EXCITING EU Research and Training Network, the code is +designed to be as simple as possible so that new developments in the field of +density functional theory (DFT) can be added quickly and reliably. + +WWW: http://elk.sourceforge.net/