summaryrefslogtreecommitdiffstats
path: root/devel/pyrex/Makefile
blob: 20bc9a47264fd45e576e7ab89ff0339ddb2933a3 (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
# New ports collection makefile for:	pyrex
# Date created:		11 April 2002
# Whom:			Hye-Shik Chang
#
# $FreeBSD$
#

PORTNAME=	pyrex
PORTVERSION=	0.8.1
CATEGORIES=	devel lang python
MASTER_SITES=	http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
PKGNAMEPREFIX=	${PYTHONPKGNAMEPREFIX}
DISTNAME=	Pyrex-${PORTVERSION}

MAINTAINER=	perky@FreeBSD.org
COMMENT=	Programming Language for writing Python extension modules

BUILD_DEPENDS=	${PYTHON_SITELIBDIR}/Plex/__init__.py:${PORTSDIR}/devel/py-plex
RUN_DEPENDS=	${PYTHON_SITELIBDIR}/Plex/__init__.py:${PORTSDIR}/devel/py-plex

USE_PYTHON=	yes
USE_PYDISTUTILS=yes
USE_REINPLACE=	yes

post-patch:
	@${REINPLACE_CMD} -e 's|^PYINCLUDE =.*|PYINCLUDE=${PYTHON_INCLUDEDIR}|g' \
		-e 's|\.\./py|${PREFIX}/bin/py|g' ${WRKSRC}/Demos/Makefile
	@${REINPLACE_CMD} -e "s|'Plex'||g" ${WRKSRC}/setup.py
	@${RM} -f ${WRKSRC}/Demos/Makefile.bak

post-install:
	@# precompile lexicon pickle
	@cd ${WRKSRC}/Demos && ${PYTHON_CMD} ${PREFIX}/bin/pyrexc primes.pyx

.if !defined(NOPORTDOCS)
	@cd ${WRKSRC}/Demos && ${MAKE} clean

	@${MKDIR} ${DOCSDIR}
	@cd ${WRKSRC}/Doc && ${INSTALL_DATA} ./* ${DOCSDIR}
	@${MKDIR} ${EXAMPLESDIR}
	@${TAR} -C ${WRKSRC}/Demos -cf - . | \
	 ${TAR} -C ${EXAMPLESDIR} -xf -
.endif

.include <bsd.port.mk>
OpenPOWER on IntegriCloud