summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorwiz <wiz>2014-01-23 11:14:15 +0000
committerwiz <wiz>2014-01-23 11:14:15 +0000
commit19b70ad149e19289aad8735207cb0b0e6c3286ec (patch)
tree3ca60e894c3ac2fbce1652850cb5ee639d73bc80 /lang
parente8995694642053f0c6b5c5a3ef053da1642613a0 (diff)
downloadpkgsrc-19b70ad149e19289aad8735207cb0b0e6c3286ec.tar.gz
Add support for "foo:link" and "foo:build" for link dependencies
and build dependencies. For link dependencies, the corresponding buildlink3.mk file will be included (instead of DEPENDS). For build dependencies, BUILD_DEPENDS is used (instead of DEPENDS). Add cairo support.
Diffstat (limited to 'lang')
-rw-r--r--lang/python/versioned_dependencies.mk21
1 files changed, 15 insertions, 6 deletions
diff --git a/lang/python/versioned_dependencies.mk b/lang/python/versioned_dependencies.mk
index 914930a312d..306cfc3876d 100644
--- a/lang/python/versioned_dependencies.mk
+++ b/lang/python/versioned_dependencies.mk
@@ -1,4 +1,4 @@
-# $NetBSD: versioned_dependencies.mk,v 1.8 2014/01/20 12:51:29 wiz Exp $
+# $NetBSD: versioned_dependencies.mk,v 1.9 2014/01/23 11:14:15 wiz Exp $
#
# This file determines which separate distribution of a Python
# package is used as dependency, depending on the Python version
@@ -18,26 +18,35 @@
_SUPPORTED_PACKAGES=# empty
_SUPPORTED_PACKAGES+=Pmw x11/py-Pmw x11/py-Pmw2
_SUPPORTED_PACKAGES+=X x11/py-X2 x11/py-X
-#_SUPPORTED_PACKAGES+=cairo graphics/py-cairo graphics/py-cairo3
+_SUPPORTED_PACKAGES+=cairo graphics/py-cairo graphics/py-cairo3
_SUPPORTED_PACKAGES+=dateutil time/py-dateutil time/py-dateutil2
_SUPPORTED_PACKAGES+=dns net/py-dns net/py-dns3
_SUPPORTED_PACKAGES+=ephem math/py-ephem math/py-ephem3
_SUPPORTED_PACKAGES+=flup www/py-flup www/py-flup3
_SUPPORTED_PACKAGES+=jsonlib textproc/py-jsonlib textproc/py-jsonlib3
-.for pkg in ${PYTHON_VERSIONED_DEPENDENCIES}
+.for pattern in ${PYTHON_VERSIONED_DEPENDENCIES}
_PKG_MATCHED= no
+pkg:= ${pattern:C/:.*//}
+type:= ${pattern:C/[^:]*//}
.for name py2dir py3dir in ${_SUPPORTED_PACKAGES}
.if "${pkg}" == "${name}"
_PKG_MATCHED= yes
.if ${PYPKGPREFIX} == "py26" || ${PYPKGPREFIX} == "py27"
-DEPENDS+= ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${py2dir}
+dir:= ${py2dir}
.else
-DEPENDS+= ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${py3dir}
+dir:= ${py3dir}
+.endif
+.if "${type}" == ":link"
+.include "../../${dir}/buildlink3.mk"
+.elsif "${type}" == ":build"
+BUILD_DEPENDS+= ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}
+.else
+DEPENDS+= ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}
.endif
.endif
.endfor
.if ${_PKG_MATCHED} == "no"
-PKG_FAIL_REASON= "${pkg} unsupported in PYTHON_PACKAGE_AUTOSWITCH"
+PKG_FAIL_REASON= "${pkg} unsupported in PYTHON_VERSIONED_DEPENDENCIES"
.endif
.endfor