2015-07-12 23:42:23 +02:00
|
|
|
# $NetBSD: versioned_dependencies.mk,v 1.21 2015/07/12 21:42:23 rodent Exp $
|
2014-01-16 11:27:36 +01:00
|
|
|
#
|
|
|
|
# This file determines which separate distribution of a Python
|
|
|
|
# package is used as dependency, depending on the Python version
|
|
|
|
# used.
|
|
|
|
#
|
|
|
|
# === User-settable variables ===
|
|
|
|
#
|
|
|
|
# PYTHON_VERSIONED_DEPENDENCIES
|
|
|
|
# The Python package which should be added as a dependency.
|
|
|
|
#
|
|
|
|
# Possible values: dateutil
|
|
|
|
# Default: (nothing)
|
|
|
|
#
|
|
|
|
|
|
|
|
.include "../../lang/python/pyversion.mk"
|
|
|
|
|
|
|
|
_SUPPORTED_PACKAGES=# empty
|
2014-01-18 20:50:27 +01:00
|
|
|
_SUPPORTED_PACKAGES+=Pmw x11/py-Pmw x11/py-Pmw2
|
2014-04-02 02:19:10 +02:00
|
|
|
_SUPPORTED_PACKAGES+=X textproc/py-X2 textproc/py-X
|
2014-01-23 12:14:15 +01:00
|
|
|
_SUPPORTED_PACKAGES+=cairo graphics/py-cairo graphics/py-cairo3
|
2014-12-14 03:34:52 +01:00
|
|
|
_SUPPORTED_PACKAGES+=dateutil time/py-dateutil time/py-dateutil
|
2015-05-03 18:22:26 +02:00
|
|
|
_SUPPORTED_PACKAGES+=dialog devel/py-dialog2 devel/py-dialog
|
2014-01-18 00:10:05 +01:00
|
|
|
_SUPPORTED_PACKAGES+=dns net/py-dns net/py-dns3
|
2014-01-20 13:51:29 +01:00
|
|
|
_SUPPORTED_PACKAGES+=ephem math/py-ephem math/py-ephem3
|
2014-01-18 20:05:56 +01:00
|
|
|
_SUPPORTED_PACKAGES+=flup www/py-flup www/py-flup3
|
2015-07-12 23:42:23 +02:00
|
|
|
_SUPPORTED_PACKAGES+=gobject devel/py-gobject devel/py-gobject3
|
2014-12-05 22:44:10 +01:00
|
|
|
_SUPPORTED_PACKAGES+=google-api-python-client www/py-google-api-python-client www/py-google-api-python-client-py3
|
2014-01-18 16:47:24 +01:00
|
|
|
_SUPPORTED_PACKAGES+=jsonlib textproc/py-jsonlib textproc/py-jsonlib3
|
2014-06-07 16:27:02 +02:00
|
|
|
_SUPPORTED_PACKAGES+=python-digest www/py-python-digest www/py-python3-digest
|
2014-01-16 11:27:36 +01:00
|
|
|
|
2014-01-23 12:14:15 +01:00
|
|
|
.for pattern in ${PYTHON_VERSIONED_DEPENDENCIES}
|
2014-01-16 11:27:36 +01:00
|
|
|
_PKG_MATCHED= no
|
2014-01-23 12:14:15 +01:00
|
|
|
pkg:= ${pattern:C/:.*//}
|
|
|
|
type:= ${pattern:C/[^:]*//}
|
2014-01-16 11:27:36 +01:00
|
|
|
.for name py2dir py3dir in ${_SUPPORTED_PACKAGES}
|
2014-01-18 16:13:26 +01:00
|
|
|
.if "${pkg}" == "${name}"
|
2014-01-16 11:27:36 +01:00
|
|
|
_PKG_MATCHED= yes
|
2015-04-14 01:12:40 +02:00
|
|
|
.if ${PYPKGPREFIX} == "py27"
|
2014-01-23 12:14:15 +01:00
|
|
|
dir:= ${py2dir}
|
2014-01-16 11:27:36 +01:00
|
|
|
.else
|
2014-01-23 12:14:15 +01:00
|
|
|
dir:= ${py3dir}
|
|
|
|
.endif
|
|
|
|
.if "${type}" == ":link"
|
|
|
|
.include "../../${dir}/buildlink3.mk"
|
2014-01-23 17:18:42 +01:00
|
|
|
.elif "${type}" == ":build"
|
|
|
|
BUILD_DEPENDS:= ${BUILD_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}
|
2014-01-23 12:14:15 +01:00
|
|
|
.else
|
2014-01-23 17:18:42 +01:00
|
|
|
DEPENDS:= ${DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}
|
2014-01-16 11:27:36 +01:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
.if ${_PKG_MATCHED} == "no"
|
2014-01-23 12:14:15 +01:00
|
|
|
PKG_FAIL_REASON= "${pkg} unsupported in PYTHON_VERSIONED_DEPENDENCIES"
|
2014-01-16 11:27:36 +01:00
|
|
|
.endif
|
|
|
|
.endfor
|