summaryrefslogtreecommitdiff
path: root/science/ALPSCore/Makefile
blob: 941a45b8e79491cc2d1859ef0ae8bedff92c7eb2 (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
# $FreeBSD$

PORTNAME=	ALPSCore
DISTVERSIONPREFIX=	v
DISTVERSION=	2.2.0
PORTREVISION=	8
CATEGORIES=	science

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Generic algorithms and utilities for condensed matter physics

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/LICENSE.TXT

BROKEN_i386=	fails to build: no matching member function for call to 'read'

LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
		libhdf5.so:science/hdf5 \
		libsz.so:science/szip

USES=		cmake compiler:c++11-lang eigen:3
USE_GITHUB=	yes
USE_LDCONFIG=	yes
TEST_TARGET=	test # 2 to 3 tests fail: https://github.com/ALPSCore/ALPSCore/issues/388

CMAKE_ARGS+=	-DTesting:BOOL=OFF # enable only for the 'test' target
CMAKE_ARGS_TEST=	-DTesting:BOOL=ON -DExtensiveTesting:BOOL=ON
CXXFLAGS+=	-DNDEBUG # see https://github.com/ALPSCore/ALPSCore/issues/389
LDFLAGS+=	-lexecinfo # https://github.com/ALPSCore/ALPSCore/issues/390

OPTIONS_DEFINE=	DOXYGEN DOCS OPENMPI2
OPTIONS_DEFAULT=	OPENMPI2
OPENMPI2_DESC=	Parallel processing support via Open MPI 2.x

DOXYGEN_IMPLIES=	DOCS
DOXYGEN_CMAKE_BOOL=	Documentation
DOXYGEN_BUILD_DEPENDS=	doxygen:devel/doxygen

OPENMPI2_CMAKE_BOOL=	ENABLE_MPI
OPENMPI2_LIB_DEPENDS=	libmpi.so:net/openmpi2

PORTDOCS=	*

.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MOPENMPI2}
CC=	${LOCALBASE}/mpi/openmpi2/bin/mpicc
CXX=	${LOCALBASE}/mpi/openmpi2/bin/mpicxx
.endif

post-install-DOXYGEN-on:
	@${RM} ${STAGEDIR}${DOCSDIR}/.tag

pre-test:
	@cd ${CONFIGURE_WRKSRC} && \
		${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} ${CMAKE_ARGS_TEST} ${CMAKE_SOURCE_PATH} && \
		${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS}

.include <bsd.port.post.mk>