New USES=twisted, to replace the old USE_TWISTED knob.

twisted can be configured with the arguments run or build to replace
the previous USE_TWISTED_RUN and USE_TWISTED_BUILD knobs. The twisted
components can be added as comma-separated arguments. If you previously
wrote
    USE_TWISTED=        yes
    USE_TWISTED=        conch names
    USE_TWISTED_RUN=    yes
you now would write
    USES=       twisted
    USES=       twisted:conch,names
    USES=       twisted:run
This commit is contained in:
Marcus von Appen 2013-12-08 12:04:07 +00:00
parent d48807ae69
commit 885b528f02
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=335877
28 changed files with 126 additions and 118 deletions

17
CHANGES
View File

@ -10,6 +10,23 @@ in the release notes and/or placed into UPDATING.
All ports committers are allowed to commit to this file.
20131208:
AUTHOR: mva@FreeBSD.org
New USES=twisted, to replace the old USE_TWISTED knob.
twisted can be configured with the arguments run or build to replace
the previous USE_TWISTED_RUN and USE_TWISTED_BUILD knobs. The twisted
components can be added as comma-separated arguments. If you previously
wrote
USE_TWISTED= yes
USE_TWISTED= conch names
USE_TWISTED_RUN= yes
you now would write
USES= twisted
USES= twisted:conch,names
USES= twisted:run
20131119:
AUTHOR: kwm@FreeBSD.org

83
Mk/Uses/twisted.mk Normal file
View File

@ -0,0 +1,83 @@
# $FreeBSD$
#
# Provide support for Twisted-related ports
#
# MAINTAINER: python@FreeBSD.org
#
# Feature: twisted
# Usage: USES= twisted:build,run,compA,compB,...
# Valid ARGS:
# build Adds twisted and any additional component as build
# dependency to the port
# run Adds twisted and any additional component as build
# dependency to the port
# comp Adds the specified twisted component to as build or
# run dependency to the ports
#
# If the build and run arguments are omitted, twisted or any specified
# component will be added as build AND run dependency.
#
# The current supported components are:
#
# conch flow lore mail names news runner web web2 words
#
.if !defined(_INCLUDE_USES_TWISTED_MK)
_INCLUDE_USES_TWISTED_MK= yes
.if !defined(twisted_ARGS)
twisted_ARGS= build,run
.endif
_TWISTED_ARGS= ${twisted_ARGS:S/,/ /g}
.if ${_TWISTED_ARGS:Mbuild}
_TWISTED_BUILD_DEP= yes
_TWISTED_ARGS:= ${_TWISTED_ARGS:Nbuild}
.endif
.if ${_TWISTED_ARGS:Mrun}
_TWISTED_RUN_DEP= yes
_TWISTED_ARGS:= ${_TWISTED_ARGS:Nrun}
.endif
.if !defined(_TWISTED_BUILD_DEP) && !defined(_TWISTED_RUN_DEP)
# The port only seems to specify components, but neither run or build.
# Assume them to be build and run dependencies.
_TWISTED_BUILD_DEP= yes
_TWISTED_RUN_DEP= yes
.endif
.if defined(_TWISTED_BUILD_DEP)
BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twistedCore
.endif
.if defined(_TWISTED_RUN_DEP)
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twistedCore
.endif
_TWISTED_COMPONENTS= conch flow lore mail names news runner web web2 words
conch_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/conch/__init__.py:${PORTSDIR}/security/py-twistedConch
flow_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/flow/__init__.py:${PORTSDIR}/devel/py-twistedFlow
lore_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/lore/__init__.py:${PORTSDIR}/textproc/py-twistedLore
mail_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/mail/__init__.py:${PORTSDIR}/mail/py-twistedMail
names_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/names/__init__.py:${PORTSDIR}/dns/py-twistedNames
news_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/news/__init__.py:${PORTSDIR}/news/py-twistedNews
pair_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/pair/__init__.py:${PORTSDIR}/net/py-twistedPair
runner_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/runner/__init__.py:${PORTSDIR}/devel/py-twistedRunner
web2_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/web2/__init__.py:${PORTSDIR}/www/py-twistedWeb2
web_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/web/__init__.py:${PORTSDIR}/www/py-twistedWeb
words_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/words/__init__.py:${PORTSDIR}/net-im/py-twistedWords
.for component in ${_TWISTED_ARGS}
. if ${_TWISTED_COMPONENTS:M${component}}==""
IGNORE= cannot install unknown twisted component ${component}
. endif
. if defined(_TWISTED_BUILD_DEP)
BUILD_DEPENDS+= ${${component}_DEPENDS}
. endif
. if defined(_TWISTED_RUN_DEP)
RUN_DEPENDS+= ${${component}_DEPENDS}
. endif
.endfor
.endif # !defined(_INCLUDE_USES_TWISTED_MK)

View File

@ -192,19 +192,6 @@ Python_Include_MAINTAINER= python@FreeBSD.org
#
# PYEASYINSTALL_CMD - Full file path to easy_install command.
# default: ${LOCALBASE}/bin/easy_install-${PYTHON_VER}
#
# USE_TWISTED - If this option is just yes then build and run
# the dependence to twistedCore is added. Alternatively
# here can be listed specific components of twisted
# framework, available components are: conch, lore,
# mail, names, news, runner, web, web2 and words.
# Note that core component is required for any of
# this optional components.
#
# USE_TWISTED_BUILD - Same as previous but add only build dependency.
#
# USE_TWISTED_RUN - Same as USE_TWISTED but add only run dependency.
#
_PYTHON_PORTBRANCH= 2.7
_PYTHON_ALLBRANCHES= 2.7 2.6 3.3 3.2 3.1 # preferred first
@ -620,80 +607,9 @@ PLIST_SUB+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;} \
PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} \
PYTHON_VERSION=${PYTHON_VERSION}
# Twisted specific routines
.if defined(USE_TWISTED) || defined(USE_TWISTED_BUILD) || defined(USE_TWISTED_RUN)
.if defined(USE_TWISTED_BUILD) && defined(USE_TWISTED_RUN)
. if ${USE_TWISTED_BUILD} != ${USE_TWISTED_RUN}
IGNORE= : USE_TWISTED_BUILD and USE_TWISTED_RUN must have equal values
. endif
.endif
.if defined(USE_TWISTED)
TWISTED_BUILD_DEP= yes
TWISTED_RUN_DEP= yes
.else
. if defined(USE_TWISTED_BUILD)
TWISTED_BUILD_DEP= yes
USE_TWISTED= ${USE_TWISTED_BUILD}
. endif
. if defined(USE_TWISTED_RUN)
TWISTED_RUN_DEP= yes
USE_TWISTED= ${USE_TWISTED_RUN}
. endif
.endif
.if ${USE_TWISTED} == "20" || ${USE_TWISTED} == "yes"
USE_TWISTED_VER= ${USE_TWISTED}
. if defined(TWISTED_BUILD_DEP)
BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twistedCore
. endif
. if defined(TWISTED_RUN_DEP)
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twistedCore
. endif
.else
USE_TWISTED_VER= 20
# Checking for twisted components
_TWISTED_COMPONENTS?= conch lore mail names news runner web web2 words
# XXX Should be here other dependencies types?
conch_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/conch/__init__.py:${PORTSDIR}/security/py-twistedConch
lore_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/lore/__init__.py:${PORTSDIR}/textproc/py-twistedLore
mail_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/mail/__init__.py:${PORTSDIR}/mail/py-twistedMail
names_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/names/__init__.py:${PORTSDIR}/dns/py-twistedNames
news_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/news/__init__.py:${PORTSDIR}/news/py-twistedNews
pair_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/pair/__init__.py:${PORTSDIR}/net/py-twistedPair
runner_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/runner/__init__.py:${PORTSDIR}/devel/py-twistedRunner
web2_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/web2/__init__.py:${PORTSDIR}/www/py-twistedWeb2
web_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/web/__init__.py:${PORTSDIR}/www/py-twistedWeb
words_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/words/__init__.py:${PORTSDIR}/net-im/py-twistedWords
.for component in ${_TWISTED_COMPONENTS}
_COMP_TEST= ${USE_TWISTED:M${component}}
. if ${_COMP_TEST:S/${component}//}!=${_COMP_TEST:S/ / /g}
. if defined(TWISTED_BUILD_DEP)
BUILD_DEPENDS+= ${${component}_DEPENDS}
. endif
. if defined(TWISTED_RUN_DEP)
RUN_DEPENDS+= ${${component}_DEPENDS}
. endif
. endif
.endfor
# Implicit dependency from core
.if defined(TWISTED_BUILD_DEP)
BUILD_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twistedCore
.endif
.if defined(TWISTED_RUN_DEP)
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?
# If multiple Python versions are installed and cmake is used, it might
# happen that a cmake-enabled port using find_package(PythonLibs) and
# find_package(PythonInterp) detects different Python versions.

View File

@ -17,7 +17,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}txamqp>=0.3:${PORTSDIR}/net/py-txamqp \
USE_PYTHON= -2.7
USE_PYDISTUTILS= yes
USE_TWISTED_RUN= yes
USES= twisted:run
FETCH_ARGS= -o ${DISTNAME}${EXTRACT_SUFX}
USE_RC_SUBR= carbon

View File

@ -16,7 +16,7 @@ RUN_DEPENDS= ${PYTHON_SITELIBDIR}/xmlrpclib.py:${PORTSDIR}/net/py-xmlrpclib \
USE_PYTHON= yes
USE_PYDISTUTILS= yes
USE_TWISTED= yes
USES= twisted
USE_GNOME= pygtk2
NO_STAGE= yes

View File

@ -18,7 +18,7 @@ TEST_DEPENDS:= ${RUN_DEPENDS} \
PROJECTHOST= buildbot
USE_PYTHON= yes
USE_PYDISTUTILS= easy_install
USE_TWISTED_RUN= runner
USES= twisted:run,runner
MAKE_ENV+= NO_INSTALL_REQS=1

View File

@ -26,7 +26,7 @@ TEST_DEPENDS:= ${RUN_DEPENDS} \
USE_PYTHON= yes
USE_PYDISTUTILS= easy_install
USE_TWISTED_RUN= conch mail web words
USES= twisted:run,conch,mail,web,words
MAKE_ENV+= NO_INSTALL_REQS=1

View File

@ -16,10 +16,10 @@ LICENSE= MIT
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/OpenSSL/__init__.py:${PORTSDIR}/security/py-openssl
CONFLICTS= brlcad-[0-9]*
USES= twisted
USE_PYTHON= yes
USE_PYDISTUTILS= yes
PYDISTUTILS_PKGNAME= Epsilon
USE_TWISTED= yes
NO_BUILD= yes
NO_STAGE= yes

View File

@ -29,7 +29,7 @@ NO_STAGE= yes
.include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MTWISTED}
USE_TWISTED= yes
USES+= twisted
.endif
.if ${PORT_OPTIONS:MHTML}

View File

@ -22,10 +22,9 @@ RUN_DEPENDS= soya_editor:${PORTSDIR}/graphics/py-soya3d \
USE_BZIP2= yes
USE_PYTHON= yes
USE_PYDISTUTILS= yes
USE_TWISTED= yes
USE_GL= glew
USE_SDL= sdl mixer
USES= gettext
USES= gettext twisted
PYDISTUTILS_PKGNAME= Balazar
PYDISTUTILS_EGGINFODIR= ${PREFIX}/share

