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

js pushed a commit to branch master
in repository licensecheck.

commit 85c68d8d08c8cb9683ba73f66c36c6cd9f244f79
Author: Jonas Smedegaard <d...@jones.dk>
Date:   Fri Nov 25 21:18:31 2016 +0100

    Add new license pattern icu.
---
 lib/App/Licensecheck.pm             |  5 +++++
 lib/Regexp/Pattern/License.pm       |  6 ++++++
 lib/Regexp/Pattern/License/Parts.pm | 18 +++++++++++++++++-
 t/SPDX/ICU.txt                      | 12 ++++++++++++
 t/fedora.t                          |  2 +-
 5 files changed, 41 insertions(+), 2 deletions(-)

diff --git a/lib/App/Licensecheck.pm b/lib/App/Licensecheck.pm
index fe5780e..beac291 100755
--- a/lib/App/Licensecheck.pm
+++ b/lib/App/Licensecheck.pm
@@ -670,6 +670,11 @@ sub parse_license
                        $gen_license->('isc');
                }
        }
+       given ($licensetext) {
+               when ( /$L{re}{icu}/) {
+                       $gen_license->('icu');
+               }
+       }
 
        # BSD
        if ( $licensetext =~ /THIS SOFTWARE IS PROVIDED .*AS IS AND ANY EXPRESS 
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
MERCHANTABILITY/ ) {
diff --git a/lib/Regexp/Pattern/License.pm b/lib/Regexp/Pattern/License.pm
index 7923ac1..0dfaf95 100644
--- a/lib/Regexp/Pattern/License.pm
+++ b/lib/Regexp/Pattern/License.pm
@@ -440,6 +440,12 @@ our %RE = (
                tags => ['mit'],
                pat  => qr/$P{note_cpyr_perm}\.\s+$P{asis_sw_name_discl}/,
        },
+       icu => {
+               name => 'ICU',
+               tags => ['mit'],
+               pat =>
+                       qr/$P{note_cpyr_perm} of the Software and that 
$P{note_cpyr_perm_doc}\.\s+$P{asis_sw_warranty}(?:[^.]+\.\s+){2}$P{nopromo_except}/,
+       },
        lgpl => {
                name    => 'LGPL',
                summary => 'The GNU Lesser General Public License',
diff --git a/lib/Regexp/Pattern/License/Parts.pm 
b/lib/Regexp/Pattern/License/Parts.pm
index 9941fe9..8c9f155 100644
--- a/lib/Regexp/Pattern/License/Parts.pm
+++ b/lib/Regexp/Pattern/License/Parts.pm
@@ -75,12 +75,16 @@ Patterns each covering a single part, e.g. a clause or a 
disclaimer phrase.
 
 =item * discl_name_warranties
 
+=item * nopromo_except
+
 =item * nopromo_neither
 
 =item * nopromo_written_prior
 
 =item * note_cpyr_perm
 
+=item * note_cpyr_perm_doc
+
 =item * note_invar
 
 =item * note_repro_notice_cond_discl
@@ -275,6 +279,12 @@ our %RE = (
                tags    => ['clause'],
                pat     => qr/(?:\S+ ){1,15}DISCLAIMS? ALL WARRANTIES/,
        },
+       nopromo_except => {
+               caption => 'no promotion (except)',
+               tags    => ['clause'],
+               pat =>
+                       qr/Except as contained in this notice, the names? 
(?:\S+ ){1,15}shall not be used in advertising/,
+       },
        nopromo_neither => {
                caption => 'no promotion (neither)',
                tags    => ['clause'],
@@ -290,7 +300,13 @@ our %RE = (
                caption => 'notice (copyright + permission)',
                tags    => ['clause'],
                pat =>
-                       qr/provided that the above copyright notice and this 
permission notice appear in all copies/,
+                       qr/provided that(?:\W*\S\W*)? the above copyright 
notice(?:\(?s\)?)? and this permission notice appear in all copies/,
+       },
+       note_cpyr_perm_doc => {
+               caption => 'notice (copyright + permission, documentation)',
+               tags    => ['clause'],
+               pat =>
+                       qr/both the above copyright notice\(s\) and this 
permission notice appear in supporting documentation/,
        },
        note_cpyr_perm_subst => {
                caption => 'notices (copyright, permission, substantial 
portions)',
diff --git a/t/SPDX/ICU.txt b/t/SPDX/ICU.txt
new file mode 100644
index 0000000..883ab20
--- /dev/null
+++ b/t/SPDX/ICU.txt
@@ -0,0 +1,12 @@
+ICU License - ICU 1.8.1 and later
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1995-2014 International Business Machines Corporation and others
+All rights reserved.
+
+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, and/or sell copies of the 
Software, and to permit persons to whom the Software is furnished to do so, 
provided that the above copyright notice(s) and this permission notice appear 
in all copies 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 OF THIRD PARTY RIGHTS. IN 
NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE 
LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY 
DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
ACTION OF CONTRACT, NEGLIGENCE OR  [...]
+
+Except as contained in this notice, the name of a copyright holder shall not 
be used in advertising or otherwise to promote the sale, use or other dealings 
in this Software without prior written authorization of the copyright holder.
diff --git a/t/fedora.t b/t/fedora.t
index a5f462a..09df727 100644
--- a/t/fedora.t
+++ b/t/fedora.t
@@ -27,7 +27,7 @@ test "Parse corpus" => sub {
 
 run_me(
        {   license =>
-                       'MIT~oldstyle and/or DSDP and/or 
MIT~oldstyle~disclaimer and/or Expat and/or Adobe-Glyph and/or BSL and/or 
PostgreSQL',
+                       'MIT~oldstyle and/or DSDP and/or 
MIT~oldstyle~disclaimer and/or Expat and/or ICU 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

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to