aboutsummaryrefslogtreecommitdiff
path: root/science/nest/Makefile
blob: 36871638a9d0106d24e6bf14972deac7d22f3eb3 (plain) (blame)
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
PORTNAME=	nest
DISTVERSIONPREFIX=	v
DISTVERSION=	3.3
PORTREVISION=	1
CATEGORIES=	science biology # NEST is used in neuroscience

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Simulator for spiking neural network models

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/LICENSE

BROKEN_i386=	https://github.com/nest/nest-simulator/issues/1205

LIB_DEPENDS=	libboost_system.so:devel/boost-libs \
		libgsl.so:math/gsl \
		libltdl.so:devel/libltdl
RUN_DEPENDS=	bash:shells/bash

USES=		cmake:testing compiler:c++11-lang ncurses pkgconfig python readline shebangfix
USE_LDCONFIG=	yes

USE_GITHUB=	yes
GH_PROJECT=	nest-simulator

SHEBANG_FILES=	bin/nest-server bin/nest-server-mpi testsuite/do_tests.sh

OPTIONS_DEFINE=		PYTHON DOCS
OPTIONS_DEFAULT=	PYTHON
OPTIONS_SUB=		yes

PYTHON_CMAKE_BOOL=	BUILD_PYTHON
PYTHON_USE=		python=cython
PYTHON_CMAKE_ON=	-DFREEBSD_PYTHON_VER:STRING=${PYTHON_VER} -DCYTHON_EXECUTABLE:STRING=${PREFIX}/bin/cython-${PYTHON_VER}

PORTDOCS=		*

.if !exists(/usr/include/omp.h)
USES+=		compiler:gcc-c++11-lib
.else
USES+=		compiler:c++11-lang
.endif

# 2 tests are known to fail, see https://github.com/nest/nest-simulator/issues/2190
# tests require the port to be installed with DOCS=ON, see https://github.com/nest/nest-simulator/issues/2191

post-install:
	@${REINPLACE_CMD} -i '' -e 's|^python3 |${PYTHON_CMD} |' ${STAGEDIR}${PREFIX}/share/nest/testsuite/do_tests.sh

.include <bsd.port.mk>