Subject: _BLNK_RECMETHOD is not defined for build dependency
To: None <tech-pkg@NetBSD.org>
From: Min Sik Kim <minskim@NetBSD.org>
List: tech-pkg
Date: 04/20/2004 11:15:37
--Signature=_Tue__20_Apr_2004_11_15_37_-0500_RtZ9PhNRz7JWyN+B
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Hi,

In bsd.buildlink3.mk, _BLNK_RECMETHOD.${_pkg_} is defined only for full
dependency.  So if a package in build dependency has
BUILDLINK_RECOMMENDED.*, an error occurs when bsd.buildlink3.mk uses
_BLNK_RECMETHOD.${_pkg_} assuming incorrectly that it is defined.

The following patch defines _BLNK_RECMETHOD.${_pkg_} in such cases as
_BLNK_ADD_TO.BUILD_DEPENDS so that BUILDLINK_RECOMMENDED is treated in
the same way as BUILDLINK_DEPENDS.  I think it's OK because packages in
build dependency usually don't have many packages depending on them (in
runtime).  (Or should we need something like
_BLNK_ADD_TO.BUILD_RECOMMENDED?)

Index: bsd.buildlink3.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/buildlink3/bsd.buildlink3.mk,v
retrieving revision 1.140
diff -u -r1.140 bsd.buildlink3.mk
--- bsd.buildlink3.mk	18 Apr 2004 22:33:06 -0000	1.140
+++ bsd.buildlink3.mk	20 Apr 2004 15:56:25 -0000
@@ -175,6 +175,7 @@
 _BLNK_RECMETHOD.${_pkg_}=	_BLNK_ADD_TO.RECOMMENDED
 .  elif !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mbuild)
 _BLNK_DEPMETHOD.${_pkg_}=	_BLNK_ADD_TO.BUILD_DEPENDS
+_BLNK_RECMETHOD.${_pkg_}=	_BLNK_ADD_TO.BUILD_DEPENDS
 .  endif
 .  if defined(BUILDLINK_DEPENDS.${_pkg_}) && \
       defined(BUILDLINK_PKGSRCDIR.${_pkg_})
@@ -240,7 +241,7 @@
 .  if defined(BUILDLINK_RECOMMENDED.${_pkg_}) && \
       defined(BUILDLINK_PKGSRCDIR.${_pkg_})
 .    for _rec_ in ${BUILDLINK_RECOMMENDED.${_pkg_}}
-.      if empty(${_BLNK_RECMETHOD.${_pkg_}}:M${_depend_}\:*)
+.      if empty(${_BLNK_RECMETHOD.${_pkg_}}:M${_rec_}\:*)
 ${_BLNK_RECMETHOD.${_pkg_}}+=	${_rec_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
 .      endif
 .    endfor


This patch also fixes an obvious pasto.  Any comments?

-- 
Min Sik Kim

--Signature=_Tue__20_Apr_2004_11_15_37_-0500_RtZ9PhNRz7JWyN+B
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iQEVAwUBQIVMqfQsKR/Zi7L+AQIx4gf/V3Ey0WN6I1o5dSD2M5tpCWzx0VcfmNmV
Qhh9P2iD9B+LYYZ9Tp3DSwhvDftebTzkM53B46WntqXugoY3NeLu8+2V7y3yTJa3
2mN9b7Wuf+mkSYpYgCoRZgqOgx3xbjmjEMF9F6LDPYlLVHBJHguPt0Twh78QPKDL
AdQPCAA79TWLhZ//bLMfnaV0evGmxn1qK9kMbmAONLQIhC5xn73yfKKndZqn2AWR
BmUA2TzXKg9KJfOgjnAtKpb9AZvqTW/XayiWUBf+2MvySib9b6cLtdeQDHenZA2C
wTQAMzzaHG8sH9lQtqsY1OBhhTBaZtTByENyx9XLhGPgKUw8h2OVLw==
=yyTg
-----END PGP SIGNATURE-----

--Signature=_Tue__20_Apr_2004_11_15_37_-0500_RtZ9PhNRz7JWyN+B--