summaryrefslogtreecommitdiff
path: root/science/elk/Makefile
blob: eda27ada6f38729bddec64549fe6aace00ddfe67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# $FreeBSD$

PORTNAME=	elk
DISTVERSION=	5.2.14
PORTREVISION=	3
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 <bsd.port.mk>