aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorperky <perky@FreeBSD.org>2003-08-02 06:52:43 +0800
committerperky <perky@FreeBSD.org>2003-08-02 06:52:43 +0800
commit97fa8a9421f2c1e26c96089581a6d26e3254a206 (patch)
tree4b8198e4129b24e1fa8c10bb112677aeb51e4461 /devel
parent271d9f1c59a98d251bf68a4522117ae2cc2f6937 (diff)
downloadfreebsd-ports-gnome-97fa8a9421f2c1e26c96089581a6d26e3254a206.tar.gz
freebsd-ports-gnome-97fa8a9421f2c1e26c96089581a6d26e3254a206.tar.zst
freebsd-ports-gnome-97fa8a9421f2c1e26c96089581a6d26e3254a206.zip
Add build workarounds for python2.3
Diffstat (limited to 'devel')
-rw-r--r--devel/py-coro/Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/devel/py-coro/Makefile b/devel/py-coro/Makefile
index 0a331f06df81..2c54867b79f5 100644
--- a/devel/py-coro/Makefile
+++ b/devel/py-coro/Makefile
@@ -18,6 +18,7 @@ COMMENT= Python coroutine implementation
BUILD_DEPENDS= ${LOCALBASE}/lib/libcoro.a:${PORTSDIR}/devel/libcoro
USE_PYTHON= yes
+USE_REINPLACE= yes
PLIST_SUB+= PYTHON_SITELIBDIR=${PYTHON_SITELIBDIR:S/^${LOCALBASE}\///g}
MAKE_ENV= PYTHON_VERSION=${PYTHON_VERSION:S/python//} \
EXTRA_INCLUDE="-I${LOCALBASE}/include" \
@@ -32,6 +33,18 @@ CORO_PACKAGE= __init__ coro corodns coro_fd coro_subproc corodevice \
CORO_EXAMPLES= backdoor coro_fd coro_subproc coro_ehttpd \
corohttpd
+.include <bsd.port.pre.mk>
+
+post-patch:
+.if ${PYTHON_REL} >= 230
+ @${REINPLACE_CMD} -e 's,@DEFS@,,g' ${WRKSRC}/coromodule/Makefile.pre.in
+.for f in coro.py coro_fd.py coro_subproc.py corodevice.py corodns.py corohttpd.py
+ @${REINPLACE_CMD} -e 's,yield,yield_,g' ${WRKSRC}/${f}
+ # yield is a reserved keyword always from python2.3.
+.endfor
+ @${RM} -f ${WRKSRC}/*.bak
+.endif
+
do-configure:
@${COROMOD_MAKE} -f Makefile.pre.in boot ${CONFIGURE_ARGS}
@@ -58,4 +71,4 @@ do-install:
.endfor
.endif
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>