From 95ff382c9f3b70c4dfdbd8986ba9818ef6ca2a95 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 6 Jun 2004 16:24:55 +0000 Subject: 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.) --- lang/python/pyversion.mk | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lang') 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 -- cgit v1.2.3