From nobody@FreeBSD.org  Fri Sep  2 14:04:52 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7767F106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  2 Sep 2011 14:04:52 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 678988FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  2 Sep 2011 14:04:52 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p82E4p6c058204
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 2 Sep 2011 14:04:51 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p82E4pl8058203;
	Fri, 2 Sep 2011 14:04:51 GMT
	(envelope-from nobody)
Message-Id: <201109021404.p82E4pl8058203@red.freebsd.org>
Date: Fri, 2 Sep 2011 14:04:51 GMT
From: Ruslan Mahmatkhanov <cvs-src@yandex.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [UPDATE] www/py-surl: depend on simplejson conditionally
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: c-s@c-s.li

>Number:         160394
>Category:       ports
>Synopsis:       [UPDATE] www/py-surl: depend on simplejson conditionally
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    cs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 02 14:10:09 UTC 2011
>Closed-Date:    Wed Sep 21 07:02:50 UTC 2011
>Last-Modified:  Wed Sep 21 07:02:50 UTC 2011
>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:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Sep 2 14:10:19 UTC 2011 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160394 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: c-s@c-s.li
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/160394: [UPDATE] www/py-surl: depend on simplejson conditionally
Date: Fri, 2 Sep 2011 14:10:17 UT

 Maintainer of www/py-surl,
 
 Please note that PR ports/160394 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/160394
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
Responsible-Changed-From-To: freebsd-ports-bugs->cs 
Responsible-Changed-By: glarkin 
Responsible-Changed-When: Tue Sep 13 10:54:39 EDT 2011 
Responsible-Changed-Why:  
Reassign to maintainer who is a new committer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160394 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/160394: commit references a PR
Date: Wed, 21 Sep 2011 06:59:22 +0000 (UTC)

 cs          2011-09-21 06:59:13 UTC
 
   FreeBSD ports repository
 
   Modified files:
     www/py-surl          Makefile 
   Log:
   Depend on simplejson conditionally
   
   PR:             ports/160394
   Submitted by:   Ruslan Mahmatkhanov <cvs-src@yandex.ru>
   Approved by:    wen@ (co-mentor)
   
   Revision  Changes    Path
   1.4       +8 -4      ports/www/py-surl/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: feedback->closed 
State-Changed-By: cs 
State-Changed-When: Wed Sep 21 07:00:48 UTC 2011 
State-Changed-Why:  
Committed. Thank you very much for submitting your patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160394 
>Unformatted:
