aboutsummaryrefslogtreecommitdiffstats
path: root/french/med/Makefile
blob: a4f9fd607ee4904c4332b050e8d49d8d105fd8bb (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
# New ports collection makefile for:    med
# Date created:     Thu Jun 26 2003
# Whom:         thierry@pompo.net
#
# $FreeBSD$
#

PORTNAME=   med
PORTVERSION=    2.3.4
CATEGORIES= french science
MASTER_SITES=   http://www.code-aster.org/V2/UPLOAD/DOC/Telechargement/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Modelisation et Echanges de Donnees

BUILD_DEPENDS=  wish${TK_VER}:${PORTSDIR}/x11-toolkits/tk${SHORT_TK_VER}
LIB_DEPENDS=    hdf5.0:${PORTSDIR}/science/hdf5
RUN_DEPENDS=    wish${TK_VER}:${PORTSDIR}/x11-toolkits/tk${SHORT_TK_VER}

TK_VER?=    8.4
SHORT_TK_VER=   ${TK_VER:S/.//}

USE_FORTRAN=    yes
FFLAGS+=    -O2

CONFIGURE_ENV=  HDF5HOME=${LOCALBASE} CPPFLAGS="${PTHREAD_CFLAGS}"  \
        LDFLAGS="${PTHREAD_LIBS}" WISH=${LOCALBASE}/bin/wish${TK_VER}   \
        FC="${FC}" F77="${F77}" FFLAGS="${FFLAGS}"
CONFIGURE_ARGS= --with-f90=${FC} --docdir=${DOCSDIR}
GNU_CONFIGURE=  yes
USE_GMAKE=  yes
USE_AUTOTOOLS=  autoconf:262 libtool:15
USE_LDCONFIG=   yes

DOC2FIX=    . gif html jpg png tests
TST2FIX=    c f

PORTDOCS=   *
PORTEXAMPLES=   *

pre-configure:
.for ext in am in
. if defined(NOPORTDOCS)
    ${REINPLACE_CMD} -e '/SUBDIRS/ s|doc||' ${WRKSRC}/Makefile.${ext}
. endif
. if defined(NOPORTEXAMPLES)
    ${REINPLACE_CMD} -e '/SUBDIRS/ s|tests||' ${WRKSRC}/Makefile.${ext}
. endif
. for dd in ${DOC2FIX}
    ${REINPLACE_CMD} -e 's|docdir = $$(datadir)/doc|docdir = @docdir@|' \
        ${WRKSRC}/doc/${dd}/Makefile.${ext}
. endfor
. for dd in ${TST2FIX}
    ${REINPLACE_CMD} -e 's|test${dd}dir = $$(bindir)/test|test${dd}dir = ${EXAMPLESDIR}/test|' \
        ${WRKSRC}/tests/${dd}/Makefile.${ext}
. endfor
.endfor

post-install:
.if !defined(NOPORTDOCS)
    @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
.endif

regression-test:
    @(cd ${BUILD_WRKSRC};   \
    ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check)

.include <bsd.port.mk>