aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorrene <rene@FreeBSD.org>2012-12-24 04:22:37 +0800
committerrene <rene@FreeBSD.org>2012-12-24 04:22:37 +0800
commita3b3a55471246532eff44d95a35e34ecd379f4e4 (patch)
treeac28d941d0e01a0a276ed6f2cef8e5c2abffb025 /www
parent4cb8f83cbb0a81986db377495f378ede1f6a0635 (diff)
downloadfreebsd-ports-gnome-a3b3a55471246532eff44d95a35e34ecd379f4e4.tar.gz
freebsd-ports-gnome-a3b3a55471246532eff44d95a35e34ecd379f4e4.tar.zst
freebsd-ports-gnome-a3b3a55471246532eff44d95a35e34ecd379f4e4.zip
ws4py is a Python package implementing the WebSocket protocol as defined
in RFC 6455. It provides client and server implementations alike that can be using different techniques like threads, micro-threads, or event loops. WWW: http://www.defuze.org/oss/ws4py/docs/
Diffstat (limited to 'www')
-rw-r--r--www/Makefile1
-rw-r--r--www/py-ws4py/Makefile83
-rw-r--r--www/py-ws4py/distinfo2
-rw-r--r--www/py-ws4py/files/pkg-message.in5
-rw-r--r--www/py-ws4py/pkg-descr6
-rw-r--r--www/py-ws4py/pkg-plist1
6 files changed, 98 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile
index ec4d3ff37557..eb3b95ab7319 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -1634,6 +1634,7 @@
SUBDIR += py-webware-component
SUBDIR += py-werkzeug
SUBDIR += py-wikitools
+ SUBDIR += py-ws4py
SUBDIR += py-wsgiauth
SUBDIR += py-zope.app.wsgi
SUBDIR += pyblosxom
diff --git a/www/py-ws4py/Makefile b/www/py-ws4py/Makefile
new file mode 100644
index 000000000000..9a2bb33704c1
--- /dev/null
+++ b/www/py-ws4py/Makefile
@@ -0,0 +1,83 @@
+# Created by: rene@FreeBSD.org
+# $FreeBSD$
+
+PORTNAME= ws4py
+PORTVERSION= 0.2.4
+CATEGORIES= www python
+MASTER_SITES= http://www.defuze.org/oss/${PORTNAME}/
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= rene@FreeBSD.org
+# python@ is also OK with me
+COMMENT= WebSocket package for Python
+
+LICENSE= BSD
+
+SUB_FILES= pkg-message
+
+USE_PYTHON= yes
+USE_PYDISTUTILS= easy_install
+
+OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
+OPTIONS_DEFINE= CHERRYPY GEVENT TORNADO
+OPTIONS_DEFAULT= GEVENT
+CHERRYPY_DESC= CherryPy server support
+GEVENT_DESC= gevent-based client/server support
+TORNADO_DESC= Tornado client support
+
+.include <bsd.port.options.mk>
+
+CHERRYPY_FILES= test/test_cherrypy.py ws4py/server/cherrypyserver.py
+GEVENT_FILES= ws4py/client/geventclient.py ws4py/server/geventserver.py
+TORNADO_FILES= ws4py/client/tornadoclient.py
+
+.if ${PORT_OPTIONS:MCHERRYPY}
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}cherrypy>=3.2.2:${PORTSDIR}/www/py-cherrypy
+SUB_LIST+= MSG_NO_CHERRYPY=
+.else
+SUB_LIST+= MSG_NO_CHERRYPY="${CHERRYPY_FILES}"
+.endif
+
+.if ${PORT_OPTIONS:MGEVENT}
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}gevent>=0.13.6:${PORTSDIR}/devel/py-gevent
+SUB_LIST+= MSG_NO_GEVENT=
+.else
+SUB_LIST+= MSG_NO_GEVENT="${GEVENT_FILES}"
+.endif
+
+.if ${PORT_OPTIONS:MTORNADO}
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tornado>=2.0:${PORTSDIR}/www/py-tornado
+SUB_LIST+= MSG_NO_TORNADO=
+.else
+SUB_LIST+= MSG_NO_TORNADO="${TORNADO_FILES}"
+.endif
+
+.if ! ${PORT_OPTIONS:MCHERRYPY} || ! ${PORT_OPTIONS:MGEVENT} || \
+ ! ${PORT_OPTIONS:MTORNADO}
+SUB_LIST+= NOTE="Note that the following files are omitted from the package:"
+.else
+SUB_LIST+= NOTE=
+.endif
+
+# Do not install files which will not work
+post-patch:
+.if ! ${PORT_OPTIONS:MCHERRYPY}
+.for f in ${CHERRYPY_FILES}
+ ${RM} ${WRKSRC}/${f}
+.endfor
+.endif
+.if ! ${PORT_OPTIONS:MGEVENT}
+.for f in ${GEVENT_FILES}
+ ${RM} ${WRKSRC}/${f}
+.endfor
+.endif
+.if ! ${PORT_OPTIONS:MTORNADO}
+.for f in ${TORNADO_FILES}
+ ${RM} ${WRKSRC}/${f}
+.endfor
+.endif
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/www/py-ws4py/distinfo b/www/py-ws4py/distinfo
new file mode 100644
index 000000000000..cd2afd8fc55a
--- /dev/null
+++ b/www/py-ws4py/distinfo
@@ -0,0 +1,2 @@
+SHA256 (ws4py-0.2.4.tar.gz) = 1adb03db73d97886a05a0b22318265e4e1b0d05e9324873576f91f2ef6dfb0ad
+SIZE (ws4py-0.2.4.tar.gz) = 25049
diff --git a/www/py-ws4py/files/pkg-message.in b/www/py-ws4py/files/pkg-message.in
new file mode 100644
index 000000000000..3751f6dd264a
--- /dev/null
+++ b/www/py-ws4py/files/pkg-message.in
@@ -0,0 +1,5 @@
+%%NOTE%%
+
+%%MSG_NO_CHERRYPY%%
+%%MSG_NO_GEVENT%%
+%%MSG_NO_TORNADO%%
diff --git a/www/py-ws4py/pkg-descr b/www/py-ws4py/pkg-descr
new file mode 100644
index 000000000000..f92f6a6f5edc
--- /dev/null
+++ b/www/py-ws4py/pkg-descr
@@ -0,0 +1,6 @@
+ws4py is a Python package implementing the WebSocket protocol as defined
+in RFC 6455. It provides client and server implementations alike that
+can be using different techniques like threads, micro-threads,
+or event loops.
+
+WWW: http://www.defuze.org/oss/ws4py/docs/
diff --git a/www/py-ws4py/pkg-plist b/www/py-ws4py/pkg-plist
new file mode 100644
index 000000000000..ddf68a1c022f
--- /dev/null
+++ b/www/py-ws4py/pkg-plist
@@ -0,0 +1 @@
+%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%%