aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/py-gdal/Makefile
blob: 35a23bc7ec1a788160bc2319de12b1e2b758d1b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
# $FreeBSD$

PORTNAME=   gdal
PORTVERSION=    2.0.0
CATEGORIES= graphics python
MASTER_SITES=   http://download.osgeo.org/gdal/${PORTVERSION}/ \
        ftp://ftp.remotesensing.org/pub/gdal/${PORTVERSION}/ \
        LOCAL/sunpoet
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= sunpoet@FreeBSD.org
COMMENT=    Python binding for GDAL

LICENSE=    MIT

LIB_DEPENDS=    libgdal.so:${PORTSDIR}/graphics/gdal

OPTIONS_DEFINE= NUMPY
NUMPY_DESC= Enable array support via NumPy

USE_PYTHON= autoplist distutils
USES=       python shebangfix tar:xz

WRKSRC=     ${WRKDIR}/${DISTNAME}/swig/python

SHEBANG_FILES=  scripts/*.py
python_OLD_CMD= /usr/bin/env python

NUMPY_BUILD_DEPENDS=    ${PKGNAMEPREFIX}numpy>=1.0.0:${PORTSDIR}/math/py-numpy
NUMPY_RUN_DEPENDS=  ${PKGNAMEPREFIX}numpy>=1.0.0:${PORTSDIR}/math/py-numpy
NUMPY_USES=     fortran

post-install:
    ${INSTALL_SCRIPT} ${WRKSRC}/scripts/*.py ${STAGEDIR}${PREFIX}/bin/
    ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/osgeo/*.so

.include <bsd.port.mk>