summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>2004-06-06 16:24:55 +0000
committertv <tv@pkgsrc.org>2004-06-06 16:24:55 +0000
commit726f0e26f55fb3bdd2c9d8e8a62072809c26d94e (patch)
treeec5954a045fb1cec3a831ebb8423f00701b3ac90 /lang
parentaa604aebe3790144591c0ff170614d43d86b95f4 (diff)
downloadpkgsrc-726f0e26f55fb3bdd2c9d8e8a62072809c26d94e.tar.gz
Add a PYTHON_VERSIONS_INCOMPATIBLE, an additive variable that can be set
by package Makefiles as well as buildlink3s to prevent usage of particular versions of Python -- even if they appear in PYTHON_VERSIONS_ACCEPTED. (And make Darwin exclusion use this variable instead, so that it effectively overrides any pkg's definition of _ACCEPTED.)
Diffstat (limited to 'lang')
-rw-r--r--lang/python/pyversion.mk12
1 files changed, 8 insertions, 4 deletions
diff --git a/lang/python/pyversion.mk b/lang/python/pyversion.mk
index 80de227537f..ea438465830 100644
--- a/lang/python/pyversion.mk
+++ b/lang/python/pyversion.mk
@@ -1,4 +1,4 @@
-# $NetBSD: pyversion.mk,v 1.27 2004/05/23 17:15:09 recht Exp $
+# $NetBSD: pyversion.mk,v 1.28 2004/06/06 16:24:55 tv Exp $
.if !defined(PYTHON_PYVERSION_MK)
PYTHON_PYVERSION_MK= defined
@@ -7,12 +7,12 @@ PYTHON_PYVERSION_MK= defined
PYTHON_VERSION_DEFAULT?= 23
.if ${OPSYS} == "Darwin"
-PYTHON_VERSIONS_ACCEPTED?= 23pth 22pth
+PYTHON_VERSIONS_INCOMPATIBLE+= 23 22 21 21pth 20 15
BUILDLINK_DEPENDS.python22-pth?= python22-pth>=2.2.3nb2
BUILDLINK_DEPENDS.python23-pth?= python23-pth>=2.3.3nb3
-.else
-PYTHON_VERSIONS_ACCEPTED?= 23 23pth 22 22pth 21 21pth 20
.endif
+PYTHON_VERSIONS_ACCEPTED?= 23 23pth 22 22pth 21 21pth 20
+PYTHON_VERSIONS_INCOMPATIBLE?= # empty by default
BUILDLINK_DEPENDS.python15?= python15>=1.5
BUILDLINK_DEPENDS.python20?= python20>=2.0
@@ -25,7 +25,9 @@ BUILDLINK_DEPENDS.python23-pth?= python23-pth>=2.3
# transform the list into individual variables
.for pv in ${PYTHON_VERSIONS_ACCEPTED}
+.if empty(PYTHON_VERSIONS_INCOMPATIBLE:M${pv})
_PYTHON_VERSION_${pv}_OK= yes
+.endif
.endfor
# check what is installed
@@ -73,12 +75,14 @@ _PYTHON_VERSION= ${PYTHON_VERSION_DEFAULT}
# prefer an already installed version, in order of "accepted"
.if !defined(_PYTHON_VERSION)
.for pv in ${PYTHON_VERSIONS_ACCEPTED}
+.if defined(_PYTHON_VERSION_${pv}_OK)
.if defined(_PYTHON_VERSION_${pv}_INSTALLED)
_PYTHON_VERSION?= ${pv}
.else
# keep information as last resort - see below
_PYTHON_VERSION_FIRSTACCEPTED?= ${pv}
.endif
+.endif
.endfor
.endif
# if the default is OK for the addon pkg, take this