Subject: makedepend not found on Darwin (incl. suggested fix)
To: None <tech-pkg@netbsd.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 03/04/2006 18:56:38
Darwin has /usr/X11R6/bin/makedepend, which is typically not in the  
shell path. Thus it is not found when building graphics/MesaLib.
To solve that issue I would like to propose adding makedepend to the  
use_tools framework. I've made the following changes:

--- pkgsrc/mk/tools/defaults.mk.orig    2006-03-04 17:53:06.000000000  
+0100
+++ pkgsrc/mk/tools/defaults.mk 2006-03-04 17:54:43.000000000 +0100
@@ -98,6 +98,7 @@
_TOOLS_VARNAME.ls=             LS
_TOOLS_VARNAME.m4=             M4
_TOOLS_VARNAME.mail=           MAIL_CMD
+_TOOLS_VARNAME.makedepend=     MAKEDEPEND
_TOOLS_VARNAME.mkdir=          MKDIR
_TOOLS_VARNAME.mktemp=         MKTEMP
_TOOLS_VARNAME.mtree=          MTREE


--- pkgsrc/mk/tools/tools.Darwin.mk.orig        2006-03-04  
17:55:38.000000000 +0100
+++ pkgsrc/mk/tools/tools.Darwin.mk     2006-03-04 17:56:36.000000000  
+0100
@@ -49,6 +49,7 @@
TOOLS_PLATFORM.ls?=            /bin/ls
TOOLS_PLATFORM.m4?=            /usr/bin/m4
TOOLS_PLATFORM.mail?=          /usr/bin/mail
+TOOLS_PLATFORM.makedepend?=    /usr/X11R6/bin/makedepend
TOOLS_PLATFORM.mkdir?=         /bin/mkdir -p
TOOLS_PLATFORM.mktemp?=                /usr/bin/mktemp
TOOLS_PLATFORM.mtree?=         /usr/sbin/mtree

of course this would have to be added for the other platforms as well.

Now when adding USE_TOOLS+=makedepend to pkgsrc/graphics/MesaLib/ 
Makefile MesaLib builds fine.

What do you think of this modification?

makedepend happens to be part of pkgsrc/devel/nbitools. What would be  
the best mechanism to use that one in case there is no native one on  
the particular system?

Something like this?

.if ! exists(${TOOLS_PLATFORM.makedepend})
TOOLS_DEPENDS.makedepend?=	nbitools:../../devel/nbitools
TOOLS_PLATFORM.makedepend?=	${LOCALBASE}/libexec/itools/makedepend
.endif

Where should this be placed?

-- 
Georg Schwarz    http://home.pages.de/~schwarz/
georg.schwarz@freenet.de  +49 178 8545053