summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorwiz <wiz>2009-04-08 14:47:26 +0000
committerwiz <wiz>2009-04-08 14:47:26 +0000
commit7c7d1c4c44bd31e6ab794251538b7fb7747a04e1 (patch)
tree0d488d8d76d43cf437865e25c910cb9cd4341426 /mk
parentd83bf01a033bd43cc6bd64fb5b4f9e092a97d5ae (diff)
downloadpkgsrc-7c7d1c4c44bd31e6ab794251538b7fb7747a04e1.tar.gz
Switch to the license handling in license.mk.
The following licenses are accepted by default: public-domain gnu-gpl-v2 gnu-lgpl-v2 gnu-gpl-v3 gnu-lgpl-v3 original-bsd modified-bsd x11 apache-2.0 cddl-1.0 open-font-license All packages should now be converted to define their LICENSE. Show a warning when PKG_DEVELOPER is set but LICENSE is not defined.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk31
-rw-r--r--mk/license.mk25
2 files changed, 19 insertions, 37 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 8cff26eed8b..4cb300a8b21 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1954 2009/03/20 19:25:01 joerg Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1955 2009/04/08 14:47:26 wiz Exp $
#
# This file is in the public domain.
#
@@ -83,15 +83,6 @@ PKG_FAIL_REASON+= "Circular dependency detected"
MKCRYPTO?= YES # build crypto packages by default
-##### Variant spellings
-
-.if defined(LICENCE) && !defined(LICENSE)
-LICENSE= ${LICENCE}
-.endif
-.if defined(ACCEPTABLE_LICENCES) && !defined(ACCEPTABLE_LICENSES)
-ACCEPTABLE_LICENSES= ${ACCEPTABLE_LICENCES}
-.endif
-
##### Others
BUILD_DEPENDS?= # empty
@@ -529,25 +520,7 @@ PKG_FAIL_REASON+= "${PKGNAME} uses X11, but ${X11BASE} not found"
PKG_FAIL_REASON+= "${PKGNAME} is marked as broken:" ${BROKEN:Q}
. endif
-. if defined(LICENSE)
-. if defined(ACCEPTABLE_LICENSES) && !empty(ACCEPTABLE_LICENSES:M${LICENSE})
-_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 ${_MAKECONF}:" \
- " ACCEPTABLE_LICENSES+=${LICENSE}"
-. endif # _ACCEPTABLE
-. endif # LICENSE
+.include "license.mk"
# Define __PLATFORM_OK only if the OS matches the pkg's allowed list.
. if defined(ONLY_FOR_PLATFORM) && !empty(ONLY_FOR_PLATFORM)
diff --git a/mk/license.mk b/mk/license.mk
index a8444e95b5f..95f09ae8c7e 100644
--- a/mk/license.mk
+++ b/mk/license.mk
@@ -1,4 +1,4 @@
-# $NetBSD: license.mk,v 1.11 2009/03/25 13:50:44 rillig Exp $
+# $NetBSD: license.mk,v 1.12 2009/04/08 14:47:27 wiz Exp $
#
# Note: This file is in draft state and not yet included in default
# pkgsrc operations.
@@ -72,7 +72,7 @@
#
# ../doc/TODO, section "Licenses of packages"
#
-# Keywords: licence
+# Keywords: licence license
#
# This list is not complete. Free and Open Source licenses should be
@@ -97,12 +97,14 @@ DEFAULT_ACCEPTABLE_LICENSES= \
cddl-1.0 \
open-font-license
+##### Variant spellings
+
+.if defined(ACCEPTABLE_LICENCES) && !defined(ACCEPTABLE_LICENSES)
+ACCEPTABLE_LICENSES= ${ACCEPTABLE_LICENCES}
+.endif
+
.if !defined(LICENSE)
-# XXX Revisit date.
-. if defined(AFTER_2007Q3)
-LICENSE?= unknown
-PKG_FAIL_REASON+= "[license.mk] Every package must define a LICENSE."
-. else
+. if defined(PKG_DEVELOPER)
WARNINGS+= "[license.mk] Every package should define a LICENSE."
. endif
@@ -116,9 +118,16 @@ _ACCEPTABLE= yes
. endif
. 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 mk.conf:" \
+ " To indicate acceptance, add this line to ${_MAKECONF}:" \
" ACCEPTABLE_LICENSES+=${LICENSE}"
. endif
.endif