aboutsummaryrefslogtreecommitdiff
path: root/science/netcdf4
diff options
context:
space:
mode:
authorLi-Wen Hsu <lwhsu@FreeBSD.org>2010-05-15 05:47:32 +0000
committerLi-Wen Hsu <lwhsu@FreeBSD.org>2010-05-15 05:47:32 +0000
commit01453a021450698b1672f3747fc8e91f304cc55d (patch)
treec8e5d21a46b1dc3ef384abe35864d59a34e418b1 /science/netcdf4
parent1493eb07a1fff8831c84aef5ac9189ca490e045b (diff)
downloadports-01453a021450698b1672f3747fc8e91f304cc55d.tar.gz
ports-01453a021450698b1672f3747fc8e91f304cc55d.zip
Notes
Diffstat (limited to 'science/netcdf4')
-rw-r--r--science/netcdf4/Makefile46
-rw-r--r--science/netcdf4/pkg-plist9
2 files changed, 37 insertions, 18 deletions
diff --git a/science/netcdf4/Makefile b/science/netcdf4/Makefile
index 964a801fb938..d7acde2c6ec2 100644
--- a/science/netcdf4/Makefile
+++ b/science/netcdf4/Makefile
@@ -13,29 +13,27 @@ MASTER_SITES= http://www.unidata.ucar.edu/downloads/netcdf/ftp/ \
http://sunpoet.net/distfiles/
MAINTAINER= sunpoet@sunpoet.net
-COMMENT= Library for machine-independent, array-oriented data access
+COMMENT?= Library for machine-independent, array-oriented data access
CONFLICTS= hdf-4.* netcdf-3.*
LATEST_LINK= netcdf4
+PORTSCOUT= limit:^4\.
-CONFIGURE_ARGS= --disable-f77 --disable-f90 \
- --enable-cxx --enable-cxx-4 --enable-netcdf-4 --enable-shared \
+CONFIGURE_ARGS= --enable-cxx --enable-cxx-4 --enable-netcdf-4 --enable-shared \
--with-hdf5=${LOCALBASE} --with-zlib=/usr
-CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include -fPIC -DPIC -Df2cFortran"
-MAKE_ENV+= MAKEINFOFLAGS="--no-split" INFODIR="${PREFIX}/${INFO_PATH}"
-
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include -fPIC -DPIC"
GNU_CONFIGURE= yes
-USE_LDCONFIG= yes
-
LIB_DEPENDS+= hdf5.6:${PORTSDIR}/science/hdf5-18
+MAKE_ENV+= MAKEINFOFLAGS="--no-split" INFODIR="${PREFIX}/${INFO_PATH}"
+USE_LDCONFIG= yes
-INFO= netcdf netcdf-c netcdf-cxx netcdf-f77 \
- netcdf-f90 netcdf-install netcdf-tutorial
-
-MAN1= ncdump.1 ncgen.1 ncgen3.1 nccopy.1
+INFO= netcdf netcdf-c netcdf-cxx netcdf-f77 netcdf-f90 \
+ netcdf-install netcdf-tutorial
+MAN1= nccopy.1 ncdump.1 ncgen.1 ncgen3.1
MAN3= netcdf.3
-OPTIONS= SZIP "SZIP support (required if HDF5 was built with SZIP)" off
+OPTIONS= FORTRAN "Build library for Fortran" off \
+ SZIP "SZIP support (required if HDF5 was built with SZIP)" off
.if !defined(NOPORTDOCS)
CONFIGURE_ARGS+=--enable-docs-install
@@ -43,9 +41,24 @@ CONFIGURE_ARGS+=--enable-docs-install
CONFIGURE_ARGS+=--disable-docs-install
.endif
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_FORTRAN)
+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -DpgiFortran"
+CONFLICTS+= netcdf-4.*
+MAN3+= netcdf_f77.3 netcdf_f90.3
+PKGNAMESUFFIX+= -ftn
+PLIST_SUB+= FORTRAN=""
+USE_FORTRAN= yes
+.else
+CONFIGURE_ARGS+=--disable-f77 --disable-f90
+CONFLICTS+= netcdf-ftn-4.*
+PLIST_SUB+= FORTRAN="@comment "
+.endif
+
.if defined(WITH_SZIP)
-CONFIGURE_ARGS+= --with-szlib=${LOCALBASE}
-LIB_DEPEND+= sz.2:${PORTSDIR}/science/szip
+CONFIGURE_ARGS+=--with-szlib=${LOCALBASE}
+LIB_DEPENDS+= sz.2:${PORTSDIR}/science/szip
.endif
post-patch:
@@ -57,7 +70,6 @@ post-patch:
.if defined(NOPORTDOCS)
@${REINPLACE_CMD} -e '839 s/install-docDATA //' \
${WRKSRC}/man4/Makefile.in
-
.endif
post-configure:
@@ -69,4 +81,4 @@ post-configure:
regression-test: build
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} check
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/science/netcdf4/pkg-plist b/science/netcdf4/pkg-plist
index 43fed73d45ed..7cb404202b33 100644
--- a/science/netcdf4/pkg-plist
+++ b/science/netcdf4/pkg-plist
@@ -29,11 +29,14 @@ include/ncUshort.h
include/ncVar.h
include/ncVarAtt.h
include/ncVlenType.h
-include/netcdf
include/ncvalues.h
+include/netcdf
include/netcdf.h
include/netcdf.hh
include/netcdfcpp.h
+%%FORTRAN%%include/netcdf.inc
+%%FORTRAN%%include/netcdf.mod
+%%FORTRAN%%include/typesizes.mod
lib/libnetcdf.a
lib/libnetcdf.la
lib/libnetcdf.so
@@ -46,6 +49,10 @@ lib/libnetcdf_c++4.a
lib/libnetcdf_c++4.la
lib/libnetcdf_c++4.so
lib/libnetcdf_c++4.so.1
+%%FORTRAN%%lib/libnetcdff.a
+%%FORTRAN%%lib/libnetcdff.la
+%%FORTRAN%%lib/libnetcdff.so
+%%FORTRAN%%lib/libnetcdff.so.5
libdata/pkgconfig/netcdf.pc
%%PORTDOCS%%%%DOCSDIR%%/ncdump-man-1.html
%%PORTDOCS%%%%DOCSDIR%%/ncgen-man-1.html