ports/160859: [PATCH] www/py-tornado: depend on simplejson conditionally

Ruslan Mahmatkhanov cvs-src at yandex.ru
Tue Sep 20 21:10:05 UTC 2011


>Number:         160859
>Category:       ports
>Synopsis:       [PATCH] www/py-tornado: depend on simplejson conditionally
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 20 21:10:05 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Ruslan Mahmatkhanov
>Release:        9.0-BETA2
>Organization:
>Environment:
9.0-BETA2 i386
>Description:
This port is only needed simplejson if it run with python less than 2.6. From README:

"""
To use all of the features of Tornado, you need to have PycURL 
and (for Python 2.5 only) simplejson installed.

"""

so patch attached makes it depend on simplejson only if python version is < 2.6.
- bump portrevision because of dependency change

tag: simplejson26

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/Makefile b/Makefile
index 04d6829..1f37d03 100644
--- a/Makefile
+++ b/Makefile
@@ -17,12 +17,17 @@ COMMENT=	Python Web Server from FriendFeed
 
 LICENSE=	ASL
 
-RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}curl>0:${PORTSDIR}/ftp/py-curl \
-		${PYTHON_PKGNAMEPREFIX}simplejson>0:${PORTSDIR}/devel/py-simplejson
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}curl>0:${PORTSDIR}/ftp/py-curl
 
 USE_PYTHON=	2.5+
 USE_PYDISTUTILS=	easy_install
 
 FETCH_ARGS=	-pRr
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_REL} < 260
+RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}simplejson>=2.0.9:${PORTSDIR}/devel/py-simplejson
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/pkg-descr b/pkg-descr
index ccd6de6..f0e09a0 100644
--- a/pkg-descr
+++ b/pkg-descr
@@ -1,10 +1,10 @@
 Tornado is an open source version of this web server and some of the tools we
 use most often at FriendFeed.
 
-The framework is distinct from most mainstream web server frameworks (and 
-certainly most Python frameworks) because it is non-blocking and reasonably 
-fast. Because it is non-blocking and uses epoll, it can handle 1000s of 
-simultaneous standing connections, which means the framework is ideal for 
+The framework is distinct from most mainstream web server frameworks (and
+certainly most Python frameworks) because it is non-blocking and reasonably
+fast. Because it is non-blocking and uses epoll, it can handle 1000s of
+simultaneous standing connections, which means the framework is ideal for
 real-time web services.
 
 WWW: http://www.tornadoweb.org


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list