summaryrefslogtreecommitdiff
path: root/math/biggles/Makefile
blob: bfe8dd0b90aeddfb3019c7c3353b091cefcedfff (plain)
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
# Created by: ijliao
# $FreeBSD$

PORTNAME=	biggles
PORTVERSION=	1.6.6
PORTREVISION=	8
CATEGORIES=	math
MASTER_SITES=	SF
DISTNAME=	python2-${PORTNAME}-${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Create publication-quality 2D scientific plots

LICENSE=	GPLv2+
LICENSE_FILE=	${WRKSRC}/COPYING

BUILD_DEPENDS=	${PYNUMPY}
LIB_DEPENDS=	libplot.so:graphics/plotutils

USES=		gmake python:2.7
MAKE_ARGS=	CC="${CC}" \
		CFLAGS="${CFLAGS} -fPIC" \
		LIBPLOT_CPPFLAGS="-I${LOCALBASE}/include" \
		LIBPLOT_LDFLAGS="-L${LOCALBASE}/lib -lplot" \
		PYTHON="${PYTHON_CMD}"

post-patch:
	@${REINPLACE_CMD} -e '/CC/s,gcc,$$\{CC\},' ${WRKSRC}/make.inc
	@${REINPLACE_CMD} -e 's|= python|= ${PYTHON_CMD}|' ${WRKSRC}/make.inc

pre-build:
	@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}
	@${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}

do-install:
	@${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/biggles/libplot
	(cd ${WRKSRC}/src && ${INSTALL_DATA} *.ini *.py *.pyc *.pyo \
		${STAGEDIR}${PYTHON_SITELIBDIR}/biggles)
	(cd ${WRKSRC}/src && ${INSTALL_LIB} *.so \
		${STAGEDIR}${PYTHON_SITELIBDIR}/biggles)
	(cd ${WRKSRC}/src/libplot/ && ${INSTALL_DATA} *.py *.pyc *.pyo \
		${STAGEDIR}${PYTHON_SITELIBDIR}/biggles/libplot)
	(cd ${WRKSRC}/src/libplot/ && ${INSTALL_LIB} *.so \
		${STAGEDIR}${PYTHON_SITELIBDIR}/biggles/libplot)

.include <bsd.port.mk>