diff options
author | rafan <rafan@FreeBSD.org> | 2008-02-24 16:45:42 +0800 |
---|---|---|
committer | rafan <rafan@FreeBSD.org> | 2008-02-24 16:45:42 +0800 |
commit | 88f7758e3f11087bf3385a095718bc499315b92d (patch) | |
tree | bd4fd6faf726f1939f927f5a59e4c5c7b8f06895 /graphics | |
parent | b200b75512fe81f9142e2b390bf6222d249afea7 (diff) | |
download | freebsd-ports-gnome-88f7758e3f11087bf3385a095718bc499315b92d.tar.gz freebsd-ports-gnome-88f7758e3f11087bf3385a095718bc499315b92d.tar.zst freebsd-ports-gnome-88f7758e3f11087bf3385a095718bc499315b92d.zip |
- Add OPTIONS to explicitly handle dependencies
This committed version is based on the PR and reworked by the maintainer.
PR: ports/120977 (based on)
Submitted by: TAOKA Fumiyoshi <fmysh at iijmio-mail.jp>
Approved by: maintainer
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/gdal/Makefile | 251 |
1 files changed, 217 insertions, 34 deletions
diff --git a/graphics/gdal/Makefile b/graphics/gdal/Makefile index 9cb3f4114818..e48ac33a1624 100644 --- a/graphics/gdal/Makefile +++ b/graphics/gdal/Makefile @@ -16,30 +16,11 @@ MASTER_SITES= ftp://ftp.remotesensing.org/pub/gdal/ \ MAINTAINER= sunpoet@sunpoet.net COMMENT= A translator library for geospatial data formats -BUILD_DEPENDS= ${LOCALBASE}/bin/doxygen:${PORTSDIR}/devel/doxygen \ - ${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-setuptools -LIB_DEPENDS= jasper.4:${PORTSDIR}/graphics/jasper \ - jpeg.9:${PORTSDIR}/graphics/jpeg \ - geotiff.1:${PORTSDIR}/graphics/libgeotiff \ - ungif.5:${PORTSDIR}/graphics/libungif \ - png.5:${PORTSDIR}/graphics/png \ - tiff.4:${PORTSDIR}/graphics/tiff -RUN_DEPENDS= ${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-setuptools - USE_AUTOTOOLS= libtool:15 USE_GMAKE= yes USE_LDCONFIG= yes -USE_PYTHON= yes GNU_CONFIGURE= yes -CONFIGURE_ARGS= --datadir=${DATADIR} \ - --with-libz=/usr \ - --with-jasper=${LOCALBASE} \ - --with-libgeotiff=${LOCALBASE} \ - --with-libgif=${LOCALBASE} \ - --with-libjpeg=${LOCALBASE} \ - --with-libtiff=${LOCALBASE} \ - --with-png=${LOCALBASE} \ - --with-python +CONFIGURE_ARGS= --datadir=${DATADIR} --with-libz=/usr MAKEFILE= GNUmakefile INSTALL_TARGET= install install-man @@ -49,8 +30,159 @@ MAN1= gdal-config.1 gdal2tiles.1 gdal_contour.1 gdal_grid.1 \ gdaltransform.1 gdalwarp.1 nearblack.1 ogr2ogr.1 \ ogr_utilities.1 ogrinfo.1 ogrtindex.1 pct2rgb.1 rgb2pct.1 +.if !defined(NOPORTDOCS) +BUILD_DEPENDS+= ${LOCALBASE}/bin/doxygen:${PORTSDIR}/devel/doxygen +.endif + +OPTIONS= CFITSIO "FITS support" off \ + CURL "Curl support" off \ + EXPAT "Expat support" off \ + GEOS "GEOS support" off \ + GEOTIFF "GeoTIFF support" on \ + GIF "GIF support" on \ + GRASS "GRASS support" off \ + HDF4 "HDF4 support" off \ + HDF5 "HDF5 support" off \ + JASPER "JPEG 2000 support via jasper" on \ + JPEG "JPEG support" on \ + MYSQL "MySQL support" off \ + NETCDF "NetCDF support" off \ + ODBC "ODBC support" off \ + PERL "Perl support" off \ + PGSQL "PostgreSQL support" off \ + PHP "PHP support" off \ + PNG "PNG support" on \ + PROJ4 "Projection support via proj4" off \ + PYTHON "Python support" on \ + RUBY "Ruby support" off \ + SQLITE "SQLite support" off \ + THREAD "Thread support" off\ + TIFF "TIFF support" on \ + XERCES "Xerces support" off + .include <bsd.port.pre.mk> +.if defined(WITH_CFITSIO) +LIB_DEPENDS+= cfitsio.0:${PORTSDIR}/astro/cfitsio +CONFIGURE_ARGS+= --with-cfitsio=${LOCALBASE} +.else +CONFIGURE_ARGS+= --with-cfitsio=no +.endif + +.if defined(WITH_CURL) +LIB_DEPENDS+= curl.4:${PORTSDIR}/ftp/curl +CONFIGURE_ARGS+= --with-curl=${LOCALBASE}/bin/curl-config +.else +CONFIGURE_ARGS+= --with-curl=no +.endif + +.if defined(WITH_EXPAT) +LIB_DEPENDS+= expat.6:${PORTSDIR}/textproc/expat2 +CONFIGURE_ARGS+= --with-expat=${LOCALBASE} \ + --with-expat-inc=${LOCALBASE}/include \ + --with-expat-lib=${LOCALBASE}/lib +.else +CONFIGURE_ARGS+= --with-expat=no +.endif + +.if defined(WITH_GEOS) +LIB_DEPENDS+= geos.0:${PORTSDIR}/graphics/geos +CONFIGURE_ARGS+= --with-geos=${LOCALBASE}/bin/geos-config +.else +CONFIGURE_ARGS+= --with-geos=no +.endif + +.if !defined(WITHOUT_GEOTIFF) +LIB_DEPENDS+= geotiff.1:${PORTSDIR}/graphics/libgeotiff +CONFIGURE_ARGS+= --with-libgeotiff=${LOCALBASE} +.endif + +.if !defined(WITHOUT_GIF) +LIB_DEPENDS+= ungif.5:${PORTSDIR}/graphics/libungif +CONFIGURE_ARGS+= --with-libgif=${LOCALBASE} +.endif + +.if defined(WITH_GRASS) +LIB_DEPENDS+= grass_gis:${PORTSDIR}/databases/grass +CONFIGURE_ARGS+= --with-grass=${LOCALBASE} \ + --with-grasslib=${LOCALBASE}/lib +.else +CONFIGURE_ARGS+= --with-grass=no +.endif + +.if defined(WITH_HDF4) +LIB_DEPENDS+= mfhdf.2:${PORTSDIR}/science/hdf +CONFIGURE_ARGS+= --with-hdf4=${LOCALBASE} +.endif + +.if defined(WITH_HDF5) +LIB_DEPENDS+= hdf5.0:${PORTSDIR}/science/hdf5 +CONFIGURE_ARGS+= --with-hdf5=${LOCALBASE} +.endif + +.if !defined(WITHOUT_JASPER) +LIB_DEPENDS+= jasper.4:${PORTSDIR}/graphics/jasper +CONFIGURE_ARGS+= --with-jasper=${LOCALBASE} +.endif + +.if !defined(WITHOUT_JPEG) +LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg +CONFIGURE_ARGS+= --with-libjpeg=${LOCALBASE} +.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_NETCDF) +LIB_DEPENDS+= netcdf.4:${PORTSDIR}/science/netcdf +CONFIGURE_ARGS+= --with-netcdf=${LOCALBASE} +.else +CONFIGURE_ARGS+= --with-netcdf=no +.endif + +.if defined(WITH_ODBC) +LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC +CONFIGURE_ARGS+= --with-odbc=${LOCALBASE} +.else +CONFIGURE_ARGS+= --with-odbc=no +.endif + +.if defined(WITH_PERL) +USE_PERL= yes +CONFIGURE_ARGS+= --with-perl +.endif + +.if defined(WITH_PGSQL) +USE_PGSQL= yes +CONFIGURE_ARGS+= --with-pg=${LOCALBASE}/bin/pg_config +.else +CONFIGURE_ARGS+= --with-pg=no +.endif + +.if defined(WITH_PHP) +USE_PHP= yes +CONFIGURE_ARGS+= --with-php +.endif + +.if defined(WITH_PROJ4) +LIB_DEPENDS+= proj.5:${PORTSDIR}/graphics/proj +CONFIGURE_ARGS+= --with-static-proj4=${LOCALBASE} +.else +CONFIGURE_ARGS+= --with-static-proj4=no +.endif + +.if !defined(WITHOUT_PYTHON) +USE_PYTHON= yes +.include "${PORTSDIR}/Mk/bsd.python.mk" +CONFIGURE_ARGS+= --with-python + +BUILD_DEPENDS+= ${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-setuptools +RUN_DEPENDS+= ${PYEASYINSTALL_CMD}:${PORTSDIR}/devel/py-setuptools + # 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} @@ -58,18 +190,75 @@ PYDISTUTILS_PKGVERSION= ${PORTVERSION} _OSRELEASE!= ${UNAME} -r PYEASYINSTALL_OSARCH= -${OPSYS:L}-${_OSRELEASE}-${ARCH} PYEASYINSTALL_EGG= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-${PYTHON_VERSION:S/thon//}${PYEASYINSTALL_OSARCH}.egg -PYEASYINSTALL_BINDIR= ${PREFIX}/bin +PYEASYINSTALL_BINDIR= ${PREFIX}/bin PYEASYINSTALL_SITELIBDIR= ${PYTHONPREFIX_SITELIBDIR} -PLIST_SUB+= PYEASYINSTALL_EGG=${PYEASYINSTALL_EGG} \ - PYEASYINSTALL_CMD=${PYEASYINSTALL_CMD} \ - PYEASYINSTALL_BINDIR=${PYEASYINSTALL_BINDIR} \ - PYEASYINSTALL_SITELIBDIR=${PYEASYINSTALL_SITELIBDIR} \ - PYDISTUTILS_PKGNAME=${PYDISTUTILS_PKGNAME} \ - PYDISTUTILS_PKGVERSION=${PYDISTUTILS_PKGVERSION} +PLIST_SUB+= PYEASYINSTALL_EGG=${PYEASYINSTALL_EGG} \ + PYEASYINSTALL_CMD=${PYEASYINSTALL_CMD} \ + PYEASYINSTALL_BINDIR=${PYEASYINSTALL_BINDIR} \ + PYEASYINSTALL_SITELIBDIR=${PYEASYINSTALL_SITELIBDIR} \ + PYDISTUTILS_PKGNAME=${PYDISTUTILS_PKGNAME} \ + PYDISTUTILS_PKGVERSION=${PYDISTUTILS_PKGVERSION} +.endif + +.if !defined(WITHOUT_PNG) +LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png +CONFIGURE_ARGS+= --with-png=${LOCALBASE} +.endif + +.if defined(WITH_RUBY) +USE_RUBY= yes +.include "${PORTSDIR}/Mk/bsd.ruby.mk" +CONFIGURE_ARGS+= --with-ruby +.endif + +.if defined(WITH_SQLITE) +USE_SQLITE= yes +CONFIGURE_ARGS+= --with-sqlite=${LOCALBASE} +.else +CONFIGURE_ARGS+= --with-sqlite=no +.endif + +.if !defined(WITHOUT_THREAD) +USE_THREAD= yes +CONFIGURE_ARGS+= --with-threads=${PTHREAD_LIBS} +CONFIGURE_ENV+= CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" +.endif + +.if !defined(WITHOUT_TIFF) +LIB_DEPENDS+= tiff.4:${PORTSDIR}/graphics/tiff +CONFIGURE_ARGS+= --with-libtiff=${LOCALBASE} +.endif + +.if defined(WITH_XERCES) +XERCESC_VER?= 27 +LIB_DEPENDS+= xerces-c.${XERCESC_VER}:${PORTSDIR}/textproc/xerces-c2 +#LIB_DEPENDS+= xalan-c.19:${PORTSDIR}/textproc/xalan-c +CONFIGURE_ARGS+= --with-xerces=${LOCALBASE} \ + --with-xerces-inc=${LOCALBASE}/include \ + --with-xerces-lib=${LOCALBASE}/lib +.else +CONFIGURE_ARGS+= --with-xerces=no +.endif + +.if defined(WITH_HDF4) && defined(WITH_HDF5) +IGNORE= "You can't use HDF4 with HDF5." +.endif + +pre-build: +.if defined(WITH_PYTHON) + @(cd ${BUILD_WRKSRC}/swig/python; \ + ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} setopt -c build -o build-platlib -s lib.${PYEASYINSTALL_OSARCH:S/^-//}; \ + ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} setopt -c build -o build-temp -s temp.${PYEASYINSTALL_OSARCH:S/^-//}-${PYTHON_VER}; \ + ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} setopt -c bdist_egg -o plat-name -s ${PYEASYINSTALL_OSARCH:S/^-//}; \ + ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} setopt -c bdist -o plat-name -s ${PYEASYINSTALL_OSARCH:S/^-//}) +.endif post-patch: +.if !defined(WITHOUT_GIF) @${REINPLACE_CMD} -e 's|lgif|lungif|' ${WRKSRC}/configure +.endif +.if defined(WITH_PYTHON) @${REINPLACE_CMD} -e '\ s,%%MAKE_ENV%%,${MAKE_ENV},; \ s,%%PYTHON_SITELIBDIR%%,${PYTHON_SITELIBDIR},; \ @@ -78,12 +267,6 @@ post-patch: s,%%PYEASYINSTALL_EGG%%,${PYEASYINSTALL_EGG},; \ s,%%WRKSRC%%,${WRKSRC},; \ ' ${WRKSRC}/swig/python/GNUmakefile - -pre-build: - @(cd ${BUILD_WRKSRC}/swig/python; \ - ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} setopt -c build -o build-platlib -s lib.${PYEASYINSTALL_OSARCH:S/^-//}; \ - ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} setopt -c build -o build-temp -s temp.${PYEASYINSTALL_OSARCH:S/^-//}-${PYTHON_VER}; \ - ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} setopt -c bdist_egg -o plat-name -s ${PYEASYINSTALL_OSARCH:S/^-//}; \ - ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYSETUP} setopt -c bdist -o plat-name -s ${PYEASYINSTALL_OSARCH:S/^-//}) +.endif .include <bsd.port.post.mk> |