summaryrefslogtreecommitdiff
path: root/mk/tools/replace.mk
diff options
context:
space:
mode:
authorschwarz <schwarz@pkgsrc.org>2010-05-21 22:21:06 +0000
committerschwarz <schwarz@pkgsrc.org>2010-05-21 22:21:06 +0000
commitb261c99142872d7794262a98f1845296bfc91165 (patch)
tree5ccf5be68dd683f3976fd304874d8b7cbee451e8 /mk/tools/replace.mk
parentad15dcd1443bcd51acb650efb56c6219b1db1424 (diff)
downloadpkgsrc-b261c99142872d7794262a98f1845296bfc91165.tar.gz
if X11_TYPE is native and certain required tools do not exist nonetheless,
fall back to using the pkgsrc version. This is needed for example with imake on MacOS 10.6 but might potentially apply to other OSes, too.
Diffstat (limited to 'mk/tools/replace.mk')
-rw-r--r--mk/tools/replace.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk
index 7aaa297d6ce..f8ff38fef3a 100644
--- a/mk/tools/replace.mk
+++ b/mk/tools/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.225 2010/04/25 22:01:22 seanb Exp $
+# $NetBSD: replace.mk,v 1.226 2010/05/21 22:21:06 schwarz Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -1188,7 +1188,13 @@ TOOLS_DEPENDS.${_t_}?= imake-[0-9]*:../../devel/imake
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=imake
TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/${_t_}
. else # !empty(X11_TYPE:Mnative)
+. if exists(${X11BASE}/bin/${_t_})
TOOLS_PATH.${_t_}= ${X11BASE}/bin/${_t_}
+. else # X11_TYPE native, but tool does not exist, so fall back
+TOOLS_DEPENDS.${_t_}?= imake-[0-9]*:../../devel/imake
+TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=imake
+TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/${_t_}
+. endif
. endif
. endif
. endif