Skip to content

Commit

Permalink
New port: science/elk: All-electron full-potential linearised augment…
Browse files Browse the repository at this point in the history
…ed-planewave code
  • Loading branch information
yurivict committed Sep 23, 2018
1 parent 1776a81 commit cd176ed
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 0 deletions.
1 change: 1 addition & 0 deletions science/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
SUBDIR += dlpoly-classic
SUBDIR += eccodes
SUBDIR += ecs
SUBDIR += elk
SUBDIR += epte
SUBDIR += erd
SUBDIR += fastcap
Expand Down
57 changes: 57 additions & 0 deletions science/elk/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# $FreeBSD$

PORTNAME= elk
DISTVERSION= 5.2.14
CATEGORIES= science
MASTER_SITES= SF/${PORTNAME}/
PKGNAMESUFFIX= -chemistry
DIST_SUBDIR= ${PORTNAME}${PKGNAMESUFFIX}

MAINTAINER= [email protected]
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 <bsd.port.mk>
3 changes: 3 additions & 0 deletions science/elk/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TIMESTAMP = 1537690777
SHA256 (elk-chemistry/elk-5.2.14.tgz) = fc74362c2f0899ea8c26a023e3fd6d8a37ac2092405c03244366a81ae7d9fe2d
SIZE (elk-chemistry/elk-5.2.14.tgz) = 3910868
14 changes: 14 additions & 0 deletions science/elk/files/make.inc.in
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions science/elk/files/patch-src_Makefile
Original file line number Diff line number Diff line change
@@ -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:
9 changes: 9 additions & 0 deletions science/elk/patch-Makefile
Original file line number Diff line number Diff line change
@@ -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

7 changes: 7 additions & 0 deletions science/elk/pkg-descr
Original file line number Diff line number Diff line change
@@ -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/

0 comments on commit cd176ed

Please sign in to comment.