aboutsummaryrefslogtreecommitdiffstats
path: root/science/netcdf/Makefile
blob: 86ef2d905292bec72b38cd2c56eef9e922032498 (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
# Created by: Thomas Gellekum <tg@FreeBSD.org>
# $FreeBSD$

PORTNAME=   netcdf
PORTVERSION=    3.6.3
PORTREVISION?=  4
CATEGORIES= science
MASTER_SITES=   http://www.unidata.ucar.edu/downloads/netcdf/ftp/ \
        ftp://ftp.unidata.ucar.edu/pub/netcdf/ \
        LOCAL/sunpoet
PKGNAMESUFFIX?= 3

MAINTAINER= sunpoet@FreeBSD.org
COMMENT?=   Library for machine-independent, array-oriented data access

CONFLICTS=  hdf-4.* netcdf-4.*
PORTSCOUT=  limit:^3\.

CONFIGURE_ARGS= --enable-shared
CPPFLAGS+=  -I${LOCALBASE}/include -fPIC -DPIC
GNU_CONFIGURE=  yes
USE_LDCONFIG=   yes

INFO=       netcdf netcdf-c netcdf-cxx netcdf-f77 netcdf-f90 \
        netcdf-install netcdf-tutorial
MAN1=       ncdump.1 ncgen.1
MAN3=       netcdf.3

OPTIONS_DEFINE= FORTRAN DOCS
FORTRAN_DESC=   Build library for Fortran

NO_STAGE=   yes
.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDOCS}
CONFIGURE_ARGS+=--enable-docs-install
.else
CONFIGURE_ARGS+=--disable-docs-install
.endif

.if ${PORT_OPTIONS:MFORTRAN}
CPPFLAGS+=  -DpgiFortran
CONFLICTS+= netcdf-3.*
MAN3+=      netcdf_f77.3 netcdf_f90.3
PLIST_SUB+= FORTRAN=""
USE_FORTRAN=    yes
.else
CONFIGURE_ARGS+=--disable-f77 --disable-f90
CONFLICTS+= netcdf-ftn-3.*
PLIST_SUB+= FORTRAN="@comment "
.endif

post-patch:
    @${REINPLACE_CMD} -e \
        '291 s/\(html_docs)\).*/\1/' \
        ${WRKSRC}/man/Makefile.in
    @${REINPLACE_CMD} -e \
        '271 s/\(info_docs\).*/html_docs\)/' \
        ${WRKSRC}/man4/Makefile.in
.if ! ${PORT_OPTIONS:MDOCS}
    @${REINPLACE_CMD} -e '790 s/install-docDATA //' \
        ${WRKSRC}/man/Makefile.in
.endif

regression-test: build
    @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} check

.include <bsd.port.mk>