pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/python Move the PYTHON_VERSION_REQD logic from ex...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/96ee8170c8f3
branches:  trunk
changeset: 555767:96ee8170c8f3
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sun Mar 08 17:05:10 2009 +0000

description:
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.

diffstat:

 lang/python/extension.mk |  12 +-----------
 lang/python/pyversion.mk |  12 +++++++++++-
 2 files changed, 12 insertions(+), 12 deletions(-)

diffs (45 lines):

diff -r d2bb3ce2cb8f -r 96ee8170c8f3 lang/python/extension.mk
--- a/lang/python/extension.mk  Sun Mar 08 16:15:44 2009 +0000
+++ b/lang/python/extension.mk  Sun Mar 08 17:05:10 2009 +0000
@@ -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 -r d2bb3ce2cb8f -r 96ee8170c8f3 lang/python/pyversion.mk
--- a/lang/python/pyversion.mk  Sun Mar 08 16:15:44 2009 +0000
+++ b/lang/python/pyversion.mk  Sun Mar 08 17:05:10 2009 +0000
@@ -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



Home | Main Index | Thread Index | Old Index