aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2018-02-08 08:55:45 +0100
committerAnders Broman <a.broman58@gmail.com>2018-02-08 11:45:50 +0000
commitf814c40ad3d60529fd16ee43464aa45b5c5bdcb8 (patch)
tree5e1623292b5861a87226f43d7a8b883418c0eac4
parent8eed71f53974a0274f901edb63e9476c452e9eaa (diff)
tools: add new SPDX GPL format to licensecheck.pl.
Change-Id: Ie148f8a660027df8194bd3890a108c0639a18823 Reviewed-on: https://code.wireshark.org/review/25680 Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rwxr-xr-xtools/licensecheck.pl9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/licensecheck.pl b/tools/licensecheck.pl
index f56b7b05c9..43a8779e6c 100755
--- a/tools/licensecheck.pl
+++ b/tools/licensecheck.pl
@@ -626,6 +626,8 @@ sub parselicense {
$gplver = " (v$1 or later)";
} elsif ($licensetext =~ /GPL\sas\spublished\sby\sthe\sFree\sSoftware\sFoundation,\sversion\s([\d.]+)/i ) {
$gplver = " (v$1)";
+ } elsif ($licensetext =~ /SPDX-License-Identifier:\s+GPL-([1-9])\.0-or-later/i ){
+ $gplver = " (v$1 or later)";
} elsif ($licensetext =~ /SPDX-License-Identifier:\s+GPL-([1-9])\.0[^+]/i ) {
$gplver = " (v$1)";
} elsif ($licensetext =~ /SPDX-License-Identifier:\s+GPL-([1-9])\.0\+/i ) {
@@ -675,11 +677,14 @@ sub parselicense {
$license = "GPL$gplver$extrainfo $license";
}
- if ($licensetext =~ /SPDX-License-Identifier:\s+GPL/i
- and length $gplver) {
+ if ($licensetext =~ /SPDX-License-Identifier:\s+GPL/i and length $gplver) {
$license = "GPL$gplver$extrainfo $license";
}
+ if ($licensetext =~ /SPDX-License-Identifier:\s+GPL-2.0-or-later/i and length $gplver) {
+ $license = "GPL$gplver$extrainfo";
+ }
+
if ($licensetext =~ /SPDX-License-Identifier:\s+LGPL/i and length $gplver) {
$license = "LGPL$gplver$extrainfo $license";
}