2017-11-25 15:48:42 +00:00
|
|
|
# $OpenBSD: Makefile,v 1.65 2017/11/25 15:48:42 landry Exp $
|
2009-02-09 23:07:05 +00:00
|
|
|
|
2011-06-22 13:07:32 +00:00
|
|
|
COMMENT-main = translator library for geospatial data formats
|
|
|
|
COMMENT-python =python bindings and utilities for GDAL
|
|
|
|
COMMENT-perl = perl bindings for GDAL
|
2009-03-13 08:56:52 +00:00
|
|
|
|
2017-11-24 19:18:07 +00:00
|
|
|
V = 2.2.3
|
2011-06-22 13:07:32 +00:00
|
|
|
DISTNAME = gdal-${V}
|
2016-05-15 12:29:20 +00:00
|
|
|
DISTFILES = ${DISTNAME}${EXTRACT_SUFX} \
|
|
|
|
gdalautotest-${V}${EXTRACT_SUFX}
|
2009-03-13 08:56:52 +00:00
|
|
|
|
2017-11-01 16:47:17 +00:00
|
|
|
FULLPKGNAME-main = ${DISTNAME}
|
|
|
|
FULLPKGPATH-main = geo/gdal,-main
|
|
|
|
FULLPKGNAME-python = py-${DISTNAME}
|
|
|
|
FULLPKGPATH-python = geo/gdal,-python${FLAVOR_EXT:S/-/,/g}
|
|
|
|
FULLPKGNAME-perl = p5-Geo-GDAL-${V}
|
|
|
|
FULLPKGPATH-perl = geo/gdal,-perl
|
2009-03-13 08:56:52 +00:00
|
|
|
|
2017-11-24 19:19:27 +00:00
|
|
|
SHARED_LIBS = gdal 30.1 #23.2
|
2011-06-22 13:07:32 +00:00
|
|
|
CATEGORIES = geo devel
|
2009-02-09 23:07:05 +00:00
|
|
|
|
|
|
|
HOMEPAGE = http://www.gdal.org/
|
|
|
|
|
2011-06-22 12:53:12 +00:00
|
|
|
MAINTAINER = Landry Breuil <landry@openbsd.org>
|
2009-02-09 23:07:05 +00:00
|
|
|
|
|
|
|
# MIT/X
|
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
|
2013-05-31 15:00:08 +00:00
|
|
|
MASTER_SITES = http://download.osgeo.org/gdal/${V}/
|
2009-02-09 23:07:05 +00:00
|
|
|
|
2017-11-12 20:09:08 +00:00
|
|
|
MODULES = perl lang/python
|
2017-11-01 16:47:17 +00:00
|
|
|
FLAVORS = python3
|
|
|
|
FLAVOR ?=
|
|
|
|
|
|
|
|
.if ${FLAVOR:Mpython3}
|
|
|
|
FULLPKGNAME-python = py3-${DISTNAME}
|
|
|
|
.endif
|
2009-03-13 08:56:52 +00:00
|
|
|
|
2011-06-22 13:07:32 +00:00
|
|
|
MULTI_PACKAGES = -main -python -perl
|
2009-03-13 08:56:52 +00:00
|
|
|
|
2017-11-24 19:18:07 +00:00
|
|
|
MODPY_RUNDEP = No
|
2017-11-12 20:09:08 +00:00
|
|
|
LIB_DEPENDS-main = databases/sqlite3 \
|
2011-06-22 13:07:32 +00:00
|
|
|
graphics/tiff \
|
|
|
|
net/curl \
|
2016-05-25 20:53:45 +00:00
|
|
|
math/qhull \
|
2011-06-22 13:07:32 +00:00
|
|
|
databases/postgresql \
|
|
|
|
geo/geos \
|
2013-05-31 15:00:08 +00:00
|
|
|
geo/spatialite/libspatialite \
|
2014-05-04 20:17:35 +00:00
|
|
|
devel/json-c \
|
2011-06-22 13:07:32 +00:00
|
|
|
graphics/png \
|
2013-09-25 07:56:56 +00:00
|
|
|
graphics/giflib \
|
2017-05-19 09:19:48 +00:00
|
|
|
graphics/libwebp \
|
2011-06-22 13:07:32 +00:00
|
|
|
graphics/jpeg \
|
|
|
|
graphics/jasper \
|
2013-10-30 15:22:33 +00:00
|
|
|
graphics/openjp2 \
|
2013-05-31 15:00:08 +00:00
|
|
|
devel/pcre \
|
|
|
|
devel/proj \
|
2011-06-22 13:07:32 +00:00
|
|
|
devel/geotiff
|
|
|
|
|
2017-11-12 20:09:08 +00:00
|
|
|
WANTLIB-main = c crypto curl expat freexl geos geos_c geotiff gif \
|
|
|
|
iconv jasper jpeg json-c lzma m nghttp2 openjp2 \
|
|
|
|
pcre png pq proj pthread qhull spatialite sqlite3 \
|
|
|
|
ssl tiff xml2 webp z ${COMPILER_LIBCXX}
|
2011-06-22 13:07:32 +00:00
|
|
|
|
2017-11-24 19:18:07 +00:00
|
|
|
RUN_DEPENDS-python = ${MODPY_RUN_DEPENDS} \
|
|
|
|
math/py-numpy${MODPY_FLAVOR}
|
2017-11-01 16:47:17 +00:00
|
|
|
LIB_DEPENDS-python = ${MODPY_LIB_DEPENDS} \
|
|
|
|
${FULLPKGNAME-main}:${FULLPKGPATH-main}
|
2017-07-16 19:18:47 +00:00
|
|
|
WANTLIB-python = ${MODPY_WANTLIB} gdal m pthread ${COMPILER_LIBCXX}
|
2011-06-22 13:07:32 +00:00
|
|
|
|
2017-11-01 16:47:17 +00:00
|
|
|
RUN_DEPENDS-perl =
|
|
|
|
LIB_DEPENDS-perl = ${FULLPKGNAME-main}:${FULLPKGPATH-main}
|
2017-02-06 20:20:23 +00:00
|
|
|
WANTLIB-perl = perl gdal # uses perl ABI
|
2017-05-19 09:19:48 +00:00
|
|
|
WANTLIB-perl += c crypto curl expat freexl geos_c geotiff gif iconv
|
|
|
|
WANTLIB-perl += jasper jpeg json-c lzma m nghttp2 openjp2 pcre png
|
|
|
|
WANTLIB-perl += pq pthread qhull spatialite sqlite3 ssl tiff xml2 webp z
|
|
|
|
|
2017-11-25 15:48:42 +00:00
|
|
|
BUILD_DEPENDS += ${RUN_DEPENDS} math/py-numpy${MODPY_FLAVOR} devel/swig
|
2011-06-22 13:07:32 +00:00
|
|
|
|
2017-11-01 16:47:17 +00:00
|
|
|
TEST_DEPENDS += ${FULLPKGNAME-python}:${FULLPKGPATH-python}
|
2016-05-15 12:29:20 +00:00
|
|
|
TEST_ENV = GDAL_DOWNLOAD_TEST_DATA=1 GDAL_RUN_SLOW_TESTS=yes
|
|
|
|
|
2011-06-22 13:07:32 +00:00
|
|
|
MODPY_SETUPTOOLS = Yes
|
|
|
|
MODPY_EGG_VERSION = ${V}
|
2011-07-01 08:04:57 +00:00
|
|
|
MODPY_ADJ_FILES = swig/python/scripts/*.py
|
2011-06-22 13:07:32 +00:00
|
|
|
|
|
|
|
MAKE_FILE = GNUmakefile
|
|
|
|
MAKE_FLAGS = LIBTOOL_FINISH=:
|
|
|
|
USE_GMAKE = Yes
|
|
|
|
CONFIGURE_STYLE = gnu
|
2013-06-04 18:41:39 +00:00
|
|
|
CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \
|
2010-11-21 09:37:40 +00:00
|
|
|
LDFLAGS="-L${LOCALBASE}/lib -pthread"
|
2015-07-20 14:45:37 +00:00
|
|
|
INSTALL_TARGET = install install-man
|
2009-03-13 08:56:52 +00:00
|
|
|
|
2016-03-11 20:28:21 +00:00
|
|
|
CONFIGURE_ARGS =--without-hdf5 \
|
2009-02-09 23:07:05 +00:00
|
|
|
--without-cfitsio \
|
|
|
|
--without-netcdf \
|
|
|
|
--without-xerces \
|
|
|
|
--without-mysql \
|
|
|
|
--without-odbc \
|
|
|
|
--without-oci \
|
|
|
|
--without-grass \
|
|
|
|
--without-idb \
|
|
|
|
--without-sde \
|
|
|
|
--without-libgrass \
|
|
|
|
--without-php \
|
|
|
|
--without-ruby \
|
2009-03-13 08:56:52 +00:00
|
|
|
--with-pg=${LOCALBASE}/bin/pg_config \
|
2017-11-01 16:47:17 +00:00
|
|
|
--with-python=${MODPY_BIN} \
|
2009-03-14 11:05:50 +00:00
|
|
|
--with-perl \
|
2009-03-13 08:56:52 +00:00
|
|
|
--with-geos \
|
2016-05-15 12:18:26 +00:00
|
|
|
--with-gnm \
|
2013-05-31 15:00:08 +00:00
|
|
|
--with-freexl=${LOCALBASE} \
|
|
|
|
--with-spatialite=${LOCALBASE} \
|
2010-11-21 09:37:40 +00:00
|
|
|
--with-png=${LOCALBASE} \
|
|
|
|
--with-geotiff=${LOCALBASE} \
|
2011-06-22 12:53:12 +00:00
|
|
|
--with-libtiff=${LOCALBASE} \
|
2009-03-13 08:56:52 +00:00
|
|
|
--with-curl=${LOCALBASE} \
|
2009-02-09 23:07:05 +00:00
|
|
|
--with-gif=${LOCALBASE} \
|
|
|
|
--with-jpeg=${LOCALBASE} \
|
2014-05-04 20:17:35 +00:00
|
|
|
--with-libjson-c=${LOCALBASE} \
|
2009-02-09 23:07:05 +00:00
|
|
|
--with-jasper=${LOCALBASE}
|
|
|
|
|
2016-05-15 12:29:20 +00:00
|
|
|
post-extract:
|
|
|
|
ln -sf ${WRKDIR}/gdalautotest-${V} ${WRKSRC}/autotest
|
|
|
|
|
2017-11-01 16:47:17 +00:00
|
|
|
PYBINS = epsg_tr esri2wkt gcps2vec gcps2wld gdal2xyz gdal_auth gdal_merge \
|
|
|
|
gdalchksum gdalident gdalimport mkgraticule
|
|
|
|
PYBINSWITHMAN = gdal2tiles gdal_calc gdal_edit gdal_fillnodata gdal_pansharpen \
|
|
|
|
gdal_polygonize gdal_proximity gdal_retile gdal_sieve gdalcompare \
|
|
|
|
gdalmove ogrmerge pct2rgb rgb2pct
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
.for b in ${PYBINSWITHMAN}
|
|
|
|
mv -f ${PREFIX}/bin/$b.py ${PREFIX}/bin/$b${MODPY_BIN_SUFFIX}.py
|
|
|
|
mv -f ${PREFIX}/man/man1/$b.1 ${PREFIX}/man/man1/$b${MODPY_BIN_SUFFIX}.1
|
|
|
|
.endfor
|
|
|
|
.for b in ${PYBINS}
|
|
|
|
mv -f ${PREFIX}/bin/$b.py ${PREFIX}/bin/$b${MODPY_BIN_SUFFIX}.py
|
|
|
|
.endfor
|
|
|
|
|
2016-05-15 12:29:20 +00:00
|
|
|
do-test:
|
|
|
|
cd ${WRKSRC}/autotest && env ${TEST_ENV} ${MODPY_BIN} run_all.py
|
|
|
|
|
2009-02-09 23:07:05 +00:00
|
|
|
.include <bsd.port.mk>
|