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>
This commit is contained in:
Dario Lombardo 2018-02-08 08:55:45 +01:00 committed by Anders Broman
parent 8eed71f539
commit f814c40ad3
1 changed files with 7 additions and 2 deletions

View File

@ -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";
}