blob: cb9626c34ba26fb389b0e744593ba83900b12a28 (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Created by: mainland@apeiron.net
# $FreeBSD$
PORTNAME= basemap
PORTVERSION= 0.9.2
PORTREVISION= 6
CATEGORIES= math python
MASTER_SITES= SF/matplotlib/matplotlib-toolkits/${PORTNAME}-${PORTVERSION}
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= mainland@apeiron.net
COMMENT= Plots data on map projections (with continental and political boundaries)
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/matplotlib/:${PORTSDIR}/math/py-matplotlib
USE_PYTHON= yes
USE_PYDISTUTILS= yes
DATADIR= ${PREFIX}/share/py-${PORTNAME}-data
EXAMPLESDIR= ${PREFIX}/share/examples/py-${PORTNAME}
MAKE_ENV= BASEMAP_DATA_PATH=${DATADIR}
PLISTDIR= ${PYTHON_SITELIBDIR}/matplotlib/toolkits/basemap \
${PYTHON_SITELIBDIR}/shapelib \
${PYTHON_SITELIBDIR}/dbflib \
${PYTHON_SITELIBDIR}/dbflibc.so \
${PYTHON_SITELIBDIR}/shptree.so \
${PYTHON_SITELIBDIR}/shapelibc.so \
${PYTHON_SITELIBDIR}/pyproj.so \
${DATADIR}
.if !defined(NOPORTDOCS)
PLISTDIR+= ${EXAMPLESDIR}
.endif
NO_STAGE= yes
.include <bsd.port.pre.mk>
post-patch:
@${GREP} -lR "share/basemap" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} \
-e "s,share/basemap,share/py-basemap-data,g"
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${EXAMPLESDIR}
${CP} -R ${WRKSRC}/examples/ ${EXAMPLESDIR}
.endif
.for dir in ${PLISTDIR}
@${FIND} ${dir} ! -type d | \
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
@${FIND} ${dir} -type d | ${SORT} -r | \
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST}
.endfor
@${ECHO} "@unexec rmdir %D/${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;}/matplotlib/toolkits 2> /dev/null || true" >> ${TMPPLIST}
.include <bsd.port.post.mk>
|