aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorperky <perky@FreeBSD.org>2005-07-07 16:10:24 +0800
committerperky <perky@FreeBSD.org>2005-07-07 16:10:24 +0800
commited92045013978ea84e8e8b46928c94187a749e73 (patch)
tree4bebafa4fc6690190435aa9b8b78e02ae57e501c /Mk
parent17640d2495a7f93336c2dddb96576c232739d31a (diff)
downloadfreebsd-ports-gnome-ed92045013978ea84e8e8b46928c94187a749e73.tar.gz
freebsd-ports-gnome-ed92045013978ea84e8e8b46928c94187a749e73.tar.zst
freebsd-ports-gnome-ed92045013978ea84e8e8b46928c94187a749e73.zip
- Add new bsd.python.mk-side support for Twisted Python.
This brings USE_TWISTED options which works like USE_GNOME to python ports. [1] - Fill comment about USE_ZOPE. [1] - Fix some mixed usage of tab and space. PR: 82445 [1] Submitted by: Vsevolod Stakhov <vsevolod@highsecure.ru> [1]
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.python.mk59
1 files changed, 57 insertions, 2 deletions
diff --git a/Mk/bsd.python.mk b/Mk/bsd.python.mk
index 487b15d77aba..b7cabd695f02 100644
--- a/Mk/bsd.python.mk
+++ b/Mk/bsd.python.mk
@@ -115,6 +115,21 @@ Python_Include_MAINTAINER= perky@FreeBSD.org
#
# PYSETUP: Name of the setup script used by the distutils package.
# default: setup.py
+#
+# USE_TWISTED: If this option is just yes 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 and conch. 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
@@ -156,9 +171,9 @@ USE_PYTHON_RUN= yes
# Validate Python version whether it meets USE_PYTHON version restriction.
_PYTHON_VERSION_CHECK!= ${ECHO_CMD} "${USE_PYTHON}" | \
${SED} 's/^\([1-9]\.[0-9]\)$$/\1-\1/'
-_PYTHON_VERSION_MINIMUM!= ${ECHO_CMD} "${_PYTHON_VERSION_CHECK}" | \
+_PYTHON_VERSION_MINIMUM!= ${ECHO_CMD} "${_PYTHON_VERSION_CHECK}" | \
${SED} -n 's/.*\([1-9]\.[0-9]\)[-+].*/\1/p'
-_PYTHON_VERSION_MAXIMUM!= ${ECHO_CMD} "${_PYTHON_VERSION_CHECK}" | \
+_PYTHON_VERSION_MAXIMUM!= ${ECHO_CMD} "${_PYTHON_VERSION_CHECK}" | \
${SED} -n 's/.*-\([1-9]\.[0-9]\).*/\1/p'
.if !empty(_PYTHON_VERSION_MINIMUM) && ( \
${_PYTHON_VERSION} < ${_PYTHON_VERSION_MINIMUM})
@@ -343,6 +358,46 @@ PLIST_SUB+= ZOPEBASEDIR=${SZOPEBASEDIR} \
ZOPEPRODUCTDIR=${SZOPEBASEDIR}/${ZOPEPRODUCTDIR}
.endif
+# Twisted specific routines
+.if defined(USE_TWISTED)
+
+.if ${USE_TWISTED} == "20" || ${USE_TWISTED} == "yes"
+USE_TWISTED_VER= ${USE_TWISTED}
+RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twistedCore
+.elif ${USE_TWISTED} == "13"
+USE_TWISTED_VER= ${USE_TWISTED}
+RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twisted
+.else
+USE_TWISTED_VER= "20"
+# Checking for twisted components
+_TWISTED_COMPONENTS?= web lore news words pair mail names xish runner flow conch
+
+# 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
+conch_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/twisted/conch/__init__.py:${PORTSDIR}/security/py-twistedConch
+
+.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 dependency from core
+RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twistedCore
+.endif
+
+.endif # defined(USE_TWISTED)
+
# XXX Hm, should I export some of the variables above to *_ENV?
.endif # !defined(_POSTMKINCLUDED) && !defined(Python_Pre_Include)