1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00
freebsd-ports/science/cdo/Makefile
Tijl Coosemans 60945f0277 Replace USES=libtool:oldver with USES=libtool or USES=libtool:keepla in
the 32 ports that still use it.  Bump PORTREVISION on their dependent
ports except the ones that depend on these:

audio/libogg
audio/libvorbis
devel/pcre
ftp/curl
graphics/jpeg
graphics/libart_lgpl
graphics/tiff
textproc/expat2
textproc/libxslt

In these cases the same trick as in the recent gettext update is used.
The ports install a symlink with the old library version.  When enough
of their dependent ports have had regular updates the remaining ones can
get a PORTREVISION bump and the links can be removed.

Also remove the devel/pcre dependency from USE_GNOME=glib20.  It causes
over 2200 packages to depend on devel/pcre while less than 200 actually
link with it.  The glib20 package still depends on devel/pcre so this
should not make a difference for ports with USE_GNOME=glib20.  Also,
libdata/pkgconfig/glib-2.0.pc lists pcre as a private library so
USE_GNOME=glib20 should not propagate it.

PR:		195724
Exp-run by:	antoine
Approved by:	portmgr (antoine)
2014-12-08 16:48:38 +00:00

86 lines
2.5 KiB
Makefile

# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@sunpoet.net>
# $FreeBSD$
PORTNAME= cdo
PORTVERSION= 1.6.4
PORTREVISION= 1
CATEGORIES= science
MASTER_SITES= https://code.zmaw.de/attachments/download/8376/ \
LOCAL/sunpoet
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Climate Data Operators
LICENSE= GPLv2
OPTIONS_DEFINE= CGRIBEX HDF5 JASPER NETCDF PROJ SZIP UDUNITS
OPTIONS_DEFAULT=CGRIBEX HDF5 JASPER NETCDF PROJ SZIP UDUNITS
OPTIONS_SUB= yes
CPPFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ARGS= --disable-cgribex \
--disable-data \
--disable-extra \
--disable-grib \
--disable-ieg \
--disable-service \
--enable-cdi-lib \
--program-transform-name="" \
--with-zlib=/usr
GNU_CONFIGURE= yes
LDFLAGS+= -L${LOCALBASE}/lib -pthread
USE_LDCONFIG= yes
USES= gmake libtool pathfix
CGRIBEX_CONFIGURE_OFF= --without-cgribex
CGRIBEX_CONFIGURE_ON= --with-cgribex=${LOCALBASE}
CGRIBEX_LIB_DEPENDS= libcgribex.so:${PORTSDIR}/science/cgribex
HDF5_CONFIGURE_OFF= --without-hdf5
HDF5_CONFIGURE_ON= --with-hdf5=${LOCALBASE}
HDF5_LIB_DEPENDS= libhdf5.so:${PORTSDIR}/science/hdf5
JASPER_CONFIGURE_OFF= --without-jasper
JASPER_CONFIGURE_ON= --with-jasper=${LOCALBASE}
JASPER_LIB_DEPENDS= libjasper.so:${PORTSDIR}/graphics/jasper
NETCDF_CONFIGURE_OFF= --without-netcdf
NETCDF_CONFIGURE_ON= --with-netcdf=${LOCALBASE}
NETCDF_LIB_DEPENDS= libnetcdf.so:${PORTSDIR}/science/netcdf
PROJ_CONFIGURE_OFF= --without-proj
PROJ_CONFIGURE_ON= --with-proj=${LOCALBASE}
PROJ_LIB_DEPENDS= libproj.so:${PORTSDIR}/graphics/proj
SZIP_CONFIGURE_OFF= --without-szlib
SZIP_CONFIGURE_ON= --with-szlib=${LOCALBASE}
SZIP_LIB_DEPENDS= libsz.so:${PORTSDIR}/science/szip
UDUNITS_CONFIGURE_OFF= --without-udunits2
UDUNITS_CONFIGURE_ON= --with-udunits2=${LOCALBASE}
UDUNITS_LIB_DEPENDS= libudunits2.so:${PORTSDIR}/science/udunits
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MHDF5} && !${PORT_OPTIONS:MSZIP}
IGNORE= HDF5 option requires SZIP option
.endif
.if ${PORT_OPTIONS:MNETCDF} && !${PORT_OPTIONS:MHDF5}
IGNORE= NETCDF option requires HDF5 option
.endif
.include <bsd.port.pre.mk>
.if ${ARCH} != "sparc64"
CFLAGS+= -DPTHREAD_MUTEXATTR_CONDATTR
.endif
post-patch:
@${REINPLACE_CMD} -e 's|$$(libdir)/\($$$$pkgconfigfile\)|${PREFIX}/libdata/\1|' ${WRKSRC}/libcdi/src/Makefile.in
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libcdi.so.0
regression-test test: build
.if ${PORT_OPTIONS:MNETCDF}
@cd ${WRKSRC}/ && ${SETENV} CDO_PATH=src/cdo src/cdotest
.endif
cd ${WRKSRC}/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} check
.include <bsd.port.post.mk>