ports/120977: graphics/gdal: implicit dependencies on various libraries (ports).

TAOKA Fumiyoshi fmysh at iijmio-mail.jp
Fri Feb 22 20:40:04 UTC 2008


>Number:         120977
>Category:       ports
>Synopsis:       graphics/gdal: implicit dependencies on various libraries (ports).
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 22 20:40:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     TAOKA Fumiyoshi
>Release:        
>Organization:
>Environment:
>Description:
	Gdal's configure scripts enables various features by default
	searching libraries on a system.  For example, netCDF, HDF,
	etc.  This makes gdal have implicit dependencies on the
	libraries (ports) out of the ports system. 

	To avoid this, add explicitly --with-xxxx=no to CONFIGURE_ARGS
	according to OPTIONS selection.

>How-To-Repeat:

For example, the configure script found follwing libraries, netCDF, 
HDF5, etc., on my host and enabled those features.

# make configure

[snip]

  LIBZ support:              external
  GRASS support:             no
  CFITSIO support:           external
  PCRaster support:          internal
  NETCDF support:            yes
  LIBPNG support:            external
  LIBTIFF support:           external (BigTIFF=no)
  LIBGEOTIFF support:        external
  LIBJPEG support:           internal
  LIBGIF support:            external
  OGDI support:              no
  HDF4 support:              no
  HDF5 support:              yes
  KAKADU support:            no
  JASPER support:            yes (GeoJP2=no)
  ECW support:               no
  MrSID support:             no
  GRIB support:              no
  CURL support (wms/wcs/...):yes
  POSTGRESQL support:        yes
  MySQL support:             no
  XERCES support:            yes
  Expat support:             yes
  ODBC support:              yes
  PGEO support:              yes
  OCI support:               no
  SDE support:               no
  DODS support:              no
  SQLite support:            no
  DWGdirect support          no
  PANORAMA GIS support:      no
  INFORMIX DataBlade support:no
  GEOS support:              yes

>Fix:

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/graphics/gdal/Makefile,v
retrieving revision 1.25
diff -u -r1.25 Makefile
--- Makefile	17 Feb 2008 05:59:54 -0000	1.25
+++ Makefile	22 Feb 2008 20:30:55 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	gdal
 PORTVERSION=	1.5.0
+PORTREVISION=	1
 CATEGORIES=	graphics geography
 MASTER_SITES=	ftp://ftp.remotesensing.org/pub/gdal/ \
 		http://www.gdal.org/dl/ \
@@ -16,6 +17,19 @@
 MAINTAINER=	sunpoet at sunpoet.net
 COMMENT=	A translator library for geospatial data formats
 
+OPTIONS=	GRASS	"Include GRASS support" off \
+		CFITSIO	"Include FITS support" off \
+		NETCDF	"Include netCDF support" off \
+		HDF5	"Include HDF5 support" off \
+		CURL	"Include curl support" off \
+		PG	"Include PostgreSQL support" off \
+		MYSQL	"Include MySQL support" off \
+		XERCES	"Use Xerces C++ Parser" off \
+		EXPAT	"Use Expat XML Parser" off \
+		ODBC	"Include ODBC support" off \
+		SQLITE	"Include SQLite3 support" off \
+		GEOS	"Include GEOS support" off
+
 BUILD_DEPENDS=	${LOCALBASE}/bin/doxygen:${PORTSDIR}/devel/doxygen \
 		${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-setuptools
 LIB_DEPENDS=	jasper.4:${PORTSDIR}/graphics/jasper \
@@ -51,6 +65,91 @@
 
 .include <bsd.port.pre.mk>
 
+.if defined(WITH_GRASS)
+BUILD_DEPENDS+=		${LOCALBASE}/grass:${PORTSDIR}/databases/grass
+RUN_DEPENDS+=		${LOCALBASE}/grass:${PORTSDIR}/databases/grass
+CONFIGURE_ARGS+=	--with-grass=${LOCALBASE}/grass
+.else
+CONFIGURE_ARGS+=	--with-grass=no
+.endif
+
+.if defined(WITH_CFITSIO)
+LIB_DEPENDS+=		cfitsio:${PORTSDIR}/astro/cfitsio
+CONFIGURE_ARGS+=	--with-cfitsio=${LOCALBASE}
+.else
+CONFIGURE_ARGS+=	--with-cfitsio=no
+.endif
+
+.if defined(WITH_NETCDF)
+LIB_DEPENDS+=		netcdf:${PORTSDIR}/science/netcdf
+CONFIGURE_ARGS+=	--with-netcdf=${LOCALBASE}
+.else
+CONFIGURE_ARGS+=	--with-netcdf=no
+.endif
+
+.if defined(WITH_HDF5)
+LIB_DEPENDS+=		hdf5:${PORTSDIR}/science/hdf5
+CONFIGURE_ARGS+=	--with-hdf5=${LOCALBASE}
+.else
+CONFIGURE_ARGS+=	--with-hdf5=no
+.endif
+
+.if defined(WITH_CURL)
+LIB_DEPENDS+=		curl:${PORTSDIR}/ftp/curl
+CONFIGURE_ARGS+=	--with-curl=${LOCALBASE}/bin/curl-config
+.else
+CONFIGURE_ARGS+=	--with-curl=no
+.endif
+
+.if defined(WITH_PG)
+USE_PGSQL=		yes
+CONFIGURE_ARGS+=	--with-pg=${LOCALBASE}/bin/pg_config
+.else
+CONFIGURE_ARGS+=	--with-pg=no
+.endif
+
+.if defined(WITH_MYSQL)
+USE_MYSQL=		yes
+CONFIGURE_ARGS+=	--with-mysql=${LOCALBASE}/bin/mysql_config
+.else
+CONFIGURE_ARGS+=	--with-mysql=no
+.endif
+
+.if defined(WITH_XERCES)
+LIB_DEPENDS+=		xerces:${PORTSDIR}/textproc/xerces-c2
+CONFIGURE_ARGS+=	--with-xerces=${LOCALBASE}
+.else
+CONFIGURE_ARGS+=	--with-xerces=no
+.endif
+
+.if defined(WITH_EXPAT)
+LIB_DEPENDS+=		expat:${PORTSDIR}/textproc/expat2
+CONFIGURE_ARGS+=	--with-expat=${LOCALBASE}
+.else
+CONFIGURE_ARGS+=	--with-expat=no
+.endif
+
+.if defined(WITH_ODBC)
+LIB_DEPENDS+=		odbc:${PORTSDIR}/databases/unixODBC
+CONFIGURE_ARGS+=	--with-odbc=${LOCALBASE}
+.else
+CONFIGURE_ARGS+=	--with-odbc=no
+.endif
+
+.if defined(WITH_SQLITE)
+USE_SQLITE=		yes
+CONFIGURE_ARGS+=	--with-sqlite=${LOCALBASE}
+.else
+CONFIGURE_ARGS+=	--with-sqlite=no
+.endif
+
+.if defined(WITH_GEOS)
+LIB_DEPENDS+=		geos:${PORTSDIR}/graphics/geos
+CONFIGURE_ARGS+=	--with-geos=${LOCALBASE}/bin/geos-config
+.else
+CONFIGURE_ARGS+=	--with-geos=no
+.endif
+
 # We can not use USE_PYDISTUTILS, so copy these from bsd.python.mk.
 PYEASYINSTALL_CMD=	${LOCALBASE}/bin/easy_install-${PYTHON_VER}
 PYDISTUTILS_PKGNAME=	${PORTNAME:U}
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list