aboutsummaryrefslogtreecommitdiff
path: root/math/freefem++/Makefile
blob: 53fa771850944bc091ed9bf67d9340811d2a0cd1 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
PORTNAME=	freefem++
DISTVERSIONPREFIX=	v
DISTVERSION=	4.11
PORTREVISION=	2
CATEGORIES=	math science

MAINTAINER=	yuri@FreeBSD.org
COMMENT=	Partial differential equation solver
WWW=		http://www.freefem.org/ff++/

LICENSE=	LGPL3

BUILD_DEPENDS=	bash:shells/bash		\
		gmm++>0:math/gmm++		\
		pipe:misc/pipe			\
		tetgen:math/tetgen
LIB_DEPENDS=	libhdf5.so:science/hdf5		\
		libamd.so:math/suitesparse-amd	\
		libcholmod.so:math/suitesparse-cholmod \
		libcolamd.so:math/suitesparse-colamd \
		libumfpack.so:math/suitesparse-umfpack	\
		libarpack.so:math/arpack-ng	\
		libfftw3.so:math/fftw3		\
		libgsl.so:math/gsl		\
		libipopt.so:math/ipopt		\
		libmetis.so:math/metis		\
		libscotch.so:cad/scotch		\
		libcmumps.so:math/mumps		\
		libnlopt.so:math/nlopt		\
		libsuperlu.so:math/superlu	\
		libsz.so:science/libaec
RUN_DEPENDS=	bash:shells/bash		\
		pipe:misc/pipe

USES=		autoreconf bison blaslapack:openblas compiler:c++11-lib fortran	\
		gl gmake localbase perl5 pkgconfig shebangfix xorg

USE_GITHUB=	yes
GH_ACCOUNT=	FreeFem
GH_PROJECT=	FreeFem-sources

SHEBANG_GLOB=	ff-pkg-download.in
SHEBANG_FILES=	examples/CheckAllEdp ./examples/misc/speedtest.sh

CPPFLAGS+=	-I${LOCALBASE}/include/superlu
.if !defined{WITH_DEBUG}
LDFLAGS+=	-s
.endif

GNU_CONFIGURE=	yes
CONFIGURE_ENV=	CNOFLAGS="${CFLAGS}" LIBS=-lz
CONFIGURE_ARGS=	--disable-download		\
		--without-mpi			\
		--with-blas=${BLASLIB}		\
		--with-lapack=${LAPACKLIB}

USE_GL=		gl glu glut

OPTIONS_DEFINE=	EXAMPLES
OPTIONS_DEFAULT=EXAMPLES

PORTEXAMPLES=	*

PLIST_SUB=	VER=${PORTVERSION}
DATADIR=	${PREFIX}/share/FreeFEM/${PORTVERSION}

TEST_TARGET=	check

pre-configure:
	@${REINPLACE_CMD} -e 's|-llapack|${LAPACKLIB}|' ${WRKSRC}/configure.ac

post-install:
	@${MV} ${STAGEDIR}${DATADIR}/examples ${STAGEDIR}${EXAMPLESDIR}

.include <bsd.port.mk>