[devscripts] 03/04: licensecheck: added freetype license

dod at debian.org dod at debian.org
Sun Nov 22 19:51:20 UTC 2015


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

dod pushed a commit to branch master
in repository devscripts.

commit ddca8a13674bf9fe8249447fd525f5cb4e4420cf
Author: Dominique Dumont <dod at debian.org>
Date:   Thu Nov 19 20:54:34 2015 +0100

    licensecheck: added freetype license
---
 debian/changelog             |  3 +++
 scripts/licensecheck.pl      |  8 +++++++-
 test/licensecheck/freetype.c | 16 ++++++++++++++++
 test/test_licensecheck       |  4 ++++
 4 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index f6d8f7f..f0108ae 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -30,6 +30,9 @@ devscripts (2.15.10) UNRELEASED; urgency=medium
     + added --encoding option. By default, input files are handled as utf-8
       Information is printed on STDOUT as utf-8.
     * --text option is deprecated
+    + added freetype license
+    * remove 'by' from copyritght owners
+    * remove white space from end of multiline copyright statements
 
   [ Osamu Aoki ]
   * uscan:
diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index aaf5982..740c763 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -383,6 +383,7 @@ sub extract_copyright {
 		$copyright_match .= ' '. shift @c;
 	    }
 	    $copyright_match =~ s/\s+/ /g;
+	    $copyright_match =~ s/\s*$//;
 	    $copyrights{lc("$copyright_match")} = "$copyright_match";
         }
 	elsif (scalar keys %copyrights) {
@@ -406,9 +407,10 @@ sub parse_copyright {
             # Ignore lines matching "see foo for copyright information" etc.
             if ($match !~ $copyright_disindicator_regex) {
 		# De-cruft
-                $match =~ s/([,.])?\s*$//;
                 $match =~ s/$copyright_indicator_regex//igx;
                 $match =~ s/^\s+//;
+		$match =~ s/\s*\bby\b\s*/ /;
+                $match =~ s/([,.])?\s*$//;
                 $match =~ s/\s{2,}/ /g;
 		$match =~ s/\\//g; # de-cruft nroff files
                 $match =~ s/\s*[*#]\s*$//;
@@ -607,6 +609,10 @@ sub parselicense {
 	$license = "Beerware $license";
     }
 
+    if ($licensetext =~ /distributed under the terms of the FreeType project/i) {
+	$license = "FreeType $license"; # aka FTL see http://www.freetype.org/license.html
+    }
+
     if ($licensetext =~ /This source file is subject to version ([^ ]+) of the PHP license/) {
 	$license = "PHP (v$1) $license";
     }
diff --git a/test/licensecheck/freetype.c b/test/licensecheck/freetype.c
new file mode 100644
index 0000000..19208b1
--- /dev/null
+++ b/test/licensecheck/freetype.c
@@ -0,0 +1,16 @@
+/***************************************************************************/
+/*                                                                         */
+/*  fnterrs.h                                                              */
+/*                                                                         */
+/*    Win FNT/FON error codes (specification only).                        */
+/*                                                                         */
+/*  Copyright 2001, 2012 by                                                */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
diff --git a/test/test_licensecheck b/test/test_licensecheck
index 5225b0f..44da012 100755
--- a/test/test_licensecheck
+++ b/test/test_licensecheck
@@ -106,6 +106,10 @@ testMPL() {
     license "mpl-2.0-comma.sh" "MPL (v2.0)"
 }
 
+testFreeType() {
+    license2 "-m --copyright" "freetype.c" "FreeType	2001, 2012 David Turner, Robert Wilhelm, and Werner Lemberg."
+}
+
 testCDDL() {
     license2 "-m --copyright" "cddl.h" "CDDL	2006 Sun Microsystems, Inc. All rights reserved"
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list