aboutsummaryrefslogtreecommitdiffstats
path: root/math/py-basemap/Makefile
blob: e8f4e56389051bf889811884e503a22d6c6feb6d (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
39
40
41
42
# Created by: mainland@apeiron.net
# $FreeBSD$

PORTNAME=   basemap
PORTVERSION=    1.0.7
CATEGORIES= math python
MASTER_SITES=   SF/matplotlib/matplotlib-toolkits/${PORTNAME}-${PORTVERSION}
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}

MAINTAINER= bofh@FreeBSD.org
COMMENT=    Plots data on map projections with boundaries

LICENSE=    GPLv2 LGPL21 MIT
LICENSE_COMB=   multi

BUILD_DEPENDS=  ${PYNUMPY}
RUN_DEPENDS=    ${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib@${FLAVOR}
LIB_DEPENDS=    libgeos.so:graphics/geos

USES=       python:2.7
USE_PYTHON= distutils autoplist

DATADIR=    ${PREFIX}/share/py-${PORTNAME}-data
EXAMPLESDIR=    ${PREFIX}/share/examples/py-${PORTNAME}

MAKE_ENV=   BASEMAP_DATA_PATH=${DATADIR}

OPTIONS_DEFINE= EXAMPLES

PORTEXAMPLES=   *

post-patch:
    @${GREP} -lR "share/basemap" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \
        -e "s,share/basemap,share/py-basemap-data,g"

post-install:
    @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
    cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
    @${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/_geoslib.so
    @${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/mpl_toolkits/basemap/_proj.so

.include <bsd.port.mk>