Merge branch 'staged'
[dports.git] / science / pnetcdf / Makefile
1 PORTNAME=       pnetcdf
2 PORTVERSION=    1.12.3
3 PORTREVISION=   1
4 CATEGORIES=     science parallel
5 MASTER_SITES=   https://parallel-netcdf.github.io/Release/ \
6                 LOCAL/sunpoet
7
8 MAINTAINER=     sunpoet@FreeBSD.org
9 COMMENT=        Library providing high-performance I/O
10 WWW=            https://parallel-netcdf.github.io/
11
12 USES=           fortran gmake libtool pathfix perl5
13 USE_PERL5=      build
14
15 CFLAGS+=        -fPIC
16 CONFIGURE_ARGS= --with-mpi=${MPI_HOME} ac_cv_fc_compiler_nag=no
17 GNU_CONFIGURE=  yes
18 MAKE_JOBS_UNSAFE=       yes
19
20 CONFLICTS_INSTALL=      hdf-4.*
21
22 OPTIONS_SINGLE= MPI
23 OPTIONS_SINGLE_MPI=     OPENMPI MPICH
24 OPTIONS_DEFAULT=OPENMPI
25 OPTIONS_DEFAULT_armv6=  MPICH
26 OPTIONS_DEFAULT_armv7=  MPICH
27 OPTIONS_DEFAULT_i386=   MPICH
28 OPTIONS_DEFAULT_powerpc=MPICH
29 OPTIONS_EXCLUDE_armv6=  OPENMPI
30 OPTIONS_EXCLUDE_armv7=  OPENMPI
31 OPTIONS_EXCLUDE_i386=   OPENMPI
32 OPTIONS_EXCLUDE_powerpc=OPENMPI
33
34 MPICH_USES=     mpi:mpich
35 OPENMPI_USES=   mpi:openmpi
36
37 .include <bsd.port.pre.mk>
38
39 .if ${GCC_DEFAULT} >= 10
40 # Workaround for Type mismatch between actual argument at (1) and actual argument at (2) (INTEGER(8)/CHARACTER(*)).
41 FCFLAGS+=       -fallow-argument-mismatch
42 .endif
43
44 .if (${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == i386 || ${ARCH} == powerpc) && ${PORT_OPTIONS:MOPENMPI}
45 BROKEN=         Use MPICH option instead. PnetCDF requires MPI_Offset >= 8 but Open MPI sets MPI_Offset to 4 on 32-bit architecture regardless of LFS. See https://github.com/open-mpi/ompi/issues/3195 for details
46 .endif
47
48 .include <bsd.port.post.mk>