Subject: Patch for createbuildlink
To: None <tech-pkg@netbsd.org>
From: Julio M. Merino Vidal <jmmv@menta.net>
List: tech-pkg
Date: 09/17/2003 20:10:45
Hi all,

[ I sent this to rh@ a week ago or so, but I guess he is AFK since I got no
  answer.  Let see what you think about this ;) ]

often, buildlink2.mk files include pkgconfig's and intltool's buildlink2.mk file.
IMO, this is wrong, because as these common packages are build dependances, the
buildlink file should not assume they will be needed by the package beeing built.
That is, it's the package task to specify what tools it needs to build, and not
which ones needed the packages it depends on.

So, what about the following patch?

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/createbuildlink/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- Makefile	2003/07/17 22:52:13	1.17
+++ Makefile	2003/09/11 11:17:12
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.17 2003/07/17 22:52:13 grant Exp $
 #
 
-DISTNAME=	createbuildlink-2.6
+DISTNAME=	createbuildlink-2.7
 WRKSRC=		${WRKDIR}
 CATEGORIES=	pkgtools sysutils
 MASTER_SITES=	# Nothing
Index: files/createbuildlink
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/createbuildlink/files/createbuildlink,v
retrieving revision 1.13
diff -u -r1.13 createbuildlink
--- files/createbuildlink	2003/04/29 01:36:08	1.13
+++ files/createbuildlink	2003/09/11 11:17:13
@@ -164,7 +164,8 @@
 ## buildlinked dependencies
 ##
 for i in $makefile $commons ; do
-	[ ! -f $i ] || grep '^.include.*\.\.\/.*\/.*/buildlink2.mk\"' $i
+	[ ! -f $i ] || grep '^.include.*\.\.\/.*\/.*/buildlink2.mk\"' $i |
+		grep -v devel/pkgconfig | grep -v textproc/intltool
 done
 grep -l '^.include.*\.\.\/.*\/.*/buildlink2.mk\"' $makefile $commons \
 	>/dev/null 2>&1 && echo ""	# Be careful not to print duplicate \n

Thank you.

PS: Yes, this could be done in a more generic way, checking for DEPMETHOD in
each buildlink2.mk file, but I feel that could be an overkill...

-- 
Julio M. Merino Vidal <jmmv@menta.net>
The NetBSD Project - http://www.NetBSD.org/