Date: Fri, 2 Sep 2011 14:04:51 GMT From: Ruslan Mahmatkhanov <cvs-src@yandex.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/160394: [UPDATE] www/py-surl: depend on simplejson conditionally Message-ID: <201109021404.p82E4pl8058203@red.freebsd.org> Resent-Message-ID: <201109021410.p82EA9va034836@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 160394 >Category: ports >Synopsis: [UPDATE] www/py-surl: 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: Fri Sep 02 14:10:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Ruslan Mahmatkhanov >Release: 9.0-BETA1 >Organization: >Environment: 9.0-BETA1 i386 >Description: Right now this port uncoditionally depends on devel/py-simplejson, but it actually should not. They use native json module if running on python 2.6+ and use external simplejson if python < 2.6. """ try: import json except ImportError: try: import simplejson as json except ImportError: sys.stderr.write("Warning: json module could not load\n") """ This patch make it depend on devel/py-simplejson only if python version < 2.6. And this is actually run dependency, so remove it from BUILD_DEPENDS too. tag: simplejson26 >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruNa py-surl.orig/Makefile py-surl/Makefile --- py-surl.orig/Makefile 2010-10-19 18:56:40.000000000 +0400 +++ py-surl/Makefile 2011-09-02 17:58:41.000000000 +0400 @@ -7,6 +7,7 @@ PORTNAME= surl PORTVERSION= 0.7.0 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= http://launchpadlibrarian.net/37026875/ \ http://www.c-s.li/ports/ @@ -15,13 +16,16 @@ MAINTAINER= c-s@c-s.li COMMENT= URL shortening command line application -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}simplejson>=0:${PORTSDIR}/devel/py-simplejson -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}simplejson>=0:${PORTSDIR}/devel/py-simplejson - LICENSE= GPLv3 USE_PYTHON= 2.5+ USE_PYDISTUTILS=yes USE_BZIP2= yes -.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> >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109021404.p82E4pl8058203>