Tue May 26 12:19:12 2009 UTC ()
Add the "MIT" license, from
  http://www.opensource.org/licenses/mit-license.php
and add it to DEFAULT_ACCEPTABLE_LICENSES.
Based on hints from joerg@.


(he)
diff -r0 -r1.1 pkgsrc/licenses/mit
diff -r1.21 -r1.22 pkgsrc/mk/license.mk

File Added: pkgsrc/licenses/mit
The MIT License

Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

cvs diff -r1.21 -r1.22 pkgsrc/mk/license.mk (switch to unified diff)

--- pkgsrc/mk/license.mk 2009/05/21 19:05:01 1.21
+++ pkgsrc/mk/license.mk 2009/05/26 12:19:12 1.22
@@ -1,140 +1,140 @@ @@ -1,140 +1,140 @@
1# $NetBSD: license.mk,v 1.21 2009/05/21 19:05:01 wiz Exp $ 1# $NetBSD: license.mk,v 1.22 2009/05/26 12:19:12 he Exp $
2# 2#
3# This file handles everything about the LICENSE variable. It is 3# This file handles everything about the LICENSE variable. It is
4# included automatically by bsd.pkg.mk. 4# included automatically by bsd.pkg.mk.
5# 5#
6# XXX There should be one place to set the default list and for users 6# XXX There should be one place to set the default list and for users
7# to set the ACCEPTABLE_LICENSES list, used by both source builds and 7# to set the ACCEPTABLE_LICENSES list, used by both source builds and
8# binary installs# 8# binary installs#
9# 9#
10# XXX: Some of this content arguably belongs in the pkgsrc guide 10# XXX: Some of this content arguably belongs in the pkgsrc guide
11# instead. 11# instead.
12# 12#
13# === User-settable variables === 13# === User-settable variables ===
14# 14#
15# ACCEPTABLE_LICENSES 15# ACCEPTABLE_LICENSES
16# 16#
17# If a package declares a license and that license is not a 17# If a package declares a license and that license is not a
18# member of the list defined by this variable, pkgsrc will not 18# member of the list defined by this variable, pkgsrc will not
19# build the package and instead print an error message. 19# build the package and instead print an error message.
20# (pkg_install has code to behave the same way, but it is not 20# (pkg_install has code to behave the same way, but it is not
21# yet turned on.) 21# yet turned on.)
22# 22#
23# XXX: Perhaps there should be some mechanism to prevent running 23# XXX: Perhaps there should be some mechanism to prevent running
24# programs that are part of packages that declare LICENSEs that 24# programs that are part of packages that declare LICENSEs that
25# are not in ACCEPTABLE_LICENSES or some per-user variable. 25# are not in ACCEPTABLE_LICENSES or some per-user variable.
26# This is surely controversial and requires discussion. 26# This is surely controversial and requires discussion.
27# 27#
28# To include the default licenses, you can use the += operator 28# To include the default licenses, you can use the += operator
29# in mk.conf. To override it, use the plain = operator. 29# in mk.conf. To override it, use the plain = operator.
30# 30#
31# Default value: ${DEFAULT_ACCEPTABLE_LICENSES} 31# Default value: ${DEFAULT_ACCEPTABLE_LICENSES}
32# 32#
33# === Package-settable variables === 33# === Package-settable variables ===
34# 34#
35# LICENSE 35# LICENSE
36# 36#
37# The license of the package. 37# The license of the package.
38# 38#
39# Sometimes licensing is other than a single text file. See 39# Sometimes licensing is other than a single text file. See
40# doc/TODO for discussion of how to handle packages with dual 40# doc/TODO for discussion of how to handle packages with dual
41# licensing (a choice) or where multiple licenses apply 41# licensing (a choice) or where multiple licenses apply
42# simultaneously. 42# simultaneously.
43#  43#
44# Every package should specify its license. (Prior to early 2009, 44# Every package should specify its license. (Prior to early 2009,
45# Open Source and Free software did not have license tags.) 45# Open Source and Free software did not have license tags.)
46# 46#
47# Licenses are collected in the licenses/ subdirectory of 47# Licenses are collected in the licenses/ subdirectory of
48# pkgsrc. For open source license, we generally use the same 48# pkgsrc. For open source license, we generally use the same
49# names as either the Open Source Initiative or the Free 49# names as either the Open Source Initiative or the Free
50# Software Foundation, choosing a name to reduce confusion. 50# Software Foundation, choosing a name to reduce confusion.
51# Open source and free licenses do not have a -license suffix, 51# Open source and free licenses do not have a -license suffix,
52# and non-free licenses do. 52# and non-free licenses do.
53# 53#
54# http://opensource.org/licenses/category 54# http://opensource.org/licenses/category
55# http://www.fsf.org/licensing/licenses/index_html 55# http://www.fsf.org/licensing/licenses/index_html
56# 56#
57# === Predefined variables === 57# === Predefined variables ===
58# 58#
59# DEFAULT_ACCEPTABLE_LICENSES 59# DEFAULT_ACCEPTABLE_LICENSES
60# The list of licenses that will be the default value of 60# The list of licenses that will be the default value of
61# ACCEPTABLE_LICENSES. Adapting the longstanding policy of Open 61# ACCEPTABLE_LICENSES. Adapting the longstanding policy of Open
62# Source or Free licenses not requiring tags, it should contain 62# Source or Free licenses not requiring tags, it should contain
63# all licenses that are Open Source or Free, so as to provide 63# all licenses that are Open Source or Free, so as to provide
64# the most expansive default that almost all people find 64# the most expansive default that almost all people find
65# acceptable. (Many people will want to add more licenses to 65# acceptable. (Many people will want to add more licenses to
66# ACCEPTABLE_LICENSES; the point is to have a default that very 66# ACCEPTABLE_LICENSES; the point is to have a default that very
67# few people want to shrink.) 67# few people want to shrink.)
68# 68#
69# Licenses not formally approved as Free or Open Source may be 69# Licenses not formally approved as Free or Open Source may be
70# added if they have terms that would obviously be approved if 70# added if they have terms that would obviously be approved if
71# the effort were made. Such license names will have a comment 71# the effort were made. Such license names will have a comment
72# near them in the assignment to DEFAULT_ACCEPTABLE_LICENSES. 72# near them in the assignment to DEFAULT_ACCEPTABLE_LICENSES.
73# 73#
74# The pkg_install sources also have a 74# The pkg_install sources also have a
75# DEFAULT_ACCEPTABLE_LICENSES list, and that should be updated 75# DEFAULT_ACCEPTABLE_LICENSES list, and that should be updated
76# to match the list here. See 76# to match the list here. See
77# pkgsrc/pkgtools/pkg_install/files/lib/license.c 77# pkgsrc/pkgtools/pkg_install/files/lib/license.c
78# 78#
79# === See also === 79# === See also ===
80# 80#
81# ../doc/TODO, section "Licenses of packages" 81# ../doc/TODO, section "Licenses of packages"
82# 82#
83# Keywords: licence license 83# Keywords: licence license
84# 84#
85 85
86# This list is not complete. Free and Open Source licenses should be 86# This list is not complete. Free and Open Source licenses should be
87# added to the list as they are added to pkgsrc. 87# added to the list as they are added to pkgsrc.
88 88
89# The convention is that Free or Open Source licenses do not have a 89# The convention is that Free or Open Source licenses do not have a
90# -license suffix, and nonfree licenses end in -license. 90# -license suffix, and nonfree licenses end in -license.
91 91
92# XXX open-font-license should perhaps be changed to open-font 92# XXX open-font-license should perhaps be changed to open-font
93 93
94DEFAULT_ACCEPTABLE_LICENSES= \ 94DEFAULT_ACCEPTABLE_LICENSES= \
95 public-domain \ 95 public-domain \
96 gnu-fdl-v1.1 gnu-fdl-v1.2 gnu-fdl-v1.3 \ 96 gnu-fdl-v1.1 gnu-fdl-v1.2 gnu-fdl-v1.3 \
97 gnu-gpl-v2 gnu-lgpl-v2 gnu-lgpl-v2.1 \ 97 gnu-gpl-v2 gnu-lgpl-v2 gnu-lgpl-v2.1 \
98 gnu-gpl-v3 gnu-lgpl-v3 \ 98 gnu-gpl-v3 gnu-lgpl-v3 \
99 original-bsd modified-bsd \ 99 original-bsd modified-bsd \
100 x11 \ 100 x11 mit \
101 apache-1.1 apache-2.0 \ 101 apache-1.1 apache-2.0 \
102 artistic artistic-2.0 \ 102 artistic artistic-2.0 \
103 cddl-1.0 \ 103 cddl-1.0 \
104 cpl-1.0 \ 104 cpl-1.0 \
105 open-font-license 105 open-font-license
106 106
107##### Variant spellings 107##### Variant spellings
108 108
109.if defined(ACCEPTABLE_LICENCES) && !defined(ACCEPTABLE_LICENSES) 109.if defined(ACCEPTABLE_LICENCES) && !defined(ACCEPTABLE_LICENSES)
110ACCEPTABLE_LICENSES= ${ACCEPTABLE_LICENCES} 110ACCEPTABLE_LICENSES= ${ACCEPTABLE_LICENCES}
111.endif 111.endif
112 112
113.if !defined(LICENSE) 113.if !defined(LICENSE)
114. if defined(PKG_DEVELOPER) 114. if defined(PKG_DEVELOPER)
115WARNINGS+= "[license.mk] Every package should define a LICENSE." 115WARNINGS+= "[license.mk] Every package should define a LICENSE."
116. endif 116. endif
117 117
118.else 118.else
119 119
120# Note: some bulk builders rely on the fact that they can set 120# Note: some bulk builders rely on the fact that they can set
121# _ACCEPTABLE to bypass license checks. Inform them when you intend to 121# _ACCEPTABLE to bypass license checks. Inform them when you intend to
122# remove this variable. 122# remove this variable.
123. if defined(ACCEPTABLE_LICENSES) && !empty(ACCEPTABLE_LICENSES:M${LICENSE}) 123. if defined(ACCEPTABLE_LICENSES) && !empty(ACCEPTABLE_LICENSES:M${LICENSE})
124_ACCEPTABLE= yes 124_ACCEPTABLE= yes
125. endif 125. endif
126 126
127. if !defined(_ACCEPTABLE) 127. if !defined(_ACCEPTABLE)
128. if defined(MAKECONF) 128. if defined(MAKECONF)
129_MAKECONF?= ${MAKECONF} 129_MAKECONF?= ${MAKECONF}
130. elif ${OPSYS} == "NetBSD" && ${MAKE} != "${PREFIX}/bin/bmake" 130. elif ${OPSYS} == "NetBSD" && ${MAKE} != "${PREFIX}/bin/bmake"
131_MAKECONF?= /etc/mk.conf 131_MAKECONF?= /etc/mk.conf
132. else 132. else
133_MAKECONF?= ${PREFIX}/etc/mk.conf 133_MAKECONF?= ${PREFIX}/etc/mk.conf
134. endif 134. endif
135PKG_FAIL_REASON+= "${PKGNAME} has an unacceptable license: ${LICENSE}." \ 135PKG_FAIL_REASON+= "${PKGNAME} has an unacceptable license: ${LICENSE}." \
136 " To view the license, enter \"${MAKE} show-license\"." \ 136 " To view the license, enter \"${MAKE} show-license\"." \
137 " To indicate acceptance, add this line to ${_MAKECONF}:" \ 137 " To indicate acceptance, add this line to ${_MAKECONF}:" \
138 " ACCEPTABLE_LICENSES+=${LICENSE}" 138 " ACCEPTABLE_LICENSES+=${LICENSE}"
139. endif 139. endif
140.endif 140.endif