Author: adam-guest
Date: 2008-10-07 18:51:59 +0000 (Tue, 07 Oct 2008)
New Revision: 1658
Modified:
trunk/debian/changelog
trunk/scripts/licensecheck.pl
Log:
licensecheck: Add support for fortran and Scilab files and for detecting
the CeCILL and "SGI Free B" licenses. Thanks Sylvestre Ledru
(Closes: #501447)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-10-02 19:31:44 UTC (rev 1657)
+++ trunk/debian/changelog 2008-10-07 18:51:59 UTC (rev 1658)
@@ -13,6 +13,9 @@
* debian/rules: Create a link from the French pts-subscribe manpage
as pts-unsubscribe, so long as the former exists (i.e. has been
sufficiently translated).
+ * licensecheck: Add support for fortran and Scilab files and for detecting
+ the CeCILL and "SGI Free B" licenses. Thanks Sylvestre Ledru
+ (Closes: #501447)
[ James Vega ]
* pts-subscribe: When called as pts-unsubscribe, send an unsubscribe request
Modified: trunk/scripts/licensecheck.pl
===================================================================
--- trunk/scripts/licensecheck.pl 2008-10-02 19:31:44 UTC (rev 1657)
+++ trunk/scripts/licensecheck.pl 2008-10-07 18:51:59 UTC (rev 1658)
@@ -151,7 +151,7 @@
$default_ignore_regex =~ s/^#.*$//mg;
$default_ignore_regex =~ s/\n//sg;
-my $default_check_regex =
'\.(c(c|pp|xx)?|h(h|pp|xx)?|p(l|m)|sh|php|py|rb|java|el)$';
+my $default_check_regex =
'\.(c(c|pp|xx)?|h(h|pp|xx)|f(77|90)?|p(l|m)|sh|php|py|rb|java|el|sc(i|e))$';
my $modified_conf_msg;
@@ -285,6 +285,7 @@
$content =~ tr/\t\r\n/ /;
$content =~ tr% A-Za-z.,@;0-9\(\)/-%%cd;
$content =~ s#//##g;
+ $content =~ s/ c //g; # Remove fortran comments
$content =~ tr/ //s;
$license = parselicense($content);
@@ -445,6 +446,10 @@
$license = "Artistic (v$1) $license";
}
+ if ($licensetext =~ /is free software under the Artistic [Ll]icense/) {
+ $license = "Artistic $license";
+ }
+
if ($licensetext =~ /This program is free software; you can redistribute
it and\/or modify it under the same terms as Perl itself/) {
$license = "Perl $license";
}
@@ -457,6 +462,18 @@
$license = "PHP (v$1) $license";
}
+ if ($licensetext =~ /under the terms of the CeCILL /) {
+ $license = "CeCILL $license";
+ }
+
+ if ($licensetext =~ /under the terms of the CeCILL-([^ ]+) /) {
+ $license = "CeCILL-$1 $license";
+ }
+
+ if ($licensetext =~ /under the SGI Free Software License B/) {
+ $license = "SGI Free Software License B $license";
+ }
+
if ($licensetext =~ /is in the public domain/i) {
$license = "Public domain";
}
--
To unsubscribe, send mail to [EMAIL PROTECTED]