summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-08-10 13:09:52 +0000
committerjoerg <joerg@pkgsrc.org>2007-08-10 13:09:52 +0000
commitdfb9b6a575d89469b979bb744fc8f5b496ca70ca (patch)
tree654200f32e93454415a19d5f28c8b21410977de8 /mk/bsd.pkg.mk
parent06cbbe04912fe848ffedcbddb25d515804041ab4 (diff)
downloadpkgsrc-dfb9b6a575d89469b979bb744fc8f5b496ca70ca.tar.gz
Try a bit harder to guess which mk.conf the user is using, when
telling him to accept a license: - if MAKECONF is set, use that - if this is NetBSD and a non-bootstrap make is used, take /etc/mk.conf - otherwise use ${PREFIX}/etc/mk.conf. Issues reported by Michael Neumann on DragonFly's user list.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk12
1 files changed, 10 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 819063a4979..7513777c478 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1917 2007/08/03 14:03:39 joerg Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1918 2007/08/10 13:09:52 joerg Exp $
#
# This file is in the public domain.
#
@@ -544,9 +544,17 @@ PKG_FAIL_REASON+= "${PKGNAME} is marked as broken:" ${BROKEN:Q}
_ACCEPTABLE= yes
. endif # ACCEPTABLE_LICENSES
. if !defined(_ACCEPTABLE)
+. if defined(MAKECONF)
+_MAKECONF?= ${MAKECONF}
+. elif ${OPSYS} == "NetBSD" && ${MAKE} != "${PREFIX}/bin/bmake"
+_MAKECONF?= /etc/mk.conf
+. else
+_MAKECONF?= ${PREFIX}/etc/mk.conf
+. endif
+
PKG_FAIL_REASON+= "${PKGNAME} has an unacceptable license: ${LICENSE}." \
" To view the license, enter \"${MAKE} show-license\"." \
- " To indicate acceptance, add this line to your /etc/mk.conf:" \
+ " To indicate acceptance, add this line to ${_MAKECONF}:" \
" ACCEPTABLE_LICENSES+=${LICENSE}"
. endif # _ACCEPTABLE
. endif # LICENSE