summaryrefslogtreecommitdiffstats
path: root/science/mpqc/Makefile
blob: 3f91a23fb7aabcd2c9e0678c9966c13c1a0c9071 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# New ports collection makefile for:	mpqc
# Date created:				27 April 2001
# Whom:					batman <batman@udel.edu>
#
# $FreeBSD$
#

PORTNAME=	mpqc
PORTVERSION=	2.1.2
CATEGORIES=	science parallel
MASTER_SITES=	http://aros.ca.sandia.gov/~cljanss/mpqc/distrib/
DISTFILES=      mpqc-${PORTVERSION}.tar.gz mpqc-val-2.1.0.tar.gz
.if !defined(NOPORTDOCS)
DISTFILES+= mpqc-man-${PORTVERSION}.tar.gz mpqc-html-${PORTVERSION}.tar.gz
.endif

MAINTAINER=	maho@FreeBSD.org

LIB_DEPENDS=	lapack:${PORTSDIR}/math/lapack \
		atlas:${PORTSDIR}/math/atlas

.include <bsd.port.pre.mk>

USE_BISON=	yes
USE_AUTOCONF=	yes
CONFIGURE_ARGS=	--with-cc=${CC} \
		--with-cxx=${CXX} \
		--with-f77=${F77} \
		--with-libdirs=-L${LOCALBASE}/lib \
		--with-blas="-lf77blas -latlas" \
		--with-lapack="-lalapack -lcblas" \
		--with-coptflags="${CFLAGS}" \
		--with-cxxoptflags="${CXXFLAGS}" \
		--with-f77optflags="${FFLAGS}"
USE_PERL5=	yes
USE_GMAKE=	yes
ALL_TARGET=	# empty
MPQC_COMMAND=	${PREFIX}/bin/mpqc

.include "${MASTERDIR}/files/manpages"

pre-configure:
	@${ECHO} "You can override and CFLAGS on the command line."
	@${ECHO} "Following is a recommended one."
	@${ECHO} "make CFLAGS=\"-malign-double -fexpensive-optimizations -O4 -ffast-math -funroll-loops\""

do-install:
	@cd ${WRKSRC} ; ${GMAKE} install
	@cd ${WRKSRC} ; ${GMAKE} install_devel
	@cd ${WRKDIR}/${PORTNAME}-man-${PORTVERSION}/man3/ ; ${TAR} -chf - . | \
		${TAR} -xf - -C ${PREFIX}/man/man3/
	@${MKDIR} ${PREFIX}/share/mpqc/ref
	@cd ${WRKDIR}/ref/ && ${TAR} -chf - . | \
		${TAR} -xf - -C ${PREFIX}/share/mpqc/ref

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${PREFIX}/share/doc/mpqc
	@cd ${WRKDIR}/${PORTNAME}-html-${PORTVERSION} && ${TAR} -chf - . | \
		${TAR} -xf - -C ${PREFIX}/share/doc/mpqc/
.endif

validate:   # it takes few days
	@cd ${WRKSRC}/src/bin/mpqc/validate ; ${RM} -f ref ; ${LN} -s ${WRKSRC}/../ref .
	@cd ${WRKSRC}/src/bin/mpqc/validate ; ${GMAKE} inputs
	@cd ${WRKSRC}/src/bin/mpqc/validate ; \
	for i in run/*.in ; \
	do \
	${ECHO} "Now calculating `basename $$i`"; \
	${MPQC_COMMAND} $$i > $${i%.in}.out ; \
	done
	@cd ${WRKSRC}/src/bin/mpqc/validate ; ${GMAKE} check

.include <bsd.port.post.mk>
OpenPOWER on IntegriCloud