pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Try a bit harder to guess which mk.conf the user is...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/916f410e9e33
branches:  trunk
changeset: 532033:916f410e9e33
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Fri Aug 10 13:09:52 2007 +0000

description:
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:

 mk/bsd.pkg.mk |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r 80e35e65cb02 -r 916f410e9e33 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Fri Aug 10 13:04:13 2007 +0000
+++ b/mk/bsd.pkg.mk     Fri Aug 10 13:09:52 2007 +0000
@@ -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 @@
 _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



Home | Main Index | Thread Index | Old Index