2016-07-09 12:00:26 +02:00
|
|
|
# $NetBSD: versioned_dependencies.mk,v 1.25 2016/07/09 10:00:26 rillig 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"
|
|
|
|
|
2016-07-09 12:00:26 +02:00
|
|
|
_SUPPORTED_PACKAGES= # empty
|
|
|
|
_SUPPORTED_PACKAGES+= Pmw x11/py-Pmw x11/py-Pmw2
|
|
|
|
_SUPPORTED_PACKAGES+= X textproc/py-X2 textproc/py-X
|
|
|
|
_SUPPORTED_PACKAGES+= cairo graphics/py-cairo graphics/py-cairo3
|
|
|
|
_SUPPORTED_PACKAGES+= dateutil time/py-dateutil time/py-dateutil
|
|
|
|
_SUPPORTED_PACKAGES+= dialog devel/py-dialog2 devel/py-dialog
|
|
|
|
_SUPPORTED_PACKAGES+= ephem math/py-ephem math/py-ephem3
|
|
|
|
_SUPPORTED_PACKAGES+= flup www/py-flup www/py-flup3
|
|
|
|
_SUPPORTED_PACKAGES+= gobject devel/py-gobject devel/py-gobject3
|
|
|
|
_SUPPORTED_PACKAGES+= google-api-python-client www/py-google-api-python-client www/py-google-api-python-client-py3
|
|
|
|
_SUPPORTED_PACKAGES+= jsonlib textproc/py-jsonlib textproc/py-jsonlib3
|
|
|
|
_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/[^:]*//}
|
2016-07-09 12:00:26 +02:00
|
|
|
. for name py2dir py3dir in ${_SUPPORTED_PACKAGES}
|
|
|
|
. if "${pkg}" == "${name}"
|
2014-01-16 11:27:36 +01:00
|
|
|
_PKG_MATCHED= yes
|
2016-07-09 12:00:26 +02:00
|
|
|
. if ${PYPKGPREFIX} == "py27"
|
2014-01-23 12:14:15 +01:00
|
|
|
dir:= ${py2dir}
|
2016-07-09 12:00:26 +02:00
|
|
|
. else
|
2014-01-23 12:14:15 +01:00
|
|
|
dir:= ${py3dir}
|
2016-07-09 12:00:26 +02:00
|
|
|
. endif
|
|
|
|
. if "${type}" == ":link"
|
2014-01-23 12:14:15 +01:00
|
|
|
.include "../../${dir}/buildlink3.mk"
|
2016-07-09 12:00:26 +02:00
|
|
|
. elif "${type}" == ":build"
|
2014-01-23 17:18:42 +01:00
|
|
|
BUILD_DEPENDS:= ${BUILD_DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}
|
2016-07-09 12:00:26 +02:00
|
|
|
. else
|
2014-01-23 17:18:42 +01:00
|
|
|
DEPENDS:= ${DEPENDS} ${PYPKGPREFIX}-${pkg}-[0-9]*:../../${dir}
|
2016-07-09 12:00:26 +02:00
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. if ${_PKG_MATCHED} == "no"
|
2016-04-11 06:22:33 +02:00
|
|
|
PKG_FAIL_REASON+= "${pkg} unsupported in PYTHON_VERSIONED_DEPENDENCIES"
|
2016-07-09 12:00:26 +02:00
|
|
|
. endif
|
2014-01-16 11:27:36 +01:00
|
|
|
.endfor
|