aboutsummaryrefslogtreecommitdiffstats
path: root/science/isaac-cfd/Makefile
blob: 4ddfe0d6ba08a701ea592dd23f36001e722cfa0a (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
# New ports collection makefile for:    isaac-cfd
# Date created:     19 October 2004
# Whom:         Pedro F. Giffuni
#
# $FreeBSD$
#

PORTNAME=   isaac
PORTVERSION=    4.2
PORTREVISION=   2
CATEGORIES= science
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= isaac-cfd
DISTFILES=  ${PORTNAME}src.4_2${EXTRACT_SUFX} ${PORTNAME}mk.4_2${EXTRACT_SUFX}
.ifndef NOPORTDOCS
DISTFILES+= man.4_2.ps.gz
.endif
.ifdef WITH_EXAMPLES
DISTFILES+= example_cases${EXTRACT_SUFX}
.endif
DIST_SUBDIR=    isaac-cfd
EXTRACT_ONLY=   ${PORTNAME}src.4_2${EXTRACT_SUFX} ${PORTNAME}mk.4_2${EXTRACT_SUFX}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Integrated Solution Algorithm for Arbitrary Configuration

NO_WRKSUBDIR=   yes
USE_GMAKE=  yes
MAKEFILE=   makefile
MAKE_FLAGS+=    CPPFLAGS=-I.
USE_FORTRAN=    yes

.if !defined(WITH_EXAMPLES)
PLIST_SUB=  WITH_EXAMPLES="@comment "
.else
PLIST_SUB=  WITH_EXAMPLES=""
.endif

.if defined(WITH_OPTIMIZED_FLAGS)
FFLAGS+=    -O2 -ffast-math
.endif

pre-configure:
    @${REINPLACE_CMD} -e 's+%%FC%%+${FC}+g ; s+%%FFLAGS%%+${FFLAGS}+;' \
    ${WRKSRC}/makefile
    ${FIND} ${WRKSRC} -name "*.mk" -exec    \
        ${REINPLACE_CMD} -e 's|SRC= $$(HOME)/ISAAC/src|SRC= ${WRKSRC}|; \
            s|$$(FFLAGS)|${FFLAGS} -I.|' {} \;

do-install:
    @${INSTALL_PROGRAM} ${WRKSRC}/isaac ${PREFIX}/bin/isaac
.ifndef NOPORTDOCS
    @${MKDIR} ${DOCSDIR}
    @${CP} ${DISTDIR}/${DIST_SUBDIR}/man.4_2.ps.gz ${DOCSDIR}
.endif
.ifdef WITH_EXAMPLES
    @${MKDIR} ${EXAMPLESDIR}
    @${TAR} -xzf ${DISTDIR}/${DIST_SUBDIR}/example_cases${EXTRACT_SUFX} \
        -C ${EXAMPLESDIR}/
.endif

.include <bsd.port.mk>