summaryrefslogtreecommitdiffstats
path: root/devel/py-coro/Makefile
blob: 381c7b38040cf22d8b1b2c7d52a939ccfb0daaa6 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Ports collection Makefile for:	py-coro
# Date created:				06/22/2000
# Whom:					kbyanc@posi.net
#
# $FreeBSD$
#

PORTNAME=		coro
PORTVERSION=		20010202
CATEGORIES=		devel python
MASTER_SITES=		http://www.dotfunk.com/projects/coro/
PKGNAMEPREFIX=		py-
DISTNAME=		${PORTNAME}_2001_02_02

MAINTAINER=		kbyanc@posi.net

BUILD_DEPENDS=		${LOCALBASE}/lib/libcoro.a:${PORTSDIR}/devel/libcoro

USE_PYTHON=		yes
PLIST_SUB+=		PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S/^${LOCALBASE}\///g}
MAKE_ENV=		PYTHON_VERSION=${PYTHON_VERSION:S/python//} \
			EXTRA_INCLUDE="-I${LOCALBASE}/include" \
			EXTRA_LIB="-L${LOCALBASE}/lib"
CONFIGURE_ARGS=		installdir="${PREFIX}" \
			PYTHON="${PYTHON_CMD}" \
			prefix="${PREFIX}"

COROMOD_MAKE=		cd ${WRKSRC}/coromodule && ${MAKE_ENV} ${MAKE}
CORO_PACKAGE=		__init__ coro corodns coro_fd coro_subproc corodevice \
			dnsclass dnslib dnsopcode dnstype fifo
CORO_EXAMPLES= 		backdoor coro_fd coro_subproc coro_ehttpd \
			corohttpd

do-configure:
	@${COROMOD_MAKE} -f Makefile.pre.in boot ${CONFIGURE_ARGS}

do-build:
	@${COROMOD_MAKE}

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

do-install:
	@${COROMOD_MAKE} install

	${MKDIR} ${PYTHON_SITELIBDIR}
	${MKDIR} ${PYTHON_SITELIBDIR}/coro
	${MKDIR} ${PREFIX}/share/examples/py-coro
.for i in ${CORO_PACKAGE}
	${INSTALL_DATA} ${WRKSRC}/${i}.py* \
		${PYTHON_SITELIBDIR}/coro
.endfor
.if !defined(NOPORTDOCS)
.for i in ${CORO_EXAMPLES}
	${INSTALL_DATA} ${WRKSRC}/${i}.py* \
		${PREFIX}/share/examples/py-coro
.endfor
.endif

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