aboutsummaryrefslogtreecommitdiffstats
path: root/cad/elmerfem/Makefile
blob: 12c89049ee752ae18dacef30089115e25919448e (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
# Created by: Pedro Giffuni
# $FreeBSD$

PORTNAME=   elmerfem
PORTVERSION=    8.3.20170519
CATEGORIES= cad science

MAINTAINER= ports@FreeBSD.org
COMMENT=    ELMER FEM package

LICENSE=    GPLv2

LIB_DEPENDS=    libparpack.so:math/arpack-ng-mpich  \
        libmpich.so.8:net/mpich2

USE_GITHUB= yes
GH_ACCOUNT= ElmerCSC
GH_TAGNAME= c30fff2

USES=       blaslapack:netlib cmake fortran gmake tcl

USE_LDCONFIG=   ${PREFIX}/lib/elmersolver
ALL_TARGET= # empty

.if !defined(MAINTAINER_MODE)
CMAKE_ARGS+=    -Wno-dev
.endif

.include <bsd.port.pre.mk>

.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
CFLAGS_${ARCH}= -fPIC
CXXFLAGS_${ARCH}= -fPIC
FCFLAGS+=   -fPIC
FFLAGS+=    -fPIC
.endif

LDFLAGS+=   -L${LOCALBASE}/lib
FCPPFLAGS+= -ansi

post-install:
    ${LN} -sf ElmerSolver_mpi ${STAGEDIR}${PREFIX}/bin/ElmerSolver
    @${STRIP_CMD} ${STAGEDIR}/${PREFIX}/bin/ElmerGrid

do-test:
    cd ${WRKSRC} && ${SETENV} LD_LIBRARY_PATH=${PREFIX}/share/elmersolver/lib ${MAKE_CMD} 1dtest_Source

.include <bsd.port.post.mk>