1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

- Update to 1.5.1

- Use CFLAGS instead of CPPFLAGS
- Remove out-dated OSVERSION check and pkg-message
- Make portlint happier
- Cosmetic change

Changes:	https://code.zmaw.de/news/68
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2011-07-16 06:12:30 +00:00
parent 44e3305c58
commit fc8fecf250
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=277794
4 changed files with 41 additions and 39 deletions

View File

@ -6,39 +6,34 @@
#
PORTNAME= cdo
PORTVERSION= 1.5.0
PORTREVISION= 1
PORTVERSION= 1.5.1
CATEGORIES= science
MASTER_SITES= https://code.zmaw.de/attachments/download/898/ \
MASTER_SITES= https://code.zmaw.de/attachments/download/1531/ \
LOCAL/sunpoet
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Climate Data Operators
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --program-transform-name=""
CONFIGURE_ENV= LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib ${PTHREAD_LIBS}"
CPPFLAGS+= -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
PLIST_FILES= bin/cdo
NETCDF_VER?= 4
HDF5_VER?= 18
OPTIONS= HDF5 "HDF5 support" on \
JASPER "Japser support" off \
NETCDF "NetCDF support" on \
PROJ "PROJ support" on \
SZIP "SZIP support" on
.include <bsd.port.pre.mk>
CFLAGS+= -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
CONFIGURE_ARGS= --enable-cdi-lib --program-transform-name="" --with-zlib=/usr
CONFIGURE_ENV= LDFLAGS="${LDFLAGS}"
GNU_CONFIGURE= yes
LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
USE_GNOME= gnomehack
USE_LDCONFIG= yes
.if (${OSVERSION} >= 700000) || (${ARCH} != "sparc64")
CONFIGURE_ENV+= CFLAGS="${CFLAGS} -DPTHREAD_MUTEXATTR_CONDATTR"
.endif
NETCDF_VER?= 4
HDF5_VER?= 18
.if (!defined(WITHOUT_NETCDF) && !defined(WITHOUT_HDF5) && (${NETCDF_VER} == 4) && (${HDF5_VER} == 16))
.include <bsd.port.options.mk>
.if !defined(WITHOUT_NETCDF) && !defined(WITHOUT_HDF5) && ${NETCDF_VER} == 4 && ${HDF5_VER} == 16
IGNORE= netCDF 4 requires HDF5 1.8
.endif
@ -48,7 +43,7 @@ WITH_HDF5= yes
.endif
.if !defined(WITHOUT_HDF5)
CONFIGURE_ARGS+=--with-hdf5=${LOCALBASE} --with-zlib=/usr
CONFIGURE_ARGS+=--with-hdf5=${LOCALBASE}
WITH_SZIP= yes
.if (${HDF5_VER} == 18)
LIB_DEPENDS+= hdf5.7:${PORTSDIR}/science/hdf5-18
@ -69,7 +64,9 @@ LIB_DEPENDS+= netcdf.7:${PORTSDIR}/science/netcdf4
.else
LIB_DEPENDS+= netcdf.4:${PORTSDIR}/science/netcdf
.endif
PLIST_FILES+= bin/cdotest
PLIST_SUB= NETCDF=""
.else
PLIST_SUB= NETCDF="@comment "
.endif
.if !defined(WITHOUT_PROJ)
@ -82,23 +79,26 @@ CONFIGURE_ARGS+=--with-szlib=${LOCALBASE}
LIB_DEPENDS+= sz.2:${PORTSDIR}/science/szip
.endif
.include <bsd.port.pre.mk>
.if ${ARCH} != "sparc64"
CFLAGS+= -DPTHREAD_MUTEXATTR_CONDATTR
.endif
post-patch:
.if !defined(WITHOUT_NETCDF)
${REINPLACE_CMD} \
-e '/bin_PROGRAMS = / s|$$| cdotest$$(EXEEXT)|' \
-e '/noinst_PROGRAMS = / s| cdotest$$(EXEEXT)||' \
@${REINPLACE_CMD} \
-e '/bin_PROGRAMS = / s|$$| cdotest|' \
-e '/noinst_PROGRAMS = / s| cdotest||' \
${WRKSRC}/src/Makefile.in
.endif
post-build:
.if !defined(WITHOUT_NETCDF)
@cd "${WRKSRC}/src" && ${SETENV} CDO_PATH="${WRKSRC}/src/cdo" "${WRKSRC}/src/cdotest"
@cd ${WRKSRC}/src/ && ${SETENV} CDO_PATH=${WRKSRC}/src/cdo ${WRKSRC}/src/cdotest
.endif
post-install:
@${CAT} ${PKGMESSAGE}
regression-test:
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} check
@cd ${WRKSRC}/ && ${SETENV} ${MAKE_ENV} ${MAKE} check
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
SHA256 (cdo-1.5.0.tar.gz) = efcb78a5f9f171a86715fee28da99882c2547bbef4cfc4bffa11b257708ad4be
SIZE (cdo-1.5.0.tar.gz) = 5211816
SHA256 (cdo-1.5.1.tar.gz) = 07da9b78cef381e73abb4841a8df5dab4691fa26616a1910f1e56273ce0a184e
SIZE (cdo-1.5.1.tar.gz) = 5380011

View File

@ -1,8 +0,0 @@
Since CDO version 1.0.6, three new environment variables were introduced:
- CDO_DISABLE_HISTORY:
If set to 1, the netCDF history attribute of input datasets is not used.
- CDO_DISABLE_FILESUFFIX:
If set to 1, file suffix (.grb, .nc, ...) will not be added to the output
file name of split*.
- IGNORE_ATT_COORDINATES:
If set to 1, netCDF variable attribute "coordinates" will be ignored.

10
science/cdo/pkg-plist Normal file
View File

@ -0,0 +1,10 @@
bin/cdi
bin/cdo
%%NETCDF%%bin/cdotest
include/cdi.h
include/cdi.inc
lib/libcdi.a
lib/libcdi.la
lib/libcdi.so
lib/libcdi.so.0
libdata/pkgconfig/cdi.pc