Author: adsb
Date: 2009-02-01 18:41:46 +0000 (Sun, 01 Feb 2009)
New Revision: 1807

Modified:
   trunk/debian/changelog
   trunk/scripts/licensecheck.pl
Log:
* licensecheck:
  + Remove C /* */ comments. Based on a patch by Jörg Sommer.
  + Identify another form of GPL wording.

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2009-01-29 20:38:35 UTC (rev 1806)
+++ trunk/debian/changelog      2009-02-01 18:41:46 UTC (rev 1807)
@@ -5,6 +5,9 @@
       reporting spam to match recent changes to the BTS.
     + If -n / --no-action was given on the command line, print the URL that
       would have been used to report spam rather than sending the report.
+  * licensecheck:
+    + Remove C /* */ comments. Based on a patch by Jörg Sommer.
+    + Identify another form of GPL wording.
   * README.newscripts: Correct the "svn propset" syntax added in the previous
     upload.
 

Modified: trunk/scripts/licensecheck.pl
===================================================================
--- trunk/scripts/licensecheck.pl       2009-01-29 20:38:35 UTC (rev 1806)
+++ trunk/scripts/licensecheck.pl       2009-02-01 18:41:46 UTC (rev 1807)
@@ -283,8 +283,9 @@
        if $opt_verbose;
 
     $content =~ tr/\t\r\n/ /;
+    # Remove C / C++ comments
+    $content =~ s#(\*/|/[/*])##g;
     $content =~ tr% A-Za-z.,@;0-9\(\)/-%%cd;
-    $content =~ s#//##g;
     $content =~ s/ c //g; # Remove fortran comments
     $content =~ tr/ //s;
 
@@ -382,6 +383,8 @@
        $licensetext =~ /GNU General Public License as published by the Free 
Software Foundation; version ([^ ]+) /i) {
 
        $gplver = " (v$1)";
+    } elsif ($licensetext =~ /GNU General Public License, version ([^ ]+?)[ 
.]/) {
+       $gplver = " (v$1)";
     } elsif ($licensetext =~ /either version ([^ ]+) of the License, or \(at 
your option\) any later version/) {
        $gplver = " (v$1 or later)";
     }
@@ -406,6 +409,11 @@
        $license = "GPL$gplver$extrainfo $license";
     }
 
+    if ($licensetext =~ /is distributed under the terms of the GNU General 
Public License,/
+       and length $gplver) {
+       $license = "GPL$gplver$extrainfo $license";
+    }
+
     if ($licensetext =~ /is distributed.*terms.*GPL/) {
        $license = "GPL (unversioned/unknown version) $license";
     }



-- 
To unsubscribe, send mail to [email protected].

Reply via email to