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

js pushed a commit to branch master
in repository licensecheck.

commit d54a2fdd35e53337002eb01a60671822c2f49673
Author: Jonas Smedegaard <d...@jones.dk>
Date:   Mon Sep 19 18:46:51 2016 +0200

    Improve version matching in license detections.
---
 lib/App/Licensecheck.pm | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/App/Licensecheck.pm b/lib/App/Licensecheck.pm
index 7e64f22..8e4e67f 100755
--- a/lib/App/Licensecheck.pm
+++ b/lib/App/Licensecheck.pm
@@ -659,9 +659,9 @@ sub parse_license
 
        # CDDL
        given ($licensetext) {
-               when ( /terms of the Common Development and Distribution 
License(,? $ver_prefix_re($ver_re))? \(the License\)/ ) {
-                       $license = "CDDL " . ( $1 ? "(v$2) " : '' ) . $license;
-                       push @spdx_license, 'CDDL' . ( $1 ? "-$2" : '' );
+               when ( /terms of the Common Development and Distribution 
License(?:,? $ver_prefix_re($ver_re))?/ ) {
+                       $license = "CDDL " . ( $1 ? "(v$1) " : '' ) . $license;
+                       push @spdx_license, 'CDDL' . ( $1 ? "-$1" : '' );
                }
        }
 
@@ -674,14 +674,14 @@ sub parse_license
 
        # AFL
        given ($licensetext) {
-               when ( /Licensed under the Academic Free License 
$ver_prefix_re($ver_re)/ ) {
+               when ( /Licensed under the Academic Free License(?: 
$ver_prefix_re($ver_re))?/ ) {
                        $gen_license->( 'AFL', $1 );
                }
        }
 
        # EPL
        given ($licensetext) {
-               when ( /This program and the accompanying materials are made 
available under the terms of the Eclipse Public License 
$ver_prefix_re($ver_re)/ ) {
+               when ( /This program and the accompanying materials are made 
available under the terms of the Eclipse Public License(?:[ 
,-]+$ver_prefix_re($ver_re))?/ ) {
                        $gen_license->( 'EPL', $1 );
                }
        }
@@ -691,14 +691,14 @@ sub parse_license
                when ( /Permission is hereby granted, free of charge, to any 
person or organization obtaining a copy of the software and accompanying 
documentation covered by this license \(the Software\)/ ) {
                        $gen_license->('BSL');
                }
-               when ( /Boost Software License([ ,-]+ 
$ver_prefix_re($ver_re)?(\.))/i ) {
+               when ( /Boost Software License(?:[ ,-]+ 
$ver_prefix_re($ver_re))?/i ) {
                        $gen_license->( 'BSL', $1, $2 );
                }
        }
 
        # Python
        given ($licensetext) {
-               when ( /PYTHON SOFTWARE FOUNDATION LICENSE(,? 
$ver_prefix_re($ver_re))/i ) {
+               when ( /PYTHON SOFTWARE FOUNDATION LICENSE(?:,? 
$ver_prefix_re($ver_re))?/i ) {
                        $gen_license->( 'Python', $1, $2 );
                }
        }

-- 
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