[licensecheck] 64/112: Add license patterns libpng zlib zlib_acknowledgement.
Jonas Smedegaard
dr at jones.dk
Fri Nov 25 22:01:58 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 5c489ec3c4fc5bab05bd34af43f495a4b535cc30
Author: Jonas Smedegaard <dr at jones.dk>
Date: Mon Oct 10 09:58:33 2016 +0200
Add license patterns libpng zlib zlib_acknowledgement.
---
lib/App/Licensecheck.pm | 17 ++++-----
lib/Regexp/Pattern/License.pm | 23 +++++++++++
lib/Regexp/Pattern/License/Parts.pm | 39 +++++++++++++++++++
t/SPDX/Libpng.txt | 76 +++++++++++++++++++++++++++++++++++++
t/SPDX/Zlib.txt | 11 ++++++
t/SPDX/zlib-acknowledgement.txt | 15 ++++++++
6 files changed, 171 insertions(+), 10 deletions(-)
diff --git a/lib/App/Licensecheck.pm b/lib/App/Licensecheck.pm
index 6a984eb..e0cc692 100755
--- a/lib/App/Licensecheck.pm
+++ b/lib/App/Licensecheck.pm
@@ -56,15 +56,12 @@ See the script for casual usage.
# legacy descriptive names different from SPDX shortnames
my %SPDX = (
- Libpng => 'libpng',
'MS-PL' => 'Ms-PL',
'public-domain' => 'Public domain',
'Python' => 'PSF',
'SGI-B' => 'SGI Free Software License B',
'Unicode-strict' => 'Unicode strict',
'Unicode-TOU' => 'Unicode Terms Of Use',
- Zlib => 'zlib/libpng',
- 'zlib-acknowledgement' => 'zlib/libpng with Acknowledgement',
);
my $under_terms_of
@@ -938,17 +935,17 @@ sub parse_license
# Zlib/Libpng
given ($licensetext) {
- when ( /acknowledgment .* in the product documentation is required/ ) {
- $gen_license->('zlib-acknowledgement');
+ when ( /$L{re}{'zlib_acknowledgement'}/ ) {
+ $gen_license->('zlib_acknowledgement');
}
- when ( /The origin of this software must not be misrepresented.*Altered source versions must be plainly marked as such.*This notice may not be removed or altered from any source distribution/ ) {
- $gen_license->('Zlib');
+ when ( /$L{re}{zlib}/ ) {
+ $gen_license->('zlib');
}
when ( /see copyright notice in zlib\.h/ ) {
- $gen_license->('Zlib');
+ $gen_license->('zlib');
}
- when ( /This code is released under the libpng license/ ) {
- $gen_license->('Libpng');
+ when ( /This code is released under $L{re}{libpng}/ ) {
+ $gen_license->('libpng');
}
}
diff --git a/lib/Regexp/Pattern/License.pm b/lib/Regexp/Pattern/License.pm
index f4f8af2..1a98778 100644
--- a/lib/Regexp/Pattern/License.pm
+++ b/lib/Regexp/Pattern/License.pm
@@ -80,6 +80,8 @@ Patterns each covering a single license.
=item * lgpl
+=item * libpng
+
=item * mit_new
=item * mit_new_materials
@@ -104,6 +106,10 @@ Patterns each covering a single license.
=item * qpl
+=item * zlib
+
+=item * zlib_acknowledgement
+
=back
=cut
@@ -310,6 +316,10 @@ our %RE = (
pat =>
qr/$the?$gnu?(?:(?:Library|Lesser(?: \(Library\))?) $gpl(?: \(LGPL\))?$by_fsf?|LGPL)/,
},
+ libpng => {
+ name => 'Libpng',
+ pat => qr/$the?libpng license/,
+ },
mit_new => {
'name.alt.org.spdx' => 'MIT',
'name.alt.org.debian' => 'Expat',
@@ -386,6 +396,19 @@ END
pat =>
qr/$the?(?:Q Public License(?: \(QPL\))?$by_fsf?|QPL)/,
},
+ zlib => {
+ name => 'Zlib',
+ caption => 'zlib/libpng',
+ tags => ['zlib'],
+ pat =>
+ qr/$P{origin_no_misrepresent}.*?$P{derive_altermark}.*?$P{retain_notice}/,
+ },
+ zlib_acknowledgement => {
+ name => 'zlib-acknowledgement',
+ caption => 'zlib/libpng with Acknowledgement',
+ tags => ['zlib'],
+ pat => qr/$P{origin_no_misrepresent_ack}/,
+ },
);
=head2 Licensing traits
diff --git a/lib/Regexp/Pattern/License/Parts.pm b/lib/Regexp/Pattern/License/Parts.pm
index 46c2aeb..a849fd5 100644
--- a/lib/Regexp/Pattern/License/Parts.pm
+++ b/lib/Regexp/Pattern/License/Parts.pm
@@ -47,8 +47,14 @@ Patterns each covering a single part, e.g. a clause or a disclaimer phrase.
=item * cc_url_pd
+=item * derive_altermark
+
=item * discl
+=item * origin_no_misrepresent
+
+=item * origin_no_misrepresent_ack
+
=item * permission_granted_without
=item * permission_person_materials
@@ -59,6 +65,8 @@ Patterns each covering a single part, e.g. a clause or a disclaimer phrase.
=item * repro_notice_cond_discl
+=item * retain_notice
+
=item * retain_notice_cond_discl
=item * use_sw_doc_any
@@ -118,6 +126,17 @@ my $to_person = qr/to any person obtaining a copy/;
my $no_authors
= qr/Neither the (?:names? .*|authors?) nor the names of(?: (?:its|their|other|any))? contributors/;
+# origin
+my $origin_no_misrepresent = qr/must not be misrepresented/;
+my $origin_ack = qr/an acknowledgment \(see the following\)/;
+
+# forking
+my $derive_altermark
+ = qr/Altered source versions must be plainly marked as such/;
+
+# invariant parts
+my $invariant_notice = qr/This notice may not be removed or altered/;
+
our %RE = (
ad_verbatim => {
caption => 'advertisement (verbatim)',
@@ -174,6 +193,11 @@ our %RE = (
tags => ['url'],
pat => qr"(?:(?:https?:?)?(?://)?creativecommons.org/publicdomain/)",
},
+ derive_altermark => {
+ caption => 'deriving (must plainly mark)',
+ tags => ['clause'],
+ pat => qr/$derive_altermark/,
+ },
discl => {
caption => 'disclaimer',
tags => ['component'],
@@ -195,6 +219,16 @@ our %RE = (
tags => ['clause'],
pat => qr/without specific, written prior permission/,
},
+ origin_no_misrepresent => {
+ caption => 'origin (no misrepresentation)',
+ tags => ['clause'],
+ pat => qr/$origin_no_misrepresent/,
+ },
+ origin_no_misrepresent_ack => {
+ caption => 'origin (no misrepresentation, acknowledgement)',
+ tags => ['clause'],
+ pat => qr/$origin_no_misrepresent.*, $origin_ack/,
+ },
permission_granted_agree_fee => {
caption => 'permission (granted, no agreement or fee)',
tags => ['clause'],
@@ -244,6 +278,11 @@ our %RE = (
pat =>
qr/$redist_bin must reproduce $notice, $cond and $discl in $doc and\/or $other_mat/,
},
+ retain_notice => {
+ caption => 'retain in source (notice)',
+ tags => ['clause'],
+ pat => qr/This notice may not be removed or altered/,
+ },
retain_notice_cond_discl => {
caption => 'retain in source (notice, conditions, disclaimer)',
tags => ['clause'],
diff --git a/t/SPDX/Libpng.txt b/t/SPDX/Libpng.txt
new file mode 100644
index 0000000..1636402
--- /dev/null
+++ b/t/SPDX/Libpng.txt
@@ -0,0 +1,76 @@
+This copy of the libpng notices is provided for your convenience. In case of any discrepancy between this copy and the notices in the file png.h that is included in the libpng distribution, the latter shall prevail.
+
+COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:
+
+If you modify libpng you may insert additional notices immediately following this sentence.
+
+This code is released under the libpng license.
+
+libpng versions 1.2.6, August 15, 2004, through 1.4.5, December 9, 2010, are Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors
+
+ Cosmin Truta
+
+libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
+Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals added to the list of Contributing Authors
+
+ Simon-Pierre Cadieux
+ Eric S. Raymond
+ Gilles Vollant
+
+and with the following additions to the disclaimer:
+
+ There is no warranty against interference with your enjoyment of the library or against infringement. There is no warranty that our efforts or the library will fulfill any of your particular purposes or needs. This library is provided with all faults, and the entire risk of satisfactory quality, performance, accuracy, and effort is with the user.
+
+libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
+Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-0.96, with the following individuals added to the list of Contributing Authors:
+
+ Tom Lane
+ Glenn Randers-Pehrson
+ Willem van Schaik
+
+libpng versions 0.89, June 1996, through 0.96, May 1997, are
+Copyright (c) 1996, 1997 Andreas Digger
+Distributed according to the same disclaimer and license as libpng-0.88, with the following individuals added to the list of Contributing Authors:
+
+ John Bowler
+ Kevin Bracey
+ Sam Bushell
+ Magnus Holmgren
+ Greg Roelofs
+ Tom Tanner
+
+libpng versions 0.5, May 1995, through 0.88, January 1996, are
+Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
+
+For the purposes of this copyright and license, "Contributing Authors" is defined as the following set of individuals:
+
+ Andreas Dilger
+ Dave Martindale
+ Guy Eric Schalnat
+ Paul Schmidt
+ Tim Wegner
+
+The PNG Reference Library is supplied "AS IS". The Contributing Authors and Group 42, Inc. disclaim all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The Contributing Authors and Group 42, Inc. assume no liability for direct, indirect, incidental, special, exemplary, or consequential damages, which may result from the use of the PNG Reference Library, even if advised of the possibility of such damage.
+
+Permission is hereby granted to use, copy, modify, and distribute this source code, or portions hereof, for any purpose, without fee, subject to the following restrictions:
+
+1. The origin of this source code must not be misrepresented.
+
+2. Altered versions must be plainly marked as such and must not be misrepresented as being the original source.
+
+3. This Copyright notice may not be removed or altered from any source or altered source distribution.
+
+The Contributing Authors and Group 42, Inc. specifically permit, without fee, and encourage the use of this source code as a component to supporting the PNG file format in commercial products. If you use this source code in a product, acknowledgment is not required but would be appreciated.
+
+
+A "png_get_copyright" function is available, for convenient use in "about" boxes and the like:
+
+ printf("%s",png_get_copyright(NULL));
+
+Also, the PNG logo (in PNG format, of course) is supplied in the files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
+
+Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a certification mark of the Open Source Initiative.
+
+Glenn Randers-Pehrson
+glennrp at users.sourceforge.net
+December 9, 2010
\ No newline at end of file
diff --git a/t/SPDX/Zlib.txt b/t/SPDX/Zlib.txt
new file mode 100644
index 0000000..1c0c9ad
--- /dev/null
+++ b/t/SPDX/Zlib.txt
@@ -0,0 +1,11 @@
+zlib License
+
+This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+
+ 3. This notice may not be removed or altered from any source distribution.
diff --git a/t/SPDX/zlib-acknowledgement.txt b/t/SPDX/zlib-acknowledgement.txt
new file mode 100644
index 0000000..cf95431
--- /dev/null
+++ b/t/SPDX/zlib-acknowledgement.txt
@@ -0,0 +1,15 @@
+Copyright (c) 2002-2007 Charlie Poole
+Copyright (c) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov
+Copyright (c) 2000-2002 Philip A. Craig
+
+This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment (see the following) in the product documentation is required.
+
+ Portions Copyright (c) 2002-2007 Charlie Poole or Copyright (c) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright (c) 2000-2002 Philip A. Craig
+
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source distribution.
--
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