From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Sep 2 14:40:11 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9646A106567A for ; Fri, 2 Sep 2011 14:40:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EF6AC8FC15 for ; Fri, 2 Sep 2011 14:40:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p82Ee7xC063657 for ; Fri, 2 Sep 2011 14:40:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p82Ee79H063656; Fri, 2 Sep 2011 14:40:07 GMT (envelope-from gnats) Resent-Date: Fri, 2 Sep 2011 14:40:07 GMT Resent-Message-Id: <201109021440.p82Ee79H063656@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ruslan Mahmatkhanov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A60C8106566C for ; Fri, 2 Sep 2011 14:39:13 +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 7C4B08FC0C for ; Fri, 2 Sep 2011 14:39:13 +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 p82EdD4c013931 for ; Fri, 2 Sep 2011 14:39:13 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p82EdDwo013930; Fri, 2 Sep 2011 14:39:13 GMT (envelope-from nobody) Message-Id: <201109021439.p82EdDwo013930@red.freebsd.org> Date: Fri, 2 Sep 2011 14:39:13 GMT From: Ruslan Mahmatkhanov To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/160395: [PATCH] devel/rbtools: depend on simplejson conditionally X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 14:40:11 -0000 >Number: 160395 >Category: ports >Synopsis: [PATCH] devel/rbtools: 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:40:07 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. In setup.py: """ try: import json except ImportError: install_requires.append('simplejson') """ In other code: """ try: # Specifically import json_loads, to work around some issues with # installations containing incompatible modules named "json". from json import loads as json_loads except ImportError: from simplejson import loads as json_loads """ This patch make it depend on devel/py-simplejson only if python version < 2.6. And for python < 2.6 it's not only build dependency but run dependency too, so change this respectively. tag: simplejson26 >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruNa rbtools.orig/Makefile rbtools/Makefile --- rbtools.orig/Makefile 2011-04-11 15:29:50.000000000 +0400 +++ rbtools/Makefile 2011-09-02 18:30:47.000000000 +0400 @@ -7,6 +7,7 @@ PORTNAME= ${ORIGNAME:L} DISTVERSION= 0.3.2 +PORTVERSION= 1 CATEGORIES= devel MASTER_SITES= http://downloads.reviewboard.org/releases/${ORIGNAME}/${DISTVERSION:C|^(...).*|\1|}/ DISTNAME= ${ORIGNAME}-${DISTVERSION} @@ -14,8 +15,6 @@ MAINTAINER= flz@FreeBSD.org COMMENT= ReviewBoard Toolset -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}simplejson>=1.4:${PORTSDIR}/devel/py-simplejson - ORIGNAME= RBTools USE_PYTHON= 2.5+ @@ -23,4 +22,14 @@ PYDISTUTILS_PKGNAME= ${ORIGNAME} PYDISTUTILS_PKGVERSION= ${DISTVERSION} -.include +PLIST_FILES= bin/post-review \ + %%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%% + +.include + +.if ${PYTHON_REL} < 260 +BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}simplejson>=1.4:${PORTSDIR}/devel/py-simplejson +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}simplejson>=1.4:${PORTSDIR}/devel/py-simplejson +.endif + +.include diff -ruNa rbtools.orig/pkg-plist rbtools/pkg-plist --- rbtools.orig/pkg-plist 2009-07-16 00:15:17.000000000 +0400 +++ rbtools/pkg-plist 1970-01-01 03:00:00.000000000 +0300 @@ -1,2 +0,0 @@ -bin/post-review -%%PYTHON_SITELIBDIR%%/%%PYEASYINSTALL_EGG%% >Release-Note: >Audit-Trail: >Unformatted: