2020-07-08 11:01:00 +00:00
|
|
|
# $OpenBSD: Makefile,v 1.88 2020/07/08 11:01:00 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
|
|
|
|
2020-07-08 11:01:00 +00:00
|
|
|
V = 3.1.2
|
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
|
2020-06-30 06:02:38 +00:00
|
|
|
FULLPKGNAME-python = py3-${DISTNAME}
|
2017-11-01 16:47:17 +00:00
|
|
|
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
|
|
|
|
2020-06-30 06:02:38 +00:00
|
|
|
SHARED_LIBS = gdal 39.1 #27.1
|
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
|
2019-07-12 20:45:45 +00:00
|
|
|
PERMIT_PACKAGE= Yes
|
2009-02-09 23:07:05 +00:00
|
|
|
|
2018-12-23 08:43:02 +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
|
2020-06-30 06:02:38 +00:00
|
|
|
FLAVOR = python3
|
2009-03-13 08:56:52 +00:00
|
|
|
|
2018-05-13 06:26:35 +00:00
|
|
|
COMPILER = base-clang ports-gcc
|
|
|
|
|
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 \
|
2018-05-13 06:26:35 +00:00
|
|
|
archivers/zstd \
|
2011-06-22 13:07:32 +00:00
|
|
|
graphics/tiff \
|
|
|
|
net/curl \
|
2016-05-25 20:53:45 +00:00
|
|
|
math/qhull \
|
2020-01-15 18:39:05 +00:00
|
|
|
math/hdf5 \
|
|
|
|
math/netcdf \
|
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 \
|
2019-05-12 08:07:33 +00:00
|
|
|
devel/proj>=6.0 \
|
|
|
|
devel/geotiff>=1.5.0
|
2011-06-22 13:07:32 +00:00
|
|
|
|
2020-01-15 18:39:05 +00:00
|
|
|
WANTLIB-main = c charset crypto curl expat freexl geos geos_c geotiff \
|
|
|
|
gif hdf5 hdf5_hl iconv jasper jpeg json-c lzma m \
|
|
|
|
netcdf nghttp2 openjp2 pcre png pq proj pthread qhull \
|
|
|
|
spatialite sqlite3 ssl tiff xml2 webp z zstd \
|
|
|
|
${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
|
2020-01-15 18:39:05 +00:00
|
|
|
WANTLIB-perl += c crypto curl expat freexl geos_c geotiff gif hdf5 iconv
|
2020-05-14 11:28:33 +00:00
|
|
|
WANTLIB-perl += jasper jpeg json-c m netcdf nghttp2 openjp2 pcre png
|
2019-05-12 08:07:33 +00:00
|
|
|
WANTLIB-perl += pq proj pthread qhull spatialite sqlite3 ssl tiff xml2 webp z zstd
|
2017-05-19 09:19:48 +00:00
|
|
|
|
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
|
|
|
|
2019-03-26 06:39:00 +00:00
|
|
|
MODPY_PYTEST = Yes
|
|
|
|
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
|
2019-05-12 08:07:33 +00:00
|
|
|
MODPY_EGG_VERSION = ${V}
|
2019-02-13 12:46:41 +00:00
|
|
|
MODPY_ADJ_FILES = swig/python/scripts/*.py swig/python/samples/*.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
|
|
|
|
2020-01-15 18:39:05 +00:00
|
|
|
CONFIGURE_ARGS =--without-cfitsio \
|
2019-01-17 07:57:54 +00:00
|
|
|
--without-cryptopp \
|
2009-02-09 23:07:05 +00:00
|
|
|
--without-xerces \
|
|
|
|
--without-mysql \
|
|
|
|
--without-odbc \
|
|
|
|
--without-oci \
|
|
|
|
--without-grass \
|
|
|
|
--without-idb \
|
|
|
|
--without-sde \
|
2020-05-14 11:28:33 +00:00
|
|
|
--without-exr \
|
2009-02-09 23:07:05 +00:00
|
|
|
--without-libgrass \
|
2020-05-14 11:28:33 +00:00
|
|
|
--with-hide-internal-symbols \
|
2019-05-12 08:07:33 +00:00
|
|
|
--with-pg \
|
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} \
|
2018-05-13 06:26:35 +00:00
|
|
|
--with-zstd=${LOCALBASE} \
|
2014-05-04 20:17:35 +00:00
|
|
|
--with-libjson-c=${LOCALBASE} \
|
2020-01-15 18:39:05 +00:00
|
|
|
--with-jasper=${LOCALBASE} \
|
|
|
|
--with-hdf5=${LOCALBASE} \
|
|
|
|
--with-netcdf=${LOCALBASE}
|
2009-02-09 23:07:05 +00:00
|
|
|
|
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
|
|
|
post-install:
|
2019-02-13 12:46:41 +00:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/${MODPY_PY_PREFIX}gdal
|
|
|
|
cp ${WRKSRC}/swig/python/samples/*.py ${PREFIX}/share/examples/${MODPY_PY_PREFIX}gdal
|
2017-11-01 16:47:17 +00:00
|
|
|
|
2016-05-15 12:29:20 +00:00
|
|
|
do-test:
|
2018-12-28 08:53:59 +00:00
|
|
|
cd ${WRKSRC}/autotest && env ${TEST_ENV} ${MODPY_BIN} -m pytest
|
2019-03-26 06:39:00 +00:00
|
|
|
# doesnt work, pytest needs to be run from within the tests dir
|
|
|
|
# ${MODPY_TEST_TARGET}
|
2016-05-15 12:29:20 +00:00
|
|
|
|
2009-02-09 23:07:05 +00:00
|
|
|
.include <bsd.port.mk>
|