summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2009-03-08 17:05:10 +0000
committerjoerg <joerg@pkgsrc.org>2009-03-08 17:05:10 +0000
commit3c95ad1d1208b632d781a9b657debd8d5cdd565c (patch)
tree193d674525505884e96af38a91a798353c36018b
parentea555665d23b72bbb6d0dff684b518db2087d22a (diff)
downloadpkgsrc-3c95ad1d1208b632d781a9b657debd8d5cdd565c.tar.gz
Move the PYTHON_VERSION_REQD logic from extension.mk to pyversion.mk.
It shouldn't hurt and allows including application.mk and extension.mk in any order.
-rw-r--r--lang/python/extension.mk12
-rw-r--r--lang/python/pyversion.mk12
2 files changed, 12 insertions, 12 deletions
diff --git a/lang/python/extension.mk b/lang/python/extension.mk
index 23127f808ca..fcc88e68932 100644
--- a/lang/python/extension.mk
+++ b/lang/python/extension.mk
@@ -1,14 +1,4 @@
-# $NetBSD: extension.mk,v 1.23 2009/03/05 18:51:30 joerg Exp $
-
-# derive a python version from the package name if possible
-# optionally handled quoted package names
-.if defined(PKGNAME_REQD) && !empty(PKGNAME_REQD:Mpy[0-9][0-9]-*) || \
- defined(PKGNAME_REQD) && !empty(PKGNAME_REQD:M*-py[0-9][0-9]-*)
-PYTHON_VERSION_REQD?= ${PKGNAME_REQD:C/(^.*-|^)py([0-9][0-9])-.*/\2/}
-.elif defined(PKGNAME_OLD) && !empty(PKGNAME_OLD:Mpy[0-9][0-9]-*) || \
- defined(PKGNAME_OLD) && !empty(PKGNAME_OLD:M*-py[0-9][0-9]-*)
-PYTHON_VERSION_REQD?= ${PKGNAME_OLD:C/(^.*-|^)py([0-9][0-9])-.*/\2/}
-.endif
+# $NetBSD: extension.mk,v 1.24 2009/03/08 17:05:10 joerg Exp $
.include "../../lang/python/pyversion.mk"
diff --git a/lang/python/pyversion.mk b/lang/python/pyversion.mk
index 08bef057490..08ee1aa67c8 100644
--- a/lang/python/pyversion.mk
+++ b/lang/python/pyversion.mk
@@ -1,4 +1,4 @@
-# $NetBSD: pyversion.mk,v 1.65 2009/02/18 05:50:31 obache Exp $
+# $NetBSD: pyversion.mk,v 1.66 2009/03/08 17:05:10 joerg Exp $
# This file determines which Python version is used as a dependency for
# a package.
@@ -53,6 +53,16 @@
.if !defined(PYTHON_PYVERSION_MK)
PYTHON_PYVERSION_MK= defined
+# derive a python version from the package name if possible
+# optionally handled quoted package names
+.if defined(PKGNAME_REQD) && !empty(PKGNAME_REQD:Mpy[0-9][0-9]-*) || \
+ defined(PKGNAME_REQD) && !empty(PKGNAME_REQD:M*-py[0-9][0-9]-*)
+PYTHON_VERSION_REQD?= ${PKGNAME_REQD:C/(^.*-|^)py([0-9][0-9])-.*/\2/}
+.elif defined(PKGNAME_OLD) && !empty(PKGNAME_OLD:Mpy[0-9][0-9]-*) || \
+ defined(PKGNAME_OLD) && !empty(PKGNAME_OLD:M*-py[0-9][0-9]-*)
+PYTHON_VERSION_REQD?= ${PKGNAME_OLD:C/(^.*-|^)py([0-9][0-9])-.*/\2/}
+.endif
+
.include "../../mk/bsd.prefs.mk"
BUILD_DEFS+= PYTHON_VERSION_DEFAULT