From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jun 20 23:19:52 2005 Return-Path: X-Original-To: freebsd-ports-bugs@freebsd.org Delivered-To: freebsd-ports-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD30E16A41F for ; Mon, 20 Jun 2005 23:19:52 +0000 (GMT) (envelope-from vsevolod@highsecure.ru) Received: from waterwall.inec.ru (waterwall.inec.ru [213.148.3.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id E028A43D4C for ; Mon, 20 Jun 2005 23:19:51 +0000 (GMT) (envelope-from vsevolod@highsecure.ru) Received: from waterwall.inec.ru (root@localhost) by waterwall.inec.ru (8.13.1/8.12.6) with SMTP id j5KNJAhd032893 for ; Tue, 21 Jun 2005 03:19:10 +0400 (MSD) Received: from waterwall.inec.ru (localhost.inec.ru [127.0.0.1]) by localhost (8.13.1/8.12.6) with ESMTP id j5KNJAhV032885; Tue, 21 Jun 2005 03:19:10 +0400 (MSD) Received: from localhost (localhost.inec.ru [127.0.0.1]) by localhost (Postfix) with SMTP id 1CADA5AFBC; Tue, 21 Jun 2005 03:19:10 +0400 (MSD) Received: from core (postbox.inec.ru [213.148.3.226]) by waterwall.inec.ru (Postfix) with ESMTP id AAPF542B74EEC3D1D; Tue, 21 Jun 2005 03:19:08 +0400 (MSD) Received: from [213.219.249.64] (helo=spray.anyhost.ru) by core with esmtp (Exim 4.51 (FreeBSD)) id 1DkVWi-000NLU-66; Tue, 21 Jun 2005 03:18:00 +0400 Received: from cebka by spray.anyhost.ru with local (Exim 4.51 (FreeBSD)) id 1DkVYM-000KFd-20; Tue, 21 Jun 2005 03:19:42 +0400 Date: Tue, 21 Jun 2005 03:19:42 +0400 From: Vsevolod Stakhov To: FreeBSD-gnats-submit@freebsd.org, freebsd-ports-bugs@freebsd.org, vsevolod@highsecure.ru, perky@freebsd.org Message-ID: <20050620231941.GA2394@spray.anyhost.ru> References: <200506201430.j5KEULMO039524@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200506201430.j5KEULMO039524@freefall.freebsd.org> User-Agent: mutt-ng devel (FreeBSD) Sender: Vsevolod Stakhov Cc: Subject: Re: ports/82445: Add PYTWISTED dependence line to bsd.python.mk 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: Mon, 20 Jun 2005 23:19:52 -0000 I have redesigned structure of twisted dependencies due to incompatible component's lists in twisted 1.3 (that was just a single project) and twisted 2.0 (that contains different subprojects). So, my suggestion is to add USE_TWISTED macro that should specify version of twisted framework needed and can specify specific components for twisted 2.0. Here is modified patch. --- bsd.python.mk.orig Mon Jun 20 17:24:59 2005 +++ bsd.python.mk Tue Jun 21 03:11:07 2005 @@ -115,6 +115,23 @@ # # PYSETUP: Name of the setup script used by the distutils package. # default: setup.py +# +# USE_TWISTED: Use twisted framework for port. If there is no version or +# components specified then 1.3 twisted is used. Version of +# twisted framework can be 13 or 20. If this option is 20 then +# the dependence to twistedCore is added. Alternatively here +# can be listed specific components of twisted framework, +# available components are: web, lore, news, words, pair, +# mail, names, xish, runner, flow. Note that core component +# is required for any of this optional components. +# +# USE_ZOPE: Use Zope - an object-based web application platform, this +# also sets up ZOPEBASEDIR - relative base directory of zope +# server, SZOPEBASEDIR - absolute base directory of zope that +# is ${LOCALBASE}/${SZOPEBASEDIR} by default, +# ZOPEPRODUCTDIR - directory, where products for zope can be +# found. Note that USE_ZOPE require python2.3 +# _PYTHON_PORTBRANCH= 2.4 _PYTHON_ALLBRANCHES= 2.4 2.3 2.2 2.1 2.5 # preferred first @@ -299,6 +316,7 @@ PYDISTUTILS= ${PYTHON_LIBDIR}/distutils/core.py:${PYTHON_PORTSDIR} PYNUMERIC= ${PYTHON_SITELIBDIR}/Numeric/Numeric.py:${PORTSDIR}/math/py-numeric +PYTWISTED= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twisted PYXML= ${PYTHON_SITELIBDIR}/_xmlplus/__init__.py:${PORTSDIR}/textproc/py-xml .if defined(PYTHON_REL) && ${PYTHON_REL} < 232 @@ -342,6 +360,65 @@ PLIST_SUB+= ZOPEBASEDIR=${SZOPEBASEDIR} \ ZOPEPRODUCTDIR=${SZOPEBASEDIR}/${ZOPEPRODUCTDIR} .endif + +# Twisted specific routines +.if defined(USE_TWISTED) + +.if exists(${LOCALBASE}/bin/twistd) +_TWISTED_VER!= ${LOCALBASE}/bin/twistd --version | ${SED} -e 's/.*daemon) \([0-9]\).\([0-9]\).*/\1\2/' -e '2,$$d' -e '$$d' +.endif + +.if ${USE_TWISTED} == "20" +USE_TWISTED_VER= ${USE_TWISTED} +. if defined(_TWISTED_VER) && ${_TWISTED_VER} == "13" +BROKEN= Twisted framework versions mismatch: want ${USE_TWISTED_VER} and installed ${_TWISTED_VER} +. else +RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twistedCore +. endif + +.elif ${USE_TWISTED} == "13" +USE_TWISTED_VER= ${USE_TWISTED} +. if defined(_TWISTED_VER) && ${_TWISTED_VER} == "20" +BROKEN= Twisted framework versions mismatch: want ${USE_TWISTED_VER} and installed ${_TWISTED_VER} +. else +RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twisted +. endif + +.else +USE_TWISTED_VER= "20" +# Components list is allowed only for version 20 +.if defined(_TWISTED_VER) && ${_TWISTED_VER} == "13" +BROKEN= Twisted framework versions mismatch: want ${USE_TWISTED_VER} and installed ${_TWISTED_VER} +.else + +# Checking for twisted components +_TWISTED_COMPONENTS?= web lore news words pair mail names xish runner flow + +# XXX Should be here other dependencies types? +web_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/web/__init__.py:${PORTSDIR}/www/py-twistedWeb +lore_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/textproc/__init__.py:${PORTSDIR}/textproc/py-twistedLore +news_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/news/__init__.py:${PORTSDIR}/news/py-twistedNews +words_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/words/__init__.py:${PORTSDIR}/net/py-twistedWords +pair_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/pair/__init__.py:${PORTSDIR}/net/py-twistedPair +mail_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/mail/__init__.py:${PORTSDIR}/mail/py-twistedMail +names_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/names/__init__.py:${PORTSDIR}/dns/py-twistedNames +xish_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/xish/__init__.py:${PORTSDIR}/devel/py-twistedXish +runner_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/runner/__init__.py:${PORTSDIR}/devel/py-twistedRunner +flow_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/flow/__init__.py:${PORTSDIR}/devel/py-twistedFlow + +. for component in ${_TWISTED_COMPONENTS} +_COMP_TEST= ${USE_TWISTED:M${component}} +. if ${_COMP_TEST:S/${component}//}!=${_COMP_TEST:S/ / /g} +RUN_DEPENDS+= ${${component}_RUN_DEPENDS} +. endif +.endfor + +# Implicit dependence from core +RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twistedCore +.endif +.endif + +.endif # defined(USE_TWISTED) # XXX Hm, should I export some of the variables above to *_ENV?