Subject: pkg/18169: Make pyversion.mk work with buildlink2
To: None <gnats-bugs@gnats.netbsd.org>
From: Julio Merino <jmmv@hispabsd.org>
List: netbsd-bugs
Date: 09/04/2002 20:29:01
>Number:         18169
>Category:       pkg
>Synopsis:       Make pyversion.mk work with buildlink2
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 04 11:27:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Julio Merino
>Release:        NetBSD 1.6G
>Organization:
HispaBSD
>Environment:
	
	
System: NetBSD darkstar 1.6G NetBSD 1.6G (DARKSTAR) #10: Wed Sep 4 15:25:12 CEST 2002 jmmv@darkstar:/var/build/kernel/DARKSTAR i386
Architecture: i386
Machine: i386
>Description:
	As it seems, all buildlink.mk files inside lang/python are
	buildlink version independant because they do not include the
	bsd.buildlink.mk stuff neither set USE_BUILDLINK2.

	The only thing that makes pyversion.mk depend on buildlink1 is
	that in includes devel/pth/buildlink.mk version 1. pyversion.mk
	should be intelligent enough to choose which buildlink version
	to include. The following patch should do it ;)

	Although, this only happens when python21-pth is used, because
	it is the only one including a buildlink 1 mk file.
>How-To-Repeat:
	
>Fix:

Index: pyversion.mk
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python/pyversion.mk,v
retrieving revision 1.9
diff -u -u -r1.9 pyversion.mk
--- pyversion.mk	2002/08/20 20:00:14	1.9
+++ pyversion.mk	2002/09/04 18:13:32
@@ -93,7 +93,15 @@
 PYDEPENDENCY=	${BUILDLINK_DEPENDS.python21pth}:../../lang/python21-pth
 PYVERSSUFFIX=	2p1
 PYPKGPREFIX=	py21pth
-.include "../../devel/pth/buildlink.mk"
+.if defined(USE_BUILDLINK2)
+.  if (${USE_BUILDLINK2} == "NO") || (${USE_BUILDLINK2} == "no")
+.    include "../../devel/pth/buildlink.mk"
+.  else
+.    include "../../devel/pth/buildlink2.mk"
+.  endif
+.else
+.  include "../../devel/pth/buildlink.mk"
+.endif
 .elif ${_PYTHON_VERSION} == "20"
 PYDEPENDENCY=	${BUILDLINK_DEPENDS.python20}:../../lang/python20
 PYVERSSUFFIX=	2.0
>Release-Note:
>Audit-Trail:
>Unformatted: