[licensecheck] 105/112: Add new license patterns mit_enna mit_feh.

Jonas Smedegaard dr at jones.dk
Fri Nov 25 22:03:01 UTC 2016


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository licensecheck.

commit 5ea67985f872fd29ee5cc2efe96ab87eb08dfe3d
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Fri Nov 25 21:46:54 2016 +0100

    Add new license patterns mit_enna mit_feh.
---
 lib/App/Licensecheck.pm             |  2 +-
 lib/Regexp/Pattern/License.pm       | 16 ++++++++++++++++
 lib/Regexp/Pattern/License/Parts.pm | 16 ++++++++++++++++
 t/SPDX/MIT-enna.txt                 |  9 +++++++++
 t/SPDX/MIT-feh.txt                  |  5 +++++
 t/fedora.t                          |  2 +-
 6 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/lib/App/Licensecheck.pm b/lib/App/Licensecheck.pm
index 69fbdff..09b46ba 100755
--- a/lib/App/Licensecheck.pm
+++ b/lib/App/Licensecheck.pm
@@ -627,7 +627,7 @@ sub parse_license
 
 	# MIT
 	given ($licensetext) {
-		foreach my $id (qw<curl icu isc mit_new mit_old mit_oldstyle mit_oldstyle_disclaimer mit_oldstyle_permission>) {
+		foreach my $id (qw<curl icu isc mit_enna mit_feh mit_new mit_old mit_oldstyle mit_oldstyle_disclaimer mit_oldstyle_permission>) {
 			when ( /$L{re}{$id}/) {
 				$gen_license->($id);
 				continue;
diff --git a/lib/Regexp/Pattern/License.pm b/lib/Regexp/Pattern/License.pm
index 0dfaf95..af450d1 100644
--- a/lib/Regexp/Pattern/License.pm
+++ b/lib/Regexp/Pattern/License.pm
@@ -118,6 +118,10 @@ Patterns each covering a single license.
 
 =item * libpng
 
+=item * mit_enna
+
+=item * mit_feh
+
 =item * mit_new
 
 =item * mit_new_materials
@@ -461,6 +465,18 @@ our %RE = (
 		name => 'Libpng',
 		pat  => qr/$the?libpng license/,
 	},
+	mit_enna => {
+		name    => 'MIT-enna',
+		caption => 'MIT (enna)',
+		tags    => ['mit'],
+		pat     => qr/$P{ad_pub_ack_nosrc}/,
+	},
+	mit_feh => {
+		name    => 'MIT-feh',
+		caption => 'MIT (feh)',
+		tags    => ['mit'],
+		pat     => qr/$P{ad_ack_doc_pkg}/,
+	},
 	mit_new => {
 		'name.alt.org.spdx'      => 'MIT',
 		'name.alt.org.debian'    => 'Expat',
diff --git a/lib/Regexp/Pattern/License/Parts.pm b/lib/Regexp/Pattern/License/Parts.pm
index 8c9f155..1323bab 100644
--- a/lib/Regexp/Pattern/License/Parts.pm
+++ b/lib/Regexp/Pattern/License/Parts.pm
@@ -35,8 +35,12 @@ Patterns each covering a single part, e.g. a clause or a disclaimer phrase.
 
 =over
 
+=item * ad_ack_doc_pkg
+
 =item * ad_always
 
+=item * ad_pub_ack_nosrc
+
 =item * ad_verbatim
 
 =item * asis_expr_warranty
@@ -178,11 +182,23 @@ my $derive_altermark
 my $invariant_notice = qr/This notice may not be removed or altered/;
 
 our %RE = (
+	ad_ack_doc_pkg => {
+		caption => 'advertisement (aknowledge, documentation, packages)',
+		tags    => ['clause'],
+		pat =>
+			qr/acknowledgment shall be given in the documentation and software packages that this Software was used/,
+	},
 	ad_always => {
 		caption => 'advertisement',
 		tags    => ['clause'],
 		pat     => qr/$redist_any must retain $ack[^a-zA-Z]+$product_by/,
 	},
+	ad_pub_ack_nosrc => {
+		caption => 'advertisement (public, aknowledge, no source)',
+		tags    => ['clause'],
+		pat =>
+			qr/publicly documented acknowledgment must be given that this software has been used if no source/,
+	},
 	ad_verbatim => {
 		caption => 'advertisement (verbatim)',
 		tags    => ['clause'],
diff --git a/t/SPDX/MIT-enna.txt b/t/SPDX/MIT-enna.txt
new file mode 100644
index 0000000..0cf0d92
--- /dev/null
+++ b/t/SPDX/MIT-enna.txt
@@ -0,0 +1,9 @@
+Copyright (C) 2000 Carsten Haitzler and various contributors (see AUTHORS)
+
+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 of the Software and its Copyright notices. In addition publicly documented acknowledgment must be given that this software has been used if no source code of this software is made available publicly. This includes acknowledgments in either Copyright notices, Manuals, Publicity and Marketing documents or any documentation provided with any product containing this software. This License does not apply to  [...]
+
+Please see the COPYING.PLAIN for a plain-english explanation of this notice and it's intent.
+
+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 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.
\ No newline at end of file
diff --git a/t/SPDX/MIT-feh.txt b/t/SPDX/MIT-feh.txt
new file mode 100644
index 0000000..f761334
--- /dev/null
+++ b/t/SPDX/MIT-feh.txt
@@ -0,0 +1,5 @@
+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 of the Software and its documentation and acknowledgment shall be given in the documentation and software packages that this Software was used.
+
+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 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.
\ No newline at end of file
diff --git a/t/fedora.t b/t/fedora.t
index de66410..8fb4e5a 100644
--- a/t/fedora.t
+++ b/t/fedora.t
@@ -27,7 +27,7 @@ test "Parse corpus" => sub {
 
 run_me(
 	{   license =>
-			'ICU and/or Expat and/or MIT~old and/or MIT~oldstyle and/or MIT~oldstyle~disclaimer and/or DSDP and/or Adobe-Glyph and/or BSL and/or PostgreSQL',
+			'ICU and/or MIT-enna and/or MIT-feh and/or Expat and/or MIT~old and/or MIT~oldstyle and/or MIT~oldstyle~disclaimer and/or DSDP and/or Adobe-Glyph and/or BSL and/or PostgreSQL',
 		corpus => 'MIT'
 	}
 );

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/licensecheck.git



More information about the Pkg-perl-cvs-commits mailing list