aboutsummaryrefslogtreecommitdiffstats
path: root/science/fvcom/Makefile
blob: 68a21f69a8cfee97b174f6612629481cf9d2750a (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
# Created by: Jason Bacon <jwbacon@tds.net>
# $FreeBSD$

PORTNAME=   fvcom
PORTVERSION=    2.7.1
PORTREVISION?=  5
CATEGORIES= science
MASTER_SITES=   http://fvcom.smast.umassd.edu/FVCOM/index.html/
DISTNAME=   sourcecode1
DIST_SUBDIR=    fvcom

MAINTAINER= jwbacon@tds.net
COMMENT=    Unstructured Grid Finite Volume Coastal Ocean Model

# Check netcdf lib for Fortran support!
LIB_DEPENDS+=   libnetcdff.so:${PORTSDIR}/science/netcdf-fortran \
        liblapack.so:${PORTSDIR}/math/lapack \
        libblas.so:${PORTSDIR}/math/lapack

USES=       fortran
USE_GCC=    yes
WRKSRC=     ${WRKDIR}/FVCOM2.7.1/FVCOM_source

PLIST_FILES=    ${MPIPREFIX}bin/${PORTNAME}${PKGNAMESUFFIX}

RESTRICTED= Requires (free) registration

.include <bsd.port.pre.mk>

.if !exists(${DISTDIR}/${DIST_SUBDIR}/${DISTFILES})
IGNORE= may not be redistributed because of licensing reasons.\
    Please register at http://fvcom.smast.umassd.edu/FVCOM/index.html\
    in order to download the source code ${DISTFILES}\
    and place it in ${DISTDIR}/${DIST_SUBDIR}/
.endif

MAKE_JOBS_UNSAFE=   yes

post-extract:
    ${MV} ${WRKSRC}/makefile ${WRKSRC}/Makefile

post-patch:
    ${REINPLACE_CMD} -e 's|gcc|${CC}|g' \
        ${WRKDIR}/FVCOM2.7.1/METIS_source/makefile
    ${REINPLACE_CMD} -e 's|cpp|${CPP}|g' \
        ${WRKDIR}/FVCOM2.7.1/FVCOM_source/Makefile

pre-build:
    (cd ${WRKSRC}/../METIS_source && make)

do-install:
    ${MKDIR} ${STAGEDIR}${PREFIX}/${MPIPREFIX}bin
    ${INSTALL_PROGRAM} ${WRKSRC}/fvcom \
        ${STAGEDIR}${PREFIX}/${MPIPREFIX}bin/${PORTNAME}${PKGNAMESUFFIX}

.include <bsd.port.post.mk>