Subject: Re: LICENSE and RESTRICTED
To: None <tech-pkg@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-pkg
Date: 07/28/2005 11:39:47
On Wed, 27 Jul 2005, Greg Troxel wrote:
> Setting LICENSE to "shareware" etc. is deprecated because it is
> imprecise and there is no way to denote having paid a fee for the use
> of one package but not all shareware programs.
It's quite easy to allow stuff like
ACCEPTABLE_LICENSES.foo= shareware
See patch below. I have been using this (or something similar) for years.
--apb (Alan Barrett)
--- bsd.pkg.mk 17 Jul 2005 04:17:09 -0000 1.1709
+++ bsd.pkg.mk 28 Jul 2005 09:38:38 -0000
@@ -974,10 +974,18 @@
. endif # LICENSE == _lic
. endfor # _lic
. endif # ACCEPTABLE_LICENSES
+. ifdef ACCEPTABLE_LICENSES.${PKGBASE}
+. for _lic in ${ACCEPTABLE_LICENSES.${PKGBASE}}
+. if ${LICENSE} == "${_lic}"
+_ACCEPTABLE= yes
+. endif # LICENSE == _lic
+. endfor # _lic
+. endif # ACCEPTABLE_LICENSES.${PKGNAME}
. if !defined(_ACCEPTABLE)
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 one of these lines to your /etc/mk.conf:" \
+ " ACCEPTABLE_LICENSES.${PKGBASE}+=${LICENSE}" \
" ACCEPTABLE_LICENSES+=${LICENSE}"
. endif # _ACCEPTABLE
. endif # LICENSE