- Add option FORTRAN

- Recall SZIP, fix typo (LIB_DEPEND -> LIB_DEPENDS)
- Sort pkg-plist
- Space/Tab twiddle

PR:		146416
Submitted by:	Sunpoet Po-Chuan Hsieh <sunpoet AT sunpoet.net> (maintainer)
This commit is contained in:
Li-Wen Hsu 2010-05-15 05:47:32 +00:00
parent 1493eb07a1
commit 01453a0214
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=254342
2 changed files with 37 additions and 18 deletions

View File

@ -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
LIB_DEPENDS+= hdf5.6:${PORTSDIR}/science/hdf5-18
MAKE_ENV+= MAKEINFOFLAGS="--no-split" INFODIR="${PREFIX}/${INFO_PATH}"
USE_LDCONFIG= yes
LIB_DEPENDS+= hdf5.6:${PORTSDIR}/science/hdf5-18
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>

View File

@ -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