summaryrefslogtreecommitdiff
path: root/science/nwchem/Makefile
blob: 7f3a26fe22259a36e3f7c77daf6efdf1cd0531ef (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
59
60

PORTNAME=	nwchem
DISTVERSIONPREFIX=	v
DISTVERSION=	7.0.2
DISTVERSIONSUFFIX=	-release
CATEGORIES=	science

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	High-performance computational chemistry software

LICENSE=	ECL20
LICENSE_NAME=	Educational Community License (ECL) 2.0
LICENSE_FILE=	${WRKSRC}/../LICENSE.TXT
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept

BUILD_DEPENDS=	bash:shells/bash
LIB_DEPENDS=	libblas.so:math/blas \
		libga.so:devel/ga \
		libmpich.so:net/mpich
RUN_DEPENDS=	nwchem-data>0:science/nwchem-data

USES=		fortran gmake perl5 shebangfix
SHEBANG_FILES=	../contrib/distro-tools/build_* ../contrib/add_* config/64_to_32
SHEBANG_GLOB=	*.sh
USE_GITHUB=	yes
GH_ACCOUNT=	nwchemgit
USE_PERL5=	build

MAKEFILE=	GNUmakefile
ARCH_64BIT=	${ARCH:C/.*64.*/64/:S/${ARCH}//}
MAKE_ENV=	NWCHEM_TOP=${WRKSRC}/.. NWCHEM_MODULES=all NWCHEM_LONG_PATHS=Y NWCHEM_TARGET=LINUX${ARCH_64BIT} USE_MPI=Y USE_INTERNALBLAS=Y EXTERNAL_GA_PATH=${LOCALBASE} \
		BLAS_SIZE=4 USE_64TO32=y

SUB_FILES=	nwchemrc

WRKSRC_SUBDIR=	src

BINARY_ALIAS=	gcc=${CC} gfortran=gfortran${GCC_DEFAULT}

PLIST_FILES=	bin/nwchem etc/nwchemrc

post-extract:
	@${RM} ${WRKSRC}/atomscf/src.orig

post-patch:
	@${REINPLACE_CMD} 's|nwchrc="/etc/nwchemrc"|nwchrc="${PREFIX}/etc/nwchemrc"|' ${WRKSRC}/util/util_nwchemrc.F

pre-build:
	@cd ${WRKSRC} && \
		${SETENV} ${MAKE_ENV} ${MAKE_CMD} nwchem_config && \
		${SETENV} ${MAKE_ENV} ${MAKE_CMD} 64_to_32

do-install:
	${INSTALL_DATA} ${WRKDIR}/nwchemrc ${STAGEDIR}${PREFIX}/etc/nwchemrc
	${INSTALL_PROGRAM} ${WRKSRC}/../bin/LINUX${ARCH_64BIT}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}

do-test:
	@cd ${WRKSRC}/../QA && NWCHEM_TOP=${WRKSRC}/.. NWCHEM_TARGET=LINUX64 ./doqmtests.mpi

.include <bsd.port.mk>