pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/python Add support for "foo:link" and "foo:build"...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/34a94ef552cb
branches:  trunk
changeset: 629550:34a94ef552cb
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Thu Jan 23 11:14:15 2014 +0000

description:
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:

 lang/python/versioned_dependencies.mk |  21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)

diffs (50 lines):

diff -r 59d4afa99ba2 -r 34a94ef552cb lang/python/versioned_dependencies.mk
--- a/lang/python/versioned_dependencies.mk     Thu Jan 23 11:12:43 2014 +0000
+++ b/lang/python/versioned_dependencies.mk     Thu Jan 23 11:14:15 2014 +0000
@@ -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



Home | Main Index | Thread Index | Old Index