summaryrefslogtreecommitdiff
path: root/devel/py-coro
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2000-07-07 13:27:23 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2000-07-07 13:27:23 +0000
commitcd6245e1ac10522f31c1f374df752da654eec457 (patch)
tree77564beb30d1ee8c6a71ba30bf570ee148db859c /devel/py-coro
parentUpdate to 1.0c16/Korean. (diff)
Add py-coro - a Python coroutines module.
PR: 19466 Submitted by: Kelly Yancey <kbyanc@posi.net>
Notes
Notes: svn path=/head/; revision=30295
Diffstat (limited to 'devel/py-coro')
-rw-r--r--devel/py-coro/Makefile54
-rw-r--r--devel/py-coro/distinfo1
-rw-r--r--devel/py-coro/files/patch-aa33
-rw-r--r--devel/py-coro/pkg-comment1
-rw-r--r--devel/py-coro/pkg-descr17
-rw-r--r--devel/py-coro/pkg-plist31
6 files changed, 137 insertions, 0 deletions
diff --git a/devel/py-coro/Makefile b/devel/py-coro/Makefile
new file mode 100644
index 000000000000..f1f2af48e29e
--- /dev/null
+++ b/devel/py-coro/Makefile
@@ -0,0 +1,54 @@
+# Ports collection Makefile for: py-coro
+# Date created: 06/22/2000
+# Whom: kbyanc@posi.net
+#
+# $FreeBSD$
+#
+
+PORTNAME= coro
+PORTVERSION= 20000424
+CATEGORIES= devel python
+MASTER_SITES= http://www.egroups.com/files/python-coro/egroups/
+PKGNAMEPREFIX= py-
+DISTNAME= egp-coro-20000424
+
+MAINTAINER= kbyanc@posi.net
+
+BUILD_DEPENDS= ${LOCALBASE}/lib/libcoro.a:${PORTSDIR}/devel/libcoro \
+ python:${PORTSDIR}/lang/python
+RUN_DEPENDS= python:${PORTSDIR}/lang/python
+
+CORO_MODULES= coroutinemodule.so sendfilemodule.so
+CORO_PACKAGE= coro corodns coromysql corourl \
+ coutil
+CORO_EXAMPLES= backdoor potato newpotato fringe \
+ coro_ehttpd crawler fifo
+CORO_DOCS= README coro.txt
+
+post-build:
+ @${LOCALBASE}/bin/python \
+ ${LOCALBASE}/lib/python1.5/compileall.py ${WRKSRC}
+
+do-install:
+ ${MKDIR} ${PREFIX}/lib/python1.5/site-packages
+ ${MKDIR} ${PREFIX}/lib/python1.5/site-packages/coro
+ ${MKDIR} ${PREFIX}/share/examples/py-coro
+.for i in ${CORO_MODULES}
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/lib/python1.5/site-packages
+.endfor
+.for i in ${CORO_PACKAGE}
+ ${INSTALL_DATA} ${WRKSRC}/${i}.py ${WRKSRC}/$i.pyc \
+ ${PREFIX}/lib/python1.5/site-packages/coro
+.endfor
+.for i in ${CORO_EXAMPLES}
+ ${INSTALL_DATA} ${WRKSRC}/${i}.py ${WRKSRC}/$i.pyc \
+ ${PREFIX}/share/examples/py-coro
+.endfor
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${PREFIX}/share/doc/py-coro
+.for i in ${CORO_DOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/share/doc/py-coro
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/devel/py-coro/distinfo b/devel/py-coro/distinfo
new file mode 100644
index 000000000000..f32325f04b8c
--- /dev/null
+++ b/devel/py-coro/distinfo
@@ -0,0 +1 @@
+MD5 (egp-coro-20000424.tar.gz) = 92c70dcb9a20c795fc488fc6595c896d
diff --git a/devel/py-coro/files/patch-aa b/devel/py-coro/files/patch-aa
new file mode 100644
index 000000000000..7054fb171435
--- /dev/null
+++ b/devel/py-coro/files/patch-aa
@@ -0,0 +1,33 @@
+--- Makefile.orig Mon Apr 24 12:51:16 2000
++++ Makefile Fri Jul 7 14:33:04 2000
+@@ -1,13 +1,14 @@
++PREFIX?= /usr/local
+ MODULES= coroutinemodule.so sendfilemodule.so
+ OBJS= coroutinemodule.o sendfilemodule.o
+-INCLUDES= -I/usr/local/include/python1.5 -I/usr/local/include
++INCLUDES= -I${LOCALBASE}/include/python1.5 -I${LOCALBASE}/include
+ # the location of the coro archive:
+-COROLIB= /usr/local/lib/libcoro.a
+-OPTS= -g -Wall -O6
+-#OPTS= -g -Wall
++COROLIB= -L${LOCALBASE}/lib -lcoro
++CFLAGS?= -g -Wall -O6
++#CFLAGS?= -g -Wall
+
+-CC= gcc
+-LD= ld
++CC?= gcc
++LD?= ld
+ RM= rm -f
+
+ all: ${OBJS} ${MODULES}
+@@ -23,7 +24,7 @@
+ ${LD} sendfilemodule.o -shared -o sendfilemodule.so
+
+ coroutinemodule.o: coroutinemodule.c
+- ${CC} ${INCLUDES} ${OPTS} -c coroutinemodule.c
++ ${CC} ${CFLAGS} ${INCLUDES} -c coroutinemodule.c
+
+ sendfilemodule.o: sendfilemodule.c
+- ${CC} ${INCLUDES} ${OPTS} -c sendfilemodule.c
++ ${CC} ${CFLAGS} ${INCLUDES} -c sendfilemodule.c
diff --git a/devel/py-coro/pkg-comment b/devel/py-coro/pkg-comment
new file mode 100644
index 000000000000..723c9f9bad7f
--- /dev/null
+++ b/devel/py-coro/pkg-comment
@@ -0,0 +1 @@
+Python coroutine implementation
diff --git a/devel/py-coro/pkg-descr b/devel/py-coro/pkg-descr
new file mode 100644
index 000000000000..2e0d3056a260
--- /dev/null
+++ b/devel/py-coro/pkg-descr
@@ -0,0 +1,17 @@
+From the README:
+
+ Coroutines can be used to implement 'cooperative multitasking' (as
+ opposed to 'preemptive multitasking'). Coroutines are very
+ lightweight (on Win32, they are called 'fibers'), and when combined
+ with an I/O-based scheduling system, they can be used to build highly
+ scalable network servers.
+
+ Coroutines give you the best of both worlds: the efficiency of
+ asynchronous state-machine programming, with the simplicity of
+ threaded programming; straight-line, readable code. And they don't
+ have the overhead of preemptive threads - nearly everything happens in
+ user-space. Also, complexity is lower because you don't have to worry
+ about locking access to shared state.
+
+ -Kelly
+ kbyanc@posi.net
diff --git a/devel/py-coro/pkg-plist b/devel/py-coro/pkg-plist
new file mode 100644
index 000000000000..42dcfb9650f1
--- /dev/null
+++ b/devel/py-coro/pkg-plist
@@ -0,0 +1,31 @@
+lib/python1.5/site-packages/coro/coro.py
+lib/python1.5/site-packages/coro/coro.pyc
+lib/python1.5/site-packages/coro/corodns.py
+lib/python1.5/site-packages/coro/corodns.pyc
+lib/python1.5/site-packages/coro/coromysql.py
+lib/python1.5/site-packages/coro/coromysql.pyc
+lib/python1.5/site-packages/coro/corourl.py
+lib/python1.5/site-packages/coro/corourl.pyc
+lib/python1.5/site-packages/coro/coutil.py
+lib/python1.5/site-packages/coro/coutil.pyc
+lib/python1.5/site-packages/coroutinemodule.so
+lib/python1.5/site-packages/sendfilemodule.so
+share/doc/py-coro/README
+share/doc/py-coro/coro.txt
+share/examples/py-coro/backdoor.py
+share/examples/py-coro/backdoor.pyc
+share/examples/py-coro/coro_ehttpd.py
+share/examples/py-coro/coro_ehttpd.pyc
+share/examples/py-coro/crawler.py
+share/examples/py-coro/crawler.pyc
+share/examples/py-coro/fifo.py
+share/examples/py-coro/fifo.pyc
+share/examples/py-coro/fringe.py
+share/examples/py-coro/fringe.pyc
+share/examples/py-coro/newpotato.py
+share/examples/py-coro/newpotato.pyc
+share/examples/py-coro/potato.py
+share/examples/py-coro/potato.pyc
+@dirrm lib/python1.5/site-packages/coro
+@dirrm share/examples/py-coro
+@dirrm share/doc/py-coro