Subject: Re: pkg/35108
To: None <gnats-bugs@NetBSD.org>
From: OBATA Akio <obata@lins.jp>
List: pkgsrc-bugs
Date: 11/29/2006 09:23:20
On Sat, 25 Nov 2006 18:50:02 +0000 (UTC), simon@bigblue.demon.co.uk wrote:
>  	the missing sys.mk file is found under /usr/share/mk on NetBSD, however
>  	if using bootstrap the file is found under ${PREFIX}/share/mk.
>  	Makefile revs prior to 1.28 showed makesyspath as
>  	makesyspath=${PREFIX}/share/mk:/usr/share/mk:/usr/local/share/mk:/opt/share/mk
>  	I assumed that the /usr/local and /opt paths are not relevant to NetBSD
>  	/usr/share and ${PREFIX}/share should cover the default install and
>  	bootsrap pkgsrc.

Because current pkgsrc's bmake have a bug to read _ALL_ mk files in mksyspath,
so except ${PREFIX}/share/mk has been removed from mksyspath.
If set makesyspath=${PREFIX}/share/mk:/usr/share/mk and those two directores
have same name files, unexpected trouble may be occured.

>  --- Makefile.orig	2006-11-25 12:59:04.000000000 +0000
>  +++ Makefile	2006-11-25 14:37:51.000000000 +0000
>  @@ -18,7 +18,14 @@
>   NO_CHECKSUM=	yes
>   NO_MTREE=	yes
>   
>  +.include "../../mk/bsd.prefs.mk"
>  +
>  +.if ${OPSYS:MNetBSD}
>  +makesyspath=	${PREFIX}/share/mk:/usr/share/mk
>  +.else
>   makesyspath=	${PREFIX}/share/mk
>  +.endif
>  +

Why not simply add following line to depend on mk-files?
DEPENDS+=	mk-files-[0-9]*:../devel/mk-files