View File

@ -19,10 +19,9 @@ RUN_DEPENDS= ${PYTHON_SITELIBDIR}/cerealizer/__init__.py:${PORTSDIR}/security/py
${PYTHON_SITELIBDIR}/ogg/__init__.py:${PORTSDIR}/audio/py-vorbis
USE_BZIP2= yes
USES= gettext
USES= gettext twisted
USE_PYTHON= yes
USE_PYDISTUTILS=yes
USE_TWISTED= yes
USE_GL= glew
USE_GMAKE= yes

View File

@ -15,8 +15,7 @@ RUN_DEPENDS= ${PYTHON_SITELIBDIR}/Numeric/_numpy.so:${PORTSDIR}/math/py-numeric
${PYTHON_SITELIBDIR}/OpenGL/__init__.py:${PORTSDIR}/graphics/py-opengl
USE_PYTHON= yes
USE_TWISTED= yes
USES= gettext
USES= gettext twisted
NO_BUILD= yes
NO_STAGE= yes

View File

@ -13,12 +13,11 @@ COMMENT= ${${PORTNAME}_DESC}
CONFLICTS_INSTALL= kdegames-4.[0-6].*
USES= cmake:outsource
USES= cmake:outsource twisted:run
USE_KDE4= kdehier kdelibs kdeprefix pykde4 automoc4
USE_QT4= moc_build qmake_build rcc_build uic_build
USE_PYTHON= yes
USE_SQLITE= 3
USE_TWISTED_RUN= yes
USE_XZ= yes
CMAKE_ARGS= -DINSTALL_KAJONGG:BOOL=TRUE

View File

@ -16,9 +16,9 @@ COMMENT= An ACL system for Postfix, as a policy daemon
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/spf.py:${PORTSDIR}/mail/py-spf \
${PYTHON_SITELIBDIR}/IPy.py:${PORTSDIR}/net-mgmt/py-ipy
USES= twisted
USE_PYTHON= 2.5+
USE_PYDISTUTILS=yes
USE_TWISTED= yes
NO_BUILD= yes
USE_RC_SUBR= apolicyd

View File

@ -13,9 +13,9 @@ COMMENT= PPolicy is tool for extending Postfix checking capabilities
RUN_DEPENDS= ${PYTHON_SITELIBDIR}/dns/__init__.py:${PORTSDIR}/dns/py-dnspython
USES= twisted
USE_PYTHON= 2.5+
USE_PYDISTUTILS=yes
USE_TWISTED= yes
NO_BUILD= yes
USE_RC_SUBR= ppolicyd
DOCSDIR?= ${PREFIX}/share/doc/py-${PORTNAME}

View File

@ -13,7 +13,7 @@ COMMENT= HTTP XMPP client interface
USE_PYTHON= 2.5+
USE_PYDISTUTILS=yes
USE_TWISTED= words web conch names
USES= twisted:words,web,conch,names
PORTDOCS= README.txt INSTALL.txt PKG-INFO

View File

@ -25,10 +25,9 @@ PLIST_SUB+= PYTHON_VER=${PYTHON_VER}
USE_XZ= yes
WANT_GNOME= yes
USES= gettext
USES= gettext twisted:run,web
USE_OPENSSL= yes
USE_PYTHON= -2.7
USE_TWISTED_RUN= web
USE_PYDISTUTILS= easy_install
PYDISTUTILS_BUILD_TARGET= build bdist_egg

View File

@ -21,7 +21,7 @@ LICENSE= BSD
USE_PYTHON= yes
USE_PYDISTUTILS= yes
PYDISTUTILS_PKGNAME= Vertex
USE_TWISTED= yes
USES= twisted
NO_STAGE= yes
.include <bsd.port.mk>

View File

@ -16,7 +16,7 @@ BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycrypto>0:${PORTSDIR}/security/py-pycrypt
RUN_DEPENDS:= ${BUILD_DEPENDS}
USE_PYTHON= 2.5+
USE_TWISTED_RUN= conch web
USES= twisted:run,conch,web
NO_BUILD= yes
USE_RC_SUBR= kippo

View File

@ -16,9 +16,8 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}zope.interface>=3.3.0_1:${PORTSDIR}/devel/py
WRKSRC= ${WRKDIR}/kojoney
USE_PYTHON= 2.5+
USE_TWISTED= conch
USE_OPENSSL= yes
USES= perl5
USES= perl5 twisted:conch
USE_PERL5= run
NO_STAGE= yes

View File

@ -16,9 +16,8 @@ RUN_DEPENDS= ${PYTHON_SITELIBDIR}/pyparsing.py:${PORTSDIR}/devel/py-parsing \
GITVERSION= aad8ded658b36337a08aeb7402b6b67eb8771bea
USES= gettext
USES= gettext twisted
USE_PYTHON= yes
USE_TWISTED= yes
USE_PYDISTUTILS= yes
PYDISTUTILS_PKGVERSION= 0.0.0
PYDISTUTILS_PKGNAME= ldaptor

View File

@ -14,7 +14,7 @@ COMMENT= Practical high-level network game engine
DIST_SUBDIR= python
USE_BZIP2= yes
USE_PYTHON= yes
USE_TWISTED= yes
USES= twisted
USE_PYDISTUTILS= yes
PYDISTUTILS_PKGNAME= Tofu
WRKSRC= ${WRKDIR}/Tofu-${PORTVERSION}

View File

@ -17,7 +17,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}thrift>0:${PORTSDIR}/devel/py-thrift
USE_PYTHON= -2.7
USE_PYDISTUTILS=easy_install
USE_TWISTED= yes
USES= twisted
WRKSRC= ${WRKDIR}/python-${PORTNAME}-${PORTVERSION}

View File

@ -12,7 +12,7 @@ MAINTAINER= sobomax@FreeBSD.org
COMMENT= SIP Back-to-back user agent (B2BUA) server with Radius support
USE_PYTHON= yes
USE_TWISTED= yes
USES= twisted
USE_PYDISTUTILS= yes
NO_STAGE= yes
PYDISTUTILS_PKGNAME= sippy

View File

@ -20,7 +20,7 @@ RUN_DEPENDS= par2:${PORTSDIR}/archivers/par2cmdline \
USE_PYTHON= -2.7
USE_PYDISTUTILS=yes
USE_TWISTED_RUN= web
USES= twisted:run,web
PORTDOCS= CHANGELOG CREDITS README
NO_STAGE= yes

View File

@ -17,7 +17,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyptlib>=0.0.5:${PORTSDIR}/security/py-pyptl
${PYTHON_PKGNAMEPREFIX}pycrypto>=2.1:${PORTSDIR}/security/py-pycrypto
USE_PYTHON= yes
USE_TWISTED= yes
USES= twisted
USE_PYDISTUTILS=easy_install
SUB_FILES= pkg-message
PYDISTUTILS_PKGNAME=obfsproxy

View File

@ -15,8 +15,7 @@ COMMENT= A web application templating system, based on the Twisted Woven
USE_PYTHON= yes
USE_PYDISTUTILS= easy_install
USE_TWISTED= web
USES= gettext
USES= gettext twisted:web
PYDISTUTILS_PKGNAME= Nevow
SUB_FILES= pkg-message

View File

@ -17,8 +17,8 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}lxml>=2.0:${PORTSDIR}/devel/py-lxml \
${PYTHON_PKGNAMEPREFIX}w3lib>=1.2:${PORTSDIR}/www/py-w3lib
USE_PYTHON= -2.7
USES= twisted:run
USE_PYDISTUTILS=easy_install
USE_TWISTED_RUN=yes
OPTIONS_DEFINE= SSL
OPTIONS_DEFAULT=SSL