pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Switch to the license handling in license.mk.
details: https://anonhg.NetBSD.org/pkgsrc/rev/4b606b71b432
branches: trunk
changeset: 557009:4b606b71b432
user: wiz <wiz%pkgsrc.org@localhost>
date: Wed Apr 08 14:47:26 2009 +0000
description:
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:
mk/bsd.pkg.mk | 31 ++-----------------------------
mk/license.mk | 25 +++++++++++++++++--------
2 files changed, 19 insertions(+), 37 deletions(-)
diffs (108 lines):
diff -r 41e8fa93d6c0 -r 4b606b71b432 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Wed Apr 08 13:10:15 2009 +0000
+++ b/mk/bsd.pkg.mk Wed Apr 08 14:47:26 2009 +0000
@@ -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 @@
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} 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 -r 41e8fa93d6c0 -r 4b606b71b432 mk/license.mk
--- a/mk/license.mk Wed Apr 08 13:10:15 2009 +0000
+++ b/mk/license.mk Wed Apr 08 14:47:26 2009 +0000
@@ -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 @@
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 @@
. 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
Home |
Main Index |
Thread Index |
Old Index